@poor-knight/cesium-utils 0.5.3 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (385) hide show
  1. package/dist/cesium-utils.cjs +77 -0
  2. package/dist/cesium-utils.d.ts +353 -0
  3. package/dist/cesium-utils.js +7058 -0
  4. package/dist/cesium-utils.umd.cjs +77 -0
  5. package/package.json +1 -1
  6. package/dist/assets/index-WAdYEV0d.css +0 -1
  7. package/dist/assets/index-dJcv6GNb.js +0 -96
  8. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_0.json +0 -1
  9. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_1.json +0 -1
  10. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_10.json +0 -1
  11. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_11.json +0 -1
  12. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_12.json +0 -1
  13. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_13.json +0 -1
  14. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_14.json +0 -1
  15. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_15.json +0 -1
  16. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_16.json +0 -1
  17. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_17.json +0 -1
  18. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_18.json +0 -1
  19. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_19.json +0 -1
  20. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_2.json +0 -1
  21. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_20.json +0 -1
  22. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_21.json +0 -1
  23. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_22.json +0 -1
  24. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_23.json +0 -1
  25. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_24.json +0 -1
  26. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_25.json +0 -1
  27. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_26.json +0 -1
  28. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_27.json +0 -1
  29. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_3.json +0 -1
  30. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_4.json +0 -1
  31. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_5.json +0 -1
  32. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_6.json +0 -1
  33. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_7.json +0 -1
  34. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_8.json +0 -1
  35. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_9.json +0 -1
  36. package/dist/cesium/Assets/Images/bing_maps_credit.png +0 -0
  37. package/dist/cesium/Assets/Images/cesium_credit.png +0 -0
  38. package/dist/cesium/Assets/Images/google_earth_credit.png +0 -0
  39. package/dist/cesium/Assets/Images/ion-credit.png +0 -0
  40. package/dist/cesium/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
  41. package/dist/cesium/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
  42. package/dist/cesium/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
  43. package/dist/cesium/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
  44. package/dist/cesium/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
  45. package/dist/cesium/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
  46. package/dist/cesium/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
  47. package/dist/cesium/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
  48. package/dist/cesium/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
  49. package/dist/cesium/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
  50. package/dist/cesium/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
  51. package/dist/cesium/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
  52. package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
  53. package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
  54. package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
  55. package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
  56. package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
  57. package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
  58. package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
  59. package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
  60. package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
  61. package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
  62. package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
  63. package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
  64. package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
  65. package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
  66. package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
  67. package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
  68. package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
  69. package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
  70. package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
  71. package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
  72. package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
  73. package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
  74. package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
  75. package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
  76. package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
  77. package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
  78. package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
  79. package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
  80. package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
  81. package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
  82. package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
  83. package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
  84. package/dist/cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml +0 -14
  85. package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
  86. package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
  87. package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
  88. package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
  89. package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
  90. package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
  91. package/dist/cesium/Assets/Textures/maki/airfield.png +0 -0
  92. package/dist/cesium/Assets/Textures/maki/airport.png +0 -0
  93. package/dist/cesium/Assets/Textures/maki/alcohol-shop.png +0 -0
  94. package/dist/cesium/Assets/Textures/maki/america-football.png +0 -0
  95. package/dist/cesium/Assets/Textures/maki/art-gallery.png +0 -0
  96. package/dist/cesium/Assets/Textures/maki/bakery.png +0 -0
  97. package/dist/cesium/Assets/Textures/maki/bank.png +0 -0
  98. package/dist/cesium/Assets/Textures/maki/bar.png +0 -0
  99. package/dist/cesium/Assets/Textures/maki/baseball.png +0 -0
  100. package/dist/cesium/Assets/Textures/maki/basketball.png +0 -0
  101. package/dist/cesium/Assets/Textures/maki/beer.png +0 -0
  102. package/dist/cesium/Assets/Textures/maki/bicycle.png +0 -0
  103. package/dist/cesium/Assets/Textures/maki/building.png +0 -0
  104. package/dist/cesium/Assets/Textures/maki/bus.png +0 -0
  105. package/dist/cesium/Assets/Textures/maki/cafe.png +0 -0
  106. package/dist/cesium/Assets/Textures/maki/camera.png +0 -0
  107. package/dist/cesium/Assets/Textures/maki/campsite.png +0 -0
  108. package/dist/cesium/Assets/Textures/maki/car.png +0 -0
  109. package/dist/cesium/Assets/Textures/maki/cemetery.png +0 -0
  110. package/dist/cesium/Assets/Textures/maki/cesium.png +0 -0
  111. package/dist/cesium/Assets/Textures/maki/chemist.png +0 -0
  112. package/dist/cesium/Assets/Textures/maki/cinema.png +0 -0
  113. package/dist/cesium/Assets/Textures/maki/circle-stroked.png +0 -0
  114. package/dist/cesium/Assets/Textures/maki/circle.png +0 -0
  115. package/dist/cesium/Assets/Textures/maki/city.png +0 -0
  116. package/dist/cesium/Assets/Textures/maki/clothing-store.png +0 -0
  117. package/dist/cesium/Assets/Textures/maki/college.png +0 -0
  118. package/dist/cesium/Assets/Textures/maki/commercial.png +0 -0
  119. package/dist/cesium/Assets/Textures/maki/cricket.png +0 -0
  120. package/dist/cesium/Assets/Textures/maki/cross.png +0 -0
  121. package/dist/cesium/Assets/Textures/maki/dam.png +0 -0
  122. package/dist/cesium/Assets/Textures/maki/danger.png +0 -0
  123. package/dist/cesium/Assets/Textures/maki/disability.png +0 -0
  124. package/dist/cesium/Assets/Textures/maki/dog-park.png +0 -0
  125. package/dist/cesium/Assets/Textures/maki/embassy.png +0 -0
  126. package/dist/cesium/Assets/Textures/maki/emergency-telephone.png +0 -0
  127. package/dist/cesium/Assets/Textures/maki/entrance.png +0 -0
  128. package/dist/cesium/Assets/Textures/maki/farm.png +0 -0
  129. package/dist/cesium/Assets/Textures/maki/fast-food.png +0 -0
  130. package/dist/cesium/Assets/Textures/maki/ferry.png +0 -0
  131. package/dist/cesium/Assets/Textures/maki/fire-station.png +0 -0
  132. package/dist/cesium/Assets/Textures/maki/fuel.png +0 -0
  133. package/dist/cesium/Assets/Textures/maki/garden.png +0 -0
  134. package/dist/cesium/Assets/Textures/maki/gift.png +0 -0
  135. package/dist/cesium/Assets/Textures/maki/golf.png +0 -0
  136. package/dist/cesium/Assets/Textures/maki/grocery.png +0 -0
  137. package/dist/cesium/Assets/Textures/maki/hairdresser.png +0 -0
  138. package/dist/cesium/Assets/Textures/maki/harbor.png +0 -0
  139. package/dist/cesium/Assets/Textures/maki/heart.png +0 -0
  140. package/dist/cesium/Assets/Textures/maki/heliport.png +0 -0
  141. package/dist/cesium/Assets/Textures/maki/hospital.png +0 -0
  142. package/dist/cesium/Assets/Textures/maki/ice-cream.png +0 -0
  143. package/dist/cesium/Assets/Textures/maki/industrial.png +0 -0
  144. package/dist/cesium/Assets/Textures/maki/land-use.png +0 -0
  145. package/dist/cesium/Assets/Textures/maki/laundry.png +0 -0
  146. package/dist/cesium/Assets/Textures/maki/library.png +0 -0
  147. package/dist/cesium/Assets/Textures/maki/lighthouse.png +0 -0
  148. package/dist/cesium/Assets/Textures/maki/lodging.png +0 -0
  149. package/dist/cesium/Assets/Textures/maki/logging.png +0 -0
  150. package/dist/cesium/Assets/Textures/maki/london-underground.png +0 -0
  151. package/dist/cesium/Assets/Textures/maki/marker-stroked.png +0 -0
  152. package/dist/cesium/Assets/Textures/maki/marker.png +0 -0
  153. package/dist/cesium/Assets/Textures/maki/minefield.png +0 -0
  154. package/dist/cesium/Assets/Textures/maki/mobilephone.png +0 -0
  155. package/dist/cesium/Assets/Textures/maki/monument.png +0 -0
  156. package/dist/cesium/Assets/Textures/maki/museum.png +0 -0
  157. package/dist/cesium/Assets/Textures/maki/music.png +0 -0
  158. package/dist/cesium/Assets/Textures/maki/oil-well.png +0 -0
  159. package/dist/cesium/Assets/Textures/maki/park.png +0 -0
  160. package/dist/cesium/Assets/Textures/maki/park2.png +0 -0
  161. package/dist/cesium/Assets/Textures/maki/parking-garage.png +0 -0
  162. package/dist/cesium/Assets/Textures/maki/parking.png +0 -0
  163. package/dist/cesium/Assets/Textures/maki/pharmacy.png +0 -0
  164. package/dist/cesium/Assets/Textures/maki/pitch.png +0 -0
  165. package/dist/cesium/Assets/Textures/maki/place-of-worship.png +0 -0
  166. package/dist/cesium/Assets/Textures/maki/playground.png +0 -0
  167. package/dist/cesium/Assets/Textures/maki/police.png +0 -0
  168. package/dist/cesium/Assets/Textures/maki/polling-place.png +0 -0
  169. package/dist/cesium/Assets/Textures/maki/post.png +0 -0
  170. package/dist/cesium/Assets/Textures/maki/prison.png +0 -0
  171. package/dist/cesium/Assets/Textures/maki/rail-above.png +0 -0
  172. package/dist/cesium/Assets/Textures/maki/rail-light.png +0 -0
  173. package/dist/cesium/Assets/Textures/maki/rail-metro.png +0 -0
  174. package/dist/cesium/Assets/Textures/maki/rail-underground.png +0 -0
  175. package/dist/cesium/Assets/Textures/maki/rail.png +0 -0
  176. package/dist/cesium/Assets/Textures/maki/religious-christian.png +0 -0
  177. package/dist/cesium/Assets/Textures/maki/religious-jewish.png +0 -0
  178. package/dist/cesium/Assets/Textures/maki/religious-muslim.png +0 -0
  179. package/dist/cesium/Assets/Textures/maki/restaurant.png +0 -0
  180. package/dist/cesium/Assets/Textures/maki/roadblock.png +0 -0
  181. package/dist/cesium/Assets/Textures/maki/rocket.png +0 -0
  182. package/dist/cesium/Assets/Textures/maki/school.png +0 -0
  183. package/dist/cesium/Assets/Textures/maki/scooter.png +0 -0
  184. package/dist/cesium/Assets/Textures/maki/shop.png +0 -0
  185. package/dist/cesium/Assets/Textures/maki/skiing.png +0 -0
  186. package/dist/cesium/Assets/Textures/maki/slaughterhouse.png +0 -0
  187. package/dist/cesium/Assets/Textures/maki/soccer.png +0 -0
  188. package/dist/cesium/Assets/Textures/maki/square-stroked.png +0 -0
  189. package/dist/cesium/Assets/Textures/maki/square.png +0 -0
  190. package/dist/cesium/Assets/Textures/maki/star-stroked.png +0 -0
  191. package/dist/cesium/Assets/Textures/maki/star.png +0 -0
  192. package/dist/cesium/Assets/Textures/maki/suitcase.png +0 -0
  193. package/dist/cesium/Assets/Textures/maki/swimming.png +0 -0
  194. package/dist/cesium/Assets/Textures/maki/telephone.png +0 -0
  195. package/dist/cesium/Assets/Textures/maki/tennis.png +0 -0
  196. package/dist/cesium/Assets/Textures/maki/theatre.png +0 -0
  197. package/dist/cesium/Assets/Textures/maki/toilets.png +0 -0
  198. package/dist/cesium/Assets/Textures/maki/town-hall.png +0 -0
  199. package/dist/cesium/Assets/Textures/maki/town.png +0 -0
  200. package/dist/cesium/Assets/Textures/maki/triangle-stroked.png +0 -0
  201. package/dist/cesium/Assets/Textures/maki/triangle.png +0 -0
  202. package/dist/cesium/Assets/Textures/maki/village.png +0 -0
  203. package/dist/cesium/Assets/Textures/maki/warehouse.png +0 -0
  204. package/dist/cesium/Assets/Textures/maki/waste-basket.png +0 -0
  205. package/dist/cesium/Assets/Textures/maki/water.png +0 -0
  206. package/dist/cesium/Assets/Textures/maki/wetland.png +0 -0
  207. package/dist/cesium/Assets/Textures/maki/zoo.png +0 -0
  208. package/dist/cesium/Assets/Textures/moonSmall.jpg +0 -0
  209. package/dist/cesium/Assets/Textures/pin.svg +0 -1
  210. package/dist/cesium/Assets/Textures/waterNormals.jpg +0 -0
  211. package/dist/cesium/Assets/Textures/waterNormalsSmall.jpg +0 -0
  212. package/dist/cesium/Assets/approximateTerrainHeights.json +0 -1
  213. package/dist/cesium/Cesium.js +0 -16274
  214. package/dist/cesium/ThirdParty/Workers/package.json +0 -1
  215. package/dist/cesium/ThirdParty/Workers/pako_deflate.min.js +0 -1
  216. package/dist/cesium/ThirdParty/Workers/pako_inflate.min.js +0 -1
  217. package/dist/cesium/ThirdParty/Workers/z-worker-pako.js +0 -1
  218. package/dist/cesium/ThirdParty/basis_transcoder.wasm +0 -0
  219. package/dist/cesium/ThirdParty/draco_decoder.wasm +0 -0
  220. package/dist/cesium/ThirdParty/google-earth-dbroot-parser.js +0 -1
  221. package/dist/cesium/ThirdParty/wasm_splats_bg.wasm +0 -0
  222. package/dist/cesium/Widgets/Animation/Animation.css +0 -127
  223. package/dist/cesium/Widgets/Animation/lighter.css +0 -70
  224. package/dist/cesium/Widgets/BaseLayerPicker/BaseLayerPicker.css +0 -108
  225. package/dist/cesium/Widgets/BaseLayerPicker/lighter.css +0 -22
  226. package/dist/cesium/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +0 -102
  227. package/dist/cesium/Widgets/CesiumInspector/CesiumInspector.css +0 -113
  228. package/dist/cesium/Widgets/CesiumWidget/CesiumWidget.css +0 -119
  229. package/dist/cesium/Widgets/CesiumWidget/lighter.css +0 -14
  230. package/dist/cesium/Widgets/FullscreenButton/FullscreenButton.css +0 -8
  231. package/dist/cesium/Widgets/Geocoder/Geocoder.css +0 -70
  232. package/dist/cesium/Widgets/Geocoder/lighter.css +0 -17
  233. package/dist/cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +0 -27
  234. package/dist/cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
  235. package/dist/cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
  236. package/dist/cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
  237. package/dist/cesium/Widgets/Images/ImageryProviders/bingAerial.png +0 -0
  238. package/dist/cesium/Widgets/Images/ImageryProviders/bingAerialLabels.png +0 -0
  239. package/dist/cesium/Widgets/Images/ImageryProviders/bingRoads.png +0 -0
  240. package/dist/cesium/Widgets/Images/ImageryProviders/blueMarble.png +0 -0
  241. package/dist/cesium/Widgets/Images/ImageryProviders/earthAtNight.png +0 -0
  242. package/dist/cesium/Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png +0 -0
  243. package/dist/cesium/Widgets/Images/ImageryProviders/mapboxSatellite.png +0 -0
  244. package/dist/cesium/Widgets/Images/ImageryProviders/mapboxStreets.png +0 -0
  245. package/dist/cesium/Widgets/Images/ImageryProviders/mapboxTerrain.png +0 -0
  246. package/dist/cesium/Widgets/Images/ImageryProviders/naturalEarthII.png +0 -0
  247. package/dist/cesium/Widgets/Images/ImageryProviders/openStreetMap.png +0 -0
  248. package/dist/cesium/Widgets/Images/ImageryProviders/sentinel-2.png +0 -0
  249. package/dist/cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
  250. package/dist/cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
  251. package/dist/cesium/Widgets/Images/ImageryProviders/stamenToner.png +0 -0
  252. package/dist/cesium/Widgets/Images/ImageryProviders/stamenWatercolor.png +0 -0
  253. package/dist/cesium/Widgets/Images/NavigationHelp/Mouse.svg +0 -84
  254. package/dist/cesium/Widgets/Images/NavigationHelp/MouseLeft.svg +0 -76
  255. package/dist/cesium/Widgets/Images/NavigationHelp/MouseMiddle.svg +0 -76
  256. package/dist/cesium/Widgets/Images/NavigationHelp/MouseRight.svg +0 -76
  257. package/dist/cesium/Widgets/Images/NavigationHelp/Touch.svg +0 -120
  258. package/dist/cesium/Widgets/Images/NavigationHelp/TouchDrag.svg +0 -129
  259. package/dist/cesium/Widgets/Images/NavigationHelp/TouchRotate.svg +0 -76
  260. package/dist/cesium/Widgets/Images/NavigationHelp/TouchTilt.svg +0 -135
  261. package/dist/cesium/Widgets/Images/NavigationHelp/TouchZoom.svg +0 -74
  262. package/dist/cesium/Widgets/Images/TerrainProviders/CesiumWorldTerrain.png +0 -0
  263. package/dist/cesium/Widgets/Images/TerrainProviders/Ellipsoid.png +0 -0
  264. package/dist/cesium/Widgets/Images/TimelineIcons.png +0 -0
  265. package/dist/cesium/Widgets/Images/info-loading.gif +0 -0
  266. package/dist/cesium/Widgets/InfoBox/InfoBox.css +0 -92
  267. package/dist/cesium/Widgets/InfoBox/InfoBoxDescription.css +0 -178
  268. package/dist/cesium/Widgets/NavigationHelpButton/NavigationHelpButton.css +0 -93
  269. package/dist/cesium/Widgets/NavigationHelpButton/lighter.css +0 -38
  270. package/dist/cesium/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +0 -15
  271. package/dist/cesium/Widgets/ProjectionPicker/ProjectionPicker.css +0 -38
  272. package/dist/cesium/Widgets/SceneModePicker/SceneModePicker.css +0 -56
  273. package/dist/cesium/Widgets/SelectionIndicator/SelectionIndicator.css +0 -20
  274. package/dist/cesium/Widgets/Timeline/Timeline.css +0 -103
  275. package/dist/cesium/Widgets/Timeline/lighter.css +0 -23
  276. package/dist/cesium/Widgets/VRButton/VRButton.css +0 -8
  277. package/dist/cesium/Widgets/Viewer/Viewer.css +0 -107
  278. package/dist/cesium/Widgets/VoxelInspector/VoxelInspector.css +0 -16
  279. package/dist/cesium/Widgets/lighter.css +0 -237
  280. package/dist/cesium/Widgets/lighterShared.css +0 -46
  281. package/dist/cesium/Widgets/shared.css +0 -103
  282. package/dist/cesium/Widgets/widgets.css +0 -1342
  283. package/dist/cesium/Workers/chunk-22ASS7YB.js +0 -26
  284. package/dist/cesium/Workers/chunk-2BFZMXUG.js +0 -26
  285. package/dist/cesium/Workers/chunk-3BNGKZ2F.js +0 -26
  286. package/dist/cesium/Workers/chunk-452MW5E6.js +0 -26
  287. package/dist/cesium/Workers/chunk-45LNPNIM.js +0 -26
  288. package/dist/cesium/Workers/chunk-5YCKGPZ3.js +0 -26
  289. package/dist/cesium/Workers/chunk-5ZFOKSDK.js +0 -26
  290. package/dist/cesium/Workers/chunk-65CN64EP.js +0 -28
  291. package/dist/cesium/Workers/chunk-6NNCMAGT.js +0 -26
  292. package/dist/cesium/Workers/chunk-75RT7DNU.js +0 -26
  293. package/dist/cesium/Workers/chunk-77KFIUJG.js +0 -26
  294. package/dist/cesium/Workers/chunk-7L2LUDC3.js +0 -28
  295. package/dist/cesium/Workers/chunk-7UX2ZCQK.js +0 -26
  296. package/dist/cesium/Workers/chunk-7W3OTLHS.js +0 -26
  297. package/dist/cesium/Workers/chunk-AAOMPF7M.js +0 -26
  298. package/dist/cesium/Workers/chunk-BOBXKID6.js +0 -26
  299. package/dist/cesium/Workers/chunk-BQNAZUCV.js +0 -26
  300. package/dist/cesium/Workers/chunk-BYU3QM3A.js +0 -26
  301. package/dist/cesium/Workers/chunk-C7EXJG2O.js +0 -26
  302. package/dist/cesium/Workers/chunk-FE4HG5RY.js +0 -26
  303. package/dist/cesium/Workers/chunk-GMDXIP2F.js +0 -26
  304. package/dist/cesium/Workers/chunk-HSVYYGKG.js +0 -26
  305. package/dist/cesium/Workers/chunk-IOJRZZG4.js +0 -26
  306. package/dist/cesium/Workers/chunk-IQ3P7OYE.js +0 -26
  307. package/dist/cesium/Workers/chunk-K526B6A6.js +0 -26
  308. package/dist/cesium/Workers/chunk-KA7ZX4BQ.js +0 -26
  309. package/dist/cesium/Workers/chunk-KYREMICR.js +0 -26
  310. package/dist/cesium/Workers/chunk-LM5DN6BS.js +0 -26
  311. package/dist/cesium/Workers/chunk-N3VBCSE5.js +0 -26
  312. package/dist/cesium/Workers/chunk-NYNUONZK.js +0 -26
  313. package/dist/cesium/Workers/chunk-O4MLFQKO.js +0 -26
  314. package/dist/cesium/Workers/chunk-OJD6C7EN.js +0 -26
  315. package/dist/cesium/Workers/chunk-PFXLBIMV.js +0 -26
  316. package/dist/cesium/Workers/chunk-PJQOB6JM.js +0 -26
  317. package/dist/cesium/Workers/chunk-PSBTKXXJ.js +0 -26
  318. package/dist/cesium/Workers/chunk-PX3QTMVS.js +0 -27
  319. package/dist/cesium/Workers/chunk-QF5X4OGE.js +0 -26
  320. package/dist/cesium/Workers/chunk-QF6LI2WV.js +0 -26
  321. package/dist/cesium/Workers/chunk-QJ75ECAT.js +0 -26
  322. package/dist/cesium/Workers/chunk-RHHPY6PH.js +0 -26
  323. package/dist/cesium/Workers/chunk-S3NLG5WM.js +0 -26
  324. package/dist/cesium/Workers/chunk-SODPE7LL.js +0 -26
  325. package/dist/cesium/Workers/chunk-TG7CPYPR.js +0 -26
  326. package/dist/cesium/Workers/chunk-UJOKCDQH.js +0 -26
  327. package/dist/cesium/Workers/chunk-UQ3ABODK.js +0 -26
  328. package/dist/cesium/Workers/chunk-VBRVI5XI.js +0 -66
  329. package/dist/cesium/Workers/chunk-WCO3MWIK.js +0 -26
  330. package/dist/cesium/Workers/chunk-X52A3GF7.js +0 -27
  331. package/dist/cesium/Workers/chunk-X76FJHF4.js +0 -26
  332. package/dist/cesium/Workers/chunk-XFYMZXZK.js +0 -26
  333. package/dist/cesium/Workers/chunk-XRIISOYZ.js +0 -26
  334. package/dist/cesium/Workers/chunk-YZ5FJSO3.js +0 -26
  335. package/dist/cesium/Workers/combineGeometry.js +0 -26
  336. package/dist/cesium/Workers/createBoxGeometry.js +0 -26
  337. package/dist/cesium/Workers/createBoxOutlineGeometry.js +0 -26
  338. package/dist/cesium/Workers/createCircleGeometry.js +0 -26
  339. package/dist/cesium/Workers/createCircleOutlineGeometry.js +0 -26
  340. package/dist/cesium/Workers/createCoplanarPolygonGeometry.js +0 -26
  341. package/dist/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +0 -26
  342. package/dist/cesium/Workers/createCorridorGeometry.js +0 -26
  343. package/dist/cesium/Workers/createCorridorOutlineGeometry.js +0 -26
  344. package/dist/cesium/Workers/createCylinderGeometry.js +0 -26
  345. package/dist/cesium/Workers/createCylinderOutlineGeometry.js +0 -26
  346. package/dist/cesium/Workers/createEllipseGeometry.js +0 -26
  347. package/dist/cesium/Workers/createEllipseOutlineGeometry.js +0 -26
  348. package/dist/cesium/Workers/createEllipsoidGeometry.js +0 -26
  349. package/dist/cesium/Workers/createEllipsoidOutlineGeometry.js +0 -26
  350. package/dist/cesium/Workers/createFrustumGeometry.js +0 -26
  351. package/dist/cesium/Workers/createFrustumOutlineGeometry.js +0 -26
  352. package/dist/cesium/Workers/createGeometry.js +0 -26
  353. package/dist/cesium/Workers/createGroundPolylineGeometry.js +0 -26
  354. package/dist/cesium/Workers/createPlaneGeometry.js +0 -26
  355. package/dist/cesium/Workers/createPlaneOutlineGeometry.js +0 -26
  356. package/dist/cesium/Workers/createPolygonGeometry.js +0 -26
  357. package/dist/cesium/Workers/createPolygonOutlineGeometry.js +0 -26
  358. package/dist/cesium/Workers/createPolylineGeometry.js +0 -26
  359. package/dist/cesium/Workers/createPolylineVolumeGeometry.js +0 -26
  360. package/dist/cesium/Workers/createPolylineVolumeOutlineGeometry.js +0 -26
  361. package/dist/cesium/Workers/createRectangleGeometry.js +0 -26
  362. package/dist/cesium/Workers/createRectangleOutlineGeometry.js +0 -26
  363. package/dist/cesium/Workers/createSimplePolylineGeometry.js +0 -26
  364. package/dist/cesium/Workers/createSphereGeometry.js +0 -26
  365. package/dist/cesium/Workers/createSphereOutlineGeometry.js +0 -26
  366. package/dist/cesium/Workers/createTaskProcessorWorker.js +0 -26
  367. package/dist/cesium/Workers/createVectorTileClampedPolylines.js +0 -26
  368. package/dist/cesium/Workers/createVectorTileGeometries.js +0 -26
  369. package/dist/cesium/Workers/createVectorTilePoints.js +0 -26
  370. package/dist/cesium/Workers/createVectorTilePolygons.js +0 -26
  371. package/dist/cesium/Workers/createVectorTilePolylines.js +0 -26
  372. package/dist/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +0 -26
  373. package/dist/cesium/Workers/createVerticesFromHeightmap.js +0 -26
  374. package/dist/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -26
  375. package/dist/cesium/Workers/createWallGeometry.js +0 -26
  376. package/dist/cesium/Workers/createWallOutlineGeometry.js +0 -26
  377. package/dist/cesium/Workers/decodeDraco.js +0 -26
  378. package/dist/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +0 -26
  379. package/dist/cesium/Workers/decodeI3S.js +0 -26
  380. package/dist/cesium/Workers/gaussianSplatSorter.js +0 -26
  381. package/dist/cesium/Workers/gaussianSplatTextureGenerator.js +0 -26
  382. package/dist/cesium/Workers/transcodeKTX2.js +0 -56
  383. package/dist/cesium/Workers/transferTypedArrayTest.js +0 -26
  384. package/dist/cesium/Workers/upsampleQuantizedTerrainMesh.js +0 -26
  385. package/dist/index.html +0 -17
@@ -0,0 +1,77 @@
1
+ (function(j,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("cesium")):typeof define=="function"&&define.amd?define(["exports","cesium"],s):(j=typeof globalThis<"u"?globalThis:j||self,s(j.cesiumUtils={},j.Cesium))})(this,function(exports,Cesium){"use strict";var ue=Object.defineProperty;var le=(j,s,r)=>s in j?ue(j,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):j[s]=r;var L=(j,s,r)=>le(j,typeof s!="symbol"?s+"":s,r);function _interopNamespaceDefault(s){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const i in s)if(i!=="default"){const a=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(r,i,a.get?a:{enumerable:!0,get:()=>s[i]})}}return r.default=s,Object.freeze(r)}const Cesium__namespace=_interopNamespaceDefault(Cesium);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},inflate$2={};const adler32$1=(s,r,i,a)=>{let h=s&65535|0,o=s>>>16&65535|0,l=0;for(;i!==0;){l=i>2e3?2e3:i,i-=l;do h=h+r[a++]|0,o=o+h|0;while(--l);h%=65521,o%=65521}return h|o<<16|0};var adler32_1=adler32$1;const makeTable=()=>{let s,r=[];for(var i=0;i<256;i++){s=i;for(var a=0;a<8;a++)s=s&1?3988292384^s>>>1:s>>>1;r[i]=s}return r},crcTable=new Uint32Array(makeTable()),crc32$1=(s,r,i,a)=>{const h=crcTable,o=a+i;s^=-1;for(let l=a;l<o;l++)s=s>>>8^h[(s^r[l])&255];return s^-1};var crc32_1=crc32$1;const BAD$1=16209,TYPE$1=16191;var inffast=function(r,i){let a,h,o,l,c,d,u,m,y,g,p,v,b,w,O,_,C,x,T,E,R,P,k,A;const N=r.state;a=r.next_in,k=r.input,h=a+(r.avail_in-5),o=r.next_out,A=r.output,l=o-(i-r.avail_out),c=o+(r.avail_out-257),d=N.dmax,u=N.wsize,m=N.whave,y=N.wnext,g=N.window,p=N.hold,v=N.bits,b=N.lencode,w=N.distcode,O=(1<<N.lenbits)-1,_=(1<<N.distbits)-1;e:do{v<15&&(p+=k[a++]<<v,v+=8,p+=k[a++]<<v,v+=8),C=b[p&O];t:for(;;){if(x=C>>>24,p>>>=x,v-=x,x=C>>>16&255,x===0)A[o++]=C&65535;else if(x&16){T=C&65535,x&=15,x&&(v<x&&(p+=k[a++]<<v,v+=8),T+=p&(1<<x)-1,p>>>=x,v-=x),v<15&&(p+=k[a++]<<v,v+=8,p+=k[a++]<<v,v+=8),C=w[p&_];i:for(;;){if(x=C>>>24,p>>>=x,v-=x,x=C>>>16&255,x&16){if(E=C&65535,x&=15,v<x&&(p+=k[a++]<<v,v+=8,v<x&&(p+=k[a++]<<v,v+=8)),E+=p&(1<<x)-1,E>d){r.msg="invalid distance too far back",N.mode=BAD$1;break e}if(p>>>=x,v-=x,x=o-l,E>x){if(x=E-x,x>m&&N.sane){r.msg="invalid distance too far back",N.mode=BAD$1;break e}if(R=0,P=g,y===0){if(R+=u-x,x<T){T-=x;do A[o++]=g[R++];while(--x);R=o-E,P=A}}else if(y<x){if(R+=u+y-x,x-=y,x<T){T-=x;do A[o++]=g[R++];while(--x);if(R=0,y<T){x=y,T-=x;do A[o++]=g[R++];while(--x);R=o-E,P=A}}}else if(R+=y-x,x<T){T-=x;do A[o++]=g[R++];while(--x);R=o-E,P=A}for(;T>2;)A[o++]=P[R++],A[o++]=P[R++],A[o++]=P[R++],T-=3;T&&(A[o++]=P[R++],T>1&&(A[o++]=P[R++]))}else{R=o-E;do A[o++]=A[R++],A[o++]=A[R++],A[o++]=A[R++],T-=3;while(T>2);T&&(A[o++]=A[R++],T>1&&(A[o++]=A[R++]))}}else if((x&64)===0){C=w[(C&65535)+(p&(1<<x)-1)];continue i}else{r.msg="invalid distance code",N.mode=BAD$1;break e}break}}else if((x&64)===0){C=b[(C&65535)+(p&(1<<x)-1)];continue t}else if(x&32){N.mode=TYPE$1;break e}else{r.msg="invalid literal/length code",N.mode=BAD$1;break e}break}}while(a<h&&o<c);T=v>>3,a-=T,v-=T<<3,p&=(1<<v)-1,r.next_in=a,r.next_out=o,r.avail_in=a<h?5+(h-a):5-(a-h),r.avail_out=o<c?257+(c-o):257-(o-c),N.hold=p,N.bits=v};const MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=new Uint16Array([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]),lext=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),dbase=new Uint16Array([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,0,0]),dext=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),inflate_table$1=(s,r,i,a,h,o,l,c)=>{const d=c.bits;let u=0,m=0,y=0,g=0,p=0,v=0,b=0,w=0,O=0,_=0,C,x,T,E,R,P=null,k;const A=new Uint16Array(MAXBITS+1),N=new Uint16Array(MAXBITS+1);let B=null,q,H,Z;for(u=0;u<=MAXBITS;u++)A[u]=0;for(m=0;m<a;m++)A[r[i+m]]++;for(p=d,g=MAXBITS;g>=1&&A[g]===0;g--);if(p>g&&(p=g),g===0)return h[o++]=1<<24|64<<16|0,h[o++]=1<<24|64<<16|0,c.bits=1,0;for(y=1;y<g&&A[y]===0;y++);for(p<y&&(p=y),w=1,u=1;u<=MAXBITS;u++)if(w<<=1,w-=A[u],w<0)return-1;if(w>0&&(s===CODES$1||g!==1))return-1;for(N[1]=0,u=1;u<MAXBITS;u++)N[u+1]=N[u]+A[u];for(m=0;m<a;m++)r[i+m]!==0&&(l[N[r[i+m]]++]=m);if(s===CODES$1?(P=B=l,k=20):s===LENS$1?(P=lbase,B=lext,k=257):(P=dbase,B=dext,k=0),_=0,m=0,u=y,R=o,v=p,b=0,T=-1,O=1<<p,E=O-1,s===LENS$1&&O>ENOUGH_LENS$1||s===DISTS$1&&O>ENOUGH_DISTS$1)return 1;for(;;){q=u-b,l[m]+1<k?(H=0,Z=l[m]):l[m]>=k?(H=B[l[m]-k],Z=P[l[m]-k]):(H=96,Z=0),C=1<<u-b,x=1<<v,y=x;do x-=C,h[R+(_>>b)+x]=q<<24|H<<16|Z|0;while(x!==0);for(C=1<<u-1;_&C;)C>>=1;if(C!==0?(_&=C-1,_+=C):_=0,m++,--A[u]===0){if(u===g)break;u=r[i+l[m]]}if(u>p&&(_&E)!==T){for(b===0&&(b=p),R+=y,v=u-b,w=1<<v;v+b<g&&(w-=A[v+b],!(w<=0));)v++,w<<=1;if(O+=1<<v,s===LENS$1&&O>ENOUGH_LENS$1||s===DISTS$1&&O>ENOUGH_DISTS$1)return 1;T=_&E,h[T]=p<<24|v<<16|R-o|0}}return _!==0&&(h[R+_]=u-b<<24|64<<16|0),c.bits=p,0};var inftrees=inflate_table$1,constants={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const adler32=adler32_1,crc32=crc32_1,inflate_fast=inffast,inflate_table=inftrees,CODES=0,LENS=1,DISTS=2,{Z_FINISH:Z_FINISH$1,Z_BLOCK,Z_TREES,Z_OK:Z_OK$1,Z_STREAM_END:Z_STREAM_END$1,Z_NEED_DICT:Z_NEED_DICT$1,Z_STREAM_ERROR:Z_STREAM_ERROR$1,Z_DATA_ERROR:Z_DATA_ERROR$1,Z_MEM_ERROR:Z_MEM_ERROR$1,Z_BUF_ERROR,Z_DEFLATED}=constants,HEAD=16180,FLAGS=16181,TIME=16182,OS=16183,EXLEN=16184,EXTRA=16185,NAME=16186,COMMENT=16187,HCRC=16188,DICTID=16189,DICT=16190,TYPE=16191,TYPEDO=16192,STORED=16193,COPY_=16194,COPY=16195,TABLE=16196,LENLENS=16197,CODELENS=16198,LEN_=16199,LEN=16200,LENEXT=16201,DIST=16202,DISTEXT=16203,MATCH=16204,LIT=16205,CHECK=16206,LENGTH=16207,DONE=16208,BAD=16209,MEM=16210,SYNC=16211,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=s=>(s>>>24&255)+(s>>>8&65280)+((s&65280)<<8)+((s&255)<<24);function InflateState(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const inflateStateCheck=s=>{if(!s)return 1;const r=s.state;return!r||r.strm!==s||r.mode<HEAD||r.mode>SYNC?1:0},inflateResetKeep=s=>{if(inflateStateCheck(s))return Z_STREAM_ERROR$1;const r=s.state;return s.total_in=s.total_out=r.total=0,s.msg="",r.wrap&&(s.adler=r.wrap&1),r.mode=HEAD,r.last=0,r.havedict=0,r.flags=-1,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Int32Array(ENOUGH_LENS),r.distcode=r.distdyn=new Int32Array(ENOUGH_DISTS),r.sane=1,r.back=-1,Z_OK$1},inflateReset=s=>{if(inflateStateCheck(s))return Z_STREAM_ERROR$1;const r=s.state;return r.wsize=0,r.whave=0,r.wnext=0,inflateResetKeep(s)},inflateReset2=(s,r)=>{let i;if(inflateStateCheck(s))return Z_STREAM_ERROR$1;const a=s.state;return r<0?(i=0,r=-r):(i=(r>>4)+5,r<48&&(r&=15)),r&&(r<8||r>15)?Z_STREAM_ERROR$1:(a.window!==null&&a.wbits!==r&&(a.window=null),a.wrap=i,a.wbits=r,inflateReset(s))},inflateInit2=(s,r)=>{if(!s)return Z_STREAM_ERROR$1;const i=new InflateState;s.state=i,i.strm=s,i.window=null,i.mode=HEAD;const a=inflateReset2(s,r);return a!==Z_OK$1&&(s.state=null),a},inflateInit=s=>inflateInit2(s,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=s=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let r=0;for(;r<144;)s.lens[r++]=8;for(;r<256;)s.lens[r++]=9;for(;r<280;)s.lens[r++]=7;for(;r<288;)s.lens[r++]=8;for(inflate_table(LENS,s.lens,0,288,lenfix,0,s.work,{bits:9}),r=0;r<32;)s.lens[r++]=5;inflate_table(DISTS,s.lens,0,32,distfix,0,s.work,{bits:5}),virgin=!1}s.lencode=lenfix,s.lenbits=9,s.distcode=distfix,s.distbits=5},updatewindow=(s,r,i,a)=>{let h;const o=s.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),a>=o.wsize?(o.window.set(r.subarray(i-o.wsize,i),0),o.wnext=0,o.whave=o.wsize):(h=o.wsize-o.wnext,h>a&&(h=a),o.window.set(r.subarray(i-a,i-a+h),o.wnext),a-=h,a?(o.window.set(r.subarray(i-a,i),0),o.wnext=a,o.whave=o.wsize):(o.wnext+=h,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=h))),0},inflate$1=(s,r)=>{let i,a,h,o,l,c,d,u,m,y,g,p,v,b,w=0,O,_,C,x,T,E,R,P;const k=new Uint8Array(4);let A,N;const B=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(s)||!s.output||!s.input&&s.avail_in!==0)return Z_STREAM_ERROR$1;i=s.state,i.mode===TYPE&&(i.mode=TYPEDO),l=s.next_out,h=s.output,d=s.avail_out,o=s.next_in,a=s.input,c=s.avail_in,u=i.hold,m=i.bits,y=c,g=d,P=Z_OK$1;e:for(;;)switch(i.mode){case HEAD:if(i.wrap===0){i.mode=TYPEDO;break}for(;m<16;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}if(i.wrap&2&&u===35615){i.wbits===0&&(i.wbits=15),i.check=0,k[0]=u&255,k[1]=u>>>8&255,i.check=crc32(i.check,k,2,0),u=0,m=0,i.mode=FLAGS;break}if(i.head&&(i.head.done=!1),!(i.wrap&1)||(((u&255)<<8)+(u>>8))%31){s.msg="incorrect header check",i.mode=BAD;break}if((u&15)!==Z_DEFLATED){s.msg="unknown compression method",i.mode=BAD;break}if(u>>>=4,m-=4,R=(u&15)+8,i.wbits===0&&(i.wbits=R),R>15||R>i.wbits){s.msg="invalid window size",i.mode=BAD;break}i.dmax=1<<i.wbits,i.flags=0,s.adler=i.check=1,i.mode=u&512?DICTID:TYPE,u=0,m=0;break;case FLAGS:for(;m<16;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}if(i.flags=u,(i.flags&255)!==Z_DEFLATED){s.msg="unknown compression method",i.mode=BAD;break}if(i.flags&57344){s.msg="unknown header flags set",i.mode=BAD;break}i.head&&(i.head.text=u>>8&1),i.flags&512&&i.wrap&4&&(k[0]=u&255,k[1]=u>>>8&255,i.check=crc32(i.check,k,2,0)),u=0,m=0,i.mode=TIME;case TIME:for(;m<32;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}i.head&&(i.head.time=u),i.flags&512&&i.wrap&4&&(k[0]=u&255,k[1]=u>>>8&255,k[2]=u>>>16&255,k[3]=u>>>24&255,i.check=crc32(i.check,k,4,0)),u=0,m=0,i.mode=OS;case OS:for(;m<16;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}i.head&&(i.head.xflags=u&255,i.head.os=u>>8),i.flags&512&&i.wrap&4&&(k[0]=u&255,k[1]=u>>>8&255,i.check=crc32(i.check,k,2,0)),u=0,m=0,i.mode=EXLEN;case EXLEN:if(i.flags&1024){for(;m<16;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}i.length=u,i.head&&(i.head.extra_len=u),i.flags&512&&i.wrap&4&&(k[0]=u&255,k[1]=u>>>8&255,i.check=crc32(i.check,k,2,0)),u=0,m=0}else i.head&&(i.head.extra=null);i.mode=EXTRA;case EXTRA:if(i.flags&1024&&(p=i.length,p>c&&(p=c),p&&(i.head&&(R=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Uint8Array(i.head.extra_len)),i.head.extra.set(a.subarray(o,o+p),R)),i.flags&512&&i.wrap&4&&(i.check=crc32(i.check,a,p,o)),c-=p,o+=p,i.length-=p),i.length))break e;i.length=0,i.mode=NAME;case NAME:if(i.flags&2048){if(c===0)break e;p=0;do R=a[o+p++],i.head&&R&&i.length<65536&&(i.head.name+=String.fromCharCode(R));while(R&&p<c);if(i.flags&512&&i.wrap&4&&(i.check=crc32(i.check,a,p,o)),c-=p,o+=p,R)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=COMMENT;case COMMENT:if(i.flags&4096){if(c===0)break e;p=0;do R=a[o+p++],i.head&&R&&i.length<65536&&(i.head.comment+=String.fromCharCode(R));while(R&&p<c);if(i.flags&512&&i.wrap&4&&(i.check=crc32(i.check,a,p,o)),c-=p,o+=p,R)break e}else i.head&&(i.head.comment=null);i.mode=HCRC;case HCRC:if(i.flags&512){for(;m<16;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}if(i.wrap&4&&u!==(i.check&65535)){s.msg="header crc mismatch",i.mode=BAD;break}u=0,m=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),s.adler=i.check=0,i.mode=TYPE;break;case DICTID:for(;m<32;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}s.adler=i.check=zswap32(u),u=0,m=0,i.mode=DICT;case DICT:if(i.havedict===0)return s.next_out=l,s.avail_out=d,s.next_in=o,s.avail_in=c,i.hold=u,i.bits=m,Z_NEED_DICT$1;s.adler=i.check=1,i.mode=TYPE;case TYPE:if(r===Z_BLOCK||r===Z_TREES)break e;case TYPEDO:if(i.last){u>>>=m&7,m-=m&7,i.mode=CHECK;break}for(;m<3;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}switch(i.last=u&1,u>>>=1,m-=1,u&3){case 0:i.mode=STORED;break;case 1:if(fixedtables(i),i.mode=LEN_,r===Z_TREES){u>>>=2,m-=2;break e}break;case 2:i.mode=TABLE;break;case 3:s.msg="invalid block type",i.mode=BAD}u>>>=2,m-=2;break;case STORED:for(u>>>=m&7,m-=m&7;m<32;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}if((u&65535)!==(u>>>16^65535)){s.msg="invalid stored block lengths",i.mode=BAD;break}if(i.length=u&65535,u=0,m=0,i.mode=COPY_,r===Z_TREES)break e;case COPY_:i.mode=COPY;case COPY:if(p=i.length,p){if(p>c&&(p=c),p>d&&(p=d),p===0)break e;h.set(a.subarray(o,o+p),l),c-=p,o+=p,d-=p,l+=p,i.length-=p;break}i.mode=TYPE;break;case TABLE:for(;m<14;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}if(i.nlen=(u&31)+257,u>>>=5,m-=5,i.ndist=(u&31)+1,u>>>=5,m-=5,i.ncode=(u&15)+4,u>>>=4,m-=4,i.nlen>286||i.ndist>30){s.msg="too many length or distance symbols",i.mode=BAD;break}i.have=0,i.mode=LENLENS;case LENLENS:for(;i.have<i.ncode;){for(;m<3;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}i.lens[B[i.have++]]=u&7,u>>>=3,m-=3}for(;i.have<19;)i.lens[B[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,A={bits:i.lenbits},P=inflate_table(CODES,i.lens,0,19,i.lencode,0,i.work,A),i.lenbits=A.bits,P){s.msg="invalid code lengths set",i.mode=BAD;break}i.have=0,i.mode=CODELENS;case CODELENS:for(;i.have<i.nlen+i.ndist;){for(;w=i.lencode[u&(1<<i.lenbits)-1],O=w>>>24,_=w>>>16&255,C=w&65535,!(O<=m);){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}if(C<16)u>>>=O,m-=O,i.lens[i.have++]=C;else{if(C===16){for(N=O+2;m<N;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}if(u>>>=O,m-=O,i.have===0){s.msg="invalid bit length repeat",i.mode=BAD;break}R=i.lens[i.have-1],p=3+(u&3),u>>>=2,m-=2}else if(C===17){for(N=O+3;m<N;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}u>>>=O,m-=O,R=0,p=3+(u&7),u>>>=3,m-=3}else{for(N=O+7;m<N;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}u>>>=O,m-=O,R=0,p=11+(u&127),u>>>=7,m-=7}if(i.have+p>i.nlen+i.ndist){s.msg="invalid bit length repeat",i.mode=BAD;break}for(;p--;)i.lens[i.have++]=R}}if(i.mode===BAD)break;if(i.lens[256]===0){s.msg="invalid code -- missing end-of-block",i.mode=BAD;break}if(i.lenbits=9,A={bits:i.lenbits},P=inflate_table(LENS,i.lens,0,i.nlen,i.lencode,0,i.work,A),i.lenbits=A.bits,P){s.msg="invalid literal/lengths set",i.mode=BAD;break}if(i.distbits=6,i.distcode=i.distdyn,A={bits:i.distbits},P=inflate_table(DISTS,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,A),i.distbits=A.bits,P){s.msg="invalid distances set",i.mode=BAD;break}if(i.mode=LEN_,r===Z_TREES)break e;case LEN_:i.mode=LEN;case LEN:if(c>=6&&d>=258){s.next_out=l,s.avail_out=d,s.next_in=o,s.avail_in=c,i.hold=u,i.bits=m,inflate_fast(s,g),l=s.next_out,h=s.output,d=s.avail_out,o=s.next_in,a=s.input,c=s.avail_in,u=i.hold,m=i.bits,i.mode===TYPE&&(i.back=-1);break}for(i.back=0;w=i.lencode[u&(1<<i.lenbits)-1],O=w>>>24,_=w>>>16&255,C=w&65535,!(O<=m);){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}if(_&&(_&240)===0){for(x=O,T=_,E=C;w=i.lencode[E+((u&(1<<x+T)-1)>>x)],O=w>>>24,_=w>>>16&255,C=w&65535,!(x+O<=m);){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}u>>>=x,m-=x,i.back+=x}if(u>>>=O,m-=O,i.back+=O,i.length=C,_===0){i.mode=LIT;break}if(_&32){i.back=-1,i.mode=TYPE;break}if(_&64){s.msg="invalid literal/length code",i.mode=BAD;break}i.extra=_&15,i.mode=LENEXT;case LENEXT:if(i.extra){for(N=i.extra;m<N;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}i.length+=u&(1<<i.extra)-1,u>>>=i.extra,m-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=DIST;case DIST:for(;w=i.distcode[u&(1<<i.distbits)-1],O=w>>>24,_=w>>>16&255,C=w&65535,!(O<=m);){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}if((_&240)===0){for(x=O,T=_,E=C;w=i.distcode[E+((u&(1<<x+T)-1)>>x)],O=w>>>24,_=w>>>16&255,C=w&65535,!(x+O<=m);){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}u>>>=x,m-=x,i.back+=x}if(u>>>=O,m-=O,i.back+=O,_&64){s.msg="invalid distance code",i.mode=BAD;break}i.offset=C,i.extra=_&15,i.mode=DISTEXT;case DISTEXT:if(i.extra){for(N=i.extra;m<N;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}i.offset+=u&(1<<i.extra)-1,u>>>=i.extra,m-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){s.msg="invalid distance too far back",i.mode=BAD;break}i.mode=MATCH;case MATCH:if(d===0)break e;if(p=g-d,i.offset>p){if(p=i.offset-p,p>i.whave&&i.sane){s.msg="invalid distance too far back",i.mode=BAD;break}p>i.wnext?(p-=i.wnext,v=i.wsize-p):v=i.wnext-p,p>i.length&&(p=i.length),b=i.window}else b=h,v=l-i.offset,p=i.length;p>d&&(p=d),d-=p,i.length-=p;do h[l++]=b[v++];while(--p);i.length===0&&(i.mode=LEN);break;case LIT:if(d===0)break e;h[l++]=i.length,d--,i.mode=LEN;break;case CHECK:if(i.wrap){for(;m<32;){if(c===0)break e;c--,u|=a[o++]<<m,m+=8}if(g-=d,s.total_out+=g,i.total+=g,i.wrap&4&&g&&(s.adler=i.check=i.flags?crc32(i.check,h,g,l-g):adler32(i.check,h,g,l-g)),g=d,i.wrap&4&&(i.flags?u:zswap32(u))!==i.check){s.msg="incorrect data check",i.mode=BAD;break}u=0,m=0}i.mode=LENGTH;case LENGTH:if(i.wrap&&i.flags){for(;m<32;){if(c===0)break e;c--,u+=a[o++]<<m,m+=8}if(i.wrap&4&&u!==(i.total&4294967295)){s.msg="incorrect length check",i.mode=BAD;break}u=0,m=0}i.mode=DONE;case DONE:P=Z_STREAM_END$1;break e;case BAD:P=Z_DATA_ERROR$1;break e;case MEM:return Z_MEM_ERROR$1;case SYNC:default:return Z_STREAM_ERROR$1}return s.next_out=l,s.avail_out=d,s.next_in=o,s.avail_in=c,i.hold=u,i.bits=m,(i.wsize||g!==s.avail_out&&i.mode<BAD&&(i.mode<CHECK||r!==Z_FINISH$1))&&updatewindow(s,s.output,s.next_out,g-s.avail_out),y-=s.avail_in,g-=s.avail_out,s.total_in+=y,s.total_out+=g,i.total+=g,i.wrap&4&&g&&(s.adler=i.check=i.flags?crc32(i.check,h,g,s.next_out-g):adler32(i.check,h,g,s.next_out-g)),s.data_type=i.bits+(i.last?64:0)+(i.mode===TYPE?128:0)+(i.mode===LEN_||i.mode===COPY_?256:0),(y===0&&g===0||r===Z_FINISH$1)&&P===Z_OK$1&&(P=Z_BUF_ERROR),P},inflateEnd=s=>{if(inflateStateCheck(s))return Z_STREAM_ERROR$1;let r=s.state;return r.window&&(r.window=null),s.state=null,Z_OK$1},inflateGetHeader=(s,r)=>{if(inflateStateCheck(s))return Z_STREAM_ERROR$1;const i=s.state;return(i.wrap&2)===0?Z_STREAM_ERROR$1:(i.head=r,r.done=!1,Z_OK$1)},inflateSetDictionary=(s,r)=>{const i=r.length;let a,h,o;return inflateStateCheck(s)||(a=s.state,a.wrap!==0&&a.mode!==DICT)?Z_STREAM_ERROR$1:a.mode===DICT&&(h=1,h=adler32(h,r,i,0),h!==a.check)?Z_DATA_ERROR$1:(o=updatewindow(s,r,i,i),o?(a.mode=MEM,Z_MEM_ERROR$1):(a.havedict=1,Z_OK$1))};inflate$2.inflateReset=inflateReset,inflate$2.inflateReset2=inflateReset2,inflate$2.inflateResetKeep=inflateResetKeep,inflate$2.inflateInit=inflateInit,inflate$2.inflateInit2=inflateInit2,inflate$2.inflate=inflate$1,inflate$2.inflateEnd=inflateEnd,inflate$2.inflateGetHeader=inflateGetHeader,inflate$2.inflateSetDictionary=inflateSetDictionary,inflate$2.inflateInfo="pako inflate (from Nodeca project)";var common$1={};const _has=(s,r)=>Object.prototype.hasOwnProperty.call(s,r);common$1.assign=function(s){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const i=r.shift();if(i){if(typeof i!="object")throw new TypeError(i+"must be non-object");for(const a in i)_has(i,a)&&(s[a]=i[a])}}return s},common$1.flattenChunks=s=>{let r=0;for(let a=0,h=s.length;a<h;a++)r+=s[a].length;const i=new Uint8Array(r);for(let a=0,h=0,o=s.length;a<o;a++){let l=s[a];i.set(l,h),h+=l.length}return i};var strings$1={};let STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(s){STR_APPLY_UIA_OK=!1}const _utf8len=new Uint8Array(256);for(let s=0;s<256;s++)_utf8len[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;_utf8len[254]=_utf8len[254]=1,strings$1.string2buf=s=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(s);let r,i,a,h,o,l=s.length,c=0;for(h=0;h<l;h++)i=s.charCodeAt(h),(i&64512)===55296&&h+1<l&&(a=s.charCodeAt(h+1),(a&64512)===56320&&(i=65536+(i-55296<<10)+(a-56320),h++)),c+=i<128?1:i<2048?2:i<65536?3:4;for(r=new Uint8Array(c),o=0,h=0;o<c;h++)i=s.charCodeAt(h),(i&64512)===55296&&h+1<l&&(a=s.charCodeAt(h+1),(a&64512)===56320&&(i=65536+(i-55296<<10)+(a-56320),h++)),i<128?r[o++]=i:i<2048?(r[o++]=192|i>>>6,r[o++]=128|i&63):i<65536?(r[o++]=224|i>>>12,r[o++]=128|i>>>6&63,r[o++]=128|i&63):(r[o++]=240|i>>>18,r[o++]=128|i>>>12&63,r[o++]=128|i>>>6&63,r[o++]=128|i&63);return r};const buf2binstring=(s,r)=>{if(r<65534&&s.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,s.length===r?s:s.subarray(0,r));let i="";for(let a=0;a<r;a++)i+=String.fromCharCode(s[a]);return i};strings$1.buf2string=(s,r)=>{const i=r||s.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(s.subarray(0,r));let a,h;const o=new Array(i*2);for(h=0,a=0;a<i;){let l=s[a++];if(l<128){o[h++]=l;continue}let c=_utf8len[l];if(c>4){o[h++]=65533,a+=c-1;continue}for(l&=c===2?31:c===3?15:7;c>1&&a<i;)l=l<<6|s[a++]&63,c--;if(c>1){o[h++]=65533;continue}l<65536?o[h++]=l:(l-=65536,o[h++]=55296|l>>10&1023,o[h++]=56320|l&1023)}return buf2binstring(o,h)},strings$1.utf8border=(s,r)=>{r=r||s.length,r>s.length&&(r=s.length);let i=r-1;for(;i>=0&&(s[i]&192)===128;)i--;return i<0||i===0?r:i+_utf8len[s[i]]>r?i:r};var messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function ZStream$1(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var zstream=ZStream$1;function GZheader$1(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader$1;const zlib_inflate=inflate$2,utils=common$1,strings=strings$1,msg=messages,ZStream=zstream,GZheader=gzheader,toString=Object.prototype.toString,{Z_NO_FLUSH,Z_FINISH,Z_OK,Z_STREAM_END,Z_NEED_DICT,Z_STREAM_ERROR,Z_DATA_ERROR,Z_MEM_ERROR}=constants;function Inflate(s){this.options=utils.assign({chunkSize:1024*64,windowBits:15,to:""},s||{});const r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(s&&s.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15)===0&&(r.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ZStream,this.strm.avail_out=0;let i=zlib_inflate.inflateInit2(this.strm,r.windowBits);if(i!==Z_OK)throw new Error(msg[i]);if(this.header=new GZheader,zlib_inflate.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=strings.string2buf(r.dictionary):toString.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(i=zlib_inflate.inflateSetDictionary(this.strm,r.dictionary),i!==Z_OK)))throw new Error(msg[i])}Inflate.prototype.push=function(s,r){const i=this.strm,a=this.options.chunkSize,h=this.options.dictionary;let o,l,c;if(this.ended)return!1;for(r===~~r?l=r:l=r===!0?Z_FINISH:Z_NO_FLUSH,toString.call(s)==="[object ArrayBuffer]"?i.input=new Uint8Array(s):i.input=s,i.next_in=0,i.avail_in=i.input.length;;){for(i.avail_out===0&&(i.output=new Uint8Array(a),i.next_out=0,i.avail_out=a),o=zlib_inflate.inflate(i,l),o===Z_NEED_DICT&&h&&(o=zlib_inflate.inflateSetDictionary(i,h),o===Z_OK?o=zlib_inflate.inflate(i,l):o===Z_DATA_ERROR&&(o=Z_NEED_DICT));i.avail_in>0&&o===Z_STREAM_END&&i.state.wrap>0&&s[i.next_in]!==0;)zlib_inflate.inflateReset(i),o=zlib_inflate.inflate(i,l);switch(o){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(o),this.ended=!0,!1}if(c=i.avail_out,i.next_out&&(i.avail_out===0||o===Z_STREAM_END))if(this.options.to==="string"){let d=strings.utf8border(i.output,i.next_out),u=i.next_out-d,m=strings.buf2string(i.output,d);i.next_out=u,i.avail_out=a-u,u&&i.output.set(i.output.subarray(d,d+u),0),this.onData(m)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out));if(!(o===Z_OK&&c===0)){if(o===Z_STREAM_END)return o=zlib_inflate.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(i.avail_in===0)break}}return!0},Inflate.prototype.onData=function(s){this.chunks.push(s)},Inflate.prototype.onEnd=function(s){s===Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=utils.flattenChunks(this.chunks)),this.chunks=[],this.err=s,this.msg=this.strm.msg};function inflate(s,r){const i=new Inflate(r);if(i.push(s),i.err)throw i.msg||msg[i.err];return i.result}var inflate_2=inflate;function f(s,r,i,a,h,o){let l=s.tileXYToRectangle(i,a,h);return Cesium.defined(Cesium.Rectangle.intersection(l,r,o))}class GeoTerrainProvider{constructor(r){if(r=r??{},!Cesium.defined(r.url))throw new Cesium.DeveloperError("options.url is required.");this._dataType=r.dataType??"int",this._tileType=r.tileType??"heightmap",this._url=r.url,this._maxTerrainLevel=r.dataType??"int",this._subdomains=r.subdomains,this._token=r.token,this.init(r)}get credit(){return this._credit}get errorEvent(){return this._errorEvent}get hasVertexNormals(){return!1}get hasWaterMask(){return!1}get tilingScheme(){if(!this.ready)throw new Cesium.DeveloperError("requestTileGeometry must not be called before ready returns true.");return this._tilingScheme}get ready(){return this._ready}init(r){this._ready=!1,this._errorEvent=new Cesium.Event,this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0};const i=r.credit;typeof i=="string"&&(this._credit=new Cesium.Credit(i)),this._rectangles=[];const a=r.ellipsoid??Cesium.Ellipsoid.WGS84;this._tilingScheme=new Cesium.GeographicTilingScheme({ellipsoid:a}),this._heightmapWidth=64,this._heightmapHeight=64,this._levelZeroMaximumGeometricError=Cesium.TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,Math.min(this._heightmapWidth,this._heightmapHeight),this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._ready=!0,this._topLevel=r.topLevel??5,this._bottomLevel=r.bottomLevel??25}requestTileGeometry(r,i,a,h){if(!this.ready)throw new Cesium.DeveloperError("requestTileGeometry must not be called before ready returns true.");if(a>=this._bottomLevel)return Promise.reject(`${a}该级别不发送请求!`);if(a<this._topLevel)return Promise.resolve(new Cesium.HeightmapTerrainData({buffer:this.getVHeightBuffer(),width:this._heightmapWidth,height:this._heightmapHeight,childTileMask:this.getChildTileMask(r,i,a),structure:this._terrainDataStructure}));let o="",l=this._url;Array.isArray(this._subdomains)&&this._subdomains.length&&(o=this._subdomains[(r+i)%this._subdomains.length],l=l.replace("{s}",o)),l=l.replace("{token}",this._token).replace("{x}",r).replace("{y}",i).replace("{z}",a+1);const c=Cesium.Resource.fetchArrayBuffer({url:l,request:h});if(c)return c.then(d=>d.byteLength<1e3?Promise.reject("无效数据"):inflate_2(d)).then(d=>{const u=new Cesium.HeightmapTerrainData({buffer:this.transformBuffer(d),width:this._heightmapWidth,height:this._heightmapHeight,childTileMask:this.getChildTileMask(r,i,a),structure:this._terrainDataStructure});return u._skirtHeight=6e3,u})}getLevelMaximumGeometricError(r){if(!this.ready)throw new Cesium.DeveloperError("requestTileGeometry must not be called before ready returns true.");return this._levelZeroMaximumGeometricError/(1<<r)}getTileDataAvailable(r,i,a){if(a<25)return!0}transformBuffer(r){let i=2;this._dataType==="int"?i=2:this._dataType==="float"&&(i=4);let a=r;if(a.length!==22500*i)return null;let h,o,l,c,d=new ArrayBuffer(i),u=new DataView(d),m=this._heightmapWidth,y=this._heightmapHeight,g=new Uint8Array(m*y*4);for(let p=0;p<y;p++)for(let v=0;v<m;v++){l=parseInt(149*p/(y-1)),c=parseInt(149*v/(m-1)),o=i*(150*l+c),i===4?(u.setInt8(0,a[o]),u.setInt8(1,a[o+1]),u.setInt8(2,a[o+2]),u.setInt8(3,a[o+3]),h=u.getFloat32(0,!0)):h=a[o]+256*a[o+1],(1e4<h||h<-2e3)&&(h=0);let b=(h+1e3)/.001,w=4*(p*m+v);g[w]=b/65536,g[1+w]=(b-256*g[w]*256)/256,g[2+w]=b-256*g[w]*256-256*g[1+w],g[3+w]=255}return g}getVHeightBuffer(){let r=this._vHeightBuffer;if(!Cesium.defined(r)){r=new Uint8ClampedArray(this._heightmapWidth*this._heightmapHeight*4);for(let i=0;i<this._heightmapWidth*this._heightmapHeight*4;)r[i++]=15,r[i++]=66,r[i++]=64,r[i++]=255;this._vHeightBuffer=r}return r}getChildTileMask(r,i,a){let h=new Cesium.Rectangle,o=this._tilingScheme,l=this._rectangles,c=o.tileXYToRectangle(r,i,a),d=0;for(let u=0;u<l.length&&d!==15;++u){let m=l[u];if(!(m.maxLevel<=a)){let y=m.rectangle,g=Cesium.Rectangle.intersection(y,c,h);Cesium.defined(g)&&(f(o,y,2*r,2*i,a+1,h)&&(d|=4),f(o,y,2*r+1,2*i,a+1,h)&&(d|=8),f(o,y,2*r,2*i+1,a+1,h)&&(d|=1),f(o,y,2*r+1,2*i+1,a+1,h)&&(d|=2))}}return d}}var src={exports:{}},indexLight={exports:{}},indexMinimal={},minimal={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1,aspromise=s;function s(r,i){for(var a=new Array(arguments.length-1),h=0,o=2,l=!0;o<arguments.length;)a[h++]=arguments[o++];return new Promise(function(d,u){a[h]=function(y){if(l)if(l=!1,y)u(y);else{for(var g=new Array(arguments.length-1),p=0;p<g.length;)g[p++]=arguments[p];d.apply(null,g)}};try{r.apply(i||null,a)}catch(m){l&&(l=!1,u(m))}})}return aspromise}var base64$1={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(s){var r=s;r.length=function(c){var d=c.length;if(!d)return 0;for(var u=0;--d%4>1&&c.charAt(d)==="=";)++u;return Math.ceil(c.length*3)/4-u};for(var i=new Array(64),a=new Array(123),h=0;h<64;)a[i[h]=h<26?h+65:h<52?h+71:h<62?h-4:h-59|43]=h++;r.encode=function(c,d,u){for(var m=null,y=[],g=0,p=0,v;d<u;){var b=c[d++];switch(p){case 0:y[g++]=i[b>>2],v=(b&3)<<4,p=1;break;case 1:y[g++]=i[v|b>>4],v=(b&15)<<2,p=2;break;case 2:y[g++]=i[v|b>>6],y[g++]=i[b&63],p=0;break}g>8191&&((m||(m=[])).push(String.fromCharCode.apply(String,y)),g=0)}return p&&(y[g++]=i[v],y[g++]=61,p===1&&(y[g++]=61)),m?(g&&m.push(String.fromCharCode.apply(String,y.slice(0,g))),m.join("")):String.fromCharCode.apply(String,y.slice(0,g))};var o="invalid encoding";r.decode=function(c,d,u){for(var m=u,y=0,g,p=0;p<c.length;){var v=c.charCodeAt(p++);if(v===61&&y>1)break;if((v=a[v])===void 0)throw Error(o);switch(y){case 0:g=v,y=1;break;case 1:d[u++]=g<<2|(v&48)>>4,g=v,y=2;break;case 2:d[u++]=(g&15)<<4|(v&60)>>2,g=v,y=3;break;case 3:d[u++]=(g&3)<<6|v,y=0;break}}if(y===1)throw Error(o);return u-m},r.test=function(c){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(c)}}(base64$1)),base64$1}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=s;function s(){this._listeners={}}return s.prototype.on=function(i,a,h){return(this._listeners[i]||(this._listeners[i]=[])).push({fn:a,ctx:h||this}),this},s.prototype.off=function(i,a){if(i===void 0)this._listeners={};else if(a===void 0)this._listeners[i]=[];else for(var h=this._listeners[i],o=0;o<h.length;)h[o].fn===a?h.splice(o,1):++o;return this},s.prototype.emit=function(i){var a=this._listeners[i];if(a){for(var h=[],o=1;o<arguments.length;)h.push(arguments[o++]);for(o=0;o<a.length;)a[o].fn.apply(a[o++].ctx,h)}return this},eventemitter}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1,float=s(s);function s(o){return typeof Float32Array<"u"?function(){var l=new Float32Array([-0]),c=new Uint8Array(l.buffer),d=c[3]===128;function u(p,v,b){l[0]=p,v[b]=c[0],v[b+1]=c[1],v[b+2]=c[2],v[b+3]=c[3]}function m(p,v,b){l[0]=p,v[b]=c[3],v[b+1]=c[2],v[b+2]=c[1],v[b+3]=c[0]}o.writeFloatLE=d?u:m,o.writeFloatBE=d?m:u;function y(p,v){return c[0]=p[v],c[1]=p[v+1],c[2]=p[v+2],c[3]=p[v+3],l[0]}function g(p,v){return c[3]=p[v],c[2]=p[v+1],c[1]=p[v+2],c[0]=p[v+3],l[0]}o.readFloatLE=d?y:g,o.readFloatBE=d?g:y}():function(){function l(d,u,m,y){var g=u<0?1:0;if(g&&(u=-u),u===0)d(1/u>0?0:2147483648,m,y);else if(isNaN(u))d(2143289344,m,y);else if(u>34028234663852886e22)d((g<<31|2139095040)>>>0,m,y);else if(u<11754943508222875e-54)d((g<<31|Math.round(u/1401298464324817e-60))>>>0,m,y);else{var p=Math.floor(Math.log(u)/Math.LN2),v=Math.round(u*Math.pow(2,-p)*8388608)&8388607;d((g<<31|p+127<<23|v)>>>0,m,y)}}o.writeFloatLE=l.bind(null,r),o.writeFloatBE=l.bind(null,i);function c(d,u,m){var y=d(u,m),g=(y>>31)*2+1,p=y>>>23&255,v=y&8388607;return p===255?v?NaN:g*(1/0):p===0?g*1401298464324817e-60*v:g*Math.pow(2,p-150)*(v+8388608)}o.readFloatLE=c.bind(null,a),o.readFloatBE=c.bind(null,h)}(),typeof Float64Array<"u"?function(){var l=new Float64Array([-0]),c=new Uint8Array(l.buffer),d=c[7]===128;function u(p,v,b){l[0]=p,v[b]=c[0],v[b+1]=c[1],v[b+2]=c[2],v[b+3]=c[3],v[b+4]=c[4],v[b+5]=c[5],v[b+6]=c[6],v[b+7]=c[7]}function m(p,v,b){l[0]=p,v[b]=c[7],v[b+1]=c[6],v[b+2]=c[5],v[b+3]=c[4],v[b+4]=c[3],v[b+5]=c[2],v[b+6]=c[1],v[b+7]=c[0]}o.writeDoubleLE=d?u:m,o.writeDoubleBE=d?m:u;function y(p,v){return c[0]=p[v],c[1]=p[v+1],c[2]=p[v+2],c[3]=p[v+3],c[4]=p[v+4],c[5]=p[v+5],c[6]=p[v+6],c[7]=p[v+7],l[0]}function g(p,v){return c[7]=p[v],c[6]=p[v+1],c[5]=p[v+2],c[4]=p[v+3],c[3]=p[v+4],c[2]=p[v+5],c[1]=p[v+6],c[0]=p[v+7],l[0]}o.readDoubleLE=d?y:g,o.readDoubleBE=d?g:y}():function(){function l(d,u,m,y,g,p){var v=y<0?1:0;if(v&&(y=-y),y===0)d(0,g,p+u),d(1/y>0?0:2147483648,g,p+m);else if(isNaN(y))d(0,g,p+u),d(2146959360,g,p+m);else if(y>17976931348623157e292)d(0,g,p+u),d((v<<31|2146435072)>>>0,g,p+m);else{var b;if(y<22250738585072014e-324)b=y/5e-324,d(b>>>0,g,p+u),d((v<<31|b/4294967296)>>>0,g,p+m);else{var w=Math.floor(Math.log(y)/Math.LN2);w===1024&&(w=1023),b=y*Math.pow(2,-w),d(b*4503599627370496>>>0,g,p+u),d((v<<31|w+1023<<20|b*1048576&1048575)>>>0,g,p+m)}}}o.writeDoubleLE=l.bind(null,r,0,4),o.writeDoubleBE=l.bind(null,i,4,0);function c(d,u,m,y,g){var p=d(y,g+u),v=d(y,g+m),b=(v>>31)*2+1,w=v>>>20&2047,O=4294967296*(v&1048575)+p;return w===2047?O?NaN:b*(1/0):w===0?b*5e-324*O:b*Math.pow(2,w-1075)*(O+4503599627370496)}o.readDoubleLE=c.bind(null,a,0,4),o.readDoubleBE=c.bind(null,h,4,0)}(),o}function r(o,l,c){l[c]=o&255,l[c+1]=o>>>8&255,l[c+2]=o>>>16&255,l[c+3]=o>>>24}function i(o,l,c){l[c]=o>>>24,l[c+1]=o>>>16&255,l[c+2]=o>>>8&255,l[c+3]=o&255}function a(o,l){return(o[l]|o[l+1]<<8|o[l+2]<<16|o[l+3]<<24)>>>0}function h(o,l){return(o[l]<<24|o[l+1]<<16|o[l+2]<<8|o[l+3])>>>0}return float}var inquire_1,hasRequiredInquire;function requireInquire(){if(hasRequiredInquire)return inquire_1;hasRequiredInquire=1,inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(s){}return null}return inquire_1}var utf8$2={},hasRequiredUtf8;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(s){var r=s;r.length=function(a){for(var h=0,o=0,l=0;l<a.length;++l)o=a.charCodeAt(l),o<128?h+=1:o<2048?h+=2:(o&64512)===55296&&(a.charCodeAt(l+1)&64512)===56320?(++l,h+=4):h+=3;return h},r.read=function(a,h,o){var l=o-h;if(l<1)return"";for(var c=null,d=[],u=0,m;h<o;)m=a[h++],m<128?d[u++]=m:m>191&&m<224?d[u++]=(m&31)<<6|a[h++]&63:m>239&&m<365?(m=((m&7)<<18|(a[h++]&63)<<12|(a[h++]&63)<<6|a[h++]&63)-65536,d[u++]=55296+(m>>10),d[u++]=56320+(m&1023)):d[u++]=(m&15)<<12|(a[h++]&63)<<6|a[h++]&63,u>8191&&((c||(c=[])).push(String.fromCharCode.apply(String,d)),u=0);return c?(u&&c.push(String.fromCharCode.apply(String,d.slice(0,u))),c.join("")):String.fromCharCode.apply(String,d.slice(0,u))},r.write=function(a,h,o){for(var l=o,c,d,u=0;u<a.length;++u)c=a.charCodeAt(u),c<128?h[o++]=c:c<2048?(h[o++]=c>>6|192,h[o++]=c&63|128):(c&64512)===55296&&((d=a.charCodeAt(u+1))&64512)===56320?(c=65536+((c&1023)<<10)+(d&1023),++u,h[o++]=c>>18|240,h[o++]=c>>12&63|128,h[o++]=c>>6&63|128,h[o++]=c&63|128):(h[o++]=c>>12|224,h[o++]=c>>6&63|128,h[o++]=c&63|128);return o-l}}(utf8$2)),utf8$2}var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1,pool_1=s;function s(r,i,a){var h=a||8192,o=h>>>1,l=null,c=h;return function(u){if(u<1||u>o)return r(u);c+u>h&&(l=r(h),c=0);var m=i.call(l,c,c+=u);return c&7&&(c=(c|7)+1),m}}return pool_1}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=r;var s=requireMinimal();function r(o,l){this.lo=o>>>0,this.hi=l>>>0}var i=r.zero=new r(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var a=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(l){if(l===0)return i;var c=l<0;c&&(l=-l);var d=l>>>0,u=(l-d)/4294967296>>>0;return c&&(u=~u>>>0,d=~d>>>0,++d>4294967295&&(d=0,++u>4294967295&&(u=0))),new r(d,u)},r.from=function(l){if(typeof l=="number")return r.fromNumber(l);if(s.isString(l))if(s.Long)l=s.Long.fromString(l);else return r.fromNumber(parseInt(l,10));return l.low||l.high?new r(l.low>>>0,l.high>>>0):i},r.prototype.toNumber=function(l){if(!l&&this.hi>>>31){var c=~this.lo+1>>>0,d=~this.hi>>>0;return c||(d=d+1>>>0),-(c+d*4294967296)}return this.lo+this.hi*4294967296},r.prototype.toLong=function(l){return s.Long?new s.Long(this.lo|0,this.hi|0,!!l):{low:this.lo|0,high:this.hi|0,unsigned:!!l}};var h=String.prototype.charCodeAt;return r.fromHash=function(l){return l===a?i:new r((h.call(l,0)|h.call(l,1)<<8|h.call(l,2)<<16|h.call(l,3)<<24)>>>0,(h.call(l,4)|h.call(l,5)<<8|h.call(l,6)<<16|h.call(l,7)<<24)>>>0)},r.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)},r.prototype.zzEncode=function(){var l=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^l)>>>0,this.lo=(this.lo<<1^l)>>>0,this},r.prototype.zzDecode=function(){var l=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^l)>>>0,this.hi=(this.hi>>>1^l)>>>0,this},r.prototype.length=function(){var l=this.lo,c=(this.lo>>>28|this.hi<<4)>>>0,d=this.hi>>>24;return d===0?c===0?l<16384?l<128?1:2:l<2097152?3:4:c<16384?c<128?5:6:c<2097152?7:8:d<128?9:10},longbits}var hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,function(s){var r=s;r.asPromise=requireAspromise(),r.base64=requireBase64(),r.EventEmitter=requireEventemitter(),r.float=requireFloat(),r.inquire=requireInquire(),r.utf8=requireUtf8(),r.pool=requirePool(),r.LongBits=requireLongbits(),r.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),r.global=r.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||commonjsGlobal,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(o){return typeof o=="number"&&isFinite(o)&&Math.floor(o)===o},r.isString=function(o){return typeof o=="string"||o instanceof String},r.isObject=function(o){return o&&typeof o=="object"},r.isset=r.isSet=function(o,l){var c=o[l];return c!=null&&o.hasOwnProperty(l)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1},r.Buffer=function(){try{var h=r.inquire("buffer").Buffer;return h.prototype.utf8Write?h:null}catch{return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(o){return typeof o=="number"?r.Buffer?r._Buffer_allocUnsafe(o):new r.Array(o):r.Buffer?r._Buffer_from(o):typeof Uint8Array>"u"?o:new Uint8Array(o)},r.Array=typeof Uint8Array<"u"?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(o){return o?r.LongBits.from(o).toHash():r.LongBits.zeroHash},r.longFromHash=function(o,l){var c=r.LongBits.fromHash(o);return r.Long?r.Long.fromBits(c.lo,c.hi,l):c.toNumber(!!l)};function i(h,o,l){for(var c=Object.keys(o),d=0;d<c.length;++d)(h[c[d]]===void 0||!l)&&(h[c[d]]=o[c[d]]);return h}r.merge=i,r.lcFirst=function(o){return o.charAt(0).toLowerCase()+o.substring(1)};function a(h){function o(l,c){if(!(this instanceof o))return new o(l,c);Object.defineProperty(this,"message",{get:function(){return l}}),Error.captureStackTrace?Error.captureStackTrace(this,o):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&i(this,c)}return o.prototype=Object.create(Error.prototype,{constructor:{value:o,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return h},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),o}r.newError=a,r.ProtocolError=a("ProtocolError"),r.oneOfGetter=function(o){for(var l={},c=0;c<o.length;++c)l[o[c]]=1;return function(){for(var d=Object.keys(this),u=d.length-1;u>-1;--u)if(l[d[u]]===1&&this[d[u]]!==void 0&&this[d[u]]!==null)return d[u]}},r.oneOfSetter=function(o){return function(l){for(var c=0;c<o.length;++c)o[c]!==l&&delete this[o[c]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var h=r.Buffer;if(!h){r._Buffer_from=r._Buffer_allocUnsafe=null;return}r._Buffer_from=h.from!==Uint8Array.from&&h.from||function(l,c){return new h(l,c)},r._Buffer_allocUnsafe=h.allocUnsafe||function(l){return new h(l)}}}(minimal)),minimal}var writer=Writer$1,util$7=requireMinimal(),BufferWriter$1,LongBits$1=util$7.LongBits,base64=util$7.base64,utf8$1=util$7.utf8;function Op(s,r,i){this.fn=s,this.len=r,this.next=void 0,this.val=i}function noop(){}function State(s){this.head=s.head,this.tail=s.tail,this.len=s.len,this.next=s.states}function Writer$1(){this.len=0,this.head=new Op(noop,0,0),this.tail=this.head,this.states=null}var create$1=function s(){return util$7.Buffer?function(){return(Writer$1.create=function(){return new BufferWriter$1})()}:function(){return new Writer$1}};Writer$1.create=create$1(),Writer$1.alloc=function s(r){return new util$7.Array(r)},util$7.Array!==Array&&(Writer$1.alloc=util$7.pool(Writer$1.alloc,util$7.Array.prototype.subarray)),Writer$1.prototype._push=function s(r,i,a){return this.tail=this.tail.next=new Op(r,i,a),this.len+=i,this};function writeByte(s,r,i){r[i]=s&255}function writeVarint32(s,r,i){for(;s>127;)r[i++]=s&127|128,s>>>=7;r[i]=s}function VarintOp(s,r){this.len=s,this.next=void 0,this.val=r}VarintOp.prototype=Object.create(Op.prototype),VarintOp.prototype.fn=writeVarint32,Writer$1.prototype.uint32=function s(r){return this.len+=(this.tail=this.tail.next=new VarintOp((r=r>>>0)<128?1:r<16384?2:r<2097152?3:r<268435456?4:5,r)).len,this},Writer$1.prototype.int32=function s(r){return r<0?this._push(writeVarint64,10,LongBits$1.fromNumber(r)):this.uint32(r)},Writer$1.prototype.sint32=function s(r){return this.uint32((r<<1^r>>31)>>>0)};function writeVarint64(s,r,i){for(;s.hi;)r[i++]=s.lo&127|128,s.lo=(s.lo>>>7|s.hi<<25)>>>0,s.hi>>>=7;for(;s.lo>127;)r[i++]=s.lo&127|128,s.lo=s.lo>>>7;r[i++]=s.lo}Writer$1.prototype.uint64=function s(r){var i=LongBits$1.from(r);return this._push(writeVarint64,i.length(),i)},Writer$1.prototype.int64=Writer$1.prototype.uint64,Writer$1.prototype.sint64=function s(r){var i=LongBits$1.from(r).zzEncode();return this._push(writeVarint64,i.length(),i)},Writer$1.prototype.bool=function s(r){return this._push(writeByte,1,r?1:0)};function writeFixed32(s,r,i){r[i]=s&255,r[i+1]=s>>>8&255,r[i+2]=s>>>16&255,r[i+3]=s>>>24}Writer$1.prototype.fixed32=function s(r){return this._push(writeFixed32,4,r>>>0)},Writer$1.prototype.sfixed32=Writer$1.prototype.fixed32,Writer$1.prototype.fixed64=function s(r){var i=LongBits$1.from(r);return this._push(writeFixed32,4,i.lo)._push(writeFixed32,4,i.hi)},Writer$1.prototype.sfixed64=Writer$1.prototype.fixed64,Writer$1.prototype.float=function s(r){return this._push(util$7.float.writeFloatLE,4,r)},Writer$1.prototype.double=function s(r){return this._push(util$7.float.writeDoubleLE,8,r)};var writeBytes=util$7.Array.prototype.set?function s(r,i,a){i.set(r,a)}:function s(r,i,a){for(var h=0;h<r.length;++h)i[a+h]=r[h]};Writer$1.prototype.bytes=function s(r){var i=r.length>>>0;if(!i)return this._push(writeByte,1,0);if(util$7.isString(r)){var a=Writer$1.alloc(i=base64.length(r));base64.decode(r,a,0),r=a}return this.uint32(i)._push(writeBytes,i,r)},Writer$1.prototype.string=function s(r){var i=utf8$1.length(r);return i?this.uint32(i)._push(utf8$1.write,i,r):this._push(writeByte,1,0)},Writer$1.prototype.fork=function s(){return this.states=new State(this),this.head=this.tail=new Op(noop,0,0),this.len=0,this},Writer$1.prototype.reset=function s(){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 Op(noop,0,0),this.len=0),this},Writer$1.prototype.ldelim=function s(){var r=this.head,i=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=r.next,this.tail=i,this.len+=a),this},Writer$1.prototype.finish=function s(){for(var r=this.head.next,i=this.constructor.alloc(this.len),a=0;r;)r.fn(r.val,i,a),a+=r.len,r=r.next;return i},Writer$1._configure=function(s){BufferWriter$1=s,Writer$1.create=create$1(),BufferWriter$1._configure()};var writer_buffer=BufferWriter,Writer=writer;(BufferWriter.prototype=Object.create(Writer.prototype)).constructor=BufferWriter;var util$6=requireMinimal();function BufferWriter(){Writer.call(this)}BufferWriter._configure=function(){BufferWriter.alloc=util$6._Buffer_allocUnsafe,BufferWriter.writeBytesBuffer=util$6.Buffer&&util$6.Buffer.prototype instanceof Uint8Array&&util$6.Buffer.prototype.set.name==="set"?function(r,i,a){i.set(r,a)}:function(r,i,a){if(r.copy)r.copy(i,a,0,r.length);else for(var h=0;h<r.length;)i[a++]=r[h++]}},BufferWriter.prototype.bytes=function s(r){util$6.isString(r)&&(r=util$6._Buffer_from(r,"base64"));var i=r.length>>>0;return this.uint32(i),i&&this._push(BufferWriter.writeBytesBuffer,i,r),this};function writeStringBuffer(s,r,i){s.length<40?util$6.utf8.write(s,r,i):r.utf8Write?r.utf8Write(s,i):r.write(s,i)}BufferWriter.prototype.string=function s(r){var i=util$6.Buffer.byteLength(r);return this.uint32(i),i&&this._push(writeStringBuffer,i,r),this},BufferWriter._configure();var reader=Reader$1,util$5=requireMinimal(),BufferReader$1,LongBits=util$5.LongBits,utf8=util$5.utf8;function indexOutOfRange(s,r){return RangeError("index out of range: "+s.pos+" + "+(r||1)+" > "+s.len)}function Reader$1(s){this.buf=s,this.pos=0,this.len=s.length}var create_array=typeof Uint8Array<"u"?function s(r){if(r instanceof Uint8Array||Array.isArray(r))return new Reader$1(r);throw Error("illegal buffer")}:function s(r){if(Array.isArray(r))return new Reader$1(r);throw Error("illegal buffer")},create=function s(){return util$5.Buffer?function(i){return(Reader$1.create=function(h){return util$5.Buffer.isBuffer(h)?new BufferReader$1(h):create_array(h)})(i)}:create_array};Reader$1.create=create(),Reader$1.prototype._slice=util$5.Array.prototype.subarray||util$5.Array.prototype.slice,Reader$1.prototype.uint32=function s(){var r=4294967295;return function(){if(r=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(r=(r|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return r;if((this.pos+=5)>this.len)throw this.pos=this.len,indexOutOfRange(this,10);return r}}(),Reader$1.prototype.int32=function s(){return this.uint32()|0},Reader$1.prototype.sint32=function s(){var r=this.uint32();return r>>>1^-(r&1)|0};function readLongVarint(){var s=new LongBits(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(s.lo=(s.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return s;if(s.lo=(s.lo|(this.buf[this.pos]&127)<<28)>>>0,s.hi=(s.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return s;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw indexOutOfRange(this);if(s.lo=(s.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return s}return s.lo=(s.lo|(this.buf[this.pos++]&127)<<r*7)>>>0,s}if(this.len-this.pos>4){for(;r<5;++r)if(s.hi=(s.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return s}else for(;r<5;++r){if(this.pos>=this.len)throw indexOutOfRange(this);if(s.hi=(s.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return s}throw Error("invalid varint encoding")}Reader$1.prototype.bool=function s(){return this.uint32()!==0};function readFixed32_end(s,r){return(s[r-4]|s[r-3]<<8|s[r-2]<<16|s[r-1]<<24)>>>0}Reader$1.prototype.fixed32=function s(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)},Reader$1.prototype.sfixed32=function s(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)|0};function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new LongBits(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}Reader$1.prototype.float=function s(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var r=util$5.float.readFloatLE(this.buf,this.pos);return this.pos+=4,r},Reader$1.prototype.double=function s(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var r=util$5.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,r},Reader$1.prototype.bytes=function s(){var r=this.uint32(),i=this.pos,a=this.pos+r;if(a>this.len)throw indexOutOfRange(this,r);if(this.pos+=r,Array.isArray(this.buf))return this.buf.slice(i,a);if(i===a){var h=util$5.Buffer;return h?h.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,i,a)},Reader$1.prototype.string=function s(){var r=this.bytes();return utf8.read(r,0,r.length)},Reader$1.prototype.skip=function s(r){if(typeof r=="number"){if(this.pos+r>this.len)throw indexOutOfRange(this,r);this.pos+=r}else do if(this.pos>=this.len)throw indexOutOfRange(this);while(this.buf[this.pos++]&128);return this},Reader$1.prototype.skipType=function(s){switch(s){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(s=this.uint32()&7)!==4;)this.skipType(s);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+s+" at offset "+this.pos)}return this},Reader$1._configure=function(s){BufferReader$1=s,Reader$1.create=create(),BufferReader$1._configure();var r=util$5.Long?"toLong":"toNumber";util$5.merge(Reader$1.prototype,{int64:function(){return readLongVarint.call(this)[r](!1)},uint64:function(){return readLongVarint.call(this)[r](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[r](!1)},fixed64:function(){return readFixed64.call(this)[r](!0)},sfixed64:function(){return readFixed64.call(this)[r](!1)}})};var reader_buffer=BufferReader,Reader=reader;(BufferReader.prototype=Object.create(Reader.prototype)).constructor=BufferReader;var util$4=requireMinimal();function BufferReader(s){Reader.call(this,s)}BufferReader._configure=function(){util$4.Buffer&&(BufferReader.prototype._slice=util$4.Buffer.prototype.slice)},BufferReader.prototype.string=function s(){var r=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+r,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+r,this.len))},BufferReader._configure();var rpc={},service$1=Service$1,util$3=requireMinimal();(Service$1.prototype=Object.create(util$3.EventEmitter.prototype)).constructor=Service$1;function Service$1(s,r,i){if(typeof s!="function")throw TypeError("rpcImpl must be a function");util$3.EventEmitter.call(this),this.rpcImpl=s,this.requestDelimited=!!r,this.responseDelimited=!!i}Service$1.prototype.rpcCall=function s(r,i,a,h,o){if(!h)throw TypeError("request must be specified");var l=this;if(!o)return util$3.asPromise(s,l,r,i,a,h);if(!l.rpcImpl){setTimeout(function(){o(Error("already ended"))},0);return}try{return l.rpcImpl(r,i[l.requestDelimited?"encodeDelimited":"encode"](h).finish(),function(d,u){if(d)return l.emit("error",d,r),o(d);if(u===null){l.end(!0);return}if(!(u instanceof a))try{u=a[l.responseDelimited?"decodeDelimited":"decode"](u)}catch(m){return l.emit("error",m,r),o(m)}return l.emit("data",u,r),o(null,u)})}catch(c){l.emit("error",c,r),setTimeout(function(){o(c)},0);return}},Service$1.prototype.end=function s(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},function(s){var r=s;r.Service=service$1}(rpc);var roots={};(function(s){var r=s;r.build="minimal",r.Writer=writer,r.BufferWriter=writer_buffer,r.Reader=reader,r.BufferReader=reader_buffer,r.util=requireMinimal(),r.rpc=rpc,r.roots=roots,r.configure=i;function i(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}i()})(indexMinimal);var util$2={exports:{}},codegen_1=codegen;function codegen(s,r){typeof s=="string"&&(r=s,s=void 0);var i=[];function a(o){if(typeof o!="string"){var l=h();if(codegen.verbose&&console.warn("codegen: "+l),l="return "+l,o){for(var c=Object.keys(o),d=new Array(c.length+1),u=new Array(c.length),m=0;m<c.length;)d[m]=c[m],u[m]=o[c[m++]];return d[m]=l,Function.apply(null,d).apply(null,u)}return Function(l)()}for(var y=new Array(arguments.length-1),g=0;g<y.length;)y[g]=arguments[++g];if(g=0,o=o.replace(/%([%dfijs])/g,function(v,b){var w=y[g++];switch(b){case"d":case"f":return String(Number(w));case"i":return String(Math.floor(w));case"j":return JSON.stringify(w);case"s":return String(w)}return"%"}),g!==y.length)throw Error("parameter count mismatch");return i.push(o),a}function h(o){return"function "+(o||r||"")+"("+(s&&s.join(",")||"")+`){
2
+ `+i.join(`
3
+ `)+`
4
+ }`}return a.toString=h,a}codegen.verbose=!1;var fetch_1=fetch,asPromise=requireAspromise(),inquire=requireInquire(),fs=inquire("fs");function fetch(s,r,i){return typeof r=="function"?(i=r,r={}):r||(r={}),i?!r.xhr&&fs&&fs.readFile?fs.readFile(s,function(h,o){return h&&typeof XMLHttpRequest<"u"?fetch.xhr(s,r,i):h?i(h):i(null,r.binary?o:o.toString("utf8"))}):fetch.xhr(s,r,i):asPromise(fetch,this,s,r)}fetch.xhr=function s(r,i,a){var h=new XMLHttpRequest;h.onreadystatechange=function(){if(h.readyState===4){if(h.status!==0&&h.status!==200)return a(Error("status "+h.status));if(i.binary){var l=h.response;if(!l){l=[];for(var c=0;c<h.responseText.length;++c)l.push(h.responseText.charCodeAt(c)&255)}return a(null,typeof Uint8Array<"u"?new Uint8Array(l):l)}return a(null,h.responseText)}},i.binary&&("overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.responseType="arraybuffer"),h.open("GET",r),h.send()};var path={};(function(s){var r=s,i=r.isAbsolute=function(o){return/^(?:\/|\w+:)/.test(o)},a=r.normalize=function(o){o=o.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var l=o.split("/"),c=i(o),d="";c&&(d=l.shift()+"/");for(var u=0;u<l.length;)l[u]===".."?u>0&&l[u-1]!==".."?l.splice(--u,2):c?l.splice(u,1):++u:l[u]==="."?l.splice(u,1):++u;return d+l.join("/")};r.resolve=function(o,l,c){return c||(l=a(l)),i(l)?l:(c||(o=a(o)),(o=o.replace(/(?:\/|^)[^/]+$/,"")).length?a(o+"/"+l):l)}})(path);var types$1={},hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,function(s){var r=s,i=requireUtil(),a=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function h(o,l){var c=0,d={};for(l|=0;c<o.length;)d[a[c+l]]=o[c++];return d}r.basic=h([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=h([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",i.emptyArray,null]),r.long=h([0,0,0,1,1],7),r.mapKey=h([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=h([1,5,0,0,0,5,5,0,0,0,1,1,0])}(types$1)),types$1}var field,hasRequiredField;function requireField(){if(hasRequiredField)return field;hasRequiredField=1,field=l;var s=requireObject();((l.prototype=Object.create(s.prototype)).constructor=l).className="Field";var r=require_enum(),i=requireTypes(),a=requireUtil(),h,o=/^required|optional|repeated$/;l.fromJSON=function(d,u){return new l(d,u.id,u.type,u.rule,u.extend,u.options,u.comment)};function l(c,d,u,m,y,g,p){if(a.isObject(m)?(p=y,g=m,m=y=void 0):a.isObject(y)&&(p=g,g=y,y=void 0),s.call(this,c,g),!a.isInteger(d)||d<0)throw TypeError("id must be a non-negative integer");if(!a.isString(u))throw TypeError("type must be a string");if(m!==void 0&&!o.test(m=m.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(y!==void 0&&!a.isString(y))throw TypeError("extend must be a string");m==="proto3_optional"&&(m="optional"),this.rule=m&&m!=="optional"?m:void 0,this.type=u,this.id=d,this.extend=y||void 0,this.required=m==="required",this.optional=!this.required,this.repeated=m==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=a.Long?i.long[u]!==void 0:!1,this.bytes=u==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=p}return Object.defineProperty(l.prototype,"packed",{get:function(){return this._packed===null&&(this._packed=this.getOption("packed")!==!1),this._packed}}),l.prototype.setOption=function(d,u,m){return d==="packed"&&(this._packed=null),s.prototype.setOption.call(this,d,u,m)},l.prototype.toJSON=function(d){var u=d?!!d.keepComments:!1;return a.toObject(["rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",u?this.comment:void 0])},l.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=i.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof h?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof r&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&((this.options.packed===!0||this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof r))&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var d;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,d=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,d=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=d}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof h&&(this.parent.ctor.prototype[this.name]=this.defaultValue),s.prototype.resolve.call(this)},l.d=function(d,u,m,y){return typeof u=="function"?u=a.decorateType(u).name:u&&typeof u=="object"&&(u=a.decorateEnum(u).name),function(p,v){a.decorateType(p.constructor).add(new l(v,d,u,m,{default:y}))}},l._configure=function(d){h=d},field}var oneof,hasRequiredOneof;function requireOneof(){if(hasRequiredOneof)return oneof;hasRequiredOneof=1,oneof=a;var s=requireObject();((a.prototype=Object.create(s.prototype)).constructor=a).className="OneOf";var r=requireField(),i=requireUtil();function a(o,l,c,d){if(Array.isArray(l)||(c=l,l=void 0),s.call(this,o,c),!(l===void 0||Array.isArray(l)))throw TypeError("fieldNames must be an Array");this.oneof=l||[],this.fieldsArray=[],this.comment=d}a.fromJSON=function(l,c){return new a(l,c.oneof,c.options,c.comment)},a.prototype.toJSON=function(l){var c=l?!!l.keepComments:!1;return i.toObject(["options",this.options,"oneof",this.oneof,"comment",c?this.comment:void 0])};function h(o){if(o.parent)for(var l=0;l<o.fieldsArray.length;++l)o.fieldsArray[l].parent||o.parent.add(o.fieldsArray[l])}return a.prototype.add=function(l){if(!(l instanceof r))throw TypeError("field must be a Field");return l.parent&&l.parent!==this.parent&&l.parent.remove(l),this.oneof.push(l.name),this.fieldsArray.push(l),l.partOf=this,h(this),this},a.prototype.remove=function(l){if(!(l instanceof r))throw TypeError("field must be a Field");var c=this.fieldsArray.indexOf(l);if(c<0)throw Error(l+" is not a member of "+this);return this.fieldsArray.splice(c,1),c=this.oneof.indexOf(l.name),c>-1&&this.oneof.splice(c,1),l.partOf=null,this},a.prototype.onAdd=function(l){s.prototype.onAdd.call(this,l);for(var c=this,d=0;d<this.oneof.length;++d){var u=l.get(this.oneof[d]);u&&!u.partOf&&(u.partOf=c,c.fieldsArray.push(u))}h(this)},a.prototype.onRemove=function(l){for(var c=0,d;c<this.fieldsArray.length;++c)(d=this.fieldsArray[c]).parent&&d.parent.remove(d);s.prototype.onRemove.call(this,l)},a.d=function(){for(var l=new Array(arguments.length),c=0;c<arguments.length;)l[c]=arguments[c++];return function(u,m){i.decorateType(u.constructor).add(new a(m,l)),Object.defineProperty(u,m,{get:i.oneOfGetter(l),set:i.oneOfSetter(l)})}},oneof}var namespace,hasRequiredNamespace;function requireNamespace(){if(hasRequiredNamespace)return namespace;hasRequiredNamespace=1,namespace=d;var s=requireObject();((d.prototype=Object.create(s.prototype)).constructor=d).className="Namespace";var r=requireField(),i=requireUtil(),a=requireOneof(),h,o,l;d.fromJSON=function(y,g){return new d(y,g.options).addJSON(g.nested)};function c(m,y){if(m&&m.length){for(var g={},p=0;p<m.length;++p)g[m[p].name]=m[p].toJSON(y);return g}}d.arrayToJSON=c,d.isReservedId=function(y,g){if(y){for(var p=0;p<y.length;++p)if(typeof y[p]!="string"&&y[p][0]<=g&&y[p][1]>g)return!0}return!1},d.isReservedName=function(y,g){if(y){for(var p=0;p<y.length;++p)if(y[p]===g)return!0}return!1};function d(m,y){s.call(this,m,y),this.nested=void 0,this._nestedArray=null}function u(m){return m._nestedArray=null,m}return Object.defineProperty(d.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=i.toArray(this.nested))}}),d.prototype.toJSON=function(y){return i.toObject(["options",this.options,"nested",c(this.nestedArray,y)])},d.prototype.addJSON=function(y){var g=this;if(y)for(var p=Object.keys(y),v=0,b;v<p.length;++v)b=y[p[v]],g.add((b.fields!==void 0?h.fromJSON:b.values!==void 0?l.fromJSON:b.methods!==void 0?o.fromJSON:b.id!==void 0?r.fromJSON:d.fromJSON)(p[v],b));return this},d.prototype.get=function(y){return this.nested&&this.nested[y]||null},d.prototype.getEnum=function(y){if(this.nested&&this.nested[y]instanceof l)return this.nested[y].values;throw Error("no such enum: "+y)},d.prototype.add=function(y){if(!(y instanceof r&&y.extend!==void 0||y instanceof h||y instanceof a||y instanceof l||y instanceof o||y instanceof d))throw TypeError("object must be a valid nested object");if(!this.nested)this.nested={};else{var g=this.get(y.name);if(g)if(g instanceof d&&y instanceof d&&!(g instanceof h||g instanceof o)){for(var p=g.nestedArray,v=0;v<p.length;++v)y.add(p[v]);this.remove(g),this.nested||(this.nested={}),y.setOptions(g.options,!0)}else throw Error("duplicate name '"+y.name+"' in "+this)}return this.nested[y.name]=y,y.onAdd(this),u(this)},d.prototype.remove=function(y){if(!(y instanceof s))throw TypeError("object must be a ReflectionObject");if(y.parent!==this)throw Error(y+" is not a member of "+this);return delete this.nested[y.name],Object.keys(this.nested).length||(this.nested=void 0),y.onRemove(this),u(this)},d.prototype.define=function(y,g){if(i.isString(y))y=y.split(".");else if(!Array.isArray(y))throw TypeError("illegal path");if(y&&y.length&&y[0]==="")throw Error("path must be relative");for(var p=this;y.length>0;){var v=y.shift();if(p.nested&&p.nested[v]){if(p=p.nested[v],!(p instanceof d))throw Error("path conflicts with non-namespace objects")}else p.add(p=new d(v))}return g&&p.addJSON(g),p},d.prototype.resolveAll=function(){for(var y=this.nestedArray,g=0;g<y.length;)y[g]instanceof d?y[g++].resolveAll():y[g++].resolve();return this.resolve()},d.prototype.lookup=function(y,g,p){if(typeof g=="boolean"?(p=g,g=void 0):g&&!Array.isArray(g)&&(g=[g]),i.isString(y)&&y.length){if(y===".")return this.root;y=y.split(".")}else if(!y.length)return this;if(y[0]==="")return this.root.lookup(y.slice(1),g);var v=this.get(y[0]);if(v){if(y.length===1){if(!g||g.indexOf(v.constructor)>-1)return v}else if(v instanceof d&&(v=v.lookup(y.slice(1),g,!0)))return v}else for(var b=0;b<this.nestedArray.length;++b)if(this._nestedArray[b]instanceof d&&(v=this._nestedArray[b].lookup(y,g,!0)))return v;return this.parent===null||p?null:this.parent.lookup(y,g)},d.prototype.lookupType=function(y){var g=this.lookup(y,[h]);if(!g)throw Error("no such type: "+y);return g},d.prototype.lookupEnum=function(y){var g=this.lookup(y,[l]);if(!g)throw Error("no such Enum '"+y+"' in "+this);return g},d.prototype.lookupTypeOrEnum=function(y){var g=this.lookup(y,[h,l]);if(!g)throw Error("no such Type or Enum '"+y+"' in "+this);return g},d.prototype.lookupService=function(y){var g=this.lookup(y,[o]);if(!g)throw Error("no such Service '"+y+"' in "+this);return g},d._configure=function(m,y,g){h=m,o=y,l=g},namespace}var mapfield,hasRequiredMapfield;function requireMapfield(){if(hasRequiredMapfield)return mapfield;hasRequiredMapfield=1,mapfield=a;var s=requireField();((a.prototype=Object.create(s.prototype)).constructor=a).className="MapField";var r=requireTypes(),i=requireUtil();function a(h,o,l,c,d,u){if(s.call(this,h,o,c,void 0,void 0,d,u),!i.isString(l))throw TypeError("keyType must be a string");this.keyType=l,this.resolvedKeyType=null,this.map=!0}return a.fromJSON=function(o,l){return new a(o,l.id,l.keyType,l.type,l.options,l.comment)},a.prototype.toJSON=function(o){var l=o?!!o.keepComments:!1;return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",l?this.comment:void 0])},a.prototype.resolve=function(){if(this.resolved)return this;if(r.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return s.prototype.resolve.call(this)},a.d=function(o,l,c){return typeof c=="function"?c=i.decorateType(c).name:c&&typeof c=="object"&&(c=i.decorateEnum(c).name),function(u,m){i.decorateType(u.constructor).add(new a(m,o,l,c))}},mapfield}var method,hasRequiredMethod;function requireMethod(){if(hasRequiredMethod)return method;hasRequiredMethod=1,method=i;var s=requireObject();((i.prototype=Object.create(s.prototype)).constructor=i).className="Method";var r=requireUtil();function i(a,h,o,l,c,d,u,m,y){if(r.isObject(c)?(u=c,c=d=void 0):r.isObject(d)&&(u=d,d=void 0),!(h===void 0||r.isString(h)))throw TypeError("type must be a string");if(!r.isString(o))throw TypeError("requestType must be a string");if(!r.isString(l))throw TypeError("responseType must be a string");s.call(this,a,u),this.type=h||"rpc",this.requestType=o,this.requestStream=c?!0:void 0,this.responseType=l,this.responseStream=d?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=m,this.parsedOptions=y}return i.fromJSON=function(h,o){return new i(h,o.type,o.requestType,o.responseType,o.requestStream,o.responseStream,o.options,o.comment,o.parsedOptions)},i.prototype.toJSON=function(h){var o=h?!!h.keepComments:!1;return r.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",o?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),s.prototype.resolve.call(this))},method}var service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=h;var s=requireNamespace();((h.prototype=Object.create(s.prototype)).constructor=h).className="Service";var r=requireMethod(),i=requireUtil(),a=rpc;function h(l,c){s.call(this,l,c),this.methods={},this._methodsArray=null}h.fromJSON=function(c,d){var u=new h(c,d.options);if(d.methods)for(var m=Object.keys(d.methods),y=0;y<m.length;++y)u.add(r.fromJSON(m[y],d.methods[m[y]]));return d.nested&&u.addJSON(d.nested),u.comment=d.comment,u},h.prototype.toJSON=function(c){var d=s.prototype.toJSON.call(this,c),u=c?!!c.keepComments:!1;return i.toObject(["options",d&&d.options||void 0,"methods",s.arrayToJSON(this.methodsArray,c)||{},"nested",d&&d.nested||void 0,"comment",u?this.comment:void 0])},Object.defineProperty(h.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}});function o(l){return l._methodsArray=null,l}return h.prototype.get=function(c){return this.methods[c]||s.prototype.get.call(this,c)},h.prototype.resolveAll=function(){for(var c=this.methodsArray,d=0;d<c.length;++d)c[d].resolve();return s.prototype.resolve.call(this)},h.prototype.add=function(c){if(this.get(c.name))throw Error("duplicate name '"+c.name+"' in "+this);return c instanceof r?(this.methods[c.name]=c,c.parent=this,o(this)):s.prototype.add.call(this,c)},h.prototype.remove=function(c){if(c instanceof r){if(this.methods[c.name]!==c)throw Error(c+" is not a member of "+this);return delete this.methods[c.name],c.parent=null,o(this)}return s.prototype.remove.call(this,c)},h.prototype.create=function(c,d,u){for(var m=new a.Service(c,d,u),y=0,g;y<this.methodsArray.length;++y){var p=i.lcFirst((g=this._methodsArray[y]).resolve().name).replace(/[^$\w_]/g,"");m[p]=i.codegen(["r","c"],i.isReserved(p)?p+"_":p)("return this.rpcCall(m,q,s,r,c)")({m:g,q:g.resolvedRequestType.ctor,s:g.resolvedResponseType.ctor})}return m},service}var message=Message,util$1=requireMinimal();function Message(s){if(s)for(var r=Object.keys(s),i=0;i<r.length;++i)this[r[i]]=s[r[i]]}Message.create=function s(r){return this.$type.create(r)},Message.encode=function s(r,i){return this.$type.encode(r,i)},Message.encodeDelimited=function s(r,i){return this.$type.encodeDelimited(r,i)},Message.decode=function s(r){return this.$type.decode(r)},Message.decodeDelimited=function s(r){return this.$type.decodeDelimited(r)},Message.verify=function s(r){return this.$type.verify(r)},Message.fromObject=function s(r){return this.$type.fromObject(r)},Message.toObject=function s(r,i){return this.$type.toObject(r,i)},Message.prototype.toJSON=function s(){return this.$type.toObject(this,util$1.toJSONOptions)};var decoder_1,hasRequiredDecoder;function requireDecoder(){if(hasRequiredDecoder)return decoder_1;hasRequiredDecoder=1,decoder_1=h;var s=require_enum(),r=requireTypes(),i=requireUtil();function a(o){return"missing required '"+o.name+"'"}function h(o){var l=i.codegen(["r","l"],o.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(o.fieldsArray.filter(function(g){return g.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");o.group&&l("if((t&7)===4)")("break"),l("switch(t>>>3){");for(var c=0;c<o.fieldsArray.length;++c){var d=o._fieldsArray[c].resolve(),u=d.resolvedType instanceof s?"int32":d.type,m="m"+i.safeProp(d.name);l("case %i: {",d.id),d.map?(l("if(%s===util.emptyObject)",m)("%s={}",m)("var c2 = r.uint32()+r.pos"),r.defaults[d.keyType]!==void 0?l("k=%j",r.defaults[d.keyType]):l("k=null"),r.defaults[u]!==void 0?l("value=%j",r.defaults[u]):l("value=null"),l("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",d.keyType)("case 2:"),r.basic[u]===void 0?l("value=types[%i].decode(r,r.uint32())",c):l("value=r.%s()",u),l("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),r.long[d.keyType]!==void 0?l('%s[typeof k==="object"?util.longToHash(k):k]=value',m):l("%s[k]=value",m)):d.repeated?(l("if(!(%s&&%s.length))",m,m)("%s=[]",m),r.packed[u]!==void 0&&l("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",m,u)("}else"),r.basic[u]===void 0?l(d.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",m,c):l("%s.push(r.%s())",m,u)):r.basic[u]===void 0?l(d.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",m,c):l("%s=r.%s()",m,u),l("break")("}")}for(l("default:")("r.skipType(t&7)")("break")("}")("}"),c=0;c<o._fieldsArray.length;++c){var y=o._fieldsArray[c];y.required&&l("if(!m.hasOwnProperty(%j))",y.name)("throw util.ProtocolError(%j,{instance:m})",a(y))}return l("return m")}return decoder_1}var verifier_1,hasRequiredVerifier;function requireVerifier(){if(hasRequiredVerifier)return verifier_1;hasRequiredVerifier=1,verifier_1=o;var s=require_enum(),r=requireUtil();function i(l,c){return l.name+": "+c+(l.repeated&&c!=="array"?"[]":l.map&&c!=="object"?"{k:"+l.keyType+"}":"")+" expected"}function a(l,c,d,u){if(c.resolvedType)if(c.resolvedType instanceof s){l("switch(%s){",u)("default:")("return%j",i(c,"enum value"));for(var m=Object.keys(c.resolvedType.values),y=0;y<m.length;++y)l("case %i:",c.resolvedType.values[m[y]]);l("break")("}")}else l("{")("var e=types[%i].verify(%s);",d,u)("if(e)")("return%j+e",c.name+".")("}");else switch(c.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":l("if(!util.isInteger(%s))",u)("return%j",i(c,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":l("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",u,u,u,u)("return%j",i(c,"integer|Long"));break;case"float":case"double":l('if(typeof %s!=="number")',u)("return%j",i(c,"number"));break;case"bool":l('if(typeof %s!=="boolean")',u)("return%j",i(c,"boolean"));break;case"string":l("if(!util.isString(%s))",u)("return%j",i(c,"string"));break;case"bytes":l('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',u,u,u)("return%j",i(c,"buffer"));break}return l}function h(l,c,d){switch(c.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":l("if(!util.key32Re.test(%s))",d)("return%j",i(c,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":l("if(!util.key64Re.test(%s))",d)("return%j",i(c,"integer|Long key"));break;case"bool":l("if(!util.key2Re.test(%s))",d)("return%j",i(c,"boolean key"));break}return l}function o(l){var c=r.codegen(["m"],l.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),d=l.oneofsArray,u={};d.length&&c("var p={}");for(var m=0;m<l.fieldsArray.length;++m){var y=l._fieldsArray[m].resolve(),g="m"+r.safeProp(y.name);if(y.optional&&c("if(%s!=null&&m.hasOwnProperty(%j)){",g,y.name),y.map)c("if(!util.isObject(%s))",g)("return%j",i(y,"object"))("var k=Object.keys(%s)",g)("for(var i=0;i<k.length;++i){"),h(c,y,"k[i]"),a(c,y,m,g+"[k[i]]")("}");else if(y.repeated)c("if(!Array.isArray(%s))",g)("return%j",i(y,"array"))("for(var i=0;i<%s.length;++i){",g),a(c,y,m,g+"[i]")("}");else{if(y.partOf){var p=r.safeProp(y.partOf.name);u[y.partOf.name]===1&&c("if(p%s===1)",p)("return%j",y.partOf.name+": multiple values"),u[y.partOf.name]=1,c("p%s=1",p)}a(c,y,m,g)}y.optional&&c("}")}return c("return null")}return verifier_1}var converter={},hasRequiredConverter;function requireConverter(){return hasRequiredConverter||(hasRequiredConverter=1,function(s){var r=s,i=require_enum(),a=requireUtil();function h(l,c,d,u){var m=!1;if(c.resolvedType)if(c.resolvedType instanceof i){l("switch(d%s){",u);for(var y=c.resolvedType.values,g=Object.keys(y),p=0;p<g.length;++p)y[g[p]]===c.typeDefault&&!m&&(l("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',u,u,u),c.repeated||l("break"),m=!0),l("case%j:",g[p])("case %i:",y[g[p]])("m%s=%j",u,y[g[p]])("break");l("}")}else l('if(typeof d%s!=="object")',u)("throw TypeError(%j)",c.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",u,d,u);else{var v=!1;switch(c.type){case"double":case"float":l("m%s=Number(d%s)",u,u);break;case"uint32":case"fixed32":l("m%s=d%s>>>0",u,u);break;case"int32":case"sint32":case"sfixed32":l("m%s=d%s|0",u,u);break;case"uint64":v=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":l("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",u,u,v)('else if(typeof d%s==="string")',u)("m%s=parseInt(d%s,10)",u,u)('else if(typeof d%s==="number")',u)("m%s=d%s",u,u)('else if(typeof d%s==="object")',u)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",u,u,u,v?"true":"");break;case"bytes":l('if(typeof d%s==="string")',u)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",u,u,u)("else if(d%s.length >= 0)",u)("m%s=d%s",u,u);break;case"string":l("m%s=String(d%s)",u,u);break;case"bool":l("m%s=Boolean(d%s)",u,u);break}}return l}r.fromObject=function(c){var d=c.fieldsArray,u=a.codegen(["d"],c.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!d.length)return u("return new this.ctor");u("var m=new this.ctor");for(var m=0;m<d.length;++m){var y=d[m].resolve(),g=a.safeProp(y.name);y.map?(u("if(d%s){",g)('if(typeof d%s!=="object")',g)("throw TypeError(%j)",y.fullName+": object expected")("m%s={}",g)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",g),h(u,y,m,g+"[ks[i]]")("}")("}")):y.repeated?(u("if(d%s){",g)("if(!Array.isArray(d%s))",g)("throw TypeError(%j)",y.fullName+": array expected")("m%s=[]",g)("for(var i=0;i<d%s.length;++i){",g),h(u,y,m,g+"[i]")("}")("}")):(y.resolvedType instanceof i||u("if(d%s!=null){",g),h(u,y,m,g),y.resolvedType instanceof i||u("}"))}return u("return m")};function o(l,c,d,u){if(c.resolvedType)c.resolvedType instanceof i?l("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",u,d,u,u,d,u,u):l("d%s=types[%i].toObject(m%s,o)",u,d,u);else{var m=!1;switch(c.type){case"double":case"float":l("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",u,u,u,u);break;case"uint64":m=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":l('if(typeof m%s==="number")',u)("d%s=o.longs===String?String(m%s):m%s",u,u,u)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",u,u,u,u,m?"true":"",u);break;case"bytes":l("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",u,u,u,u,u);break;default:l("d%s=m%s",u,u);break}}return l}r.toObject=function(c){var d=c.fieldsArray.slice().sort(a.compareFieldsById);if(!d.length)return a.codegen()("return {}");for(var u=a.codegen(["m","o"],c.name+"$toObject")("if(!o)")("o={}")("var d={}"),m=[],y=[],g=[],p=0;p<d.length;++p)d[p].partOf||(d[p].resolve().repeated?m:d[p].map?y:g).push(d[p]);if(m.length){for(u("if(o.arrays||o.defaults){"),p=0;p<m.length;++p)u("d%s=[]",a.safeProp(m[p].name));u("}")}if(y.length){for(u("if(o.objects||o.defaults){"),p=0;p<y.length;++p)u("d%s={}",a.safeProp(y[p].name));u("}")}if(g.length){for(u("if(o.defaults){"),p=0;p<g.length;++p){var v=g[p],b=a.safeProp(v.name);if(v.resolvedType instanceof i)u("d%s=o.enums===String?%j:%j",b,v.resolvedType.valuesById[v.typeDefault],v.typeDefault);else if(v.long)u("if(util.Long){")("var n=new util.Long(%i,%i,%j)",v.typeDefault.low,v.typeDefault.high,v.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",b)("}else")("d%s=o.longs===String?%j:%i",b,v.typeDefault.toString(),v.typeDefault.toNumber());else if(v.bytes){var w="["+Array.prototype.slice.call(v.typeDefault).join(",")+"]";u("if(o.bytes===String)d%s=%j",b,String.fromCharCode.apply(String,v.typeDefault))("else{")("d%s=%s",b,w)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",b,b)("}")}else u("d%s=%j",b,v.typeDefault)}u("}")}var O=!1;for(p=0;p<d.length;++p){var v=d[p],_=c._fieldsArray.indexOf(v),b=a.safeProp(v.name);v.map?(O||(O=!0,u("var ks2")),u("if(m%s&&(ks2=Object.keys(m%s)).length){",b,b)("d%s={}",b)("for(var j=0;j<ks2.length;++j){"),o(u,v,_,b+"[ks2[j]]")("}")):v.repeated?(u("if(m%s&&m%s.length){",b,b)("d%s=[]",b)("for(var j=0;j<m%s.length;++j){",b),o(u,v,_,b+"[j]")("}")):(u("if(m%s!=null&&m.hasOwnProperty(%j)){",b,v.name),o(u,v,_,b),v.partOf&&u("if(o.oneofs)")("d%s=%j",a.safeProp(v.partOf.name),v.name)),u("}")}return u("return d")}}(converter)),converter}var wrappers={};(function(s){var r=s,i=message;r[".google.protobuf.Any"]={fromObject:function(a){if(a&&a["@type"]){var h=a["@type"].substring(a["@type"].lastIndexOf("/")+1),o=this.lookup(h);if(o){var l=a["@type"].charAt(0)==="."?a["@type"].slice(1):a["@type"];return l.indexOf("/")===-1&&(l="/"+l),this.create({type_url:l,value:o.encode(o.fromObject(a)).finish()})}}return this.fromObject(a)},toObject:function(a,h){var o="type.googleapis.com/",l="",c="";if(h&&h.json&&a.type_url&&a.value){c=a.type_url.substring(a.type_url.lastIndexOf("/")+1),l=a.type_url.substring(0,a.type_url.lastIndexOf("/")+1);var d=this.lookup(c);d&&(a=d.decode(a.value))}if(!(a instanceof this.ctor)&&a instanceof i){var u=a.$type.toObject(a,h),m=a.$type.fullName[0]==="."?a.$type.fullName.slice(1):a.$type.fullName;return l===""&&(l=o),c=l+m,u["@type"]=c,u}return this.toObject(a,h)}}})(wrappers);var type,hasRequiredType;function requireType(){if(hasRequiredType)return type;hasRequiredType=1,type=b;var s=requireNamespace();((b.prototype=Object.create(s.prototype)).constructor=b).className="Type";var r=require_enum(),i=requireOneof(),a=requireField(),h=requireMapfield(),o=requireService(),l=message,c=reader,d=writer,u=requireUtil(),m=requireEncoder(),y=requireDecoder(),g=requireVerifier(),p=requireConverter(),v=wrappers;function b(O,_){s.call(this,O,_),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(b.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var O=Object.keys(this.fields),_=0;_<O.length;++_){var C=this.fields[O[_]],x=C.id;if(this._fieldsById[x])throw Error("duplicate id "+x+" in "+this);this._fieldsById[x]=C}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=u.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=u.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=b.generateConstructor(this)())},set:function(O){var _=O.prototype;_ instanceof l||((O.prototype=new l).constructor=O,u.merge(O.prototype,_)),O.$type=O.prototype.$type=this,u.merge(O,l,!0),this._ctor=O;for(var C=0;C<this.fieldsArray.length;++C)this._fieldsArray[C].resolve();var x={};for(C=0;C<this.oneofsArray.length;++C)x[this._oneofsArray[C].resolve().name]={get:u.oneOfGetter(this._oneofsArray[C].oneof),set:u.oneOfSetter(this._oneofsArray[C].oneof)};C&&Object.defineProperties(O.prototype,x)}}}),b.generateConstructor=function(_){for(var C=u.codegen(["p"],_.name),x=0,T;x<_.fieldsArray.length;++x)(T=_._fieldsArray[x]).map?C("this%s={}",u.safeProp(T.name)):T.repeated&&C("this%s=[]",u.safeProp(T.name));return C("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")};function w(O){return O._fieldsById=O._fieldsArray=O._oneofsArray=null,delete O.encode,delete O.decode,delete O.verify,O}return b.fromJSON=function(_,C){var x=new b(_,C.options);x.extensions=C.extensions,x.reserved=C.reserved;for(var T=Object.keys(C.fields),E=0;E<T.length;++E)x.add((typeof C.fields[T[E]].keyType<"u"?h.fromJSON:a.fromJSON)(T[E],C.fields[T[E]]));if(C.oneofs)for(T=Object.keys(C.oneofs),E=0;E<T.length;++E)x.add(i.fromJSON(T[E],C.oneofs[T[E]]));if(C.nested)for(T=Object.keys(C.nested),E=0;E<T.length;++E){var R=C.nested[T[E]];x.add((R.id!==void 0?a.fromJSON:R.fields!==void 0?b.fromJSON:R.values!==void 0?r.fromJSON:R.methods!==void 0?o.fromJSON:s.fromJSON)(T[E],R))}return C.extensions&&C.extensions.length&&(x.extensions=C.extensions),C.reserved&&C.reserved.length&&(x.reserved=C.reserved),C.group&&(x.group=!0),C.comment&&(x.comment=C.comment),x},b.prototype.toJSON=function(_){var C=s.prototype.toJSON.call(this,_),x=_?!!_.keepComments:!1;return u.toObject(["options",C&&C.options||void 0,"oneofs",s.arrayToJSON(this.oneofsArray,_),"fields",s.arrayToJSON(this.fieldsArray.filter(function(T){return!T.declaringField}),_)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",C&&C.nested||void 0,"comment",x?this.comment:void 0])},b.prototype.resolveAll=function(){for(var _=this.fieldsArray,C=0;C<_.length;)_[C++].resolve();var x=this.oneofsArray;for(C=0;C<x.length;)x[C++].resolve();return s.prototype.resolveAll.call(this)},b.prototype.get=function(_){return this.fields[_]||this.oneofs&&this.oneofs[_]||this.nested&&this.nested[_]||null},b.prototype.add=function(_){if(this.get(_.name))throw Error("duplicate name '"+_.name+"' in "+this);if(_ instanceof a&&_.extend===void 0){if(this._fieldsById?this._fieldsById[_.id]:this.fieldsById[_.id])throw Error("duplicate id "+_.id+" in "+this);if(this.isReservedId(_.id))throw Error("id "+_.id+" is reserved in "+this);if(this.isReservedName(_.name))throw Error("name '"+_.name+"' is reserved in "+this);return _.parent&&_.parent.remove(_),this.fields[_.name]=_,_.message=this,_.onAdd(this),w(this)}return _ instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[_.name]=_,_.onAdd(this),w(this)):s.prototype.add.call(this,_)},b.prototype.remove=function(_){if(_ instanceof a&&_.extend===void 0){if(!this.fields||this.fields[_.name]!==_)throw Error(_+" is not a member of "+this);return delete this.fields[_.name],_.parent=null,_.onRemove(this),w(this)}if(_ instanceof i){if(!this.oneofs||this.oneofs[_.name]!==_)throw Error(_+" is not a member of "+this);return delete this.oneofs[_.name],_.parent=null,_.onRemove(this),w(this)}return s.prototype.remove.call(this,_)},b.prototype.isReservedId=function(_){return s.isReservedId(this.reserved,_)},b.prototype.isReservedName=function(_){return s.isReservedName(this.reserved,_)},b.prototype.create=function(_){return new this.ctor(_)},b.prototype.setup=function(){for(var _=this.fullName,C=[],x=0;x<this.fieldsArray.length;++x)C.push(this._fieldsArray[x].resolve().resolvedType);this.encode=m(this)({Writer:d,types:C,util:u}),this.decode=y(this)({Reader:c,types:C,util:u}),this.verify=g(this)({types:C,util:u}),this.fromObject=p.fromObject(this)({types:C,util:u}),this.toObject=p.toObject(this)({types:C,util:u});var T=v[_];if(T){var E=Object.create(this);E.fromObject=this.fromObject,this.fromObject=T.fromObject.bind(E),E.toObject=this.toObject,this.toObject=T.toObject.bind(E)}return this},b.prototype.encode=function(_,C){return this.setup().encode(_,C)},b.prototype.encodeDelimited=function(_,C){return this.encode(_,C&&C.len?C.fork():C).ldelim()},b.prototype.decode=function(_,C){return this.setup().decode(_,C)},b.prototype.decodeDelimited=function(_){return _ instanceof c||(_=c.create(_)),this.decode(_,_.uint32())},b.prototype.verify=function(_){return this.setup().verify(_)},b.prototype.fromObject=function(_){return this.setup().fromObject(_)},b.prototype.toObject=function(_,C){return this.setup().toObject(_,C)},b.d=function(_){return function(x){u.decorateType(x,_)}},type}var root$1,hasRequiredRoot;function requireRoot(){if(hasRequiredRoot)return root$1;hasRequiredRoot=1,root$1=d;var s=requireNamespace();((d.prototype=Object.create(s.prototype)).constructor=d).className="Root";var r=requireField(),i=require_enum(),a=requireOneof(),h=requireUtil(),o,l,c;function d(g){s.call(this,"",g),this.deferred=[],this.files=[]}d.fromJSON=function(p,v){return v||(v=new d),p.options&&v.setOptions(p.options),v.addJSON(p.nested)},d.prototype.resolvePath=h.path.resolve,d.prototype.fetch=h.fetch;function u(){}d.prototype.load=function g(p,v,b){typeof v=="function"&&(b=v,v=void 0);var w=this;if(!b)return h.asPromise(g,w,p,v);var O=b===u;function _(k,A){if(b){if(O)throw k;var N=b;b=null,N(k,A)}}function C(k){var A=k.lastIndexOf("google/protobuf/");if(A>-1){var N=k.substring(A);if(N in c)return N}return null}function x(k,A){try{if(h.isString(A)&&A.charAt(0)==="{"&&(A=JSON.parse(A)),!h.isString(A))w.setOptions(A.options).addJSON(A.nested);else{l.filename=k;var N=l(A,w,v),B,q=0;if(N.imports)for(;q<N.imports.length;++q)(B=C(N.imports[q])||w.resolvePath(k,N.imports[q]))&&T(B);if(N.weakImports)for(q=0;q<N.weakImports.length;++q)(B=C(N.weakImports[q])||w.resolvePath(k,N.weakImports[q]))&&T(B,!0)}}catch(H){_(H)}!O&&!E&&_(null,w)}function T(k,A){if(k=C(k)||k,!(w.files.indexOf(k)>-1)){if(w.files.push(k),k in c){O?x(k,c[k]):(++E,setTimeout(function(){--E,x(k,c[k])}));return}if(O){var N;try{N=h.fs.readFileSync(k).toString("utf8")}catch(B){A||_(B);return}x(k,N)}else++E,w.fetch(k,function(B,q){if(--E,!!b){if(B){A?E||_(null,w):_(B);return}x(k,q)}})}}var E=0;h.isString(p)&&(p=[p]);for(var R=0,P;R<p.length;++R)(P=w.resolvePath("",p[R]))&&T(P);if(O)return w;E||_(null,w)},d.prototype.loadSync=function(p,v){if(!h.isNode)throw Error("not supported");return this.load(p,v,u)},d.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(p){return"'extend "+p.extend+"' in "+p.parent.fullName}).join(", "));return s.prototype.resolveAll.call(this)};var m=/^[A-Z]/;function y(g,p){var v=p.parent.lookup(p.extend);if(v){var b=new r(p.fullName,p.id,p.type,p.rule,void 0,p.options);return v.get(b.name)||(b.declaringField=p,p.extensionField=b,v.add(b)),!0}return!1}return d.prototype._handleAdd=function(p){if(p instanceof r)p.extend!==void 0&&!p.extensionField&&(y(this,p)||this.deferred.push(p));else if(p instanceof i)m.test(p.name)&&(p.parent[p.name]=p.values);else if(!(p instanceof a)){if(p instanceof o)for(var v=0;v<this.deferred.length;)y(this,this.deferred[v])?this.deferred.splice(v,1):++v;for(var b=0;b<p.nestedArray.length;++b)this._handleAdd(p._nestedArray[b]);m.test(p.name)&&(p.parent[p.name]=p)}},d.prototype._handleRemove=function(p){if(p instanceof r){if(p.extend!==void 0)if(p.extensionField)p.extensionField.parent.remove(p.extensionField),p.extensionField=null;else{var v=this.deferred.indexOf(p);v>-1&&this.deferred.splice(v,1)}}else if(p instanceof i)m.test(p.name)&&delete p.parent[p.name];else if(p instanceof s){for(var b=0;b<p.nestedArray.length;++b)this._handleRemove(p._nestedArray[b]);m.test(p.name)&&delete p.parent[p.name]}},d._configure=function(g,p,v){o=g,l=p,c=v},root$1}var hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util$2.exports;hasRequiredUtil=1;var s=util$2.exports=requireMinimal(),r=roots,i,a;s.codegen=codegen_1,s.fetch=fetch_1,s.path=path,s.fs=s.inquire("fs"),s.toArray=function(u){if(u){for(var m=Object.keys(u),y=new Array(m.length),g=0;g<m.length;)y[g]=u[m[g++]];return y}return[]},s.toObject=function(u){for(var m={},y=0;y<u.length;){var g=u[y++],p=u[y++];p!==void 0&&(m[g]=p)}return m};var h=/\\/g,o=/"/g;s.isReserved=function(u){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(u)},s.safeProp=function(u){return!/^[$\w_]+$/.test(u)||s.isReserved(u)?'["'+u.replace(h,"\\\\").replace(o,'\\"')+'"]':"."+u},s.ucFirst=function(u){return u.charAt(0).toUpperCase()+u.substring(1)};var l=/_([a-z])/g;s.camelCase=function(u){return u.substring(0,1)+u.substring(1).replace(l,function(m,y){return y.toUpperCase()})},s.compareFieldsById=function(u,m){return u.id-m.id},s.decorateType=function(u,m){if(u.$type)return m&&u.$type.name!==m&&(s.decorateRoot.remove(u.$type),u.$type.name=m,s.decorateRoot.add(u.$type)),u.$type;i||(i=requireType());var y=new i(m||u.name);return s.decorateRoot.add(y),y.ctor=u,Object.defineProperty(u,"$type",{value:y,enumerable:!1}),Object.defineProperty(u.prototype,"$type",{value:y,enumerable:!1}),y};var c=0;return s.decorateEnum=function(u){if(u.$type)return u.$type;a||(a=require_enum());var m=new a("Enum"+c++,u);return s.decorateRoot.add(m),Object.defineProperty(u,"$type",{value:m,enumerable:!1}),m},s.setProperty=function(u,m,y){function g(p,v,b){var w=v.shift();if(w==="__proto__"||w==="prototype")return p;if(v.length>0)p[w]=g(p[w]||{},v,b);else{var O=p[w];O&&(b=[].concat(O).concat(b)),p[w]=b}return p}if(typeof u!="object")throw TypeError("dst must be an object");if(!m)throw TypeError("path must be specified");return m=m.split("."),g(u,m,y)},Object.defineProperty(s,"decorateRoot",{get:function(){return r.decorated||(r.decorated=new(requireRoot()))}}),util$2.exports}var object,hasRequiredObject;function requireObject(){if(hasRequiredObject)return object;hasRequiredObject=1,object=i,i.className="ReflectionObject";var s=requireUtil(),r;function i(a,h){if(!s.isString(a))throw TypeError("name must be a string");if(h&&!s.isObject(h))throw TypeError("options must be an object");this.options=h,this.parsedOptions=null,this.name=a,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}return Object.defineProperties(i.prototype,{root:{get:function(){for(var a=this;a.parent!==null;)a=a.parent;return a}},fullName:{get:function(){for(var a=[this.name],h=this.parent;h;)a.unshift(h.name),h=h.parent;return a.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(h){this.parent&&this.parent!==h&&this.parent.remove(this),this.parent=h,this.resolved=!1;var o=h.root;o instanceof r&&o._handleAdd(this)},i.prototype.onRemove=function(h){var o=h.root;o instanceof r&&o._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved?this:(this.root instanceof r&&(this.resolved=!0),this)},i.prototype.getOption=function(h){if(this.options)return this.options[h]},i.prototype.setOption=function(h,o,l){return(!l||!this.options||this.options[h]===void 0)&&((this.options||(this.options={}))[h]=o),this},i.prototype.setParsedOption=function(h,o,l){this.parsedOptions||(this.parsedOptions=[]);var c=this.parsedOptions;if(l){var d=c.find(function(y){return Object.prototype.hasOwnProperty.call(y,h)});if(d){var u=d[h];s.setProperty(u,l,o)}else d={},d[h]=s.setProperty({},l,o),c.push(d)}else{var m={};m[h]=o,c.push(m)}return this},i.prototype.setOptions=function(h,o){if(h)for(var l=Object.keys(h),c=0;c<l.length;++c)this.setOption(l[c],h[l[c]],o);return this},i.prototype.toString=function(){var h=this.constructor.className,o=this.fullName;return o.length?h+" "+o:h},i._configure=function(a){r=a},object}var _enum,hasRequired_enum;function require_enum(){if(hasRequired_enum)return _enum;hasRequired_enum=1,_enum=a;var s=requireObject();((a.prototype=Object.create(s.prototype)).constructor=a).className="Enum";var r=requireNamespace(),i=requireUtil();function a(h,o,l,c,d,u){if(s.call(this,h,l),o&&typeof o!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=c,this.comments=d||{},this.valuesOptions=u,this.reserved=void 0,o)for(var m=Object.keys(o),y=0;y<m.length;++y)typeof o[m[y]]=="number"&&(this.valuesById[this.values[m[y]]=o[m[y]]]=m[y])}return a.fromJSON=function(o,l){var c=new a(o,l.values,l.options,l.comment,l.comments);return c.reserved=l.reserved,c},a.prototype.toJSON=function(o){var l=o?!!o.keepComments:!1;return i.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",l?this.comment:void 0,"comments",l?this.comments:void 0])},a.prototype.add=function(o,l,c,d){if(!i.isString(o))throw TypeError("name must be a string");if(!i.isInteger(l))throw TypeError("id must be an integer");if(this.values[o]!==void 0)throw Error("duplicate name '"+o+"' in "+this);if(this.isReservedId(l))throw Error("id "+l+" is reserved in "+this);if(this.isReservedName(o))throw Error("name '"+o+"' is reserved in "+this);if(this.valuesById[l]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+l+" in "+this);this.values[o]=l}else this.valuesById[this.values[o]=l]=o;return d&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[o]=d||null),this.comments[o]=c||null,this},a.prototype.remove=function(o){if(!i.isString(o))throw TypeError("name must be a string");var l=this.values[o];if(l==null)throw Error("name '"+o+"' does not exist in "+this);return delete this.valuesById[l],delete this.values[o],delete this.comments[o],this.valuesOptions&&delete this.valuesOptions[o],this},a.prototype.isReservedId=function(o){return r.isReservedId(this.reserved,o)},a.prototype.isReservedName=function(o){return r.isReservedName(this.reserved,o)},_enum}var encoder_1,hasRequiredEncoder;function requireEncoder(){if(hasRequiredEncoder)return encoder_1;hasRequiredEncoder=1,encoder_1=h;var s=require_enum(),r=requireTypes(),i=requireUtil();function a(o,l,c,d){return l.resolvedType.group?o("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",c,d,(l.id<<3|3)>>>0,(l.id<<3|4)>>>0):o("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",c,d,(l.id<<3|2)>>>0)}function h(o){for(var l=i.codegen(["m","w"],o.name+"$encode")("if(!w)")("w=Writer.create()"),c,d,u=o.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<u.length;++c){var m=u[c].resolve(),y=o._fieldsArray.indexOf(m),g=m.resolvedType instanceof s?"int32":m.type,p=r.basic[g];d="m"+i.safeProp(m.name),m.map?(l("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",d,m.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",d)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(m.id<<3|2)>>>0,8|r.mapKey[m.keyType],m.keyType),p===void 0?l("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",y,d):l(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|p,g,d),l("}")("}")):m.repeated?(l("if(%s!=null&&%s.length){",d,d),m.packed&&r.packed[g]!==void 0?l("w.uint32(%i).fork()",(m.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",d)("w.%s(%s[i])",g,d)("w.ldelim()"):(l("for(var i=0;i<%s.length;++i)",d),p===void 0?a(l,m,y,d+"[i]"):l("w.uint32(%i).%s(%s[i])",(m.id<<3|p)>>>0,g,d)),l("}")):(m.optional&&l("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",d,m.name),p===void 0?a(l,m,y,d):l("w.uint32(%i).%s(%s)",(m.id<<3|p)>>>0,g,d))}return l("return w")}return encoder_1}var protobuf$1=indexLight.exports=indexMinimal;protobuf$1.build="light";function load(s,r,i){return typeof r=="function"?(i=r,r=new protobuf$1.Root):r||(r=new protobuf$1.Root),r.load(s,i)}protobuf$1.load=load;function loadSync(s,r){return r||(r=new protobuf$1.Root),r.loadSync(s)}protobuf$1.loadSync=loadSync,protobuf$1.encoder=requireEncoder(),protobuf$1.decoder=requireDecoder(),protobuf$1.verifier=requireVerifier(),protobuf$1.converter=requireConverter(),protobuf$1.ReflectionObject=requireObject(),protobuf$1.Namespace=requireNamespace(),protobuf$1.Root=requireRoot(),protobuf$1.Enum=require_enum(),protobuf$1.Type=requireType(),protobuf$1.Field=requireField(),protobuf$1.OneOf=requireOneof(),protobuf$1.MapField=requireMapfield(),protobuf$1.Service=requireService(),protobuf$1.Method=requireMethod(),protobuf$1.Message=message,protobuf$1.wrappers=wrappers,protobuf$1.types=requireTypes(),protobuf$1.util=requireUtil(),protobuf$1.ReflectionObject._configure(protobuf$1.Root),protobuf$1.Namespace._configure(protobuf$1.Type,protobuf$1.Service,protobuf$1.Enum),protobuf$1.Root._configure(protobuf$1.Type),protobuf$1.Field._configure(protobuf$1.Type);var indexLightExports=indexLight.exports,tokenize_1=tokenize$1,delimRe=/[\s{}=;:[\],'"()<>]/g,stringDoubleRe=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,stringSingleRe=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,setCommentRe=/^ *[*/]+ */,setCommentAltRe=/^\s*\*?\/*/,setCommentSplitRe=/\n/g,whitespaceRe=/\s/,unescapeRe=/\\(.?)/g,unescapeMap={0:"\0",r:"\r",n:`
5
+ `,t:" "};function unescape(s){return s.replace(unescapeRe,function(r,i){switch(i){case"\\":case"":return i;default:return unescapeMap[i]||""}})}tokenize$1.unescape=unescape;function tokenize$1(s,r){s=s.toString();var i=0,a=s.length,h=1,o=0,l={},c=[],d=null;function u(x){return Error("illegal "+x+" (line "+h+")")}function m(){var x=d==="'"?stringSingleRe:stringDoubleRe;x.lastIndex=i-1;var T=x.exec(s);if(!T)throw u("string");return i=x.lastIndex,w(d),d=null,unescape(T[1])}function y(x){return s.charAt(x)}function g(x,T,E){var R={type:s.charAt(x++),lineEmpty:!1,leading:E},P;r?P=2:P=3;var k=x-P,A;do if(--k<0||(A=s.charAt(k))===`
6
+ `){R.lineEmpty=!0;break}while(A===" "||A===" ");for(var N=s.substring(x,T).split(setCommentSplitRe),B=0;B<N.length;++B)N[B]=N[B].replace(r?setCommentAltRe:setCommentRe,"").trim();R.text=N.join(`
7
+ `).trim(),l[h]=R,o=h}function p(x){var T=v(x),E=s.substring(x,T),R=/^\s*\/\//.test(E);return R}function v(x){for(var T=x;T<a&&y(T)!==`
8
+ `;)T++;return T}function b(){if(c.length>0)return c.shift();if(d)return m();var x,T,E,R,P,k=i===0;do{if(i===a)return null;for(x=!1;whitespaceRe.test(E=y(i));)if(E===`
9
+ `&&(k=!0,++h),++i===a)return null;if(y(i)==="/"){if(++i===a)throw u("comment");if(y(i)==="/")if(r){if(R=i,P=!1,p(i-1)){P=!0;do if(i=v(i),i===a||(i++,!k))break;while(p(i))}else i=Math.min(a,v(i)+1);P&&(g(R,i,k),k=!0),h++,x=!0}else{for(P=y(R=i+1)==="/";y(++i)!==`
10
+ `;)if(i===a)return null;++i,P&&(g(R,i-1,k),k=!0),++h,x=!0}else if((E=y(i))==="*"){R=i+1,P=r||y(R)==="*";do{if(E===`
11
+ `&&++h,++i===a)throw u("comment");T=E,E=y(i)}while(T!=="*"||E!=="/");++i,P&&(g(R,i-2,k),k=!0),x=!0}else return"/"}}while(x);var A=i;delimRe.lastIndex=0;var N=delimRe.test(y(A++));if(!N)for(;A<a&&!delimRe.test(y(A));)++A;var B=s.substring(i,i=A);return(B==='"'||B==="'")&&(d=B),B}function w(x){c.push(x)}function O(){if(!c.length){var x=b();if(x===null)return null;w(x)}return c[0]}function _(x,T){var E=O(),R=E===x;if(R)return b(),!0;if(!T)throw u("token '"+E+"', '"+x+"' expected");return!1}function C(x){var T=null,E;return x===void 0?(E=l[h-1],delete l[h-1],E&&(r||E.type==="*"||E.lineEmpty)&&(T=E.leading?E.text:null)):(o<x&&O(),E=l[x],delete l[x],E&&!E.lineEmpty&&(r||E.type==="/")&&(T=E.leading?null:E.text)),T}return Object.defineProperty({next:b,peek:O,push:w,skip:_,cmnt:C},"line",{get:function(){return h}})}var parse_1=parse;parse.filename=null,parse.defaults={keepCase:!1};var tokenize=tokenize_1,Root=requireRoot(),Type=requireType(),Field=requireField(),MapField=requireMapfield(),OneOf=requireOneof(),Enum=require_enum(),Service=requireService(),Method=requireMethod(),types=requireTypes(),util=requireUtil(),base10Re=/^[1-9][0-9]*$/,base10NegRe=/^-?[1-9][0-9]*$/,base16Re=/^0[x][0-9a-fA-F]+$/,base16NegRe=/^-?0[x][0-9a-fA-F]+$/,base8Re=/^0[0-7]+$/,base8NegRe=/^-?0[0-7]+$/,numberRe=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,nameRe=/^[a-zA-Z_][a-zA-Z_0-9]*$/,typeRefRe=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,fqTypeRefRe=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function parse(s,r,i){r instanceof Root||(i=r,r=new Root),i||(i=parse.defaults);var a=i.preferTrailingComment||!1,h=tokenize(s,i.alternateCommentMode||!1),o=h.next,l=h.push,c=h.peek,d=h.skip,u=h.cmnt,m=!0,y,g,p,v,b=!1,w=r,O=i.keepCase?function(S){return S}:util.camelCase;function _(S,D,I){var F=parse.filename;return I||(parse.filename=null),Error("illegal "+(D||"token")+" '"+S+"' ("+(F?F+", ":"")+"line "+h.line+")")}function C(){var S=[],D;do{if((D=o())!=='"'&&D!=="'")throw _(D);S.push(o()),d(D),D=c()}while(D==='"'||D==="'");return S.join("")}function x(){var S=o();switch(S){case"'":case'"':return l(S),C();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return E(S,!0)}catch{if(typeRefRe.test(S))return S;throw _(S,"value")}}function T(S,D){var I,F;do D&&((I=c())==='"'||I==="'")?S.push(C()):S.push([F=R(o()),d("to",!0)?R(o()):F]);while(d(",",!0));var M={options:void 0};M.setOption=function($,z){this.options===void 0&&(this.options={}),this.options[$]=z},B(M,function(z){if(z==="option")G(M,z),d(";");else throw _(z)},function(){te(M)})}function E(S,D){var I=1;switch(S.charAt(0)==="-"&&(I=-1,S=S.substring(1)),S){case"inf":case"INF":case"Inf":return I*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(base10Re.test(S))return I*parseInt(S,10);if(base16Re.test(S))return I*parseInt(S,16);if(base8Re.test(S))return I*parseInt(S,8);if(numberRe.test(S))return I*parseFloat(S);throw _(S,"number",D)}function R(S,D){switch(S){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!D&&S.charAt(0)==="-")throw _(S,"id");if(base10NegRe.test(S))return parseInt(S,10);if(base16NegRe.test(S))return parseInt(S,16);if(base8NegRe.test(S))return parseInt(S,8);throw _(S,"id")}function P(){if(y!==void 0)throw _("package");if(y=o(),!typeRefRe.test(y))throw _(y,"name");w=w.define(y),d(";")}function k(){var S=c(),D;switch(S){case"weak":D=p||(p=[]),o();break;case"public":o();default:D=g||(g=[]);break}S=C(),d(";"),D.push(S)}function A(){if(d("="),v=C(),b=v==="proto3",!b&&v!=="proto2")throw _(v,"syntax");r.setOption("syntax",v),d(";")}function N(S,D){switch(D){case"option":return G(S,D),d(";"),!0;case"message":return q(S,D),!0;case"enum":return U(S,D),!0;case"service":return se(S,D),!0;case"extend":return oe(S,D),!0}return!1}function B(S,D,I){var F=h.line;if(S&&(typeof S.comment!="string"&&(S.comment=u()),S.filename=parse.filename),d("{",!0)){for(var M;(M=o())!=="}";)D(M);d(";",!0)}else I&&I(),d(";"),S&&(typeof S.comment!="string"||a)&&(S.comment=u(F)||S.comment)}function q(S,D){if(!nameRe.test(D=o()))throw _(D,"type name");var I=new Type(D);B(I,function(M){if(!N(I,M))switch(M){case"map":X(I);break;case"required":case"repeated":H(I,M);break;case"optional":b?H(I,"proto3_optional"):H(I,"optional");break;case"oneof":J(I,M);break;case"extensions":T(I.extensions||(I.extensions=[]));break;case"reserved":T(I.reserved||(I.reserved=[]),!0);break;default:if(!b||!typeRefRe.test(M))throw _(M);l(M),H(I,"optional");break}}),S.add(I)}function H(S,D,I){var F=o();if(F==="group"){Z(S,D);return}for(;F.endsWith(".")||c().startsWith(".");)F+=o();if(!typeRefRe.test(F))throw _(F,"type");var M=o();if(!nameRe.test(M))throw _(M,"name");M=O(M),d("=");var $=new Field(M,R(o()),F,D,I);if(B($,function(W){if(W==="option")G($,W),d(";");else throw _(W)},function(){te($)}),D==="proto3_optional"){var z=new OneOf("_"+M);$.setOption("proto3_optional",!0),z.add($),S.add(z)}else S.add($);!b&&$.repeated&&(types.packed[F]!==void 0||types.basic[F]===void 0)&&$.setOption("packed",!1,!0)}function Z(S,D){var I=o();if(!nameRe.test(I))throw _(I,"name");var F=util.lcFirst(I);I===F&&(I=util.ucFirst(I)),d("=");var M=R(o()),$=new Type(I);$.group=!0;var z=new Field(F,M,I,D);z.filename=parse.filename,B($,function(W){switch(W){case"option":G($,W),d(";");break;case"required":case"repeated":H($,W);break;case"optional":b?H($,"proto3_optional"):H($,"optional");break;case"message":q($,W);break;case"enum":U($,W);break;default:throw _(W)}}),S.add($).add(z)}function X(S){d("<");var D=o();if(types.mapKey[D]===void 0)throw _(D,"type");d(",");var I=o();if(!typeRefRe.test(I))throw _(I,"type");d(">");var F=o();if(!nameRe.test(F))throw _(F,"name");d("=");var M=new MapField(O(F),R(o()),D,I);B(M,function(z){if(z==="option")G(M,z),d(";");else throw _(z)},function(){te(M)}),S.add(M)}function J(S,D){if(!nameRe.test(D=o()))throw _(D,"name");var I=new OneOf(O(D));B(I,function(M){M==="option"?(G(I,M),d(";")):(l(M),H(I,"optional"))}),S.add(I)}function U(S,D){if(!nameRe.test(D=o()))throw _(D,"name");var I=new Enum(D);B(I,function(M){switch(M){case"option":G(I,M),d(";");break;case"reserved":T(I.reserved||(I.reserved=[]),!0);break;default:K(I,M)}}),S.add(I)}function K(S,D){if(!nameRe.test(D))throw _(D,"name");d("=");var I=R(o(),!0),F={options:void 0};F.setOption=function(M,$){this.options===void 0&&(this.options={}),this.options[M]=$},B(F,function($){if($==="option")G(F,$),d(";");else throw _($)},function(){te(F)}),S.add(D,I,F.comment,F.options)}function G(S,D){var I=d("(",!0);if(!typeRefRe.test(D=o()))throw _(D,"name");var F=D,M=F,$;I&&(d(")"),F="("+F+")",M=F,D=c(),fqTypeRefRe.test(D)&&($=D.slice(1),F+=D,o())),d("=");var z=ie(S,F);ee(S,M,z,$)}function ie(S,D){if(d("{",!0)){for(var I={};!d("}",!0);){if(!nameRe.test(V=o()))throw _(V,"name");if(V===null)throw _(V,"end of input");var F,M=V;if(d(":",!0),c()==="{")F=ie(S,D+"."+V);else if(c()==="["){F=[];var $;if(d("[",!0)){do $=x(),F.push($);while(d(",",!0));d("]"),typeof $<"u"&&Q(S,D+"."+V,$)}}else F=x(),Q(S,D+"."+V,F);var z=I[M];z&&(F=[].concat(z).concat(F)),I[M]=F,d(",",!0),d(";",!0)}return I}var Y=x();return Q(S,D,Y),Y}function Q(S,D,I){S.setOption&&S.setOption(D,I)}function ee(S,D,I,F){S.setParsedOption&&S.setParsedOption(D,I,F)}function te(S){if(d("[",!0)){do G(S,"option");while(d(",",!0));d("]")}return S}function se(S,D){if(!nameRe.test(D=o()))throw _(D,"service name");var I=new Service(D);B(I,function(M){if(!N(I,M))if(M==="rpc")ae(I,M);else throw _(M)}),S.add(I)}function ae(S,D){var I=u(),F=D;if(!nameRe.test(D=o()))throw _(D,"name");var M=D,$,z,Y,W;if(d("("),d("stream",!0)&&(z=!0),!typeRefRe.test(D=o())||($=D,d(")"),d("returns"),d("("),d("stream",!0)&&(W=!0),!typeRefRe.test(D=o())))throw _(D);Y=D,d(")");var re=new Method(M,F,$,Y,z,W);re.comment=I,B(re,function(ne){if(ne==="option")G(re,ne),d(";");else throw _(ne)}),S.add(re)}function oe(S,D){if(!typeRefRe.test(D=o()))throw _(D,"reference");var I=D;B(null,function(M){switch(M){case"required":case"repeated":H(S,M,I);break;case"optional":b?H(S,"proto3_optional",I):H(S,"optional",I);break;default:if(!b||!typeRefRe.test(M))throw _(M);l(M),H(S,"optional",I);break}})}for(var V;(V=o())!==null;)switch(V){case"package":if(!m)throw _(V);P();break;case"import":if(!m)throw _(V);k();break;case"syntax":if(!m)throw _(V);A();break;case"option":G(w,V),d(";");break;default:if(N(w,V)){m=!1;continue}throw _(V)}return parse.filename=null,{package:y,imports:g,weakImports:p,syntax:v,root:r}}var common_1=common,commonRe=/\/|\./;function common(s,r){commonRe.test(s)||(s="google/protobuf/"+s+".proto",r={nested:{google:{nested:{protobuf:{nested:r}}}}}),common[s]=r}common("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var timeType;common("duration",{Duration:timeType={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),common("timestamp",{Timestamp:timeType}),common("empty",{Empty:{fields:{}}}),common("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),common("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),common("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),common.get=function s(r){return common[r]||null};var protobuf=src.exports=indexLightExports;protobuf.build="full",protobuf.tokenize=tokenize_1,protobuf.parse=parse_1,protobuf.common=common_1,protobuf.Root._configure(protobuf.Type,protobuf.parse,protobuf.common);var srcExports=src.exports,protobufjs=srcExports;function loadProto(s){return protobufjs.parse(s)}loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;} ;message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Interate = 5;optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32 FontNameIndex=13 [default =0];optional int32 FontSize=14 [default =18];optional uint32 FontColor=15 [default =0];};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};").root.lookup("GEOPOI.PBPOITile"),loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;};enum enumZCoordType {eCloseGround = 0;eCloseSeaSurface = 1;eRelativelyGround = 2;eAbsolute = 3;};message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Interate = 5;optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32 FontNameIndex=13 [default =0];optional int32 FontSize=14 [default =18];optional uint32 FontColor=15 [default =0];optional enumZCoordType ZCoordType = 16 [default = eAbsolute];};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};").root.lookup("GEOPOI.PBPOITile"),loadProto("option optimize_for = LITE_RUNTIME;package GEOPOI;enum enumGeometryType {ePoint = 0;eMultiLineString = 1;ePolygon = 2;};enum enumZCoordType {eCloseGround = 0;eCloseSeaSurface = 1;eRelativelyGround = 2;eAbsolute = 3;};message PBPOI{required uint64 OID = 1;required string Name =2;repeated double Coordinates =3 [packed=true];required enumGeometryType GeometryType = 4;optional int32 Priority = 5;repeated int32 Interates =6 [packed=true];optional int32 SymbolID = 10 [default = 0];optional double DisplayHeight = 11 [default = 32];optional uint32 ShiningColor=12 [default =0];optional uint32 FontNameIndex=13 [default =0];optional int32 FontSize=14 [default =18];optional uint32 FontColor=15 [default =0];optional enumZCoordType ZCoordType = 16 [default = eAbsolute];optional int32 FontStyle=17;optional int32 ShiningSize=18;};message StringTable {repeated string s = 1;}message PBPOITile{required int64 Version = 1;required int64 TileKey = 2;required StringTable StringTable = 3;repeated PBPOI POIS = 4;};").root.lookup("GEOPOI.PBPOITile"),Cesium.Color.WHITE,Cesium.Color.BLACK,Cesium.LabelStyle.FILL_AND_OUTLINE,Cesium.Color.RED,new Cesium.Cartesian2(10,10),Cesium.HorizontalOrigin.CENTER,Cesium.VerticalOrigin.TOP,Cesium.Cartesian3.ZERO,new Cesium.Cartesian2(0,8),Cesium.HorizontalOrigin.CENTER,Cesium.VerticalOrigin.CENTER,Cesium.Cartesian3.ZERO,Cesium.Cartesian2.ZERO,Cesium.Cartesian3.ZERO,Cesium.Color.WHITE;var index={GeoTerrainProvider};function invertToCanvas(s){var c;const r=s.width,i=s.height,a=document.createElement("canvas");a.width=r,a.height=i;const h=a.getContext("2d");h.translate(0,i),h.scale(1,-1),h.drawImage(s,0,0);const o=h.getImageData(0,0,r,i),l=o.data;for(let d=0;d<l.length;d+=4)l[d]=255-l[d],l[d+1]=255-l[d+1],l[d+2]=255-l[d+2];return h.putImageData(o,0,0),"close"in s&&((c=s.close)==null||c.call(s)),a}class CustomWebMapTileServiceImageryProvider extends Cesium__namespace.WebMapTileServiceImageryProvider{constructor(r){super(r),this.options=r}requestImage(r,i,a,h){this.options.subdomains&&h&&h.url&&(h.url=h.url.replace("{s}",this.pickSubdomain(r,i,a,this.options.subdomains)));const o=super.requestImage(r,i,a,h);return o&&o.then(l=>{var c,d;return((d=(c=this.options).requestInterceptor)==null?void 0:d.call(c,l))??l})}pickSubdomain(r,i,a,h){const o=Math.abs(r*73856093^i*19349663^a*83492791)%h.length;return h[o]}}function createTdtProvider(s,r){const{token:i,...a}=r;return new CustomWebMapTileServiceImageryProvider({url:`https://t{s}.tianditu.gov.cn/${s}_w/wmts?tk=${i}`,subdomains:["0","1","2","3","4","5","6","7"],layer:s,style:"default",format:"tiles",tileMatrixSetID:"w",maximumLevel:18,credit:new Cesium__namespace.Credit("TianDiTu"),...a})}function createTdtTerrain(s){const r=["0","1","2","3","4","5","6","7"];return new index.GeoTerrainProvider({url:"https://t{s}.tianditu.gov.cn/mapservice/swdx?T=elv_c&x={x}&y={y}&l={z}&tk={token}",subdomains:r,token:s.token})}var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root.Symbol,objectProto$8=Object.prototype,hasOwnProperty$6=objectProto$8.hasOwnProperty,nativeObjectToString$1=objectProto$8.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(s){var r=hasOwnProperty$6.call(s,symToStringTag$1),i=s[symToStringTag$1];try{s[symToStringTag$1]=void 0;var a=!0}catch{}var h=nativeObjectToString$1.call(s);return a&&(r?s[symToStringTag$1]=i:delete s[symToStringTag$1]),h}var objectProto$7=Object.prototype,nativeObjectToString=objectProto$7.toString;function objectToString(s){return nativeObjectToString.call(s)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(s){return s==null?s===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(s)?getRawTag(s):objectToString(s)}function isObjectLike(s){return s!=null&&typeof s=="object"}var symbolTag="[object Symbol]";function isSymbol(s){return typeof s=="symbol"||isObjectLike(s)&&baseGetTag(s)==symbolTag}var isArray=Array.isArray,reWhitespace=/\s/;function trimmedEndIndex(s){for(var r=s.length;r--&&reWhitespace.test(s.charAt(r)););return r}var reTrimStart=/^\s+/;function baseTrim(s){return s&&s.slice(0,trimmedEndIndex(s)+1).replace(reTrimStart,"")}function isObject(s){var r=typeof s;return s!=null&&(r=="object"||r=="function")}var NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber(s){if(typeof s=="number")return s;if(isSymbol(s))return NAN;if(isObject(s)){var r=typeof s.valueOf=="function"?s.valueOf():s;s=isObject(r)?r+"":r}if(typeof s!="string")return s===0?s:+s;s=baseTrim(s);var i=reIsBinary.test(s);return i||reIsOctal.test(s)?freeParseInt(s.slice(2),i?2:8):reIsBadHex.test(s)?NAN:+s}function identity(s){return s}var asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(s){if(!isObject(s))return!1;var r=baseGetTag(s);return r==funcTag$1||r==genTag||r==asyncTag||r==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var s=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}();function isMasked(s){return!!maskSrcKey&&maskSrcKey in s}var funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource(s){if(s!=null){try{return funcToString$1.call(s)}catch{}try{return s+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$6=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$5=objectProto$6.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$5).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(s){if(!isObject(s)||isMasked(s))return!1;var r=isFunction(s)?reIsNative:reIsHostCtor;return r.test(toSource(s))}function getValue(s,r){return s==null?void 0:s[r]}function getNative(s,r){var i=getValue(s,r);return baseIsNative(i)?i:void 0}function apply(s,r,i){switch(i.length){case 0:return s.call(r);case 1:return s.call(r,i[0]);case 2:return s.call(r,i[0],i[1]);case 3:return s.call(r,i[0],i[1],i[2])}return s.apply(r,i)}var HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut(s){var r=0,i=0;return function(){var a=nativeNow(),h=HOT_SPAN-(a-i);if(i=a,h>0){if(++r>=HOT_COUNT)return arguments[0]}else r=0;return s.apply(void 0,arguments)}}function constant(s){return function(){return s}}var defineProperty=function(){try{var s=getNative(Object,"defineProperty");return s({},"",{}),s}catch{}}(),baseSetToString=defineProperty?function(s,r){return defineProperty(s,"toString",{configurable:!0,enumerable:!1,value:constant(r),writable:!0})}:identity,setToString=shortOut(baseSetToString),MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(s,r){var i=typeof s;return r=r??MAX_SAFE_INTEGER$1,!!r&&(i=="number"||i!="symbol"&&reIsUint.test(s))&&s>-1&&s%1==0&&s<r}function eq(s,r){return s===r||s!==s&&r!==r}var nativeMax$1=Math.max;function overRest(s,r,i){return r=nativeMax$1(r===void 0?s.length-1:r,0),function(){for(var a=arguments,h=-1,o=nativeMax$1(a.length-r,0),l=Array(o);++h<o;)l[h]=a[r+h];h=-1;for(var c=Array(r+1);++h<r;)c[h]=a[h];return c[r]=i(l),apply(s,this,c)}}function baseRest(s,r){return setToString(overRest(s,r,identity),s+"")}var MAX_SAFE_INTEGER=9007199254740991;function isLength(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=MAX_SAFE_INTEGER}function isArrayLike(s){return s!=null&&isLength(s.length)&&!isFunction(s)}function isIterateeCall(s,r,i){if(!isObject(i))return!1;var a=typeof r;return(a=="number"?isArrayLike(i)&&isIndex(r,i.length):a=="string"&&r in i)?eq(i[r],s):!1}var objectProto$5=Object.prototype;function isPrototype(s){var r=s&&s.constructor,i=typeof r=="function"&&r.prototype||objectProto$5;return s===i}function baseTimes(s,r){for(var i=-1,a=Array(s);++i<s;)a[i]=r(i);return a}var argsTag$1="[object Arguments]";function baseIsArguments(s){return isObjectLike(s)&&baseGetTag(s)==argsTag$1}var objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty,propertyIsEnumerable=objectProto$4.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(s){return isObjectLike(s)&&hasOwnProperty$4.call(s,"callee")&&!propertyIsEnumerable.call(s,"callee")};function stubFalse(){return!1}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,Buffer=moduleExports$1?root.Buffer:void 0,nativeIsBuffer=Buffer?Buffer.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;function baseIsTypedArray(s){return isObjectLike(s)&&isLength(s.length)&&!!typedArrayTags[baseGetTag(s)]}function baseUnary(s){return function(r){return s(r)}}var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,freeProcess=moduleExports&&freeGlobal.process,nodeUtil=function(){try{var s=freeModule&&freeModule.require&&freeModule.require("util").types;return s||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;function arrayLikeKeys(s,r){var i=isArray(s),a=!i&&isArguments(s),h=!i&&!a&&isBuffer(s),o=!i&&!a&&!h&&isTypedArray(s),l=i||a||h||o,c=l?baseTimes(s.length,String):[],d=c.length;for(var u in s)l&&(u=="length"||h&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||isIndex(u,d))||c.push(u);return c}function nativeKeysIn(s){var r=[];if(s!=null)for(var i in Object(s))r.push(i);return r}var objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty;function baseKeysIn(s){if(!isObject(s))return nativeKeysIn(s);var r=isPrototype(s),i=[];for(var a in s)a=="constructor"&&(r||!hasOwnProperty$3.call(s,a))||i.push(a);return i}function keysIn(s){return isArrayLike(s)?arrayLikeKeys(s):baseKeysIn(s)}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(s){var r=this.has(s)&&delete this.__data__[s];return this.size-=r?1:0,r}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty;function hashGet(s){var r=this.__data__;if(nativeCreate){var i=r[s];return i===HASH_UNDEFINED$1?void 0:i}return hasOwnProperty$2.call(r,s)?r[s]:void 0}var objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashHas(s){var r=this.__data__;return nativeCreate?r[s]!==void 0:hasOwnProperty$1.call(r,s)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(s,r){var i=this.__data__;return this.size+=this.has(s)?0:1,i[s]=nativeCreate&&r===void 0?HASH_UNDEFINED:r,this}function Hash(s){var r=-1,i=s==null?0:s.length;for(this.clear();++r<i;){var a=s[r];this.set(a[0],a[1])}}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;function listCacheClear(){this.__data__=[],this.size=0}function assocIndexOf(s,r){for(var i=s.length;i--;)if(eq(s[i][0],r))return i;return-1}var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(s){var r=this.__data__,i=assocIndexOf(r,s);if(i<0)return!1;var a=r.length-1;return i==a?r.pop():splice.call(r,i,1),--this.size,!0}function listCacheGet(s){var r=this.__data__,i=assocIndexOf(r,s);return i<0?void 0:r[i][1]}function listCacheHas(s){return assocIndexOf(this.__data__,s)>-1}function listCacheSet(s,r){var i=this.__data__,a=assocIndexOf(i,s);return a<0?(++this.size,i.push([s,r])):i[a][1]=r,this}function ListCache(s){var r=-1,i=s==null?0:s.length;for(this.clear();++r<i;){var a=s[r];this.set(a[0],a[1])}}ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map$1=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(s){var r=typeof s;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?s!=="__proto__":s===null}function getMapData(s,r){var i=s.__data__;return isKeyable(r)?i[typeof r=="string"?"string":"hash"]:i.map}function mapCacheDelete(s){var r=getMapData(this,s).delete(s);return this.size-=r?1:0,r}function mapCacheGet(s){return getMapData(this,s).get(s)}function mapCacheHas(s){return getMapData(this,s).has(s)}function mapCacheSet(s,r){var i=getMapData(this,s),a=i.size;return i.set(s,r),this.size+=i.size==a?0:1,this}function MapCache(s){var r=-1,i=s==null?0:s.length;for(this.clear();++r<i;){var a=s[r];this.set(a[0],a[1])}}MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT$1="Expected a function";function memoize(s,r){if(typeof s!="function"||r!=null&&typeof r!="function")throw new TypeError(FUNC_ERROR_TEXT$1);var i=function(){var a=arguments,h=r?r.apply(this,a):a[0],o=i.cache;if(o.has(h))return o.get(h);var l=s.apply(this,a);return i.cache=o.set(h,l)||o,l};return i.cache=new(memoize.Cache||MapCache),i}memoize.Cache=MapCache;var now=function(){return root.Date.now()},FUNC_ERROR_TEXT="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce(s,r,i){var a,h,o,l,c,d,u=0,m=!1,y=!1,g=!0;if(typeof s!="function")throw new TypeError(FUNC_ERROR_TEXT);r=toNumber(r)||0,isObject(i)&&(m=!!i.leading,y="maxWait"in i,o=y?nativeMax(toNumber(i.maxWait)||0,r):o,g="trailing"in i?!!i.trailing:g);function p(E){var R=a,P=h;return a=h=void 0,u=E,l=s.apply(P,R),l}function v(E){return u=E,c=setTimeout(O,r),m?p(E):l}function b(E){var R=E-d,P=E-u,k=r-R;return y?nativeMin(k,o-P):k}function w(E){var R=E-d,P=E-u;return d===void 0||R>=r||R<0||y&&P>=o}function O(){var E=now();if(w(E))return _(E);c=setTimeout(O,b(E))}function _(E){return c=void 0,g&&a?p(E):(a=h=void 0,l)}function C(){c!==void 0&&clearTimeout(c),u=0,a=d=h=c=void 0}function x(){return c===void 0?l:_(now())}function T(){var E=now(),R=w(E);if(a=arguments,h=this,d=E,R){if(c===void 0)return v(d);if(y)return clearTimeout(c),c=setTimeout(O,r),p(d)}return c===void 0&&(c=setTimeout(O,r)),l}return T.cancel=C,T.flush=x,T}var objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,defaults=baseRest(function(s,r){s=Object(s);var i=-1,a=r.length,h=a>2?r[2]:void 0;for(h&&isIterateeCall(r[0],r[1],h)&&(a=1);++i<a;)for(var o=r[i],l=keysIn(o),c=-1,d=l.length;++c<d;){var u=l[c],m=s[u];(m===void 0||eq(m,objectProto[u])&&!hasOwnProperty.call(s,u))&&(s[u]=o[u])}return s});function getDefaultExportFromCjs(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var eventemitter3={exports:{}},hasRequiredEventemitter3;function requireEventemitter3(){return hasRequiredEventemitter3||(hasRequiredEventemitter3=1,function(s){var r=Object.prototype.hasOwnProperty,i="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(i=!1));function h(d,u,m){this.fn=d,this.context=u,this.once=m||!1}function o(d,u,m,y,g){if(typeof m!="function")throw new TypeError("The listener must be a function");var p=new h(m,y||d,g),v=i?i+u:u;return d._events[v]?d._events[v].fn?d._events[v]=[d._events[v],p]:d._events[v].push(p):(d._events[v]=p,d._eventsCount++),d}function l(d,u){--d._eventsCount===0?d._events=new a:delete d._events[u]}function c(){this._events=new a,this._eventsCount=0}c.prototype.eventNames=function(){var u=[],m,y;if(this._eventsCount===0)return u;for(y in m=this._events)r.call(m,y)&&u.push(i?y.slice(1):y);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(m)):u},c.prototype.listeners=function(u){var m=i?i+u:u,y=this._events[m];if(!y)return[];if(y.fn)return[y.fn];for(var g=0,p=y.length,v=new Array(p);g<p;g++)v[g]=y[g].fn;return v},c.prototype.listenerCount=function(u){var m=i?i+u:u,y=this._events[m];return y?y.fn?1:y.length:0},c.prototype.emit=function(u,m,y,g,p,v){var b=i?i+u:u;if(!this._events[b])return!1;var w=this._events[b],O=arguments.length,_,C;if(w.fn){switch(w.once&&this.removeListener(u,w.fn,void 0,!0),O){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,m),!0;case 3:return w.fn.call(w.context,m,y),!0;case 4:return w.fn.call(w.context,m,y,g),!0;case 5:return w.fn.call(w.context,m,y,g,p),!0;case 6:return w.fn.call(w.context,m,y,g,p,v),!0}for(C=1,_=new Array(O-1);C<O;C++)_[C-1]=arguments[C];w.fn.apply(w.context,_)}else{var x=w.length,T;for(C=0;C<x;C++)switch(w[C].once&&this.removeListener(u,w[C].fn,void 0,!0),O){case 1:w[C].fn.call(w[C].context);break;case 2:w[C].fn.call(w[C].context,m);break;case 3:w[C].fn.call(w[C].context,m,y);break;case 4:w[C].fn.call(w[C].context,m,y,g);break;default:if(!_)for(T=1,_=new Array(O-1);T<O;T++)_[T-1]=arguments[T];w[C].fn.apply(w[C].context,_)}}return!0},c.prototype.on=function(u,m,y){return o(this,u,m,y,!1)},c.prototype.once=function(u,m,y){return o(this,u,m,y,!0)},c.prototype.removeListener=function(u,m,y,g){var p=i?i+u:u;if(!this._events[p])return this;if(!m)return l(this,p),this;var v=this._events[p];if(v.fn)v.fn===m&&(!g||v.once)&&(!y||v.context===y)&&l(this,p);else{for(var b=0,w=[],O=v.length;b<O;b++)(v[b].fn!==m||g&&!v[b].once||y&&v[b].context!==y)&&w.push(v[b]);w.length?this._events[p]=w.length===1?w[0]:w:l(this,p)}return this},c.prototype.removeAllListeners=function(u){var m;return u?(m=i?i+u:u,this._events[m]&&l(this,m)):(this._events=new a,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=i,c.EventEmitter=c,s.exports=c}(eventemitter3)),eventemitter3.exports}var eventemitter3Exports=requireEventemitter3();const EventEmitter=getDefaultExportFromCjs(eventemitter3Exports);class WmsLayer{constructor(r,i,a,h=1/0){this.ctrl=r,this.key=i,this.layer=a,this.zIndex=h,this.ctrl.registerLayer(this)}show(r){this.ctrl.showLayer(r,this.key)}hide(r){this.ctrl.hideLayer(r,this.key)}}class WmsLayerController extends EventEmitter{constructor(i){super();L(this,"layerMap",new Map);L(this,"showLayers",Array());L(this,"imgLayer");L(this,"update",debounce(i=>{if(this.imgLayer&&i.imageryLayers.remove(this.imgLayer,!0),this.showLayers.length===0){this.imgLayer=void 0,this.destroyHandler();return}this.handler||this.hookClickEvent(i),this.imgLayer=new Cesium.ImageryLayer(new Cesium.WebMapServiceImageryProvider({...this.args,layers:this.showLayers.map(a=>this.layerMap.get(a).layer).join(",")})),this.imgLayer.show=!0,i.imageryLayers.add(this.imgLayer)},200));L(this,"handler");this.args=i,this.args.parameters=defaults(this.args.parameters,{service:"WMS",version:"1.1.1",request:"GetMap",format:"image/png",transparent:!0,maximumLevel:18,minimumLevel:3,width:256,height:256})}registerLayer(i){if(this.layerMap.has(i.key))throw new Error(`Layer with key 【${i.key}】 is already registered`);this.layerMap.set(i.key,i)}showLayer(i,a){if(!this.layerMap.has(a))throw new Error(`Layer with key 【${a}】 is not registered`);this.showLayers.push(a),this.showLayers.sort((h,o)=>{const l=this.layerMap.get(h).zIndex,c=this.layerMap.get(o).zIndex;return l-c}),this.update(i)}hideLayer(i,a){const h=this.showLayers.indexOf(a);h!==-1&&(this.showLayers.splice(h,1),this.update(i))}hookClickEvent(i){this.handler=new Cesium.ScreenSpaceEventHandler(i.scene.canvas),this.handler.setInputAction(async a=>{const h=i.scene,o=h.camera.getPickRay(a.position),l=await h.imageryLayers.pickImageryLayerFeatures(o,i.scene);this.emit("click",l)},Cesium.ScreenSpaceEventType.LEFT_CLICK)}destroyHandler(){this.handler&&(this.handler.destroy(),this.handler=void 0)}}const createShipIconUrl=memoize((s,r)=>{const i=`<?xml version="1.0" encoding="UTF-8"?>
12
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 50 300">
13
+ <defs>
14
+ <style>
15
+ #svg_1,
16
+ #img_1 {
17
+ display: ${r?"block":"none"};
18
+ }
19
+
20
+ .cls-1 {
21
+ fill: ${s};
22
+ stroke: #000;
23
+ }
24
+
25
+ .cls-1,
26
+ .cls-2 {
27
+ stroke-width: 5px;
28
+ }
29
+
30
+ .cls-2 {
31
+ fill: #efe9e6;
32
+ stroke: #050200;
33
+ }
34
+ </style>
35
+ </defs>
36
+ <g>
37
+ <path id="svg_1" data-name="svg 1" class="cls-2" d="M26.12,114.78v70.9"/>
38
+ <path id="svg_4" data-name="svg 4" class="cls-1" d="M 26 139 L 47 211 H 3 Z"/>
39
+ </g>
40
+ <image id="img_1" width="124" height="146" transform="translate(-.23 214.17) scale(.42 .77)" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHwAAACSCAMAAACwjl5+AAAAq1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Nr6iZAAAAOXRSTlMABRshFgkSZg5qJmFdWlEqOXBFPYVJQYB1VXtNLpc1mzKguZCKtJONxc69yaukwa/SqN/k1trs6fBhRQqRAAAVcElEQVR42rSX3ZKaQBCFgxoIICh/ggjiIMPPMAOy6yZ5/yfLaTBVSa5istu1Vepe+M3p7jkHPz1Vmqav99umYLxsh7bvO6oeb8ZR1XUS7TaftU8fVdqX9cWpGBt5WeJvKbwbOJvyujEPlv5RcLBXZyesc1lyMSk5qWmS0zQxNQrGVF2Fpv9hdOg+2HFzZZwPQjFWFAxV4FUNJd5VcWr4u4+hgx0YcVgVchRtOSmW50wpVoA+lS0vWB6mifkxdE2H7jSOazaVfYtJo91yHKVSUmLq/Yihp2Zi09a9N1rb7Hxi07oN/dAOgnMwB4F9E3jtW1Y1oWea2yhbve/Oa583WWR4SRLnGHAPVkd3bblpA70XvcjDKjVs24ku70rX9NU5OgIeV9ect0L03a3rbve3l5e3+6273Vp0opVVmnrG1jkFl9UX7R3HfY5c2zCTOLxKNHzobzdCv3779voK/ls3tOi+ihPPcI5uFGRrXdPeZ8t16+y7zpbgVcHFWLb9fUZ/RX0D/e2txew5zxPTcNzIP+xBR+vfgb2x9oeTe3Rs04sLXuKmDWg5sb+jFnqH9ZejrL3t1o0Oh+CcrWG1/4v//GW1OwfR6XRybC+5SrBLPnTd/YXYC/3l7XYfJB+VVA3aHgX7/fli/TddA3ud7Q++758cI6kUVwo3rOu7t9/ht46rETe/iA3Az5cs261X+hfQ/4Otb9a7bB/sA9+1zbCYGIOx4FID/voV9AWOje8GxSaY3jW1XYzcsnbWf9E1DfNeW1l2yc6B75hxDjNVk6Q4Rdtp3x4zv3dt23Oy+bquUvsUZNYa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"/>
41
+ </svg>`;return URL.createObjectURL(new Blob([i],{type:"image/svg+xml"}))},(s,r)=>`${s},${r}`),createShipIconV2=memoize(s=>{const r=s.designBeam,i=s.designLength,a=s.aisFromBow!=null&&s.aisFromCenter!=null?{x:s.aisFromCenter,y:s.designLength-s.aisFromBow}:{x:0,y:i/2},h=`${r/2+a.x} ${a.y}`,o=`${-r/2+a.x} ${a.y}`,l=`${a.x} ${a.y}`,c=`${a.x} ${-i+a.y}`,d=Math.floor(i*4/5),u=Math.floor((i-d)*2/3),m=`M${l}
42
+ C${h} ${h} ${r/2+a.x} ${a.y-3}
43
+ V${-d+a.y}
44
+ C${r/2+a.x} ${a.y-d-u} ${2+a.x} ${-i+a.y} ${c}
45
+ C${-2+a.x} ${-i+a.y} ${-r/2+a.x} ${a.y-d-u} ${-r/2+a.x} ${-d+a.y}
46
+ V${-3+a.y}
47
+ C${o} ${o} ${l}`,y=Math.max(Math.abs(r/2+a.x),Math.abs(-r/2+a.x)),g=Math.max(Math.abs(-i+a.y+(s.isMoving?-5:0)),Math.abs(a.y+(s.isMoving?146/124*r:0))),p=[-y*1.2,-g,2*y*1.2,2*g],v={x:2*1.2*y/r,y:2*g/i},b=`<?xml version="1.0" encoding="UTF-8"?>
48
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="${p.join(" ")}">
49
+ <defs>
50
+ <style>
51
+ #svg_1,
52
+ #img_1 {
53
+ display: ${s.isMoving?"block":"none"};
54
+ }
55
+
56
+ .cls-1 {
57
+ fill: ${s.color};
58
+ stroke: #000;
59
+ }
60
+
61
+ .cls-1,
62
+ .cls-2 {
63
+ stroke-width: 1px;
64
+ }
65
+
66
+ .cls-2 {
67
+ fill: #efe9e6;
68
+ stroke: #050200;
69
+ }
70
+ </style>
71
+ </defs>
72
+ <g>
73
+ <path id="svg_1" data-name="svg 1" class="cls-2" d="M${c}v-5"/>
74
+ <path id="svg_4" data-name="svg 4" class="cls-1" d="${m}"/>
75
+ </g>
76
+ <image id="img_1" width="${r}" height="${146/124*r}" transform="translate(${-r/2+a.x} ${a.y})" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHwAAACSCAMAAACwjl5+AAAAq1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Nr6iZAAAAOXRSTlMABRshFgkSZg5qJmFdWlEqOXBFPYVJQYB1VXtNLpc1mzKguZCKtJONxc69yaukwa/SqN/k1trs6fBhRQqRAAAVcElEQVR42rSX3ZKaQBCFgxoIICh/ggjiIMPPMAOy6yZ5/yfLaTBVSa5istu1Vepe+M3p7jkHPz1Vmqav99umYLxsh7bvO6oeb8ZR1XUS7TaftU8fVdqX9cWpGBt5WeJvKbwbOJvyujEPlv5RcLBXZyesc1lyMSk5qWmS0zQxNQrGVF2Fpv9hdOg+2HFzZZwPQjFWFAxV4FUNJd5VcWr4u4+hgx0YcVgVchRtOSmW50wpVoA+lS0vWB6mifkxdE2H7jSOazaVfYtJo91yHKVSUmLq/Yihp2Zi09a9N1rb7Hxi07oN/dAOgnMwB4F9E3jtW1Y1oWea2yhbve/Oa583WWR4SRLnGHAPVkd3bblpA70XvcjDKjVs24ku70rX9NU5OgIeV9ect0L03a3rbve3l5e3+6273Vp0opVVmnrG1jkFl9UX7R3HfY5c2zCTOLxKNHzobzdCv3779voK/ls3tOi+ihPPcI5uFGRrXdPeZ8t16+y7zpbgVcHFWLb9fUZ/RX0D/e2txew5zxPTcNzIP+xBR+vfgb2x9oeTe3Rs04sLXuKmDWg5sb+jFnqH9ZejrL3t1o0Oh+CcrWG1/4v//GW1OwfR6XRybC+5SrBLPnTd/YXYC/3l7XYfJB+VVA3aHgX7/fli/TddA3ud7Q++758cI6kUVwo3rOu7t9/ht46rETe/iA3Az5cs261X+hfQ/4Otb9a7bB/sA9+1zbCYGIOx4FID/voV9AWOje8GxSaY3jW1XYzcsnbWf9E1DfNeW1l2yc6B75hxDjNVk6Q4Rdtp3x4zv3dt23Oy+bquUvsUZNYatdro/9p5DT3XV+vdzoL2w8mAvxQ5myYOV8Nd+3Xbcc/FMMi8YHVThcnWP6PpKEj/RzqxN6sVFFhZcLLTpr5emWLY9bKEdOz7y+sr7jnYHdlsK1id502cpiboFmRvdP0f6doM36yAt86nbRI2VZNDOhKNC4E2d2RwZHFd3w/0SNGWeQh/T5LEcP3LekZ/Ibj2D2zAddIOtu2lYVhBe46m0zMM3LSH+Du5a48dIIsR7djEYZh6nrk9+hnoQKOI/jx7hsNiItwyBFrYNLUSw5xipRiIjuoQK2I+Ec7FwjROPdNAugSXtb6wn4VrgC/0DXTD29BL0l4AywXAC7z7CUemcVGWguepl3j2duu4fgDtRNeonkE/lGPbd/uDC1f3AE/DRopyxLy7dhF+R6Ht6Hvfl0LAfiaKdANsN6KVJ7r2DF2b8UQn9vlwOm4Nw/C8JG0Y59O86X1PaAQKbJ0cBp96gYONYxFTpB+jU3QILkR/Dg70DH9Yq++6jjNrjwspmSxFf7+haNdfUbTvd3y80aOVUqpOwJ7DBelikckR+pmpL2xY6yXwoyiCr9tmWk9TAe0DdRua6ZajwId8/KsT6EtRFNdk60L3/nwm+Op5kyO2DmslX/UPCJWtnTQKXy1H3kPmA/2VCnyoB73lUsLd89A8Rj5kZxdKF1y4ZzeOdK8g/LzfI9NcxGmY44uVlAIr/gb0w9oX+uvcezFNKr9em9RwoTzbWZa1pnQh+rPuBjgOf4H4E1KlZvm1UArCO8DB/hmpRCc4nuQ4Q9erKgQdcEITXMfGPwfXdfJVJCP2PXI8/FBpmpwxJfr+Tzgpn1O1E6ou6iqGzxgu7fqKavOUv2soEo4Cn/bdTMMqrBAbBcdzKsFfCL7Uo+1ksy2vq2sTpgmM5rTPMPCNjlou+xMTJ2PdIFHpott4ao3jqq7rSQyI0+7nri/o5b6BDZdVOCS5u2c6PugbkDHzv/fYh79QAZ4FEaVKnMLZYTJi5PQksaw7isiERra1A5KN5yEOCrZpH/39brUE27PwxdjBPm3JW6EdMx/LceJwmY7w4FMRmVynF/T8yuU1TuPEtJEt7gGp/uj5X8G1GQ42iYe7BtHR9lApsrKZypFN40hhPofKfanbPO4WB5OTlKpKEsC3DmJ1pgP+t/SHsxKc2DB22zChHXTGR8YmGCzEi2E+AaoHeBAlShZMqUnm1HWyWPr1cAH9eTjYtGwzfKbHteSqUIyNUDhyjgBdCmDORym5hAnR6a7JD8bMdrtJKIii/lBZCMQQsHxEQggUXJqsmPd/OfeZIU2rxeSk1ja6upnLvXPm0ABfqxj1iS6ct0fpOIDQ3uC+cMIJKkkSAa/705HWDv4Zgio8nl1wL6eTZupubJlgu3bA0ZWaNsDlbDP9sboRa/5FprJarWzh04GiTecj5tHBv8wyckt0Pp+apuPrZizCpAKeZdkaczH6h4fgXrvYu6cNtszCK6Q1/FDq5kEU5tEiqnfB5lu4Z25L02l2n4qAZd+4s321Lf8Q29CwMZX1EzJHS4u+bUbVrsPG0r6Urk++JK2yzImHQz67RxW2uvtObCK6PEaX689uChxhKnEclJrZR4iXw0FPYcD5TT+6Lnrrogh5YlXGKc8Lmbo5G97mvnofjjyoEFN2+/06+8YEJ1uxof30rCcxR5i+3w/88b2uC7FHgzL0CWspA2ZImQuazQX8vdLd0MzPFJP0NKTOEa29Of903O2g3Q4bH37YJ1lLqscE26ed1hx9fIiuG+4hCfr3vTW4moYJfOpPz4fzQVg1GboM+qVPhCXe8As7n/qcVae5z3TB5VHe6e7nFODQZeWbKgiZmens0Nvz8/kMG5j3N17+SU2OrPgsHRscsKBwJuiKvAoctKc2dN/QoIMXOzJXofIi7y/MaKwtGEO/Fnj4uvvsx77mctMgthFadNj3fdU9xa2cLbfH0WgvKaWzg4YO02BT/RRb6N8vEl3vHrzdtTkXnOItMa3GogPsx+HQ1eBWZipBWgrfXI5dd4MjB+tjLv2n0HooW4fKa9WqqlZbp4NG9+GIdZeTJ8AjZRU04BgaXg/XG/5afte56RddYUfpZJwoxluY4DP56mehpUX0Sz6kyexlKlGs2nHIMqeB9vRXAot2OnQTWORs3tfD4I5e2BdYi+DfkMxFLc7pd3KKtjv50DwliWNb+GKkb41tQ3tFhne+yw4b7x+s74+0pDqIY+D4Grlprdj0EPyTxaS1DI1VS7TwYdE3Yz70Y4950Nqcj37wQkY+2DlracPjwMEsbZzYQJa1Qb9/1JBn00yGZo4WRUE5jH0OPJ86NhSbTjrc5GD907EbcuoGXoTxSpFNDwTdV4Hfvedycj32Yxag+iROopLZcSjUZ0Z8FS/Fy9TdX8Q35uqytImrHApUh8lWeRGH2O08tIn+/7Rwc1MuQDc9LAaVYpN7O/Zj00rdG7USzkdaymu1pLrEWjhoegpriVHWptrvZ1NzU6q3QaIWWD5VjCOeMUym/o3sHYpmbyivQC/pM+7p+68I+J3cdM2mhEMCosNDSysKAuVgMYwA4Xr7NwLLIjFIhKWuFWOLKh00C4xyN4cvsy0e4qWyU1Y9DtRcVXtZ5uPEWtLr0/cFTNR8wFVqWYsezkBnt10T4zLd46HsTNJ93yZ0GO6eF0XrKOs0Igi9VRDNSoMIC8yhp6lKp8tpiF07nI69bOpeuKwcsfRKxrBT8Ah2M9T6gWmUzIrn11UBIQnzZ1PUqXw45KTgLZudx9WP17z6LtvhEnCbI7RyobFr20o1lxJcyf7p9k0V63+XrHs/lGYIQVUB/6aJYrb0pbB8tXLJn0Kps0bmaUSGOfSnpVIYLf8vxRJeZvCpz21vBDENmoXPCE0sOVpwNhU+26k2fEZ/MQI/hDLyhgOs81PUeCUBSh3fdf1a/qerq6m8n4pU73LWVnJVjI3KYQuOFuCiW2uvYMeWF9IQX2HRgdfsPE1ntre1tP7y/c/bhQ65OsGAs6BI1kJgtNo/O1taiofQxd4Cjz2lhVE5NSPdhQPNXiql+l+VqJig85+g55hqECixbdXib8a2AP9kcNnpHBCrxCeZnACk85tPjOSu/G/5u712ZT5IRaitANyU3YwN9hKcNbfWVjEECR5YZJhyFT6QBwaX+qu1VGRfDaa+ha7Dhhtg6RzzrRz9m8VV6P+p3C1NdmrTl+VTevsweW35yDQziwTxSjR9F84yFaIP9GEs3eJilsHPdqSXJU8XXAFRbRUj3/Jh+z1gAwlMQRPGJayD21cS39SPXUN7LVQ4+zBWDbL0eaKQsS2uO3ZqVi5t9LAZdjGbWk3h4+glvwOX7LoovRS9AK4Jdk7K/PHf8y1VDpuB+WnDK3vaasPTqyFD1yZutOg39nt0ZdlmoCH671pEF3wvo8TVvyxMFNZc9Zh5nZk2Gh9lFMU8GwycdYOP/6BFN75fXK8l97wWRBw27rdccjmp+xwhP9lpkbThV2KXYEGXHDf96OkP4+a6szQQRdEfairpFBFDTcUQEo2+/xu61tkTS6Fetn6lBXTN5cy5zCgufh34p27bOkyfK+fohnTYRRdOoORnN5kSnuPDu2ewd+F0PHUas3cwh3QFaW/iX5T3f7oGf8S1u/1bS/2adWa43E1nksSYR7iXILx8Oz5TvkXDt2/uqgLvGVRfXdt7/GDV0t8/SweOzbZjdZ1Og98r1GWviYTnC6x064Wh4gphlZVbS311MvEruefTfqd51io/MGce7i0Ty43NwE02swuvoQHu9r4xzSxKk3XpWKnyF5fx70uupknnGXIDovsDTB/Fg5GFbu8kFLKFSweejUc1Ch/aR3jmwq67L3+V9uE+rSncZD6Ac79a+rgVmX6/34VDF89yc8InR4zGwx7oC4mR+SE56d9k3mFJ7fokj2kDxk5QNa5BF76TTwg3jXHa8XE0Vq+80HTYHCAziobWwQYMJV72dNCrQTfm4lzbYFybZ+GVzqwx/TWTEO6g42DIAJbRcWPQ+w4LFjC2B1XQRf2pz9OItRy0UwZ+qjp5xmUZ1xJUw94NqJ5fnum5g8WkSXSDhdCK1eqqEW2rFxT156qph5EX6M4PDmYxrlGpWq6Sxa5BVXzYqtipEYksFGq612nC0mGP5CR4PFODrtzNmydvptH9CMfMiTpelzrgw3GsYe2159lxxdJPcA0sTvxybBQNOqrGkuFQfEY4/vygCgS+pWZ1aY1RW4AP0JfL5ZjTRU4Hjeid/oez01P9ZSfhDuOg/bbRFdPG6xxil6X3eo9swHmxQLPewPzoOqMoHK95A25k2YVXYe755afbjQYw824/1nnJOHnfzrIDN/ggr6pe0v3raNcZeMWsm8CdrJEJqS9hTfQa1O6nG9+52QXymUqchwoOlBDLHPiKW3u+ws9tmC7O/WAG6T9Qo+eUyXiv/UJZth0HDtrA4gQycybpYxm5Zjyj4GuyHezcBR34PPF95szI4MpcznzugL/Bf+3Dy9RpWgJv4Ow/Rg2f4/XcNUd1t3lUl+OAU7W1iPVpiV7wFIE7cDsOXDk8NfNnklc00OXFblDyYQZbnTdPSTwtGMmZq+u2wmopcJw3l6QTzwVqon0F9TvsY1UN5iKyMbulexYux67c5Fb5zgR8gL60jBYnXCfqVPv8VhnXNvDs8Ecaxt2lBsyqwSboMPRX8peuCXHx2qWHMxz1pi6Dsz/Htb5Jp1Ui+lNEjarnfR8O+Ii1mRfQC913aK3x8ygr9PUTF8nIiLvpfcUiWWyOu31Ga5EeduC2q8MxOGyHIbQHzbKUXjgFklj3pSqLvagW1VdqQ2N0EBoR1YVQeRSAIu/Aiaj8hq2n0XuSQ2Yoa7UfBKU2/6P89OD14E4UYKaIBK68AfRYOnqFI+H0G7hrl8gK/GqIMnonLVKHVZv7UjmlwUcHXrs5n+534XFvgGVv4CoWD5uVhuYkQNNQkMG9b8l/1WA0KfjHFAzXrLQ4rxQsXU/RPLtwZO7GgBv2XoeZmVrhDP4/6H6crhvVTCQqrpzWgsWgFj1vdVfZ4FYpv4Abpa9T7bMVX1/7r55rm1DLMprmNp/jY8D3roe+iWmyM+NGn9g70dk0TBturfr0b3h9rax+qHNsTDeuHXxmPfS9Q0zheliC/2ypOrlWm3xNqfTXGY/JuZuDCk4vgJfnNK5I3+m51vbbuwNH87G7DfiY23/J2Y4TEs6ZIqpSDTzqA/9ywPAWquh4d3S6LCg+02nP9PtrR/UB8r5Ni9k31wv/WgYJx3/tnen+HvVEFo9xNbrKoY+JFgxjuoPGyJt4u/UdRTvbom9G2romVOMNHeVUdSeqgbeBTn1K1asxNIctrQYBTQ/aPijVmqk3fxj4rG9zsg0rMLi+Bhbhyi+kWCWymUVXWgw8KXuPpj4oHxXEh8dJeLLAZMwOaHZfs/e8F1j8gi/Q4bNBUhbfvTy9iDIUzCaKLlu53yrVxcoaT20eOPQ/wUHzacFJZJOemstSrhfLla/ykmRO5b3+cbXG/AEnbfYWcws8brQv9RUOVDKqrhvbNHd3aPA6RuRiPeqm1Obdas+cHahEszgXu2aPxb97hqvesFoT+kP4LlHgs6i7P6voU3R/VL6WhBW8fx7vVlMuXMnewHuIDzzeBrye1mTW7n94kh/428uTgJaZSdezKkcdePQCh42EO+mhO10eeRiMuckRVcnHVXDymg9sr/+pwcn7qmfdepdNWFsbI3w1d3ukv/v6qzoz2lEQBqJoVjQx/P8Hb6/nwoUyK9Xwskd3LYVynNrOxKgoxM3Q6MjZRrM6n5NgvIsjz2oP3u+CMkSuXcffebSnDvQEOtOh0iw5drqT1Yfks9yT4kdgpAmHTkwzw1zLWq/GPyVvWszAO9nMum6hxZSJQ32gXV3hkKkTjTaYzOrI//hJUXKGU+DyoUnVcS+OGe2ZW0PXWO906Y94rXMdY5YABCbu4YZtPqSlPsmx64Xvplz1LO3rrHOjfG/jDq5JGBs0OeCQBtF71SyhNyxf8kwdeOQa4zlDLjC+gcGWK2Ts28jL0JPhCzn2sO/ozmveHLrlOktNQx573Mrw+pMcptd48guaPelIl985n7aOWTGKGmq58jvR42HmeO8fwQBG61bMeuSxJ8NC5I4g8sm4lYamx829vb04/eR33KOc/L6VW0YES0Rn4JY1C/3FstgqeZCcVe3BLmXB5U11GlLXwsxYy5c9Hio3S57gb1DVz/lAd83s2J0ipEaOC3lZW4TlhG8Q5B2khLvZIa/+2GbrLkNdy7Ez89SIL8C9+7yRk0137n7DEXrsPE2a4XD+FjcLXchdE3sv75lug50pZnaf2rPbBfIvwA2jcoh9iZ//PGjxKPu4HHe3yc7cWfPU9+9hlRfZpSZyIH4gkGGezDecu9kGsSt+eGeoScy4R+Ry93v+oWfNozrDEIaiHXRD7DXkDONmzdY7oGbuAxPH/wEwphW49aD/MlAP40uv1I7bCf2a+KP+wF2p1f3pdBHHJfycnf43/AJwK37vPZnSygAAAABJRU5ErkJggg=="/>
77
+ </svg>`;return{url:URL.createObjectURL(new Blob([b],{type:"image/svg+xml"})),viewBox:p,scale:v}},s=>`${s.color},${s.isMoving},${s.designBeam??0},${s.designLength??0},${s.aisFromBow??0},${s.aisFromCenter??0}`),shipTypeColorMap=new Map([[-1,"#00FF00"],[70,"#95B3D7"],[37,"#00FF00"],[50,"#366092"],[51,"#366092"],[52,"#366092"],[53,"#366092"],[54,"#366092"],[55,"#366092"],[56,"#366092"],[57,"#366092"],[58,"#366092"],[59,"#366092"],[80,"red"],[81,"red"],[82,"red"],[83,"red"],[84,"red"],[85,"red"],[86,"red"],[87,"red"],[88,"red"],[89,"red"]]);function createAlphaSampled(s){const r=new Cesium__namespace.SampledProperty(Cesium__namespace.Color),i=(s==null?void 0:s.startTime)??Cesium__namespace.JulianDate.now(),a=Cesium__namespace.JulianDate.addMinutes(i,(s==null?void 0:s.startFadeMinutes)??1,new Cesium__namespace.JulianDate),h=Cesium__namespace.JulianDate.addMinutes(i,(s==null?void 0:s.endFadeMinutes)??5,new Cesium__namespace.JulianDate),o=Cesium__namespace.JulianDate.fromIso8601("2100-01-01T00:00:00Z"),l=(s==null?void 0:s.color)??Cesium__namespace.Color.WHITE;return r.addSample(i,l.withAlpha(1)),r.addSample(a,l.withAlpha(1)),r.addSample(h,l.withAlpha(.2)),r.addSample(o,l.withAlpha(.1)),r}function getHideAfterSomeMinutesProperty(s,r){const i=r??Cesium__namespace.JulianDate.now(),a=Cesium__namespace.JulianDate.addMinutes(i,s,new Cesium__namespace.JulianDate);return new Cesium__namespace.CallbackProperty(h=>h?Cesium__namespace.JulianDate.lessThan(h,a):!0,!1)}function createRoundedRectImage({text:s="未知",fill:r="#5582DF",stroke:i="#FFFFFF",strokeWidth:a=2,textColor:h="#FFFFFF",fontFamily:o="微软雅黑, Segoe UI, Helvetica, Arial, sans-serif",fontWeight:l="normal",fontSize:c=12,padding:d=6,radius:u=5}={}){const m=Math.max(0,s.length*c*.6+d*2),y=c*1.6,g=2,p=Math.ceil(a/2)+1,v=m+p*2,b=y+p*2,w=document.createElement("canvas");w.width=Math.round(v*g),w.height=Math.round(b*g),w.style.width=`${v}px`,w.style.height=`${b}px`;const O=w.getContext("2d");if(!O)throw new Error("无法获取2D绘图上下文");O.scale(g,g),O.clearRect(0,0,v,b),O.lineJoin="round",O.lineCap="round";const _=p,C=p,x=v-p,T=b-p,E=x-_,R=T-C,P=Math.min(u,Math.min(E,R)/2);O.beginPath(),O.moveTo(_+P,C),O.lineTo(x-P,C),O.quadraticCurveTo(x,C,x,C+P),O.lineTo(x,T-P),O.quadraticCurveTo(x,T,x-P,T),O.lineTo(_+P,T),O.quadraticCurveTo(_,T,_,T-P),O.lineTo(_,C+P),O.quadraticCurveTo(_,C,_+P,C),O.closePath(),r&&r!=="transparent"&&(O.fillStyle=r,O.fill()),O.lineWidth=a,O.strokeStyle=i,O.stroke();const k=Math.max(0,m-d*2);let A=c;for(O.fillStyle=h,O.textAlign="center",O.textBaseline="middle",O.font=`${l} ${A}px ${o}`;O.measureText(s).width>k&&A>10;)A-=1,O.font=`${l} ${A}px ${o}`;return O.fillText(s,v/2,b/2+1),w}function hookClusterEvent(s){s.clustering.clusterEvent.addEventListener((i,a)=>{const h=i[0],o=h.billboard,l=h.label,c=h.point;a.label.show=!1,a.point.show=!1,o&&(a.billboard=Cesium__namespace.clone(o)),l&&(a.label=Cesium__namespace.clone(l)),c?a.point=Cesium__namespace.clone(c):(a.billboard.show=!0,a.billboard.image=Cesium__namespace.buildModuleUrl("Widgets/Images/clusterIcon.png"))})}class ShipLayer extends EventEmitter{constructor(i,a,h){var o,l,c;super();L(this,"db");L(this,"labelDataSource",new Cesium__namespace.CustomDataSource("ship-labels"));L(this,"IS_MOVING_THRESHOLD");L(this,"shipDisplayOptions");L(this,"isMounted",!1);L(this,"_viewer",null);L(this,"entityMap",new Map);L(this,"shadowEntityMap",new WeakMap);L(this,"hookFilterEntityFn");this.key=i,this.zIndex=a,this.opt=h,this.IS_MOVING_THRESHOLD=(h==null?void 0:h.IS_MOVING_THRESHOLD)??1,this.db=new Cesium__namespace.CustomDataSource(i),this.labelDataSource.clustering.enabled=((o=h==null?void 0:h.clustering)==null?void 0:o.enabled)??!0,this.labelDataSource.clustering.pixelRange=((l=h==null?void 0:h.clustering)==null?void 0:l.pixelRange)??15,this.labelDataSource.clustering.minimumClusterSize=((c=h==null?void 0:h.clustering)==null?void 0:c.minimumClusterSize)??2,this.shipDisplayOptions=defaults(h==null?void 0:h.shipDisplayOptions,{startFadeMinutes:1,endFadeMinutes:5,hideMinutes:60}),hookClusterEvent(this.labelDataSource)}show(i){this.isMounted||(i.dataSources.add(this.db),i.dataSources.add(this.labelDataSource),this._viewer=i,this.isMounted=!0),this.db.show=!0}hide(){this.isMounted&&(this.db.show=!1,this.labelDataSource.show=!1)}contain(i){const a=i.id.replace(/_shadow\d*$/,"");return this.entityMap.has(a)}render(i){i.features.forEach(a=>{this.renderFeature(a)})}getIdByFeature(i){var h;const a=String(((h=i.properties)==null?void 0:h.mmsi)??i.id);if(!a)throw new Error("feature必须有mmsi或id");return"ship_mmsi_"+a}renderFeature(i){var u,m;const a=this.getIdByFeature(i),h=new Cesium__namespace.SampledPositionProperty;h.backwardExtrapolationType=Cesium__namespace.ExtrapolationType.HOLD,h.forwardExtrapolationType=Cesium__namespace.ExtrapolationType.HOLD;const o=Cesium__namespace.Cartesian3.fromDegrees(i.geometry.coordinates[0],i.geometry.coordinates[1]);h.addSample(((u=this._viewer)==null?void 0:u.clock.currentTime)??Cesium__namespace.JulianDate.now(),o);const l=((m=i.properties)==null?void 0:m.courseOverGroundTrue)??0,c=new Cesium__namespace.Entity({id:a,position:h,orientation:new Cesium__namespace.ConstantProperty(Cesium__namespace.Transforms.headingPitchRollQuaternion(o,new Cesium__namespace.HeadingPitchRoll(l,0,0))),properties:i.properties??{}});this.entityMap.set(a,c),this.db.entities.add(c),this.renderEntity(c);const d=new Cesium__namespace.Entity({id:a+"_shadow1",position:h,properties:i.properties??{}});this.labelDataSource.entities.add(d),this.renderLabelEntity(d),this.emit("createEntity",c)}update(i){var h,o,l,c,d,u,m,y,g,p,v,b,w,O,_,C;const a=this.db.entities.getById(this.getIdByFeature(i));if(a){const x=this.labelDataSource.entities.getById(a.id+"_shadow1"),T=this.shadowEntityMap.get(a),E=((h=i.properties)==null?void 0:h.shipTypeId)??-1,R=shipTypeColorMap.get(E)??shipTypeColorMap.get(-1),[P,k]=i.geometry.coordinates,A=((o=this._viewer)==null?void 0:o.clock.currentTime)??Cesium__namespace.JulianDate.now(),N=(l=a.position)==null?void 0:l.getValue(A),B=Cesium__namespace.Cartesian3.fromDegrees(P,k),q=new Cesium__namespace.SampledPositionProperty;q.backwardExtrapolationType=Cesium__namespace.ExtrapolationType.HOLD,q.forwardExtrapolationType=Cesium__namespace.ExtrapolationType.HOLD;const H=(c=a.properties)==null?void 0:c.getValue().updateTime,Z=(d=i.properties)==null?void 0:d.updateTime;if(H&&Z&&new Date(Z).getTime()-new Date(H).getTime()>=3*1e3*60)q.addSample(A,B);else{const X=Cesium__namespace.JulianDate.addSeconds(A,3,new Cesium__namespace.JulianDate);q.addSample(Cesium__namespace.JulianDate.addSeconds(A,1,new Cesium__namespace.JulianDate),N??B),q.addSample(X,B)}if(a.position=q,T&&(T.position=q),x&&(x.position=q),a.properties)for(const[X,J]of Object.entries(i.properties??{})){if(X=="speedOverGround"){const U=a.properties.getValue().speedOverGround??0,K=Number(U)>this.IS_MOVING_THRESHOLD,G=Number(J)>this.IS_MOVING_THRESHOLD;if(K!==G&&(a.billboard&&(a.billboard.image=new Cesium__namespace.ConstantProperty(createShipIconUrl(R,G))),T!=null&&T.plane)){const ie=((u=i.properties)==null?void 0:u.designBeam)??((y=(m=this.opt)==null?void 0:m.defaultValue)==null?void 0:y.designBeam)??12,Q=((g=i.properties)==null?void 0:g.designLength)??((v=(p=this.opt)==null?void 0:p.defaultValue)==null?void 0:v.designLength)??35,ee=createShipIconV2({color:R,isMoving:G,...i.properties,designBeam:ie,designLength:Q}),te=(b=T.plane)==null?void 0:b.material;te&&(te.image=new Cesium__namespace.ConstantProperty(ee.url),T.plane.dimensions=new Cesium__namespace.ConstantProperty(new Cesium__namespace.Cartesian2(ie*ee.scale.x,Q*ee.scale.y))),T.plane.dimensions=new Cesium__namespace.CallbackProperty(()=>new Cesium__namespace.Cartesian2(ie*ee.scale.x,Q*ee.scale.y),!0)}}if(X=="courseOverGroundTrue"){const U=((w=i.properties)==null?void 0:w.courseOverGroundTrue)??0;a.billboard.rotation=new Cesium__namespace.ConstantProperty(typeof J=="number"?-1*J:0);const K=new Cesium__namespace.ConstantProperty(Cesium__namespace.Transforms.headingPitchRollQuaternion(B,new Cesium__namespace.HeadingPitchRoll(U,0,0)));T&&(T.orientation=K)}if(X=="updateTime"){const U=Cesium__namespace.JulianDate.fromDate(new Date(J));a.billboard&&(a.billboard.color=createAlphaSampled({startTime:U,startFadeMinutes:this.shipDisplayOptions.startFadeMinutes,endFadeMinutes:this.shipDisplayOptions.endFadeMinutes}),a.billboard.show=getHideAfterSomeMinutesProperty(this.shipDisplayOptions.hideMinutes,U));const K=(O=T==null?void 0:T.plane)==null?void 0:O.material;K&&(K.color=createAlphaSampled({startTime:U,startFadeMinutes:this.shipDisplayOptions.startFadeMinutes,endFadeMinutes:this.shipDisplayOptions.endFadeMinutes}));const G=getHideAfterSomeMinutesProperty(Math.min(this.shipDisplayOptions.endFadeMinutes,this.shipDisplayOptions.hideMinutes),U);x!=null&&x.billboard&&(x.billboard.show=G),a.point.show=G,T!=null&&T.plane&&(T.plane.show=this.getHideAfterSomeMinutesAndByDistance(this.shipDisplayOptions.hideMinutes,((C=(_=this.opt)==null?void 0:_.distanceDisplayConditions)==null?void 0:C.near)??4e3,a,U))}a.properties[X]=J,T!=null&&T.properties&&(T.properties[X]=J)}}else this.renderFeature(i)}renderEntity(i){var m,y,g,p,v,b,w,O,_;const a=(m=i.properties)==null?void 0:m.getValue(),h=(a==null?void 0:a.shipTypeId)??-1,o=shipTypeColorMap.get(h)??shipTypeColorMap.get(-1),l=Number((a==null?void 0:a.speedOverGround)??0),c=a!=null&&a.updateTime?new Date(a.updateTime):new Date,d=Cesium__namespace.JulianDate.fromDate(c),u=createShipIconUrl(o,l>this.IS_MOVING_THRESHOLD);i.point=new Cesium__namespace.PointGraphics({pixelSize:4,color:Cesium__namespace.Color.fromCssColorString("#8AF22C"),disableDepthTestDistance:3e6,distanceDisplayCondition:new Cesium__namespace.DistanceDisplayCondition(((g=(y=this.opt)==null?void 0:y.distanceDisplayConditions)==null?void 0:g.far)??15e3),show:getHideAfterSomeMinutesProperty(Math.min(this.shipDisplayOptions.endFadeMinutes,this.shipDisplayOptions.hideMinutes),d)}),i.billboard=new Cesium__namespace.BillboardGraphics({image:u,width:14,height:70,disableDepthTestDistance:3e6,distanceDisplayCondition:new Cesium__namespace.DistanceDisplayCondition(((v=(p=this.opt)==null?void 0:p.distanceDisplayConditions)==null?void 0:v.near)??4e3,((w=(b=this.opt)==null?void 0:b.distanceDisplayConditions)==null?void 0:w.far)??15e3),show:getHideAfterSomeMinutesProperty(this.shipDisplayOptions.hideMinutes,d),pixelOffset:new Cesium__namespace.Cartesian2(0,0),alignedAxis:Cesium__namespace.Cartesian3.UNIT_Z,color:createAlphaSampled({startTime:d,startFadeMinutes:this.shipDisplayOptions.startFadeMinutes,endFadeMinutes:this.shipDisplayOptions.endFadeMinutes}),rotation:new Cesium__namespace.ConstantProperty((_=(O=i.properties)==null?void 0:O.getValue())!=null&&_.courseOverGroundTrue?-1*i.properties.getValue().courseOverGroundTrue:0)}),this.createShipPlane(i)}renderLabelEntity(i){var d,u,m,y,g,p,v;const a=(d=i.properties)==null?void 0:d.getValue(),h=a!=null&&a.updateTime?new Date(a.updateTime):new Date,o=Cesium__namespace.JulianDate.fromDate(h),l=((m=(u=i.properties)==null?void 0:u.getValue())==null?void 0:m.name)??((y=i.properties)!=null&&y.getValue().mmsi?"mmsi:"+((g=i.properties)==null?void 0:g.getValue().mmsi):"未知"),c=createRoundedRectImage({text:l});i.billboard=new Cesium__namespace.BillboardGraphics({image:new Cesium__namespace.ConstantProperty(c),width:new Cesium__namespace.ConstantProperty(Number(c.style.width.replace("px",""))),height:new Cesium__namespace.ConstantProperty(Number(c.style.height.replace("px",""))),scale:new Cesium__namespace.ConstantProperty(1),pixelOffset:new Cesium__namespace.ConstantProperty(new Cesium__namespace.Cartesian2(0,-20)),horizontalOrigin:new Cesium__namespace.ConstantProperty(Cesium__namespace.HorizontalOrigin.CENTER),verticalOrigin:new Cesium__namespace.ConstantProperty(Cesium__namespace.VerticalOrigin.CENTER),distanceDisplayCondition:new Cesium__namespace.DistanceDisplayCondition(0,((v=(p=this.opt)==null?void 0:p.distanceDisplayConditions)==null?void 0:v.far)??15e3),disableDepthTestDistance:5e3,show:getHideAfterSomeMinutesProperty(Math.min(this.shipDisplayOptions.endFadeMinutes,this.shipDisplayOptions.hideMinutes),o)})}createShipPlane(i){var p,v,b,w,O,_,C;const a=new Cesium__namespace.Entity({id:i.id+"_shadow",position:i.position,orientation:i.orientation,properties:i.properties});this.shadowEntityMap.set(i,a),this.db.entities.add(a);const h=(p=i.properties)==null?void 0:p.getValue(),o=h!=null&&h.updateTime?new Date(h.updateTime):new Date,l=Cesium__namespace.JulianDate.fromDate(o),c=Number((h==null?void 0:h.speedOverGround)??0),d=(h==null?void 0:h.designBeam)??((b=(v=this.opt)==null?void 0:v.defaultValue)==null?void 0:b.designBeam)??12,u=(h==null?void 0:h.designLength)??((O=(w=this.opt)==null?void 0:w.defaultValue)==null?void 0:O.designLength)??35,m=(h==null?void 0:h.shipTypeId)??-1,y=shipTypeColorMap.get(m)??shipTypeColorMap.get(-1),g=createShipIconV2({color:y,isMoving:c>this.IS_MOVING_THRESHOLD,...h,designBeam:d,designLength:u});a.plane=new Cesium__namespace.PlaneGraphics({plane:new Cesium__namespace.Plane(Cesium__namespace.Cartesian3.UNIT_Z,0),dimensions:new Cesium__namespace.Cartesian2(d*g.scale.x,u*g.scale.y),show:this.getHideAfterSomeMinutesAndByDistance(this.shipDisplayOptions.hideMinutes,((C=(_=this.opt)==null?void 0:_.distanceDisplayConditions)==null?void 0:C.near)??4e3,i,l),material:new Cesium__namespace.ImageMaterialProperty({image:g.url,transparent:!0,repeat:new Cesium__namespace.Cartesian2(1,1),color:createAlphaSampled({startTime:l,startFadeMinutes:this.shipDisplayOptions.startFadeMinutes,endFadeMinutes:this.shipDisplayOptions.endFadeMinutes})})})}hideEntityByCondition(i){this.hookFilterEntityFn&&this.off("createEntity",this.hookFilterEntityFn),this.hookFilterEntityFn=a=>{const h=(i==null?void 0:i(a))??!0;a.show=h;const o=this.shadowEntityMap.get(a);o&&(o.show=h);const l=this.labelDataSource.entities.getById(a.id+"_shadow1");l&&(l.show=h)},this.db.entities.values.forEach(a=>{var h;(h=this.hookFilterEntityFn)==null||h.call(this,a)}),i&&this.on("createEntity",this.hookFilterEntityFn)}getHideAfterSomeMinutesAndByDistance(i,a,h,o){const l=o??Cesium__namespace.JulianDate.now(),c=Cesium__namespace.JulianDate.addMinutes(l,i,new Cesium__namespace.JulianDate);return new Cesium__namespace.CallbackProperty(d=>{var y,g;if(!((y=this._viewer)!=null&&y.camera))return!0;if(!d||!Cesium__namespace.JulianDate.lessThan(d,c))return!1;const u=(g=h.position)==null?void 0:g.getValue(d);return u?Cesium__namespace.Cartesian3.distance(this._viewer.camera.positionWC,u)<=(a??4e3):!1},!1)}}Cesium.Color.fromCssColorString("#FC4C02"),Cesium.Color.WHITE,new Cesium.Color,new Array(4);var e$2=[],t$2=[];function n$2(s,r){if(s&&typeof document<"u"){var i,a=r.prepend===!0?"prepend":"append",h=r.singleTag===!0,o=typeof r.container=="string"?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(h){var l=e$2.indexOf(o);l===-1&&(l=e$2.push(o)-1,t$2[l]={}),i=t$2[l]&&t$2[l][a]?t$2[l][a]:t$2[l][a]=c()}else i=c();s.charCodeAt(0)===65279&&(s=s.substring(1)),i.styleSheet?i.styleSheet.cssText+=s:i.appendChild(document.createTextNode(s))}function c(){var d=document.createElement("style");if(d.setAttribute("type","text/css"),r.attributes)for(var u=Object.keys(r.attributes),m=0;m<u.length;m++)d.setAttribute(u[m],r.attributes[u[m]]);var y=a==="prepend"?"afterbegin":"beforeend";return o.insertAdjacentElement(y,d),d}}var css$2='.cesium-tool-tip{background:rgba(0,0,0,.6);border-radius:4px;color:#fff;left:0;line-height:30px;min-height:30px;min-width:100px;padding:0 10px;pointer-events:none;position:absolute;top:0;visibility:hidden;z-index:-1}.cesium-tool-tip:before{border-bottom:10px solid transparent;border-right:10px solid rgba(0,0,0,.6);border-top:10px solid transparent;content:"";display:block;left:-10px;pointer-events:none;position:absolute;top:calc(50% - 10px)}';n$2(css$2,{}),Cesium.Color.YELLOW,Cesium.Color.YELLOW,Cesium.Color.DARKTURQUOISE.withAlpha(.5),Cesium.Color.BLUE,Cesium.Color.WHITE,Cesium.Color.YELLOW.withAlpha(.5),Cesium.Color.YELLOW.withAlpha(.5),Cesium.Color.WHITE,new Cesium.Color(.165,.165,.165,.8),new Cesium.Cartesian2(4,4),Cesium.LabelStyle.FILL_AND_OUTLINE,new Cesium.Cartesian2(4,0),new Cesium.NearFarScalar(1,.85,8e6,.75),Cesium.HeightReference.CLAMP_TO_GROUND;class Popup{constructor(r,i){L(this,"_position");L(this,"_screenPosition",new Cesium.Cartesian2);L(this,"_element");L(this,"_viewer");L(this,"_options");L(this,"_destroyed",!1);L(this,"_offset");L(this,"setPosition",()=>{if(this._position&&this._viewer&&this._position){if(this._viewer.scene.mode===Cesium.SceneMode.SCENE3D){const a=this._viewer.scene.camera.position,h=new Cesium.BoundingSphere(new Cesium.Cartesian3(0,0,0),635e4);if(!new Cesium.Occluder(h,a).isPointVisible(this._position)){this.switchElementShow(!1);return}}const r=Cesium.SceneTransforms.worldToWindowCoordinates(this._viewer.scene,this._position),{_element:i}=this;if(i&&r){if(this._screenPosition&&this._screenPosition.x===r.x&&this._screenPosition.y===r.y)return;this.switchElementShow(!0);const a=r.x-i.clientWidth/2+this._offset[0],h=r.y-i.clientHeight+this._offset[1];i.style.left=`${a}px`,i.style.top=`${h}px`,this._screenPosition=r}}});this._viewer=r,this._options=i;const{position:a,element:h,offset:o}=i;if(!h)throw Error("no element!");this._position=a?Cesium.Cartesian3.fromDegrees(a[0],a[1],a[2]):null,this._element=h,this._offset=[(o==null?void 0:o[0])??0,(o==null?void 0:o[1])??0],this.addMapListener()}set position(r){if(!r){this.switchElementShow(!1),this._position=null,this._options.position=null;return}this._position=Cesium.Cartesian3.fromDegrees(r[0],r[1],r[2]),this._options.position=r,this.setPosition()}get position(){return this._options.position}get destroyed(){return this._destroyed}switchElementShow(r){this._element&&(this._element.style.display=r?"block":"none")}addMapListener(){var r;(r=this._viewer)==null||r.scene.postRender.addEventListener(this.setPosition)}destroy(){this._viewer.isDestroyed()||this._viewer.scene.postRender.removeEventListener(this.setPosition),this.setPosition=void 0,this._destroyed=!0}}var e$1=[],t$1=[];function n$1(s,r){if(s&&typeof document<"u"){var i,a=r.prepend===!0?"prepend":"append",h=r.singleTag===!0,o=typeof r.container=="string"?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(h){var l=e$1.indexOf(o);l===-1&&(l=e$1.push(o)-1,t$1[l]={}),i=t$1[l]&&t$1[l][a]?t$1[l][a]:t$1[l][a]=c()}else i=c();s.charCodeAt(0)===65279&&(s=s.substring(1)),i.styleSheet?i.styleSheet.cssText+=s:i.appendChild(document.createTextNode(s))}function c(){var d=document.createElement("style");if(d.setAttribute("type","text/css"),r.attributes)for(var u=Object.keys(r.attributes),m=0;m<u.length;m++)d.setAttribute(u[m],r.attributes[u[m]]);var y=a==="prepend"?"afterbegin":"beforeend";return o.insertAdjacentElement(y,d),d}}var css$1=".cesium-compass{cursor:pointer;height:60px;pointer-events:auto;position:absolute;right:15px;top:100px;user-select:none;width:60px}.cesium-compass .out-ring{fill:rgba(23,49,71,.702);background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px;left:0;position:absolute;top:0;transition:all .3s ease;width:60px}.cesium-compass .out-ring svg{height:60px;width:60px}.cesium-compass:hover .rotation_marker svg{height:70.2px;width:70.2px}.cesium-compass .gyro{align-items:center;background:#fff;border-radius:50%;box-sizing:border-box;display:flex;height:30px;justify-content:center;margin:0 auto;padding:4px;position:relative;text-align:center;top:50%;transform:translateY(-50%);transition:all .3s ease;width:30px}.cesium-compass .gyro svg{height:20px;width:20px}.rotation_marker{background-repeat:no-repeat;background-size:contain;border-radius:50%;position:relative}.rotation_marker svg{height:60px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);transition:all .3s ease;width:60px}.cesium-compass .gyro-active,.cesium-compass .gyro:hover{fill:#68adfe}";n$1(css$1,{});var e=[],t=[];function n(s,r){if(s&&typeof document<"u"){var i,a=r.prepend===!0?"prepend":"append",h=r.singleTag===!0,o=typeof r.container=="string"?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(h){var l=e.indexOf(o);l===-1&&(l=e.push(o)-1,t[l]={}),i=t[l]&&t[l][a]?t[l][a]:t[l][a]=c()}else i=c();s.charCodeAt(0)===65279&&(s=s.substring(1)),i.styleSheet?i.styleSheet.cssText+=s:i.appendChild(document.createTextNode(s))}function c(){var d=document.createElement("style");if(d.setAttribute("type","text/css"),r.attributes)for(var u=Object.keys(r.attributes),m=0;m<u.length;m++)d.setAttribute(u[m],r.attributes[u[m]]);var y=a==="prepend"?"afterbegin":"beforeend";return o.insertAdjacentElement(y,d),d}}var css=".cesium-zoom-controller{border-radius:100px;box-sizing:border-box;display:flex;flex-direction:column;line-height:1.2rem;pointer-events:auto;position:absolute;right:30px;text-align:center;top:187px;user-select:none}.cesium-zoom-controller .refresh,.cesium-zoom-controller .zoom-in,.cesium-zoom-controller .zoom-out{border-radius:14%;margin-bottom:5px}.cesium-zoom-controller .cesium-button{background:#2a2e39;border:none;margin-right:0;transition:all .3s cubic-bezier(.645,.045,.355,1);transition-delay:0s;transition-duration:.2s;transition-property:all;transition-timing-function:cubic-bezier(.645,.045,.355,1)}.cesium-zoom-controller .cesium-button:hover{background:#48b;box-shadow:none}.cesium-zoom-controller .cesium-button:active{fill:#edffff;background:#adf;color:#edffff}.cesium-zoom-controller .cesium-toolbar-button{align-items:center;display:flex;height:30px;justify-content:center;width:30px}";n(css,{});var heatmap$1={exports:{}},heatmap=heatmap$1.exports,hasRequiredHeatmap;function requireHeatmap(){return hasRequiredHeatmap||(hasRequiredHeatmap=1,function(s){(function(r,i,a){s.exports?s.exports=a():i[r]=a()})("h337",heatmap,function(){var r={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},i=function(){var u=function(g){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=g.xField||g.defaultXField,this._yField=g.yField||g.defaultYField,this._valueField=g.valueField||g.defaultValueField,g.radius&&(this._cfgRadius=g.radius)},m=r.defaultRadius;return u.prototype={_organiseData:function(y,g){var p=y[this._xField],v=y[this._yField],b=this._radi,w=this._data,O=this._max,_=this._min,C=y[this._valueField]||1,x=y.radius||this._cfgRadius||m;w[p]||(w[p]=[],b[p]=[]),w[p][v]?w[p][v]+=C:(w[p][v]=C,b[p][v]=x);var T=w[p][v];return T>O?(g?this.setDataMax(T):this._max=T,!1):T<_?(g?this.setDataMin(T):this._min=T,!1):{x:p,y:v,value:C,radius:x,min:_,max:O}},_unOrganizeData:function(){var y=[],g=this._data,p=this._radi;for(var v in g)for(var b in g[v])y.push({x:v,y:b,radius:p[v][b],value:g[v][b]});return{min:this._min,max:this._max,data:y}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var y=arguments[0],g=y.length;g--;)this.addData.call(this,y[g]);else{var p=this._organiseData(arguments[0],!0);p&&(this._data.length===0&&(this._min=this._max=p.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[p]}))}return this},setData:function(y){var g=y.data,p=g.length;this._data=[],this._radi=[];for(var v=0;v<p;v++)this._organiseData(g[v],!1);return this._max=y.max,this._min=y.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(y){return this._max=y,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(y){return this._min=y,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(y){this._coordinator=y},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},u}(),a=function(){var u=function(p){var v=p.gradient||p.defaultGradient,b=document.createElement("canvas"),w=b.getContext("2d",{willReadFrequently:!0});b.width=256,b.height=1;var O=w.createLinearGradient(0,0,256,1);for(var _ in v)O.addColorStop(_,v[_]);return w.fillStyle=O,w.fillRect(0,0,256,1),w.getImageData(0,0,256,1).data},m=function(p,v){var b=document.createElement("canvas"),w=b.getContext("2d",{willReadFrequently:!0}),O=p,_=p;if(b.width=b.height=p*2,v==1)w.beginPath(),w.arc(O,_,p,0,2*Math.PI,!1),w.fillStyle="rgba(0,0,0,1)",w.fill();else{var C=w.createRadialGradient(O,_,p*v,O,_,p);C.addColorStop(0,"rgba(0,0,0,1)"),C.addColorStop(1,"rgba(0,0,0,0)"),w.fillStyle=C,w.fillRect(0,0,2*p,2*p)}return b},y=function(_){for(var v=[],b=_.min,w=_.max,O=_.radi,_=_.data,C=Object.keys(_),x=C.length;x--;)for(var T=C[x],E=Object.keys(_[T]),R=E.length;R--;){var P=E[R],k=_[T][P],A=O[T][P];v.push({x:T,y:P,value:k,radius:A})}return{min:b,max:w,data:v}};function g(p){var v=p.container,b=this.shadowCanvas=document.createElement("canvas"),w=this.canvas=p.canvas||document.createElement("canvas");this._renderBoundaries=[1e4,1e4,0,0];var O=getComputedStyle(p.container)||{};w.className="heatmap-canvas",this._width=w.width=b.width=p.width||+O.width.replace(/px/,""),this._height=w.height=b.height=p.height||+O.height.replace(/px/,""),this.shadowCtx=b.getContext("2d",{willReadFrequently:!0}),this.ctx=w.getContext("2d",{willReadFrequently:!0}),w.style.cssText=b.style.cssText="position:absolute;left:0;top:0;",v.style.position="relative",v.appendChild(w),this._palette=u(p),this._templates={},this._setStyles(p)}return g.prototype={renderPartial:function(p){p.data.length>0&&(this._drawAlpha(p),this._colorize())},renderAll:function(p){this._clear(),p.data.length>0&&(this._drawAlpha(y(p)),this._colorize())},_updateGradient:function(p){this._palette=u(p)},updateConfig:function(p){p.gradient&&this._updateGradient(p),this._setStyles(p)},setDimensions:function(p,v){this._width=p,this._height=v,this.canvas.width=this.shadowCanvas.width=p,this.canvas.height=this.shadowCanvas.height=v},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(p){this._blur=p.blur==0?0:p.blur||p.defaultBlur,p.backgroundColor&&(this.canvas.style.backgroundColor=p.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=p.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=p.height||this._height,this._opacity=(p.opacity||0)*255,this._maxOpacity=(p.maxOpacity||p.defaultMaxOpacity)*255,this._minOpacity=(p.minOpacity||p.defaultMinOpacity)*255,this._useGradientOpacity=!!p.useGradientOpacity},_drawAlpha:function(w){for(var v=this._min=w.min,b=this._max=w.max,w=w.data||[],O=w.length,_=1-this._blur;O--;){var C=w[O],x=C.x,T=C.y,E=C.radius,R=Math.min(C.value,b),P=x-E,k=T-E,A=this.shadowCtx,N;this._templates[E]?N=this._templates[E]:this._templates[E]=N=m(E,_);var B=(R-v)/(b-v);A.globalAlpha=B<.01?.01:B,A.drawImage(N,P,k),P<this._renderBoundaries[0]&&(this._renderBoundaries[0]=P),k<this._renderBoundaries[1]&&(this._renderBoundaries[1]=k),P+2*E>this._renderBoundaries[2]&&(this._renderBoundaries[2]=P+2*E),k+2*E>this._renderBoundaries[3]&&(this._renderBoundaries[3]=k+2*E)}},_colorize:function(){var p=this._renderBoundaries[0],v=this._renderBoundaries[1],b=this._renderBoundaries[2]-p,w=this._renderBoundaries[3]-v,O=this._width,_=this._height,C=this._opacity,x=this._maxOpacity,T=this._minOpacity,E=this._useGradientOpacity;p<0&&(p=0),v<0&&(v=0),p+b>O&&(b=O-p),v+w>_&&(w=_-v);for(var R=this.shadowCtx.getImageData(p,v,b,w),P=R.data,k=P.length,A=this._palette,N=3;N<k;N+=4){var B=P[N],q=B*4;if(q){var H;C>0?H=C:B<x?B<T?H=T:H=B:H=x,P[N-3]=A[q],P[N-2]=A[q+1],P[N-1]=A[q+2],P[N]=E?A[q+3]:H}}this.ctx.putImageData(R,p,v),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(p){var v,b=this.shadowCtx,w=b.getImageData(p.x,p.y,1,1),O=w.data[3],_=this._max,C=this._min;return v=Math.abs(_-C)*(O/255)>>0,v},getDataURL:function(){return this.canvas.toDataURL()}},g}(),h=function(){var u=!1;return r.defaultRenderer==="canvas2d"&&(u=a),u}(),o={merge:function(){for(var d={},u=arguments.length,m=0;m<u;m++){var y=arguments[m];for(var g in y)d[g]=y[g]}return d}},l=function(){var u=function(){function p(){this.cStore={}}return p.prototype={on:function(v,b,w){var O=this.cStore;O[v]||(O[v]=[]),O[v].push(function(_){return b.call(w,_)})},emit:function(v,b){var w=this.cStore;if(w[v])for(var O=w[v].length,_=0;_<O;_++){var C=w[v][_];C(b)}}},p}(),m=function(g){var p=g._renderer,v=g._coordinator,b=g._store;v.on("renderpartial",p.renderPartial,p),v.on("renderall",p.renderAll,p),v.on("extremachange",function(w){g._config.onExtremaChange&&g._config.onExtremaChange({min:w.min,max:w.max,gradient:g._config.gradient||g._config.defaultGradient})}),b.setCoordinator(v)};function y(){var g=this._config=o.merge(r,arguments[0]||{});if(this._coordinator=new u,g.plugin){var p=g.plugin;if(r.plugins[p]){var v=r.plugins[p];this._renderer=new v.renderer(g),this._store=new v.store(g)}else throw new Error("Plugin '"+p+"' not found. Maybe it was not registered.")}else this._renderer=new h(g),this._store=new i(g);m(this)}return y.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(g){return this._config=o.merge(this._config,g),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(g){return this._store.getValueAt?this._store.getValueAt(g):this._renderer.getValueAt?this._renderer.getValueAt(g):null}},y}(),c={create:function(d){return new l(d)},register:function(d,u){r.plugins[d]=u}};return c})}(heatmap$1)),heatmap$1.exports}requireHeatmap();const j=class j extends EventEmitter{constructor(){super();L(this,"popupMap",new Map)}static getInstance(){return j.instance||(j.instance=new j),j.instance}popup(i){var c;const a=i.element;a.style.position="absolute";const h=i.viewer.container,o=()=>{l&&(l.destroy(),h.removeChild(a),this.popupMap.delete(i.id),this.emit("onUnmount",i.id))};h.appendChild(a),this.emit("onMount",i.id),(c=this.popupMap.get(i.id))==null||c.destroy();const l=new Popup(i.viewer,{position:i.position,offset:i.offset??[0,0],element:a});this.popupMap.set(i.id,{popup:l,destroy:o})}close(i){const a=this.popupMap.get(i);a&&(a.destroy(),this.popupMap.delete(i),this.emit("onUnmount",i))}closeAll(){this.popupMap.forEach(i=>i.destroy()),this.popupMap.clear()}};L(j,"instance",null);let PopupCtrl=j;function saveCameraParams(s){const r=s.camera;return{position:r.position,direction:r.direction,up:r.up,right:r.right,transform:r.transform}}function flyToCameraParams(s,r,i=1){s.camera.flyTo({destination:r.position,orientation:{direction:r.direction,up:r.up,right:r.right},duration:i})}const memoizeMap=new WeakMap;function ListenLeftClick(s){if(memoizeMap.has(s))return memoizeMap.get(s);const r=new EventEmitter;return new Cesium__namespace.ScreenSpaceEventHandler(s.scene.canvas).setInputAction(a=>{r.emit("click",a)},Cesium__namespace.ScreenSpaceEventType.LEFT_CLICK),memoizeMap.set(s,r),r}function uniqueId(){let s="";do s=Math.random().toString(36).slice(-8);while(s.length<8);return s}class Subscriber{constructor(r,i){L(this,"_viewer");L(this,"_handler");L(this,"_eventCollection",Object.create(null));L(this,"_externalEventCollection",Object.create({}));L(this,"_eventTypeList",["LEFT_DOWN","LEFT_UP","LEFT_CLICK","LEFT_DOUBLE_CLICK","RIGHT_DOWN","RIGHT_UP","RIGHT_CLICK","MIDDLE_DOWN","MIDDLE_UP","MIDDLE_CLICK","MOUSE_MOVE","WHEEL","PINCH_START","PINCH_MOVE","PINCH_END"]);L(this,"_isDestroy");this._viewer=r,this._handler=new Cesium.ScreenSpaceEventHandler(i||this._viewer.canvas),this._isDestroy=!1,this._initListener()}get isDestroy(){return this._isDestroy}_initListener(){this._eventTypeList.forEach(r=>{this._eventCollection[r]=new Map,this._externalEventCollection[r]=new Map})}_eventRegister(r){if(this._isDestroy)return;const i=this._eventCollection[r],a=this._externalEventCollection[r];this._handler.setInputAction(h=>{var o,l;if(a.size>0){const c=a.values();let d=c.next();for(;!d.done;)d.value(h),d=c.next()}if(!this._isDestroy&&(h.position||h.endPosition)){let c;r==="MOUSE_MOVE"?c=(o=this._viewer.scene.pick(h.endPosition))==null?void 0:o.id:c=(l=this._viewer.scene.pick(h.position))==null?void 0:l.id,c&&i.has(c.id)&&typeof i.get(c.id)=="function"&&i.get(c.id)(h,c)}},Cesium.ScreenSpaceEventType[r])}add(r,i,a){if(!this._isDestroy){this._eventCollection[a].size===0&&this._externalEventCollection[a].size===0&&this._eventRegister(a),r=Array.isArray(r)?r:[r];for(const h of r)this._eventCollection[a].set(h.id,i)}}addExternal(r,i){if(this._isDestroy)return;this._eventCollection[i].size===0&&this._externalEventCollection[i].size===0&&this._eventRegister(i);const a=uniqueId();return this._externalEventCollection[i].set(a,r),a}remove(r,i){if(!this._isDestroy){r=Array.isArray(r)?r:[r];for(const a of r)this._eventCollection[i].has(a.id)&&this._eventCollection[i].delete(a.id)}}removeExternal(r,i){var a;if(!this._isDestroy){r=Array.isArray(r)?r:[r];for(const h of r){const o=i||this._searchExternal(h);(a=this._externalEventCollection[o])!=null&&a.has(h)&&this._externalEventCollection[o].delete(h)}}}_searchExternal(r){if(this._isDestroy)return;const i=Object.keys(this._externalEventCollection);for(const a of i)if(this._externalEventCollection[a].has(r))return a}removeNative(r,i){r.screenSpaceEventHandler.removeInputAction(this.convertCesiumEventType(i))}convertCesiumEventType(r){return Cesium.ScreenSpaceEventType[r]}destroy(){this._isDestroy=!0,this._externalEventCollection=void 0,this._eventCollection=void 0,this._viewer=void 0,this._handler.destroy(),this.add=void 0,this.addExternal=void 0,this.remove=void 0,this.removeExternal=void 0,this.destroy=void 0}}class PolygonDrawer{constructor(r,i){L(this,"_viewer");L(this,"_callBack");L(this,"_posChange");L(this,"_pointGeometry",[]);L(this,"_activePoint",null);L(this,"_polygon",null);L(this,"_positions",[]);L(this,"_status");L(this,"_mouseDelta",10);L(this,"_lastClickPosition",new Cesium__namespace.Cartesian2(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY));L(this,"_options",{accuracy:6,once:!0,retainGeo:!0});L(this,"_subscriber");L(this,"_events",[]);L(this,"_labels");L(this,"_tips",{leftClick:"左键添加",rightClick:"右键取消",doubleClick:"双击完成",edit:"左键编辑,右键删除"});L(this,"_hoveredPoint",null);L(this,"handlePosChange",()=>{if(this._posChange){const r=[],i=this._activePoint?this._pointGeometry.indexOf(this._activePoint):-1;this._positions.map((a,h)=>{h!==i&&r.push(this.cartesian2lonlat(a))}),this._posChange(r)}});L(this,"onMouseClickPoint",(r,i)=>{if(this._status==="EDITING"&&this._activePoint)return;const a=this._pointGeometry.indexOf(i);this.activeOnePosition(a),this._status="EDITING"});L(this,"drawShape",r=>{const i=this._viewer.entities.add({polygon:{hierarchy:Array.isArray(r)?new Cesium__namespace.PolygonHierarchy(r):r,material:Cesium__namespace.Color.YELLOW.withAlpha(.5),...this._options.polygon??{}}});return this._polygon=i,this._viewer.scene.requestRender(),i});L(this,"handleMouseMove",r=>{var o;const{ellipsoid:i}=this._viewer.scene.globe;if(!r.endPosition)return;const a=this._viewer.camera.pickEllipsoid(r.endPosition,i);if(this._status==="END"){const l=(o=this._viewer.scene.pick(r.endPosition))==null?void 0:o.id;this._hoveredPoint&&this._hoveredPoint!==l&&(this.updatePointSize(this._hoveredPoint,5),this._hoveredPoint=null,this.updateLabel({show:!1}),this._viewer.canvas.style.cursor="default"),!this._hoveredPoint&&this._pointGeometry.indexOf(l)!==-1&&(this._hoveredPoint=l,this.updatePointSize(l,10),this.updateLabel({position:a,text:this._tips.edit,show:!0}),this._viewer.canvas.style.cursor="pointer");return}if(!this._activePoint)return;this._activePoint.position.setValue(a);const h=this._pointGeometry.indexOf(this._activePoint);this._positions.length>=2&&a&&this._positions.splice(h,1,a),this.updateLabel({position:a}),this._viewer.scene.requestRender()});L(this,"handleMouseLeftClick",r=>{if(!r.position||!this._activePoint)return;const{ellipsoid:i}=this._viewer.scene.globe,a=this._viewer.camera.pickEllipsoid(r.position,i);if(!a||!Cesium__namespace.defined(a)||this._lastClickPosition&&Cesium__namespace.Cartesian2.magnitude(Cesium__namespace.Cartesian2.subtract(this._lastClickPosition,r.position,{}))<this._mouseDelta)return;const h=this._pointGeometry.indexOf(this._activePoint),o=this.drawPoint(a);if(this.updatePointSize(this._activePoint,5),this._activePoint=o,this._pointGeometry.splice(h+1,0,o),this._positions.splice(h+1,0,a),Cesium__namespace.Cartesian2.clone(r.position,this._lastClickPosition),this._positions.length===1){this._positions.push(a);const l=new Cesium__namespace.CallbackProperty(()=>new Cesium__namespace.PolygonHierarchy(this._positions),!1);this.removePolygon(),this.drawShape(l)}this.updateLabel(),this.handlePosChange()});L(this,"addOnePosition",(r,i)=>{if(!Array.isArray(i))return!1;const a=Cesium__namespace.Cartesian3.fromDegrees(i[0],i[1]),h=this.drawPoint(a);return this.updatePointSize(h,5),this._subscriber.add(h,this.onMouseClickPoint,"LEFT_CLICK"),this._positions.splice(r,0,a),this._pointGeometry.splice(r,0,h),this.handlePosChange(),this._viewer.scene.requestRender(),!0});L(this,"changeOnePosition",(r,i)=>{if(!Array.isArray(i))return!1;const a=Cesium__namespace.Cartesian3.fromDegrees(i[0],i[1]);return this._positions[r]=a,this._pointGeometry[r].position.setValue(a),!0});L(this,"removeOnePosition",r=>{if(this._positions.length<=2)return!1;const a=this._pointGeometry[r];return this._status==="EDITING"&&this._subscriber.remove(a,"LEFT_CLICK"),this._viewer.entities.remove(a),this._positions.splice(r,1),this._pointGeometry.splice(r,1),this.handlePosChange(),this._viewer.scene.requestRender(),!0});L(this,"activeOnePosition",r=>{const i=this._pointGeometry[r];this._activePoint=i,this.updatePointSize(this._activePoint,10),this.updateLabel(),this._viewer.scene.requestRender()});L(this,"handleMouseRightClick",r=>{var a;if(this._status=="END"&&r.position){const h=(a=this._viewer.scene.pick(r.position))==null?void 0:a.id;if(!h)return;const o=this._pointGeometry.indexOf(h);if(o===-1)return;this.removeOnePosition(o),this.updateLabel(),this.handlePosChange(),this._callBack&&this._callBack(this._positions.map(this.cartesian2lonlat));return}if(!this._activePoint)return;const i=this._pointGeometry.indexOf(this._activePoint);i<=0||(this.removeOnePosition(i-1),this.updateLabel())});L(this,"removePolygon",()=>{this._polygon&&(this._viewer.entities.remove(this._polygon),this._polygon=null)});L(this,"cartesian2lonlat",r=>{if(!r)return[];const{accuracy:i}=this._options,a=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(r),h=+Cesium__namespace.Math.toDegrees(a.longitude).toFixed(i),o=+Cesium__namespace.Math.toDegrees(a.latitude).toFixed(i);return[h,o]});L(this,"endDraw",r=>{if(!this._activePoint)return!1;const i=this._pointGeometry.indexOf(this._activePoint);return this._positions.splice(i,1),this._positions.length<3?!1:(this._options.once?this.stop(!1):this.start(),this._options.retainGeo===!1&&this.removePolygon(),this._subscriber.add(this._pointGeometry,this.onMouseClickPoint,"LEFT_CLICK"),this._callBack&&!(r!=null&&r.ignoreCallback)&&this._callBack(this._positions.map(this.cartesian2lonlat)),this.updateLabel(),!0)});if(this.options=i,!r)throw new Error("no viewer object");this._viewer=r,this._callBack=i==null?void 0:i.callback,this._posChange=i==null?void 0:i.posChange,this._options={...this._options,...i},this._tips={...this._tips,...i==null?void 0:i.tips},this._status="INIT",this._viewer.scene.pickPositionSupported||console.warn("浏览器不支持 pickPosition属性,无法在有地形的情况下正确选点"),this._labels=new Cesium.LabelCollection,r.scene.primitives.add(this._labels),this._labels.add({show:!0,position:Cesium__namespace.Cartesian3.ZERO,text:"start",font:"bold 1rem Arial",fillColor:Cesium__namespace.Color.WHITE,backgroundColor:Cesium__namespace.Color.fromCssColorString("#000000"),backgroundPadding:new Cesium__namespace.Cartesian2(4,4),outlineWidth:4,style:Cesium__namespace.LabelStyle.FILL_AND_OUTLINE,pixelOffset:new Cesium__namespace.Cartesian2(4,30),scale:1,scaleByDistance:new Cesium__namespace.NearFarScalar(1,.85,8e6,.75)}),this._subscriber=new Subscriber(this._viewer),i!=null&&i.positions&&i.positions.length>2&&this.initializeFromPositions()}get status(){return this._status}get isDestroy(){return this._status==="DESTROY"}initializeFromPositions(){var i;const r=(i=this.options)==null?void 0:i.positions;r&&(this.start(),r.forEach((a,h)=>{if(!this._activePoint||h==r.length-1&&a.equals(r[0]))return;const o=this._pointGeometry.indexOf(this._activePoint),l=this.drawPoint(a);if(this.updatePointSize(l,5),this._pointGeometry.splice(o,0,l),this._positions.splice(o,0,a),this._positions.length===1){this._positions.push(a);const c=new Cesium__namespace.CallbackProperty(()=>new Cesium__namespace.PolygonHierarchy(this._positions),!1);this.removePolygon(),this.drawShape(c)}this.updateLabel()}),this.endDraw({ignoreCallback:!0}))}updateLabel(r=void 0){const i=this._labels.get(0);if(!i)return;if(!r){if(!this._activePoint){i.show=!1;return}i.show=!0;const{leftClick:l,rightClick:c,doubleClick:d}=this._tips;let u=`${l}, ${c}`;this._positions.length>2&&(u=`${l}, ${c}, ${d}`),i.text=u;return}const{position:a,text:h,show:o=!0}=r;a&&(i.position=a),h!==void 0&&(i.text=h),i.show=o}drawPoint(r){const i=this._viewer.entities.add({position:r,point:{color:Cesium__namespace.Color.SKYBLUE,pixelSize:10,outlineColor:Cesium__namespace.Color.YELLOW,outlineWidth:3,disableDepthTestDistance:Number.POSITIVE_INFINITY}});return this._viewer.scene.requestRender(),i}updatePointSize(r,i){r.point&&r.point.pixelSize.setValue(i)}start(){this.stop(),this._pointGeometry=[];const r=this._positions[1]??new Cesium__namespace.Cartesian3,i=this.drawPoint(r);if(this._positions.length=0,this._pointGeometry.push(i),this._activePoint=i,this._subscriber.removeNative(this._viewer,"LEFT_DOUBLE_CLICK"),this._events.length===0){const a=this._subscriber.addExternal(this.handleMouseLeftClick,"LEFT_CLICK"),h=this._subscriber.addExternal(this.handleMouseMove,"MOUSE_MOVE"),o=this._subscriber.addExternal(this.handleMouseRightClick,"RIGHT_CLICK"),l=this._subscriber.addExternal(()=>this.endDraw(),"LEFT_DOUBLE_CLICK");this._events=[a,h,o,l]}this.updateLabel(),this._status="START",this.handlePosChange()}stop(r=!0){if(r&&(this._subscriber.remove(this._pointGeometry,"LEFT_CLICK"),this._pointGeometry.map(i=>{this._viewer.entities.remove(i)}),this._pointGeometry=[]),this._activePoint){const i=this._pointGeometry.indexOf(this._activePoint);this._activePoint&&this._viewer.entities.remove(this._activePoint),this._pointGeometry.splice(i,1),this._activePoint=null}return this._status="END",this._lastClickPosition=new Cesium__namespace.Cartesian2(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),this._viewer.scene.requestRender(),!0}clear(){this.stop(),this.removePolygon(),this.updateLabel()}destroy(){this._events=[],this.clear(),this._viewer.scene.primitives.remove(this._labels),this._subscriber.destroy(),this._status="DESTROY"}}exports.ListenLeftClick=ListenLeftClick,exports.PolygonDrawer=PolygonDrawer,exports.PopupCtrl=PopupCtrl,exports.ShipLayer=ShipLayer,exports.WmsLayer=WmsLayer,exports.WmsLayerController=WmsLayerController,exports.createTdtProvider=createTdtProvider,exports.createTdtTerrain=createTdtTerrain,exports.flyToCameraParams=flyToCameraParams,exports.invertToCanvas=invertToCanvas,exports.saveCameraParams=saveCameraParams,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poor-knight/cesium-utils",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1 +0,0 @@
1
- :root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64)}:root{--color-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}@media (prefers-color-scheme: dark){:root{--color-background: var(--vt-c-black);--color-background-soft: var(--vt-c-black-soft);--color-background-mute: var(--vt-c-black-mute);--color-border: var(--vt-c-divider-dark-2);--color-border-hover: var(--vt-c-divider-dark-1);--color-heading: var(--vt-c-text-dark-1);--color-text: var(--vt-c-text-dark-2)}}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100vh;color:var(--color-text);background:var(--color-background);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#app{max-width:1280px;margin:0 auto;padding:2rem;font-weight:400}a,.green{text-decoration:none;color:#00bd7e;transition:.4s;padding:3px}@media (hover: hover){a:hover{background-color:#00bd7e33}}@media (min-width: 1024px){body{display:flex;place-items:center}#app{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem}}.container{width:100%;height:500px}.cesium-viewer{position:fixed;left:0;top:0;width:100vw;height:100vh}