earthsdk3 3.11.0-beta.8 → 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/dist/earthsdk3.iife.js +55 -53
  2. package/dist/earthsdk3.js +10316 -27539
  3. package/dist/earthsdk3.umd.cjs +44 -48
  4. package/dist/types/ESJTypes/ScreenManager/index.d.ts +3 -3
  5. package/dist/types/ESJTypes/pickedInfos/index.d.ts +2 -2
  6. package/dist/types/ESJTypes/properties/ESJBuffer.d.ts +1 -1
  7. package/dist/types/ESJTypes/properties/ESJEnvironmentMapManager.d.ts +1 -1
  8. package/dist/types/ESJTypes/properties/ESJMaterialType.d.ts +1 -1
  9. package/dist/types/ESJTypes/properties/FillStyleType.d.ts +2 -2
  10. package/dist/types/ESJTypes/properties/FlyParamType.d.ts +1 -1
  11. package/dist/types/ESJTypes/properties/PointStyleType.d.ts +3 -3
  12. package/dist/types/ESJTypes/properties/StrokeStyleType.d.ts +2 -2
  13. package/dist/types/ESJTypes/properties/index.d.ts +8 -8
  14. package/dist/types/ESJTypes/props/ColorProperty.d.ts +1 -1
  15. package/dist/types/ESJTypes/props/DashPatternProperty.d.ts +1 -1
  16. package/dist/types/ESJTypes/props/DateProperty.d.ts +1 -1
  17. package/dist/types/ESJTypes/props/DatesProperty.d.ts +1 -1
  18. package/dist/types/ESJTypes/props/DivideProperty.d.ts +1 -1
  19. package/dist/types/ESJTypes/props/EnumProperty.d.ts +3 -3
  20. package/dist/types/ESJTypes/props/EvalStringProperty.d.ts +3 -3
  21. package/dist/types/ESJTypes/props/GetSetProperty.d.ts +1 -1
  22. package/dist/types/ESJTypes/props/JsonArrayProperty.d.ts +3 -4
  23. package/dist/types/ESJTypes/props/JsonProperty.d.ts +3 -4
  24. package/dist/types/ESJTypes/props/LongStringProperty.d.ts +3 -3
  25. package/dist/types/ESJTypes/props/MethodProperty.d.ts +1 -1
  26. package/dist/types/ESJTypes/props/NativeProperty.d.ts +1 -1
  27. package/dist/types/ESJTypes/props/NumberSliderProperty.d.ts +3 -3
  28. package/dist/types/ESJTypes/props/PlayerProperty.d.ts +3 -3
  29. package/dist/types/ESJTypes/props/PositionProperty.d.ts +1 -1
  30. package/dist/types/ESJTypes/props/Property.d.ts +1 -1
  31. package/dist/types/ESJTypes/props/ReactVarProperty.d.ts +2 -2
  32. package/dist/types/ESJTypes/props/RotationProperty.d.ts +1 -1
  33. package/dist/types/ESJTypes/props/ViewPlayerProperty.d.ts +2 -2
  34. package/dist/types/ESJTypes/props/WithUndefinedProperty.d.ts +1 -1
  35. package/dist/types/ESJTypes/props/index.d.ts +1 -1
  36. package/dist/types/ESMCPTools/ESMCPClient.d.ts +1 -1
  37. package/dist/types/ESMCPTools/tools/camera.d.ts +2 -2
  38. package/dist/types/ESMCPTools/tools/index.d.ts +1 -1
  39. package/dist/types/ESMCPTools/tools/sceneObject.d.ts +2 -2
  40. package/dist/types/ESObjectManager/ESPlyarAndPathTime.d.ts +2 -2
  41. package/dist/types/ESObjectManager/PathAnimationManager.d.ts +4 -4
  42. package/dist/types/ESObjectManager/SceneObjectEditingManager.d.ts +2 -2
  43. package/dist/types/ESObjectManager/SceneObjectsListening.d.ts +3 -3
  44. package/dist/types/ESObjectManager/SceneObjectsManager.d.ts +2 -2
  45. package/dist/types/ESObjectManager/ViewersManager.d.ts +5 -5
  46. package/dist/types/ESObjectManager/index.d.ts +13 -13
  47. package/dist/types/ESObjectManager/utils.d.ts +3 -3
  48. package/dist/types/ESObjects/base/ESGeoVector.d.ts +39 -40
  49. package/dist/types/ESObjects/base/ESLabel.d.ts +25 -26
  50. package/dist/types/ESObjects/base/ESLocalVector.d.ts +33 -34
  51. package/dist/types/ESObjects/base/ESLocalVector2D.d.ts +2 -2
  52. package/dist/types/ESObjects/base/ESObjectWithLocation.d.ts +21 -21
  53. package/dist/types/ESObjects/base/ESSceneObject/ESObjectsContext.d.ts +5 -5
  54. package/dist/types/ESObjects/base/ESSceneObject/RefsManager.d.ts +3 -3
  55. package/dist/types/ESObjects/base/ESSceneObject/funcs/createEnvEvalStrReact.d.ts +2 -2
  56. package/dist/types/ESObjects/base/ESSceneObject/index.d.ts +7 -7
  57. package/dist/types/ESObjects/base/ESTestObject.d.ts +14 -14
  58. package/dist/types/ESObjects/base/ESVisualObject.d.ts +15 -15
  59. package/dist/types/ESObjects/general/ES3DTileset/index.d.ts +29 -29
  60. package/dist/types/ESObjects/general/ES3DTileset/type.d.ts +1 -1
  61. package/dist/types/ESObjects/general/ESAlarm.d.ts +21 -21
  62. package/dist/types/ESObjects/general/ESApertureEffect.d.ts +20 -20
  63. package/dist/types/ESObjects/general/ESAreaMeasurement.d.ts +14 -14
  64. package/dist/types/ESObjects/general/ESAttackArrow.d.ts +19 -19
  65. package/dist/types/ESObjects/general/ESBlastParticleSystem.d.ts +21 -21
  66. package/dist/types/ESObjects/general/ESBoxClipping.d.ts +23 -23
  67. package/dist/types/ESObjects/general/ESCameraView.d.ts +11 -11
  68. package/dist/types/ESObjects/general/ESCameraViewCollection/ViewWrapper.d.ts +4 -4
  69. package/dist/types/ESObjects/general/ESCameraViewCollection/index.d.ts +16 -16
  70. package/dist/types/ESObjects/general/ESCameraVisibleRange.d.ts +21 -21
  71. package/dist/types/ESObjects/general/ESCar.d.ts +20 -20
  72. package/dist/types/ESObjects/general/ESCityBasePoint.d.ts +22 -22
  73. package/dist/types/ESObjects/general/ESClassification.d.ts +18 -18
  74. package/dist/types/ESObjects/general/ESClippingPlane.d.ts +21 -21
  75. package/dist/types/ESObjects/general/ESCustomDiv/index.d.ts +7 -7
  76. package/dist/types/ESObjects/general/ESCustomDiv/instance.d.ts +3 -3
  77. package/dist/types/ESObjects/general/ESCylinder.d.ts +16 -16
  78. package/dist/types/ESObjects/general/ESCzml.d.ts +12 -12
  79. package/dist/types/ESObjects/general/ESDataMesh.d.ts +23 -23
  80. package/dist/types/ESObjects/general/ESDatasmithRuntimeModel.d.ts +22 -23
  81. package/dist/types/ESObjects/general/ESDirectionMeasurement.d.ts +12 -12
  82. package/dist/types/ESObjects/general/ESDistanceMeasurement.d.ts +12 -12
  83. package/dist/types/ESObjects/general/ESDynamicWater.d.ts +25 -25
  84. package/dist/types/ESObjects/general/ESEntityCluster.d.ts +17 -18
  85. package/dist/types/ESObjects/general/ESExcavate.d.ts +19 -19
  86. package/dist/types/ESObjects/general/ESFeatureLayer/FeatureLayer.d.ts +3 -3
  87. package/dist/types/ESObjects/general/ESFeatureLayer/PointLayer/index.d.ts +4 -4
  88. package/dist/types/ESObjects/general/ESFeatureLayer/PointLayer/utils.d.ts +2 -2
  89. package/dist/types/ESObjects/general/ESFeatureLayer/PolyLineLayer/index.d.ts +4 -4
  90. package/dist/types/ESObjects/general/ESFeatureLayer/PolygonLayer/index.d.ts +4 -4
  91. package/dist/types/ESObjects/general/ESFeatureLayer/index.d.ts +8 -8
  92. package/dist/types/ESObjects/general/ESFeatureLayer/types.d.ts +2 -2
  93. package/dist/types/ESObjects/general/ESFeatureLayer/utils.d.ts +27 -27
  94. package/dist/types/ESObjects/general/ESFireParticleSystem.d.ts +21 -21
  95. package/dist/types/ESObjects/general/ESFireWall.d.ts +20 -20
  96. package/dist/types/ESObjects/general/ESForestTileset.d.ts +16 -16
  97. package/dist/types/ESObjects/general/ESFountainParticleSystem.d.ts +20 -20
  98. package/dist/types/ESObjects/general/ESGaussianSplatting.d.ts +21 -21
  99. package/dist/types/ESObjects/general/ESGeoBezierSpline/index.d.ts +18 -18
  100. package/dist/types/ESObjects/general/ESGeoDiv/index.d.ts +25 -25
  101. package/dist/types/ESObjects/general/ESGeoDiv/mds.d.ts +2 -2
  102. package/dist/types/ESObjects/general/ESGeoDivTextPoi.d.ts +27 -27
  103. package/dist/types/ESObjects/general/ESGeoExtrudedPolygon.d.ts +19 -19
  104. package/dist/types/ESObjects/general/ESGeoJson/index.d.ts +20 -20
  105. package/dist/types/ESObjects/general/ESGeoJson/type.d.ts +2 -2
  106. package/dist/types/ESObjects/general/ESGeoLineString.d.ts +19 -19
  107. package/dist/types/ESObjects/general/ESGeoPoints/index.d.ts +11 -11
  108. package/dist/types/ESObjects/general/ESGeoPolygon.d.ts +26 -26
  109. package/dist/types/ESObjects/general/ESGeoPolygonWithFire.d.ts +20 -20
  110. package/dist/types/ESObjects/general/ESGeoRectangle.d.ts +18 -18
  111. package/dist/types/ESObjects/general/ESGeoWater.d.ts +21 -21
  112. package/dist/types/ESObjects/general/ESGltfModel.d.ts +33 -28
  113. package/dist/types/ESObjects/general/ESGltfModelEditing/index.d.ts +8 -8
  114. package/dist/types/ESObjects/general/ESHeatMap/index.d.ts +12 -12
  115. package/dist/types/ESObjects/general/ESHeightLimitAnalysis.d.ts +21 -21
  116. package/dist/types/ESObjects/general/ESHeightMeasurement.d.ts +12 -12
  117. package/dist/types/ESObjects/general/ESHole.d.ts +22 -22
  118. package/dist/types/ESObjects/general/ESHuman.d.ts +22 -22
  119. package/dist/types/ESObjects/general/ESHumanFountain.d.ts +27 -25
  120. package/dist/types/ESObjects/general/ESHumanPoi.d.ts +26 -26
  121. package/dist/types/ESObjects/general/ESHumans.d.ts +15 -15
  122. package/dist/types/ESObjects/general/ESImageLabel.d.ts +25 -25
  123. package/dist/types/ESObjects/general/ESImageryLayer/index.d.ts +17 -17
  124. package/dist/types/ESObjects/general/ESImageryLayer/types.d.ts +1 -1
  125. package/dist/types/ESObjects/general/ESLandSlide.d.ts +25 -25
  126. package/dist/types/ESObjects/general/ESLevelRuntimeModel.d.ts +22 -22
  127. package/dist/types/ESObjects/general/ESLocalCircle.d.ts +26 -26
  128. package/dist/types/ESObjects/general/ESLocalPolygon.d.ts +23 -23
  129. package/dist/types/ESObjects/general/ESLocalPolygonZ.d.ts +23 -23
  130. package/dist/types/ESObjects/general/ESLocalRectangle.d.ts +22 -22
  131. package/dist/types/ESObjects/general/ESLocalSkyBox.d.ts +20 -20
  132. package/dist/types/ESObjects/general/ESLocationMeasurement.d.ts +4 -4
  133. package/dist/types/ESObjects/general/ESMVTLayer.d.ts +19 -19
  134. package/dist/types/ESObjects/general/ESMediaLayer/index.d.ts +11 -11
  135. package/dist/types/ESObjects/general/ESMsTileset/index.d.ts +20 -20
  136. package/dist/types/ESObjects/general/ESMsTileset/msPath.d.ts +1 -1
  137. package/dist/types/ESObjects/general/ESNavigator.d.ts +11 -11
  138. package/dist/types/ESObjects/general/ESParticleSystemPrimitive.d.ts +32 -32
  139. package/dist/types/ESObjects/general/ESPath/ESPathImpl/GetCurrentFuncType.d.ts +2 -2
  140. package/dist/types/ESObjects/general/ESPath/ESPathImpl/PolylineResetting.d.ts +2 -2
  141. package/dist/types/ESObjects/general/ESPath/ESPathImpl/computeRotIfUndefined.d.ts +1 -1
  142. package/dist/types/ESObjects/general/ESPath/ESPathImpl/getCurrent.d.ts +3 -3
  143. package/dist/types/ESObjects/general/ESPath/ESPathImpl/index.d.ts +7 -7
  144. package/dist/types/ESObjects/general/ESPath/ESPathImpl/parseData.d.ts +1 -1
  145. package/dist/types/ESObjects/general/ESPath/ESPathImpl/subPath.d.ts +1 -1
  146. package/dist/types/ESObjects/general/ESPath/index.d.ts +22 -22
  147. package/dist/types/ESObjects/general/ESPathCameraTracker/index.d.ts +11 -11
  148. package/dist/types/ESObjects/general/ESPathLocationTracker/index.d.ts +11 -11
  149. package/dist/types/ESObjects/general/ESPipeFence.d.ts +19 -19
  150. package/dist/types/ESObjects/general/ESPipeline.d.ts +20 -20
  151. package/dist/types/ESObjects/general/ESPipeserTileset.d.ts +24 -25
  152. package/dist/types/ESObjects/general/ESPit.d.ts +21 -21
  153. package/dist/types/ESObjects/general/ESPlayer/AbsolutePlayer.d.ts +5 -6
  154. package/dist/types/ESObjects/general/ESPlayer/index.d.ts +13 -13
  155. package/dist/types/ESObjects/general/ESPoi2D.d.ts +27 -28
  156. package/dist/types/ESObjects/general/ESPoi3D.d.ts +21 -21
  157. package/dist/types/ESObjects/general/ESPoiTileset.d.ts +15 -15
  158. package/dist/types/ESObjects/general/ESPolygonFence.d.ts +18 -18
  159. package/dist/types/ESObjects/general/ESPolygonFlattenedPlane.d.ts +20 -20
  160. package/dist/types/ESObjects/general/ESPolygonWithHole.d.ts +20 -20
  161. package/dist/types/ESObjects/general/ESPolygonsFlattenedPlane.d.ts +93 -0
  162. package/dist/types/ESObjects/general/ESRectangle.d.ts +19 -19
  163. package/dist/types/ESObjects/general/ESRtsFeatureEditing/index.d.ts +22 -22
  164. package/dist/types/ESObjects/general/ESRtsTileset/index.d.ts +32 -32
  165. package/dist/types/ESObjects/general/ESRtsTileset/rtsPath.d.ts +50 -0
  166. package/dist/types/ESObjects/general/ESRtsTileset/types.d.ts +1 -1
  167. package/dist/types/ESObjects/general/ESScale.d.ts +11 -11
  168. package/dist/types/ESObjects/general/ESSeparateFoliage/CallFunc.d.ts +1 -1
  169. package/dist/types/ESObjects/general/ESSeparateFoliage/index.d.ts +16 -17
  170. package/dist/types/ESObjects/general/ESSignalInterference.d.ts +22 -21
  171. package/dist/types/ESObjects/general/ESSkylineAnalysis/index.d.ts +21 -21
  172. package/dist/types/ESObjects/general/ESSquadCombatArrow.d.ts +19 -19
  173. package/dist/types/ESObjects/general/ESStaticMesh.d.ts +20 -21
  174. package/dist/types/ESObjects/general/ESSubmergingAnalysis/index.d.ts +22 -22
  175. package/dist/types/ESObjects/general/ESSunshineAnalysis/index.d.ts +23 -24
  176. package/dist/types/ESObjects/general/ESSurfaceAreaMeasurement.d.ts +21 -22
  177. package/dist/types/ESObjects/general/ESTerrainLayer.d.ts +15 -16
  178. package/dist/types/ESObjects/general/ESTerrainLayerEditing/EditingESGeoPolygon.d.ts +3 -3
  179. package/dist/types/ESObjects/general/ESTerrainLayerEditing/index.d.ts +30 -30
  180. package/dist/types/ESObjects/general/ESTextLabel.d.ts +30 -30
  181. package/dist/types/ESObjects/general/ESUEWidget.d.ts +25 -26
  182. package/dist/types/ESObjects/general/ESUnrealActor.d.ts +23 -24
  183. package/dist/types/ESObjects/general/ESVideoFusion.d.ts +21 -22
  184. package/dist/types/ESObjects/general/ESViewShed.d.ts +21 -21
  185. package/dist/types/ESObjects/general/ESViewerStatusBar.d.ts +13 -13
  186. package/dist/types/ESObjects/general/ESViewerStatusBarScale.d.ts +13 -13
  187. package/dist/types/ESObjects/general/ESVisibilityAnalysis.d.ts +20 -20
  188. package/dist/types/ESObjects/general/ESVolumeMeasurement.d.ts +21 -22
  189. package/dist/types/ESObjects/general/ESWidget.d.ts +26 -26
  190. package/dist/types/ESObjects/general/index.d.ts +1 -0
  191. package/dist/types/ESViewer/ContainerStyleController.d.ts +2 -2
  192. package/dist/types/ESViewer/ESViewer.d.ts +19 -19
  193. package/dist/types/ESViewer/ESViewerExtensions/CursorPositionInfo.d.ts +5 -5
  194. package/dist/types/ESViewer/ESViewerExtensions/index.d.ts +3 -3
  195. package/dist/types/ESViewer/GeneralAnalysis/RollerShutterAnalysis.d.ts +2 -2
  196. package/dist/types/ESViewer/GeneralAnalysis/index.d.ts +3 -3
  197. package/dist/types/ESViewer/Resetting/index.d.ts +2 -2
  198. package/dist/types/ESViewer/StatusContainer.d.ts +2 -2
  199. package/dist/types/ESViewer/ViewerContainer.d.ts +3 -3
  200. package/dist/types/ESViewer/ViewerContext.d.ts +3 -3
  201. package/dist/types/ESViewer/ViewerCustomInteraction.d.ts +2 -2
  202. package/dist/types/EngineObject/EditingObjectContext.d.ts +5 -5
  203. package/dist/types/EngineObject/EngineObjectsContext.d.ts +5 -5
  204. package/dist/types/EngineObject/index.d.ts +4 -4
  205. package/dist/types/getESProperties/ESGltfModelEditingProperties.d.ts +1 -1
  206. package/dist/types/getESProperties/ESObjectWithLocationProperties.d.ts +1 -1
  207. package/dist/types/getESProperties/index.d.ts +1 -1
  208. package/dist/types/utils/SceneTrees/SceneTree.d.ts +12 -12
  209. package/dist/types/utils/SceneTrees/SceneTreeContextMenu.d.ts +4 -4
  210. package/dist/types/utils/SceneTrees/SceneTreeItem.d.ts +7 -7
  211. package/dist/types/utils/SceneTrees/SceneTreeItemDragDrop.d.ts +2 -2
  212. package/dist/types/utils/SceneTrees/SceneTreeJsonLoading.d.ts +2 -2
  213. package/dist/types/utils/SceneTrees/defaultCreateSceneObject.d.ts +3 -3
  214. package/dist/types/utils/SceneTrees/defaultCreateTreeItemDragDrop.d.ts +2 -2
  215. package/dist/types/utils/SceneTrees/defaultLight122FromEnvironmentMapManager.d.ts +1 -1
  216. package/dist/types/utils/SceneTrees/defaultShowSceneObject.d.ts +1 -1
  217. package/dist/types/utils/SceneTrees/preload.d.ts +1 -1
  218. package/dist/types/utils/SmoothMoveController.d.ts +9 -9
  219. package/dist/types/utils/arrowCalc.d.ts +1 -9
  220. package/dist/types/utils/base/DragStartDataManager.d.ts +2 -2
  221. package/dist/types/utils/base/TreeItemDragDrop.d.ts +1 -1
  222. package/dist/types/utils/base/bindCustomEditing.d.ts +2 -2
  223. package/dist/types/utils/base/defaultInitSceneObjectOnCreatingFunc.d.ts +1 -1
  224. package/dist/types/utils/base/defaultUpdateSceneObjectOnPickingFunc.d.ts +2 -2
  225. package/dist/types/utils/base/sceneObjectTreeItem.d.ts +2 -2
  226. package/dist/types/utils/components/ESSceneObjectWithId.d.ts +6 -6
  227. package/dist/types/utils/components/Player.d.ts +3 -3
  228. package/dist/types/utils/components/Watcher.d.ts +5 -5
  229. package/dist/types/utils/components/WatcherTools/toolsForWatcher.d.ts +2 -2
  230. package/dist/types/utils/engineObjectCreatedUpdate.d.ts +2 -2
  231. package/dist/types/utils/geoPolylineToBezierSpline/bezierSpline/lib/spline.d.ts +68 -62
  232. package/dist/types/utils/proj4/getDistancesFromPositions.d.ts +1 -1
  233. package/dist/types/utils/proj4/getXyzFromPostion.d.ts +1 -1
  234. package/dist/types/utils/proj4/lbhToXyz.d.ts +1 -5
  235. package/dist/types/utils/react.d.ts +1 -1
  236. package/dist/types/utils/registerEventUpdate.d.ts +1 -1
  237. package/dist/types/utils/turf/geoArea.d.ts +1 -1
  238. package/dist/types/utils/turf/geoLineIntersect.d.ts +1 -1
  239. package/dist/types/utils/turf/geoMidpoint.d.ts +1 -1
  240. package/dist/types/utils/turf/geoNearestPointOnLine.d.ts +2 -12
  241. package/dist/types/xbsj-base/xr-base-utils/Destroyable/index.d.ts +2 -2
  242. package/dist/types/xbsj-base/xr-base-utils/EventFromArrayUpdating.d.ts +2 -2
  243. package/dist/types/xbsj-base/xr-base-utils/HasOwner.d.ts +1 -1
  244. package/dist/types/xbsj-base/xr-base-utils/ObservableArray.d.ts +2 -2
  245. package/dist/types/xbsj-base/xr-base-utils/ReactiveVariable.d.ts +2 -2
  246. package/dist/types/xbsj-base/xr-base-utils/bindAndTrack.d.ts +1 -1
  247. package/dist/types/xbsj-base/xr-base-utils/events.d.ts +1 -1
  248. package/dist/types/xbsj-base/xr-base-utils/extendClassProps.d.ts +2 -2
  249. package/dist/types/xbsj-base/xr-base-utils/getReactFuncs.d.ts +2 -2
  250. package/dist/types/xbsj-base/xr-base-utils/pipe/ListenerPipe.d.ts +1 -1
  251. package/dist/types/xbsj-base/xr-base-utils/throttle.d.ts +1 -1
  252. package/dist/types/xbsj-base/xr-math/index.d.ts +3 -3
  253. package/dist/types/xbsj-base/xr-utils/ComplexImage/ComplexImage.d.ts +21 -21
  254. package/dist/types/xbsj-base/xr-utils/ComplexImage/FlvProcessing.d.ts +4 -4
  255. package/dist/types/xbsj-base/xr-utils/ComplexImage/GifProcessing.d.ts +3 -3
  256. package/dist/types/xbsj-base/xr-utils/ComplexImage/HlsProcessing.d.ts +4 -4
  257. package/dist/types/xbsj-base/xr-utils/ComplexImage/ImageProcessing.d.ts +3 -3
  258. package/dist/types/xbsj-base/xr-utils/ComplexImage/VideoProcessing.d.ts +2 -2
  259. package/dist/types/xbsj-base/xr-utils/LocalFileServer.d.ts +1 -1
  260. package/dist/types/xbsj-base/xr-utils/PointerActions/BoxPicker.d.ts +1 -1
  261. package/dist/types/xbsj-base/xr-utils/PointerActions/DivPointerClick.d.ts +4 -4
  262. package/dist/types/xbsj-base/xr-utils/PointerActions/PointerClick.d.ts +2 -2
  263. package/dist/types/xbsj-base/xr-utils/PointerActions/PointerDragDrop.d.ts +1 -1
  264. package/dist/types/xbsj-base/xr-utils/PointerActions/PointerHover.d.ts +1 -1
  265. package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Debouncing.d.ts +1 -1
  266. package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Fetching.d.ts +2 -2
  267. package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Sleeping.d.ts +2 -2
  268. package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Throttling.d.ts +1 -1
  269. package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Transition.d.ts +8 -8
  270. package/dist/types/xbsj-base/xr-utils/ProcessingDerives/getPromiseFromProcessing.d.ts +1 -1
  271. package/dist/types/xbsj-base/xr-utils/ProcessingDerives/misc.d.ts +1 -1
  272. package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Debouncing.d.ts +1 -1
  273. package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Fetching.d.ts +1 -1
  274. package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Timing.d.ts +2 -2
  275. package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Transition.d.ts +2 -2
  276. package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/cancelableFetch.d.ts +1 -1
  277. package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/Processing.d.ts +2 -2
  278. package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/cancelablePromise.d.ts +1 -1
  279. package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/createProcessing.d.ts +2 -2
  280. package/dist/types/xbsj-base/xr-utils/XrPlayer.d.ts +2 -2
  281. package/dist/types/xbsj-base/xr-utils/baseExt/ObjResettingWithEvent.d.ts +1 -1
  282. package/dist/types/xbsj-base/xr-utils/baseExt/ObservableSet.d.ts +1 -1
  283. package/dist/types/xbsj-base/xr-utils/baseExt/index.d.ts +2 -2
  284. package/dist/types/xbsj-base/xr-utils/gif/Gif.d.ts +3 -3
  285. package/dist/types/xbsj-base/xr-utils/gif/GifPlayer.d.ts +4 -4
  286. package/dist/types/xbsj-base/xr-utils/gif/loadGifFrames.d.ts +2 -2
  287. package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/CanvasImagePoi.d.ts +2 -2
  288. package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/CanvasPoi.d.ts +3 -3
  289. package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/CanvasPointPoi.d.ts +2 -2
  290. package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/PickColorMananger.d.ts +2 -2
  291. package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/BorderedPosFloatDiv.d.ts +1 -1
  292. package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/CursorInfo-deprecated.d.ts +1 -1
  293. package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/CursorInfo.d.ts +3 -3
  294. package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/DivPoi.d.ts +2 -2
  295. package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/FloatDiv.d.ts +1 -1
  296. package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/IFrameBorderedPosFloatDiv.d.ts +1 -1
  297. package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/PosFloatDiv.d.ts +1 -1
  298. package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/TooltipDiv-deprecated.d.ts +1 -1
  299. package/dist/types/xbsj-base/xr-utils/tree/RedrawInfo.d.ts +1 -1
  300. package/dist/types/xbsj-base/xr-utils/tree/Tree.d.ts +4 -4
  301. package/dist/types/xbsj-base/xr-utils/tree/TreeItem.d.ts +3 -3
  302. package/dist/types/xbsj-base/xr-utils/tree/UiTree.d.ts +7 -7
  303. package/dist/types/xbsj-base/xr-utils/tree/UiTreeObject.d.ts +8 -8
  304. package/package.json +10 -11
@@ -1,7 +1,7 @@
1
- (function(v,tr){typeof exports=="object"&&typeof module<"u"?tr(exports,require("js-binary-schema-parser"),require("@turf/turf"),require("proj4"),require("topojson-client"),require("zod"),require("zod-to-json-schema")):typeof define=="function"&&define.amd?define(["exports","js-binary-schema-parser","@turf/turf","proj4","topojson-client","zod","zod-to-json-schema"],tr):(v=typeof globalThis<"u"?globalThis:v||self,tr(v.EarthSDK3={},v.jsBinarySchemaParser,v.turf,v.proj4,v.topojson,v.z$1,v.zodToJsonSchema))})(this,(function(v,tr,_a,tg,Y_,pe,J_){"use strict";var RP=Object.defineProperty;var LP=(v,tr,_a)=>tr in v?RP(v,tr,{enumerable:!0,configurable:!0,writable:!0,value:_a}):v[tr]=_a;var h=(v,tr,_a)=>LP(v,typeof tr!="symbol"?tr+"":tr,_a);function eg(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const At=eg(_a),$_=eg(Y_);function K_(){var n;const r=((n=globalThis==null?void 0:globalThis.navigator)==null?void 0:n.userAgent)??"unknown";let e="Unknown";/Windows/.test(r)?e="Windows":/Macintosh/.test(r)?e="MacOS":/Linux/.test(r)?e="Linux":/Android/.test(r)?e="Android":/iOS|iPhone|iPad|iPod/.test(r)&&(e="iOS");let t="Unknown";return/x64|x86_64|Win64|WOW64/.test(r)?t="x64":/x86|i686|Win32/.test(r)?t="x86":/arm64|aarch64/.test(r)?t="arm64":/arm/.test(r)&&(t="arm"),{os:e.toLocaleLowerCase(),arch:t.toLocaleLowerCase()}}const Z_=Date.now();function ng(r){var a;const{os:e,arch:t}=K_(),n={version:r.version,commitdate:r.date,commitId:r.commitId,runningTime:(Date.now()-Z_)/1e3/60|0,date:new Date().toLocaleString(),href:((a=globalThis==null?void 0:globalThis.location)==null?void 0:a.href)??"unknown",os:e,arch:t},s={method:"GET",headers:new Headers,redirect:"follow"},o=globalThis.encodeURIComponent(JSON.stringify(n));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(l=>l.text()).then(l=>console.log(l)).catch(l=>console.log("error",l))}v.copyright=void 0;try{const r="earthsdk3",e="3.11.0-beta.8",t="2026-07-02T01:45:46.000Z",n="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="b14bd6123bb1733daabbcabf3adadba3db2419ac",a=((Date.now()-1782956746e3)/36e5).toFixed(1),l=`%c🌏 ${r}%c ${e}.${s.slice(0,8)}.${t} (距今${a}个小时)
1
+ (function(d,Re){typeof exports=="object"&&typeof module<"u"?Re(exports,require("js-binary-schema-parser"),require("@turf/turf"),require("proj4"),require("topojson-client"),require("zod"),require("zod-to-json-schema")):typeof define=="function"&&define.amd?define(["exports","js-binary-schema-parser","@turf/turf","proj4","topojson-client","zod","zod-to-json-schema"],Re):(d=typeof globalThis<"u"?globalThis:d||self,Re(d.EarthSDK3={},d.jsBinarySchemaParser,d.turf,d.proj4,d.topojson,d.z,d.zodToJsonSchema))})(this,(function(d,Re,U,Za,$l,ne,Gl){"use strict";var bf=Object.defineProperty;var Ef=(d,Re,U)=>Re in d?bf(d,Re,{enumerable:!0,configurable:!0,writable:!0,value:U}):d[Re]=U;var a=(d,Re,U)=>Ef(d,typeof Re!="symbol"?Re+"":Re,U);function Qa(n){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:()=>n[e]})}}return s.default=n,Object.freeze(s)}const X=Qa(U),Jl=Qa($l);function ql(){var t;const n=((t=globalThis==null?void 0:globalThis.navigator)==null?void 0:t.userAgent)??"unknown";let s="Unknown";/Windows/.test(n)?s="Windows":/Macintosh/.test(n)?s="MacOS":/Linux/.test(n)?s="Linux":/Android/.test(n)?s="Android":/iOS|iPhone|iPad|iPod/.test(n)&&(s="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(n)?e="x64":/x86|i686|Win32/.test(n)?e="x86":/arm64|aarch64/.test(n)?e="arm64":/arm/.test(n)&&(e="arm"),{os:s.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const Xl=Date.now();function eh(n){var h;const{os:s,arch:e}=ql(),t={version:n.version,commitdate:n.date,commitId:n.commitId,runningTime:(Date.now()-Xl)/1e3/60|0,date:new Date().toLocaleString(),href:((h=globalThis==null?void 0:globalThis.location)==null?void 0:h.href)??"unknown",os:s,arch:e},r={method:"GET",headers:new Headers,redirect:"follow"},o=globalThis.encodeURIComponent(JSON.stringify(t));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,r).then(c=>c.text()).then(c=>console.log(c)).catch(c=>console.log("error",c))}d.copyright=void 0;try{const n="earthsdk3",s="3.11.0",e="2026-07-20T03:14:06.000Z",t="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="eb3a9d8d7d52fe4ea2e58f3b05725f3414c04d31",h=((Date.now()-1784517246e3)/36e5).toFixed(1),c=`%c🌏 ${n}%c ${s}.${r.slice(0,8)}.${e} (距今${h}个小时)
2
2
  %c${i?i+`
3
- `:""}当前网站正在使用${r},此软件版权归${n}所有
4
- `;v.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","b14bd6123bb1733daabbcabf3adadba3db2419ac")},get info(){return l},get date(){return"2026-07-02T01:45:46.000Z"},get author(){return"suplyang"},get version(){return"3.11.0-beta.8"},get name(){return"earthsdk3"},get commitId(){return"b14bd6123bb1733daabbcabf3adadba3db2419ac"},print(){console.info(this.info,`
3
+ `:""}当前网站正在使用${n},此软件版权归${t}所有
4
+ `;d.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","eb3a9d8d7d52fe4ea2e58f3b05725f3414c04d31")},get info(){return c},get date(){return"2026-07-20T03:14:06.000Z"},get author(){return"suplyang"},get version(){return"3.11.0"},get name(){return"earthsdk3"},get commitId(){return"eb3a9d8d7d52fe4ea2e58f3b05725f3414c04d31"},print(){console.info(this.info,`
5
5
  font-size: 18px;
6
6
  font-weight: 1000;
7
7
  line-height: 1;
@@ -18,9 +18,9 @@
18
18
  color: rgb(0, 120, 215);
19
19
  padding-bottom: 2px;
20
20
  padding-left: 35px;
21
- `)}}),globalThis.g_XE3CopyRights=globalThis.g_XE3CopyRights||{},globalThis.g_XE3CopyRights[r]=v.copyright,globalThis.g_XE3SendProductUsageInfo=globalThis.g_XE3SendProductUsageInfo||!0,globalThis.g_XE3SendProductUsageInfo&&(setTimeout(()=>ng(v.copyright),1e3*60),setInterval(()=>ng(v.copyright),1440*60*1e3)),globalThis.g_earthsdk_copyright_print=globalThis.g_earthsdk_copyright_print??!0,globalThis.g_earthsdk_copyright_print&&v.copyright.print()}catch{console.warn("版本信息有误!")}const rg=new Set;function wa(r,e=r){rg.has(e)||(rg.add(e),console.warn(r))}function Ul(r){const e=ec(r),t=()=>e[0][e[1]],n=s=>{try{e[0][e[1]]=s}catch(o){wa(`setValue error, obj(${e[0].constructor.name}) prop(${e[1]}) error(${o})`)}},i=e[0][e[2]];return[t,n,i]}function Q_(){return!0}function t0(){throw new Error("throwOnDestroyed")}function ig(r){for(var e in r)typeof r[e]=="function"&&(r[e]=t0);r.isDestroyed=Q_}const Oh=class Oh{constructor(){h(this,"_memId",++Oh._lastMemId);h(this,"_disposers")}get __v_skip(){return!0}get memId(){return this._memId}get disposers(){return this._disposers||(this._disposers=[]),this._disposers}dispose(e){return this.disposers.push(e),e}d(e){return this.dispose(e)}disposeVar(e){return this.disposers.push(()=>e.destroy()),e}dv(e){return this.disposeVar(e)}tryDisposeVar(e){return this.disposers.push(()=>e.tryDestroy()),e}tdv(e){return this.tryDisposeVar(e)}autoDispose(e){return typeof e=="function"?this.dispose(e):this.disposeVar(e)}ad(e){return typeof e=="function"?this.dispose(e):this.disposeVar(e)}isDestroyed(){return!1}destroyImp(){}destroy(){if(this._toDestroyEvent&&this._toDestroyEvent.emit(),this.destroyImp(),this._disposers)try{const e=this._disposers,t=e.length;for(let n=t-1;n>=0;--n)e[n]();e.length=0,this._disposers=void 0}catch(e){console.error(`destroy get error! ${e}`)}return ig(this)}tryDestory(){if(!this.isDestroyed())return this.destroy()}};h(Oh,"_lastMemId",-1);let U=Oh,Mh;function sg(r){Mh=r}Object.defineProperties(U.prototype,{toDestroyEvent:{get(){if(this._toDestroyEvent===void 0){if(!Mh)throw new Error("Destroyable EventCtor not registered yet!");this._toDestroyEvent=this.disposeVar(new Mh)}return this._toDestroyEvent}}});class Qu{constructor(e,t,n=!1){h(this,"_freeElements");h(this,"_usedElementsCount");h(this,"_usedElements");h(this,"_nextCreateID");h(this,"_scratchObjs");this._createDefaultFunc=e,this._destroyFunc=t,this._freeElements=[],this._usedElementsCount=0,this._nextCreateID=1,this._scratchObjs=[],n&&(this._usedElements=[])}get usedElementsCount(){return this._usedElementsCount}get freeElementsCount(){return this._freeElements.length}_getCreateID(){return this._nextCreateID++}_create(){let e;return this._freeElements.length>0?e=this._freeElements.pop():e=this._createDefaultFunc&&this._createDefaultFunc()||{},e._cid=this._getCreateID(),e}create(){return this._create()}multiCreate(e){this._scratchObjs.length=0;for(let t=0;t<e;++t)this._scratchObjs.push(this._create());return this._scratchObjs}_destroy(e){this._destroyFunc&&this._destroyFunc(e),e._cid=void 0}destroy(...e){const t=e.length;for(let n=0;n<t;++n)this._destroy(e[n])}}function e0(){return{item:void 0,previous:void 0,next:void 0}}function n0(r){r.item=void 0,r.previous=void 0,r.next=void 0}const og=new Qu(e0,n0,!0);function Rh(r,e,t){const n=og.create();return n.item=r,n.previous=e,n.next=t,n}function ag(r){if(!r)throw new Error("node is undefined!");og.destroy(r)}function Lh(r,e){e.previous&&e.next?(e.previous.next=e.next,e.next.previous=e.previous):e.previous?(e.previous.next=void 0,r.tail=e.previous):e.next?(e.next.previous=void 0,r.head=e.next):(r.head=void 0,r.tail=void 0),e.next=void 0,e.previous=void 0}class lg{constructor(e){h(this,"head");h(this,"tail");h(this,"_length");const{needLength:t}=e||{needLength:!0};this.head=void 0,this.tail=void 0,t&&(this._length=0)}_incrementLength(){typeof this._length=="number"&&++this._length}_decrementLength(){typeof this._length=="number"&&--this._length}_setLength(e){typeof this._length=="number"&&(this._length=e)}get length(){return this._length}get empty(){return!this.head}*[Symbol.iterator](){let e=this.head;for(;e;)yield e,e=e.next}remove(e){if(!e)throw new Error("node is undefined!");Lh(this,e),this._decrementLength(),ag(e)}getNode(e){let t=this.head;for(;t!==null;){if(!t)throw new Error("current is undefined!");if(t.item===e)return t;t=t.next}}moveAfter(e,t){if(e!==t){Lh(this,t);var n=e.next;e.next=t,this.tail===e?this.tail=t:n&&(n.previous=t),t.next=n,t.previous=e}}moveBefore(e,t){if(e!==t){Lh(this,t);var n=e.previous;e.previous=t,this.head===e?this.head=t:n&&(n.next=t),t.previous=n,t.next=e}}insertBefore(e,t){const n=Rh(t,e.previous,e);return e.previous&&(e.previous.next=n),e.previous=n,this.head===e&&(this.head=n),this._incrementLength(),n}insertAfter(e,t){const n=Rh(t,e,e.next);return e.next&&(e.next.previous=n),e.next=n,this.tail===e&&(this.tail=n),this._incrementLength(),n}_setFirstNode(e){if(this.head||this.tail)throw new Error("_setFirstNode error!");const t=Rh(e,void 0,void 0);if(this.head=t,this.tail=t,this._incrementLength(),this._length!==1)throw new Error("_setFirstNode error! this._length !== 1");return t}push(e){return this.tail?this.insertAfter(this.tail,e):this._setFirstNode(e)}pop(){if(!this.tail)throw new Error("DoublyLinkedList is empty!");const e=this.tail.item;return this.remove(this.tail),e}shift(){if(!this.head)throw new Error("DoublyLinkedList is empty!");const e=this.head.item;return this.remove(this.head),e}unshift(e){return this.head?this.insertBefore(this.head,e):this._setFirstNode(e)}removeAll(){let e=this.head;for(;e;){const t=e.next;ag(e),e=t}this.head=void 0,this.tail=void 0,this._setLength(0)}}function r0(){return{func:void 0,scope:void 0,_hasRemoved:!1,_once:!1}}function i0(r){r.func=void 0,r.scope=void 0,r._hasRemoved=!1,r._once=!1}const yo=new Qu(r0,i0,!0);class Fh{constructor(){h(this,"__dll");h(this,"__currentListenerStack")}get _dll(){return this.__dll=this.__dll??new lg({needLength:!0}),this.__dll}_pushCurrentListener(e){this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.push(e):this.__currentListenerStack=[this.__currentListenerStack,e]:this.__currentListenerStack=e}_popCurrentListener(){if(this.__currentListenerStack)Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.pop():this.__currentListenerStack=void 0;else throw new Error("cannot pop!")}_hasCurrentListener(e){return this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.indexOf(e)!==-1:this.__currentListenerStack===e:!1}do(...e){if(this.__dll&&!this._dll.empty){let t=this._dll.head;for(;t;){const n=t.item;n._hasRemoved||(this._pushCurrentListener(n),n.func.call(n.scope,...e),this._popCurrentListener());const i=t.next;n._once&&!n._hasRemoved&&(this.remove(t),t=void 0),t&&this._clearHasRemoved(t),t=i}}}get empty(){if(!this.__dll||this._dll.empty)return!0;let e=!0,t=this._dll.head;for(;t;){if(!t.item._hasRemoved){e=!1;break}t=t.next}return e}isHandlerValid(e){return!e.item._hasRemoved}nextHandler(e){if(!e.item._hasRemoved)throw new Error("handler has removed!");let t=e.next;for(;t&&t.item._hasRemoved;)t=t.next;return t}prevHandler(e){if(!e.item._hasRemoved)throw new Error("handler has removed!");let t=e.previous;for(;t&&t.item._hasRemoved;)t=t.previous;return t}moveAfter(e,t){if(e.item._hasRemoved||t.item._hasRemoved)throw new Error("handler or nextHandler has removed!");return this._dll.moveAfter(e,t)}moveBefore(e,t){if(e.item._hasRemoved||t.item._hasRemoved)throw new Error("handler or prevHandler has removed!");return this._dll.moveBefore(e,t)}insertBefore(e,t,n,i=!1){if(e.item._hasRemoved)throw new Error("handler has removed!");const s=yo.create();return s.func=t,s.scope=n,s._once=i,this._dll.insertBefore(e,s)}insertAfter(e,t,n,i=!1){if(e.item._hasRemoved)throw new Error("handler has removed!");const s=yo.create();return s.func=t,s.scope=n,s._once=i,this._dll.insertAfter(e,s)}_clearHasRemoved(e){e.item._hasRemoved&&!this._hasCurrentListener(e.item)&&(yo.destroy(e.item),this._dll.remove(e))}remove(e){if(!e.item||e.item._hasRemoved)throw new Error("handler has removed!");this._hasCurrentListener(e.item)?e.item._hasRemoved=!0:(yo.destroy(e.item),this._dll.remove(e))}removeAll(){if(this.__dll&&!this._dll.empty){let e=this._dll.head;for(;e;){const t=e.next;e.item._hasRemoved||this.remove(e),e=t}}}destroy(){if(!this.__dll)return;let e=this._dll.head;for(;e;){const t=e.next,n=e;this._hasCurrentListener(n.item)||(console.warn("Event has remove item that on current stack!"),console.warn(`${n.item.func.toString()}`)),yo.destroy(n.item),this._dll.remove(n),e=t}this.__dll=void 0,this.__currentListenerStack=void 0}push(e,t,n=!1){const i=yo.create();return i.func=e,i.scope=t,i._once=n,this._dll.push(i)}pop(){const e=this.tail;if(!e)throw new Error("pop error!");this.remove(e)}shift(){const e=this.head;if(!e)throw new Error("shift error!");this.remove(e)}unshift(e,t,n=!1){const i=yo.create();return i.func=e,i.scope=t,i._once=n,this._dll.unshift(i)}get tail(){let e=this._dll.tail;for(;e&&e.item._hasRemoved;)e=e.previous;return e}get head(){let e=this._dll.head;for(;e&&e.item._hasRemoved;)e=e.previous;return e}}class Gl{constructor(){h(this,"_listenerHandler");h(this,"_cid")}_reset(e,t){this._listenerHandler=e,this._cid=t}clone(e){return e=e??new Gl,e._reset(this._listenerHandler,this._cid),e}get valid(){if(typeof this._listenerHandler<"u"&&typeof this._cid=="number"){const e=this._listenerHandler._cid;if(typeof e<"u"&&this._cid===e)return!0}return!1}}class Ah extends Gl{}class N extends U{constructor(){super(...arguments);h(this,"__pipe");h(this,"beforeCallback");h(this,"afterCallback")}get _pipe(){return this.__pipe=this.__pipe??new Fh,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}emit(...t){!this.isDestroyed()&&this.beforeCallback&&this.beforeCallback(...t),!this.isDestroyed()&&this._pipe.do(...t),!this.isDestroyed()&&this.afterCallback&&this.afterCallback(...t)}on(t,n,i=!1,s){const o=i?this._pipe.unshift(t,n,!1):this._pipe.push(t,n,!1);return s=s??new Ah,s._reset(o,o._cid),s}disposableOn(t,n,i=!1,s){const o=this.on(t,n,i,s);return()=>{o.valid&&this.off(o)}}don(t,n,i=!1,s){return this.disposableOn(t,n,i,s)}disposableWeakOn(t,n,i=!1,s){const o=new U,a=()=>{!o.isDestroyed()&&o.destroy()};return o.dispose(this.disposableOn(t,n,i,s)),o.dispose(this.toDestroyEvent.disposableOn(a)),a}dwon(t,n,i=!1,s){return this.disposableWeakOn(t,n,i,s)}once(t,n,i=!1,s){const o=i?this._pipe.unshift(t,n,!0):this._pipe.push(t,n,!0);return s=s??new Ah,s._reset(o,o._cid),s}disposableOnce(t,n,i=!1,s){const o=this.once(t,n,i,s);return()=>o.valid&&this.off(o)}donce(t,n,i=!1,s){const o=this.once(t,n,i,s);return()=>o.valid&&this.off(o)}off(t){if(!t.valid)throw new Error("handler is not valid!");this._pipe.remove(t._listenerHandler),t._reset()}reset(){this._pipe.removeAll()}destroyImp(){this.empty||(wa("The event is destroying with listeners!"),this._pipe.removeAll())}}sg(N);function Ea(r,e){return e=e??new Gl,e._reset(r,r._cid),e}class s0{constructor(){h(this,"__pipe")}get _pipe(){return this.__pipe=this.__pipe??new Fh,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}do(...e){return this._pipe.do(...e)}isHandlerValid(e){return e.valid?this._pipe.isHandlerValid(e._listenerHandler):!1}moveAfter(e,t){if(!e.valid||!t.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(e._listenerHandler,t._listenerHandler)}moveBefore(e,t){if(!e.valid||!t.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(e._listenerHandler,t._listenerHandler)}insertBefore(e,t,n,i=!1,s){if(!e.valid)throw new Error("handler is not valid!");const o=this._pipe.insertBefore(e._listenerHandler,t,n,i);return Ea(o,s)}insertAfter(e,t,n,i=!1,s){if(!e.valid)throw new Error("handler is not valid!");const o=this._pipe.insertAfter(e._listenerHandler,t,n,i);return Ea(o,s)}remove(e){if(!e.valid)throw new Error("handler is not valid!");return this._pipe.remove(e._listenerHandler)}removeAll(){return this._pipe.removeAll()}push(e,t,n=!1,i){const s=this._pipe.push(e,t,n);return Ea(s,i)}pop(){return this._pipe.pop()}shift(){return this._pipe.shift()}unshift(e,t,n=!1,i){const s=this._pipe.unshift(e,t,n);return Ea(s,i)}getTail(e){const t=this._pipe.tail;if(t)return Ea(t,e)}getHead(e){const t=this._pipe.head;if(t)return Ea(t,e)}}class Ge extends U{constructor(t,n,i){super();h(this,"_changed");h(this,"_value");h(this,"_oldValue");h(this,"toChangeFunc");this._equalsFunc=n,this._assignFunc=i,this._value=this._assignFunc&&this._assignFunc(t,void 0)||t}get assignFunc(){return this._assignFunc}get equalsFunc(){return this._equalsFunc}equals(t){return this._equalsFunc?this._equalsFunc(this._value,t):this._value===t}set value(t){if(this._equalsFunc?!this._equalsFunc(this._value,t):this._value!==t){if(this.toChangeFunc&&!this.toChangeFunc(t,this._value))return;this._assignFunc?(this._oldValue=this._assignFunc(this._value,this._oldValue),this._value=this._assignFunc(t,this._value)):(this._oldValue=this._value,this._value=t),this._changed&&this._changed.emit(t,this._oldValue)}}get value(){return this._value}get changed(){return this._changed||(this._changed=this.disposeVar(new N)),this._changed}forceChange(){this._changed&&this._changed.emit(this._value,this._value)}}function z(r,e,t){return new Ge(r,e,t)}function et(r){return new Ge(r,(e,t)=>e.length!==t.length?!1:e.every((n,i)=>n===t[i]),(e,t)=>{const n=t||new Array(e.length);return n.length=e.length,e.forEach((i,s)=>n[s]=i),n})}function Xt(r){return z(r,(e,t)=>e===void 0||t===void 0?e===void 0&&t===void 0:e.length!==t.length?!1:e.every((n,i)=>n===t[i]),(e,t)=>{if(!e)return;const n=t||new Array(e.length);return n.length=e.length,e.forEach((i,s)=>n[s]=i),n})}function tc(r,e,t){return z(r,(n,i)=>n.length!==i.length?!1:n.every((s,o)=>e&&e(s,i[o])||s===i[o]),(n,i)=>{const s=i||new Array(n.length);return s.length=n.length,n.forEach((o,a)=>{s[a]=t?t(o):o}),s})}function Ls(r,e,t){return z(r,(n,i)=>n===void 0||i===void 0?n===void 0&&i===void 0:n.length!==i.length?!1:n.every((s,o)=>e&&e(s,i[o])||s===i[o]),(n,i)=>{if(!n)return;const s=i||new Array(n.length);return s.length=n.length,n.forEach((o,a)=>{s[a]=t?t(o):o}),s})}function gt(r){return new Ge(r,(e,t)=>e===t||e!==void 0&&t!==void 0&&JSON.stringify(e)===JSON.stringify(t),(e,t)=>{if(e!==void 0)return JSON.parse(JSON.stringify(e))})}function Kt(r){return new Ge(r,(e,t)=>e===t||e!==void 0&&t!==void 0&&JSON.stringify(e)===JSON.stringify(t),(e,t)=>{if(e!==void 0)return JSON.parse(JSON.stringify(e))})}function o0(r){return new Ge(r,(e,t)=>{if(e===t)return!0;if(e===void 0||t===void 0)return!1;const n=Object.keys(e),i=Object.keys(t);return n.length!==i.length?!1:n.every((s,o)=>s===i[o]&&e[s]===t[s])},(e,t)=>e&&{...e})}function a0(r){return new Ge(r,(e,t)=>{if(e===t)return!0;if(e===void 0||t===void 0)return!1;const n=Object.keys(e),i=Object.keys(t);return n.length!==i.length?!1:n.every((s,o)=>s===i[o]&&e[s]===t[s])},(e,t)=>e&&{...e})}function l0(r){return tc(r,(e,t)=>e.every((n,i)=>n===t[i]),e=>[...e])}function kh(r){return Ls(r,(e,t)=>e.every((n,i)=>n===t[i]),e=>[...e])}function u0(r){return tc(r,(e,t)=>JSON.stringify(e)===JSON.stringify(t),e=>JSON.parse(JSON.stringify(e)))}function c0(r){return Ls(r,(e,t)=>JSON.stringify(e)===JSON.stringify(t),e=>JSON.parse(JSON.stringify(e)))}function _o(r){return kh(r)}function ug(r){return Ls(r,(e,t)=>e.length===t.length&&e.every((n,i)=>n.every((s,o)=>s===t[i][o])),e=>e.map(t=>[...t]))}function h0(r){return Ls(r,(e,t)=>e.length===t.length&&e.every((n,i)=>n.every((s,o)=>s===t[i][o])),e=>e.map(t=>[...t]))}function ec(r){const e=r instanceof Ge?[r,"value","changed"]:[...r];return e[2]=e[2]||e[1]+"Changed",e}function Vh(r,e,t,n=!1){e[2]=e[2]||e[1]+"Changed";const i=()=>{const s=e[0][e[1]];t?r[0][r[1]]=t(s):r[0][r[1]]=s};return i(),n?e[0][e[2]].disposableWeakOn(i):e[0][e[2]].disposableOn(i)}function d0(r,e,t,n,i=!1){const s=Vh(r,e,t,i),o=Vh(e,r,n,i);return()=>(s(),o())}function A(r,e,t,n=!1){const i=r instanceof Ge?[r,"value","changed"]:r,s=e instanceof Ge?[e,"value","changed"]:e;return Vh(i,s,t,n)}function tt(r,e,t,n,i=!1){const s=ec(r),o=ec(e);return d0(s,o,t,n,i)}function f0(r,e,t,n=!1){const[i]=Ul(e);return tt(r,e,s=>s??t,s=>{if(!(s===t&&i()===void 0))return s},n)}function Ca(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){var e=Math.random()*16|0,t=r==="x"?e:e&3|8;return t.toString(16)})}function nc(r,e){if(!globalThis||!globalThis.setTimeout||!globalThis.clearTimeout)throw new Error("目前只适合在浏览器中使用!");let t=0;function n(){t>0&&(globalThis.clearTimeout(t),t=0)}function i(...s){n(),t=globalThis.setTimeout(r,e,...s)}return[i,n]}function jh(r,e,...t){const n=setInterval(r,e,...t);return()=>clearInterval(n)}function Bh(r,e,...t){const n=setTimeout(r,e,...t);return()=>clearTimeout(n)}function rc(r,...e){let t;const n=()=>{const i=performance.now();r(i,...e),t=requestAnimationFrame(n)};return n(),()=>typeof t<"u"&&(cancelAnimationFrame(t),t=void 0)}function Sa(r,...e){let t;return t=requestAnimationFrame(()=>{const i=performance.now();r(i,...e)}),()=>typeof t<"u"&&(cancelAnimationFrame(t),t=void 0)}function Wl(r,...e){let t=!1,n;return new Promise((i,s)=>{n=s,i()}).then(()=>{!t&&r(...e)}).catch(i=>{console.error(i)}),()=>(t=!0)&&n&&(n("nextMicroTask cancelled!"),n=void 0)}class ic extends N{constructor(t,n,...i){super();h(this,"_cancellFunc");this._nextFunc=t,this.dispose(()=>{this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0)}),i.forEach(s=>this.dispose(s[n?"dwon":"don"](()=>{this.next()})))}next(){this._cancellFunc||(this._cancellFunc=this._nextFunc(()=>(this._cancellFunc=void 0,this.emit())))}flush(){this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0,this.emit())}}class zh extends ic{constructor(...e){super(Wl,!1,...e)}}function p0(...r){return new zh(...r)}class g0 extends ic{constructor(...e){super(Wl,!0,...e)}}function m0(...r){return new zh(...r)}class sc extends ic{constructor(...e){super(Sa,!1,...e)}}function Se(...r){return new sc(...r)}function v0(r,e){return new sc(...r).don(e())}class cg extends ic{constructor(...e){super(Sa,!0,...e)}}function y0(...r){return new cg(...r)}function Ne(r,e,t={time:"don",immediate:!1}){const n=new sc(...Array.isArray(r)?r:[r]),i=n[t.time??"don"](e);return(t.immediate??!1)&&e(),()=>{i(),n.destroy()}}function Hl(r){let e;if(typeof r.next=="function")e=r;else if(typeof r[Symbol.iterator]=="function")e=r[Symbol.iterator]();else throw new Error("iteratorOrIterable error!");return e}function Uh(r,e){let t=!1;const n=Hl(r);let i=-1;for(;;){const{done:s,value:o}=n.next();if(s)break;if(e(o,++i)){t=!0;break}}return t}function Gh(r,e){return!Uh(r,(n,i)=>!e(n,i))}function ql(r,e,t,n){const i=r;if(!i[e]){const s=n(),o=Object.fromEntries(Object.entries(s).filter(([a,l])=>{const u=Object.getPrototypeOf(t),c=a in u;if(c){const d=l instanceof Ge?l.value:l;r[a]=d}return!c}).map(([a,l])=>l instanceof Ge?[a,l]:[a,Array.isArray(l)?Xt(l):z(l)]));i[e]=o}return i[e]}function Fs(r,e){var n;const t=Symbol(`${(n=r==null?void 0:r.constructor)==null?void 0:n.name}-createDefaultProps`);r.constructor.__xbsj_dpSymbol=t,r.constructor.__xbsj_createDefaultProps=e;for(let[i,s]of Object.entries(e()))if(!Reflect.has(r,i)){const o=function(a){var c,d;if(a[t])return;const l=[];let u=Object.getPrototypeOf(a);for(;u;)l.push(u),u=Object.getPrototypeOf(u);l.reverse();for(let f of l){const p=(c=f.constructor)==null?void 0:c.__xbsj_dpSymbol;if(!p)continue;const _=(d=f.constructor)==null?void 0:d.__xbsj_createDefaultProps;_&&ql(a,p,f,_)}};Object.defineProperties(r,{[i]:{get(){return o(this),ql(this,t,r,e)[i].value},set(a){o(this);const l=ql(this,t,r,e)[i];if(!l){console.error("!propObj");debugger}l.value=a}},[`${i}Changed`]:{get(){return o(this),ql(this,t,r,e)[i].changed}},[`${i}React`]:{get(){return o(this),ql(this,t,r,e)[i]}}})}}const Xl=new WeakMap;function Ii(r,e,t){Xl.has(r)||Xl.set(r,{});const n=Xl.get(r);n[e]=t}function er(r,e){return Xl.has(r)?Xl.get(r)[e]:void 0}function xi(r,e){const t=Hl(r);let n=0;for(;;){const{done:i,value:s}=t.next();if(i)break;e(s,n++)}}function Yl(r,e,t){const n=Hl(r);let i=t,s=0;for(;;){const{done:o,value:a}=n.next();if(o)break;i=e(i,a,s++)}return i}const _0=r=>++r;function Wh(r){return Yl(r,_0,0)}function os(r){return Yl(r,(e,t)=>e>t?e:t,Number.NEGATIVE_INFINITY)}function As(r){return Yl(r,(e,t)=>e<t?e:t,Number.POSITIVE_INFINITY)}function hg(r,e){let t=r;for(let n of e)t=t[n];return t}function w0(r,e,t){if(e.length===0)throw new Error("props的数量必须大于0");const n=e.length-1,i=e[n];let s=r;for(let o=0;o<n;++o){const a=e[o];typeof s[a]>"u"&&(s[a]={}),s=s[a]}s[i]=t}function*wo(r,e){const t=Hl(r);for(;;){const{done:n,value:i}=t.next();if(n)break;yield hg(i,e)}}class Jl extends U{constructor(){super();h(this,"_innerObj");h(this,"_toChangeEvent");h(this,"_changedEvent");this._innerObj=[],this.dispose(()=>{if(this.length=0,this._innerObj.length>0)throw new Error("this._innerObj.length > 0");this._toChangeEvent&&this._toChangeEvent.reset(),this._innerObj=void 0})}get toChangeEvent(){return this._toChangeEvent||(this._toChangeEvent=new N),this._toChangeEvent}get changedEvent(){return this._changedEvent||(this._changedEvent=new N),this._changedEvent}_resetArray(t){this._toChangeEvent&&this._toChangeEvent.emit([{start:0,deleteCount:this._innerObj.length,items:t}],this);const{length:n}=t;this._innerObj.length=n;for(let i=0;i<n;++i)this._innerObj[i]=t[i];this._changedEvent&&this._changedEvent.emit(this)}splice(t,n,...i){const{length:s}=this._innerObj;t=t>this._innerObj.length?this._innerObj.length:t,t>s?t=s:t<0&&(t+=s,t<0&&(t=0));const o=this._innerObj.length-t;if(n>o?n=o:n<0&&(n=0),arguments.length===1){this._toChangeEvent&&this._toChangeEvent.emit([{start:t,deleteCount:this._innerObj.length-t,items:[]}],this);const a=this._innerObj.splice(t);return this._changedEvent&&this._changedEvent.emit(this),a}else if(arguments.length===2){this._toChangeEvent&&this._toChangeEvent.emit([{start:t,deleteCount:n,items:[]}],this);const a=this._innerObj.splice(t,n);return this._changedEvent&&this._changedEvent.emit(this),a}else{this._toChangeEvent&&this._toChangeEvent.emit([{start:t,deleteCount:n,items:i}],this);const a=this._innerObj.splice(t,n,...i);return this._changedEvent&&this._changedEvent.emit(this),a}}pop(){if(this._innerObj.length===0)return;if(this._toChangeEvent){const n=this._innerObj.length-1,i=1,s=[];this._toChangeEvent.emit([{start:n,deleteCount:i,items:s}],this)}const t=this._innerObj.pop();return this._changedEvent&&this._changedEvent.emit(this),t}push(...t){if(this._toChangeEvent){const i=this._innerObj.length;this._toChangeEvent.emit([{start:i,deleteCount:0,items:t}],this)}const n=this._innerObj.push(...t);return this._changedEvent&&this._changedEvent.emit(this),n}get length(){return this._innerObj.length}set length(t){if(t<0)throw new Error("value < 0");const{length:n}=this._innerObj;if(n!==t){if(this._toChangeEvent){let i,s,o;n>t?(i=t,s=n-t,o=[]):(i=n,s=0,o=new Array(t-n)),this._toChangeEvent.emit([{start:i,deleteCount:s,items:o}],this)}this._innerObj.length=t,this._changedEvent&&this._changedEvent.emit(this)}}get(t){return this._innerObj[t]}set(t,n){const{length:i}=this._innerObj;if(t<0||t>=i)throw new Error("index < 0 || index >= length");this._toChangeEvent&&this._toChangeEvent.emit([{start:t,deleteCount:1,items:[n]}],this),this._innerObj[t]=n,this._changedEvent&&this._changedEvent.emit(this)}indexOf(t){return this._innerObj.indexOf(t)}[Symbol.iterator](){return this._innerObj[Symbol.iterator]()}}function Hh(r,e,...t){let n=r;for(let i of t){if(!n[i])if(e)n[i]={};else return;n=n[i]}return n}function E0(r,e,t){typeof t>"u"&&(e.endsWith(".gltf")?t="model/gltf+json":e.endsWith(".bin")?t="application/octet-stream":e.endsWith(".glb")?t="model/gltf-binary":e.endsWith(".jpg")||e.endsWith(".jpeg")?t="image/jpeg":e.endsWith(".png")?t="image/png":e.endsWith(".glsl")?t="text/plain":e.endsWith(".json")?t="application/json":e.endsWith(".b3dm")||e.endsWith(".i3dm")||e.endsWith("pnts")||e.endsWith("cmpt")?t="application/octet-stream":console.warn(`save ${e}: MimeType无法确定!`));const n=new Blob([r],{type:t||""});let i=URL.createObjectURL(n);var s=document.createElement("a"),o=new MouseEvent("click");s.download=e,s.href=i,s.dispatchEvent(o),URL.revokeObjectURL(i)}function C0(r,e){const t=document.createElement("a"),n=new MouseEvent("click");t.download=e||"下载",t.href=r,t.dispatchEvent(n)}function S0(){return new Promise((r,e)=>{const t=performance.now();requestAnimationFrame(n=>r(n>t))})}const oc=r=>{let e,t;return t=n=>{n=performance.now(),e=requestAnimationFrame(t),r(n)},e=requestAnimationFrame(t),()=>{cancelAnimationFrame(e)}};function qh(r,e,t=oc){let n=Number.NEGATIVE_INFINITY,i;function s(l){l-n>e&&i&&(r(...i),i=void 0,n=l)}const o=t&&t(s)||void 0;function a(...l){i=l}return[a,o]}const dg=[];function fg(r,e,t){if(dg.includes(r)){console.warn(`_loadJs ${r} has loaded before!`),e&&e();return}var n=document.getElementsByTagName("head")[0],i=document.createElement("script");i.setAttribute("type","text/javascript"),i.setAttribute("src",r),i.onload=i.onreadystatechange=function(){this.readyState&&this.readyState!=="complete"||(dg.push(r),e&&e(),i.onload=i.onreadystatechange=null)},i.onerror=(s,o,a,l,u)=>{t(u)},n.appendChild(i)}function Xh(r,e=!0){if(e){const t=globalThis.L;globalThis.L&&(globalThis.L=void 0);const n=globalThis.define;return globalThis.define&&(globalThis.define=void 0),new Promise((i,s)=>{fg(r,i,s)}).then(()=>(globalThis.define=n,globalThis.L=t,Promise.resolve()))}else return new Promise((t,n)=>{fg(r,t,n)})}async function pg(r,e=""){return new Promise((t,n)=>{var i=new Image;i.crossOrigin=e,i.src=r,i.onload=()=>t(i),i.onerror=s=>n(s)})}class b0 extends U{constructor(e){super(),this._owner=e}get owner(){return this._owner}}function P0(r,e){if(r.length%3!==0)throw new Error("positions.length % 3 !== 0");const t=r.length/3;function*n(o){for(let a=0;a<t;++a)yield r[a*3+o]}const i=(e==null?void 0:e.min)??[NaN,NaN,NaN],s=(e==null?void 0:e.max)??[NaN,NaN,NaN];return i[0]=As(n(0))??NaN,i[1]=As(n(1))??NaN,i[2]=As(n(2))??NaN,s[0]=os(n(0))??NaN,s[1]=os(n(1))??NaN,s[2]=os(n(2))??NaN,{min:i,max:s}}async function I0(r,e=fetch){const t=await e(r);return t.ok?await t.arrayBuffer():void 0}class x0 extends U{constructor(t){super();h(this,"_map",new Map);h(this,"_array",[]);h(this,"_createEvent",this.dv(new N));h(this,"_updateEvent",this.dv(new N));h(this,"_destroyEvent",this.dv(new N));this._idFunc=t,this.d(()=>{this._array.length>0&&console.warn("EventFromArrayUpdating: destroy with non-empty array, will trigger destroy event for all items")})}get createEvent(){return this._createEvent}get updateEvent(){return this._updateEvent}get destroyEvent(){return this._destroyEvent}update(t,n={toDel:!0,toAdd:!0,toUpdate:!0}){const{toDel:i=!0,toAdd:s=!0,toUpdate:o=!0}=n;for(let l of this._array)l.updated=!1;const a=t.length;for(let l=0;l<a;++l){const u=t[l],c=this._idFunc(u,l);if(this._map.has(c)){if(o){const d=this._map.get(c);if(!d)throw new Error("!edwi");d.updated=!0,d.item=u,this._updateEvent.emit(c,u)}}else if(s){const d={item:u,id:c,updated:!0};this._array.push(d),this._map.set(c,d),this._createEvent.emit(c,u)}}if(i){const l=this._array.filter(u=>!u.updated);this._array=this._array.filter(u=>u.updated);for(let u of l)this._map.delete(u.id);for(let u of l)this._destroyEvent.emit(u.id,u.item)}}}function ac(r,...e){if(r>16)throw new Error("length > 16");const t=new Array(r);for(let n=0;n<r;++n)t[n]=e[n]??0;return t}class lc{constructor(e,t){this._xyzw=e,this._length=t}set 0(e){this._xyzw.x=e}set 1(e){this._xyzw.y=e}set 2(e){this._xyzw.z=e}set 3(e){this._xyzw.w=e}get 0(){return this._xyzw.x??0}get 1(){return this._xyzw.y??0}get 2(){return this._xyzw.z??0}get 3(){return this._xyzw.w??0}get length(){return this._length}}function T0(r){return new lc(r,2)}function O0(r){return new lc(r,3)}function D0(r){return new lc(r,4)}class N0{constructor(e,t,n,i){this._array=e,this._length=t,this._start=n,this._stride=i}get length(){return this._length}set 0(e){this._array[this._start+0*this._stride]=e}set 1(e){this._array[this._start+1*this._stride]=e}set 2(e){this._array[this._start+2*this._stride]=e}set 3(e){this._array[this._start+3*this._stride]=e}set 4(e){this._array[this._start+4*this._stride]=e}set 5(e){this._array[this._start+5*this._stride]=e}set 6(e){this._array[this._start+6*this._stride]=e}set 7(e){this._array[this._start+7*this._stride]=e}set 8(e){this._array[this._start+8*this._stride]=e}set 9(e){this._array[this._start+9*this._stride]=e}set 10(e){this._array[this._start+10*this._stride]=e}set 11(e){this._array[this._start+11*this._stride]=e}set 12(e){this._array[this._start+12*this._stride]=e}set 13(e){this._array[this._start+13*this._stride]=e}set 14(e){this._array[this._start+14*this._stride]=e}set 15(e){this._array[this._start+15*this._stride]=e}set 16(e){this._array[this._start+16*this._stride]=e}get 0(){return this._array[this._start+0*this._stride]}get 1(){return this._array[this._start+1*this._stride]}get 2(){return this._array[this._start+2*this._stride]}get 3(){return this._array[this._start+3*this._stride]}get 4(){return this._array[this._start+4*this._stride]}get 5(){return this._array[this._start+5*this._stride]}get 6(){return this._array[this._start+6*this._stride]}get 7(){return this._array[this._start+7*this._stride]}get 8(){return this._array[this._start+8*this._stride]}get 9(){return this._array[this._start+9*this._stride]}get 10(){return this._array[this._start+10*this._stride]}get 11(){return this._array[this._start+11*this._stride]}get 12(){return this._array[this._start+12*this._stride]}get 13(){return this._array[this._start+13*this._stride]}get 14(){return this._array[this._start+14*this._stride]}get 15(){return this._array[this._start+15*this._stride]}get 16(){return this._array[this._start+16*this._stride]}}function M0(r,e,t=0,n=1){return new N0(r,e,t,n)}v.Vector=void 0,(r=>{function e(G,...q){if(G=G||ac(q.length),q.length>G.length)throw new Error("args.length > target.length");return G instanceof Float64Array?G.set(q):D(q,G),G}r.set=e;function t(G,q){const yt=G.length;for(let kt=0;kt<yt;++kt)if(!q(G[kt],kt))return!1;return!0}r.every=t;function n(G,q,yt){const kt=G.length;let ie=yt;for(let Pe=0;Pe<kt;++Pe)ie=q(ie,G[Pe],Pe);return ie}r.reduce=n;function*i(G){for(let q=0;q<G.length;++q)yield G[q]}r.itr=i;const s=(G,q)=>G+=q*q;function o(G){return n(G,s,0)}r.magnitudeSquared=o;function a(G){const q=o(G);return Math.sqrt(q)}r.magnitude=a;function l(G,q=1e-5){const yt=o(G);return Math.abs(yt-1)<q}r.isNormalized=l;let u;const c=(G,q,yt)=>G+q*u[yt];function d(G,q){return C(G,q),u=q,n(G,c,0)}r.dot=d;let f;const p=(G,q,yt)=>G+=(q-f[yt])*(q-f[yt]);function _(G,q){return C(G,q),f=q,n(G,p,0)}r.distanceSquared=_;function S(G,q){return Math.sqrt(_(G,q))}r.distance=S;let b;const I=(G,q)=>G===b[q];function m(G,q){return C(G,q),b=q,t(G,I)}r.equals=m;let w,g;const y=(G,q)=>Math.abs(G-w[q])<g;function E(G,q,yt=0){return C(G,q),w=q,g=yt,t(G,y)}r.equalsEpsilon=E;function C(G,q){if(G.length!==q.length)throw new Error("left.length !== right.length")}function P(G,q,yt){const kt=G.length;yt=yt||ac(kt),C(G,yt);for(let ie=0;ie<kt;++ie)yt[ie]=q(G[ie],ie);return yt}r.op1=P;function T(G,q,yt,kt){C(G,q),kt&&C(G,kt);const ie=G.length;kt=kt||ac(ie);for(let Pe=0;Pe<ie;++Pe)kt[Pe]=yt(G[Pe],q[Pe]);return kt}r.op2=T;const x=G=>G;function D(G,q){return P(G,x,q)}r.clone=D;let R=0;const L=(G,q)=>G*R;function O(G,q,yt){return R=q,P(G,L,yt)}r.multiplyByScalar=O;function B(G,q,yt=0){const kt=o(G);if(kt<=yt)return;const ie=Math.sqrt(kt);return O(G,1/ie,q)}r.normalize=B;function j(G,q){return O(G,-1,q)}r.negate=j;const H=G=>Math.abs(G);function nt(G,q){return P(G,H,q)}r.abs=nt;const at=G=>G-Math.floor(G);function K(G,q){return P(G,at,q)}r.fract=K;const J=(G,q)=>G-q;function Q(G,q,yt){return T(G,q,J,yt)}r.subtract=Q;const mt=(G,q)=>G+q;function Ft(G,q,yt){return T(G,q,mt,yt)}r.add=Ft;const Ot=(G,q)=>G*q;function Dt(G,q,yt){return T(G,q,Ot,yt)}r.multiply=Dt;const Gt=(G,q)=>G/q;function Ce(G,q,yt){return T(G,q,Gt,yt)}r.divide=Ce;let te;const Tn=(G,q)=>G*(1-te)+q*te;function On(G,q,yt,kt){return te=yt,T(G,q,Tn,kt)}r.lerp=On})(v.Vector||(v.Vector={}));function uc(r,e=0,t=1){return r<e?e:r>t?t:r}class cc extends U{constructor(t,n,i,s,o,a,l,u){super();h(this,"__status");h(this,"_statusChangedEvent");h(this,"_forceCancelFunc");h(this,"_startEvent");h(this,"_progressEvent");h(this,"_completeEvent");h(this,"_cancelEvent");h(this,"_cancelledEvent");h(this,"_errorEvent");h(this,"_finishedEvent");h(this,"_processingID",-1);this._startProcessingFunc=t,this.startFunc=n,this.progressFunc=i,this.completeFunc=s,this.cancelFunc=o,this.cancelledFunc=a,this.errorFunc=l,this.finishedFunc=u,this._status="Initial",this.dispose(()=>{var c;return(c=this._statusChangedEvent)==null?void 0:c.destroy()}),this.dispose(()=>{var c;return(c=this._startEvent)==null?void 0:c.destroy()}),this.dispose(()=>{var c;return(c=this._progressEvent)==null?void 0:c.destroy()}),this.dispose(()=>{var c;return(c=this._completeEvent)==null?void 0:c.destroy()}),this.dispose(()=>{var c;return(c=this._cancelEvent)==null?void 0:c.destroy()}),this.dispose(()=>{var c;return(c=this._cancelledEvent)==null?void 0:c.destroy()}),this.dispose(()=>{var c;return(c=this._errorEvent)==null?void 0:c.destroy()}),this.dispose(()=>{var c;return(c=this._finishedEvent)==null?void 0:c.destroy()}),this.dispose(()=>this.reset())}get startEvent(){return this._startEvent=this._startEvent||new N,this._startEvent}get progressEvent(){return this._progressEvent=this._progressEvent||new N,this._progressEvent}get completeEvent(){return this._completeEvent=this._completeEvent||new N,this._completeEvent}get cancelEvent(){return this._cancelEvent=this._cancelEvent||new N,this._cancelEvent}get cancelledEvent(){return this._cancelledEvent=this._cancelledEvent||new N,this._cancelledEvent}get errorEvent(){return this._errorEvent=this._errorEvent||new N,this._errorEvent}get finishedEvent(){return this._finishedEvent=this._finishedEvent||new N,this._finishedEvent}_completeFunc(t,n){this.processingID===t&&this._status==="Running"&&(this._status="Completed",this.completeFunc&&this.completeFunc(n),this._completeEvent&&this._completeEvent.emit(n),this.finishedFunc&&this.finishedFunc({status:"Completed",value:n}),this._finishedEvent&&this._finishedEvent.emit({status:"Completed",value:n}))}_cancelFunc(t){this._status==="Running"&&(this._status="Cancelling",this.cancelFunc&&this.cancelFunc(t),this._cancelEvent&&this._cancelEvent.emit(t))}_cancelledFunc(t){this._status==="Cancelling"&&(this._status="Cancelled",this.cancelledFunc&&this.cancelledFunc(t),this._cancelledEvent&&this._cancelledEvent.emit(t),this.finishedFunc&&this.finishedFunc({status:"Cancelled",cancelError:t}),this._finishedEvent&&this._finishedEvent.emit({status:"Cancelled",cancelError:t}))}_errorFunc(t,n){this.processingID===t&&this._status==="Running"&&(this._status="Error",this.errorFunc&&this.errorFunc(n),this._errorEvent&&this._errorEvent.emit(n),this.finishedFunc&&this.finishedFunc({status:"Error",error:n}),this._finishedEvent&&this._finishedEvent.emit({status:"Error",error:n}))}_progressFunc(t,n){this.processingID===t&&this._status==="Running"&&(this.progressFunc&&this.progressFunc(n),this._progressEvent&&this._progressEvent.emit(n))}_startFunc(...t){if(this._status==="Initial"){this._status="Running";const n=++this._processingID,i={completeFunc:this._completeFunc.bind(this,n),errorFunc:this._errorFunc.bind(this,n),progressFunc:this._progressFunc.bind(this,n),cancelFunc:this._cancel.bind(this,n),processingID:n},s=this._startProcessingFunc(i,...t);return this._forceCancelFunc=s,this.startFunc&&this.startFunc(...t),this._startEvent&&this._startEvent.emit(...t),n}else return console.warn("this._status !== 'Initial' but start again!"),-1}set _status(t){if(this.__status!==t){const n=this.__status;this.__status=t,this._statusChangedEvent&&this._statusChangedEvent.emit(t,n)}}get _status(){return this.__status}get processingID(){return this._processingID}get statusChangedEvent(){return this._statusChangedEvent||(this._statusChangedEvent=new N),this._statusChangedEvent}reset(t){this._status==="Running"&&this.cancel(t),this._status==="Cancelled"||this._status==="Error"||this._status==="Completed"?this._status="Initial":this._status==="Cancelling"&&console.warn("Cannot reset! (this._status === 'Cancelling')")}get status(){return this._status}cancel(t,n=this.processingID){return this._cancel(n,t)}_cancel(t,n){if(this.processingID===t)if(this._status==="Running"){if(!this._forceCancelFunc)throw new Error("this._forceCancelFunc is undefined!");this._cancelFunc(n);const i=this._forceCancelFunc(n);if(this._forceCancelFunc=void 0,i&&i instanceof Promise)return i.then(()=>{this._cancelledFunc(n)});this._cancelledFunc(n)}else console.warn("this._status !== 'Running' but cancel")}start(...t){try{return this._startFunc(...t)}catch(n){console.error(`processing start error: ${n}`)}}restart(t,...n){try{return this.isRunning&&this.cancel(t),this.isFinished&&this.reset(t),this.isInitial?this._startFunc(...n):(console.warn("restart failed!"),-1)}catch(i){console.error(`processing restart error: ${i}`)}}get isCompleted(){return this._status==="Completed"}get isCancelled(){return this._status==="Cancelled"}get isCancelling(){return this._status==="Cancelling"}get isError(){return this._status==="Error"}get isInitial(){return this._status==="Initial"}get isRunning(){return this._status==="Running"}get isFinished(){return this.isCancelled||this.isCompleted||this.isError}}let Yh=class extends Error{};function gg(r,e){typeof r=="function"?r(e):r.cancelFunc=e}class Jh extends cc{constructor(t=300){super(({progressFunc:n,completeFunc:i,errorFunc:s})=>{const[o,a]=nc(()=>{if(!this._lastDebounceValue)throw new Error("!this._lastDebounceValue");n([this._lastDebounceValue,this._debouncTimes]),this._debouncTimes=0},this._delayTime);return this._d=o,()=>{a()}});h(this,"_lastDebounceValue");h(this,"_debouncTimes",0);h(this,"_d");this._delayTime=t}get delayTime(){return this._delayTime}debounce(...t){this.isRunning?(++this._debouncTimes,this._lastDebounceValue=t,this._d&&this._d()):console.warn("Debouncing is not running!")}}function mg(r,e,...t){const n=new AbortController;let i=n.signal,[s,o]=t;if(o!=null&&o.signal)throw console.error("init?.signal"),new Error("init?.signal");o=o||{},o.signal=i;let a=!1;gg(r,()=>{a=!0,n.abort()});let l=fetch(s,o);return e&&(l=l.then(u=>{if(!u.ok)return u;if(!u.body)throw Error("ReadableStream not yet supported in this browser.");const c=u.headers.get("content-length"),d=c?parseInt(c,10):0;let f=0;return new Response(new ReadableStream({start(p){if(!u.body)throw new Error("!response.body");const _=u.body.getReader();S();function S(){_.read().then(({done:b,value:I})=>{if(b){p.close();return}if(!I)throw new Error("!value");if(!e)throw new Error("!progressFunc");f+=I.byteLength,e(f,d),p.enqueue(I),S()}).catch(b=>{p.error(b)})}}}),{status:u.status,statusText:u.statusText,headers:u.headers})}).catch(u=>{throw a?(u instanceof Error&&u.code!==20&&console.error("error.code !== 20"),console.log("fetching cancelled!"),new Yh("fetching cancelled!")):(u instanceof Error&&u.code===20&&console.error("error.code === 20"),u)})),l}function vg(...r){if(r.length>=1)if(typeof r[0]=="function"||typeof r[0]>"u"){const e={};let t=mg(e,...r);const{cancelFunc:n}=e;if(!n)throw new Error("!cancelResult.cancelFunc");return[n,t]}else return mg(...r);throw new Error("cancelableFetch args error!")}class R0 extends cc{constructor(t,...n){super(({progressFunc:i,completeFunc:s,errorFunc:o},...a)=>{const l={};let u={loaded:0,total:0};const c=(p,_)=>{u.loaded=p,u.total=_,i(u)},d=this._fetchArgs||a;if(d.length===0)throw new Error("fetchArgs.length === 0");if(vg(l,c,...d).then(t).then(s).catch(p=>{p instanceof Yh||o(p)}),!l.cancelFunc)throw new Error("!cancelResult.cancelFunc");return l.cancelFunc});h(this,"_fetchArgs");n.length>0&&(this._fetchArgs=n)}get fetchArgs(){return this._fetchArgs}}function $h(r,e,t,n){const i="_"+e,s="_"+e+"Changed",o=e+"Changed";Object.defineProperties(r.prototype,{[e]:{get(){return typeof this[i]>"u"&&typeof t<"u"&&(this[i]=t),this[i]},set(a){if(typeof this[i]>"u"&&typeof t<"u"&&(this[i]=t),n?!n(this[i],a):this[i]!==a){const l=this[i];this[i]=a,this[s]&&this[s].emit(a,l)}}},[o]:{get(){return typeof this[s]>"u"&&(this[s]=new N,typeof this.dispose<"u"&&this.dispose(()=>this[s].destroy())),this[s]}}})}class Kh extends cc{constructor(t,n=!0){super(({progressFunc:i,completeFunc:s,errorFunc:o})=>(this._intervalFunc=i,this._intervalID&&console.error("this._intervalID should be undefined!"),this.leading&&i(),this._intervalID=setInterval(i,this.intervalTime),()=>{if(!this._intervalID)throw console.error("this._intervalID should not be undefined!"),new Error("this._intervalID should not be undefined!");clearInterval(this._intervalID),this._intervalID=void 0}));h(this,"_intervalID");h(this,"_intervalFunc");this.intervalTime=t,this.leading=n,this.dispose(this.intervalTimeChanged.disposableOn(()=>{this._intervalID&&this._intervalFunc&&(clearInterval(this._intervalID),this._intervalID=setInterval(this._intervalFunc,this.intervalTime))}))}}$h(Kh,"leading",!0),$h(Kh,"intervalTime",500);function L0(r,e){let t,n;const i=new Promise((o,a)=>{n=a,t=globalThis.setTimeout(()=>{t=void 0,o()},r)}),s=o=>{t&&(clearTimeout(t),t=void 0),n&&n(o??new Yh("sleep cancel error!"))};if(typeof e=="boolean"&&e)return[s,i];if(e)return gg(e,s),i}class F0{constructor(e=0,t=0,n=0,i,s){h(this,"_processData");h(this,"_lastUpdateTimeStamp",0);this.startTime=e,this.duration=t,this.delay=n,this.proccessFunc=i,this.completeFunc=s,this._processData={ratio:0,timeStamp:0,timeStampFromStart:0,timeStampFromLastUpdate:0}}update(e){const t=(e-this.startTime)/this.duration;t>=0&&(this._processData.ratio=t,this._processData.timeStamp=e,this._processData.timeStampFromStart=e-this.startTime,this._processData.timeStampFromLastUpdate=e-this._lastUpdateTimeStamp,this._lastUpdateTimeStamp=e,this.proccessFunc&&this.proccessFunc(this._processData),t>=1&&this.completeFunc&&this.completeFunc())}start(){this.startTime=performance.now()+this.delay,this._lastUpdateTimeStamp=this.startTime}}class yg extends cc{constructor(t=1e3,n=0,i=oc){let s;function o(){s&&s()}super(({progressFunc:l,completeFunc:u,errorFunc:c})=>{const d=this.startUpdateFunc&&this.startUpdateFunc(this._base.update.bind(this._base))||void 0;return this._base.startTime=performance.now(),this._base.duration=this.duration,this._base.delay=this.delay,this._base.proccessFunc=l,this._base.completeFunc=()=>{d&&d(),u()},this._base.start(),s=d,o});h(this,"_base");h(this,"duration");h(this,"delay");h(this,"startUpdateFunc");this._base=new F0,this.duration=t,this.delay=n,this.startUpdateFunc=i}get startTime(){return this._base.startTime}}class A0 extends U{constructor(t){super();h(this,"_target",0);h(this,"_current",0);h(this,"_start",0);h(this,"_timing",new yg(Number.POSITIVE_INFINITY));h(this,"_currentChanged");this._duration=t,this._timing.progressFunc=({ratio:n})=>{n=n<0?0:n>1?1:n;const i=this._start*(1-n)+this._target*n;this._current=i,this._currentChanged&&this._currentChanged.emit(this._target,this._current)},this.dispose(()=>{this._timing.isRunning&&this._timing.cancel(),this._timing.destroy()})}reset(t,n=t){this._timing.isRunning&&this._timing.cancel(),this._target=t,this._current=n,this._start=t}set target(t){if(this._target!==t){this._target=t,this._timing.isRunning&&this._timing.cancel(),this._timing.reset(),this._start=this._current;const n=Math.abs(this._target-this._start);this._timing.duration=n*this._duration,this._timing.start()}}get target(){return this._target}get current(){return this._current}get currentChanged(){return this._currentChanged||(this._currentChanged=new N),this._currentChanged}}function _g(r,e){e=e||[];const t=r.parentNode;return t?_g(t,e.concat(t)):e}function k0(r){const e=r.composedPath&&r.composedPath()||r.path,t=r.target;if(e!=null)return e.indexOf(globalThis)<0?e.concat(globalThis):e;if(t===globalThis)return[globalThis];if(t===null)throw new Error("target === null");return[t].concat(_g(t),globalThis)}function mn(r,e=!1){const{offsetX:t,offsetY:n}=r;let i=t,s=n;{const o=k0(r);for(let a=0;a<o.length;++a){const l=o[a];if(l!==r.currentTarget&&l instanceof HTMLElement)i+=l.clientLeft,s+=l.clientTop,i+=l.offsetLeft,s+=l.offsetTop;else break}}return e?[i*globalThis.devicePixelRatio,s*globalThis.devicePixelRatio]:[i,s]}function ba(r,e=!1){const t=r.target,n=r.currentTarget||r.__xbsj_lastCurrentTarget__;if(!t||!n)return[r.clientX,r.clientY];const i=t.getBoundingClientRect(),s=n.getBoundingClientRect(),o=i.left+r.offsetX,a=i.top+r.offsetY,l=o-s.left,u=a-s.top;return e?[l*globalThis.devicePixelRatio,u*globalThis.devicePixelRatio]:[l,u]}class wg extends U{constructor(t){super();h(this,"_clickEvent",new N);h(this,"_dbclickEvent",new N);h(this,"_downEvent",new N);h(this,"_upEvent",new N);h(this,"_moveEvent",new N);h(this,"_debouncing",new Jh(300));this.dispose(()=>{this._clickEvent.destroy(),this._dbclickEvent.destroy(),this._downEvent.destroy(),this._upEvent.destroy(),this._moveEvent.destroy(),this._debouncing.destroy()});let n=!1,i=[0,0],s=!1;this._debouncing.progressFunc=([[c,d,f],p])=>{p===1?this._clickEvent.emit(c,d,f):p>=2?this._dbclickEvent.emit(c,d,f):console.error("point click should not be here!")},this._debouncing.start(),this.dispose(()=>{this._debouncing.isRunning&&this._debouncing.cancel(),this._debouncing.destroy()});const o=c=>{n=!0;const[d,f]=mn(c);i[0]=d,i[1]=f,this._downEvent.emit(d,f,c)},a=c=>{const[d,f]=mn(c);n&&!s&&this._debouncing.debounce(d,f,c),n=!1,s=!1,this._upEvent.emit(d,f,c)},l=c=>{const[d,f]=mn(c);if(n&&!s){const[p,_]=i;(Math.abs(d-p)>3||Math.abs(f-_)>3)&&(s=!0)}this._moveEvent.emit(d,f,c)},u=()=>{n=!1,s=!1};t.addEventListener("pointerdown",o),t.addEventListener("pointerup",a),t.addEventListener("pointermove",l),t.addEventListener("pointerout",u),this.dispose(()=>{t.removeEventListener("pointerdown",o),t.removeEventListener("pointerup",a),t.removeEventListener("pointermove",l),t.removeEventListener("pointerout",u)})}get clickEvent(){return this._clickEvent}get dbclickEvent(){return this._dbclickEvent}get downEvent(){return this._downEvent}get upEvent(){return this._upEvent}get moveEvent(){return this._moveEvent}}class Zh extends U{constructor(){super();h(this,"_pickRectEvent",this.disposeVar(new N));h(this,"_updateRectEvent",this.disposeVar(new N));h(this,"_pointerActionEvent",this.disposeVar(new N));h(this,"_active",this.disposeVar(z(!1)));h(this,"_pickRect",{left0:0,top0:0,left1:0,top1:0});let t=0,n=0,i=0,s=0;this.dispose(this._pointerActionEvent.disposableOn(({type:o,left:a,top:l})=>{o==="PointerDown"?(this._active.value=!0,t=a,n=l,i=a,s=l,this._setPickRect({left0:t,top0:n,left1:i,top1:s}),this._updateRectEvent.emit(this._pickRect)):o==="PointerMove"?this._active.value&&(i=a,s=l,this._setPickRect({left0:t,top0:n,left1:i,top1:s}),this._updateRectEvent.emit(this._pickRect)):o==="PointerUp"&&this._active.value&&(this._active.value=!1,i=a,s=l,this._setPickRect({left0:t,top0:n,left1:i,top1:s}),this._updateRectEvent.emit(this._pickRect),this._pickRectEvent.emit(this._pickRect))}))}_setPickRect({left0:t,left1:n,top0:i,top1:s}){this._pickRect.left0=t,this._pickRect.left1=n,this._pickRect.top0=i,this._pickRect.top1=s}pointerDown(t,n){this._pointerActionEvent.emit({type:"PointerDown",left:t,top:n})}pointerMove(t,n){this._pointerActionEvent.emit({type:"PointerMove",left:t,top:n})}pointerUp(t,n){this._pointerActionEvent.emit({type:"PointerUp",left:t,top:n})}reset(){this._setPickRect({left0:0,top0:0,left1:0,top1:0}),this._updateRectEvent.emit(this._pickRect),this._pickRectEvent.emit(this._pickRect)}get activeEvent(){return this._active.changed}get updateRectEvent(){return this._updateRectEvent}get pickRectEvent(){return this._pickRectEvent}static getLeftTopAndSize(t,n){n=n||{left:0,top:0,width:0,height:0,forward:!0};const{left0:i,top0:s,left1:o,top1:a}=t;return n.width=Math.abs(i-o),n.height=Math.abs(s-a),n.left=Math.min(i,o),n.top=Math.min(s,a),n.forward=o>i,n}static contains(t,n,i){const{left:s,top:o,width:a,height:l}=i;return t>s&&t<=s+a&&n>=o&&n<=o+l}}class V0 extends Zh{constructor(e){super();const t=this.disposeVar(new wg(e));this.dispose(t.downEvent.disposableOn((o,a,l)=>l.altKey&&this.pointerDown(o,a))),this.dispose(t.moveEvent.disposableOn((o,a)=>this.pointerMove(o,a))),this.dispose(t.upEvent.disposableOn((o,a)=>this.pointerUp(o,a)));const n=document.createElement("div");n.style.backgroundColor="rgba(0, 0, 0, 0)",n.style.border="2px dashed red",n.style.position="absolute",n.style.boxSizing="border-box",n.style.pointerEvents="none",n.style.height="0px",n.style.width="0px",n.style.left="0px",n.style.top="0px",n.style.display="none",e.appendChild(n),this.dispose(()=>e.removeChild(n)),this.dispose(this.activeEvent.disposableOn(o=>{n.style.display=o?"block":"none"}));const i=()=>{this.reset()};e.addEventListener("contextmenu",i),this.dispose(()=>e.removeEventListener("contextmenu",i));const s={left:0,top:0,width:0,height:0,forward:!1};this.dispose(this.updateRectEvent.disposableOn(o=>{if(Zh.getLeftTopAndSize(o,s)){const{left:a,top:l,width:u,height:c}=s;n.style.height=`${c|0}px`,n.style.width=`${u|0}px`,n.style.left=`${a|0}px`,n.style.top=`${l|0}px`}}))}}class Jr extends Error{}function ks(r,e){er(r,"_promise_cancel")&&console.warn("setPromiseCancel warn: promise has cancelFunc!"),Ii(r,"_promise_cancel",e)}function Pa(r){return er(r,"_promise_cancel")}function Ia(r){return!!Pa(r)}function Qh(r,e){const t=Pa(r);return t?(t(e),!0):!1}function td(r){const[e,t]=r;return ks(t,e),t}function xa(r){let e;const t=new Promise((n,i)=>{e=i,r.then(n).catch(i)});return ks(t,e),t}function j0(r){let e,t;var n=new Promise((i,s)=>{t=r.disposableOn((...o)=>{t&&t(),i(o)}),e=o=>{t&&t(),s(o)}});return[e,n]}function B0(r){const e=new N,t=new N;return r.then(n=>{e.isDestroyed()||e.emit(n)}).catch(n=>{t.isDestroyed()||t.emit(n)}),[e,t]}class ed extends U{constructor(){super();h(this,"_cancelled",!1);h(this,"_cancelError");h(this,"_promiseSet",new Set);h(this,"_disposer")}get disposer(){return this._disposer=this._disposer||new U,this._disposer}destroyImp(){this.finally()}cancel(t){var n;if(!this._cancelled){this._cancelled=!0,(n=this._disposer)==null||n.destroy(),this._cancelError=t;for(let i of this._promiseSet)Qh(i);this._promiseSet.clear()}}get cancelFuncsNum(){return Yl(this._promiseSet,t=>t+1,0)}finally(){this._disposer&&!this._disposer.isDestroyed()&&this._disposer.destroy(),this._promiseSet.clear()}check(){if(this._cancelled)throw this._cancelError??new Jr("cancel from CancelManager!")}promise(t){return this._promiseSet.add(t),t.finally(()=>(this._promiseSet.delete(t),this.check()))}promiseAny(t){const n=[],i=t.map(s=>(this._promiseSet.add(s),Ia(s)&&n.push(Pa(s)),s.finally(()=>this._promiseSet.delete(s))));return Promise.any(i).finally(()=>(n.forEach((s=>s(new Jr("cancel from promiseAny!")))),n.length=0))}promiseAll(t){const n=[],i=t.map(s=>(this._promiseSet.add(s),Ia(s)&&n.push(Pa(s)),s.finally(()=>this._promiseSet.delete(s))));return Promise.all(i).finally(()=>(n.forEach((s=>s(new Jr("cancel from promiseAll!")))),n.length=0))}promiseRace(t){const n=[],i=t.map(s=>(this._promiseSet.add(s),Ia(s)&&n.push(Pa(s)),s.finally(()=>this._promiseSet.delete(s))));return Promise.race(i).finally(()=>(n.forEach((s=>s(new Jr("cancel from promiseRace!")))),n.length=0))}}class We extends U{constructor(t){super();h(this,"_status","Initial");h(this,"_completeEvent");h(this,"_errorEvent");h(this,"_completeFunc");h(this,"_errorFunc");h(this,"_cancelFunc");h(this,"_runningId",-1);this._startFunc=t,this.dispose(()=>this.isRunning&&this.cancel())}get errorEvent(){return this._errorEvent||(this._errorEvent=new N),this._errorEvent}get completeEvent(){return this._completeEvent||(this._completeEvent=new N),this._completeEvent}get errorFunc(){return this._errorFunc}get completeFunc(){return this._completeFunc}set errorFunc(t){this._errorFunc!==t&&(this._errorFunc=t)}set completeFunc(t){this._completeFunc!==t&&(this._completeFunc=t)}start(...t){if(this._status!=="Initial")return;const n=++this._runningId;this._status="Running",this._cancelFunc=this._startFunc({completeFunc:i=>{var s;n===this._runningId&&this._status==="Running"&&(this._status="Completed",this._completeFunc&&this._completeFunc(i),(s=this._completeEvent)==null||s.emit(i))},errorFunc:i=>{var s;n===this._runningId&&this._status==="Running"&&(this._status="Error",this._errorFunc&&this._errorFunc(i),(s=this._errorEvent)==null||s.emit(i))},runningingID:n},...t)}cancel(t=new Jr("")){var n;if(this._status==="Running"){if(!this._cancelFunc)throw new Error("!this._cancelFunc");this._status="Error",this._errorFunc&&this._errorFunc(t),(n=this._errorEvent)==null||n.emit(t),this._cancelFunc(t),this._cancelFunc=void 0}}reset(){this._status==="Running"&&console.error("processing cannot reset while running. you can first cancel it!"),(this._status==="Completed"||this._status==="Error")&&(this._status="Initial")}get status(){return this._status}get isInitial(){return this._status==="Initial"}get isRunning(){return this._status==="Running"}get isCompleted(){return this._status==="Completed"}get isError(){return this._status==="Error"}get runningId(){return this._runningId}restart(t=new Jr(""),...n){this.isRunning&&this.cancel(t),this.reset(),this.start(...n)}restartIfNotRunning(...t){this.isRunning||(this.reset(),this.start(...t))}}function $l(r){return(e,...t)=>{const n=new ed,{completeFunc:i,errorFunc:s}=e,o=r(n,...t).then(i).catch(s).finally(()=>n.destroy());return ks(o,n.cancel.bind(n)),a=>Qh(o,a)}}class z0 extends We{constructor(){super(({errorFunc:t},n,i)=>{try{const[s,o]=nc(n,i);return this._doFunc=s,o}catch(s){return t(s),()=>{}}});h(this,"_doFunc")}do(...t){this._doFunc&&this._doFunc(...t)}}class U0 extends We{constructor(t,n){super(({errorFunc:i})=>{try{const[s,o]=nc(t,n);return this._doFunc=s,o}catch(s){return i(s),()=>{}}});h(this,"_doFunc")}do(...t){this._doFunc&&this._doFunc(...t)}}function G0(r){return new We($l((e,...t)=>e.promise(r(...t))))}function W0(r,...e){return new We($l(t=>t.promise(r(...e))))}function hc(r){return G0((...e)=>{const t=r(...e);return Ia(t)?t:xa(t)})}function nd(r,...e){return W0(()=>{const t=r(...e);return Ia(t)?t:xa(t)})}function H0(r){let e;const t=new Promise((n,i)=>{e=()=>{r(),i()}});return ks(t,e),t}function q0(r,...e){const t=new ed,n=r(t,...e).finally(()=>t.destroy());return ks(n,t.cancel.bind(t)),n}function nr(r){return new We($l(r))}function X0(r,...e){return new We($l(t=>r(t,...e)))}function Eg(r,...e){const t=new AbortController;let n=t.signal,[i,s]=e;if(s!=null&&s.signal)throw console.error("init?.signal"),new Error("init?.signal");s=s||{},s.signal&&console.warn("revocableFetch error: init.signal would be override!"),s.signal=n;let o=!1;const a=()=>{o=!0,t.abort()};let l=fetch(i,s);return r&&(l=l.then(u=>{if(!u.ok)return u;if(!u.body)throw Error("ReadableStream not yet supported in this browser.");const c=u.headers.get("content-length");c||console.warn("response.headers.get('content-length') is undefined... cannot get contentLength!");const d=c?parseInt(c,10):0;let f=0;return new Response(new ReadableStream({start(p){if(!u.body)throw new Error("!response.body");const _=u.body.getReader();S();function S(){_.read().then(({done:b,value:I})=>{if(b){p.close();return}if(!I)throw new Error("!value");if(!r)throw new Error("!progressFunc");f+=I.byteLength,r(f,d),p.enqueue(I),S()}).catch(b=>{p.error(b)})}}}),{status:u.status,statusText:u.statusText,headers:u.headers})}).catch(u=>{throw o?(u instanceof Error&&u.code!==20&&console.error("error.code !== 20"),console.log("fetching cancelled!"),new Jr(`fetching cancelled! error: ${u}`)):(u instanceof Error&&u.code===20&&console.error("error.code === 20"),u)})),ks(l,a),l}function Y0(r,...e){return Eg(r,...e)}function rd(...r){return Eg(void 0,...r)}function J0(){return hc(rd)}function $0(...r){return nd(rd,...r)}function id(r,...e){let t=-1;var n=new Promise((i,s)=>{r.isRunning&&r.cancel(),r.reset();const o=new U;o.dispose(r.completeEvent.disposableOn(a=>{if(i(a),o.isDestroyed()){debugger;console.error(`disposer is destroyed! ${o}`);return}o.destroy()})),o.dispose(r.errorEvent.disposableOn(a=>{if(s(a),o.isDestroyed()){debugger;console.error(`disposer is destroyed! ${o}`);return}o.destroy()})),r.start(...e),t=r.runningId});return[i=>t===r.runningId&&r.isRunning&&r.cancel(i),n]}function Ti(r,e,...t){try{return e(...t)}catch(n){r(n)}}function K0(){return new We(({completeFunc:r,errorFunc:e},t)=>Sa(()=>Ti(e,()=>{t&&t(),r()})))}function Z0(r){return new We(({completeFunc:e,errorFunc:t})=>Sa(()=>Ti(t,()=>{r&&r(),e()})))}function Q0(){return new We(({completeFunc:r,errorFunc:e},t)=>Wl(()=>{Ti(e,()=>{t&&t(),r()})}))}function tw(r){return new We(({completeFunc:e,errorFunc:t})=>Wl(()=>{Ti(t,()=>{r&&r(),e()})}))}function Cg(){return new We(({completeFunc:r,errorFunc:e},t,n)=>Bh(()=>{Ti(e,()=>{t&&t(),r()})},n??1e3))}function Sg(r,e){return new We(({completeFunc:t,errorFunc:n})=>Bh(()=>{Ti(n,()=>{r&&r(),t()})},e??1e3))}function ew(){return new We(({errorFunc:r},e,t=1e3)=>jh(()=>Ti(r,e),t))}function nw(r,e=1e3){return new We(({errorFunc:t})=>jh(()=>Ti(t,r),e))}function Kl(){return new We(({errorFunc:r},e)=>rc(t=>Ti(r,e,t)))}function Ta(r){return new We(({errorFunc:e})=>rc(t=>Ti(e,r,t)))}function Zl(r,...e){let t,n;const i=new Promise((o,a)=>{n=a,t=globalThis.setTimeout(()=>{t=void 0,o(e)},r)});return ks(i,o=>{t&&(clearTimeout(t),t=void 0),n&&n(o??new Jr("sleep cancel error!"))}),i}function rw(){return hc(Zl)}function iw(r,...e){return nd(Zl,r,...e)}function Eo(r,e,...t){return r.promise(td(id(nr(async(n,...i)=>(r.disposer.dispose(()=>{n.isDestroyed()||n.cancel()}),await e(n,...i))),...t)))}function sw(r,e,...t){return r.promise(td(id(e,...t)))}class ow extends We{constructor(){super(({errorFunc:t},n,i)=>{try{const[s,o]=qh(n,i);return this._doFunc=s,o}catch(s){return t(s),()=>{}}});h(this,"_doFunc")}do(...t){this._doFunc&&this._doFunc(...t)}}class aw extends We{constructor(t,n){super(({errorFunc:i})=>{try{const[s,o]=qh(t,n);return this._doFunc=s,o}catch(s){return i(s),()=>{}}});h(this,"_doFunc")}do(...t){this._doFunc&&this._doFunc(...t)}}class dc extends U{constructor(t=1e3,n=oc){super();h(this,"_speed");h(this,"_speedChangedEvent");h(this,"_duration");h(this,"_durationChangedEvent");h(this,"_loop");h(this,"startUpdateFunc");h(this,"_updateBindThis");h(this,"_cancelStartUpdateFunc");h(this,"_startTimeStamp");h(this,"_playingChangedEvent");h(this,"_startPlayingEvent");h(this,"_stopPlayingEvent");h(this,"_loopChangedEvent");h(this,"_currentTime",this.disposeVar(z(0)));this._speed=1,this._duration=t,this._loop=!1,this.startUpdateFunc=n,this._updateBindThis=this._update.bind(this),this.dispose(()=>{this._cancelStartUpdateFunc&&(this._cancelStartUpdateFunc(),this._cancelStartUpdateFunc=void 0)}),this._startTimeStamp=Number.NaN,this.dispose(()=>{this._startPlayingEvent&&this._startPlayingEvent.reset(),this._stopPlayingEvent&&this._stopPlayingEvent.reset()})}get startPlayingEvent(){return this._startPlayingEvent=this._startPlayingEvent||new N,this._startPlayingEvent}get stopPlayingEvent(){return this._stopPlayingEvent=this._stopPlayingEvent||new N,this._stopPlayingEvent}get currentTimeChangedEvent(){return this._currentTime.changed}get loopChangedEvent(){return this._loopChangedEvent=this._loopChangedEvent||new N,this._loopChangedEvent}set loop(t){this._loop!==t&&(this._loop=t,this._loopChangedEvent&&this._loopChangedEvent.emit(this._loop))}get loop(){return this._loop}_update(t){if(Number.isNaN(this._startTimeStamp))console.warn("Number.isNaN(this._startTimeStamp)");else{const n=(t-this._startTimeStamp)*this._speed;this._setCurrentTimeInner(n)}}get currentTime(){return this._currentTime.value}set currentTime(t){this._setCurrentTimeInner(t),this._resetStartTime()}_setCurrentTimeInner(t){this._currentTime.value!==t&&(this._duration<=0?this._currentTime.value=0:t<0?this.loop?this._currentTime.value=this._duration+t%this._duration:(this._currentTime.value=0,this.playing&&this._stopPlaying()):t>this._duration?this.loop?this._currentTime.value=t%this._duration:(this._currentTime.value=this._duration,this.playing&&this._stopPlaying()):this._currentTime.value=t)}get durationChangedEvent(){return this._durationChangedEvent||(this._durationChangedEvent=new N),this._durationChangedEvent}get duration(){return this._duration}set duration(t){var n;if(t<0)console.warn("duration sholud greater than 0!");else if(this._duration!==t){const i=this._duration;this._duration=t,this._currentTime.value>this._duration&&(this._currentTime.value=this._duration),(n=this._durationChangedEvent)==null||n.emit(this._duration,i)}}get speedChangedEvent(){return this._speedChangedEvent||(this._speedChangedEvent=new N),this._speedChangedEvent}get speed(){return this._speed}set speed(t){var n;if(this._speed!==t&&t!==0){const i=this._speed;this._speed=t,this._resetStartTime(),(n=this._speedChangedEvent)==null||n.emit(this._speed,i)}}_resetStartTime(){this._startTimeStamp=performance.now()-this._currentTime.value/this._speed}_startPlaying(){var t,n;this._resetStartTime(),this._cancelStartUpdateFunc=this.startUpdateFunc(this._updateBindThis),(t=this._startPlayingEvent)==null||t.emit(this._currentTime.value),(n=this._playingChangedEvent)==null||n.emit(!0)}_stopPlaying(){var t,n;if(!this._cancelStartUpdateFunc)throw new Error("this._cancelStartUpdateFunc is undefined!");this._cancelStartUpdateFunc(),this._cancelStartUpdateFunc=void 0,(t=this._stopPlayingEvent)==null||t.emit(this._currentTime.value),(n=this._playingChangedEvent)==null||n.emit(!1)}get playingChangedEvent(){return this._playingChangedEvent||(this._playingChangedEvent=new N),this._playingChangedEvent}get playing(){return!!this._cancelStartUpdateFunc}set playing(t){!!this._cancelStartUpdateFunc!==t&&(t?this._startPlaying():this._stopPlaying())}}class Ql extends U{constructor(t){super();h(this,"_stop",this.disposeVar(z(0)));h(this,"_current",this.disposeVar(z(0)));h(this,"_start",this.disposeVar(z(0)));h(this,"_player",this.disposeVar(new dc(200)));this.dispose(this._player.currentTimeChangedEvent.disposableOn(n=>{let i=n/this._player.duration;i=i>1?1:i<0?0:i;const s=this._start.value,o=this._stop.value;this._current.value=s+(o-s)*i})),this.duration=t}get current(){return this._current.value}get currentChanged(){return this._current.changed}get source(){return this._start.value}get sourceChanged(){return this._start.changed}get target(){return this._stop.value}get targetChanged(){return this._stop.changed}get duration(){return this._player.duration}set duration(t){this._player.duration=t}set target(t){this._start.value=this._current.value,this._stop.value=t,this._player.currentTime=0,this._player.playing=!0}reset(t){this._start.value=t,this._current.value=t,this._stop.value=t,this._player.playing=!1}}let bg=-1;class ce extends N{constructor(e,t,n,i){super(),this._domElement=e,this._type=t,this.callback=i;const s=o=>(o.__xbsj_listenerNo__=++bg,o.__xbsj_listenerTime__=Date.now(),o.__xbsj_lastCurrentTarget__=o.currentTarget,this.emit(o),this.callback&&this.callback(o));this._domElement.addEventListener(this._type,s,n),this.dispose(()=>this._domElement.removeEventListener(this._type,s,n))}static getLastLisenNo(){return bg}static getCurrentTarget(e){return e.__xbsj_lastCurrentTarget__}static getListenerNo(e){return e.__xbsj_listenerNo__}static getListenerTime(e){return e.__xbsj_listenerTime__}static on(e,t){const n=ce.getLastLisenNo();return e.disposableOn(i=>{const s=ce.getListenerNo(i);(s===void 0||s>n)&&t(i)})}get element(){return this._domElement}static create(e,t,n){return new ce(e,t,n)}}class sd extends U{constructor(){super();h(this,"_clickEvent",this.disposeVar(new N));h(this,"_dbclickEvent",this.disposeVar(new N));h(this,"_pointerdownEvent",this.disposeVar(new N));h(this,"_pointerupEvent",this.disposeVar(new N));h(this,"_pointermoveEvent",this.disposeVar(new N));h(this,"_pointeroutEvent",this.disposeVar(new N));h(this,"dbClickDelayTime",300);h(this,"nativeClickDelayTime",500);h(this,"clickMovementTolerantPixelSize",3);h(this,"debugging",!1);h(this,"_enabled",this.disposeVar(z(!0)));const t=this.disposeVar(nr(async i=>{do{const s=await Eo(i,l=>new Promise((u,c)=>{l.disposer.dispose(c),l.disposer.dispose(ce.on(this._pointerdownEvent,u))})),o=mn(s);if(this.debugging&&console.log(`鼠标按下 ${o.toString()}`),!await Eo(i,l=>new Promise((u,c)=>{l.disposer.dispose(c);const d=setTimeout(()=>u(!0),this.nativeClickDelayTime);l.disposer.dispose(()=>clearTimeout(d)),l.disposer.dispose(ce.on(this._pointermoveEvent,f=>{const[p,_]=mn(f),[S,b]=o;(Math.abs(p-S)>3||Math.abs(_-b)>3)&&u(!1)})),l.disposer.dispose(ce.on(this._pointeroutEvent,()=>u(!1))),l.disposer.dispose(ce.on(this._pointerupEvent,()=>u(!0)))}))){this.debugging&&console.log("取消1");continue}const a=await Eo(i,l=>new Promise((u,c)=>{l.disposer.dispose(c);const d=setTimeout(()=>u("timeout"),this.dbClickDelayTime);l.disposer.dispose(()=>clearTimeout(d)),l.disposer.dispose(ce.on(this._pointermoveEvent,f=>{const[p,_]=mn(f),[S,b]=o;(Math.abs(p-S)>3||Math.abs(_-b)>3)&&u("moved")})),l.disposer.dispose(ce.on(this._pointerdownEvent,u)),l.disposer.dispose(ce.on(this._pointeroutEvent,()=>u("pointouted"))),l.disposer.dispose(ce.on(this._pointerupEvent,()=>u("pointuped")))}));if(typeof a=="string"){this.debugging&&console.log(`触发单击事件!取消双击监听!error: ${a}`),this._clickEvent.emit(s);continue}if(!await Eo(i,l=>new Promise((u,c)=>{l.disposer.dispose(c);const d=setTimeout(()=>u(!1),this.nativeClickDelayTime);l.disposer.dispose(()=>clearTimeout(d)),l.disposer.dispose(ce.on(this._pointermoveEvent,f=>{const[p,_]=mn(f),[S,b]=o;(Math.abs(p-S)>3||Math.abs(_-b)>3)&&u(!1)})),l.disposer.dispose(ce.on(this._pointeroutEvent,()=>u(!1))),l.disposer.dispose(ce.on(this._pointerupEvent,()=>u(!0)))}))){this.debugging&&console.log("取消2");continue}this.debugging&&console.log("触发双击事件!"),this._dbclickEvent.emit(a)}while(!0)})),n=i=>{i?t.restart():t.isRunning&&t.cancel()};n(this.enabled),this.dispose(this.enabledChanged.disposableOn(n))}get clickEvent(){return this._clickEvent}get dbclickEvent(){return this._dbclickEvent}pointerDown(t){this._pointerdownEvent.emit(t)}pointerUp(t){this._pointerupEvent.emit(t)}pointerMove(t){this._pointermoveEvent.emit(t)}pointerOut(t){this._pointeroutEvent.emit(t)}get enabled(){return this._enabled.value}set enabled(t){this._enabled.value=t}get enabledChanged(){return this._enabled.changed}}class lw extends U{constructor(t,n){super();h(this,"_pointerClick",this.disposeVar(new sd));this._div=t;const{div:i,pointerClick:s}=this,o=c=>s.pointerDown(c),a=c=>s.pointerMove(c),l=c=>s.pointerOut(c),u=c=>s.pointerUp(c);i.addEventListener("pointerdown",o,n),i.addEventListener("pointermove",a,n),i.addEventListener("pointerout",l,n),i.addEventListener("pointerup",u,n),this.dispose(()=>{i.removeEventListener("pointerdown",o,n),i.removeEventListener("pointermove",a,n),i.removeEventListener("pointerout",l,n),i.removeEventListener("pointerup",u,n)})}get div(){return this._div}get pointerClick(){return this._pointerClick}get clickEvent(){return this.pointerClick.clickEvent}get dbclickEvent(){return this.pointerClick.dbclickEvent}}class Pg extends U{constructor(){super();h(this,"_hoverEvent",this.disposeVar(new N));h(this,"_hoverOutEvent",this.disposeVar(new N));h(this,"_pointerdownEvent",this.disposeVar(new N));h(this,"_pointerupEvent",this.disposeVar(new N));h(this,"_pointermoveEvent",this.disposeVar(new N));h(this,"_pointeroutEvent",this.disposeVar(new N));h(this,"delayTime",800);const t=this.disposeVar(Cg()),n=u=>{this._hoverOutEvent.emit()},i=u=>{this._hoverOutEvent.emit()};let s;const o=()=>{if(!s){console.warn("!lastPointerEvent");return}this._hoverEvent.emit(s)},a=u=>{s=u,t.restart(void 0,o,this.delayTime),this._hoverOutEvent.emit()},l=u=>{t.cancel(),this._hoverOutEvent.emit()};this.dispose(this._pointerdownEvent.disposableOn(n)),this.dispose(this._pointerupEvent.disposableOn(i)),this.dispose(this._pointermoveEvent.disposableOn(a)),this.dispose(this._pointeroutEvent.disposableOn(l))}get hoverEvent(){return this._hoverEvent}get hoverOutEvent(){return this._hoverOutEvent}pointerDown(t){this._pointerdownEvent.emit(t)}pointerUp(t){this._pointerupEvent.emit(t)}pointerMove(t){this._pointermoveEvent.emit(t)}pointerOut(t){this._pointeroutEvent.emit(t)}}class uw extends U{constructor(t,n=1500){super();h(this,"_hoverEvent",new N);h(this,"_hoverOutEvent",new N);const i=new Jh(n);this.dispose(()=>i.destroy());let s=0,o=0,a;i.progressFunc=()=>this._hoverEvent.emit(s,o,a);const l=f=>{!i.isRunning&&i.restart(),a=f,[s,o]=mn(f),i.debounce(),this._hoverOutEvent.emit()},u=f=>{!i.isRunning&&i.restart(),a=f,[s,o]=mn(a),i.debounce(),this._hoverOutEvent.emit()},c=f=>{!i.isRunning&&i.restart(),a=f,[s,o]=mn(a),i.debounce(),this._hoverOutEvent.emit()},d=f=>{i.isRunning&&i.cancel(),this._hoverOutEvent.emit()};t.addEventListener("pointerdown",l),t.addEventListener("pointerup",u),t.addEventListener("pointermove",c),t.addEventListener("pointerout",d),this.dispose(()=>{t.removeEventListener("pointerdown",l),t.removeEventListener("pointerup",u),t.removeEventListener("pointermove",c),t.removeEventListener("pointerout",d)})}get hoverEvent(){return this._hoverEvent}get hoverOutEvent(){return this._hoverOutEvent}}class Ig extends U{constructor(t,n={}){super();h(this,"_needRedrawEvent");h(this,"_needPickRedrawEvent");h(this,"_id",Ca());h(this,"_clickEvent");h(this,"_clickOutEvent");h(this,"_dbclickEvent");h(this,"_dbclickOutEvent");h(this,"_actived",!1);h(this,"_activedChanged");h(this,"_hovered",!1);h(this,"_hoveredChanged");h(this,"_selected",!1);h(this,"_selectedChanged");h(this,"_opacity",1);h(this,"_opacityChanged");h(this,"_show",!0);h(this,"_showChanged");this._canvasPrimitivesContext=t;const{needRedraw:i=!0,needPickRedraw:s=!0}=n;i&&(this._needRedrawEvent=new N),s&&(this._needPickRedrawEvent=new N),this._canvasPrimitivesContext.addPoi(this),this.dispose(()=>this._canvasPrimitivesContext.removePoi(this)),this.dispose(this.showChanged.disposableOn(()=>{this.needRedraw(),this.needPickRedraw()})),this.dispose(this.opacityChanged.disposableOn(()=>this.needRedraw()))}get id(){return this._id}set id(t){this._id=t}get context(){return this._canvasPrimitivesContext}needRedraw(){this._needRedrawEvent?this._needRedrawEvent.emit():console.warn("no needRedrawEvent!")}needPickRedraw(){this._needPickRedrawEvent?this._needPickRedrawEvent.emit():console.warn("no needPickRedrawEvent!")}hasClickEvent(){return!!this._clickEvent}get clickEvent(){return this._clickEvent=this._clickEvent||new N,this._clickEvent}hasClickOutEvent(){return!!this._clickOutEvent}get clickOutEvent(){return this._clickOutEvent=this._clickOutEvent||new N,this._clickOutEvent}hasDbclickEvent(){return!!this._dbclickEvent}get dbclickEvent(){return this._dbclickEvent=this._dbclickEvent||new N,this._dbclickEvent}hasDbclickOutEvent(){return!!this._dbclickOutEvent}get dbclickOutEvent(){return this._dbclickOutEvent=this._dbclickOutEvent||new N,this._dbclickOutEvent}set actived(t){this._actived!==t&&(this._actived=t,this._activedChanged&&this._activedChanged.emit(t,this))}get actived(){return this._actived}get activedChanged(){return this._activedChanged=this._activedChanged||new N,this._activedChanged}set hovered(t){this._hovered!==t&&(this._hovered=t,this._hoveredChanged&&this._hoveredChanged.emit(t,this))}get hovered(){return this._hovered}get hoveredChanged(){return this._hoveredChanged=this._hoveredChanged||new N,this._hoveredChanged}set selected(t){this._selected!==t&&(this._selected=t,this._selectedChanged&&this._selectedChanged.emit(t,this))}get selected(){return this._selected}get selectedChanged(){return this._selectedChanged=this._selectedChanged||new N,this._selectedChanged}set opacity(t){this._opacity!==t&&(this._opacity=t,this._opacityChanged&&this._opacityChanged.emit(t,this))}get opacity(){return this._opacity}get opacityChanged(){return this._opacityChanged=this._opacityChanged||new N,this._opacityChanged}set show(t){this._show!==t&&(this._show=t,this._showChanged&&this._showChanged.emit(t,this))}get show(){return this._show}get showChanged(){return this._showChanged=this._showChanged||new N,this._showChanged}}class od extends Ig{constructor(t,n=[0,0],i=0){super(t);h(this,"_winPosAndDepthChanged");this._winPos=n,this._depth=i,this.dispose(this.winPosAndDepthChanged.disposableOn(()=>{this.needRedraw(),this.needPickRedraw()}))}set winPos(t){(this._winPos[0]!==t[0]||this._winPos[1]!==t[1])&&(this._winPos[0]=t[0],this._winPos[1]=t[1],this._winPosAndDepthChanged&&this._winPosAndDepthChanged.emit(this._winPos,this._depth))}get winPos(){return this._winPos}set depth(t){this._depth!==t&&(this._depth=t,this._winPosAndDepthChanged&&this._winPosAndDepthChanged.emit(this._winPos,this._depth))}get depth(){return this._depth}get winPosAndDepthChanged(){return this._winPosAndDepthChanged||(this._winPosAndDepthChanged=new N),this._winPosAndDepthChanged}}function Co(r,e,t,n){const[i,s]=r,[o,a,l,u]=n,c=e[0]*t[0],d=e[1]*t[1],f=i-(c*o+l),p=s-(d*a+u);return{left:f,top:p,right:f+c,bottom:p+d}}function So(r,e,t,n,i){r.beginPath(),r.moveTo(e,t),r.lineTo(e-n*.5,t-n*.5),r.arc(e,t-n,n*.7071067811865475,Math.PI*.75,Math.PI*.25),r.lineTo(e,t),r.fillStyle=i,r.fill()}function cw(r,e,t,n,i,s){if(r.beginPath(),r.moveTo(e+n,t),r.arc(e,t,n,0,2*Math.PI),s){const o=r.createRadialGradient(e,t,0,e,t,n);o.addColorStop(0,i),o.addColorStop(1,i.replace(/[\d\.]+\)$/,"0)")),r.fillStyle=o}else r.fillStyle=i;r.fill()}function xg(r,e,t,n,i,s){r.beginPath(),r.moveTo(e+s,t),r.lineTo(e+n-s,t),r.arcTo(e+n,t,e+n,t+s,s),r.lineTo(e+n,t+i-s),r.arcTo(e+n,t+i,e+n-s,t+i,s),r.lineTo(e+s,t+i),r.arcTo(e,t+i,e,t+i-s,s),r.lineTo(e,t+s),r.arcTo(e,t,e+s,t,s)}function Tg(r,e,t,n,i,s){r.font=i;const o=r.measureText(n),a=o.actualBoundingBoxLeft+o.actualBoundingBoxRight,l=Number.isFinite(o.fontBoundingBoxAscent)?o.fontBoundingBoxAscent:o.actualBoundingBoxAscent,u=Number.isFinite(o.fontBoundingBoxDescent)?o.fontBoundingBoxDescent:o.actualBoundingBoxDescent;let c=l+u;r.fillStyle=s,r.fillText(n,e-a*.5,t+c*.5-u)}function Og(r){const{width:e,height:t}=r,n=e instanceof SVGAnimatedLength?e.baseVal.SVG_LENGTHTYPE_PX:e,i=t instanceof SVGAnimatedLength?t.baseVal.SVG_LENGTHTYPE_PX:t,s=document.createElement("canvas");s.width=n,s.height=i;const o=s.getContext("2d");if(!o)throw new Error("!cavnasCtx");return o.drawImage(r,0,0,n,i),s}function Dg(r,e){const{width:t,height:n}=r,i=r.getContext("2d");if(!i)throw new Error("!cavnasCtx");const[s,o,a]=e.map(d=>d*255|0),l=i.getImageData(0,0,t,n),u=l.data;for(var c=0;c<u.length;c+=4)u[c]=s,u[c+1]=o,u[c+2]=a;i.putImageData(l,0,0)}function ad(r,e,t,n=[.5,1,0,0],i,s="12px Arial",o=2,a="#FFF",l="#000A"){r.font=s;const u=r.measureText(i),c=u.actualBoundingBoxLeft+u.actualBoundingBoxRight,d=u.fontBoundingBoxAscent+u.fontBoundingBoxDescent,f=e,p=t,_=c+o*2,S=d+o*2,{left:b,top:I,bottom:m}=Co([f,p],[_,S],[1,1],n);r.fillStyle=l,xg(r,b,I,_,S,o),r.fill(),r.fillStyle=a,r.fillText(i,b+o,m-o-u.fontBoundingBoxDescent)}function tu(r){return("00"+r.toString(16).toUpperCase()).substr(-2)}function eu(r){const[e,t,n,i]=r.map(s=>s*255|0);return`#${tu(e)}${tu(t)}${tu(n)}${tu(i)}`}function ld(r,e){const[t,n,i]=e,s=`${t}-${n}-${i}`;let o=er(r,s);return o||(o=Og(r),Dg(o,e),Ii(r,s,o)),o}class hw extends od{constructor(t,n,i=[32,32],s=[.5,1,0,0],o="#F00F"){super(t);h(this,"_tooltip","");h(this,"_title","");h(this,"__scale",[1,1]);h(this,"_tooltipAlpha",0);h(this,"_bgColor",[.3,.3,.3,.8]);h(this,"_bgColorHexStr",eu(this._bgColor));h(this,"_fgColor",[1,1,1,1]);h(this,"_fgColorHexStr",eu(this._fgColor));this._image=n,this._size=i,this._originRatioAndOffset=s,this._defaultColorStr=o;const a=new Ql(100),l=new Ql(100);this.dispose(()=>{a.destroy(),l.destroy()});const u=()=>{if(this._clickEvent&&!this._clickEvent.empty){const c=(1+.08*l.current)*(1+.08*a.current);this._scale=[c,c],this._tooltipAlpha=a.current}};this.dispose(this.activedChanged.disposableOn(c=>{l.target=c?1:0,this.needRedraw()})),this.dispose(this.hoveredChanged.disposableOn(c=>{a.target=c?1:0,this.needRedraw()})),this.dispose(this.selectedChanged.disposableOn(()=>{this.needRedraw()})),this.dispose(l.currentChanged.disposableOn(u)),this.dispose(a.currentChanged.disposableOn(u))}set size(t){const[n,i]=t,[s,o]=this._size;(s!==n||o!==i)&&(this._size[0]=n,this._size[1]=i,this.needRedraw(),this.needPickRedraw())}get size(){return this._size}set _scale(t){const[n,i]=t,[s,o]=this.__scale;(s!==n||o!==i)&&(this.__scale[0]=n,this.__scale[1]=i,this.needRedraw(),this.needPickRedraw())}get _scale(){return this.__scale}set fgColor(t){if(!this._fgColor.every((n,i)=>t[i]===n)){const[n,i,s,o]=t;this._fgColor.splice(0,4,n,i,s,o),this._fgColorHexStr=eu(this._fgColor),this.needRedraw()}}get fgColor(){return this._fgColor}set bgColor(t){if(!this._bgColor.every((n,i)=>t[i]===n)){const[n,i,s,o]=t;this._bgColor.splice(0,4,n,i,s,o),this._bgColorHexStr=eu(this._bgColor),this.needRedraw()}}get bgColor(){return this._bgColor}set originRatioAndOffset(t){const[n,i,s,o]=this._originRatioAndOffset,[a,l,u,c]=t;(n!==a||i!==l||s!==u||o!==c)&&(this._originRatioAndOffset.splice(0,4,a,l,u,c),this.needRedraw(),this.needPickRedraw())}get originRatioAndOffset(){return this._originRatioAndOffset}set image(t){this._image!==t&&(this._image=t,this.needRedraw())}get image(){return this._image}set defaultColorStr(t){this._defaultColorStr!==t&&(this._defaultColorStr=t,this.needRedraw())}get defaultColorStr(){return this._defaultColorStr}set tooltip(t){this._tooltip!==t&&(this._tooltip=t,this.needRedraw())}get tooltip(){return this._tooltip}set title(t){this._title!==t&&(this._title=t,this.needRedraw())}get title(){return this._title}draw(t){if(!this._show)return;const[n,i]=this._winPos,s=this._size[0]*this.__scale[0],o=this._size[1]*this.__scale[1],{left:a,top:l}=Co([n,i],this._size,this.__scale,this._originRatioAndOffset),u=t.globalAlpha;if(t.globalAlpha=this.opacity,this._image){if(this.selected){const c=ld(this._image,[1,0,0]),{left:d,top:f}=Co([n,i+3],[s+6,o+6],[1,1],this._originRatioAndOffset);t.drawImage(c,d,f,s+6,o+6)}if(this.actived){const[c,d,f,p]=this._fgColor,_=ld(this._image,[c,d,f]),{left:S,top:b}=Co([n,i+4],[s+8,o+8],[1,1],this._originRatioAndOffset);t.drawImage(_,S,b,s+8,o+8)}if(this.hovered){const[c,d,f,p]=this._bgColor,_=ld(this._image,[c,d,f]),{left:S,top:b}=Co([n,i+2],[s+4,o+4],[1,1],this._originRatioAndOffset);t.drawImage(_,S,b,s+4,o+4)}t.drawImage(this._image,a,l,s,o)}else t.fillStyle=this._fgColorHexStr,t.fillRect(a,l,s,o);if(this._title!==""&&ad(t,n+20,i-16,[0,.5,0,0],this._title,"14px Arial",4,this._fgColorHexStr,this._bgColorHexStr),t.globalAlpha=u,this._hovered&&this._tooltip!==""){const c=t.globalAlpha;t.globalAlpha=this._tooltipAlpha,ad(t,n,i-42,[.5,1,0,0],this._tooltip,"12px Arial",4,this._fgColorHexStr,this._bgColorHexStr),t.globalAlpha=c}}drawForPick(t,n){if(!this._show)return;const[i,s]=this._winPos,o=n("default"),a=this._size[0]*this.__scale[0],l=this._size[1]*this.__scale[1],{left:u,top:c}=Co([i,s],this._size,this.__scale,this._originRatioAndOffset);t.fillStyle=o,t.fillRect(u,c,a,l)}}class dw extends od{constructor(t){super(t);h(this,"_width",16);h(this,"_text","");h(this,"_fillStyle","#0F0");h(this,"_scale",1);h(this,"_scaleChanged");this.dispose(this.scaleChanged.disposableOn(o=>{this.needRedraw(),this.needPickRedraw()}));const n=this.disposeVar(new Ql(100)),i=this.disposeVar(new Ql(100)),s=()=>{this._clickEvent&&!this._clickEvent.empty&&(this.scale=(1+.1*i.current)*(1+.2*n.current))};this.dispose(i.currentChanged.disposableOn(s)),this.dispose(n.currentChanged.disposableOn(s)),this.dispose(this.activedChanged.disposableOn(o=>{i.target=o?1:0,this.needRedraw()})),this.dispose(this.hoveredChanged.disposableOn(o=>{n.target=o?1:0,this.needRedraw()})),this.dispose(this.selectedChanged.disposableOn(o=>{this.needRedraw()}))}set scale(t){this._scale!==t&&(this._scale=t,this._scaleChanged&&this._scaleChanged.emit(t,this))}get scale(){return this._scale}get scaleChanged(){return this._scaleChanged||(this._scaleChanged=new N),this._scaleChanged}set width(t){this._width!==t&&(this._width=t,this.needRedraw(),this.needPickRedraw())}get width(){return this._width}set text(t){this._text!==t&&(this._text=t,this.needRedraw())}get text(){return this._text}set fillStyle(t){this._fillStyle!==t&&(this._fillStyle=t,this.needRedraw())}get fillStyle(){return this._fillStyle}draw(t){if(!this._show)return;const[n,i]=this._winPos,s=t.globalAlpha;t.globalAlpha=this.opacity;const o=this._width*this._scale;this.selected&&So(t,n,i+3,o+3,"#F00"),this.actived&&this._clickEvent&&!this._clickEvent.empty&&So(t,n,i+5,o+5,"#FFF"),this.hovered?So(t,n,i+3,o+3,"#000A"):So(t,n,i+1,o+1,"#000A"),So(t,n,i,o,this._fillStyle);const a=this._scale>1.2?"bold 14px Arial":"bold 10px Arial";Tg(t,n,i-o,this._text,a,"#000"),t.globalAlpha=s}drawForPick(t,n){if(!this._show)return;const[i,s]=this._winPos,o=this._width*this._scale,a=n("default");So(t,i,s,o,a)}}const Ng=new ArrayBuffer(4),Mg=new Uint32Array(Ng),bo=new Uint8Array(Ng);function Rg(r){if(r>=16777215)throw new Error("uint32 > 0xFFFFFF");return Mg[0]=r,[bo[0],bo[1],bo[2]]}function Lg(r,e,t){return bo[0]=r,bo[1]=e,bo[2]=t,bo[3]=0,Mg[0]}class Fg extends U{constructor(){super(...arguments);h(this,"_pickColors",new Array(16777215));h(this,"_pickColorIndex",0)}reset(){for(let t=0;t<this._pickColorIndex;++t){const n=this._pickColors[t];if(!n)throw console.error("this._pickColors[i] should not be undefined!"),new Error("this._pickColors[i] should not be undefined!");n.poi=null,n.tag=""}this._pickColorIndex=0}createPickColor(t,n){const i=this._pickColorIndex;++this._pickColorIndex;const s=this._pickColors[i];s?(s.poi=t,s.tag=n):this._pickColors[i]={poi:t,tag:n};const[o,a,l]=Rg(i);return[o,a,l]}getPickInfoFromColor(t,n,i){const s=Lg(t,n,i);if(s>=this._pickColorIndex){console.error("index >= this._pickColorIndex");return}const o=this._pickColors[s];if(!o){console.error("!this._pickColors[index]");return}return o}destroyImp(){this.reset()}}const Ag=(r,e)=>e.depth-r.depth;class fw extends U{constructor(){super();h(this,"_pois",[]);h(this,"_canvasElement");h(this,"_ctx");h(this,"_offscreenCanvasElement");h(this,"_offscreenCanvasElement2");h(this,"_offscreenCtx");h(this,"_offscreenCtx2");h(this,"_size",[0,0]);h(this,"_needRedraw",!1);h(this,"_needPickRedraw",!1);h(this,"_pickColorManager",new Fg);const t=document.createElement("canvas");t.style.width="100%",t.style.height="100%",this._canvasElement=t;const n=t.getContext("2d");if(n===null)throw new Error("cannot get context 2d!");this._ctx=n,this._offscreenCanvasElement=document.createElement("canvas"),this._offscreenCtx=this._offscreenCanvasElement.getContext("2d"),this._offscreenCtx.imageSmoothingEnabled=!1,this._offscreenCanvasElement2=document.createElement("canvas"),this._offscreenCtx2=this._offscreenCanvasElement2.getContext("2d"),this._offscreenCtx2.imageSmoothingEnabled=!1,this.disposeVar(Ta(()=>{const[s,o]=this._size,{clientWidth:a,clientHeight:l}=this._canvasElement;(s!==a||o!==l)&&(this._size[0]=a,this._size[1]=l,this._canvasElement.width=a,this._canvasElement.height=l,this._offscreenCanvasElement.width=a,this._offscreenCanvasElement.height=l,this._offscreenCanvasElement2.width=a,this._offscreenCanvasElement2.height=l,this._dirty()),this._needRedraw&&(this._needRedraw=!1,this._draw())})).start()}get element(){return this._canvasElement}get pois(){return this._pois}_dirty(){this._needRedraw=!0,this._needPickRedraw=!0}get size(){return this._size}addPoi(t){if(typeof er(t,"listenHandler")<"u"){console.error("可能有poi重复加载poiManager中!");return}if(this._pois.indexOf(t)!==-1){console.error("同一个poi加了多次!");return}this._pois.push(t),this._dirty();const n=t._needRedrawEvent;if(n){const s=n.on(()=>{this._needRedraw=!0});Ii(t,"needRedrawEventHandler",s)}const i=t._needPickRedrawEvent;if(i){const s=i.on(()=>{this._needPickRedraw=!0});Ii(t,"needPickRedrawEventHandler",s)}}removePoi(t){const n=this._pois.indexOf(t);if(n===-1){console.error("删除一个不存在的poi!");return}this._pois.splice(n,1),this._dirty();const i=t._needRedrawEvent;if(i){const o=er(t,"needRedrawEventHandler");o?i.off(o):console.error("poi没有listenHandler!")}const s=t._needPickRedrawEvent;if(s){const o=er(t,"needPickRedrawEventHandler");o?s.off(o):console.error("poi没有listenHandler!")}}_draw(){this._pois.sort(Ag);const[t,n]=this._size;this._ctx.clearRect(0,0,t,n),this._pois.forEach(i=>i.draw(this._ctx))}pick(t,n,i,s){return this._needPickRedraw&&(this._needPickRedraw=!1,this._pickDraw()),this._getPickInfo(t,n,i,s)}_pickDraw(){this._pickColorManager.reset(),this._pois.sort(Ag);const[t,n]=this._size;this._offscreenCtx.clearRect(0,0,t,n),this._pois.forEach(i=>{const s=o=>{const[a,l,u]=this._pickColorManager.createPickColor(i,o);return`rgb(${a}, ${l}, ${u})`};i.drawForPick(this._offscreenCtx,s)})}_getPickInfo(t,n,i,s){const o=this._offscreenCtx.getImageData(t,n,i,s),a=[],l=o.data.length/4;for(let u=0;u<l;++u){const c=o.data[u*4+0],d=o.data[u*4+1],f=o.data[u*4+2];if(o.data[u*4+3]===255){const _=this._pickColorManager.getPickInfoFromColor(c,d,f);if(_&&_.poi&&!a.includes(_)){let S=!0;{const[b,I]=this._size;this._offscreenCtx2.clearRect(0,0,b,I);const m=C=>"rgb(255, 255, 255)";_.poi.drawForPick(this._offscreenCtx2,m);const w=this._offscreenCtx2.getImageData(t,n,i,s),g=w.data[u*4+0],y=w.data[u*4+1],E=w.data[u*4+2];w.data[u*4+3],g===255&&y===255&&E===255||(S=!1)}S&&a.push(_)}}}return a}}class ud extends U{constructor(){super(...arguments);h(this,"_closeEvent");h(this,"_show",!0);h(this,"_showChanged");h(this,"_opacity",1);h(this,"_opacityChanged");h(this,"_winPos",[0,0]);h(this,"_winPosChanged")}set winPos(t){const[n,i]=t,[s,o]=this._winPos;(n!==s||i!==o)&&(this._winPos[0]=n,this._winPos[1]=i,this._winPosChanged&&this._winPosChanged.emit(this._winPos))}get winPos(){return this._winPos}get winPosChanged(){return this._winPosChanged=this._winPosChanged||new N,this._winPosChanged}set opacity(t){this._opacity!==t&&(this._opacity=t,this._opacityChanged&&this._opacityChanged.emit(this._opacity))}get opacity(){return this._opacity}get opacityChanged(){return this._opacityChanged=this._opacityChanged||new N,this._opacityChanged}set show(t){this._show!==t&&(this._show=t,this._showChanged&&this._showChanged.emit(this._show))}get show(){return this._show}get showChanged(){return this._showChanged=this._showChanged||new N,this._showChanged}get closeEvent(){return this._closeEvent||(this._closeEvent=new N),this._closeEvent}}const cd=new WeakMap;function hd(r){if(!cd.has(r)){const e=new Qu(()=>new r,t=>t.reset());cd.set(r,e)}return cd.get(r)}class dd extends ud{constructor(){super();h(this,"_div");h(this,"_contentDiv");h(this,"_originOffsetX",0);h(this,"_originOffsetY",0);h(this,"_originRatioX",.5);h(this,"_originRatioY",1);h(this,"_divChanged",new N);const t=document.createElement("div");t.style.cssText="width: 0px; height: 0px; position: absolute; opacity: 1.0; visibility: visible;";const n=document.createElement("div");n.style.cssText=`position: absolute; left: ${-this._originOffsetX}px; top: ${-this._originOffsetY}px; transform: translateX(-${100*this._originRatioX}%) translateY(-${100*this._originRatioY}%); margin: 0; padding: 0; pointer-events: none;`;const i=document.createElement("div");this._contentDiv=i,n.appendChild(i),t.appendChild(n),this._div=t,this.dispose(this._divChanged.disposableOn(()=>{n.style.left=`${-this._originOffsetX}px`,n.style.top=`${-this._originOffsetY}px`,n.style.transform=`translateX(-${100*this._originRatioX}%) translateY(-${100*this._originRatioY}%)`})),this.dispose(this.winPosChanged.disposableOn(([s,o])=>{this._div.style.left=`${s}px`,this._div.style.top=`${o}px`})),this.dispose(this.opacityChanged.disposableOn(s=>{this._div.style.opacity=`${s}`})),this.dispose(this.showChanged.disposableOn(s=>{this._div.style.visibility=s?"visible":"hidden"}))}get contentDiv(){return this._contentDiv}reset(){}get originOffsetX(){return this._originOffsetX}set originOffsetX(t){this._originOffsetX!==t&&(this._originOffsetX=t,this._divChanged.emit())}get originOffsetY(){return this._originOffsetY}set originOffsetY(t){this._originOffsetY!==t&&(this._originOffsetY=t,this._divChanged.emit())}get originRatioX(){return this._originRatioX}set originRatioX(t){this._originRatioX!==t&&(this._originRatioX=t,this._divChanged.emit())}get originRatioY(){return this._originRatioY}set originRatioY(t){this._originRatioY!==t&&(this._originRatioY=t,this._divChanged.emit())}get element(){return this._div}}class kg extends U{constructor(t,n){super();h(this,"_floatDiv");h(this,"_show",!1);h(this,"_showChanged");this._customDivClass=t,this._divContainer=n,this.dispose(()=>{this.show=!1})}_updateDivPoi(){if(this._show){const{floatDiv:n}=this;n.element.parentElement||this._divContainer.appendChild(n.element)}else{const{_floatDiv:n}=this;n&&n.element.parentElement&&this._divContainer.removeChild(n.element)}}set show(t){this._show!==t&&(this._show=t,this._updateDivPoi(),this._showChanged&&this._showChanged.emit(t))}get show(){return this._show}get floatDiv(){if(!this._floatDiv){const t=hd(this._customDivClass).create();this.dispose(()=>{hd(this._customDivClass).destroy(t)}),this._floatDiv=t}return this._floatDiv}get showChanged(){return this._showChanged||(this._showChanged=new N),this._showChanged}}const pw=["top","bottom","left","right"];function gw(r){return Object.entries(r).map(([e,t])=>pw.includes(e)?`${e}: ${t}px; `:"").join("")}function Vg(r,e,t){const n=document.createElement("div");n.style.cssText=`position: absolute; ${gw(t)} background-color: ${r}; border-radius: ${e}px;`;const i='<svg viewBox="0 0 1024 1024" style="display: block;" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2420" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M512 128C300.8 128 128 300.8 128 512s172.8 384 384 384 384-172.8 384-384S723.2 128 512 128zM512 832c-179.2 0-320-140.8-320-320s140.8-320 320-320 320 140.8 320 320S691.2 832 512 832z" p-id="2421" fill="#ffffff"></path><path d="M672 352c-12.8-12.8-32-12.8-44.8 0L512 467.2 396.8 352C384 339.2 364.8 339.2 352 352S339.2 384 352 396.8L467.2 512 352 627.2c-12.8 12.8-12.8 32 0 44.8s32 12.8 44.8 0L512 556.8l115.2 115.2c12.8 12.8 32 12.8 44.8 0s12.8-32 0-44.8L556.8 512l115.2-115.2C684.8 384 684.8 364.8 672 352z" p-id="2422" fill="#ffffff"></path></svg>';return n.innerHTML=i,n}function jg(r,e,t="rgba(0,0,0,0.7)"){const n=document.createElement("div");n.style.cssText=`margin: 0 auto; width: ${r}px; height: ${e}px; position: relative; pointer-events: none;`;const i=document.createElement("div");return i.style.cssText=`position: absolute; left: 0px; top: 0px; width: 0; height: 0; border-left: ${r*.5}px solid transparent; border-right: ${r*.5}px solid transparent; border-top: ${e}px solid ${t};`,n.appendChild(i),[n,i]}class Bg extends dd{constructor(){super();h(this,"_borderDiv");h(this,"_closeDiv");h(this,"_innerContentDiv");h(this,"_colorStr","rgba(0, 0, 0, 0.7)");h(this,"_divColorChanged",new N);h(this,"_borderRadius",10);const t=document.createElement("div");t.style.cssText=`position: relative; background-color: ${this._colorStr}; border-radius: ${this._borderRadius}px; padding: 5px; pointer-events: all;`,this._borderDiv=t;const n=Vg(this._colorStr,10,{top:3,right:3}),[i,s]=jg(2*this._borderRadius,2*this._borderRadius,this._colorStr),o=document.createElement("div");this._innerContentDiv=o,t.appendChild(o),t.appendChild(n),this.contentDiv.appendChild(t),this.contentDiv.appendChild(i),n.style.opacity="0.1",n.onmouseenter=()=>{n.style.opacity="1.0"},n.onmouseleave=()=>{n.style.opacity="0.1"},n.onclick=()=>{this._closeEvent&&this._closeEvent.emit()},this._closeDiv=n,this.dispose(this._divColorChanged.disposableOn(()=>{s.style.borderTopColor=this._colorStr,t.style.backgroundColor=this._colorStr,i.style.width=`${this._borderRadius*2}px`,i.style.height=`${this._borderRadius*2}px`,s.style.borderLeft=`${this._borderRadius}px`,s.style.borderRight=`${this._borderRadius}px`,s.style.borderTop=`${this._borderRadius*2}px`}));const a=l=>{l.key==="Escape"&&this._closeEvent&&this._closeEvent.emit()};document.body.addEventListener("keydown",a,!0),this.dispose(()=>{document.removeEventListener("keydown",a,!0)})}get borderDiv(){return this._borderDiv}get innerContentDiv(){return this._innerContentDiv}reset(){this.show=!1,this.opacity=0,this._closeDiv.style.opacity="0.1",super.reset()}get colorStr(){return this._colorStr}set colorStr(t){this._colorStr!==t&&(this._colorStr=t,this._divColorChanged.emit())}get borderRadius(){return this._borderRadius}set borderRadius(t){this._borderRadius!==t&&(this._borderRadius=t,this._divColorChanged.emit())}}class mw extends Bg{constructor(){super();h(this,"_iframe");h(this,"_iframeMessageEvent");const t=document.createElement("iframe");t.style.cssText="width: 100%; height: 100%; border-width: 0px; border-radius: 5px; display: block;",t.src="http://www.weather.com.cn/live/index.shtml",this._iframe=t,this.innerContentDiv.appendChild(t);const n=i=>{i.source===this._iframe.contentWindow&&(this._iframeMessageEvent?this._iframeMessageEvent.emit(i):console.warn(`iframe消息接收到未处理!data: ${i.data}`))};globalThis.addEventListener("message",n),this.dispose(()=>{globalThis.removeEventListener("message",n)})}reset(){super.reset(),this.src=""}set src(t){this._iframe.src!==t&&(this._iframe.src=t)}get src(){return this._iframe.src}get iframe(){return this._iframe}get iframeMessageEvent(){return this._iframeMessageEvent=this._iframeMessageEvent||new N,this._iframeMessageEvent}}class vw extends ud{constructor(){super();h(this,"_div");h(this,"_contentContainer");h(this,"_text","");const t=document.createElement("div");this._div=t,t.style.cssText="width: 0px; height: 0px; position: absolute; opacity: 1.0; visibility: visible; transition: opacity 0.5s;";const n=document.createElement("div");n.style.cssText="position: absolute; left: 0px; bottom: 0px; transform: translateX(-50%); margin: 0; padding: 0; pointer-events: none;";const i=document.createElement("div");i.style.cssText="position: relative; background-color: rgba(0, 0, 0, 0.7); border-radius: 5px; padding: 3px; pointer-events: all; color: white; white-space: nowrap;",i.innerText=this._text,this._div.appendChild(n),n.appendChild(i),this._contentContainer=i,this._div=t,this.dispose(this.winPosChanged.disposableOn(([s,o])=>{this._div.style.left=`${s}px`,this._div.style.top=`${o-50}px`})),this.dispose(this.opacityChanged.disposableOn(s=>{this._div.style.opacity=`${s}`})),this.dispose(this.showChanged.disposableOn(s=>{this._div.style.visibility=s?"visible":"hidden"}))}get element(){return this._div}reset(){this.opacity=1,this.show=!0}set text(t){this._text!==t&&(this._text=t,this._contentContainer.innerText=t)}get text(){return this._text}}class yw extends dd{constructor(){super(),this.contentDiv.style.backgroundColor="rgba(0, 0, 0, 0.8)",this.contentDiv.style.borderRadius="3px",this.contentDiv.style.color="rgb(255, 255, 255)",this.contentDiv.style.padding="1px 5px 1px 5px",this.contentDiv.style.fontSize="12px",this.contentDiv.style.whiteSpace="nowrap",this.contentDiv.innerText="未定义光标信息!",this.originRatioX=0,this.originRatioY=0,this.originOffsetX=-16}}class _w extends U{constructor(t,n){super();h(this,"_cursorDiv");h(this,"_pointerOut",this.disposeVar(z(!1)));h(this,"_show",this.disposeVar(z(!0)));this._cursorDiv=new kg(n,t),this.dispose(()=>this._cursorDiv.destroy());const i=o=>{const[a,l]=mn(o);this._cursorDiv.floatDiv.winPos=[a,l]};t.addEventListener("pointermove",i),this.dispose(()=>t.removeEventListener("pointermove",i));const s=()=>{this._cursorDiv.show=this.show&&this._pointerOut.value};s(),this.dispose(this.showChanged.disposableOn(s)),this.dispose(this._pointerOut.changed.disposableOn(s))}set show(t){this._show.value=t}get show(){return this._show.value}get showChanged(){return this._show.changed}reset(){this._pointerOut.value=!1}get cursorDiv(){return this._cursorDiv}set text(t){this._cursorDiv.floatDiv.contentDiv.innerText=t}get text(){return this._cursorDiv.floatDiv.contentDiv.innerText}}function nu(r,e,t){if(!(r.tree===e.tree&&r!==e&&!r.isAncestorOf(e))||r.tree!==e.tree||!r.parent)return!1;if(!r.parent.children)throw console.error("当前节点的父节点没有子节点?这是不可能的!"),new Error("当前节点的父节点没有子节点?这是不可能的!");return!(e===r||r.isAncestorOf(e)||t!=="inner"&&!e.parent||t==="inner"&&!e.children)}function fc(r,e,t){if(!r.tree||!e.tree||r.tree!==e.tree)return;if(!r.parent){console.warn("当前节点没有父节点,那么该节点无法被移动!");return}if(!r.parent.children)throw console.error("当前节点的父节点没有子节点?这是不可能的!"),new Error("当前节点的父节点没有子节点?这是不可能的!");if(e===r){console.warn("自身不能拖放到自身!");return}if(r.isAncestorOf(e)){console.warn("当前节点不能拖放到它自身的后代节点之上!");return}if(t!=="inner"&&!e.parent){console.warn("目标节点没有父节点,无法拖放!");return}if(t==="inner"&&!e.children){console.warn("无法移动到目标节点的子节点中,因为目标节点不是组节点!");return}r.tree._startTransaction();const n=r.parent.children.indexOf(r);if(r.parent.children.splice(n,1),t!=="inner"){const{parent:i}=e;if(!i||!i.children)throw new Error("!parent");const s=i.children.indexOf(e);t==="before"?i.children.splice(s,0,r):t==="after"&&i.children.splice(s+1,0,r)}else e.children.push(r);r.tree._stopTransaction()}function zg(r,e,t){return Gh(r,n=>nu(n,e,t))}function Ug(r,e,t){for(let n of r)nu(n,e,t)?fc(n,e,t):console.warn(`treeItem(id: ${n.id}) cannot move...`)}const ww={checked:1,unchecked:2,indeterminate:3},Ew=["checked","unchecked","indeterminate"];class Gg extends U{constructor(t){super();h(this,"_collapsed",this.disposeVar(z(!1)));h(this,"_checkedStatus",this.disposeVar(z("unchecked")));h(this,"_selected",this.disposeVar(z(!1)));h(this,"_moveToPositionMode",this.disposeVar(z("none")));h(this,"_updateCheckedStatusFromChildrenEvent",this.disposeVar(new N));this._treeItem=t;const n=()=>this._treeItem.tree&&this._treeItem.tree.itemsChanged.emit([this._treeItem]);this.dispose(this._collapsed.changed.disposableOn(n)),this.dispose(this._checkedStatus.changed.disposableOn(n)),this.dispose(this._selected.changed.disposableOn(n)),this.dispose(this._moveToPositionMode.changed.disposableOn(n)),this.dispose(this._checkedStatus.changed.disposableOn(()=>this._treeItem.parent&&this._treeItem.parent.uiTreeObject.updateCheckedStatusFromChildren())),this.dispose(this._treeItem.childrenChangedEvent.disposableOn(()=>{this.updateCheckedStatusFromChildren()}));const i=this.disposeVar(Se(this._updateCheckedStatusFromChildrenEvent));this.dispose(i.disposableOn(()=>{if(!this._treeItem.children)return;let s=0;Uh(this._treeItem.children,o=>(s|=ww[o.uiTreeObject.checkedStatus],s===3)),s>0&&(this._checkedStatus.value=Ew[s-1])})),this.dispose(this._treeItem.childrenResetedEvent.disposableOn(s=>{!s&&this.checkedStatus==="indeterminate"&&(this._checkedStatus.value="unchecked")}));{const s=(o,a,l=!0)=>{if(a)o.selectedItems.push(this._treeItem);else{const u=o.selectedItems.indexOf(this._treeItem);u===-1?l&&console.error("selectedItems index -1"):o.selectedItems.splice(u,1)}};this.dispose(this._selected.changed.disposableOn(o=>{const{tree:a}=this._treeItem;a&&s(a,o)})),this.dispose(()=>this.selected=!1)}}get treeItem(){return this._treeItem}get collapsed(){return this._collapsed.value}set collapsed(t){this._collapsed.value=t}get collapsedChanged(){return this._collapsed.changed}get checkedStatus(){return this._checkedStatus.value}check(t){const n=t?"checked":"unchecked";if(this._checkedStatus.value!==n&&(this._checkedStatus.value=n,this._treeItem.children))for(let i of this._treeItem.children)i.uiTreeObject.check(t)}updateCheckedStatusFromChildren(){this._updateCheckedStatusFromChildrenEvent.emit()}get checkedStatusChanged(){return this._checkedStatus.changed}get selected(){return this._selected.value}set selected(t){this._selected.value=t}get selectedChanged(){return this._selected.changed}get moveToPositionMode(){return this._moveToPositionMode.value}set moveToPositionMode(t){this._moveToPositionMode.value=t}get moveToPositionModeChanged(){return this._moveToPositionMode.changed}}const yi=class yi extends U{constructor(t,n=!1,i){super();h(this,"_children");h(this,"_childrenResetedEvent");h(this,"_childrenToChangeEvent");h(this,"_childrenChangedEvent");h(this,"_parent",this.disposeVar(z(void 0)));h(this,"_level",this.disposeVar(z(0)));h(this,"_id");h(this,"_uiTreeObject",this.disposeVar(new Gg(this)));this._tree=t,this._hasChildren=n,this._id=i??Ca(),this._id!=="_ROOT"&&yi.wm.has(this._id)&&console.warn(`创建了id(${this._id})相同的树节点,会导致之前的树节点无法索引!`),yi.wm.set(this._id,this),this.dispose(()=>{if(this._id!=="_ROOT"&&!yi.wm.has(this._id)){console.warn(`树节点(${this._id})不在wm树上!`);return}yi.wm.delete(this._id)}),this.dispose(this._parent.changed.disposableOn(()=>{this._updateLevel()})),this.dispose(this._level.changed.disposableOn(()=>{if(this.children)for(let s of this.children)s._updateLevel()})),yi.allTreeItems.set(this._id,this),this.dispose(()=>{yi.allTreeItems.delete(this._id)})}static getFromId(t){return yi.wm.get(t)}get uiTreeObject(){return this._uiTreeObject}get id(){return this._id}_updateLevel(){this.parent&&(this._level.value=this.parent.level+1)}get parent(){return this._parent.value}get parentChanged(){return this._parent.changed}get children(){if(this._hasChildren){if(!this._children){const t=this.disposeVar(new Jl);this._children=t,this.dispose(t.toChangeEvent.disposableOn((s,o)=>{for(let a of s){const{start:l,deleteCount:u,items:c}=a;for(let d=l;d<l+u;++d)o.get(d)._parent.value=void 0;for(let d of c){if(d.parent)throw console.error("请检查新增的treeItem是否正在使用!"),new Error("item.parent should not exist!");d._parent.value=this}}}));const n=new Set,i=new Set;this.dispose(t.toChangeEvent.disposableOn((s,o)=>{var a;if(this.tree){n.clear(),i.clear();for(let l of s){const{start:u,deleteCount:c,items:d}=l;for(let f=u;f<u+c;++f)n.add(o.get(f));for(let f of d)i.add(f)}for(let l of n)i.has(l)&&(n.delete(l),i.delete(l));(a=this.tree)==null||a.itemChildrenToChange.emit(this,s,n,i)}})),this.dispose(t.changedEvent.disposableOn(()=>{var s;(s=this.tree)==null||s.itemChildrenChanged.emit(this)})),this.dispose(t.toChangeEvent.disposableOn((...s)=>this._childrenToChangeEvent&&this._childrenToChangeEvent.emit(...s))),this.dispose(t.changedEvent.disposableOn((...s)=>this._childrenChangedEvent&&this._childrenChangedEvent.emit(...s)))}return this._children}else return}get childrenResetedEvent(){return this._childrenResetedEvent||(this._childrenResetedEvent=new N),this._childrenResetedEvent}get childrenToChangeEvent(){return this._childrenToChangeEvent||(this._childrenToChangeEvent=new N),this._childrenToChangeEvent}get childrenChangedEvent(){return this._childrenChangedEvent||(this._childrenChangedEvent=new N),this._childrenChangedEvent}resetChildren(t=!1){this._children&&(this._children.length=0),this._hasChildren=t,this._childrenResetedEvent&&this._childrenResetedEvent.emit(t)}*getDescendants(t){const n=this,i=[],s=[];for(n.children&&n.children.length>0&&(!t||t(n))&&(i.push(0),s.push(n.children));i.length>0;){const o=i[i.length-1],a=s[s.length-1],l=a.get(o);yield l,o<a.length-1?++i[i.length-1]:(s.pop(),i.pop()),l.children&&l.children.length>0&&(!t||t(l))&&(i.push(0),s.push(l.children))}}*getAncestors(t){let n=this.parent;for(;n&&(yield n,!(t&&!t(n)));)n=n.parent}isDescendantOf(t){for(let n of this.getAncestors())if(n===t)return!0;return!1}isAncestorOf(t){return t.isDescendantOf(this)}get level(){return this._level.value}get levelChanged(){return this._level.changed}get tree(){return this._tree}canMoveTo(t,n){return nu(this,t,n)}moveTo(t,n){fc(this,t,n)}detachFromParent(){if(!this.parent||!this.parent.children)return;const t=this.parent.children.indexOf(this);this.parent.children.splice(t,1)}insertNewTreeItem(t,n){if(n&&n.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&t.startsWith("Inner"))return n&&this.children.push(n),!0;if(t==="Inner")return!1;const i=this.parent;if(!i||!i.children)return!1;const s=i.children.indexOf(this);return t.endsWith("Before")?n&&i.children.splice(s,0,n):t.endsWith("After")&&n&&i.children.splice(s+1,0,n),!0}};h(yi,"wm",new Map),h(yi,"allTreeItems",new Map);let ru=yi;class Wg extends U{constructor(t){super();h(this,"_redrawEvent",this.disposeVar(new N));h(this,"_containerScrollTop",this.disposeVar(z(0)));h(this,"_containerClientHeight",this.disposeVar(z(-1)));h(this,"_container",this.disposeVar(z(void 0)));h(this,"_redrawInfo",{topFreeSpaceHeight:0,topUnvisibleItemNum:0,middleTreeItems:[],bottomFreeSpaceHeight:0,bottomUnvisibleItemNum:0});this._tree=t;const n=this._containerClientHeight,i=this._containerScrollTop,s=this._tree._forceRedrawEvent,o=this.disposeVar(Se(this._tree.itemDivHeightChanged,this._tree.itemChildrenChanged,this._tree.itemsChanged,n.changed,i.changed,s)),{redrawInfo:a}=this,l=c=>{const d=c.uiTreeObject;return!!c.children&&(!d||!d.collapsed)};this.dispose(o.disposableOn(()=>{if(a.topFreeSpaceHeight=0,a.topUnvisibleItemNum=0,a.middleTreeItems.length=0,a.bottomFreeSpaceHeight=0,a.bottomUnvisibleItemNum=0,this._containerClientHeight.value>=0){const c=Wh(this._tree.getDescendants(l)),d=this._tree.itemDivHeight,f=d*c,p=os([As([os([f-n.value,0]),i.value]),0]),_=p/d|0,S=Math.ceil((p-_*d+n.value)/d)|0;_>0&&(a.topUnvisibleItemNum=_,a.topFreeSpaceHeight=_*this._tree.itemDivHeight);const b=_+S;let I=0;for(let w of this._tree.getDescendants(l)){if(I>=b)break;I>=_&&a.middleTreeItems.push(w),++I}const m=c-_-S;m>0&&(a.bottomUnvisibleItemNum=m,a.bottomFreeSpaceHeight=m*this._tree.itemDivHeight)}else for(let c of this._tree.getDescendants(l))a.middleTreeItems.push(c);this._redrawEvent.emit(a)}));let u;this.dispose(()=>u&&(u.destroy(),u=void 0)),this.dispose(this.containerChanged.disposableOn(c=>{u&&(u.destroy(),u=void 0),c&&(u=Kl(),u.start(()=>{const{scrollTop:d,clientHeight:f}=c;typeof d>"u"||typeof f>"u"?wa("createUiTreeWithContainer error: conainter has no scrollTop or clientHeight property!"):(this.containerScrollTop=d,this.containerClientHeight=f)}))}))}get container(){return this._container.value}set container(t){this._container.value=t}get containerChanged(){return this._container.changed}get redrawInfo(){return this._redrawInfo}getTreeItemPos(t){const n=o=>{const a=o.uiTreeObject;return!!o.children&&(!a||!a.collapsed)};let i=0,s=!1;for(let o of this._tree.getDescendants(n)){if(o===t){s=!0;break}++i}if(s)return[i,i*this._tree.itemDivHeight]}collapseAll(){console.log("collapseAll");for(let t of this.tree.root.getDescendants()){const n=t.uiTreeObject;n.collapsed=!0}}expandAll(){console.log("expandAll");for(let t of this.tree.root.getDescendants()){const n=t.uiTreeObject;n.collapsed=!1}}get tree(){return this._tree}get redrawEvent(){return this._redrawEvent}set containerScrollTop(t){this._containerScrollTop.value=t}get containerScrollTop(){return this._containerScrollTop.value}get containerScrollTopChanged(){return this._containerScrollTop.changed}set containerClientHeight(t){this._containerClientHeight.value=t}get containerClientHeight(){return this._containerClientHeight.value}get containerClientHeightChanged(){return this._containerClientHeight.changed}*getAllItems(t){for(let n of this._tree.getDescendants())(!t||t(n))&&(yield n)}getAllSelectedItems(){return this.getAllItems(t=>t.uiTreeObject.selected)}getAllCheckedItems(){return this.getAllItems(t=>t.uiTreeObject.checkedStatus==="checked")}getAllCheckedLeafItems(){return this.getAllItems(t=>!t.children&&t.uiTreeObject.checkedStatus==="checked")}selectAllItems(t){for(let n of this.getAllItems())(!t||!t.includes(n))&&(n.uiTreeObject.selected=!0)}clearAllSelectedItems(t){for(let n of this.getAllSelectedItems())(!t||!t.includes(n))&&(n.uiTreeObject.selected=!1)}checkAllItems(t){for(let n of this.getAllItems())(!t||!t.includes(n))&&n.uiTreeObject.check(!0)}clearAllCheckedItems(t){for(let n of this.getAllCheckedItems())(!t||!t.includes(n))&&n.uiTreeObject.check(!1)}}const so=class so extends U{constructor(t){super();h(this,"_root",this.disposeVar(new ru(this,!0,"_ROOT")));h(this,"_itemChildrenChanged",this.disposeVar(new N));h(this,"_itemChildrenToChange",this.disposeVar(new N));h(this,"_itemsAdded",this.disposeVar(new N));h(this,"_itemsDeleted",this.disposeVar(new N));h(this,"_itemsChanged",this.disposeVar(new N));h(this,"_transactionStack",0);h(this,"_addedItems",new Set);h(this,"_deletedItems",new Set);h(this,"_selectedItems",this.disposeVar(new Jl));h(this,"_itemDivHeight",this.disposeVar(z(so.defaultItemDivHeight)));h(this,"_forceRedrawEvent",this.disposeVar(new N));h(this,"_uiTree",this.disposeVar(new Wg(this)));this._root._tree.value=this,this.dispose(this._itemChildrenToChange.disposableOn((n,i)=>{if(!n.children){console.error("!item.children");return}for(let s of i){const{start:o,deleteCount:a,items:l}=s;for(let u=o;u<o+a;++u){const c=n.children.get(u);this._deletedItems.has(c)?console.error(`this._deletedItems.has(currentItem(${c.id}))`):this._deletedItems.add(c)}for(let u of l)this._deletedItems.has(u)?this._deletedItems.delete(u):this._addedItems.add(u)}this._execTransaction()})),t!==void 0&&(this.itemDivHeight=t)}get selectedItems(){return this._selectedItems}get lastSelectedItem(){return this._selectedItems.length>0?this._selectedItems.get(this._selectedItems.length-1):void 0}get itemDivHeight(){return this._itemDivHeight.value}set itemDivHeight(t){this._itemDivHeight.value=t}get itemDivHeightChanged(){return this._itemDivHeight.changed}forceRedraw(){this._forceRedrawEvent.emit()}get uiTree(){return this._uiTree}get root(){return this._root}get children(){return this._root.children}getDescendants(t){return this._root.getDescendants(t)}getTreeItemFromId(t){let n;for(let i of this.getDescendants())if(i.id===t){n=i;break}return n}_startTransaction(){this._transactionStack===0&&(this._deletedItems.size>0&&(console.warn("this._deletedItems.size > 0"),this._deletedItems.clear()),this._addedItems.size>0&&(console.warn("this._addedItems.size > 0"),this._addedItems.clear())),++this._transactionStack}_stopTransaction(){--this._transactionStack,this._execTransaction()}_execTransaction(){this._transactionStack===0&&(this._deletedItems.size>0&&(this._itemsDeleted.emit([...this._deletedItems]),this._deletedItems.clear()),this._addedItems.size>0&&(this._itemsAdded.emit([...this._addedItems]),this._addedItems.clear()))}get itemChildrenChanged(){return this._itemChildrenChanged}get itemChildrenToChange(){return this._itemChildrenToChange}get itemsChanged(){return this._itemsChanged}get itemsAdded(){return this._itemsAdded}get itemsDeleted(){return this._itemsDeleted}};h(so,"defaultItemDivHeight",24),h(so,"canMoveToTreeItem",nu),h(so,"moveToTreeItem",fc),h(so,"canMoveToTreeItems",zg),h(so,"moveToTreeItems",Ug);let Po=so;class Ie extends U{constructor(t,n,i=!0,s){super();h(this,"_obj",this.disposeVar(z(void 0)));this._resetEvent=t,this._createFunc=n;const o=this._resetEvent,a=this._createFunc,l=()=>{this._obj.value&&(this._obj.value.destroy(),this._obj.value=void 0)};this.dispose(l);const u=(...c)=>{l(),this._obj.value=a(...c)};i&&(s?this._obj.value=a(...s):this._obj.value=a()),this.dispose(o.disposableOn(u))}get obj(){return this._obj.value}get objChanged(){return this._obj.changed}}class Cw extends U{constructor(t,n=!0,i){super();h(this,"_event",this.disposeVar(new N));h(this,"_objResettingWithEvent");this._createFunc=t,this._execOnInit=n,this._initParams=i,this._objResettingWithEvent=this.disposeVar(new Ie(this._event,this._createFunc,this._execOnInit,this._initParams))}get obj(){return this._objResettingWithEvent.obj}get objChanged(){return this._objResettingWithEvent.objChanged}reset(...t){this._event.emit(...t)}}const Dh=class Dh extends U{constructor(){super();h(this,"_set",new Set);h(this,"_toChangeEvent",this.dv(new N));h(this,"_changedEvent",this.dv(new N));h(this,"main");this.dispose(()=>{this._set.size!==0&&(Dh.warnOnDestroying&&console.warn("this._set.size > 0"),this.clear())})}get toChange(){return this._toChangeEvent}get changed(){return this._changedEvent}add(...t){if(t.length==2&&typeof t[1]=="boolean")t[1]&&(this.main=t[0]);else for(let n of t)this._toChangeEvent.emit([],[n]),this._set.add(n),this._changedEvent.emit([],[n])}delete(...t){for(let n of t)this.main&&this.main==n&&(this.main=void 0),this._toChangeEvent.emit([n],[]),this._set.delete(n),this._changedEvent.emit([n],[])}disposableAdd(...t){return t.length==2&&typeof t[1]=="boolean"?(t[1]&&(this.main=t[0]),this.add(t[0]),()=>this.delete(t[0])):(this.add(...t),()=>this.delete(...t))}get size(){return this._set.size}clear(){const t=[...this._set];this._toChangeEvent.emit([],t),this._set.clear(),this._changedEvent.emit([],t),this.main=void 0}values(){return this._set.values()}};h(Dh,"warnOnDestroying",!0);let pc=Dh;async function Hg(r){const e=[],t=[],n=r.entries();for await(const[i,s]of n){const o=s;o.kind==="file"?e.push(i):o.kind==="directory"&&t.push(i)}return{files:e,dirs:t}}async function fd(r){return await(await r.getFile()).text()}async function qg(r){const e=await fd(r);try{return JSON.parse(e)}catch{return}}async function Xg(r){return await(await r.getFile()).arrayBuffer()}class Yg extends U{constructor(e){super(),this._rootDirHandle=e}get rootDirHandle(){return this._rootDirHandle}async getSubFilesAndDirs(){return await Hg(this._rootDirHandle)}async getDir(e){let t=this._rootDirHandle;for(const n of e)if(t=await(t==null?void 0:t.getDirectoryHandle(n)),!t){console.log(`getDirectoryHandle ${n} failed`);return}return t}async getFile(e,t){const n=await this.getDir(e);if(n)try{return await n.getFileHandle(t)}catch(i){console.error(`未能获取当前文件 ${e.join("/")}/${t} error: ${i}`,i);return}}}class Jg extends U{constructor(t){super();h(this,"_startRootDirId",0);h(this,"_dirMap",new Map);this._prefix=t}get prefix(){return this._prefix}async getRootDirId(t){let n;try{console.log("window.showDirectoryPicker begin"),n=await globalThis.showDirectoryPicker({id:t,mode:"read"}),console.log("window.showDirectoryPicker end",n)}catch(i){console.error(`LocalFileServer getRootDirId failed: ${i}`,i);return}if(n){const i=++this._startRootDirId,s=`${this._prefix}${i}`;return this._dirMap.set(s,new Yg(n)),s}}getRootDir(t){return this._dirMap.get(t)}async getFile(t){const n=t.split("/");if(n.length<2){console.warn(`LocalFileServer getFile failed: ${t}`);return}const i=n[0],s=this._dirMap.get(i);if(!s){console.warn(`LocalFileServer getFile failed: ${t}`);return}const o=n.slice(1,n.length-1),a=n[n.length-1],l=await s.getFile(o,a);if(!l){console.warn(`LocalFileServer getFile failed: ${t}`);return}return l}async getText(t){const n=await this.getFile(t);if(n)return await fd(n)}async getArrayBuffer(t){const n=await this.getFile(t);if(n)return await Xg(n)}async getJson(t){const n=await this.getFile(t);if(n)return await qg(n)}async getLocalFilePath(t,n,i){const s=await this.getRootDirId(n);if(!s){console.warn("getRootDirId error!");return}const o=this.getRootDir(s);if(!o){console.warn("getRootDir error!");return}const a=await o.getSubFilesAndDirs();if(!a.files){console.warn("getSubFilesAndDirs error! 找不到符合要求的文件!");return}const l=t?a.files.filter(u=>t.some(c=>u.endsWith(c))):a.files;if(l.length===0){console.warn("找不到符合要求的文件!");return}return`https://${s}/${l[0]}`}}const $g=new Jg("xe2_local");async function Sw(r,e,t){return await $g.getLocalFilePath(r,e,t)}class Kg extends U{constructor(t,n){super();h(this,"_processing");this._complexImage=t,this._imageUri=n,this._processing=this.disposeVar(nr(async i=>{const s=this._complexImage,o=await i.promise(pg(this._imageUri,this._complexImage.crossOrigin));o&&o instanceof HTMLImageElement&&(s.size=[o.naturalWidth,o.naturalHeight],s.pixelFormat="RGBA",s.copyTexture({source:o}))})),this._processing.start()}get processing(){return this._processing}}const Zg=["DEPTH_COMPONENT","DEPTH_STENCIL","ALPHA","RED","RG","RGB","RGBA","LUMINANCE","LUMINANCE_ALPHA","RGB_DXT1","RGBA_DXT1","RGBA_DXT3","RGBA_DXT5","RGB_PVRTC_4BPPV1","RGB_PVRTC_2BPPV1","RGBA_PVRTC_4BPPV1","RGBA_PVRTC_2BPPV1","RGBA_ASTC","RGB_ETC1","RGB8_ETC2","RGBA8_ETC2_EAC","RGBA_BC7"],Qg=["img","gif","video","flv","hls"];let bw=class extends U{constructor(t,n){super();h(this,"_element");this._complexImage=t,this._videoSrc=n;var i=document.createElement("video");i.src=this._videoSrc,i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.zIndex="-100",i.style.visibility="hidden",i.style.width="0px",i.style.height="0px";{const s=()=>{i.crossOrigin=this._complexImage.crossOrigin};s(),this.dispose(this._complexImage.crossOriginChanged.disposableOn(s))}{const s=()=>{i.autoplay=this._complexImage.autoplay};s(),this.dispose(this._complexImage.autoplayChanged.disposableOn(s))}{const s=()=>{i.loop=this._complexImage.loop};s(),this.dispose(this._complexImage.loopChanged.disposableOn(s))}i.muted=!0,document.body.appendChild(i),this._element=i,this.dispose(()=>document.body.removeChild(i))}get element(){return this._element}};class tm extends U{constructor(t,n){super();h(this,"_videoDom");h(this,"_update");this._complexImage=t,this._imageUri=n,this._videoDom=this.disposeVar(new bw(this._complexImage,this._imageUri)),this._update=this.disposeVar(Ta(()=>this.update())),this._update.start()}get videoDom(){return this._videoDom}get videoElement(){return this._videoDom.element}update(){if(this.videoElement.readyState<2)return;const t=this._complexImage,{videoWidth:n,videoHeight:i}=this.videoElement;t.size=[n,i],t.pixelFormat="RGBA",t.copyTexture({source:this.videoElement})}}function pd(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Pw(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var gd={},as={},em;function Iw(){if(em)return as;em=1,Object.defineProperty(as,"__esModule",{value:!0}),as.loop=as.conditional=as.parse=void 0;var r=function n(i,s){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:o;if(Array.isArray(s))s.forEach(function(u){return n(i,u,o,a)});else if(typeof s=="function")s(i,o,a,n);else{var l=Object.keys(s)[0];Array.isArray(s[l])?(a[l]={},n(i,s[l],o,a[l])):a[l]=s[l](i,o,a,n)}return o};as.parse=r;var e=function(i,s){return function(o,a,l,u){s(o,a,l)&&u(o,i,a,l)}};as.conditional=e;var t=function(i,s){return function(o,a,l,u){for(var c=[],d=o.pos;s(o,a,l);){var f={};if(u(o,i,a,f),o.pos===d)break;d=o.pos,c.push(f)}return c}};return as.loop=t,as}var xe={},nm;function rm(){if(nm)return xe;nm=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.readBits=xe.readArray=xe.readUnsigned=xe.readString=xe.peekBytes=xe.readBytes=xe.peekByte=xe.readByte=xe.buildStream=void 0;var r=function(d){return{data:d,pos:0}};xe.buildStream=r;var e=function(){return function(d){return d.data[d.pos++]}};xe.readByte=e;var t=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(f){return f.data[f.pos+d]}};xe.peekByte=t;var n=function(d){return function(f){return f.data.subarray(f.pos,f.pos+=d)}};xe.readBytes=n;var i=function(d){return function(f){return f.data.subarray(f.pos,f.pos+d)}};xe.peekBytes=i;var s=function(d){return function(f){return Array.from(n(d)(f)).map(function(p){return String.fromCharCode(p)}).join("")}};xe.readString=s;var o=function(d){return function(f){var p=n(2)(f);return d?(p[1]<<8)+p[0]:(p[0]<<8)+p[1]}};xe.readUnsigned=o;var a=function(d,f){return function(p,_,S){for(var b=typeof f=="function"?f(p,_,S):f,I=n(d),m=new Array(b),w=0;w<b;w++)m[w]=I(p);return m}};xe.readArray=a;var l=function(d,f,p){for(var _=0,S=0;S<p;S++)_+=d[f+S]&&Math.pow(2,p-S-1);return _},u=function(d){return function(f){for(var p=e()(f),_=new Array(8),S=0;S<8;S++)_[7-S]=!!(p&1<<S);return Object.keys(d).reduce(function(b,I){var m=d[I];return m.length?b[I]=l(_,m.index,m.length):b[I]=_[m.index],b},{})}};return xe.readBits=u,xe}var im;function xw(){return im||(im=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=Iw(),t=rm(),n={blocks:function(f){for(var p=0,_=[],S=f.data.length,b=0,I=(0,t.readByte)()(f);I!==p&&I;I=(0,t.readByte)()(f)){if(f.pos+I>=S){var m=S-f.pos;_.push((0,t.readBytes)(m)(f)),b+=m;break}_.push((0,t.readBytes)(I)(f)),b+=I}for(var w=new Uint8Array(b),g=0,y=0;y<_.length;y++)w.set(_[y],g),g+=_[y].length;return w}},i=(0,e.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},function(d){var f=(0,t.peekBytes)(2)(d);return f[0]===33&&f[1]===249}),s=(0,e.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,e.conditional)({lct:(0,t.readArray)(3,function(d,f,p){return Math.pow(2,p.descriptor.lct.size+1)})},function(d,f,p){return p.descriptor.lct.exists}),{data:[{minCodeSize:(0,t.readByte)()},n]}]},function(d){return(0,t.peekByte)()(d)===44}),o=(0,e.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(f,p,_){return(0,t.readBytes)(_.text.blockSize)(f)}},n]},function(d){var f=(0,t.peekBytes)(2)(d);return f[0]===33&&f[1]===1}),a=(0,e.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(f,p,_){return(0,t.readString)(_.blockSize)(f)}},n]},function(d){var f=(0,t.peekBytes)(2)(d);return f[0]===33&&f[1]===255}),l=(0,e.conditional)({comment:[{codes:(0,t.readBytes)(2)},n]},function(d){var f=(0,t.peekBytes)(2)(d);return f[0]===33&&f[1]===254}),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,e.conditional)({gct:(0,t.readArray)(3,function(d,f){return Math.pow(2,f.lsd.gct.size+1)})},function(d,f){return f.lsd.gct.exists}),{frames:(0,e.loop)([i,a,l,s,o],function(d){var f=(0,t.peekByte)()(d);return f===33||f===44})}],c=u;r.default=c})(gd)),gd}var Tw=xw();const Ow=pd(Tw);var Dw=rm();const Nw=(r,e)=>{const t=new Array(r.length),n=r.length/e,i=function(c,d){const f=r.slice(d*e,(d+1)*e);t.splice.apply(t,[c*e,e].concat(f))},s=[0,4,2,1],o=[8,8,4,2];for(var a=0,l=0;l<4;l++)for(var u=s[l];u<n;u+=o[l])i(u,a),a++;return t},Mw=(r,e,t)=>{const s=t;var o,a,l,u,c,d,f,y,p,_,g,S,E,C,T,P;const b=new Array(t),I=new Array(4096),m=new Array(4096),w=new Array(4097);for(S=r,a=1<<S,c=a+1,o=a+2,f=-1,u=S+1,l=(1<<u)-1,p=0;p<a;p++)I[p]=0,m[p]=p;var g,y,E,C,P,T;for(g=y=E=C=P=T=0,_=0;_<s;){if(C===0){if(y<u){g+=e[T]<<y,y+=8,T++;continue}if(p=g&l,g>>=u,y-=u,p>o||p==c)break;if(p==a){u=S+1,l=(1<<u)-1,o=a+2,f=-1;continue}if(f==-1){w[C++]=m[p],f=p,E=p;continue}for(d=p,p==o&&(w[C++]=E,p=f);p>a;)w[C++]=m[p],p=I[p];E=m[p]&255,w[C++]=E,o<4096&&(I[o]=f,m[o]=E,o++,(o&l)===0&&o<4096&&(u++,l+=o)),f=d}C--,b[P++]=w[C],_++}for(_=P;_<s;_++)b[_]=0;return b},Rw=r=>{const e=new Uint8Array(r);return tr.parse(Dw.buildStream(e),Ow)},Lw=r=>{const e=r.pixels.length,t=new Uint8ClampedArray(e*4);for(var n=0;n<e;n++){const i=n*4,s=r.pixels[n],o=r.colorTable[s]||[0,0,0];t[i]=o[0],t[i+1]=o[1],t[i+2]=o[2],t[i+3]=s!==r.transparentIndex?255:0}return t},Fw=(r,e,t)=>{if(!r.image){console.warn("gif frame does not have associated image.");return}const{image:n}=r,i=n.descriptor.width*n.descriptor.height;var s=Mw(n.data.minCodeSize,n.data.blocks,i);n.descriptor.lct.interlaced&&(s=Nw(s,n.descriptor.width));const o={pixels:s,dims:{top:r.image.descriptor.top,left:r.image.descriptor.left,width:r.image.descriptor.width,height:r.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?o.colorTable=n.lct:o.colorTable=e,r.gce&&(o.delay=(r.gce.delay||10)*10,o.disposalType=r.gce.extras.disposal,r.gce.extras.transparentColorGiven&&(o.transparentIndex=r.gce.transparentColorIndex)),o.patch=Lw(o),o},Aw=(r,e)=>r.frames.filter(t=>t.image).map(t=>Fw(t,r.gct));async function sm(r){const t=await(await fetch(r)).arrayBuffer(),n=Rw(t),i=Aw(n);return{gif:n,gifFrames:i,arrayBuffer:t}}function om(r,e,t){return r<e?e:r>t?t:r}class am extends dc{constructor(t,n=!0,i){super();h(this,"_gifFrames",this.disposeVar(z(void 0)));h(this,"_gifDurations",[]);h(this,"_gifDuration",this.disposeVar(z(0)));h(this,"_gifSize",this.disposeVar(z([0,0],(t,n)=>t.every((i,s)=>i===n[s]),t=>[...t])));h(this,"_autoPlayOnLoad",this.disposeVar(z(!0)));h(this,"_gifCanvas");this._container=t,this.loop=!0;const s=document.createElement("canvas");this._gifCanvas=s,s.style.width="100%",s.style.height="100%";const o=s.getContext("2d");this._container&&this._container.appendChild(s),this.dispose(()=>this._container&&this._container.removeChild(s));let a;this.dispose(this._gifFrames.changed.disposableOn(u=>{if(!u||u.length===0){s.width=0,s.height=0;return}const{width:c,height:d}=u[0].dims;this._gifSize.value=[c,d];const f=u.length;let p=0;this._gifDurations.length=0;for(let _=0;_<f;++_)p+=u[_].delay,this._gifDurations.push(p);this._gifDuration.value=this._gifDurations[this._gifDurations.length-1],s.width=c,s.height=d,a=o.createImageData(c,d),this.currentTimeChangedEvent.emit(this.currentTime,this.currentTime),this._autoPlayOnLoad.value&&(this.currentTime=0,this.playing=!0)}));let l=-1;this.dispose(this.currentTimeChangedEvent.disposableOn(u=>{const c=om(u/this.duration,0,1),d=this.gifDuration*c,f=this._gifFrames.value;if(f&&f.length>0){const p=this._getFrame(d);if(p===l)return;l=p;const _=f[p];if(_.disposalType!==0&&_.disposalType!==1&&_.disposalType!==2&&wa(`gif parsed get disposalType ${_.disposalType}... frame: ${p} size: ${JSON.stringify(_.dims)}`,`gif parsed get disposalType ${_.disposalType}...`),a&&(p===0||_.disposalType===2)&&a.data.fill(0),a){const[S,b]=this._gifSize.value,{width:I,height:m,left:w,top:g}=_.dims;if(m>b)throw new Error("height > canvasHeight");for(let y=0;y<m;++y)for(let E=0;E<I;++E){const C=y*I+E,P=g+y,T=w+E,x=P*S+T,D=a.data,R=_.patch,L=R[C*4+3]/255;D[x*4+0]=D[x*4+0]*(1-L)+R[C*4+0]*L|0,D[x*4+1]=D[x*4+1]*(1-L)+R[C*4+1]*L|0,D[x*4+2]=D[x*4+2]*(1-L)+R[C*4+2]*L|0,D[x*4+3]=om(D[x*4+3]+R[C*4+3],0,255)|0}o.putImageData(a,0,0)}}else wa("gif资源未加载!无法播放!")})),this.dispose(this._gifDuration.changed.disposableOn(()=>{this.duration=this.gifDuration})),this._autoPlayOnLoad.value=n,this._gifFrames.value=i}get gifCanvas(){return this._gifCanvas}set gifFrames(t){this._gifFrames.value=t}get gifFrames(){return this._gifFrames.value}get gifFramesChanged(){return this._gifFrames.changed}get gifSize(){return this._gifSize.value}get gifSizeChanged(){return this._gifSize.changed}get gifDuration(){return this._gifDuration.value}get gifDurationChanged(){return this._gifDuration.changed}get autoPlayOnLoad(){return this._autoPlayOnLoad.value}set autoPlayOnLoad(t){this._autoPlayOnLoad.value=t}get autoPlayOnLoadChanged(){return this._autoPlayOnLoad.changed}_getFrame(t){const n=this._gifDurations.length;for(let i=0;i<n;++i)if(t<=this._gifDurations[i])return i;throw new Error("should not be here")}}class lm extends U{constructor(t){super();h(this,"_player");h(this,"_url",this.disposeVar(z("")));h(this,"_loadGifFramesProcessing",this.disposeVar(hc(t=>xa(sm(t)))));this._player=this.disposeVar(new am(t)),this._player.autoPlayOnLoad=!0,this._loadGifFramesProcessing.completeFunc=({gifFrames:n})=>this._player.gifFrames=n,this.dispose(this._url.changed.disposableOn(n=>{this._player.gifFrames=void 0,this._loadGifFramesProcessing.restart(new Jr(`reload gif(${n})`),n)}))}get player(){return this._player}set url(t){this._url.value=t}get url(){return this._url.value}get loadedEvent(){return this._loadGifFramesProcessing.completeEvent}get size(){return this._player.gifSize}get sizeChanged(){return this._player.gifSizeChanged}get duration(){return this._player.gifDuration}get durationChanged(){return this._player.gifDurationChanged}}class um extends U{constructor(t,n){super();h(this,"_gif",this.disposeVar(new lm));h(this,"_update");this._complexImage=t,this._imageUri=n,this._gif.url=this._imageUri,this._update=this.disposeVar(Ta(()=>this.update())),this._update.start()}get gif(){return this._gif}update(){const{player:t}=this._gif;if(!t.gifFrames)return;const n=this._complexImage,{width:i,height:s}=t.gifCanvas;n.size=[i,s],n.pixelFormat="RGBA",n.copyTexture({source:t.gifCanvas});{const o=()=>{t.autoPlayOnLoad=this._complexImage.autoplay};o(),this.dispose(this._complexImage.autoplayChanged.disposableOn(o))}{const o=()=>{t.loop=this._complexImage.loop};o(),this.dispose(this._complexImage.loopChanged.disposableOn(o))}}}function cm(r,e){const[t,n,i]=Ul(r),s=z(void 0),o=()=>{const a=t()??e;s.value=a&&lt.context.getStrFromEnv(a)};return o(),i&&s.d(i.don(o)),s.d(lt.context.environmentVariablesChanged.don(o)),s}function hm(r){const e=/\${(.*?)\}/g;if(!e.test(r))return r;const t=r.replace(e,(n,i)=>{const s=lt.context.getEnv(i);return s===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):s});return hm(t)}class kw extends U{constructor(t){super();h(this,"_sceneObjRefs",new Map);h(this,"_refs",{});h(this,"_refsChanged",this.dv(new N));const n=(i,s,o)=>{if(o){const a=this.getLastSceneObject(o),l=this._sceneObjRefs.get(o);if(!l)console.warn(`this._sceneObjRefs中不存在ref(${o}), 可能系统存在逻辑问题`);else{const c=l.indexOf(i);c===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(l.splice(c,1),l.length===0&&this._sceneObjRefs.delete(o))}const u=this.getLastSceneObject(o);this._refs[o]=u,this._refsChanged.emit(u,a)}if(s){const a=this.getLastSceneObject(s),l=this._sceneObjRefs.get(s);l?(l.push(i),l.length>0&&console.warn(`同时存在多个ref${s}相同的场景对象!
22
- ${l.map(c=>`${c.id} ${c.typeName}
23
- `).join(" ")}`)):this._sceneObjRefs.set(s,[i]);const u=this.getLastSceneObject(s);this._refs[s]=u,this._refsChanged.emit(u,a)}};this.d(t.sceneObjCreatedEvent.don(i=>{const s=(o,a)=>n(i,o,a);i.ref&&s(i.ref,void 0),i.refChanged.don(s)})),this.d(t.sceneObjToDestroyEvent.don(i=>{i.ref&&n(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(t){const n=this.getSceneObjects(t);if(n)return n[n.length-1]}getSceneObjects(t){const n=this._sceneObjRefs.get(t);if(!(!n||n.length===0))return n}}class Vw extends U{constructor(){super();h(this,"_esObjConstructors",new Map);h(this,"_sceneObjs",new Map);h(this,"_sceneObjCreatedEvent",new N);h(this,"_sceneObjToDestroyEvent",new N);h(this,"_refsManager",this.dv(new kw(this)));h(this,"_environmentVariables",globalThis.ESSDK_ENV||{});h(this,"_environmentVariablesChanged",this.dv(new N))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(t,n,i){return this._esObjConstructors.has(t)&&console.warn(`register warn: ${t} has registered ! will be override!`),this._esObjConstructors.set(t,n),i&&Ii(n,"__sceneObjExtraInfo",i),t}_addSceneObject(t){this._sceneObjs.set(t.id,t),this._sceneObjCreatedEvent.emit(t),t.d(()=>this._deleteSceneObject(t))}addSceneObject(t){this._addSceneObject(t)}_deleteSceneObject(t){this._sceneObjToDestroyEvent.emit(t),this._sceneObjs.delete(t.id)}deleteSceneObject(t){this._deleteSceneObject(t)}createSceneObjectFromClass(t,n){if(!n||this._sceneObjs.has(n)){const s=Ca();n&&console.warn(`已存在相同id的对象!id自动变更!${n} -> ${s} 请注意:id变更可能导致引用失效!`),n=s}if(!n)throw new Error("id不能为空!");const i=new t(n);return i.id!==n&&(console.warn(`sceneObj.id(${i.id}) !== id(${n}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(t,n){if(typeof t=="string"){const i=this._getSceneObjConstructor(t);if(!i){console.warn(`Cannot find SceneObjectType: ${t}`);return}return this.createSceneObjectFromClass(i,n)}else return this.createSceneObjectFromClass(t,n)}createSceneObjectFromUrl(t,n){let i;const s=t.toLowerCase();if(s.includes(".gltf")||s.includes(".glb")?i="ESGltfModel":s.includes("tileset.json")?i="ES3DTileset":s.includes("layer.json")||s.includes("ion://1")?i="ESTerrainLayer":s.includes(".jpg")||s.includes(".png")||s.includes(".jpeg")||s.includes(".webp")||s.includes("image/jpg")||s.includes("image/png")||s.includes("image/jpeg")||s.includes("image/webp")?i="ESImageLabel":(s.includes("/tilemapresource.xml")||s.includes("ion://")||s.includes("wms")||s.includes("wmts")||s.includes("{x}")||s.includes("{y}")||s.includes("{z}"))&&(i="ESImageryLayer"),!!i)return this.createSceneObjectFromJson({type:i,id:n,url:t})}createSceneObjectFromJson(t){const n=this.createSceneObject(t.type,t.id);return n&&(n.json=t),n}destroySceneObject(t){return this._deleteSceneObject(t),t.destroy(),t.isDestroyed()}getSceneObjectById(t){return this._sceneObjs.get(t)}getSceneObject(t){if(!t&&t!="")return Array.from(this._sceneObjs.values());if(typeof t=="function"){const n=[];for(const i of this._sceneObjs.values())i instanceof t&&n.push(i);return n}if(t.startsWith("ES")){const n=[];for(const i of this._sceneObjs.values())i.typeName===t&&n.push(i);return n}return this._sceneObjs.get(t)}_getSceneObjConstructor(t){const n=this._esObjConstructors.get(t);if(n)return n}getProps(t){const n=this._getSceneObjConstructor(t);if(!n){console.warn(`cannot get constructor from type: ${t}`);return}return er(n,"__sceneObjExtraInfo")}setProps(t,n){const i=this._getSceneObjConstructor(t);if(!i){console.warn(`cannot get constructor from type: ${t}`);return}let s=er(i,"__sceneObjExtraInfo");s||(s={},Ii(i,"__sceneObjExtraInfo",s)),Object.assign(s,n)}getProp(t,n){const i=this.getProps(t);return i&&i[n]}setProp(t,n,i){this.setProps(t,{[n]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(t){for(let[n,i]of Object.entries(t))this.setEnv(n,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(t,n){if(this._environmentVariables[t]!==n){const i=this._environmentVariables[t];this._environmentVariables[t]=n,this._environmentVariablesChanged.emit(t,n,i)}globalThis.ESSDK_ENV={...this._environmentVariables}}getEnv(t){return this._environmentVariables[t]}getStrFromEnv(t){return hm(t)}createEnvStrReact(t,n){return cm(t,n)}createEvnStrReact(t,n){return cm(t,n)}}const Et=class Et extends U{constructor(t){super();h(this,"_components",this.dv(new pc));h(this,"_viewerAttached",this.dv(new N));h(this,"_viewerDetached",this.dv(new N));h(this,"_attachedViewers",(()=>{const t=new Set;return this.d(this._viewerAttached.don(n=>{n.actived&&(this.activeViewer=n),n.ad(n.activedChanged.don(i=>{i&&t.has(n)&&(this.activeViewer=n)})),t.add(n)})),this.d(this._viewerDetached.don(n=>{t.delete(n),this.activeViewer==n&&(this.activeViewer=void 0)})),t})());h(this,"_activeViewer",this.dv(z(void 0)));h(this,"_reloadEvent",this.dv(new N));h(this,"_readyEvent",this.dv(new N));h(this,"_createdEvent",this.dv(new N));h(this,"_flushEvent",this.dv(new N));h(this,"_id");h(this,"_updateFuncReact",this.dv(z(void 0)));h(this,"_toDestroyFuncReact",this.dv(z(void 0)));h(this,"_parentID");t!==void 0&&(typeof t!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof t},值为${t}`):t.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):t.trim()!==t&&console.warn(`id前后有空字符串!id: ${t}`)),this._id=t??Ca(),this._initName();{const n=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};n(),this.d(this.execOnceFuncStrChanged.don(n))}{const n=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(s){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};n(),this.d(this.updateFuncStrChanged.don(n));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||Kl(),i.restart(void 0,s=>{this.updateFunc&&this.updateFunc(this,s)}))}))}{const n=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};n(),this.d(this.toDestroyFuncStrChanged.don(n)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static getParentClass(){return Object.getPrototypeOf(this)}static register(t,n,i){Fs(n.prototype,n.createDefaultProps);const s=n.createDefaultProps();n.defaults&&(n.defaults={});for(const o of Object.keys(s))n.defaults[o]=s[o]instanceof Ge?s[o].value:s[o];return this.innerRegister(t,n,i),t}static get envs(){return Et.context.environmentVariables}static get $refs(){return Et.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}get activeViewer(){return this._activeViewer.value}set activeViewer(t){this._activeViewer.value=t}get activeViewerChanged(){return this._activeViewer.changed}removefromViewer(t){this.attachedViewers.has(t)&&t.delete(this)}get reloadEvent(){return this._reloadEvent}reload(){this._reloadEvent.emit()}get readyEvent(){return this._readyEvent}addToViewer(t){this.attachedViewers.has(t)||t.add(this)}registerAttachedObject(t){const n=new Map;this.d(()=>{n.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const s=t(i);s&&n.set(i,s)})),this.d(this._viewerDetached.don(i=>{if(!n.has(i))return;const s=n.get(i);s&&(s.destroy(),n.delete(i))}))}createAttachedObject(t){const n=new Map,i=(()=>{for(let[l,u]of n.entries())u.destroy();n.clear()}),s=l=>{const u=t(l);u&&n.set(l,u)};for(let l of this.attachedViewers)s(l);const o=this._viewerAttached.don(s),a=this._viewerDetached.don(l=>{if(!n.has(l))return;const u=n.get(l);u&&(u.destroy(),n.delete(l))});return()=>{a(),o(),i()}}registerAttachedObjectForContainer(t){this.registerAttachedObject(n=>new jw(n,t))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}get typeName(){return this.constructor.type}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return this.constructor.createDefaultProps()}_innerGetJson(t=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(t){let s,o=this.defaultProps[i];o instanceof Ge?s=o.equals(this[i]):s=o===this[i],s||(n[i]=this[i])}else n[i]=this[i];return n}_innerSetJson(t,n,i){if(!(t instanceof Object)||t.type&&t.type!==this.typeName){console.error(`value.type && value.type${t.type} !== this.typeName${this.typeName}`);return}t.id&&t.id!==this.id&&console.warn(`value.id === undefined || value.id${t.id} !== this.id(${this.id})`);const s=n||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in t)this[a]=t[a]===null?void 0:t[a];else if(!(i??!1)){let l=this.defaultProps[a];l instanceof Ge&&(l=l.value),this[a]=l}}get completeJson(){return this._innerGetJson(!1)}get json(){return this._innerGetJson()}set json(t){this._innerSetJson(t)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(t){this._innerSetJson(JSON.parse(t))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(t){this._updateFuncReact.value=t}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(t){this._toDestroyFuncReact.value=t}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID??this.id}set parentID(t){this._parentID=t}getESProperties(){return{defaultMenu:"general",basic:[],general:[new ct([this,"typeName"],"类型",void 0,!1,!0),new ct([this,"id"],"id",void 0,!1,!0),new ct([this,"name"],"名称"),new yd("JSON",()=>this._jsonStr,t=>t&&(this._jsonStr=t))],dataSource:[],location:[],coordinate:[],style:[],more:[new ct([this,"ref"],"ref",void 0,!0),new ft([this,"extras"],"extras",{},void 0,!0)]}}};h(Et,"context",new Vw),h(Et,"innerRegister",Et.context.register.bind(Et.context)),h(Et,"defaults",{}),h(Et,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:gt(void 0),devTags:Xt(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})),h(Et,"type",Et.register("ESSceneObject",Et,{chsName:"场景类",tags:["ESObjects"],description:""})),h(Et,"create",Et.context.createSceneObject.bind(Et.context)),h(Et,"createFromUrl",Et.context.createSceneObjectFromUrl.bind(Et.context)),h(Et,"createFromClass",Et.context.createSceneObjectFromClass.bind(Et.context)),h(Et,"createFromJson",Et.context.createSceneObjectFromJson.bind(Et.context)),h(Et,"destroySceneObject",Et.context.destroySceneObject.bind(Et.context)),h(Et,"getSceneObjById",Et.context.getSceneObjectById.bind(Et.context)),h(Et,"getSceneObj",Et.context.getSceneObject.bind(Et.context)),h(Et,"getEnv",Et.context.getEnv.bind(Et.context)),h(Et,"setEnv",Et.context.setEnv.bind(Et.context)),h(Et,"getStrFromEnv",Et.context.getStrFromEnv.bind(Et.context)),h(Et,"getSceneObjectById",Et.context.getSceneObjectById.bind(Et.context)),h(Et,"getSceneObject",Et.context.getSceneObject.bind(Et.context));let lt=Et;class jw extends U{constructor(e,t){super(),this.dv(new Ie(e.subContainerChanged,()=>{if(e.subContainer)return t(e,e.subContainer)}))}}const Nh=class Nh extends U{constructor(t,n,i){super();h(this,"_id",++Nh._accumId);this._name=t,this._description=n,this._callFunction=i}get id(){return this._id}get name(){return this._name}get description(){return this._description}get callFunction(){return this._callFunction}};h(Nh,"_accumId",-1);let Vs=Nh;class md extends Vs{constructor(e,t,n,i,s,o){super(e,t,o??(()=>{})),this._withUndefined=n,this._readonly=i,this._defaultValue=s}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class Dn extends md{constructor(t,n,i,s,o,a,l){var c;const u=t instanceof Ge?"未获取到属性名":t[1].toString();super(n??u,a??u,s??!1,o??!1,i,l);h(this,"_propName");h(this,"_typeName");this._reactVar=t,this._propName=u;try{this._typeName=t instanceof Ge?"未获取到对象类型":(c=t[0])==null?void 0:c.typeName}catch{this._typeName="未获取到对象类型"}}get reactVar(){return this._reactVar}get propName(){return this._propName}get typeName(){return this._typeName}}class X extends Dn{get type(){return"BooleanProperty"}}class ct extends Dn{get type(){return"StringProperty"}}class M extends Dn{get type(){return"NumberProperty"}}class Me extends Dn{get type(){return"Number2Property"}}class He extends Dn{get type(){return"Number3Property"}}class Sr extends Dn{get type(){return"Number4Property"}}class Pt extends Sr{get type(){return"ColorProperty"}}class dm extends M{get type(){return"DashPatternProperty"}}class Oi extends Dn{get type(){return"DateProperty"}}class vd extends Dn{get type(){return"DatesProperty"}}class dt extends Vs{constructor(t,n,i){super(t??"",i??"");h(this,"_placement");this._placement=n}get type(){return"DivideProperty"}get placement(){return this._placement}}class st extends Dn{constructor(e,t,n,i,s,o,a){super(e,n,i,s,o,a),this._enums=t}get type(){return"EnumProperty"}get enums(){return this._enums}}class ls extends Dn{constructor(e,t,n,i,s,o,a){super(e,t,n,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class gc extends Dn{constructor(e,t,n,i,s,o,a){super(e,t,n,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class ut extends Vs{constructor(t,n,i,s){const o=t??"Unnamed Function";super(o,s??o);h(this,"_paramsLength");this._func=n,this._defaultParams=i,this._paramsLength=this._func.length??0}get paramsLength(){return this._paramsLength}get defaultParams(){return this._defaultParams}get isOpen(){return this._defaultParams.length!==this._paramsLength}get func(){return this._func}run(...t){this._func(...t)}get type(){return"MethodProperty"}}class Re extends Dn{constructor(e,t,n,i,s,o,a,l){super(e,i,s,o,a,l),this._step=t,this._minMax=n}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}class Di extends He{get type(){return"PositionProperty"}}class iu extends He{get type(){return"RotationProperty"}}function Bw(r,e){const[t,n,i]=Ul(r),[s,o,a]=Ul(e),l=z((t()??0)/(s()??3e3)),u=()=>{const c=l.value,d=s()??3e3,f=t()??0;if(!Number.isFinite(d)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${d} currentTime: ${f}`);return}Math.abs(c*d-f)<.001||(d<=0?l.value=0:l.value=f/d)};return l.dispose(i.disposableOn(u)),l.dispose(a.disposableOn(u)),l.dispose(l.changed.disposableOn(()=>{const c=l.value,d=s()??3e3,f=t()??0;if(!Number.isFinite(d)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${d} currentTime: ${f}`);return}Math.abs(c*d-f)<.001||n(c*d)})),l}class mc extends Vs{constructor(t,n,i,s,o,a){super(s??"播放器",a??"播放器");h(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=t,this._ratioReact=n,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.ratio=o.ratio??this._defaults.ratio,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"PlayerProperty"}get playingReact(){return this._playingReact}get ratioReact(){return this._ratioReact}get loopReact(){return this._loopReact}get defaults(){return this._defaults}}h(mc,"createPlayingRatio",Bw);class fm extends Vs{constructor(t,n,i,s,o,a){const l=s??"视角播放器";super(l,a??l);h(this,"_defaults",{playing:!1,loop:!1});this._playingReact=t,this._stopFn=n,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"ViewPlayerProperty"}get playingReact(){return this._playingReact}get loopReact(){return this._loopReact}get stopFn(){return this._stopFn}get defaults(){return this._defaults}}class ge extends Dn{constructor(e,t,n,i,s,o,a){super(e,t,n,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonArrayProperty"}}class ft extends Dn{constructor(e,t,n,i,s,o,a){super(e,t,n,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class yd extends md{constructor(e,t,n,i,s,o){super(e,o??e,i??!1,s??!1),this._getFunc=t,this._setFunc=n}get getFunc(){return this._getFunc}get setFunc(){return this._setFunc}get type(){return"GetSetProperty"}}var Z=(r=>(r.Place="place",r.BrushErase="brushErase",r.Translation="translation",r.Rotation="rotation",r.Scale="scale",r.DoublePointsAppend="doublePointsAppend",r.DoublePointsModify="doublePointsModify",r.CircularAppend="circularAppend",r.CircularInsert="circularInsert",r.LineStringAppend="lineStringAppend",r.LineStringInsert="lineStringInsert",r.ScatterAppend="scatterAppend",r.ScatterModify="scatterModify",r.VisibilityAppend="visibilityAppend",r.VisibilityModify="visibilityModify",r.HeightModify="heightModify",r.SinglePoint="singlePoint",r.DoublePoints="doublePoints",r))(Z||{});const _d=[["地形","TERRAIN"],["3D Tiles","CESIUM_3D_TILE"],["地形和3D Tiles","BOTH"]],wd=[["直箭头","straightArrow"],["燕尾箭头","swallowTailArrow"]];var pm=(r=>(r.DECIMAL_DEGREE="DECIMAL_DEGREE",r.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",r.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",r))(pm||{});class zw{constructor(e){this.childPickedInfo=e}}class Uw{constructor(e,t,n,i,s,o){this.pickResult=e,this.sceneObject=t,this.tilesetPickInfo=n,this.geojsonPickInfo=i,this.attachedInfo=s,this.screenPosition=o}assign(e){e!=null&&e.pickedResult&&(this.pickResult=e.pickedResult),e!=null&&e.sceneObject&&(this.sceneObject=e.sceneObject),e!=null&&e.tilesetPickInfo&&(this.tilesetPickInfo=e.tilesetPickInfo),e!=null&&e.geojsonPickInfo&&(this.geojsonPickInfo=e.geojsonPickInfo),e!=null&&e.attachedInfo&&(this.attachedInfo=e.attachedInfo),e!=null&&e.screenPosition&&(this.screenPosition=e.screenPosition)}}const be=class be extends lt{constructor(t){super(t);h(this,"_editing",this.dv(z(!1)));h(this,"editingID");h(this,"editingBindMode","singlePoint");h(this,"_deprecated",[]);h(this,"_flyInEvent",this.dv(new N));h(this,"_flyToEvent",this.dv(new N));h(this,"_flyOverEvent",this.disposeVar(new N));h(this,"_pickedEvent",this.dv(new N));h(this,"_calcFlyToParamEvent",this.dv(new N));h(this,"_calcFlyInParamEvent",this.dv(new N));h(this,"useCalcFlyToParamInESObjectWithLocation",!1);_m(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(t){this._editing.value=t}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const t=this._deprecated;for(let n=0;n<t.length;n++){const i=t[n];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(s=>{Reflect.has(this,s+"Changed")&&this.d(this[s+"Changed"].don(a=>{const l=i[s];typeof l=="string"?console.warn(`注意:${this.typeName} 的 ${s} 属性下版本将会被移除!`):Object.keys(l).forEach((u=>{a===u&&console.warn(`注意:${this.typeName} 的 ${s} 属性值 ${u} 下版本将会被移除,推荐使用属性值 ${l[u]}`)}))}))})}}get flyInEvent(){return this._flyInEvent}flyIn(t=1){this._flyInEvent.emit(t,be._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(t=1){this._flyToEvent.emit(t,be._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(t){return await t.getBoundSphere(this.id)}getESProperties(){const t={...super.getESProperties()};return{...t,general:[...t.general,new X([this,"show"],"是否显示",be.defaults.show),new X([this,"collision"],"开启碰撞",be.defaults.collision),new X([this,"allowPicking"],"允许拾取",be.defaults.allowPicking),new ut("保存观察视角",()=>this.calcFlyToParam(),[]),new ut("清空飞向参数",()=>this.emptyFlyToParam(),[]),new ut("保存飞入参数",()=>this.calcFlyInParam(),[]),new ut("清空飞入参数",()=>this.emptyFlyInParam(),[])],more:[...t.more,new dt("飞行定位"),new ut("飞向",n=>this.flyTo(n),[1],"flyTo"),new ft([this,"flyToParam"],"飞行参数",void 0,void 0,!0),new M([this,"flyToDistance"],"flyToDistance",void 0,!0),new M([this,"flyToHeading"],"flyToHeading",void 0,!0),new M([this,"flyToPitch"],"flyToPitch",void 0,!0),new M([this,"flyToFlyDuration"],"flyToFlyDuration",void 0,!0),new M([this,"flyToHDelta"],"flyToHDelta",void 0,!0),new M([this,"flyToPDelta"],"flyToPDelta",void 0,!0),new dt("飞入参数"),new ut("飞入",n=>this.flyIn(n),[1],"flyIn"),new ft([this,"flyInParam"],"飞入参数",void 0,void 0,!0)]}}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(t){this.flyToParam=t!==void 0?{...this.flyToParam??be.defaultFlyToParam,distance:t}:void 0}set flyToHeading(t){this.flyToParam=t!==void 0?{...this.flyToParam??be.defaultFlyToParam,heading:t}:void 0}set flyToPitch(t){this.flyToParam=t!==void 0?{...this.flyToParam??be.defaultFlyToParam,pitch:t}:void 0}set flyToFlyDuration(t){this.flyToParam=t!==void 0?{...this.flyToParam??be.defaultFlyToParam,flyDuration:t}:void 0}set flyToHDelta(t){this.flyToParam=t!==void 0?{...this.flyToParam??be.defaultFlyToParam,hDelta:t}:void 0}set flyToPDelta(t){this.flyToParam=t!==void 0?{...this.flyToParam??be.defaultFlyToParam,pDelta:t}:void 0}};h(be,"createDefaultProps",()=>({...lt.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:Kt(void 0),flyInParam:Kt(void 0)})),h(be,"type",be.register("ESVisualObject",be,{chsName:"可视化对象",tags:["ESObjects"],description:"可视化对象"})),h(be,"supportEditingModes",[]),h(be,"defaultFlyToParam",{distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0}),h(be,"defaultFlyInParam",{position:[0,0,0],rotation:[0,0,0],flyDuration:1}),h(be,"_lastFlyInId",0),h(be,"_lastFlyToId",0);let jt=be;class gm extends U{constructor(){super();h(this,"_data",this.dv(z(void 0)))}set data(t){this._data.value=t}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class mm extends U{constructor(){super(...arguments);h(this,"_dragStartEvent",this.dv(new N));h(this,"_dragOverEvent",this.dv(new N));h(this,"_dragLeaveEvent",this.dv(new N));h(this,"_dropEvent",this.dv(new N))}dragStart(t){this._dragStartEvent.emit(t)}dragOver(t){this._dragOverEvent.emit(t)}dragLeave(t){this._dragLeaveEvent.emit(t)}drop(t){this._dropEvent.emit(t)}}function Gw(r,e){e&&(Reflect.has(e,"editing")?e.editing=!0:Reflect.has(e,"positionEditing")&&(e.positionEditing=!0))}function Ww(r){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(r.typeName)||(Reflect.has(r,"editing")?r.editing=!0:Reflect.has(r,"positionEditing")&&(r.positionEditing=!0)),typeof r.execOnCreating=="function"&&r.execOnCreating()}function vc(r,e){er(r,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),Ii(r,"__treeItem",e)}function Hw(r){return er(r,"__treeItem")}function qw(r){if(!(r.startsWith("./")||r.startsWith("../")||r.startsWith("/")))return r;const e=document.createElement("a");e.href=r;const t=e.href;return e.remove(),t}function Ed(r){if(typeof r!="string")return!1;try{const e=JSON.parse(r);return typeof e=="object"&&e!==null}catch{return!1}}function Xw(r){try{return new DOMParser().parseFromString(r,"application/xml").getElementsByTagName("parsererror").length===0}catch{return!1}}function Yw(r){return r instanceof Function?r():r}function vm(r,e){for(let t of r)if(e.includes(t))return!0;return!1}function su(r,e){const t=r,n=e;return t===void 0||t.length===0||n===void 0||n.length===0?!0:vm(t,n)}function Jw(r){const e=setTimeout(()=>{r(),clearTimeout(e)})}function Oa(r){let e=r%360;return e=e<0?360+e:e,e}function ym(r){return Oa(r+180)-180}function yc(r,e,t){let n=Oa(r),i=Oa(e);Math.abs(n-i)>180&&(n<i?n+=360:i+=360);const s=n*(1-t)+i*t;return ym(s)}function Cd(r,e,t,n){return n=n||[0,0,0],n[0]=yc(r[0],e[0],t),n[1]=yc(r[1],e[1],t),n[2]=yc(r[2],e[2],t),n}function _m(r,e,t="editing"){const n=new U;r.ad(n);const i=e.bind(r);return n.ad(new Ie(r.activeViewerChanged,()=>{const s=new U;let o=r.activeViewer;return o?(s.ad(r[`${t}Changed`].don(()=>{var a;r[`${t}`]?i():(a=(r.components.main??r).editingID)!=null&&a.includes("inner")&&r.activeViewer&&r.activeViewer.stopEditing()})),s.ad(o.editingEvent.don(a=>{if(a.objectIDs.includes(r.id)&&a.type==="end"){const l=r.components.main??r;l.editingID&&(a.editingID.includes(l.editingID)?(l.editingID=void 0,r[t]=!1):r[t]=!l.editingID.includes("outer"))}}))):s.ad(r[`${t}Changed`].don(()=>{r[`${t}`]=!1})),s})),r[`${t}`]&&i(),n}function wm(r){var t;const e=Array.isArray(r)?"feature":((t=r.type)==null?void 0:t.toLowerCase())??"";switch(e){case"geometrycollection":return $w(r);case"topology":const n=r.objects,i=[];for(const s in n){const o=$_.feature(r,n[s]);i.push(...o.features)}return{type:"FeatureCollection",features:i};case"feature":return{type:"FeatureCollection",features:Array.isArray(r)?r:[r]};case"featurecollection":return r;default:return console.warn(`GeoJson数据转换可能有误,数据类型${e}`),{type:"FeatureCollection",features:Array.isArray(r.features)?r.features:[]}}}function $w(r,e){const t=[],n=r.geometries||[];function i(s,o={}){!s||!s.type||(s.type==="GeometryCollection"&&Array.isArray(s.geometries)?s.geometries.forEach(a=>i(a,o)):t.push({type:"Feature",geometry:s,properties:{...s.properties||{},...o}}))}return n.forEach(s=>i(s,{})),{type:"FeatureCollection",features:t}}function Kw(r){const e=r.cloneNode(!0);e.style.position="fixed",e.style.visibility="hidden",e.style.pointerEvents="none",e.style.top="0",e.style.left="0",e.style.display="inline-block",document.body.appendChild(e);const t=e.getBoundingClientRect();return document.body.removeChild(e),{x:t.x,y:t.y,width:t.width,height:t.height}}function Zw(r,e,t=!1){var d,f,p,_,S,b;const n=[],i=[],s=[],o=[],a=[],l=new Set,u=new Map;if(e!=null&&e.features)for(const I of e.features){const m=((d=I.id)==null?void 0:d.toString())||((p=(f=I.properties)==null?void 0:f.id)==null?void 0:p.toString());m&&(l.add(m),u.set(m,I))}if(r!=null&&r.features)for(const I of r.features){const m=((_=I.id)==null?void 0:_.toString())||((b=(S=I.properties)==null?void 0:S.id)==null?void 0:b.toString());if(m)if(l.has(m)){if(t){const w=u.get(m);w&&Em(w,I)?o.push(m):a.push(m)}n.push(m)}else i.push(m)}for(const I of l)n.includes(I)||s.push(I);const c={unchangedIds:n,newIds:i,removedIds:s};return t&&(c.contentUnchangedIds=o,c.contentUpdatedIds=a),c}function Em(r,e){return Cm(r.geometry,e.geometry)?JSON.stringify(r.properties)===JSON.stringify(e.properties):!1}function Cm(r,e){if(r===e)return!0;if(!r||!e||r.type!==e.type)return!1;const t=r.coordinates,n=e.coordinates;if(r.type==="Point")return Qw(t,n);if(r.type==="LineString"||r.type==="MultiPoint")return _c(t,n);if(r.type==="Polygon"){if(t.length!==n.length)return!1;for(let i=0;i<t.length;i++)if(!_c(t[i],n[i]))return!1;return!0}if(r.type==="MultiLineString"){if(t.length!==n.length)return!1;for(let i=0;i<t.length;i++)if(!_c(t[i],n[i]))return!1;return!0}if(r.type==="MultiPolygon"){if(t.length!==n.length)return!1;for(let i=0;i<t.length;i++){const s=t[i],o=n[i];if(s.length!==o.length)return!1;for(let a=0;a<s.length;a++)if(!_c(s[a],o[a]))return!1}return!0}return JSON.stringify(r)===JSON.stringify(e)}function Qw(r,e){if(!r||!e)return r===e;if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(Math.abs(r[t]-e[t])>1e-10)return!1;return!0}function _c(r,e){if(r===e)return!0;if(!r||!e||r.length!==e.length)return!1;for(let t=0;t<r.length;t++){const n=r[t],i=e[t];if(n.length!==i.length)return!1;for(let s=0;s<n.length;s++)if(Math.abs(n[s]-i[s])>1e-10)return!1}return!0}class Sd extends U{constructor(t){super();h(this,"_sceneObject",this.dv(z(void 0)));this._id=t,this.d(()=>{this._sceneObject.value=void 0});const n=lt.getSceneObjById(this._id);n&&(this._sceneObject.value=n),this.d(lt.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(lt.context.sceneObjToDestroyEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=void 0)}))}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}get id(){return this._id}}class tE extends U{constructor(t,n){super();h(this,"_sofi");this._id=t,this._sofi=this.dv(new Sd(this._id));{const i=()=>{n.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class Sm extends U{constructor(){super();h(this,"_id",this.dv(z(void 0)));h(this,"_sceneObject",this.dv(z(void 0)));h(this,"_resetting",this.dv(new Ie(this.idChanged,()=>{const{id:t}=this;if(t===void 0||t===""){this.sceneObject=void 0;return}return new tE(t,this)})))}get id(){return this._id.value}get idChanged(){return this._id.changed}set id(t){this._id.value=t}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}set sceneObject(t){this._sceneObject.value=t}get resetting(){return this._resetting}}class eE extends U{constructor(t,n,i,s){super();h(this,"_sceneObjectId",this.dv(new Sm));this._id=t,this._startTimeStamp=n,this._duration=i,this._parent=s,this._sceneObjectId.id=this._id;const o=()=>{if(!this.player)return;const{currentTime:a=0}=this._parent,l=a-this._startTimeStamp;this.player.currentTime=uc(l,0,this._duration)*(this.player.speed??1)};o(),this.d(this._parent.currentTimeChanged.don(o)),this.d(this.playerChanged.don(o))}get player(){return this._sceneObjectId.sceneObject instanceof $r?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const nE=`
21
+ `)}}),globalThis.g_XE3CopyRights=globalThis.g_XE3CopyRights||{},globalThis.g_XE3CopyRights[n]=d.copyright,globalThis.g_XE3SendProductUsageInfo=globalThis.g_XE3SendProductUsageInfo||!0,globalThis.g_XE3SendProductUsageInfo&&(setTimeout(()=>eh(d.copyright),1e3*60),setInterval(()=>eh(d.copyright),1440*60*1e3)),globalThis.g_earthsdk_copyright_print=globalThis.g_earthsdk_copyright_print??!0,globalThis.g_earthsdk_copyright_print&&d.copyright.print()}catch{console.warn("版本信息有误!")}const th=new Set;function Xi(n,s=n){th.has(s)||(th.add(s),console.warn(n))}function Ws(n){const s=Sn(n),e=()=>s[0][s[1]],t=r=>{try{s[0][s[1]]=r}catch(o){Xi(`setValue error, obj(${s[0].constructor.name}) prop(${s[1]}) error(${o})`)}},i=s[0][s[2]];return[e,t,i]}function Yl(){return!0}function Kl(){throw new Error("throwOnDestroyed")}function ih(n){for(var s in n)typeof n[s]=="function"&&(n[s]=Kl);n.isDestroyed=Yl}const mr=class mr{constructor(){a(this,"_memId",++mr._lastMemId);a(this,"_disposers")}get __v_skip(){return!0}get memId(){return this._memId}get disposers(){return this._disposers||(this._disposers=[]),this._disposers}dispose(s){return this.disposers.push(s),s}d(s){return this.dispose(s)}disposeVar(s){return this.disposers.push(()=>s.destroy()),s}dv(s){return this.disposeVar(s)}tryDisposeVar(s){return this.disposers.push(()=>s.tryDestroy()),s}tdv(s){return this.tryDisposeVar(s)}autoDispose(s){return typeof s=="function"?this.dispose(s):this.disposeVar(s)}ad(s){return typeof s=="function"?this.dispose(s):this.disposeVar(s)}isDestroyed(){return!1}destroyImp(){}destroy(){if(this._toDestroyEvent&&this._toDestroyEvent.emit(),this.destroyImp(),this._disposers)try{const s=this._disposers,e=s.length;for(let t=e-1;t>=0;--t)s[t]();s.length=0,this._disposers=void 0}catch(s){console.error(`destroy get error! ${s}`)}return ih(this)}tryDestory(){if(!this.isDestroyed())return this.destroy()}};a(mr,"_lastMemId",-1);let b=mr,wr;function sh(n){wr=n}Object.defineProperties(b.prototype,{toDestroyEvent:{get(){if(this._toDestroyEvent===void 0){if(!wr)throw new Error("Destroyable EventCtor not registered yet!");this._toDestroyEvent=this.disposeVar(new wr)}return this._toDestroyEvent}}});class En{constructor(s,e,t=!1){a(this,"_freeElements");a(this,"_usedElementsCount");a(this,"_usedElements");a(this,"_nextCreateID");a(this,"_scratchObjs");this._createDefaultFunc=s,this._destroyFunc=e,this._freeElements=[],this._usedElementsCount=0,this._nextCreateID=1,this._scratchObjs=[],t&&(this._usedElements=[])}get usedElementsCount(){return this._usedElementsCount}get freeElementsCount(){return this._freeElements.length}_getCreateID(){return this._nextCreateID++}_create(){let s;return this._freeElements.length>0?s=this._freeElements.pop():s=this._createDefaultFunc&&this._createDefaultFunc()||{},s._cid=this._getCreateID(),s}create(){return this._create()}multiCreate(s){this._scratchObjs.length=0;for(let e=0;e<s;++e)this._scratchObjs.push(this._create());return this._scratchObjs}_destroy(s){this._destroyFunc&&this._destroyFunc(s),s._cid=void 0}destroy(...s){const e=s.length;for(let t=0;t<e;++t)this._destroy(s[t])}}function Zl(){return{item:void 0,previous:void 0,next:void 0}}function Ql(n){n.item=void 0,n.previous=void 0,n.next=void 0}const nh=new En(Zl,Ql,!0);function yr(n,s,e){const t=nh.create();return t.item=n,t.previous=s,t.next=e,t}function rh(n){if(!n)throw new Error("node is undefined!");nh.destroy(n)}function br(n,s){s.previous&&s.next?(s.previous.next=s.next,s.next.previous=s.previous):s.previous?(s.previous.next=void 0,n.tail=s.previous):s.next?(s.next.previous=void 0,n.head=s.next):(n.head=void 0,n.tail=void 0),s.next=void 0,s.previous=void 0}class oh{constructor(s){a(this,"head");a(this,"tail");a(this,"_length");const{needLength:e}=s||{needLength:!0};this.head=void 0,this.tail=void 0,e&&(this._length=0)}_incrementLength(){typeof this._length=="number"&&++this._length}_decrementLength(){typeof this._length=="number"&&--this._length}_setLength(s){typeof this._length=="number"&&(this._length=s)}get length(){return this._length}get empty(){return!this.head}*[Symbol.iterator](){let s=this.head;for(;s;)yield s,s=s.next}remove(s){if(!s)throw new Error("node is undefined!");br(this,s),this._decrementLength(),rh(s)}getNode(s){let e=this.head;for(;e!==null;){if(!e)throw new Error("current is undefined!");if(e.item===s)return e;e=e.next}}moveAfter(s,e){if(s!==e){br(this,e);var t=s.next;s.next=e,this.tail===s?this.tail=e:t&&(t.previous=e),e.next=t,e.previous=s}}moveBefore(s,e){if(s!==e){br(this,e);var t=s.previous;s.previous=e,this.head===s?this.head=e:t&&(t.next=e),e.previous=t,e.next=s}}insertBefore(s,e){const t=yr(e,s.previous,s);return s.previous&&(s.previous.next=t),s.previous=t,this.head===s&&(this.head=t),this._incrementLength(),t}insertAfter(s,e){const t=yr(e,s,s.next);return s.next&&(s.next.previous=t),s.next=t,this.tail===s&&(this.tail=t),this._incrementLength(),t}_setFirstNode(s){if(this.head||this.tail)throw new Error("_setFirstNode error!");const e=yr(s,void 0,void 0);if(this.head=e,this.tail=e,this._incrementLength(),this._length!==1)throw new Error("_setFirstNode error! this._length !== 1");return e}push(s){return this.tail?this.insertAfter(this.tail,s):this._setFirstNode(s)}pop(){if(!this.tail)throw new Error("DoublyLinkedList is empty!");const s=this.tail.item;return this.remove(this.tail),s}shift(){if(!this.head)throw new Error("DoublyLinkedList is empty!");const s=this.head.item;return this.remove(this.head),s}unshift(s){return this.head?this.insertBefore(this.head,s):this._setFirstNode(s)}removeAll(){let s=this.head;for(;s;){const e=s.next;rh(s),s=e}this.head=void 0,this.tail=void 0,this._setLength(0)}}function ed(){return{func:void 0,scope:void 0,_hasRemoved:!1,_once:!1}}function td(n){n.func=void 0,n.scope=void 0,n._hasRemoved=!1,n._once=!1}const gi=new En(ed,td,!0);class Er{constructor(){a(this,"__dll");a(this,"__currentListenerStack")}get _dll(){return this.__dll=this.__dll??new oh({needLength:!0}),this.__dll}_pushCurrentListener(s){this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.push(s):this.__currentListenerStack=[this.__currentListenerStack,s]:this.__currentListenerStack=s}_popCurrentListener(){if(this.__currentListenerStack)Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.pop():this.__currentListenerStack=void 0;else throw new Error("cannot pop!")}_hasCurrentListener(s){return this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.indexOf(s)!==-1:this.__currentListenerStack===s:!1}do(...s){if(this.__dll&&!this._dll.empty){let e=this._dll.head;for(;e;){const t=e.item;t._hasRemoved||(this._pushCurrentListener(t),t.func.call(t.scope,...s),this._popCurrentListener());const i=e.next;t._once&&!t._hasRemoved&&(this.remove(e),e=void 0),e&&this._clearHasRemoved(e),e=i}}}get empty(){if(!this.__dll||this._dll.empty)return!0;let s=!0,e=this._dll.head;for(;e;){if(!e.item._hasRemoved){s=!1;break}e=e.next}return s}isHandlerValid(s){return!s.item._hasRemoved}nextHandler(s){if(!s.item._hasRemoved)throw new Error("handler has removed!");let e=s.next;for(;e&&e.item._hasRemoved;)e=e.next;return e}prevHandler(s){if(!s.item._hasRemoved)throw new Error("handler has removed!");let e=s.previous;for(;e&&e.item._hasRemoved;)e=e.previous;return e}moveAfter(s,e){if(s.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or nextHandler has removed!");return this._dll.moveAfter(s,e)}moveBefore(s,e){if(s.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or prevHandler has removed!");return this._dll.moveBefore(s,e)}insertBefore(s,e,t,i=!1){if(s.item._hasRemoved)throw new Error("handler has removed!");const r=gi.create();return r.func=e,r.scope=t,r._once=i,this._dll.insertBefore(s,r)}insertAfter(s,e,t,i=!1){if(s.item._hasRemoved)throw new Error("handler has removed!");const r=gi.create();return r.func=e,r.scope=t,r._once=i,this._dll.insertAfter(s,r)}_clearHasRemoved(s){s.item._hasRemoved&&!this._hasCurrentListener(s.item)&&(gi.destroy(s.item),this._dll.remove(s))}remove(s){if(!s.item||s.item._hasRemoved)throw new Error("handler has removed!");this._hasCurrentListener(s.item)?s.item._hasRemoved=!0:(gi.destroy(s.item),this._dll.remove(s))}removeAll(){if(this.__dll&&!this._dll.empty){let s=this._dll.head;for(;s;){const e=s.next;s.item._hasRemoved||this.remove(s),s=e}}}destroy(){if(!this.__dll)return;let s=this._dll.head;for(;s;){const e=s.next,t=s;this._hasCurrentListener(t.item)||(console.warn("Event has remove item that on current stack!"),console.warn(`${t.item.func.toString()}`)),gi.destroy(t.item),this._dll.remove(t),s=e}this.__dll=void 0,this.__currentListenerStack=void 0}push(s,e,t=!1){const i=gi.create();return i.func=s,i.scope=e,i._once=t,this._dll.push(i)}pop(){const s=this.tail;if(!s)throw new Error("pop error!");this.remove(s)}shift(){const s=this.head;if(!s)throw new Error("shift error!");this.remove(s)}unshift(s,e,t=!1){const i=gi.create();return i.func=s,i.scope=e,i._once=t,this._dll.unshift(i)}get tail(){let s=this._dll.tail;for(;s&&s.item._hasRemoved;)s=s.previous;return s}get head(){let s=this._dll.head;for(;s&&s.item._hasRemoved;)s=s.previous;return s}}class Bs{constructor(){a(this,"_listenerHandler");a(this,"_cid")}_reset(s,e){this._listenerHandler=s,this._cid=e}clone(s){return s=s??new Bs,s._reset(this._listenerHandler,this._cid),s}get valid(){if(typeof this._listenerHandler<"u"&&typeof this._cid=="number"){const s=this._listenerHandler._cid;if(typeof s<"u"&&this._cid===s)return!0}return!1}}class Cr extends Bs{}class m extends b{constructor(){super(...arguments);a(this,"__pipe");a(this,"beforeCallback");a(this,"afterCallback")}get _pipe(){return this.__pipe=this.__pipe??new Er,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}emit(...e){!this.isDestroyed()&&this.beforeCallback&&this.beforeCallback(...e),!this.isDestroyed()&&this._pipe.do(...e),!this.isDestroyed()&&this.afterCallback&&this.afterCallback(...e)}on(e,t,i=!1,r){const o=i?this._pipe.unshift(e,t,!1):this._pipe.push(e,t,!1);return r=r??new Cr,r._reset(o,o._cid),r}disposableOn(e,t,i=!1,r){const o=this.on(e,t,i,r);return()=>{o.valid&&this.off(o)}}don(e,t,i=!1,r){return this.disposableOn(e,t,i,r)}disposableWeakOn(e,t,i=!1,r){const o=new b,h=()=>{!o.isDestroyed()&&o.destroy()};return o.dispose(this.disposableOn(e,t,i,r)),o.dispose(this.toDestroyEvent.disposableOn(h)),h}dwon(e,t,i=!1,r){return this.disposableWeakOn(e,t,i,r)}once(e,t,i=!1,r){const o=i?this._pipe.unshift(e,t,!0):this._pipe.push(e,t,!0);return r=r??new Cr,r._reset(o,o._cid),r}disposableOnce(e,t,i=!1,r){const o=this.once(e,t,i,r);return()=>o.valid&&this.off(o)}donce(e,t,i=!1,r){const o=this.once(e,t,i,r);return()=>o.valid&&this.off(o)}off(e){if(!e.valid)throw new Error("handler is not valid!");this._pipe.remove(e._listenerHandler),e._reset()}reset(){this._pipe.removeAll()}destroyImp(){this.empty||(Xi("The event is destroying with listeners!"),this._pipe.removeAll())}}sh(m);function Yi(n,s){return s=s??new Bs,s._reset(n,n._cid),s}class id{constructor(){a(this,"__pipe")}get _pipe(){return this.__pipe=this.__pipe??new Er,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}do(...s){return this._pipe.do(...s)}isHandlerValid(s){return s.valid?this._pipe.isHandlerValid(s._listenerHandler):!1}moveAfter(s,e){if(!s.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(s._listenerHandler,e._listenerHandler)}moveBefore(s,e){if(!s.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(s._listenerHandler,e._listenerHandler)}insertBefore(s,e,t,i=!1,r){if(!s.valid)throw new Error("handler is not valid!");const o=this._pipe.insertBefore(s._listenerHandler,e,t,i);return Yi(o,r)}insertAfter(s,e,t,i=!1,r){if(!s.valid)throw new Error("handler is not valid!");const o=this._pipe.insertAfter(s._listenerHandler,e,t,i);return Yi(o,r)}remove(s){if(!s.valid)throw new Error("handler is not valid!");return this._pipe.remove(s._listenerHandler)}removeAll(){return this._pipe.removeAll()}push(s,e,t=!1,i){const r=this._pipe.push(s,e,t);return Yi(r,i)}pop(){return this._pipe.pop()}shift(){return this._pipe.shift()}unshift(s,e,t=!1,i){const r=this._pipe.unshift(s,e,t);return Yi(r,i)}getTail(s){const e=this._pipe.tail;if(e)return Yi(e,s)}getHead(s){const e=this._pipe.head;if(e)return Yi(e,s)}}class fe extends b{constructor(e,t,i){super();a(this,"_changed");a(this,"_value");a(this,"_oldValue");a(this,"toChangeFunc");this._equalsFunc=t,this._assignFunc=i,this._value=this._assignFunc&&this._assignFunc(e,void 0)||e}get assignFunc(){return this._assignFunc}get equalsFunc(){return this._equalsFunc}equals(e){return this._equalsFunc?this._equalsFunc(this._value,e):this._value===e}set value(e){if(this._equalsFunc?!this._equalsFunc(this._value,e):this._value!==e){if(this.toChangeFunc&&!this.toChangeFunc(e,this._value))return;this._assignFunc?(this._oldValue=this._assignFunc(this._value,this._oldValue),this._value=this._assignFunc(e,this._value)):(this._oldValue=this._value,this._value=e),this._changed&&this._changed.emit(e,this._oldValue)}}get value(){return this._value}get changed(){return this._changed||(this._changed=this.disposeVar(new m)),this._changed}forceChange(){this._changed&&this._changed.emit(this._value,this._value)}}function y(n,s,e){return new fe(n,s,e)}function F(n){return new fe(n,(s,e)=>s.length!==e.length?!1:s.every((t,i)=>t===e[i]),(s,e)=>{const t=e||new Array(s.length);return t.length=s.length,s.forEach((i,r)=>t[r]=i),t})}function ee(n){return y(n,(s,e)=>s===void 0||e===void 0?s===void 0&&e===void 0:s.length!==e.length?!1:s.every((t,i)=>t===e[i]),(s,e)=>{if(!s)return;const t=e||new Array(s.length);return t.length=s.length,s.forEach((i,r)=>t[r]=i),t})}function Cn(n,s,e){return y(n,(t,i)=>t.length!==i.length?!1:t.every((r,o)=>s&&s(r,i[o])||r===i[o]),(t,i)=>{const r=i||new Array(t.length);return r.length=t.length,t.forEach((o,h)=>{r[h]=e?e(o):o}),r})}function Xt(n,s,e){return y(n,(t,i)=>t===void 0||i===void 0?t===void 0&&i===void 0:t.length!==i.length?!1:t.every((r,o)=>s&&s(r,i[o])||r===i[o]),(t,i)=>{if(!t)return;const r=i||new Array(t.length);return r.length=t.length,t.forEach((o,h)=>{r[h]=e?e(o):o}),r})}function W(n){return new fe(n,(s,e)=>s===e||s!==void 0&&e!==void 0&&JSON.stringify(s)===JSON.stringify(e),(s,e)=>{if(s!==void 0)return JSON.parse(JSON.stringify(s))})}function te(n){return new fe(n,(s,e)=>s===e||s!==void 0&&e!==void 0&&JSON.stringify(s)===JSON.stringify(e),(s,e)=>{if(s!==void 0)return JSON.parse(JSON.stringify(s))})}function sd(n){return new fe(n,(s,e)=>{if(s===e)return!0;if(s===void 0||e===void 0)return!1;const t=Object.keys(s),i=Object.keys(e);return t.length!==i.length?!1:t.every((r,o)=>r===i[o]&&s[r]===e[r])},(s,e)=>s&&{...s})}function nd(n){return new fe(n,(s,e)=>{if(s===e)return!0;if(s===void 0||e===void 0)return!1;const t=Object.keys(s),i=Object.keys(e);return t.length!==i.length?!1:t.every((r,o)=>r===i[o]&&s[r]===e[r])},(s,e)=>s&&{...s})}function rd(n){return Cn(n,(s,e)=>s.every((t,i)=>t===e[i]),s=>[...s])}function Sr(n){return Xt(n,(s,e)=>s.every((t,i)=>t===e[i]),s=>[...s])}function od(n){return Cn(n,(s,e)=>JSON.stringify(s)===JSON.stringify(e),s=>JSON.parse(JSON.stringify(s)))}function ad(n){return Xt(n,(s,e)=>JSON.stringify(s)===JSON.stringify(e),s=>JSON.parse(JSON.stringify(s)))}function fi(n){return Sr(n)}function Pr(n){return Xt(n,(s,e)=>s.length===e.length&&s.every((t,i)=>t.every((r,o)=>r===e[i][o])),s=>s.map(e=>[...e]))}function hd(n){return Xt(n,(s,e)=>s.length===e.length&&s.every((t,i)=>t.every((r,o)=>r===e[i][o])),s=>s.map(e=>[...e]))}function Sn(n){const s=n instanceof fe?[n,"value","changed"]:[...n];return s[2]=s[2]||s[1]+"Changed",s}function Tr(n,s,e,t=!1){s[2]=s[2]||s[1]+"Changed";const i=()=>{const r=s[0][s[1]];e?n[0][n[1]]=e(r):n[0][n[1]]=r};return i(),t?s[0][s[2]].disposableWeakOn(i):s[0][s[2]].disposableOn(i)}function cd(n,s,e,t,i=!1){const r=Tr(n,s,e,i),o=Tr(s,n,t,i);return()=>(r(),o())}function _(n,s,e,t=!1){const i=n instanceof fe?[n,"value","changed"]:n,r=s instanceof fe?[s,"value","changed"]:s;return Tr(i,r,e,t)}function x(n,s,e,t,i=!1){const r=Sn(n),o=Sn(s);return cd(r,o,e,t,i)}function ld(n,s,e,t=!1){const[i]=Ws(s);return x(n,s,r=>r??e,r=>{if(!(r===e&&i()===void 0))return r},t)}function Ki(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var s=Math.random()*16|0,e=n==="x"?s:s&3|8;return e.toString(16)})}function Pn(n,s){if(!globalThis||!globalThis.setTimeout||!globalThis.clearTimeout)throw new Error("目前只适合在浏览器中使用!");let e=0;function t(){e>0&&(globalThis.clearTimeout(e),e=0)}function i(...r){t(),e=globalThis.setTimeout(n,s,...r)}return[i,t]}function Ir(n,s,...e){const t=setInterval(n,s,...e);return()=>clearInterval(t)}function Or(n,s,...e){const t=setTimeout(n,s,...e);return()=>clearTimeout(t)}function Tn(n,...s){let e;const t=()=>{const i=performance.now();n(i,...s),e=requestAnimationFrame(t)};return t(),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function Zi(n,...s){let e;return e=requestAnimationFrame(()=>{const i=performance.now();n(i,...s)}),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function Hs(n,...s){let e=!1,t;return new Promise((i,r)=>{t=r,i()}).then(()=>{!e&&n(...s)}).catch(i=>{console.error(i)}),()=>(e=!0)&&t&&(t("nextMicroTask cancelled!"),t=void 0)}class In extends m{constructor(e,t,...i){super();a(this,"_cancellFunc");this._nextFunc=e,this.dispose(()=>{this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0)}),i.forEach(r=>this.dispose(r[t?"dwon":"don"](()=>{this.next()})))}next(){this._cancellFunc||(this._cancellFunc=this._nextFunc(()=>(this._cancellFunc=void 0,this.emit())))}flush(){this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0,this.emit())}}class Dr extends In{constructor(...s){super(Hs,!1,...s)}}function dd(...n){return new Dr(...n)}class ud extends In{constructor(...s){super(Hs,!0,...s)}}function pd(...n){return new Dr(...n)}class On extends In{constructor(...s){super(Zi,!1,...s)}}function ae(...n){return new On(...n)}function gd(n,s){return new On(...n).don(s())}class ah extends In{constructor(...s){super(Zi,!0,...s)}}function fd(...n){return new ah(...n)}function ue(n,s,e={time:"don",immediate:!1}){const t=new On(...Array.isArray(n)?n:[n]),i=t[e.time??"don"](s);return(e.immediate??!1)&&s(),()=>{i(),t.destroy()}}function $s(n){let s;if(typeof n.next=="function")s=n;else if(typeof n[Symbol.iterator]=="function")s=n[Symbol.iterator]();else throw new Error("iteratorOrIterable error!");return s}function Fr(n,s){let e=!1;const t=$s(n);let i=-1;for(;;){const{done:r,value:o}=t.next();if(r)break;if(s(o,++i)){e=!0;break}}return e}function xr(n,s){return!Fr(n,(t,i)=>!s(t,i))}function Gs(n,s,e,t){const i=n;if(!i[s]){const r=t(),o=Object.fromEntries(Object.entries(r).filter(([h,c])=>{const l=Object.getPrototypeOf(e),u=h in l;if(u){const p=c instanceof fe?c.value:c;n[h]=p}return!u}).map(([h,c])=>c instanceof fe?[h,c]:[h,Array.isArray(c)?ee(c):y(c)]));i[s]=o}return i[s]}function Yt(n,s){var t;const e=Symbol(`${(t=n==null?void 0:n.constructor)==null?void 0:t.name}-createDefaultProps`);n.constructor.__xbsj_dpSymbol=e,n.constructor.__xbsj_createDefaultProps=s;for(let[i,r]of Object.entries(s()))if(!Reflect.has(n,i)){const o=function(h){var u,p;if(h[e])return;const c=[];let l=Object.getPrototypeOf(h);for(;l;)c.push(l),l=Object.getPrototypeOf(l);c.reverse();for(let g of c){const f=(u=g.constructor)==null?void 0:u.__xbsj_dpSymbol;if(!f)continue;const w=(p=g.constructor)==null?void 0:p.__xbsj_createDefaultProps;w&&Gs(h,f,g,w)}};Object.defineProperties(n,{[i]:{get(){return o(this),Gs(this,e,n,s)[i].value},set(h){o(this);const c=Gs(this,e,n,s)[i];if(!c){console.error("!propObj");debugger}c.value=h}},[`${i}Changed`]:{get(){return o(this),Gs(this,e,n,s)[i].changed}},[`${i}React`]:{get(){return o(this),Gs(this,e,n,s)[i]}}})}}const Js=new WeakMap;function gt(n,s,e){Js.has(n)||Js.set(n,{});const t=Js.get(n);t[s]=e}function Ae(n,s){return Js.has(n)?Js.get(n)[s]:void 0}function ft(n,s){const e=$s(n);let t=0;for(;;){const{done:i,value:r}=e.next();if(i)break;s(r,t++)}}function qs(n,s,e){const t=$s(n);let i=e,r=0;for(;;){const{done:o,value:h}=t.next();if(o)break;i=s(i,h,r++)}return i}const md=n=>++n;function kr(n){return qs(n,md,0)}function At(n){return qs(n,(s,e)=>s>e?s:e,Number.NEGATIVE_INFINITY)}function Kt(n){return qs(n,(s,e)=>s<e?s:e,Number.POSITIVE_INFINITY)}function hh(n,s){let e=n;for(let t of s)e=e[t];return e}function vd(n,s,e){if(s.length===0)throw new Error("props的数量必须大于0");const t=s.length-1,i=s[t];let r=n;for(let o=0;o<t;++o){const h=s[o];typeof r[h]>"u"&&(r[h]={}),r=r[h]}r[i]=e}function*mi(n,s){const e=$s(n);for(;;){const{done:t,value:i}=e.next();if(t)break;yield hh(i,s)}}class Xs extends b{constructor(){super();a(this,"_innerObj");a(this,"_toChangeEvent");a(this,"_changedEvent");this._innerObj=[],this.dispose(()=>{if(this.length=0,this._innerObj.length>0)throw new Error("this._innerObj.length > 0");this._toChangeEvent&&this._toChangeEvent.reset(),this._innerObj=void 0})}get toChangeEvent(){return this._toChangeEvent||(this._toChangeEvent=new m),this._toChangeEvent}get changedEvent(){return this._changedEvent||(this._changedEvent=new m),this._changedEvent}_resetArray(e){this._toChangeEvent&&this._toChangeEvent.emit([{start:0,deleteCount:this._innerObj.length,items:e}],this);const{length:t}=e;this._innerObj.length=t;for(let i=0;i<t;++i)this._innerObj[i]=e[i];this._changedEvent&&this._changedEvent.emit(this)}splice(e,t,...i){const{length:r}=this._innerObj;e=e>this._innerObj.length?this._innerObj.length:e,e>r?e=r:e<0&&(e+=r,e<0&&(e=0));const o=this._innerObj.length-e;if(t>o?t=o:t<0&&(t=0),arguments.length===1){this._toChangeEvent&&this._toChangeEvent.emit([{start:e,deleteCount:this._innerObj.length-e,items:[]}],this);const h=this._innerObj.splice(e);return this._changedEvent&&this._changedEvent.emit(this),h}else if(arguments.length===2){this._toChangeEvent&&this._toChangeEvent.emit([{start:e,deleteCount:t,items:[]}],this);const h=this._innerObj.splice(e,t);return this._changedEvent&&this._changedEvent.emit(this),h}else{this._toChangeEvent&&this._toChangeEvent.emit([{start:e,deleteCount:t,items:i}],this);const h=this._innerObj.splice(e,t,...i);return this._changedEvent&&this._changedEvent.emit(this),h}}pop(){if(this._innerObj.length===0)return;if(this._toChangeEvent){const t=this._innerObj.length-1,i=1,r=[];this._toChangeEvent.emit([{start:t,deleteCount:i,items:r}],this)}const e=this._innerObj.pop();return this._changedEvent&&this._changedEvent.emit(this),e}push(...e){if(this._toChangeEvent){const i=this._innerObj.length;this._toChangeEvent.emit([{start:i,deleteCount:0,items:e}],this)}const t=this._innerObj.push(...e);return this._changedEvent&&this._changedEvent.emit(this),t}get length(){return this._innerObj.length}set length(e){if(e<0)throw new Error("value < 0");const{length:t}=this._innerObj;if(t!==e){if(this._toChangeEvent){let i,r,o;t>e?(i=e,r=t-e,o=[]):(i=t,r=0,o=new Array(e-t)),this._toChangeEvent.emit([{start:i,deleteCount:r,items:o}],this)}this._innerObj.length=e,this._changedEvent&&this._changedEvent.emit(this)}}get(e){return this._innerObj[e]}set(e,t){const{length:i}=this._innerObj;if(e<0||e>=i)throw new Error("index < 0 || index >= length");this._toChangeEvent&&this._toChangeEvent.emit([{start:e,deleteCount:1,items:[t]}],this),this._innerObj[e]=t,this._changedEvent&&this._changedEvent.emit(this)}indexOf(e){return this._innerObj.indexOf(e)}[Symbol.iterator](){return this._innerObj[Symbol.iterator]()}}function Mr(n,s,...e){let t=n;for(let i of e){if(!t[i])if(s)t[i]={};else return;t=t[i]}return t}function _d(n,s,e){typeof e>"u"&&(s.endsWith(".gltf")?e="model/gltf+json":s.endsWith(".bin")?e="application/octet-stream":s.endsWith(".glb")?e="model/gltf-binary":s.endsWith(".jpg")||s.endsWith(".jpeg")?e="image/jpeg":s.endsWith(".png")?e="image/png":s.endsWith(".glsl")?e="text/plain":s.endsWith(".json")?e="application/json":s.endsWith(".b3dm")||s.endsWith(".i3dm")||s.endsWith("pnts")||s.endsWith("cmpt")?e="application/octet-stream":console.warn(`save ${s}: MimeType无法确定!`));const t=new Blob([n],{type:e||""});let i=URL.createObjectURL(t);var r=document.createElement("a"),o=new MouseEvent("click");r.download=s,r.href=i,r.dispatchEvent(o),URL.revokeObjectURL(i)}function wd(n,s){const e=document.createElement("a"),t=new MouseEvent("click");e.download=s||"下载",e.href=n,e.dispatchEvent(t)}function yd(){return new Promise((n,s)=>{const e=performance.now();requestAnimationFrame(t=>n(t>e))})}const Dn=n=>{let s,e;return e=t=>{t=performance.now(),s=requestAnimationFrame(e),n(t)},s=requestAnimationFrame(e),()=>{cancelAnimationFrame(s)}};function jr(n,s,e=Dn){let t=Number.NEGATIVE_INFINITY,i;function r(c){c-t>s&&i&&(n(...i),i=void 0,t=c)}const o=e&&e(r)||void 0;function h(...c){i=c}return[h,o]}const ch=[];function lh(n,s,e){if(ch.includes(n)){console.warn(`_loadJs ${n} has loaded before!`),s&&s();return}var t=document.getElementsByTagName("head")[0],i=document.createElement("script");i.setAttribute("type","text/javascript"),i.setAttribute("src",n),i.onload=i.onreadystatechange=function(){this.readyState&&this.readyState!=="complete"||(ch.push(n),s&&s(),i.onload=i.onreadystatechange=null)},i.onerror=(r,o,h,c,l)=>{e(l)},t.appendChild(i)}function Rr(n,s=!0){if(s){const e=globalThis.L;globalThis.L&&(globalThis.L=void 0);const t=globalThis.define;return globalThis.define&&(globalThis.define=void 0),new Promise((i,r)=>{lh(n,i,r)}).then(()=>(globalThis.define=t,globalThis.L=e,Promise.resolve()))}else return new Promise((e,t)=>{lh(n,e,t)})}async function dh(n,s=""){return new Promise((e,t)=>{var i=new Image;i.crossOrigin=s,i.src=n,i.onload=()=>e(i),i.onerror=r=>t(r)})}class bd extends b{constructor(s){super(),this._owner=s}get owner(){return this._owner}}function Ed(n,s){if(n.length%3!==0)throw new Error("positions.length % 3 !== 0");const e=n.length/3;function*t(o){for(let h=0;h<e;++h)yield n[h*3+o]}const i=(s==null?void 0:s.min)??[NaN,NaN,NaN],r=(s==null?void 0:s.max)??[NaN,NaN,NaN];return i[0]=Kt(t(0))??NaN,i[1]=Kt(t(1))??NaN,i[2]=Kt(t(2))??NaN,r[0]=At(t(0))??NaN,r[1]=At(t(1))??NaN,r[2]=At(t(2))??NaN,{min:i,max:r}}async function Cd(n,s=fetch){const e=await s(n);return e.ok?await e.arrayBuffer():void 0}class Sd extends b{constructor(e){super();a(this,"_map",new Map);a(this,"_array",[]);a(this,"_createEvent",this.dv(new m));a(this,"_updateEvent",this.dv(new m));a(this,"_destroyEvent",this.dv(new m));this._idFunc=e,this.d(()=>{this._array.length>0&&console.warn("EventFromArrayUpdating: destroy with non-empty array, will trigger destroy event for all items")})}get createEvent(){return this._createEvent}get updateEvent(){return this._updateEvent}get destroyEvent(){return this._destroyEvent}update(e,t={toDel:!0,toAdd:!0,toUpdate:!0}){const{toDel:i=!0,toAdd:r=!0,toUpdate:o=!0}=t;for(let c of this._array)c.updated=!1;const h=e.length;for(let c=0;c<h;++c){const l=e[c],u=this._idFunc(l,c);if(this._map.has(u)){if(o){const p=this._map.get(u);if(!p)throw new Error("!edwi");p.updated=!0,p.item=l,this._updateEvent.emit(u,l)}}else if(r){const p={item:l,id:u,updated:!0};this._array.push(p),this._map.set(u,p),this._createEvent.emit(u,l)}}if(i){const c=this._array.filter(l=>!l.updated);this._array=this._array.filter(l=>l.updated);for(let l of c)this._map.delete(l.id);for(let l of c)this._destroyEvent.emit(l.id,l.item)}}}function Fn(n,...s){if(n>16)throw new Error("length > 16");const e=new Array(n);for(let t=0;t<n;++t)e[t]=s[t]??0;return e}class xn{constructor(s,e){this._xyzw=s,this._length=e}set 0(s){this._xyzw.x=s}set 1(s){this._xyzw.y=s}set 2(s){this._xyzw.z=s}set 3(s){this._xyzw.w=s}get 0(){return this._xyzw.x??0}get 1(){return this._xyzw.y??0}get 2(){return this._xyzw.z??0}get 3(){return this._xyzw.w??0}get length(){return this._length}}function Pd(n){return new xn(n,2)}function Td(n){return new xn(n,3)}function Id(n){return new xn(n,4)}class Od{constructor(s,e,t,i){this._array=s,this._length=e,this._start=t,this._stride=i}get length(){return this._length}set 0(s){this._array[this._start+0*this._stride]=s}set 1(s){this._array[this._start+1*this._stride]=s}set 2(s){this._array[this._start+2*this._stride]=s}set 3(s){this._array[this._start+3*this._stride]=s}set 4(s){this._array[this._start+4*this._stride]=s}set 5(s){this._array[this._start+5*this._stride]=s}set 6(s){this._array[this._start+6*this._stride]=s}set 7(s){this._array[this._start+7*this._stride]=s}set 8(s){this._array[this._start+8*this._stride]=s}set 9(s){this._array[this._start+9*this._stride]=s}set 10(s){this._array[this._start+10*this._stride]=s}set 11(s){this._array[this._start+11*this._stride]=s}set 12(s){this._array[this._start+12*this._stride]=s}set 13(s){this._array[this._start+13*this._stride]=s}set 14(s){this._array[this._start+14*this._stride]=s}set 15(s){this._array[this._start+15*this._stride]=s}set 16(s){this._array[this._start+16*this._stride]=s}get 0(){return this._array[this._start+0*this._stride]}get 1(){return this._array[this._start+1*this._stride]}get 2(){return this._array[this._start+2*this._stride]}get 3(){return this._array[this._start+3*this._stride]}get 4(){return this._array[this._start+4*this._stride]}get 5(){return this._array[this._start+5*this._stride]}get 6(){return this._array[this._start+6*this._stride]}get 7(){return this._array[this._start+7*this._stride]}get 8(){return this._array[this._start+8*this._stride]}get 9(){return this._array[this._start+9*this._stride]}get 10(){return this._array[this._start+10*this._stride]}get 11(){return this._array[this._start+11*this._stride]}get 12(){return this._array[this._start+12*this._stride]}get 13(){return this._array[this._start+13*this._stride]}get 14(){return this._array[this._start+14*this._stride]}get 15(){return this._array[this._start+15*this._stride]}get 16(){return this._array[this._start+16*this._stride]}}function Dd(n,s,e=0,t=1){return new Od(n,s,e,t)}d.Vector=void 0,(n=>{function s(P,...O){if(P=P||Fn(O.length),O.length>P.length)throw new Error("args.length > target.length");return P instanceof Float64Array?P.set(O):pt(O,P),P}n.set=s;function e(P,O){const K=P.length;for(let de=0;de<K;++de)if(!O(P[de],de))return!1;return!0}n.every=e;function t(P,O,K){const de=P.length;let je=K;for(let Rt=0;Rt<de;++Rt)je=O(je,P[Rt],Rt);return je}n.reduce=t;function*i(P){for(let O=0;O<P.length;++O)yield P[O]}n.itr=i;const r=(P,O)=>P+=O*O;function o(P){return t(P,r,0)}n.magnitudeSquared=o;function h(P){const O=o(P);return Math.sqrt(O)}n.magnitude=h;function c(P,O=1e-5){const K=o(P);return Math.abs(K-1)<O}n.isNormalized=c;let l;const u=(P,O,K)=>P+O*l[K];function p(P,O){return Z(P,O),l=O,t(P,u,0)}n.dot=p;let g;const f=(P,O,K)=>P+=(O-g[K])*(O-g[K]);function w(P,O){return Z(P,O),g=O,t(P,f,0)}n.distanceSquared=w;function E(P,O){return Math.sqrt(w(P,O))}n.distance=E;let C;const T=(P,O)=>P===C[O];function R(P,O){return Z(P,O),C=O,e(P,T)}n.equals=R;let V,I;const H=(P,O)=>Math.abs(P-V[O])<I;function q(P,O,K=0){return Z(P,O),V=O,I=K,e(P,H)}n.equalsEpsilon=q;function Z(P,O){if(P.length!==O.length)throw new Error("left.length !== right.length")}function Me(P,O,K){const de=P.length;K=K||Fn(de),Z(P,K);for(let je=0;je<de;++je)K[je]=O(P[je],je);return K}n.op1=Me;function Ge(P,O,K,de){Z(P,O),de&&Z(P,de);const je=P.length;de=de||Fn(je);for(let Rt=0;Rt<je;++Rt)de[Rt]=K(P[Rt],O[Rt]);return de}n.op2=Ge;const jt=P=>P;function pt(P,O){return Me(P,jt,O)}n.clone=pt;let ui=0;const pi=(P,O)=>P*ui;function Ya(P,O,K){return ui=O,Me(P,pi,K)}n.multiplyByScalar=Ya;function rf(P,O,K=0){const de=o(P);if(de<=K)return;const je=Math.sqrt(de);return Ya(P,1/je,O)}n.normalize=rf;function of(P,O){return Ya(P,-1,O)}n.negate=of;const af=P=>Math.abs(P);function hf(P,O){return Me(P,af,O)}n.abs=hf;const cf=P=>P-Math.floor(P);function lf(P,O){return Me(P,cf,O)}n.fract=lf;const df=(P,O)=>P-O;function uf(P,O,K){return Ge(P,O,df,K)}n.subtract=uf;const pf=(P,O)=>P+O;function gf(P,O,K){return Ge(P,O,pf,K)}n.add=gf;const ff=(P,O)=>P*O;function mf(P,O,K){return Ge(P,O,ff,K)}n.multiply=mf;const vf=(P,O)=>P/O;function _f(P,O,K){return Ge(P,O,vf,K)}n.divide=_f;let Ka;const wf=(P,O)=>P*(1-Ka)+O*Ka;function yf(P,O,K,de){return Ka=K,Ge(P,O,wf,de)}n.lerp=yf})(d.Vector||(d.Vector={}));function kn(n,s=0,e=1){return n<s?s:n>e?e:n}class Mn extends b{constructor(e,t,i,r,o,h,c,l){super();a(this,"__status");a(this,"_statusChangedEvent");a(this,"_forceCancelFunc");a(this,"_startEvent");a(this,"_progressEvent");a(this,"_completeEvent");a(this,"_cancelEvent");a(this,"_cancelledEvent");a(this,"_errorEvent");a(this,"_finishedEvent");a(this,"_processingID",-1);this._startProcessingFunc=e,this.startFunc=t,this.progressFunc=i,this.completeFunc=r,this.cancelFunc=o,this.cancelledFunc=h,this.errorFunc=c,this.finishedFunc=l,this._status="Initial",this.dispose(()=>{var u;return(u=this._statusChangedEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._startEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._progressEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._completeEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._cancelEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._cancelledEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._errorEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._finishedEvent)==null?void 0:u.destroy()}),this.dispose(()=>this.reset())}get startEvent(){return this._startEvent=this._startEvent||new m,this._startEvent}get progressEvent(){return this._progressEvent=this._progressEvent||new m,this._progressEvent}get completeEvent(){return this._completeEvent=this._completeEvent||new m,this._completeEvent}get cancelEvent(){return this._cancelEvent=this._cancelEvent||new m,this._cancelEvent}get cancelledEvent(){return this._cancelledEvent=this._cancelledEvent||new m,this._cancelledEvent}get errorEvent(){return this._errorEvent=this._errorEvent||new m,this._errorEvent}get finishedEvent(){return this._finishedEvent=this._finishedEvent||new m,this._finishedEvent}_completeFunc(e,t){this.processingID===e&&this._status==="Running"&&(this._status="Completed",this.completeFunc&&this.completeFunc(t),this._completeEvent&&this._completeEvent.emit(t),this.finishedFunc&&this.finishedFunc({status:"Completed",value:t}),this._finishedEvent&&this._finishedEvent.emit({status:"Completed",value:t}))}_cancelFunc(e){this._status==="Running"&&(this._status="Cancelling",this.cancelFunc&&this.cancelFunc(e),this._cancelEvent&&this._cancelEvent.emit(e))}_cancelledFunc(e){this._status==="Cancelling"&&(this._status="Cancelled",this.cancelledFunc&&this.cancelledFunc(e),this._cancelledEvent&&this._cancelledEvent.emit(e),this.finishedFunc&&this.finishedFunc({status:"Cancelled",cancelError:e}),this._finishedEvent&&this._finishedEvent.emit({status:"Cancelled",cancelError:e}))}_errorFunc(e,t){this.processingID===e&&this._status==="Running"&&(this._status="Error",this.errorFunc&&this.errorFunc(t),this._errorEvent&&this._errorEvent.emit(t),this.finishedFunc&&this.finishedFunc({status:"Error",error:t}),this._finishedEvent&&this._finishedEvent.emit({status:"Error",error:t}))}_progressFunc(e,t){this.processingID===e&&this._status==="Running"&&(this.progressFunc&&this.progressFunc(t),this._progressEvent&&this._progressEvent.emit(t))}_startFunc(...e){if(this._status==="Initial"){this._status="Running";const t=++this._processingID,i={completeFunc:this._completeFunc.bind(this,t),errorFunc:this._errorFunc.bind(this,t),progressFunc:this._progressFunc.bind(this,t),cancelFunc:this._cancel.bind(this,t),processingID:t},r=this._startProcessingFunc(i,...e);return this._forceCancelFunc=r,this.startFunc&&this.startFunc(...e),this._startEvent&&this._startEvent.emit(...e),t}else return console.warn("this._status !== 'Initial' but start again!"),-1}set _status(e){if(this.__status!==e){const t=this.__status;this.__status=e,this._statusChangedEvent&&this._statusChangedEvent.emit(e,t)}}get _status(){return this.__status}get processingID(){return this._processingID}get statusChangedEvent(){return this._statusChangedEvent||(this._statusChangedEvent=new m),this._statusChangedEvent}reset(e){this._status==="Running"&&this.cancel(e),this._status==="Cancelled"||this._status==="Error"||this._status==="Completed"?this._status="Initial":this._status==="Cancelling"&&console.warn("Cannot reset! (this._status === 'Cancelling')")}get status(){return this._status}cancel(e,t=this.processingID){return this._cancel(t,e)}_cancel(e,t){if(this.processingID===e)if(this._status==="Running"){if(!this._forceCancelFunc)throw new Error("this._forceCancelFunc is undefined!");this._cancelFunc(t);const i=this._forceCancelFunc(t);if(this._forceCancelFunc=void 0,i&&i instanceof Promise)return i.then(()=>{this._cancelledFunc(t)});this._cancelledFunc(t)}else console.warn("this._status !== 'Running' but cancel")}start(...e){try{return this._startFunc(...e)}catch(t){console.error(`processing start error: ${t}`)}}restart(e,...t){try{return this.isRunning&&this.cancel(e),this.isFinished&&this.reset(e),this.isInitial?this._startFunc(...t):(console.warn("restart failed!"),-1)}catch(i){console.error(`processing restart error: ${i}`)}}get isCompleted(){return this._status==="Completed"}get isCancelled(){return this._status==="Cancelled"}get isCancelling(){return this._status==="Cancelling"}get isError(){return this._status==="Error"}get isInitial(){return this._status==="Initial"}get isRunning(){return this._status==="Running"}get isFinished(){return this.isCancelled||this.isCompleted||this.isError}}let Ar=class extends Error{};function uh(n,s){typeof n=="function"?n(s):n.cancelFunc=s}class Nr extends Mn{constructor(e=300){super(({progressFunc:t,completeFunc:i,errorFunc:r})=>{const[o,h]=Pn(()=>{if(!this._lastDebounceValue)throw new Error("!this._lastDebounceValue");t([this._lastDebounceValue,this._debouncTimes]),this._debouncTimes=0},this._delayTime);return this._d=o,()=>{h()}});a(this,"_lastDebounceValue");a(this,"_debouncTimes",0);a(this,"_d");this._delayTime=e}get delayTime(){return this._delayTime}debounce(...e){this.isRunning?(++this._debouncTimes,this._lastDebounceValue=e,this._d&&this._d()):console.warn("Debouncing is not running!")}}function ph(n,s,...e){const t=new AbortController;let i=t.signal,[r,o]=e;if(o!=null&&o.signal)throw console.error("init?.signal"),new Error("init?.signal");o=o||{},o.signal=i;let h=!1;uh(n,()=>{h=!0,t.abort()});let c=fetch(r,o);return s&&(c=c.then(l=>{if(!l.ok)return l;if(!l.body)throw Error("ReadableStream not yet supported in this browser.");const u=l.headers.get("content-length"),p=u?parseInt(u,10):0;let g=0;return new Response(new ReadableStream({start(f){if(!l.body)throw new Error("!response.body");const w=l.body.getReader();E();function E(){w.read().then(({done:C,value:T})=>{if(C){f.close();return}if(!T)throw new Error("!value");if(!s)throw new Error("!progressFunc");g+=T.byteLength,s(g,p),f.enqueue(T),E()}).catch(C=>{f.error(C)})}}}),{status:l.status,statusText:l.statusText,headers:l.headers})}).catch(l=>{throw h?(l instanceof Error&&l.code!==20&&console.error("error.code !== 20"),console.log("fetching cancelled!"),new Ar("fetching cancelled!")):(l instanceof Error&&l.code===20&&console.error("error.code === 20"),l)})),c}function gh(...n){if(n.length>=1)if(typeof n[0]=="function"||typeof n[0]>"u"){const s={};let e=ph(s,...n);const{cancelFunc:t}=s;if(!t)throw new Error("!cancelResult.cancelFunc");return[t,e]}else return ph(...n);throw new Error("cancelableFetch args error!")}class Fd extends Mn{constructor(e,...t){super(({progressFunc:i,completeFunc:r,errorFunc:o},...h)=>{const c={};let l={loaded:0,total:0};const u=(f,w)=>{l.loaded=f,l.total=w,i(l)},p=this._fetchArgs||h;if(p.length===0)throw new Error("fetchArgs.length === 0");if(gh(c,u,...p).then(e).then(r).catch(f=>{f instanceof Ar||o(f)}),!c.cancelFunc)throw new Error("!cancelResult.cancelFunc");return c.cancelFunc});a(this,"_fetchArgs");t.length>0&&(this._fetchArgs=t)}get fetchArgs(){return this._fetchArgs}}function Vr(n,s,e,t){const i="_"+s,r="_"+s+"Changed",o=s+"Changed";Object.defineProperties(n.prototype,{[s]:{get(){return typeof this[i]>"u"&&typeof e<"u"&&(this[i]=e),this[i]},set(h){if(typeof this[i]>"u"&&typeof e<"u"&&(this[i]=e),t?!t(this[i],h):this[i]!==h){const c=this[i];this[i]=h,this[r]&&this[r].emit(h,c)}}},[o]:{get(){return typeof this[r]>"u"&&(this[r]=new m,typeof this.dispose<"u"&&this.dispose(()=>this[r].destroy())),this[r]}}})}class Lr extends Mn{constructor(e,t=!0){super(({progressFunc:i,completeFunc:r,errorFunc:o})=>(this._intervalFunc=i,this._intervalID&&console.error("this._intervalID should be undefined!"),this.leading&&i(),this._intervalID=setInterval(i,this.intervalTime),()=>{if(!this._intervalID)throw console.error("this._intervalID should not be undefined!"),new Error("this._intervalID should not be undefined!");clearInterval(this._intervalID),this._intervalID=void 0}));a(this,"_intervalID");a(this,"_intervalFunc");this.intervalTime=e,this.leading=t,this.dispose(this.intervalTimeChanged.disposableOn(()=>{this._intervalID&&this._intervalFunc&&(clearInterval(this._intervalID),this._intervalID=setInterval(this._intervalFunc,this.intervalTime))}))}}Vr(Lr,"leading",!0),Vr(Lr,"intervalTime",500);function xd(n,s){let e,t;const i=new Promise((o,h)=>{t=h,e=globalThis.setTimeout(()=>{e=void 0,o()},n)}),r=o=>{e&&(clearTimeout(e),e=void 0),t&&t(o??new Ar("sleep cancel error!"))};if(typeof s=="boolean"&&s)return[r,i];if(s)return uh(s,r),i}class kd{constructor(s=0,e=0,t=0,i,r){a(this,"_processData");a(this,"_lastUpdateTimeStamp",0);this.startTime=s,this.duration=e,this.delay=t,this.proccessFunc=i,this.completeFunc=r,this._processData={ratio:0,timeStamp:0,timeStampFromStart:0,timeStampFromLastUpdate:0}}update(s){const e=(s-this.startTime)/this.duration;e>=0&&(this._processData.ratio=e,this._processData.timeStamp=s,this._processData.timeStampFromStart=s-this.startTime,this._processData.timeStampFromLastUpdate=s-this._lastUpdateTimeStamp,this._lastUpdateTimeStamp=s,this.proccessFunc&&this.proccessFunc(this._processData),e>=1&&this.completeFunc&&this.completeFunc())}start(){this.startTime=performance.now()+this.delay,this._lastUpdateTimeStamp=this.startTime}}class fh extends Mn{constructor(e=1e3,t=0,i=Dn){let r;function o(){r&&r()}super(({progressFunc:c,completeFunc:l,errorFunc:u})=>{const p=this.startUpdateFunc&&this.startUpdateFunc(this._base.update.bind(this._base))||void 0;return this._base.startTime=performance.now(),this._base.duration=this.duration,this._base.delay=this.delay,this._base.proccessFunc=c,this._base.completeFunc=()=>{p&&p(),l()},this._base.start(),r=p,o});a(this,"_base");a(this,"duration");a(this,"delay");a(this,"startUpdateFunc");this._base=new kd,this.duration=e,this.delay=t,this.startUpdateFunc=i}get startTime(){return this._base.startTime}}class Md extends b{constructor(e){super();a(this,"_target",0);a(this,"_current",0);a(this,"_start",0);a(this,"_timing",new fh(Number.POSITIVE_INFINITY));a(this,"_currentChanged");this._duration=e,this._timing.progressFunc=({ratio:t})=>{t=t<0?0:t>1?1:t;const i=this._start*(1-t)+this._target*t;this._current=i,this._currentChanged&&this._currentChanged.emit(this._target,this._current)},this.dispose(()=>{this._timing.isRunning&&this._timing.cancel(),this._timing.destroy()})}reset(e,t=e){this._timing.isRunning&&this._timing.cancel(),this._target=e,this._current=t,this._start=e}set target(e){if(this._target!==e){this._target=e,this._timing.isRunning&&this._timing.cancel(),this._timing.reset(),this._start=this._current;const t=Math.abs(this._target-this._start);this._timing.duration=t*this._duration,this._timing.start()}}get target(){return this._target}get current(){return this._current}get currentChanged(){return this._currentChanged||(this._currentChanged=new m),this._currentChanged}}function mh(n,s){s=s||[];const e=n.parentNode;return e?mh(e,s.concat(e)):s}function jd(n){const s=n.composedPath&&n.composedPath()||n.path,e=n.target;if(s!=null)return s.indexOf(globalThis)<0?s.concat(globalThis):s;if(e===globalThis)return[globalThis];if(e===null)throw new Error("target === null");return[e].concat(mh(e),globalThis)}function Ee(n,s=!1){const{offsetX:e,offsetY:t}=n;let i=e,r=t;{const o=jd(n);for(let h=0;h<o.length;++h){const c=o[h];if(c!==n.currentTarget&&c instanceof HTMLElement)i+=c.clientLeft,r+=c.clientTop,i+=c.offsetLeft,r+=c.offsetTop;else break}}return s?[i*globalThis.devicePixelRatio,r*globalThis.devicePixelRatio]:[i,r]}function Qi(n,s=!1){const e=n.target,t=n.currentTarget||n.__xbsj_lastCurrentTarget__;if(!e||!t)return[n.clientX,n.clientY];const i=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=i.left+n.offsetX,h=i.top+n.offsetY,c=o-r.left,l=h-r.top;return s?[c*globalThis.devicePixelRatio,l*globalThis.devicePixelRatio]:[c,l]}class vh extends b{constructor(e){super();a(this,"_clickEvent",new m);a(this,"_dbclickEvent",new m);a(this,"_downEvent",new m);a(this,"_upEvent",new m);a(this,"_moveEvent",new m);a(this,"_debouncing",new Nr(300));this.dispose(()=>{this._clickEvent.destroy(),this._dbclickEvent.destroy(),this._downEvent.destroy(),this._upEvent.destroy(),this._moveEvent.destroy(),this._debouncing.destroy()});let t=!1,i=[0,0],r=!1;this._debouncing.progressFunc=([[u,p,g],f])=>{f===1?this._clickEvent.emit(u,p,g):f>=2?this._dbclickEvent.emit(u,p,g):console.error("point click should not be here!")},this._debouncing.start(),this.dispose(()=>{this._debouncing.isRunning&&this._debouncing.cancel(),this._debouncing.destroy()});const o=u=>{t=!0;const[p,g]=Ee(u);i[0]=p,i[1]=g,this._downEvent.emit(p,g,u)},h=u=>{const[p,g]=Ee(u);t&&!r&&this._debouncing.debounce(p,g,u),t=!1,r=!1,this._upEvent.emit(p,g,u)},c=u=>{const[p,g]=Ee(u);if(t&&!r){const[f,w]=i;(Math.abs(p-f)>3||Math.abs(g-w)>3)&&(r=!0)}this._moveEvent.emit(p,g,u)},l=()=>{t=!1,r=!1};e.addEventListener("pointerdown",o),e.addEventListener("pointerup",h),e.addEventListener("pointermove",c),e.addEventListener("pointerout",l),this.dispose(()=>{e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",h),e.removeEventListener("pointermove",c),e.removeEventListener("pointerout",l)})}get clickEvent(){return this._clickEvent}get dbclickEvent(){return this._dbclickEvent}get downEvent(){return this._downEvent}get upEvent(){return this._upEvent}get moveEvent(){return this._moveEvent}}class zr extends b{constructor(){super();a(this,"_pickRectEvent",this.disposeVar(new m));a(this,"_updateRectEvent",this.disposeVar(new m));a(this,"_pointerActionEvent",this.disposeVar(new m));a(this,"_active",this.disposeVar(y(!1)));a(this,"_pickRect",{left0:0,top0:0,left1:0,top1:0});let e=0,t=0,i=0,r=0;this.dispose(this._pointerActionEvent.disposableOn(({type:o,left:h,top:c})=>{o==="PointerDown"?(this._active.value=!0,e=h,t=c,i=h,r=c,this._setPickRect({left0:e,top0:t,left1:i,top1:r}),this._updateRectEvent.emit(this._pickRect)):o==="PointerMove"?this._active.value&&(i=h,r=c,this._setPickRect({left0:e,top0:t,left1:i,top1:r}),this._updateRectEvent.emit(this._pickRect)):o==="PointerUp"&&this._active.value&&(this._active.value=!1,i=h,r=c,this._setPickRect({left0:e,top0:t,left1:i,top1:r}),this._updateRectEvent.emit(this._pickRect),this._pickRectEvent.emit(this._pickRect))}))}_setPickRect({left0:e,left1:t,top0:i,top1:r}){this._pickRect.left0=e,this._pickRect.left1=t,this._pickRect.top0=i,this._pickRect.top1=r}pointerDown(e,t){this._pointerActionEvent.emit({type:"PointerDown",left:e,top:t})}pointerMove(e,t){this._pointerActionEvent.emit({type:"PointerMove",left:e,top:t})}pointerUp(e,t){this._pointerActionEvent.emit({type:"PointerUp",left:e,top:t})}reset(){this._setPickRect({left0:0,top0:0,left1:0,top1:0}),this._updateRectEvent.emit(this._pickRect),this._pickRectEvent.emit(this._pickRect)}get activeEvent(){return this._active.changed}get updateRectEvent(){return this._updateRectEvent}get pickRectEvent(){return this._pickRectEvent}static getLeftTopAndSize(e,t){t=t||{left:0,top:0,width:0,height:0,forward:!0};const{left0:i,top0:r,left1:o,top1:h}=e;return t.width=Math.abs(i-o),t.height=Math.abs(r-h),t.left=Math.min(i,o),t.top=Math.min(r,h),t.forward=o>i,t}static contains(e,t,i){const{left:r,top:o,width:h,height:c}=i;return e>r&&e<=r+h&&t>=o&&t<=o+c}}class Rd extends zr{constructor(s){super();const e=this.disposeVar(new vh(s));this.dispose(e.downEvent.disposableOn((o,h,c)=>c.altKey&&this.pointerDown(o,h))),this.dispose(e.moveEvent.disposableOn((o,h)=>this.pointerMove(o,h))),this.dispose(e.upEvent.disposableOn((o,h)=>this.pointerUp(o,h)));const t=document.createElement("div");t.style.backgroundColor="rgba(0, 0, 0, 0)",t.style.border="2px dashed red",t.style.position="absolute",t.style.boxSizing="border-box",t.style.pointerEvents="none",t.style.height="0px",t.style.width="0px",t.style.left="0px",t.style.top="0px",t.style.display="none",s.appendChild(t),this.dispose(()=>s.removeChild(t)),this.dispose(this.activeEvent.disposableOn(o=>{t.style.display=o?"block":"none"}));const i=()=>{this.reset()};s.addEventListener("contextmenu",i),this.dispose(()=>s.removeEventListener("contextmenu",i));const r={left:0,top:0,width:0,height:0,forward:!1};this.dispose(this.updateRectEvent.disposableOn(o=>{if(zr.getLeftTopAndSize(o,r)){const{left:h,top:c,width:l,height:u}=r;t.style.height=`${u|0}px`,t.style.width=`${l|0}px`,t.style.left=`${h|0}px`,t.style.top=`${c|0}px`}}))}}class et extends Error{}function Zt(n,s){Ae(n,"_promise_cancel")&&console.warn("setPromiseCancel warn: promise has cancelFunc!"),gt(n,"_promise_cancel",s)}function es(n){return Ae(n,"_promise_cancel")}function ts(n){return!!es(n)}function Ur(n,s){const e=es(n);return e?(e(s),!0):!1}function Wr(n){const[s,e]=n;return Zt(e,s),e}function is(n){let s;const e=new Promise((t,i)=>{s=i,n.then(t).catch(i)});return Zt(e,s),e}function Ad(n){let s,e;var t=new Promise((i,r)=>{e=n.disposableOn((...o)=>{e&&e(),i(o)}),s=o=>{e&&e(),r(o)}});return[s,t]}function Nd(n){const s=new m,e=new m;return n.then(t=>{s.isDestroyed()||s.emit(t)}).catch(t=>{e.isDestroyed()||e.emit(t)}),[s,e]}class Br extends b{constructor(){super();a(this,"_cancelled",!1);a(this,"_cancelError");a(this,"_promiseSet",new Set);a(this,"_disposer")}get disposer(){return this._disposer=this._disposer||new b,this._disposer}destroyImp(){this.finally()}cancel(e){var t;if(!this._cancelled){this._cancelled=!0,(t=this._disposer)==null||t.destroy(),this._cancelError=e;for(let i of this._promiseSet)Ur(i);this._promiseSet.clear()}}get cancelFuncsNum(){return qs(this._promiseSet,e=>e+1,0)}finally(){this._disposer&&!this._disposer.isDestroyed()&&this._disposer.destroy(),this._promiseSet.clear()}check(){if(this._cancelled)throw this._cancelError??new et("cancel from CancelManager!")}promise(e){return this._promiseSet.add(e),e.finally(()=>(this._promiseSet.delete(e),this.check()))}promiseAny(e){const t=[],i=e.map(r=>(this._promiseSet.add(r),ts(r)&&t.push(es(r)),r.finally(()=>this._promiseSet.delete(r))));return Promise.any(i).finally(()=>(t.forEach((r=>r(new et("cancel from promiseAny!")))),t.length=0))}promiseAll(e){const t=[],i=e.map(r=>(this._promiseSet.add(r),ts(r)&&t.push(es(r)),r.finally(()=>this._promiseSet.delete(r))));return Promise.all(i).finally(()=>(t.forEach((r=>r(new et("cancel from promiseAll!")))),t.length=0))}promiseRace(e){const t=[],i=e.map(r=>(this._promiseSet.add(r),ts(r)&&t.push(es(r)),r.finally(()=>this._promiseSet.delete(r))));return Promise.race(i).finally(()=>(t.forEach((r=>r(new et("cancel from promiseRace!")))),t.length=0))}}class me extends b{constructor(e){super();a(this,"_status","Initial");a(this,"_completeEvent");a(this,"_errorEvent");a(this,"_completeFunc");a(this,"_errorFunc");a(this,"_cancelFunc");a(this,"_runningId",-1);this._startFunc=e,this.dispose(()=>this.isRunning&&this.cancel())}get errorEvent(){return this._errorEvent||(this._errorEvent=new m),this._errorEvent}get completeEvent(){return this._completeEvent||(this._completeEvent=new m),this._completeEvent}get errorFunc(){return this._errorFunc}get completeFunc(){return this._completeFunc}set errorFunc(e){this._errorFunc!==e&&(this._errorFunc=e)}set completeFunc(e){this._completeFunc!==e&&(this._completeFunc=e)}start(...e){if(this._status!=="Initial")return;const t=++this._runningId;this._status="Running",this._cancelFunc=this._startFunc({completeFunc:i=>{var r;t===this._runningId&&this._status==="Running"&&(this._status="Completed",this._completeFunc&&this._completeFunc(i),(r=this._completeEvent)==null||r.emit(i))},errorFunc:i=>{var r;t===this._runningId&&this._status==="Running"&&(this._status="Error",this._errorFunc&&this._errorFunc(i),(r=this._errorEvent)==null||r.emit(i))},runningingID:t},...e)}cancel(e=new et("")){var t;if(this._status==="Running"){if(!this._cancelFunc)throw new Error("!this._cancelFunc");this._status="Error",this._errorFunc&&this._errorFunc(e),(t=this._errorEvent)==null||t.emit(e),this._cancelFunc(e),this._cancelFunc=void 0}}reset(){this._status==="Running"&&console.error("processing cannot reset while running. you can first cancel it!"),(this._status==="Completed"||this._status==="Error")&&(this._status="Initial")}get status(){return this._status}get isInitial(){return this._status==="Initial"}get isRunning(){return this._status==="Running"}get isCompleted(){return this._status==="Completed"}get isError(){return this._status==="Error"}get runningId(){return this._runningId}restart(e=new et(""),...t){this.isRunning&&this.cancel(e),this.reset(),this.start(...t)}restartIfNotRunning(...e){this.isRunning||(this.reset(),this.start(...e))}}function Ys(n){return(s,...e)=>{const t=new Br,{completeFunc:i,errorFunc:r}=s,o=n(t,...e).then(i).catch(r).finally(()=>t.destroy());return Zt(o,t.cancel.bind(t)),h=>Ur(o,h)}}class Vd extends me{constructor(){super(({errorFunc:e},t,i)=>{try{const[r,o]=Pn(t,i);return this._doFunc=r,o}catch(r){return e(r),()=>{}}});a(this,"_doFunc")}do(...e){this._doFunc&&this._doFunc(...e)}}class Ld extends me{constructor(e,t){super(({errorFunc:i})=>{try{const[r,o]=Pn(e,t);return this._doFunc=r,o}catch(r){return i(r),()=>{}}});a(this,"_doFunc")}do(...e){this._doFunc&&this._doFunc(...e)}}function zd(n){return new me(Ys((s,...e)=>s.promise(n(...e))))}function Ud(n,...s){return new me(Ys(e=>e.promise(n(...s))))}function jn(n){return zd((...s)=>{const e=n(...s);return ts(e)?e:is(e)})}function Hr(n,...s){return Ud(()=>{const e=n(...s);return ts(e)?e:is(e)})}function Wd(n){let s;const e=new Promise((t,i)=>{s=()=>{n(),i()}});return Zt(e,s),e}function Bd(n,...s){const e=new Br,t=n(e,...s).finally(()=>e.destroy());return Zt(t,e.cancel.bind(e)),t}function Ne(n){return new me(Ys(n))}function Hd(n,...s){return new me(Ys(e=>n(e,...s)))}function _h(n,...s){const e=new AbortController;let t=e.signal,[i,r]=s;if(r!=null&&r.signal)throw console.error("init?.signal"),new Error("init?.signal");r=r||{},r.signal&&console.warn("revocableFetch error: init.signal would be override!"),r.signal=t;let o=!1;const h=()=>{o=!0,e.abort()};let c=fetch(i,r);return n&&(c=c.then(l=>{if(!l.ok)return l;if(!l.body)throw Error("ReadableStream not yet supported in this browser.");const u=l.headers.get("content-length");u||console.warn("response.headers.get('content-length') is undefined... cannot get contentLength!");const p=u?parseInt(u,10):0;let g=0;return new Response(new ReadableStream({start(f){if(!l.body)throw new Error("!response.body");const w=l.body.getReader();E();function E(){w.read().then(({done:C,value:T})=>{if(C){f.close();return}if(!T)throw new Error("!value");if(!n)throw new Error("!progressFunc");g+=T.byteLength,n(g,p),f.enqueue(T),E()}).catch(C=>{f.error(C)})}}}),{status:l.status,statusText:l.statusText,headers:l.headers})}).catch(l=>{throw o?(l instanceof Error&&l.code!==20&&console.error("error.code !== 20"),console.log("fetching cancelled!"),new et(`fetching cancelled! error: ${l}`)):(l instanceof Error&&l.code===20&&console.error("error.code === 20"),l)})),Zt(c,h),c}function $d(n,...s){return _h(n,...s)}function $r(...n){return _h(void 0,...n)}function Gd(){return jn($r)}function Jd(...n){return Hr($r,...n)}function Gr(n,...s){let e=-1;var t=new Promise((i,r)=>{n.isRunning&&n.cancel(),n.reset();const o=new b;o.dispose(n.completeEvent.disposableOn(h=>{if(i(h),o.isDestroyed()){debugger;console.error(`disposer is destroyed! ${o}`);return}o.destroy()})),o.dispose(n.errorEvent.disposableOn(h=>{if(r(h),o.isDestroyed()){debugger;console.error(`disposer is destroyed! ${o}`);return}o.destroy()})),n.start(...s),e=n.runningId});return[i=>e===n.runningId&&n.isRunning&&n.cancel(i),t]}function mt(n,s,...e){try{return s(...e)}catch(t){n(t)}}function qd(){return new me(({completeFunc:n,errorFunc:s},e)=>Zi(()=>mt(s,()=>{e&&e(),n()})))}function Xd(n){return new me(({completeFunc:s,errorFunc:e})=>Zi(()=>mt(e,()=>{n&&n(),s()})))}function Yd(){return new me(({completeFunc:n,errorFunc:s},e)=>Hs(()=>{mt(s,()=>{e&&e(),n()})}))}function Kd(n){return new me(({completeFunc:s,errorFunc:e})=>Hs(()=>{mt(e,()=>{n&&n(),s()})}))}function wh(){return new me(({completeFunc:n,errorFunc:s},e,t)=>Or(()=>{mt(s,()=>{e&&e(),n()})},t??1e3))}function yh(n,s){return new me(({completeFunc:e,errorFunc:t})=>Or(()=>{mt(t,()=>{n&&n(),e()})},s??1e3))}function Zd(){return new me(({errorFunc:n},s,e=1e3)=>Ir(()=>mt(n,s),e))}function Qd(n,s=1e3){return new me(({errorFunc:e})=>Ir(()=>mt(e,n),s))}function Ks(){return new me(({errorFunc:n},s)=>Tn(e=>mt(n,s,e)))}function ss(n){return new me(({errorFunc:s})=>Tn(e=>mt(s,n,e)))}function Zs(n,...s){let e,t;const i=new Promise((o,h)=>{t=h,e=globalThis.setTimeout(()=>{e=void 0,o(s)},n)});return Zt(i,o=>{e&&(clearTimeout(e),e=void 0),t&&t(o??new et("sleep cancel error!"))}),i}function eu(){return jn(Zs)}function tu(n,...s){return Hr(Zs,n,...s)}function vi(n,s,...e){return n.promise(Wr(Gr(Ne(async(t,...i)=>(n.disposer.dispose(()=>{t.isDestroyed()||t.cancel()}),await s(t,...i))),...e)))}function iu(n,s,...e){return n.promise(Wr(Gr(s,...e)))}class su extends me{constructor(){super(({errorFunc:e},t,i)=>{try{const[r,o]=jr(t,i);return this._doFunc=r,o}catch(r){return e(r),()=>{}}});a(this,"_doFunc")}do(...e){this._doFunc&&this._doFunc(...e)}}class nu extends me{constructor(e,t){super(({errorFunc:i})=>{try{const[r,o]=jr(e,t);return this._doFunc=r,o}catch(r){return i(r),()=>{}}});a(this,"_doFunc")}do(...e){this._doFunc&&this._doFunc(...e)}}class Rn extends b{constructor(e=1e3,t=Dn){super();a(this,"_speed");a(this,"_speedChangedEvent");a(this,"_duration");a(this,"_durationChangedEvent");a(this,"_loop");a(this,"startUpdateFunc");a(this,"_updateBindThis");a(this,"_cancelStartUpdateFunc");a(this,"_startTimeStamp");a(this,"_playingChangedEvent");a(this,"_startPlayingEvent");a(this,"_stopPlayingEvent");a(this,"_loopChangedEvent");a(this,"_currentTime",this.disposeVar(y(0)));this._speed=1,this._duration=e,this._loop=!1,this.startUpdateFunc=t,this._updateBindThis=this._update.bind(this),this.dispose(()=>{this._cancelStartUpdateFunc&&(this._cancelStartUpdateFunc(),this._cancelStartUpdateFunc=void 0)}),this._startTimeStamp=Number.NaN,this.dispose(()=>{this._startPlayingEvent&&this._startPlayingEvent.reset(),this._stopPlayingEvent&&this._stopPlayingEvent.reset()})}get startPlayingEvent(){return this._startPlayingEvent=this._startPlayingEvent||new m,this._startPlayingEvent}get stopPlayingEvent(){return this._stopPlayingEvent=this._stopPlayingEvent||new m,this._stopPlayingEvent}get currentTimeChangedEvent(){return this._currentTime.changed}get loopChangedEvent(){return this._loopChangedEvent=this._loopChangedEvent||new m,this._loopChangedEvent}set loop(e){this._loop!==e&&(this._loop=e,this._loopChangedEvent&&this._loopChangedEvent.emit(this._loop))}get loop(){return this._loop}_update(e){if(Number.isNaN(this._startTimeStamp))console.warn("Number.isNaN(this._startTimeStamp)");else{const t=(e-this._startTimeStamp)*this._speed;this._setCurrentTimeInner(t)}}get currentTime(){return this._currentTime.value}set currentTime(e){this._setCurrentTimeInner(e),this._resetStartTime()}_setCurrentTimeInner(e){this._currentTime.value!==e&&(this._duration<=0?this._currentTime.value=0:e<0?this.loop?this._currentTime.value=this._duration+e%this._duration:(this._currentTime.value=0,this.playing&&this._stopPlaying()):e>this._duration?this.loop?this._currentTime.value=e%this._duration:(this._currentTime.value=this._duration,this.playing&&this._stopPlaying()):this._currentTime.value=e)}get durationChangedEvent(){return this._durationChangedEvent||(this._durationChangedEvent=new m),this._durationChangedEvent}get duration(){return this._duration}set duration(e){var t;if(e<0)console.warn("duration sholud greater than 0!");else if(this._duration!==e){const i=this._duration;this._duration=e,this._currentTime.value>this._duration&&(this._currentTime.value=this._duration),(t=this._durationChangedEvent)==null||t.emit(this._duration,i)}}get speedChangedEvent(){return this._speedChangedEvent||(this._speedChangedEvent=new m),this._speedChangedEvent}get speed(){return this._speed}set speed(e){var t;if(this._speed!==e&&e!==0){const i=this._speed;this._speed=e,this._resetStartTime(),(t=this._speedChangedEvent)==null||t.emit(this._speed,i)}}_resetStartTime(){this._startTimeStamp=performance.now()-this._currentTime.value/this._speed}_startPlaying(){var e,t;this._resetStartTime(),this._cancelStartUpdateFunc=this.startUpdateFunc(this._updateBindThis),(e=this._startPlayingEvent)==null||e.emit(this._currentTime.value),(t=this._playingChangedEvent)==null||t.emit(!0)}_stopPlaying(){var e,t;if(!this._cancelStartUpdateFunc)throw new Error("this._cancelStartUpdateFunc is undefined!");this._cancelStartUpdateFunc(),this._cancelStartUpdateFunc=void 0,(e=this._stopPlayingEvent)==null||e.emit(this._currentTime.value),(t=this._playingChangedEvent)==null||t.emit(!1)}get playingChangedEvent(){return this._playingChangedEvent||(this._playingChangedEvent=new m),this._playingChangedEvent}get playing(){return!!this._cancelStartUpdateFunc}set playing(e){!!this._cancelStartUpdateFunc!==e&&(e?this._startPlaying():this._stopPlaying())}}class Qs extends b{constructor(e){super();a(this,"_stop",this.disposeVar(y(0)));a(this,"_current",this.disposeVar(y(0)));a(this,"_start",this.disposeVar(y(0)));a(this,"_player",this.disposeVar(new Rn(200)));this.dispose(this._player.currentTimeChangedEvent.disposableOn(t=>{let i=t/this._player.duration;i=i>1?1:i<0?0:i;const r=this._start.value,o=this._stop.value;this._current.value=r+(o-r)*i})),this.duration=e}get current(){return this._current.value}get currentChanged(){return this._current.changed}get source(){return this._start.value}get sourceChanged(){return this._start.changed}get target(){return this._stop.value}get targetChanged(){return this._stop.changed}get duration(){return this._player.duration}set duration(e){this._player.duration=e}set target(e){this._start.value=this._current.value,this._stop.value=e,this._player.currentTime=0,this._player.playing=!0}reset(e){this._start.value=e,this._current.value=e,this._stop.value=e,this._player.playing=!1}}let bh=-1;class se extends m{constructor(s,e,t,i){super(),this._domElement=s,this._type=e,this.callback=i;const r=o=>(o.__xbsj_listenerNo__=++bh,o.__xbsj_listenerTime__=Date.now(),o.__xbsj_lastCurrentTarget__=o.currentTarget,this.emit(o),this.callback&&this.callback(o));this._domElement.addEventListener(this._type,r,t),this.dispose(()=>this._domElement.removeEventListener(this._type,r,t))}static getLastLisenNo(){return bh}static getCurrentTarget(s){return s.__xbsj_lastCurrentTarget__}static getListenerNo(s){return s.__xbsj_listenerNo__}static getListenerTime(s){return s.__xbsj_listenerTime__}static on(s,e){const t=se.getLastLisenNo();return s.disposableOn(i=>{const r=se.getListenerNo(i);(r===void 0||r>t)&&e(i)})}get element(){return this._domElement}static create(s,e,t){return new se(s,e,t)}}class Jr extends b{constructor(){super();a(this,"_clickEvent",this.disposeVar(new m));a(this,"_dbclickEvent",this.disposeVar(new m));a(this,"_pointerdownEvent",this.disposeVar(new m));a(this,"_pointerupEvent",this.disposeVar(new m));a(this,"_pointermoveEvent",this.disposeVar(new m));a(this,"_pointeroutEvent",this.disposeVar(new m));a(this,"dbClickDelayTime",300);a(this,"nativeClickDelayTime",500);a(this,"clickMovementTolerantPixelSize",3);a(this,"debugging",!1);a(this,"_enabled",this.disposeVar(y(!0)));const e=this.disposeVar(Ne(async i=>{do{const r=await vi(i,c=>new Promise((l,u)=>{c.disposer.dispose(u),c.disposer.dispose(se.on(this._pointerdownEvent,l))})),o=Ee(r);if(this.debugging&&console.log(`鼠标按下 ${o.toString()}`),!await vi(i,c=>new Promise((l,u)=>{c.disposer.dispose(u);const p=setTimeout(()=>l(!0),this.nativeClickDelayTime);c.disposer.dispose(()=>clearTimeout(p)),c.disposer.dispose(se.on(this._pointermoveEvent,g=>{const[f,w]=Ee(g),[E,C]=o;(Math.abs(f-E)>3||Math.abs(w-C)>3)&&l(!1)})),c.disposer.dispose(se.on(this._pointeroutEvent,()=>l(!1))),c.disposer.dispose(se.on(this._pointerupEvent,()=>l(!0)))}))){this.debugging&&console.log("取消1");continue}const h=await vi(i,c=>new Promise((l,u)=>{c.disposer.dispose(u);const p=setTimeout(()=>l("timeout"),this.dbClickDelayTime);c.disposer.dispose(()=>clearTimeout(p)),c.disposer.dispose(se.on(this._pointermoveEvent,g=>{const[f,w]=Ee(g),[E,C]=o;(Math.abs(f-E)>3||Math.abs(w-C)>3)&&l("moved")})),c.disposer.dispose(se.on(this._pointerdownEvent,l)),c.disposer.dispose(se.on(this._pointeroutEvent,()=>l("pointouted"))),c.disposer.dispose(se.on(this._pointerupEvent,()=>l("pointuped")))}));if(typeof h=="string"){this.debugging&&console.log(`触发单击事件!取消双击监听!error: ${h}`),this._clickEvent.emit(r);continue}if(!await vi(i,c=>new Promise((l,u)=>{c.disposer.dispose(u);const p=setTimeout(()=>l(!1),this.nativeClickDelayTime);c.disposer.dispose(()=>clearTimeout(p)),c.disposer.dispose(se.on(this._pointermoveEvent,g=>{const[f,w]=Ee(g),[E,C]=o;(Math.abs(f-E)>3||Math.abs(w-C)>3)&&l(!1)})),c.disposer.dispose(se.on(this._pointeroutEvent,()=>l(!1))),c.disposer.dispose(se.on(this._pointerupEvent,()=>l(!0)))}))){this.debugging&&console.log("取消2");continue}this.debugging&&console.log("触发双击事件!"),this._dbclickEvent.emit(h)}while(!0)})),t=i=>{i?e.restart():e.isRunning&&e.cancel()};t(this.enabled),this.dispose(this.enabledChanged.disposableOn(t))}get clickEvent(){return this._clickEvent}get dbclickEvent(){return this._dbclickEvent}pointerDown(e){this._pointerdownEvent.emit(e)}pointerUp(e){this._pointerupEvent.emit(e)}pointerMove(e){this._pointermoveEvent.emit(e)}pointerOut(e){this._pointeroutEvent.emit(e)}get enabled(){return this._enabled.value}set enabled(e){this._enabled.value=e}get enabledChanged(){return this._enabled.changed}}class ru extends b{constructor(e,t){super();a(this,"_pointerClick",this.disposeVar(new Jr));this._div=e;const{div:i,pointerClick:r}=this,o=u=>r.pointerDown(u),h=u=>r.pointerMove(u),c=u=>r.pointerOut(u),l=u=>r.pointerUp(u);i.addEventListener("pointerdown",o,t),i.addEventListener("pointermove",h,t),i.addEventListener("pointerout",c,t),i.addEventListener("pointerup",l,t),this.dispose(()=>{i.removeEventListener("pointerdown",o,t),i.removeEventListener("pointermove",h,t),i.removeEventListener("pointerout",c,t),i.removeEventListener("pointerup",l,t)})}get div(){return this._div}get pointerClick(){return this._pointerClick}get clickEvent(){return this.pointerClick.clickEvent}get dbclickEvent(){return this.pointerClick.dbclickEvent}}class Eh extends b{constructor(){super();a(this,"_hoverEvent",this.disposeVar(new m));a(this,"_hoverOutEvent",this.disposeVar(new m));a(this,"_pointerdownEvent",this.disposeVar(new m));a(this,"_pointerupEvent",this.disposeVar(new m));a(this,"_pointermoveEvent",this.disposeVar(new m));a(this,"_pointeroutEvent",this.disposeVar(new m));a(this,"delayTime",800);const e=this.disposeVar(wh()),t=l=>{this._hoverOutEvent.emit()},i=l=>{this._hoverOutEvent.emit()};let r;const o=()=>{if(!r){console.warn("!lastPointerEvent");return}this._hoverEvent.emit(r)},h=l=>{r=l,e.restart(void 0,o,this.delayTime),this._hoverOutEvent.emit()},c=l=>{e.cancel(),this._hoverOutEvent.emit()};this.dispose(this._pointerdownEvent.disposableOn(t)),this.dispose(this._pointerupEvent.disposableOn(i)),this.dispose(this._pointermoveEvent.disposableOn(h)),this.dispose(this._pointeroutEvent.disposableOn(c))}get hoverEvent(){return this._hoverEvent}get hoverOutEvent(){return this._hoverOutEvent}pointerDown(e){this._pointerdownEvent.emit(e)}pointerUp(e){this._pointerupEvent.emit(e)}pointerMove(e){this._pointermoveEvent.emit(e)}pointerOut(e){this._pointeroutEvent.emit(e)}}class ou extends b{constructor(e,t=1500){super();a(this,"_hoverEvent",new m);a(this,"_hoverOutEvent",new m);const i=new Nr(t);this.dispose(()=>i.destroy());let r=0,o=0,h;i.progressFunc=()=>this._hoverEvent.emit(r,o,h);const c=g=>{!i.isRunning&&i.restart(),h=g,[r,o]=Ee(g),i.debounce(),this._hoverOutEvent.emit()},l=g=>{!i.isRunning&&i.restart(),h=g,[r,o]=Ee(h),i.debounce(),this._hoverOutEvent.emit()},u=g=>{!i.isRunning&&i.restart(),h=g,[r,o]=Ee(h),i.debounce(),this._hoverOutEvent.emit()},p=g=>{i.isRunning&&i.cancel(),this._hoverOutEvent.emit()};e.addEventListener("pointerdown",c),e.addEventListener("pointerup",l),e.addEventListener("pointermove",u),e.addEventListener("pointerout",p),this.dispose(()=>{e.removeEventListener("pointerdown",c),e.removeEventListener("pointerup",l),e.removeEventListener("pointermove",u),e.removeEventListener("pointerout",p)})}get hoverEvent(){return this._hoverEvent}get hoverOutEvent(){return this._hoverOutEvent}}class Ch extends b{constructor(e,t={}){super();a(this,"_needRedrawEvent");a(this,"_needPickRedrawEvent");a(this,"_id",Ki());a(this,"_clickEvent");a(this,"_clickOutEvent");a(this,"_dbclickEvent");a(this,"_dbclickOutEvent");a(this,"_actived",!1);a(this,"_activedChanged");a(this,"_hovered",!1);a(this,"_hoveredChanged");a(this,"_selected",!1);a(this,"_selectedChanged");a(this,"_opacity",1);a(this,"_opacityChanged");a(this,"_show",!0);a(this,"_showChanged");this._canvasPrimitivesContext=e;const{needRedraw:i=!0,needPickRedraw:r=!0}=t;i&&(this._needRedrawEvent=new m),r&&(this._needPickRedrawEvent=new m),this._canvasPrimitivesContext.addPoi(this),this.dispose(()=>this._canvasPrimitivesContext.removePoi(this)),this.dispose(this.showChanged.disposableOn(()=>{this.needRedraw(),this.needPickRedraw()})),this.dispose(this.opacityChanged.disposableOn(()=>this.needRedraw()))}get id(){return this._id}set id(e){this._id=e}get context(){return this._canvasPrimitivesContext}needRedraw(){this._needRedrawEvent?this._needRedrawEvent.emit():console.warn("no needRedrawEvent!")}needPickRedraw(){this._needPickRedrawEvent?this._needPickRedrawEvent.emit():console.warn("no needPickRedrawEvent!")}hasClickEvent(){return!!this._clickEvent}get clickEvent(){return this._clickEvent=this._clickEvent||new m,this._clickEvent}hasClickOutEvent(){return!!this._clickOutEvent}get clickOutEvent(){return this._clickOutEvent=this._clickOutEvent||new m,this._clickOutEvent}hasDbclickEvent(){return!!this._dbclickEvent}get dbclickEvent(){return this._dbclickEvent=this._dbclickEvent||new m,this._dbclickEvent}hasDbclickOutEvent(){return!!this._dbclickOutEvent}get dbclickOutEvent(){return this._dbclickOutEvent=this._dbclickOutEvent||new m,this._dbclickOutEvent}set actived(e){this._actived!==e&&(this._actived=e,this._activedChanged&&this._activedChanged.emit(e,this))}get actived(){return this._actived}get activedChanged(){return this._activedChanged=this._activedChanged||new m,this._activedChanged}set hovered(e){this._hovered!==e&&(this._hovered=e,this._hoveredChanged&&this._hoveredChanged.emit(e,this))}get hovered(){return this._hovered}get hoveredChanged(){return this._hoveredChanged=this._hoveredChanged||new m,this._hoveredChanged}set selected(e){this._selected!==e&&(this._selected=e,this._selectedChanged&&this._selectedChanged.emit(e,this))}get selected(){return this._selected}get selectedChanged(){return this._selectedChanged=this._selectedChanged||new m,this._selectedChanged}set opacity(e){this._opacity!==e&&(this._opacity=e,this._opacityChanged&&this._opacityChanged.emit(e,this))}get opacity(){return this._opacity}get opacityChanged(){return this._opacityChanged=this._opacityChanged||new m,this._opacityChanged}set show(e){this._show!==e&&(this._show=e,this._showChanged&&this._showChanged.emit(e,this))}get show(){return this._show}get showChanged(){return this._showChanged=this._showChanged||new m,this._showChanged}}class qr extends Ch{constructor(e,t=[0,0],i=0){super(e);a(this,"_winPosAndDepthChanged");this._winPos=t,this._depth=i,this.dispose(this.winPosAndDepthChanged.disposableOn(()=>{this.needRedraw(),this.needPickRedraw()}))}set winPos(e){(this._winPos[0]!==e[0]||this._winPos[1]!==e[1])&&(this._winPos[0]=e[0],this._winPos[1]=e[1],this._winPosAndDepthChanged&&this._winPosAndDepthChanged.emit(this._winPos,this._depth))}get winPos(){return this._winPos}set depth(e){this._depth!==e&&(this._depth=e,this._winPosAndDepthChanged&&this._winPosAndDepthChanged.emit(this._winPos,this._depth))}get depth(){return this._depth}get winPosAndDepthChanged(){return this._winPosAndDepthChanged||(this._winPosAndDepthChanged=new m),this._winPosAndDepthChanged}}function _i(n,s,e,t){const[i,r]=n,[o,h,c,l]=t,u=s[0]*e[0],p=s[1]*e[1],g=i-(u*o+c),f=r-(p*h+l);return{left:g,top:f,right:g+u,bottom:f+p}}function wi(n,s,e,t,i){n.beginPath(),n.moveTo(s,e),n.lineTo(s-t*.5,e-t*.5),n.arc(s,e-t,t*.7071067811865475,Math.PI*.75,Math.PI*.25),n.lineTo(s,e),n.fillStyle=i,n.fill()}function au(n,s,e,t,i,r){if(n.beginPath(),n.moveTo(s+t,e),n.arc(s,e,t,0,2*Math.PI),r){const o=n.createRadialGradient(s,e,0,s,e,t);o.addColorStop(0,i),o.addColorStop(1,i.replace(/[\d\.]+\)$/,"0)")),n.fillStyle=o}else n.fillStyle=i;n.fill()}function Sh(n,s,e,t,i,r){n.beginPath(),n.moveTo(s+r,e),n.lineTo(s+t-r,e),n.arcTo(s+t,e,s+t,e+r,r),n.lineTo(s+t,e+i-r),n.arcTo(s+t,e+i,s+t-r,e+i,r),n.lineTo(s+r,e+i),n.arcTo(s,e+i,s,e+i-r,r),n.lineTo(s,e+r),n.arcTo(s,e,s+r,e,r)}function Ph(n,s,e,t,i,r){n.font=i;const o=n.measureText(t),h=o.actualBoundingBoxLeft+o.actualBoundingBoxRight,c=Number.isFinite(o.fontBoundingBoxAscent)?o.fontBoundingBoxAscent:o.actualBoundingBoxAscent,l=Number.isFinite(o.fontBoundingBoxDescent)?o.fontBoundingBoxDescent:o.actualBoundingBoxDescent;let u=c+l;n.fillStyle=r,n.fillText(t,s-h*.5,e+u*.5-l)}function Th(n){const{width:s,height:e}=n,t=s instanceof SVGAnimatedLength?s.baseVal.SVG_LENGTHTYPE_PX:s,i=e instanceof SVGAnimatedLength?e.baseVal.SVG_LENGTHTYPE_PX:e,r=document.createElement("canvas");r.width=t,r.height=i;const o=r.getContext("2d");if(!o)throw new Error("!cavnasCtx");return o.drawImage(n,0,0,t,i),r}function Ih(n,s){const{width:e,height:t}=n,i=n.getContext("2d");if(!i)throw new Error("!cavnasCtx");const[r,o,h]=s.map(p=>p*255|0),c=i.getImageData(0,0,e,t),l=c.data;for(var u=0;u<l.length;u+=4)l[u]=r,l[u+1]=o,l[u+2]=h;i.putImageData(c,0,0)}function Xr(n,s,e,t=[.5,1,0,0],i,r="12px Arial",o=2,h="#FFF",c="#000A"){n.font=r;const l=n.measureText(i),u=l.actualBoundingBoxLeft+l.actualBoundingBoxRight,p=l.fontBoundingBoxAscent+l.fontBoundingBoxDescent,g=s,f=e,w=u+o*2,E=p+o*2,{left:C,top:T,bottom:R}=_i([g,f],[w,E],[1,1],t);n.fillStyle=c,Sh(n,C,T,w,E,o),n.fill(),n.fillStyle=h,n.fillText(i,C+o,R-o-l.fontBoundingBoxDescent)}function en(n){return("00"+n.toString(16).toUpperCase()).substr(-2)}function tn(n){const[s,e,t,i]=n.map(r=>r*255|0);return`#${en(s)}${en(e)}${en(t)}${en(i)}`}function Yr(n,s){const[e,t,i]=s,r=`${e}-${t}-${i}`;let o=Ae(n,r);return o||(o=Th(n),Ih(o,s),gt(n,r,o)),o}class hu extends qr{constructor(e,t,i=[32,32],r=[.5,1,0,0],o="#F00F"){super(e);a(this,"_tooltip","");a(this,"_title","");a(this,"__scale",[1,1]);a(this,"_tooltipAlpha",0);a(this,"_bgColor",[.3,.3,.3,.8]);a(this,"_bgColorHexStr",tn(this._bgColor));a(this,"_fgColor",[1,1,1,1]);a(this,"_fgColorHexStr",tn(this._fgColor));this._image=t,this._size=i,this._originRatioAndOffset=r,this._defaultColorStr=o;const h=new Qs(100),c=new Qs(100);this.dispose(()=>{h.destroy(),c.destroy()});const l=()=>{if(this._clickEvent&&!this._clickEvent.empty){const u=(1+.08*c.current)*(1+.08*h.current);this._scale=[u,u],this._tooltipAlpha=h.current}};this.dispose(this.activedChanged.disposableOn(u=>{c.target=u?1:0,this.needRedraw()})),this.dispose(this.hoveredChanged.disposableOn(u=>{h.target=u?1:0,this.needRedraw()})),this.dispose(this.selectedChanged.disposableOn(()=>{this.needRedraw()})),this.dispose(c.currentChanged.disposableOn(l)),this.dispose(h.currentChanged.disposableOn(l))}set size(e){const[t,i]=e,[r,o]=this._size;(r!==t||o!==i)&&(this._size[0]=t,this._size[1]=i,this.needRedraw(),this.needPickRedraw())}get size(){return this._size}set _scale(e){const[t,i]=e,[r,o]=this.__scale;(r!==t||o!==i)&&(this.__scale[0]=t,this.__scale[1]=i,this.needRedraw(),this.needPickRedraw())}get _scale(){return this.__scale}set fgColor(e){if(!this._fgColor.every((t,i)=>e[i]===t)){const[t,i,r,o]=e;this._fgColor.splice(0,4,t,i,r,o),this._fgColorHexStr=tn(this._fgColor),this.needRedraw()}}get fgColor(){return this._fgColor}set bgColor(e){if(!this._bgColor.every((t,i)=>e[i]===t)){const[t,i,r,o]=e;this._bgColor.splice(0,4,t,i,r,o),this._bgColorHexStr=tn(this._bgColor),this.needRedraw()}}get bgColor(){return this._bgColor}set originRatioAndOffset(e){const[t,i,r,o]=this._originRatioAndOffset,[h,c,l,u]=e;(t!==h||i!==c||r!==l||o!==u)&&(this._originRatioAndOffset.splice(0,4,h,c,l,u),this.needRedraw(),this.needPickRedraw())}get originRatioAndOffset(){return this._originRatioAndOffset}set image(e){this._image!==e&&(this._image=e,this.needRedraw())}get image(){return this._image}set defaultColorStr(e){this._defaultColorStr!==e&&(this._defaultColorStr=e,this.needRedraw())}get defaultColorStr(){return this._defaultColorStr}set tooltip(e){this._tooltip!==e&&(this._tooltip=e,this.needRedraw())}get tooltip(){return this._tooltip}set title(e){this._title!==e&&(this._title=e,this.needRedraw())}get title(){return this._title}draw(e){if(!this._show)return;const[t,i]=this._winPos,r=this._size[0]*this.__scale[0],o=this._size[1]*this.__scale[1],{left:h,top:c}=_i([t,i],this._size,this.__scale,this._originRatioAndOffset),l=e.globalAlpha;if(e.globalAlpha=this.opacity,this._image){if(this.selected){const u=Yr(this._image,[1,0,0]),{left:p,top:g}=_i([t,i+3],[r+6,o+6],[1,1],this._originRatioAndOffset);e.drawImage(u,p,g,r+6,o+6)}if(this.actived){const[u,p,g,f]=this._fgColor,w=Yr(this._image,[u,p,g]),{left:E,top:C}=_i([t,i+4],[r+8,o+8],[1,1],this._originRatioAndOffset);e.drawImage(w,E,C,r+8,o+8)}if(this.hovered){const[u,p,g,f]=this._bgColor,w=Yr(this._image,[u,p,g]),{left:E,top:C}=_i([t,i+2],[r+4,o+4],[1,1],this._originRatioAndOffset);e.drawImage(w,E,C,r+4,o+4)}e.drawImage(this._image,h,c,r,o)}else e.fillStyle=this._fgColorHexStr,e.fillRect(h,c,r,o);if(this._title!==""&&Xr(e,t+20,i-16,[0,.5,0,0],this._title,"14px Arial",4,this._fgColorHexStr,this._bgColorHexStr),e.globalAlpha=l,this._hovered&&this._tooltip!==""){const u=e.globalAlpha;e.globalAlpha=this._tooltipAlpha,Xr(e,t,i-42,[.5,1,0,0],this._tooltip,"12px Arial",4,this._fgColorHexStr,this._bgColorHexStr),e.globalAlpha=u}}drawForPick(e,t){if(!this._show)return;const[i,r]=this._winPos,o=t("default"),h=this._size[0]*this.__scale[0],c=this._size[1]*this.__scale[1],{left:l,top:u}=_i([i,r],this._size,this.__scale,this._originRatioAndOffset);e.fillStyle=o,e.fillRect(l,u,h,c)}}class cu extends qr{constructor(e){super(e);a(this,"_width",16);a(this,"_text","");a(this,"_fillStyle","#0F0");a(this,"_scale",1);a(this,"_scaleChanged");this.dispose(this.scaleChanged.disposableOn(o=>{this.needRedraw(),this.needPickRedraw()}));const t=this.disposeVar(new Qs(100)),i=this.disposeVar(new Qs(100)),r=()=>{this._clickEvent&&!this._clickEvent.empty&&(this.scale=(1+.1*i.current)*(1+.2*t.current))};this.dispose(i.currentChanged.disposableOn(r)),this.dispose(t.currentChanged.disposableOn(r)),this.dispose(this.activedChanged.disposableOn(o=>{i.target=o?1:0,this.needRedraw()})),this.dispose(this.hoveredChanged.disposableOn(o=>{t.target=o?1:0,this.needRedraw()})),this.dispose(this.selectedChanged.disposableOn(o=>{this.needRedraw()}))}set scale(e){this._scale!==e&&(this._scale=e,this._scaleChanged&&this._scaleChanged.emit(e,this))}get scale(){return this._scale}get scaleChanged(){return this._scaleChanged||(this._scaleChanged=new m),this._scaleChanged}set width(e){this._width!==e&&(this._width=e,this.needRedraw(),this.needPickRedraw())}get width(){return this._width}set text(e){this._text!==e&&(this._text=e,this.needRedraw())}get text(){return this._text}set fillStyle(e){this._fillStyle!==e&&(this._fillStyle=e,this.needRedraw())}get fillStyle(){return this._fillStyle}draw(e){if(!this._show)return;const[t,i]=this._winPos,r=e.globalAlpha;e.globalAlpha=this.opacity;const o=this._width*this._scale;this.selected&&wi(e,t,i+3,o+3,"#F00"),this.actived&&this._clickEvent&&!this._clickEvent.empty&&wi(e,t,i+5,o+5,"#FFF"),this.hovered?wi(e,t,i+3,o+3,"#000A"):wi(e,t,i+1,o+1,"#000A"),wi(e,t,i,o,this._fillStyle);const h=this._scale>1.2?"bold 14px Arial":"bold 10px Arial";Ph(e,t,i-o,this._text,h,"#000"),e.globalAlpha=r}drawForPick(e,t){if(!this._show)return;const[i,r]=this._winPos,o=this._width*this._scale,h=t("default");wi(e,i,r,o,h)}}const Oh=new ArrayBuffer(4),Dh=new Uint32Array(Oh),yi=new Uint8Array(Oh);function Fh(n){if(n>=16777215)throw new Error("uint32 > 0xFFFFFF");return Dh[0]=n,[yi[0],yi[1],yi[2]]}function xh(n,s,e){return yi[0]=n,yi[1]=s,yi[2]=e,yi[3]=0,Dh[0]}class kh extends b{constructor(){super(...arguments);a(this,"_pickColors",new Array(16777215));a(this,"_pickColorIndex",0)}reset(){for(let e=0;e<this._pickColorIndex;++e){const t=this._pickColors[e];if(!t)throw console.error("this._pickColors[i] should not be undefined!"),new Error("this._pickColors[i] should not be undefined!");t.poi=null,t.tag=""}this._pickColorIndex=0}createPickColor(e,t){const i=this._pickColorIndex;++this._pickColorIndex;const r=this._pickColors[i];r?(r.poi=e,r.tag=t):this._pickColors[i]={poi:e,tag:t};const[o,h,c]=Fh(i);return[o,h,c]}getPickInfoFromColor(e,t,i){const r=xh(e,t,i);if(r>=this._pickColorIndex){console.error("index >= this._pickColorIndex");return}const o=this._pickColors[r];if(!o){console.error("!this._pickColors[index]");return}return o}destroyImp(){this.reset()}}const Mh=(n,s)=>s.depth-n.depth;class lu extends b{constructor(){super();a(this,"_pois",[]);a(this,"_canvasElement");a(this,"_ctx");a(this,"_offscreenCanvasElement");a(this,"_offscreenCanvasElement2");a(this,"_offscreenCtx");a(this,"_offscreenCtx2");a(this,"_size",[0,0]);a(this,"_needRedraw",!1);a(this,"_needPickRedraw",!1);a(this,"_pickColorManager",new kh);const e=document.createElement("canvas");e.style.width="100%",e.style.height="100%",this._canvasElement=e;const t=e.getContext("2d");if(t===null)throw new Error("cannot get context 2d!");this._ctx=t,this._offscreenCanvasElement=document.createElement("canvas"),this._offscreenCtx=this._offscreenCanvasElement.getContext("2d"),this._offscreenCtx.imageSmoothingEnabled=!1,this._offscreenCanvasElement2=document.createElement("canvas"),this._offscreenCtx2=this._offscreenCanvasElement2.getContext("2d"),this._offscreenCtx2.imageSmoothingEnabled=!1,this.disposeVar(ss(()=>{const[r,o]=this._size,{clientWidth:h,clientHeight:c}=this._canvasElement;(r!==h||o!==c)&&(this._size[0]=h,this._size[1]=c,this._canvasElement.width=h,this._canvasElement.height=c,this._offscreenCanvasElement.width=h,this._offscreenCanvasElement.height=c,this._offscreenCanvasElement2.width=h,this._offscreenCanvasElement2.height=c,this._dirty()),this._needRedraw&&(this._needRedraw=!1,this._draw())})).start()}get element(){return this._canvasElement}get pois(){return this._pois}_dirty(){this._needRedraw=!0,this._needPickRedraw=!0}get size(){return this._size}addPoi(e){if(typeof Ae(e,"listenHandler")<"u"){console.error("可能有poi重复加载poiManager中!");return}if(this._pois.indexOf(e)!==-1){console.error("同一个poi加了多次!");return}this._pois.push(e),this._dirty();const t=e._needRedrawEvent;if(t){const r=t.on(()=>{this._needRedraw=!0});gt(e,"needRedrawEventHandler",r)}const i=e._needPickRedrawEvent;if(i){const r=i.on(()=>{this._needPickRedraw=!0});gt(e,"needPickRedrawEventHandler",r)}}removePoi(e){const t=this._pois.indexOf(e);if(t===-1){console.error("删除一个不存在的poi!");return}this._pois.splice(t,1),this._dirty();const i=e._needRedrawEvent;if(i){const o=Ae(e,"needRedrawEventHandler");o?i.off(o):console.error("poi没有listenHandler!")}const r=e._needPickRedrawEvent;if(r){const o=Ae(e,"needPickRedrawEventHandler");o?r.off(o):console.error("poi没有listenHandler!")}}_draw(){this._pois.sort(Mh);const[e,t]=this._size;this._ctx.clearRect(0,0,e,t),this._pois.forEach(i=>i.draw(this._ctx))}pick(e,t,i,r){return this._needPickRedraw&&(this._needPickRedraw=!1,this._pickDraw()),this._getPickInfo(e,t,i,r)}_pickDraw(){this._pickColorManager.reset(),this._pois.sort(Mh);const[e,t]=this._size;this._offscreenCtx.clearRect(0,0,e,t),this._pois.forEach(i=>{const r=o=>{const[h,c,l]=this._pickColorManager.createPickColor(i,o);return`rgb(${h}, ${c}, ${l})`};i.drawForPick(this._offscreenCtx,r)})}_getPickInfo(e,t,i,r){const o=this._offscreenCtx.getImageData(e,t,i,r),h=[],c=o.data.length/4;for(let l=0;l<c;++l){const u=o.data[l*4+0],p=o.data[l*4+1],g=o.data[l*4+2];if(o.data[l*4+3]===255){const w=this._pickColorManager.getPickInfoFromColor(u,p,g);if(w&&w.poi&&!h.includes(w)){let E=!0;{const[C,T]=this._size;this._offscreenCtx2.clearRect(0,0,C,T);const R=Z=>"rgb(255, 255, 255)";w.poi.drawForPick(this._offscreenCtx2,R);const V=this._offscreenCtx2.getImageData(e,t,i,r),I=V.data[l*4+0],H=V.data[l*4+1],q=V.data[l*4+2];V.data[l*4+3],I===255&&H===255&&q===255||(E=!1)}E&&h.push(w)}}}return h}}class Kr extends b{constructor(){super(...arguments);a(this,"_closeEvent");a(this,"_show",!0);a(this,"_showChanged");a(this,"_opacity",1);a(this,"_opacityChanged");a(this,"_winPos",[0,0]);a(this,"_winPosChanged")}set winPos(e){const[t,i]=e,[r,o]=this._winPos;(t!==r||i!==o)&&(this._winPos[0]=t,this._winPos[1]=i,this._winPosChanged&&this._winPosChanged.emit(this._winPos))}get winPos(){return this._winPos}get winPosChanged(){return this._winPosChanged=this._winPosChanged||new m,this._winPosChanged}set opacity(e){this._opacity!==e&&(this._opacity=e,this._opacityChanged&&this._opacityChanged.emit(this._opacity))}get opacity(){return this._opacity}get opacityChanged(){return this._opacityChanged=this._opacityChanged||new m,this._opacityChanged}set show(e){this._show!==e&&(this._show=e,this._showChanged&&this._showChanged.emit(this._show))}get show(){return this._show}get showChanged(){return this._showChanged=this._showChanged||new m,this._showChanged}get closeEvent(){return this._closeEvent||(this._closeEvent=new m),this._closeEvent}}const Zr=new WeakMap;function Qr(n){if(!Zr.has(n)){const s=new En(()=>new n,e=>e.reset());Zr.set(n,s)}return Zr.get(n)}class eo extends Kr{constructor(){super();a(this,"_div");a(this,"_contentDiv");a(this,"_originOffsetX",0);a(this,"_originOffsetY",0);a(this,"_originRatioX",.5);a(this,"_originRatioY",1);a(this,"_divChanged",new m);const e=document.createElement("div");e.style.cssText="width: 0px; height: 0px; position: absolute; opacity: 1.0; visibility: visible;";const t=document.createElement("div");t.style.cssText=`position: absolute; left: ${-this._originOffsetX}px; top: ${-this._originOffsetY}px; transform: translateX(-${100*this._originRatioX}%) translateY(-${100*this._originRatioY}%); margin: 0; padding: 0; pointer-events: none;`;const i=document.createElement("div");this._contentDiv=i,t.appendChild(i),e.appendChild(t),this._div=e,this.dispose(this._divChanged.disposableOn(()=>{t.style.left=`${-this._originOffsetX}px`,t.style.top=`${-this._originOffsetY}px`,t.style.transform=`translateX(-${100*this._originRatioX}%) translateY(-${100*this._originRatioY}%)`})),this.dispose(this.winPosChanged.disposableOn(([r,o])=>{this._div.style.left=`${r}px`,this._div.style.top=`${o}px`})),this.dispose(this.opacityChanged.disposableOn(r=>{this._div.style.opacity=`${r}`})),this.dispose(this.showChanged.disposableOn(r=>{this._div.style.visibility=r?"visible":"hidden"}))}get contentDiv(){return this._contentDiv}reset(){}get originOffsetX(){return this._originOffsetX}set originOffsetX(e){this._originOffsetX!==e&&(this._originOffsetX=e,this._divChanged.emit())}get originOffsetY(){return this._originOffsetY}set originOffsetY(e){this._originOffsetY!==e&&(this._originOffsetY=e,this._divChanged.emit())}get originRatioX(){return this._originRatioX}set originRatioX(e){this._originRatioX!==e&&(this._originRatioX=e,this._divChanged.emit())}get originRatioY(){return this._originRatioY}set originRatioY(e){this._originRatioY!==e&&(this._originRatioY=e,this._divChanged.emit())}get element(){return this._div}}class jh extends b{constructor(e,t){super();a(this,"_floatDiv");a(this,"_show",!1);a(this,"_showChanged");this._customDivClass=e,this._divContainer=t,this.dispose(()=>{this.show=!1})}_updateDivPoi(){if(this._show){const{floatDiv:t}=this;t.element.parentElement||this._divContainer.appendChild(t.element)}else{const{_floatDiv:t}=this;t&&t.element.parentElement&&this._divContainer.removeChild(t.element)}}set show(e){this._show!==e&&(this._show=e,this._updateDivPoi(),this._showChanged&&this._showChanged.emit(e))}get show(){return this._show}get floatDiv(){if(!this._floatDiv){const e=Qr(this._customDivClass).create();this.dispose(()=>{Qr(this._customDivClass).destroy(e)}),this._floatDiv=e}return this._floatDiv}get showChanged(){return this._showChanged||(this._showChanged=new m),this._showChanged}}const du=["top","bottom","left","right"];function uu(n){return Object.entries(n).map(([s,e])=>du.includes(s)?`${s}: ${e}px; `:"").join("")}function Rh(n,s,e){const t=document.createElement("div");t.style.cssText=`position: absolute; ${uu(e)} background-color: ${n}; border-radius: ${s}px;`;const i='<svg viewBox="0 0 1024 1024" style="display: block;" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2420" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M512 128C300.8 128 128 300.8 128 512s172.8 384 384 384 384-172.8 384-384S723.2 128 512 128zM512 832c-179.2 0-320-140.8-320-320s140.8-320 320-320 320 140.8 320 320S691.2 832 512 832z" p-id="2421" fill="#ffffff"></path><path d="M672 352c-12.8-12.8-32-12.8-44.8 0L512 467.2 396.8 352C384 339.2 364.8 339.2 352 352S339.2 384 352 396.8L467.2 512 352 627.2c-12.8 12.8-12.8 32 0 44.8s32 12.8 44.8 0L512 556.8l115.2 115.2c12.8 12.8 32 12.8 44.8 0s12.8-32 0-44.8L556.8 512l115.2-115.2C684.8 384 684.8 364.8 672 352z" p-id="2422" fill="#ffffff"></path></svg>';return t.innerHTML=i,t}function Ah(n,s,e="rgba(0,0,0,0.7)"){const t=document.createElement("div");t.style.cssText=`margin: 0 auto; width: ${n}px; height: ${s}px; position: relative; pointer-events: none;`;const i=document.createElement("div");return i.style.cssText=`position: absolute; left: 0px; top: 0px; width: 0; height: 0; border-left: ${n*.5}px solid transparent; border-right: ${n*.5}px solid transparent; border-top: ${s}px solid ${e};`,t.appendChild(i),[t,i]}class Nh extends eo{constructor(){super();a(this,"_borderDiv");a(this,"_closeDiv");a(this,"_innerContentDiv");a(this,"_colorStr","rgba(0, 0, 0, 0.7)");a(this,"_divColorChanged",new m);a(this,"_borderRadius",10);const e=document.createElement("div");e.style.cssText=`position: relative; background-color: ${this._colorStr}; border-radius: ${this._borderRadius}px; padding: 5px; pointer-events: all;`,this._borderDiv=e;const t=Rh(this._colorStr,10,{top:3,right:3}),[i,r]=Ah(2*this._borderRadius,2*this._borderRadius,this._colorStr),o=document.createElement("div");this._innerContentDiv=o,e.appendChild(o),e.appendChild(t),this.contentDiv.appendChild(e),this.contentDiv.appendChild(i),t.style.opacity="0.1",t.onmouseenter=()=>{t.style.opacity="1.0"},t.onmouseleave=()=>{t.style.opacity="0.1"},t.onclick=()=>{this._closeEvent&&this._closeEvent.emit()},this._closeDiv=t,this.dispose(this._divColorChanged.disposableOn(()=>{r.style.borderTopColor=this._colorStr,e.style.backgroundColor=this._colorStr,i.style.width=`${this._borderRadius*2}px`,i.style.height=`${this._borderRadius*2}px`,r.style.borderLeft=`${this._borderRadius}px`,r.style.borderRight=`${this._borderRadius}px`,r.style.borderTop=`${this._borderRadius*2}px`}));const h=c=>{c.key==="Escape"&&this._closeEvent&&this._closeEvent.emit()};document.body.addEventListener("keydown",h,!0),this.dispose(()=>{document.removeEventListener("keydown",h,!0)})}get borderDiv(){return this._borderDiv}get innerContentDiv(){return this._innerContentDiv}reset(){this.show=!1,this.opacity=0,this._closeDiv.style.opacity="0.1",super.reset()}get colorStr(){return this._colorStr}set colorStr(e){this._colorStr!==e&&(this._colorStr=e,this._divColorChanged.emit())}get borderRadius(){return this._borderRadius}set borderRadius(e){this._borderRadius!==e&&(this._borderRadius=e,this._divColorChanged.emit())}}class pu extends Nh{constructor(){super();a(this,"_iframe");a(this,"_iframeMessageEvent");const e=document.createElement("iframe");e.style.cssText="width: 100%; height: 100%; border-width: 0px; border-radius: 5px; display: block;",e.src="http://www.weather.com.cn/live/index.shtml",this._iframe=e,this.innerContentDiv.appendChild(e);const t=i=>{i.source===this._iframe.contentWindow&&(this._iframeMessageEvent?this._iframeMessageEvent.emit(i):console.warn(`iframe消息接收到未处理!data: ${i.data}`))};globalThis.addEventListener("message",t),this.dispose(()=>{globalThis.removeEventListener("message",t)})}reset(){super.reset(),this.src=""}set src(e){this._iframe.src!==e&&(this._iframe.src=e)}get src(){return this._iframe.src}get iframe(){return this._iframe}get iframeMessageEvent(){return this._iframeMessageEvent=this._iframeMessageEvent||new m,this._iframeMessageEvent}}class gu extends Kr{constructor(){super();a(this,"_div");a(this,"_contentContainer");a(this,"_text","");const e=document.createElement("div");this._div=e,e.style.cssText="width: 0px; height: 0px; position: absolute; opacity: 1.0; visibility: visible; transition: opacity 0.5s;";const t=document.createElement("div");t.style.cssText="position: absolute; left: 0px; bottom: 0px; transform: translateX(-50%); margin: 0; padding: 0; pointer-events: none;";const i=document.createElement("div");i.style.cssText="position: relative; background-color: rgba(0, 0, 0, 0.7); border-radius: 5px; padding: 3px; pointer-events: all; color: white; white-space: nowrap;",i.innerText=this._text,this._div.appendChild(t),t.appendChild(i),this._contentContainer=i,this._div=e,this.dispose(this.winPosChanged.disposableOn(([r,o])=>{this._div.style.left=`${r}px`,this._div.style.top=`${o-50}px`})),this.dispose(this.opacityChanged.disposableOn(r=>{this._div.style.opacity=`${r}`})),this.dispose(this.showChanged.disposableOn(r=>{this._div.style.visibility=r?"visible":"hidden"}))}get element(){return this._div}reset(){this.opacity=1,this.show=!0}set text(e){this._text!==e&&(this._text=e,this._contentContainer.innerText=e)}get text(){return this._text}}class fu extends eo{constructor(){super(),this.contentDiv.style.backgroundColor="rgba(0, 0, 0, 0.8)",this.contentDiv.style.borderRadius="3px",this.contentDiv.style.color="rgb(255, 255, 255)",this.contentDiv.style.padding="1px 5px 1px 5px",this.contentDiv.style.fontSize="12px",this.contentDiv.style.whiteSpace="nowrap",this.contentDiv.innerText="未定义光标信息!",this.originRatioX=0,this.originRatioY=0,this.originOffsetX=-16}}class mu extends b{constructor(e,t){super();a(this,"_cursorDiv");a(this,"_pointerOut",this.disposeVar(y(!1)));a(this,"_show",this.disposeVar(y(!0)));this._cursorDiv=new jh(t,e),this.dispose(()=>this._cursorDiv.destroy());const i=o=>{const[h,c]=Ee(o);this._cursorDiv.floatDiv.winPos=[h,c]};e.addEventListener("pointermove",i),this.dispose(()=>e.removeEventListener("pointermove",i));const r=()=>{this._cursorDiv.show=this.show&&this._pointerOut.value};r(),this.dispose(this.showChanged.disposableOn(r)),this.dispose(this._pointerOut.changed.disposableOn(r))}set show(e){this._show.value=e}get show(){return this._show.value}get showChanged(){return this._show.changed}reset(){this._pointerOut.value=!1}get cursorDiv(){return this._cursorDiv}set text(e){this._cursorDiv.floatDiv.contentDiv.innerText=e}get text(){return this._cursorDiv.floatDiv.contentDiv.innerText}}function sn(n,s,e){if(!(n.tree===s.tree&&n!==s&&!n.isAncestorOf(s))||n.tree!==s.tree||!n.parent)return!1;if(!n.parent.children)throw console.error("当前节点的父节点没有子节点?这是不可能的!"),new Error("当前节点的父节点没有子节点?这是不可能的!");return!(s===n||n.isAncestorOf(s)||e!=="inner"&&!s.parent||e==="inner"&&!s.children)}function An(n,s,e){if(!n.tree||!s.tree||n.tree!==s.tree)return;if(!n.parent){console.warn("当前节点没有父节点,那么该节点无法被移动!");return}if(!n.parent.children)throw console.error("当前节点的父节点没有子节点?这是不可能的!"),new Error("当前节点的父节点没有子节点?这是不可能的!");if(s===n){console.warn("自身不能拖放到自身!");return}if(n.isAncestorOf(s)){console.warn("当前节点不能拖放到它自身的后代节点之上!");return}if(e!=="inner"&&!s.parent){console.warn("目标节点没有父节点,无法拖放!");return}if(e==="inner"&&!s.children){console.warn("无法移动到目标节点的子节点中,因为目标节点不是组节点!");return}n.tree._startTransaction();const t=n.parent.children.indexOf(n);if(n.parent.children.splice(t,1),e!=="inner"){const{parent:i}=s;if(!i||!i.children)throw new Error("!parent");const r=i.children.indexOf(s);e==="before"?i.children.splice(r,0,n):e==="after"&&i.children.splice(r+1,0,n)}else s.children.push(n);n.tree._stopTransaction()}function Vh(n,s,e){return xr(n,t=>sn(t,s,e))}function Lh(n,s,e){for(let t of n)sn(t,s,e)?An(t,s,e):console.warn(`treeItem(id: ${t.id}) cannot move...`)}const vu={checked:1,unchecked:2,indeterminate:3},_u=["checked","unchecked","indeterminate"];class zh extends b{constructor(e){super();a(this,"_collapsed",this.disposeVar(y(!1)));a(this,"_checkedStatus",this.disposeVar(y("unchecked")));a(this,"_selected",this.disposeVar(y(!1)));a(this,"_moveToPositionMode",this.disposeVar(y("none")));a(this,"_updateCheckedStatusFromChildrenEvent",this.disposeVar(new m));this._treeItem=e;const t=()=>this._treeItem.tree&&this._treeItem.tree.itemsChanged.emit([this._treeItem]);this.dispose(this._collapsed.changed.disposableOn(t)),this.dispose(this._checkedStatus.changed.disposableOn(t)),this.dispose(this._selected.changed.disposableOn(t)),this.dispose(this._moveToPositionMode.changed.disposableOn(t)),this.dispose(this._checkedStatus.changed.disposableOn(()=>this._treeItem.parent&&this._treeItem.parent.uiTreeObject.updateCheckedStatusFromChildren())),this.dispose(this._treeItem.childrenChangedEvent.disposableOn(()=>{this.updateCheckedStatusFromChildren()}));const i=this.disposeVar(ae(this._updateCheckedStatusFromChildrenEvent));this.dispose(i.disposableOn(()=>{if(!this._treeItem.children)return;let r=0;Fr(this._treeItem.children,o=>(r|=vu[o.uiTreeObject.checkedStatus],r===3)),r>0&&(this._checkedStatus.value=_u[r-1])})),this.dispose(this._treeItem.childrenResetedEvent.disposableOn(r=>{!r&&this.checkedStatus==="indeterminate"&&(this._checkedStatus.value="unchecked")}));{const r=(o,h,c=!0)=>{if(h)o.selectedItems.push(this._treeItem);else{const l=o.selectedItems.indexOf(this._treeItem);l===-1?c&&console.error("selectedItems index -1"):o.selectedItems.splice(l,1)}};this.dispose(this._selected.changed.disposableOn(o=>{const{tree:h}=this._treeItem;h&&r(h,o)})),this.dispose(()=>this.selected=!1)}}get treeItem(){return this._treeItem}get collapsed(){return this._collapsed.value}set collapsed(e){this._collapsed.value=e}get collapsedChanged(){return this._collapsed.changed}get checkedStatus(){return this._checkedStatus.value}check(e){const t=e?"checked":"unchecked";if(this._checkedStatus.value!==t&&(this._checkedStatus.value=t,this._treeItem.children))for(let i of this._treeItem.children)i.uiTreeObject.check(e)}updateCheckedStatusFromChildren(){this._updateCheckedStatusFromChildrenEvent.emit()}get checkedStatusChanged(){return this._checkedStatus.changed}get selected(){return this._selected.value}set selected(e){this._selected.value=e}get selectedChanged(){return this._selected.changed}get moveToPositionMode(){return this._moveToPositionMode.value}set moveToPositionMode(e){this._moveToPositionMode.value=e}get moveToPositionModeChanged(){return this._moveToPositionMode.changed}}const rt=class rt extends b{constructor(e,t=!1,i){super();a(this,"_children");a(this,"_childrenResetedEvent");a(this,"_childrenToChangeEvent");a(this,"_childrenChangedEvent");a(this,"_parent",this.disposeVar(y(void 0)));a(this,"_level",this.disposeVar(y(0)));a(this,"_id");a(this,"_uiTreeObject",this.disposeVar(new zh(this)));this._tree=e,this._hasChildren=t,this._id=i??Ki(),this._id!=="_ROOT"&&rt.wm.has(this._id)&&console.warn(`创建了id(${this._id})相同的树节点,会导致之前的树节点无法索引!`),rt.wm.set(this._id,this),this.dispose(()=>{if(this._id!=="_ROOT"&&!rt.wm.has(this._id)){console.warn(`树节点(${this._id})不在wm树上!`);return}rt.wm.delete(this._id)}),this.dispose(this._parent.changed.disposableOn(()=>{this._updateLevel()})),this.dispose(this._level.changed.disposableOn(()=>{if(this.children)for(let r of this.children)r._updateLevel()})),rt.allTreeItems.set(this._id,this),this.dispose(()=>{rt.allTreeItems.delete(this._id)})}static getFromId(e){return rt.wm.get(e)}get uiTreeObject(){return this._uiTreeObject}get id(){return this._id}_updateLevel(){this.parent&&(this._level.value=this.parent.level+1)}get parent(){return this._parent.value}get parentChanged(){return this._parent.changed}get children(){if(this._hasChildren){if(!this._children){const e=this.disposeVar(new Xs);this._children=e,this.dispose(e.toChangeEvent.disposableOn((r,o)=>{for(let h of r){const{start:c,deleteCount:l,items:u}=h;for(let p=c;p<c+l;++p)o.get(p)._parent.value=void 0;for(let p of u){if(p.parent)throw console.error("请检查新增的treeItem是否正在使用!"),new Error("item.parent should not exist!");p._parent.value=this}}}));const t=new Set,i=new Set;this.dispose(e.toChangeEvent.disposableOn((r,o)=>{var h;if(this.tree){t.clear(),i.clear();for(let c of r){const{start:l,deleteCount:u,items:p}=c;for(let g=l;g<l+u;++g)t.add(o.get(g));for(let g of p)i.add(g)}for(let c of t)i.has(c)&&(t.delete(c),i.delete(c));(h=this.tree)==null||h.itemChildrenToChange.emit(this,r,t,i)}})),this.dispose(e.changedEvent.disposableOn(()=>{var r;(r=this.tree)==null||r.itemChildrenChanged.emit(this)})),this.dispose(e.toChangeEvent.disposableOn((...r)=>this._childrenToChangeEvent&&this._childrenToChangeEvent.emit(...r))),this.dispose(e.changedEvent.disposableOn((...r)=>this._childrenChangedEvent&&this._childrenChangedEvent.emit(...r)))}return this._children}else return}get childrenResetedEvent(){return this._childrenResetedEvent||(this._childrenResetedEvent=new m),this._childrenResetedEvent}get childrenToChangeEvent(){return this._childrenToChangeEvent||(this._childrenToChangeEvent=new m),this._childrenToChangeEvent}get childrenChangedEvent(){return this._childrenChangedEvent||(this._childrenChangedEvent=new m),this._childrenChangedEvent}resetChildren(e=!1){this._children&&(this._children.length=0),this._hasChildren=e,this._childrenResetedEvent&&this._childrenResetedEvent.emit(e)}*getDescendants(e){const t=this,i=[],r=[];for(t.children&&t.children.length>0&&(!e||e(t))&&(i.push(0),r.push(t.children));i.length>0;){const o=i[i.length-1],h=r[r.length-1],c=h.get(o);yield c,o<h.length-1?++i[i.length-1]:(r.pop(),i.pop()),c.children&&c.children.length>0&&(!e||e(c))&&(i.push(0),r.push(c.children))}}*getAncestors(e){let t=this.parent;for(;t&&(yield t,!(e&&!e(t)));)t=t.parent}isDescendantOf(e){for(let t of this.getAncestors())if(t===e)return!0;return!1}isAncestorOf(e){return e.isDescendantOf(this)}get level(){return this._level.value}get levelChanged(){return this._level.changed}get tree(){return this._tree}canMoveTo(e,t){return sn(this,e,t)}moveTo(e,t){An(this,e,t)}detachFromParent(){if(!this.parent||!this.parent.children)return;const e=this.parent.children.indexOf(this);this.parent.children.splice(e,1)}insertNewTreeItem(e,t){if(t&&t.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&e.startsWith("Inner"))return t&&this.children.push(t),!0;if(e==="Inner")return!1;const i=this.parent;if(!i||!i.children)return!1;const r=i.children.indexOf(this);return e.endsWith("Before")?t&&i.children.splice(r,0,t):e.endsWith("After")&&t&&i.children.splice(r+1,0,t),!0}};a(rt,"wm",new Map),a(rt,"allTreeItems",new Map);let nn=rt;class Uh extends b{constructor(e){super();a(this,"_redrawEvent",this.disposeVar(new m));a(this,"_containerScrollTop",this.disposeVar(y(0)));a(this,"_containerClientHeight",this.disposeVar(y(-1)));a(this,"_container",this.disposeVar(y(void 0)));a(this,"_redrawInfo",{topFreeSpaceHeight:0,topUnvisibleItemNum:0,middleTreeItems:[],bottomFreeSpaceHeight:0,bottomUnvisibleItemNum:0});this._tree=e;const t=this._containerClientHeight,i=this._containerScrollTop,r=this._tree._forceRedrawEvent,o=this.disposeVar(ae(this._tree.itemDivHeightChanged,this._tree.itemChildrenChanged,this._tree.itemsChanged,t.changed,i.changed,r)),{redrawInfo:h}=this,c=u=>{const p=u.uiTreeObject;return!!u.children&&(!p||!p.collapsed)};this.dispose(o.disposableOn(()=>{if(h.topFreeSpaceHeight=0,h.topUnvisibleItemNum=0,h.middleTreeItems.length=0,h.bottomFreeSpaceHeight=0,h.bottomUnvisibleItemNum=0,this._containerClientHeight.value>=0){const u=kr(this._tree.getDescendants(c)),p=this._tree.itemDivHeight,g=p*u,f=At([Kt([At([g-t.value,0]),i.value]),0]),w=f/p|0,E=Math.ceil((f-w*p+t.value)/p)|0;w>0&&(h.topUnvisibleItemNum=w,h.topFreeSpaceHeight=w*this._tree.itemDivHeight);const C=w+E;let T=0;for(let V of this._tree.getDescendants(c)){if(T>=C)break;T>=w&&h.middleTreeItems.push(V),++T}const R=u-w-E;R>0&&(h.bottomUnvisibleItemNum=R,h.bottomFreeSpaceHeight=R*this._tree.itemDivHeight)}else for(let u of this._tree.getDescendants(c))h.middleTreeItems.push(u);this._redrawEvent.emit(h)}));let l;this.dispose(()=>l&&(l.destroy(),l=void 0)),this.dispose(this.containerChanged.disposableOn(u=>{l&&(l.destroy(),l=void 0),u&&(l=Ks(),l.start(()=>{const{scrollTop:p,clientHeight:g}=u;typeof p>"u"||typeof g>"u"?Xi("createUiTreeWithContainer error: conainter has no scrollTop or clientHeight property!"):(this.containerScrollTop=p,this.containerClientHeight=g)}))}))}get container(){return this._container.value}set container(e){this._container.value=e}get containerChanged(){return this._container.changed}get redrawInfo(){return this._redrawInfo}getTreeItemPos(e){const t=o=>{const h=o.uiTreeObject;return!!o.children&&(!h||!h.collapsed)};let i=0,r=!1;for(let o of this._tree.getDescendants(t)){if(o===e){r=!0;break}++i}if(r)return[i,i*this._tree.itemDivHeight]}collapseAll(){console.log("collapseAll");for(let e of this.tree.root.getDescendants()){const t=e.uiTreeObject;t.collapsed=!0}}expandAll(){console.log("expandAll");for(let e of this.tree.root.getDescendants()){const t=e.uiTreeObject;t.collapsed=!1}}get tree(){return this._tree}get redrawEvent(){return this._redrawEvent}set containerScrollTop(e){this._containerScrollTop.value=e}get containerScrollTop(){return this._containerScrollTop.value}get containerScrollTopChanged(){return this._containerScrollTop.changed}set containerClientHeight(e){this._containerClientHeight.value=e}get containerClientHeight(){return this._containerClientHeight.value}get containerClientHeightChanged(){return this._containerClientHeight.changed}*getAllItems(e){for(let t of this._tree.getDescendants())(!e||e(t))&&(yield t)}getAllSelectedItems(){return this.getAllItems(e=>e.uiTreeObject.selected)}getAllCheckedItems(){return this.getAllItems(e=>e.uiTreeObject.checkedStatus==="checked")}getAllCheckedLeafItems(){return this.getAllItems(e=>!e.children&&e.uiTreeObject.checkedStatus==="checked")}selectAllItems(e){for(let t of this.getAllItems())(!e||!e.includes(t))&&(t.uiTreeObject.selected=!0)}clearAllSelectedItems(e){for(let t of this.getAllSelectedItems())(!e||!e.includes(t))&&(t.uiTreeObject.selected=!1)}checkAllItems(e){for(let t of this.getAllItems())(!e||!e.includes(t))&&t.uiTreeObject.check(!0)}clearAllCheckedItems(e){for(let t of this.getAllCheckedItems())(!e||!e.includes(t))&&t.uiTreeObject.check(!1)}}const ti=class ti extends b{constructor(e){super();a(this,"_root",this.disposeVar(new nn(this,!0,"_ROOT")));a(this,"_itemChildrenChanged",this.disposeVar(new m));a(this,"_itemChildrenToChange",this.disposeVar(new m));a(this,"_itemsAdded",this.disposeVar(new m));a(this,"_itemsDeleted",this.disposeVar(new m));a(this,"_itemsChanged",this.disposeVar(new m));a(this,"_transactionStack",0);a(this,"_addedItems",new Set);a(this,"_deletedItems",new Set);a(this,"_selectedItems",this.disposeVar(new Xs));a(this,"_itemDivHeight",this.disposeVar(y(ti.defaultItemDivHeight)));a(this,"_forceRedrawEvent",this.disposeVar(new m));a(this,"_uiTree",this.disposeVar(new Uh(this)));this._root._tree.value=this,this.dispose(this._itemChildrenToChange.disposableOn((t,i)=>{if(!t.children){console.error("!item.children");return}for(let r of i){const{start:o,deleteCount:h,items:c}=r;for(let l=o;l<o+h;++l){const u=t.children.get(l);this._deletedItems.has(u)?console.error(`this._deletedItems.has(currentItem(${u.id}))`):this._deletedItems.add(u)}for(let l of c)this._deletedItems.has(l)?this._deletedItems.delete(l):this._addedItems.add(l)}this._execTransaction()})),e!==void 0&&(this.itemDivHeight=e)}get selectedItems(){return this._selectedItems}get lastSelectedItem(){return this._selectedItems.length>0?this._selectedItems.get(this._selectedItems.length-1):void 0}get itemDivHeight(){return this._itemDivHeight.value}set itemDivHeight(e){this._itemDivHeight.value=e}get itemDivHeightChanged(){return this._itemDivHeight.changed}forceRedraw(){this._forceRedrawEvent.emit()}get uiTree(){return this._uiTree}get root(){return this._root}get children(){return this._root.children}getDescendants(e){return this._root.getDescendants(e)}getTreeItemFromId(e){let t;for(let i of this.getDescendants())if(i.id===e){t=i;break}return t}_startTransaction(){this._transactionStack===0&&(this._deletedItems.size>0&&(console.warn("this._deletedItems.size > 0"),this._deletedItems.clear()),this._addedItems.size>0&&(console.warn("this._addedItems.size > 0"),this._addedItems.clear())),++this._transactionStack}_stopTransaction(){--this._transactionStack,this._execTransaction()}_execTransaction(){this._transactionStack===0&&(this._deletedItems.size>0&&(this._itemsDeleted.emit([...this._deletedItems]),this._deletedItems.clear()),this._addedItems.size>0&&(this._itemsAdded.emit([...this._addedItems]),this._addedItems.clear()))}get itemChildrenChanged(){return this._itemChildrenChanged}get itemChildrenToChange(){return this._itemChildrenToChange}get itemsChanged(){return this._itemsChanged}get itemsAdded(){return this._itemsAdded}get itemsDeleted(){return this._itemsDeleted}};a(ti,"defaultItemDivHeight",24),a(ti,"canMoveToTreeItem",sn),a(ti,"moveToTreeItem",An),a(ti,"canMoveToTreeItems",Vh),a(ti,"moveToTreeItems",Lh);let bi=ti;class ce extends b{constructor(e,t,i=!0,r){super();a(this,"_obj",this.disposeVar(y(void 0)));this._resetEvent=e,this._createFunc=t;const o=this._resetEvent,h=this._createFunc,c=()=>{this._obj.value&&(this._obj.value.destroy(),this._obj.value=void 0)};this.dispose(c);const l=(...u)=>{c(),this._obj.value=h(...u)};i&&(r?this._obj.value=h(...r):this._obj.value=h()),this.dispose(o.disposableOn(l))}get obj(){return this._obj.value}get objChanged(){return this._obj.changed}}class wu extends b{constructor(e,t=!0,i){super();a(this,"_event",this.disposeVar(new m));a(this,"_objResettingWithEvent");this._createFunc=e,this._execOnInit=t,this._initParams=i,this._objResettingWithEvent=this.disposeVar(new ce(this._event,this._createFunc,this._execOnInit,this._initParams))}get obj(){return this._objResettingWithEvent.obj}get objChanged(){return this._objResettingWithEvent.objChanged}reset(...e){this._event.emit(...e)}}const vr=class vr extends b{constructor(){super();a(this,"_set",new Set);a(this,"_toChangeEvent",this.dv(new m));a(this,"_changedEvent",this.dv(new m));a(this,"main");this.dispose(()=>{this._set.size!==0&&(vr.warnOnDestroying&&console.warn("this._set.size > 0"),this.clear())})}get toChange(){return this._toChangeEvent}get changed(){return this._changedEvent}add(...e){if(e.length==2&&typeof e[1]=="boolean")e[1]&&(this.main=e[0]);else for(let t of e)this._toChangeEvent.emit([],[t]),this._set.add(t),this._changedEvent.emit([],[t])}delete(...e){for(let t of e)this.main&&this.main==t&&(this.main=void 0),this._toChangeEvent.emit([t],[]),this._set.delete(t),this._changedEvent.emit([t],[])}disposableAdd(...e){return e.length==2&&typeof e[1]=="boolean"?(e[1]&&(this.main=e[0]),this.add(e[0]),()=>this.delete(e[0])):(this.add(...e),()=>this.delete(...e))}get size(){return this._set.size}clear(){const e=[...this._set];this._toChangeEvent.emit([],e),this._set.clear(),this._changedEvent.emit([],e),this.main=void 0}values(){return this._set.values()}};a(vr,"warnOnDestroying",!0);let Nn=vr;async function Wh(n){const s=[],e=[],t=n.entries();for await(const[i,r]of t){const o=r;o.kind==="file"?s.push(i):o.kind==="directory"&&e.push(i)}return{files:s,dirs:e}}async function to(n){return await(await n.getFile()).text()}async function Bh(n){const s=await to(n);try{return JSON.parse(s)}catch{return}}async function Hh(n){return await(await n.getFile()).arrayBuffer()}class $h extends b{constructor(s){super(),this._rootDirHandle=s}get rootDirHandle(){return this._rootDirHandle}async getSubFilesAndDirs(){return await Wh(this._rootDirHandle)}async getDir(s){let e=this._rootDirHandle;for(const t of s)if(e=await(e==null?void 0:e.getDirectoryHandle(t)),!e){console.log(`getDirectoryHandle ${t} failed`);return}return e}async getFile(s,e){const t=await this.getDir(s);if(t)try{return await t.getFileHandle(e)}catch(i){console.error(`未能获取当前文件 ${s.join("/")}/${e} error: ${i}`,i);return}}}class Gh extends b{constructor(e){super();a(this,"_startRootDirId",0);a(this,"_dirMap",new Map);this._prefix=e}get prefix(){return this._prefix}async getRootDirId(e){let t;try{console.log("window.showDirectoryPicker begin"),t=await globalThis.showDirectoryPicker({id:e,mode:"read"}),console.log("window.showDirectoryPicker end",t)}catch(i){console.error(`LocalFileServer getRootDirId failed: ${i}`,i);return}if(t){const i=++this._startRootDirId,r=`${this._prefix}${i}`;return this._dirMap.set(r,new $h(t)),r}}getRootDir(e){return this._dirMap.get(e)}async getFile(e){const t=e.split("/");if(t.length<2){console.warn(`LocalFileServer getFile failed: ${e}`);return}const i=t[0],r=this._dirMap.get(i);if(!r){console.warn(`LocalFileServer getFile failed: ${e}`);return}const o=t.slice(1,t.length-1),h=t[t.length-1],c=await r.getFile(o,h);if(!c){console.warn(`LocalFileServer getFile failed: ${e}`);return}return c}async getText(e){const t=await this.getFile(e);if(t)return await to(t)}async getArrayBuffer(e){const t=await this.getFile(e);if(t)return await Hh(t)}async getJson(e){const t=await this.getFile(e);if(t)return await Bh(t)}async getLocalFilePath(e,t,i){const r=await this.getRootDirId(t);if(!r){console.warn("getRootDirId error!");return}const o=this.getRootDir(r);if(!o){console.warn("getRootDir error!");return}const h=await o.getSubFilesAndDirs();if(!h.files){console.warn("getSubFilesAndDirs error! 找不到符合要求的文件!");return}const c=e?h.files.filter(l=>e.some(u=>l.endsWith(u))):h.files;if(c.length===0){console.warn("找不到符合要求的文件!");return}return`https://${r}/${c[0]}`}}const Jh=new Gh("xe2_local");async function yu(n,s,e){return await Jh.getLocalFilePath(n,s,e)}class qh extends b{constructor(e,t){super();a(this,"_processing");this._complexImage=e,this._imageUri=t,this._processing=this.disposeVar(Ne(async i=>{const r=this._complexImage,o=await i.promise(dh(this._imageUri,this._complexImage.crossOrigin));o&&o instanceof HTMLImageElement&&(r.size=[o.naturalWidth,o.naturalHeight],r.pixelFormat="RGBA",r.copyTexture({source:o}))})),this._processing.start()}get processing(){return this._processing}}const Xh=["DEPTH_COMPONENT","DEPTH_STENCIL","ALPHA","RED","RG","RGB","RGBA","LUMINANCE","LUMINANCE_ALPHA","RGB_DXT1","RGBA_DXT1","RGBA_DXT3","RGBA_DXT5","RGB_PVRTC_4BPPV1","RGB_PVRTC_2BPPV1","RGBA_PVRTC_4BPPV1","RGBA_PVRTC_2BPPV1","RGBA_ASTC","RGB_ETC1","RGB8_ETC2","RGBA8_ETC2_EAC","RGBA_BC7"],Yh=["img","gif","video","flv","hls"];let bu=class extends b{constructor(e,t){super();a(this,"_element");this._complexImage=e,this._videoSrc=t;var i=document.createElement("video");i.src=this._videoSrc,i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.zIndex="-100",i.style.visibility="hidden",i.style.width="0px",i.style.height="0px";{const r=()=>{i.crossOrigin=this._complexImage.crossOrigin};r(),this.dispose(this._complexImage.crossOriginChanged.disposableOn(r))}{const r=()=>{i.autoplay=this._complexImage.autoplay};r(),this.dispose(this._complexImage.autoplayChanged.disposableOn(r))}{const r=()=>{i.loop=this._complexImage.loop};r(),this.dispose(this._complexImage.loopChanged.disposableOn(r))}i.muted=!0,document.body.appendChild(i),this._element=i,this.dispose(()=>document.body.removeChild(i))}get element(){return this._element}};class Kh extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_update");this._complexImage=e,this._imageUri=t,this._videoDom=this.disposeVar(new bu(this._complexImage,this._imageUri)),this._update=this.disposeVar(ss(()=>this.update())),this._update.start()}get videoDom(){return this._videoDom}get videoElement(){return this._videoDom.element}update(){if(this.videoElement.readyState<2)return;const e=this._complexImage,{videoWidth:t,videoHeight:i}=this.videoElement;e.size=[t,i],e.pixelFormat="RGBA",e.copyTexture({source:this.videoElement})}}function Eu(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var io={},Nt={},Zh;function Cu(){if(Zh)return Nt;Zh=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.loop=Nt.conditional=Nt.parse=void 0;var n=function t(i,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:o;if(Array.isArray(r))r.forEach(function(l){return t(i,l,o,h)});else if(typeof r=="function")r(i,o,h,t);else{var c=Object.keys(r)[0];Array.isArray(r[c])?(h[c]={},t(i,r[c],o,h[c])):h[c]=r[c](i,o,h,t)}return o};Nt.parse=n;var s=function(i,r){return function(o,h,c,l){r(o,h,c)&&l(o,i,h,c)}};Nt.conditional=s;var e=function(i,r){return function(o,h,c,l){for(var u=[],p=o.pos;r(o,h,c);){var g={};if(l(o,i,h,g),o.pos===p)break;p=o.pos,u.push(g)}return u}};return Nt.loop=e,Nt}var le={},Qh;function ec(){if(Qh)return le;Qh=1,Object.defineProperty(le,"__esModule",{value:!0}),le.readBits=le.readArray=le.readUnsigned=le.readString=le.peekBytes=le.readBytes=le.peekByte=le.readByte=le.buildStream=void 0;var n=function(p){return{data:p,pos:0}};le.buildStream=n;var s=function(){return function(p){return p.data[p.pos++]}};le.readByte=s;var e=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(g){return g.data[g.pos+p]}};le.peekByte=e;var t=function(p){return function(g){return g.data.subarray(g.pos,g.pos+=p)}};le.readBytes=t;var i=function(p){return function(g){return g.data.subarray(g.pos,g.pos+p)}};le.peekBytes=i;var r=function(p){return function(g){return Array.from(t(p)(g)).map(function(f){return String.fromCharCode(f)}).join("")}};le.readString=r;var o=function(p){return function(g){var f=t(2)(g);return p?(f[1]<<8)+f[0]:(f[0]<<8)+f[1]}};le.readUnsigned=o;var h=function(p,g){return function(f,w,E){for(var C=typeof g=="function"?g(f,w,E):g,T=t(p),R=new Array(C),V=0;V<C;V++)R[V]=T(f);return R}};le.readArray=h;var c=function(p,g,f){for(var w=0,E=0;E<f;E++)w+=p[g+E]&&Math.pow(2,f-E-1);return w},l=function(p){return function(g){for(var f=s()(g),w=new Array(8),E=0;E<8;E++)w[7-E]=!!(f&1<<E);return Object.keys(p).reduce(function(C,T){var R=p[T];return R.length?C[T]=c(w,R.index,R.length):C[T]=w[R.index],C},{})}};return le.readBits=l,le}var tc;function Su(){return tc||(tc=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var s=Cu(),e=ec(),t={blocks:function(g){for(var f=0,w=[],E=g.data.length,C=0,T=(0,e.readByte)()(g);T!==f&&T;T=(0,e.readByte)()(g)){if(g.pos+T>=E){var R=E-g.pos;w.push((0,e.readBytes)(R)(g)),C+=R;break}w.push((0,e.readBytes)(T)(g)),C+=T}for(var V=new Uint8Array(C),I=0,H=0;H<w.length;H++)V.set(w[H],I),I+=w[H].length;return V}},i=(0,s.conditional)({gce:[{codes:(0,e.readBytes)(2)},{byteSize:(0,e.readByte)()},{extras:(0,e.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,e.readUnsigned)(!0)},{transparentColorIndex:(0,e.readByte)()},{terminator:(0,e.readByte)()}]},function(p){var g=(0,e.peekBytes)(2)(p);return g[0]===33&&g[1]===249}),r=(0,s.conditional)({image:[{code:(0,e.readByte)()},{descriptor:[{left:(0,e.readUnsigned)(!0)},{top:(0,e.readUnsigned)(!0)},{width:(0,e.readUnsigned)(!0)},{height:(0,e.readUnsigned)(!0)},{lct:(0,e.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,s.conditional)({lct:(0,e.readArray)(3,function(p,g,f){return Math.pow(2,f.descriptor.lct.size+1)})},function(p,g,f){return f.descriptor.lct.exists}),{data:[{minCodeSize:(0,e.readByte)()},t]}]},function(p){return(0,e.peekByte)()(p)===44}),o=(0,s.conditional)({text:[{codes:(0,e.readBytes)(2)},{blockSize:(0,e.readByte)()},{preData:function(g,f,w){return(0,e.readBytes)(w.text.blockSize)(g)}},t]},function(p){var g=(0,e.peekBytes)(2)(p);return g[0]===33&&g[1]===1}),h=(0,s.conditional)({application:[{codes:(0,e.readBytes)(2)},{blockSize:(0,e.readByte)()},{id:function(g,f,w){return(0,e.readString)(w.blockSize)(g)}},t]},function(p){var g=(0,e.peekBytes)(2)(p);return g[0]===33&&g[1]===255}),c=(0,s.conditional)({comment:[{codes:(0,e.readBytes)(2)},t]},function(p){var g=(0,e.peekBytes)(2)(p);return g[0]===33&&g[1]===254}),l=[{header:[{signature:(0,e.readString)(3)},{version:(0,e.readString)(3)}]},{lsd:[{width:(0,e.readUnsigned)(!0)},{height:(0,e.readUnsigned)(!0)},{gct:(0,e.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,e.readByte)()},{pixelAspectRatio:(0,e.readByte)()}]},(0,s.conditional)({gct:(0,e.readArray)(3,function(p,g){return Math.pow(2,g.lsd.gct.size+1)})},function(p,g){return g.lsd.gct.exists}),{frames:(0,s.loop)([i,h,c,r,o],function(p){var g=(0,e.peekByte)()(p);return g===33||g===44})}],u=l;n.default=u})(io)),io}var Pu=Su();const Tu=Eu(Pu);var Iu=ec();const Ou=(n,s)=>{const e=new Array(n.length),t=n.length/s,i=function(u,p){const g=n.slice(p*s,(p+1)*s);e.splice.apply(e,[u*s,s].concat(g))},r=[0,4,2,1],o=[8,8,4,2];for(var h=0,c=0;c<4;c++)for(var l=r[c];l<t;l+=o[c])i(l,h),h++;return e},Du=(n,s,e)=>{const r=e;var o,h,c,l,u,p,g,H,f,w,I,E,q,Z,Ge,Me;const C=new Array(e),T=new Array(4096),R=new Array(4096),V=new Array(4097);for(E=n,h=1<<E,u=h+1,o=h+2,g=-1,l=E+1,c=(1<<l)-1,f=0;f<h;f++)T[f]=0,R[f]=f;var I,H,q,Z,Me,Ge;for(I=H=q=Z=Me=Ge=0,w=0;w<r;){if(Z===0){if(H<l){I+=s[Ge]<<H,H+=8,Ge++;continue}if(f=I&c,I>>=l,H-=l,f>o||f==u)break;if(f==h){l=E+1,c=(1<<l)-1,o=h+2,g=-1;continue}if(g==-1){V[Z++]=R[f],g=f,q=f;continue}for(p=f,f==o&&(V[Z++]=q,f=g);f>h;)V[Z++]=R[f],f=T[f];q=R[f]&255,V[Z++]=q,o<4096&&(T[o]=g,R[o]=q,o++,(o&c)===0&&o<4096&&(l++,c+=o)),g=p}Z--,C[Me++]=V[Z],w++}for(w=Me;w<r;w++)C[w]=0;return C},Fu=n=>{const s=new Uint8Array(n);return Re.parse(Iu.buildStream(s),Tu)},xu=n=>{const s=n.pixels.length,e=new Uint8ClampedArray(s*4);for(var t=0;t<s;t++){const i=t*4,r=n.pixels[t],o=n.colorTable[r]||[0,0,0];e[i]=o[0],e[i+1]=o[1],e[i+2]=o[2],e[i+3]=r!==n.transparentIndex?255:0}return e},ku=(n,s,e)=>{if(!n.image){console.warn("gif frame does not have associated image.");return}const{image:t}=n,i=t.descriptor.width*t.descriptor.height;var r=Du(t.data.minCodeSize,t.data.blocks,i);t.descriptor.lct.interlaced&&(r=Ou(r,t.descriptor.width));const o={pixels:r,dims:{top:n.image.descriptor.top,left:n.image.descriptor.left,width:n.image.descriptor.width,height:n.image.descriptor.height}};return t.descriptor.lct&&t.descriptor.lct.exists?o.colorTable=t.lct:o.colorTable=s,n.gce&&(o.delay=(n.gce.delay||10)*10,o.disposalType=n.gce.extras.disposal,n.gce.extras.transparentColorGiven&&(o.transparentIndex=n.gce.transparentColorIndex)),o.patch=xu(o),o},Mu=(n,s)=>n.frames.filter(e=>e.image).map(e=>ku(e,n.gct));async function ic(n){const e=await(await fetch(n)).arrayBuffer(),t=Fu(e),i=Mu(t);return{gif:t,gifFrames:i,arrayBuffer:e}}function sc(n,s,e){return n<s?s:n>e?e:n}class nc extends Rn{constructor(e,t=!0,i){super();a(this,"_gifFrames",this.disposeVar(y(void 0)));a(this,"_gifDurations",[]);a(this,"_gifDuration",this.disposeVar(y(0)));a(this,"_gifSize",this.disposeVar(y([0,0],(e,t)=>e.every((i,r)=>i===t[r]),e=>[...e])));a(this,"_autoPlayOnLoad",this.disposeVar(y(!0)));a(this,"_gifCanvas");this._container=e,this.loop=!0;const r=document.createElement("canvas");this._gifCanvas=r,r.style.width="100%",r.style.height="100%";const o=r.getContext("2d");this._container&&this._container.appendChild(r),this.dispose(()=>this._container&&this._container.removeChild(r));let h;this.dispose(this._gifFrames.changed.disposableOn(l=>{if(!l||l.length===0){r.width=0,r.height=0;return}const{width:u,height:p}=l[0].dims;this._gifSize.value=[u,p];const g=l.length;let f=0;this._gifDurations.length=0;for(let w=0;w<g;++w)f+=l[w].delay,this._gifDurations.push(f);this._gifDuration.value=this._gifDurations[this._gifDurations.length-1],r.width=u,r.height=p,h=o.createImageData(u,p),this.currentTimeChangedEvent.emit(this.currentTime,this.currentTime),this._autoPlayOnLoad.value&&(this.currentTime=0,this.playing=!0)}));let c=-1;this.dispose(this.currentTimeChangedEvent.disposableOn(l=>{const u=sc(l/this.duration,0,1),p=this.gifDuration*u,g=this._gifFrames.value;if(g&&g.length>0){const f=this._getFrame(p);if(f===c)return;c=f;const w=g[f];if(w.disposalType!==0&&w.disposalType!==1&&w.disposalType!==2&&Xi(`gif parsed get disposalType ${w.disposalType}... frame: ${f} size: ${JSON.stringify(w.dims)}`,`gif parsed get disposalType ${w.disposalType}...`),h&&(f===0||w.disposalType===2)&&h.data.fill(0),h){const[E,C]=this._gifSize.value,{width:T,height:R,left:V,top:I}=w.dims;if(R>C)throw new Error("height > canvasHeight");for(let H=0;H<R;++H)for(let q=0;q<T;++q){const Z=H*T+q,Me=I+H,Ge=V+q,jt=Me*E+Ge,pt=h.data,ui=w.patch,pi=ui[Z*4+3]/255;pt[jt*4+0]=pt[jt*4+0]*(1-pi)+ui[Z*4+0]*pi|0,pt[jt*4+1]=pt[jt*4+1]*(1-pi)+ui[Z*4+1]*pi|0,pt[jt*4+2]=pt[jt*4+2]*(1-pi)+ui[Z*4+2]*pi|0,pt[jt*4+3]=sc(pt[jt*4+3]+ui[Z*4+3],0,255)|0}o.putImageData(h,0,0)}}else Xi("gif资源未加载!无法播放!")})),this.dispose(this._gifDuration.changed.disposableOn(()=>{this.duration=this.gifDuration})),this._autoPlayOnLoad.value=t,this._gifFrames.value=i}get gifCanvas(){return this._gifCanvas}set gifFrames(e){this._gifFrames.value=e}get gifFrames(){return this._gifFrames.value}get gifFramesChanged(){return this._gifFrames.changed}get gifSize(){return this._gifSize.value}get gifSizeChanged(){return this._gifSize.changed}get gifDuration(){return this._gifDuration.value}get gifDurationChanged(){return this._gifDuration.changed}get autoPlayOnLoad(){return this._autoPlayOnLoad.value}set autoPlayOnLoad(e){this._autoPlayOnLoad.value=e}get autoPlayOnLoadChanged(){return this._autoPlayOnLoad.changed}_getFrame(e){const t=this._gifDurations.length;for(let i=0;i<t;++i)if(e<=this._gifDurations[i])return i;throw new Error("should not be here")}}class rc extends b{constructor(e){super();a(this,"_player");a(this,"_url",this.disposeVar(y("")));a(this,"_loadGifFramesProcessing",this.disposeVar(jn(e=>is(ic(e)))));this._player=this.disposeVar(new nc(e)),this._player.autoPlayOnLoad=!0,this._loadGifFramesProcessing.completeFunc=({gifFrames:t})=>this._player.gifFrames=t,this.dispose(this._url.changed.disposableOn(t=>{this._player.gifFrames=void 0,this._loadGifFramesProcessing.restart(new et(`reload gif(${t})`),t)}))}get player(){return this._player}set url(e){this._url.value=e}get url(){return this._url.value}get loadedEvent(){return this._loadGifFramesProcessing.completeEvent}get size(){return this._player.gifSize}get sizeChanged(){return this._player.gifSizeChanged}get duration(){return this._player.gifDuration}get durationChanged(){return this._player.gifDurationChanged}}class oc extends b{constructor(e,t){super();a(this,"_gif",this.disposeVar(new rc));a(this,"_update");this._complexImage=e,this._imageUri=t,this._gif.url=this._imageUri,this._update=this.disposeVar(ss(()=>this.update())),this._update.start()}get gif(){return this._gif}update(){const{player:e}=this._gif;if(!e.gifFrames)return;const t=this._complexImage,{width:i,height:r}=e.gifCanvas;t.size=[i,r],t.pixelFormat="RGBA",t.copyTexture({source:e.gifCanvas});{const o=()=>{e.autoPlayOnLoad=this._complexImage.autoplay};o(),this.dispose(this._complexImage.autoplayChanged.disposableOn(o))}{const o=()=>{e.loop=this._complexImage.loop};o(),this.dispose(this._complexImage.loopChanged.disposableOn(o))}}}function ac(n,s){const[e,t,i]=Ws(n),r=y(void 0),o=()=>{const h=e()??s;r.value=h&&k.context.getStrFromEnv(h)};return o(),i&&r.d(i.don(o)),r.d(k.context.environmentVariablesChanged.don(o)),r}function hc(n){const s=/\${(.*?)\}/g;if(!s.test(n))return n;const e=n.replace(s,(t,i)=>{const r=k.context.getEnv(i);return r===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):r});return hc(e)}class ju extends b{constructor(e){super();a(this,"_sceneObjRefs",new Map);a(this,"_refs",{});a(this,"_refsChanged",this.dv(new m));const t=(i,r,o)=>{if(o){const h=this.getLastSceneObject(o),c=this._sceneObjRefs.get(o);if(!c)console.warn(`this._sceneObjRefs中不存在ref(${o}), 可能系统存在逻辑问题`);else{const u=c.indexOf(i);u===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(c.splice(u,1),c.length===0&&this._sceneObjRefs.delete(o))}const l=this.getLastSceneObject(o);this._refs[o]=l,this._refsChanged.emit(l,h)}if(r){const h=this.getLastSceneObject(r),c=this._sceneObjRefs.get(r);c?(c.push(i),c.length>0&&console.warn(`同时存在多个ref${r}相同的场景对象!
22
+ ${c.map(u=>`${u.id} ${u.typeName}
23
+ `).join(" ")}`)):this._sceneObjRefs.set(r,[i]);const l=this.getLastSceneObject(r);this._refs[r]=l,this._refsChanged.emit(l,h)}};this.d(e.sceneObjCreatedEvent.don(i=>{const r=(o,h)=>t(i,o,h);i.ref&&r(i.ref,void 0),i.refChanged.don(r)})),this.d(e.sceneObjToDestroyEvent.don(i=>{i.ref&&t(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(e){const t=this.getSceneObjects(e);if(t)return t[t.length-1]}getSceneObjects(e){const t=this._sceneObjRefs.get(e);if(!(!t||t.length===0))return t}}class Ru extends b{constructor(){super();a(this,"_esObjConstructors",new Map);a(this,"_sceneObjs",new Map);a(this,"_sceneObjCreatedEvent",new m);a(this,"_sceneObjToDestroyEvent",new m);a(this,"_refsManager",this.dv(new ju(this)));a(this,"_environmentVariables",globalThis.ESSDK_ENV||{});a(this,"_environmentVariablesChanged",this.dv(new m))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(e,t,i){return this._esObjConstructors.has(e)&&console.warn(`register warn: ${e} has registered ! will be override!`),this._esObjConstructors.set(e,t),i&&gt(t,"__sceneObjExtraInfo",i),e}_addSceneObject(e){this._sceneObjs.set(e.id,e),this._sceneObjCreatedEvent.emit(e),e.d(()=>this._deleteSceneObject(e))}addSceneObject(e){this._addSceneObject(e)}_deleteSceneObject(e){this._sceneObjToDestroyEvent.emit(e),this._sceneObjs.delete(e.id)}deleteSceneObject(e){this._deleteSceneObject(e)}createSceneObjectFromClass(e,t){if(!t||this._sceneObjs.has(t)){const r=Ki();t&&console.warn(`已存在相同id的对象!id自动变更!${t} -> ${r} 请注意:id变更可能导致引用失效!`),t=r}if(!t)throw new Error("id不能为空!");const i=new e(t);return i.id!==t&&(console.warn(`sceneObj.id(${i.id}) !== id(${t}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(e,t){if(typeof e=="string"){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`Cannot find SceneObjectType: ${e}`);return}return this.createSceneObjectFromClass(i,t)}else return this.createSceneObjectFromClass(e,t)}createSceneObjectFromUrl(e,t){let i;const r=e.toLowerCase();if(r.includes(".gltf")||r.includes(".glb")?i="ESGltfModel":r.includes("tileset.json")?i="ES3DTileset":r.includes("layer.json")||r.includes("ion://1")?i="ESTerrainLayer":r.includes(".jpg")||r.includes(".png")||r.includes(".jpeg")||r.includes(".webp")||r.includes("image/jpg")||r.includes("image/png")||r.includes("image/jpeg")||r.includes("image/webp")?i="ESImageLabel":(r.includes("/tilemapresource.xml")||r.includes("ion://")||r.includes("wms")||r.includes("wmts")||r.includes("{x}")||r.includes("{y}")||r.includes("{z}"))&&(i="ESImageryLayer"),!!i)return this.createSceneObjectFromJson({type:i,id:t,url:e})}createSceneObjectFromJson(e){const t=this.createSceneObject(e.type,e.id);return t&&(t.json=e),t}destroySceneObject(e){return this._deleteSceneObject(e),e.destroy(),e.isDestroyed()}getSceneObjectById(e){return this._sceneObjs.get(e)}getSceneObject(e){if(!e&&e!="")return Array.from(this._sceneObjs.values());if(typeof e=="function"){const t=[];for(const i of this._sceneObjs.values())i instanceof e&&t.push(i);return t}if(e.startsWith("ES")){const t=[];for(const i of this._sceneObjs.values())i.typeName===e&&t.push(i);return t}return this._sceneObjs.get(e)}_getSceneObjConstructor(e){const t=this._esObjConstructors.get(e);if(t)return t}getProps(e){const t=this._getSceneObjConstructor(e);if(!t){console.warn(`cannot get constructor from type: ${e}`);return}return Ae(t,"__sceneObjExtraInfo")}setProps(e,t){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`cannot get constructor from type: ${e}`);return}let r=Ae(i,"__sceneObjExtraInfo");r||(r={},gt(i,"__sceneObjExtraInfo",r)),Object.assign(r,t)}getProp(e,t){const i=this.getProps(e);return i&&i[t]}setProp(e,t,i){this.setProps(e,{[t]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(e){for(let[t,i]of Object.entries(e))this.setEnv(t,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(e,t){if(this._environmentVariables[e]!==t){const i=this._environmentVariables[e];this._environmentVariables[e]=t,this._environmentVariablesChanged.emit(e,t,i)}globalThis.ESSDK_ENV={...this._environmentVariables}}getEnv(e){return this._environmentVariables[e]}getStrFromEnv(e){return hc(e)}createEnvStrReact(e,t){return ac(e,t)}createEvnStrReact(e,t){return ac(e,t)}}const B=class B extends b{constructor(e){super();a(this,"_components",this.dv(new Nn));a(this,"_viewerAttached",this.dv(new m));a(this,"_viewerDetached",this.dv(new m));a(this,"_attachedViewers",(()=>{const e=new Set;return this.d(this._viewerAttached.don(t=>{t.actived&&(this.activeViewer=t),t.ad(t.activedChanged.don(i=>{i&&e.has(t)&&(this.activeViewer=t)})),e.add(t)})),this.d(this._viewerDetached.don(t=>{e.delete(t),this.activeViewer==t&&(this.activeViewer=void 0)})),e})());a(this,"_activeViewer",this.dv(y(void 0)));a(this,"_reloadEvent",this.dv(new m));a(this,"_readyEvent",this.dv(new m));a(this,"_createdEvent",this.dv(new m));a(this,"_flushEvent",this.dv(new m));a(this,"_id");a(this,"_updateFuncReact",this.dv(y(void 0)));a(this,"_toDestroyFuncReact",this.dv(y(void 0)));a(this,"_parentID");e!==void 0&&(typeof e!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof e},值为${e}`):e.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):e.trim()!==e&&console.warn(`id前后有空字符串!id: ${e}`)),this._id=e??Ki(),this._initName();{const t=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};t(),this.d(this.execOnceFuncStrChanged.don(t))}{const t=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(r){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${r}`)}};t(),this.d(this.updateFuncStrChanged.don(t));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||Ks(),i.restart(void 0,r=>{this.updateFunc&&this.updateFunc(this,r)}))}))}{const t=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};t(),this.d(this.toDestroyFuncStrChanged.don(t)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static getParentClass(){return Object.getPrototypeOf(this)}static register(e,t,i){Yt(t.prototype,t.createDefaultProps);const r=t.createDefaultProps();t.defaults&&(t.defaults={});for(const o of Object.keys(r))t.defaults[o]=r[o]instanceof fe?r[o].value:r[o];return this.innerRegister(e,t,i),e}static get envs(){return B.context.environmentVariables}static get $refs(){return B.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}removefromViewer(e){this.attachedViewers.has(e)&&e.delete(this)}get reloadEvent(){return this._reloadEvent}reload(){this._reloadEvent.emit()}get readyEvent(){return this._readyEvent}addToViewer(e){this.attachedViewers.has(e)||e.add(this)}registerAttachedObject(e){const t=new Map;this.d(()=>{t.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const r=e(i);r&&t.set(i,r)})),this.d(this._viewerDetached.don(i=>{if(!t.has(i))return;const r=t.get(i);r&&(r.destroy(),t.delete(i))}))}createAttachedObject(e){const t=new Map,i=(()=>{for(let[c,l]of t.entries())l.destroy();t.clear()}),r=c=>{const l=e(c);l&&t.set(c,l)};for(let c of this.attachedViewers)r(c);const o=this._viewerAttached.don(r),h=this._viewerDetached.don(c=>{if(!t.has(c))return;const l=t.get(c);l&&(l.destroy(),t.delete(c))});return()=>{h(),o(),i()}}registerAttachedObjectForContainer(e){this.registerAttachedObject(t=>new Au(t,e))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}get typeName(){return this.constructor.type}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return this.constructor.createDefaultProps()}_innerGetJson(e=!0){const t={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let r,o=this.defaultProps[i];o instanceof fe?r=o.equals(this[i]):r=o===this[i],r||(t[i]=this[i])}else t[i]=this[i];return t}_innerSetJson(e,t,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const r=t||[];r.push("id","type");const o=Object.keys(this.defaultProps).filter(h=>!r.includes(h));for(let h of o)if(h in e)this[h]=e[h]===null?void 0:e[h];else if(!(i??!1)){let c=this.defaultProps[h];c instanceof fe&&(c=c.value),this[h]=c}}get completeJson(){return this._innerGetJson(!1)}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(e){this._innerSetJson(JSON.parse(e))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID??this.id}set parentID(e){this._parentID=e}getESProperties(){return{defaultMenu:"general",basic:[],general:[new A([this,"typeName"],"类型",void 0,!1,!0),new A([this,"id"],"id",void 0,!1,!0),new A([this,"name"],"名称"),new ro("JSON",()=>this._jsonStr,e=>e&&(this._jsonStr=e))],dataSource:[],location:[],coordinate:[],style:[],more:[new A([this,"ref"],"ref",void 0,!0),new z([this,"extras"],"extras",{},void 0,!0)]}}};a(B,"context",new Ru),a(B,"innerRegister",B.context.register.bind(B.context)),a(B,"defaults",{}),a(B,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:W(void 0),devTags:ee(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})),a(B,"type",B.register("ESSceneObject",B,{chsName:"场景类",tags:["ESObjects"],description:""})),a(B,"create",B.context.createSceneObject.bind(B.context)),a(B,"createFromUrl",B.context.createSceneObjectFromUrl.bind(B.context)),a(B,"createFromClass",B.context.createSceneObjectFromClass.bind(B.context)),a(B,"createFromJson",B.context.createSceneObjectFromJson.bind(B.context)),a(B,"destroySceneObject",B.context.destroySceneObject.bind(B.context)),a(B,"getSceneObjById",B.context.getSceneObjectById.bind(B.context)),a(B,"getSceneObj",B.context.getSceneObject.bind(B.context)),a(B,"getEnv",B.context.getEnv.bind(B.context)),a(B,"setEnv",B.context.setEnv.bind(B.context)),a(B,"getStrFromEnv",B.context.getStrFromEnv.bind(B.context)),a(B,"getSceneObjectById",B.context.getSceneObjectById.bind(B.context)),a(B,"getSceneObject",B.context.getSceneObject.bind(B.context));let k=B;class Au extends b{constructor(s,e){super(),this.dv(new ce(s.subContainerChanged,()=>{if(s.subContainer)return e(s,s.subContainer)}))}}const _r=class _r extends b{constructor(e,t,i){super();a(this,"_id",++_r._accumId);this._name=e,this._description=t,this._callFunction=i}get id(){return this._id}get name(){return this._name}get description(){return this._description}get callFunction(){return this._callFunction}};a(_r,"_accumId",-1);let Qt=_r;class so extends Qt{constructor(s,e,t,i,r,o){super(s,e,o??(()=>{})),this._withUndefined=t,this._readonly=i,this._defaultValue=r}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class Ie extends so{constructor(e,t,i,r,o,h,c){var u;const l=e instanceof fe?"未获取到属性名":e[1].toString();super(t??l,h??l,r??!1,o??!1,i,c);a(this,"_propName");a(this,"_typeName");this._reactVar=e,this._propName=l;try{this._typeName=e instanceof fe?"未获取到对象类型":(u=e[0])==null?void 0:u.typeName}catch{this._typeName="未获取到对象类型"}}get reactVar(){return this._reactVar}get propName(){return this._propName}get typeName(){return this._typeName}}class S extends Ie{get type(){return"BooleanProperty"}}class A extends Ie{get type(){return"StringProperty"}}class v extends Ie{get type(){return"NumberProperty"}}class pe extends Ie{get type(){return"Number2Property"}}class ve extends Ie{get type(){return"Number3Property"}}class Je extends Ie{get type(){return"Number4Property"}}class G extends Je{get type(){return"ColorProperty"}}class cc extends v{get type(){return"DashPatternProperty"}}class vt extends Ie{get type(){return"DateProperty"}}class no extends Ie{get type(){return"DatesProperty"}}class L extends Qt{constructor(e,t,i){super(e??"",i??"");a(this,"_placement");this._placement=t}get type(){return"DivideProperty"}get placement(){return this._placement}}class j extends Ie{constructor(s,e,t,i,r,o,h){super(s,t,i,r,o,h),this._enums=e}get type(){return"EnumProperty"}get enums(){return this._enums}}class Vt extends Ie{constructor(s,e,t,i,r,o,h){super(s,e,t,r,o,h),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class Vn extends Ie{constructor(s,e,t,i,r,o,h){super(s,e,t,r,o,h),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class N extends Qt{constructor(e,t,i,r){const o=e??"Unnamed Function";super(o,r??o);a(this,"_paramsLength");this._func=t,this._defaultParams=i,this._paramsLength=this._func.length??0}get paramsLength(){return this._paramsLength}get defaultParams(){return this._defaultParams}get isOpen(){return this._defaultParams.length!==this._paramsLength}get func(){return this._func}run(...e){this._func(...e)}get type(){return"MethodProperty"}}class ge extends Ie{constructor(s,e,t,i,r,o,h,c){super(s,i,r,o,h,c),this._step=e,this._minMax=t}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}class _t extends ve{get type(){return"PositionProperty"}}class rn extends ve{get type(){return"RotationProperty"}}function Nu(n,s){const[e,t,i]=Ws(n),[r,o,h]=Ws(s),c=y((e()??0)/(r()??3e3)),l=()=>{const u=c.value,p=r()??3e3,g=e()??0;if(!Number.isFinite(p)||!Number.isFinite(g)){console.warn(`duration || currentTime error: duration: ${p} currentTime: ${g}`);return}Math.abs(u*p-g)<.001||(p<=0?c.value=0:c.value=g/p)};return c.dispose(i.disposableOn(l)),c.dispose(h.disposableOn(l)),c.dispose(c.changed.disposableOn(()=>{const u=c.value,p=r()??3e3,g=e()??0;if(!Number.isFinite(p)||!Number.isFinite(g)){console.warn(`duration || currentTime error: duration: ${p} currentTime: ${g}`);return}Math.abs(u*p-g)<.001||t(u*p)})),c}class Ln extends Qt{constructor(e,t,i,r,o,h){super(r??"播放器",h??"播放器");a(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=e,this._ratioReact=t,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.ratio=o.ratio??this._defaults.ratio,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"PlayerProperty"}get playingReact(){return this._playingReact}get ratioReact(){return this._ratioReact}get loopReact(){return this._loopReact}get defaults(){return this._defaults}}a(Ln,"createPlayingRatio",Nu);class lc extends Qt{constructor(e,t,i,r,o,h){const c=r??"视角播放器";super(c,h??c);a(this,"_defaults",{playing:!1,loop:!1});this._playingReact=e,this._stopFn=t,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"ViewPlayerProperty"}get playingReact(){return this._playingReact}get loopReact(){return this._loopReact}get stopFn(){return this._stopFn}get defaults(){return this._defaults}}class re extends Ie{constructor(s,e,t,i,r,o,h){super(s,e,t,r,o,h),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonArrayProperty"}}class z extends Ie{constructor(s,e,t,i,r,o,h){super(s,e,t,r,o,h),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class ro extends so{constructor(s,e,t,i,r,o){super(s,o??s,i??!1,r??!1),this._getFunc=e,this._setFunc=t}get getFunc(){return this._getFunc}get setFunc(){return this._setFunc}get type(){return"GetSetProperty"}}var D=(n=>(n.Place="place",n.BrushErase="brushErase",n.Translation="translation",n.Rotation="rotation",n.Scale="scale",n.DoublePointsAppend="doublePointsAppend",n.DoublePointsModify="doublePointsModify",n.CircularAppend="circularAppend",n.CircularInsert="circularInsert",n.LineStringAppend="lineStringAppend",n.LineStringInsert="lineStringInsert",n.ScatterAppend="scatterAppend",n.ScatterModify="scatterModify",n.VisibilityAppend="visibilityAppend",n.VisibilityModify="visibilityModify",n.HeightModify="heightModify",n.SinglePoint="singlePoint",n.DoublePoints="doublePoints",n))(D||{});const oo=[["地形","TERRAIN"],["3D Tiles","CESIUM_3D_TILE"],["地形和3D Tiles","BOTH"]],ao=[["直箭头","straightArrow"],["燕尾箭头","swallowTailArrow"]];var dc=(n=>(n.DECIMAL_DEGREE="DECIMAL_DEGREE",n.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",n.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",n))(dc||{});class Vu{constructor(s){this.childPickedInfo=s}}class Lu{constructor(s,e,t,i,r,o){this.pickResult=s,this.sceneObject=e,this.tilesetPickInfo=t,this.geojsonPickInfo=i,this.attachedInfo=r,this.screenPosition=o}assign(s){s!=null&&s.pickedResult&&(this.pickResult=s.pickedResult),s!=null&&s.sceneObject&&(this.sceneObject=s.sceneObject),s!=null&&s.tilesetPickInfo&&(this.tilesetPickInfo=s.tilesetPickInfo),s!=null&&s.geojsonPickInfo&&(this.geojsonPickInfo=s.geojsonPickInfo),s!=null&&s.attachedInfo&&(this.attachedInfo=s.attachedInfo),s!=null&&s.screenPosition&&(this.screenPosition=s.screenPosition)}}const he=class he extends k{constructor(e){super(e);a(this,"_editing",this.dv(y(!1)));a(this,"editingID");a(this,"editingBindMode","singlePoint");a(this,"_deprecated",[]);a(this,"_flyInEvent",this.dv(new m));a(this,"_flyToEvent",this.dv(new m));a(this,"_flyOverEvent",this.disposeVar(new m));a(this,"_pickedEvent",this.dv(new m));a(this,"_calcFlyToParamEvent",this.dv(new m));a(this,"_calcFlyInParamEvent",this.dv(new m));a(this,"useCalcFlyToParamInESObjectWithLocation",!1);mc(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(e){this._editing.value=e}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const e=this._deprecated;for(let t=0;t<e.length;t++){const i=e[t];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(r=>{Reflect.has(this,r+"Changed")&&this.d(this[r+"Changed"].don(h=>{const c=i[r];typeof c=="string"?console.warn(`注意:${this.typeName} 的 ${r} 属性下版本将会被移除!`):Object.keys(c).forEach((l=>{h===l&&console.warn(`注意:${this.typeName} 的 ${r} 属性值 ${l} 下版本将会被移除,推荐使用属性值 ${c[l]}`)}))}))})}}get flyInEvent(){return this._flyInEvent}flyIn(e=1){this._flyInEvent.emit(e,he._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(e=1){this._flyToEvent.emit(e,he._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(e){return await e.getBoundSphere(this.id)}getESProperties(){const e={...super.getESProperties()};return{...e,general:[...e.general,new S([this,"show"],"是否显示",he.defaults.show),new S([this,"collision"],"开启碰撞",he.defaults.collision),new S([this,"allowPicking"],"允许拾取",he.defaults.allowPicking),new N("保存观察视角",()=>this.calcFlyToParam(),[]),new N("清空飞向参数",()=>this.emptyFlyToParam(),[]),new N("保存飞入参数",()=>this.calcFlyInParam(),[]),new N("清空飞入参数",()=>this.emptyFlyInParam(),[])],more:[...e.more,new L("飞行定位"),new N("飞向",t=>this.flyTo(t),[1],"flyTo"),new z([this,"flyToParam"],"飞行参数",void 0,void 0,!0),new v([this,"flyToDistance"],"flyToDistance",void 0,!0),new v([this,"flyToHeading"],"flyToHeading",void 0,!0),new v([this,"flyToPitch"],"flyToPitch",void 0,!0),new v([this,"flyToFlyDuration"],"flyToFlyDuration",void 0,!0),new v([this,"flyToHDelta"],"flyToHDelta",void 0,!0),new v([this,"flyToPDelta"],"flyToPDelta",void 0,!0),new L("飞入参数"),new N("飞入",t=>this.flyIn(t),[1],"flyIn"),new z([this,"flyInParam"],"飞入参数",void 0,void 0,!0)]}}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(e){this.flyToParam=e!==void 0?{...this.flyToParam??he.defaultFlyToParam,distance:e}:void 0}set flyToHeading(e){this.flyToParam=e!==void 0?{...this.flyToParam??he.defaultFlyToParam,heading:e}:void 0}set flyToPitch(e){this.flyToParam=e!==void 0?{...this.flyToParam??he.defaultFlyToParam,pitch:e}:void 0}set flyToFlyDuration(e){this.flyToParam=e!==void 0?{...this.flyToParam??he.defaultFlyToParam,flyDuration:e}:void 0}set flyToHDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??he.defaultFlyToParam,hDelta:e}:void 0}set flyToPDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??he.defaultFlyToParam,pDelta:e}:void 0}};a(he,"createDefaultProps",()=>({...k.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:te(void 0),flyInParam:te(void 0)})),a(he,"type",he.register("ESVisualObject",he,{chsName:"可视化对象",tags:["ESObjects"],description:"可视化对象"})),a(he,"supportEditingModes",[]),a(he,"defaultFlyToParam",{distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0}),a(he,"defaultFlyInParam",{position:[0,0,0],rotation:[0,0,0],flyDuration:1}),a(he,"_lastFlyInId",0),a(he,"_lastFlyToId",0);let Y=he;class uc extends b{constructor(){super();a(this,"_data",this.dv(y(void 0)))}set data(e){this._data.value=e}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class pc extends b{constructor(){super(...arguments);a(this,"_dragStartEvent",this.dv(new m));a(this,"_dragOverEvent",this.dv(new m));a(this,"_dragLeaveEvent",this.dv(new m));a(this,"_dropEvent",this.dv(new m))}dragStart(e){this._dragStartEvent.emit(e)}dragOver(e){this._dragOverEvent.emit(e)}dragLeave(e){this._dragLeaveEvent.emit(e)}drop(e){this._dropEvent.emit(e)}}function zu(n,s){s&&(Reflect.has(s,"editing")?s.editing=!0:Reflect.has(s,"positionEditing")&&(s.positionEditing=!0))}function Uu(n){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(n.typeName)||(Reflect.has(n,"editing")?n.editing=!0:Reflect.has(n,"positionEditing")&&(n.positionEditing=!0)),typeof n.execOnCreating=="function"&&n.execOnCreating()}function zn(n,s){Ae(n,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),gt(n,"__treeItem",s)}function Wu(n){return Ae(n,"__treeItem")}function Bu(n){if(!(n.startsWith("./")||n.startsWith("../")||n.startsWith("/")))return n;const s=document.createElement("a");s.href=n;const e=s.href;return s.remove(),e}function ho(n){if(typeof n!="string")return!1;try{const s=JSON.parse(n);return typeof s=="object"&&s!==null}catch{return!1}}function Hu(n){try{return new DOMParser().parseFromString(n,"application/xml").getElementsByTagName("parsererror").length===0}catch{return!1}}function $u(n){return n instanceof Function?n():n}function gc(n,s){for(let e of n)if(s.includes(e))return!0;return!1}function on(n,s){const e=n,t=s;return e===void 0||e.length===0||t===void 0||t.length===0?!0:gc(e,t)}function Gu(n){const s=setTimeout(()=>{n(),clearTimeout(s)})}function ns(n){let s=n%360;return s=s<0?360+s:s,s}function fc(n){return ns(n+180)-180}function Un(n,s,e){let t=ns(n),i=ns(s);Math.abs(t-i)>180&&(t<i?t+=360:i+=360);const r=t*(1-e)+i*e;return fc(r)}function co(n,s,e,t){return t=t||[0,0,0],t[0]=Un(n[0],s[0],e),t[1]=Un(n[1],s[1],e),t[2]=Un(n[2],s[2],e),t}function mc(n,s,e="editing"){const t=new b;n.ad(t);const i=s.bind(n);return t.ad(new ce(n.activeViewerChanged,()=>{const r=new b;let o=n.activeViewer;return o?(r.ad(n[`${e}Changed`].don(()=>{var h;n[`${e}`]?i():(h=(n.components.main??n).editingID)!=null&&h.includes("inner")&&n.activeViewer&&n.activeViewer.stopEditing()})),r.ad(o.editingEvent.don(h=>{if(h.objectIDs.includes(n.id)&&h.type==="end"){const c=n.components.main??n;c.editingID&&(h.editingID.includes(c.editingID)?(c.editingID=void 0,n[e]=!1):n[e]=!c.editingID.includes("outer"))}}))):r.ad(n[`${e}Changed`].don(()=>{n[`${e}`]=!1})),r})),n[`${e}`]&&i(),t}function vc(n){var e;const s=Array.isArray(n)?"feature":((e=n.type)==null?void 0:e.toLowerCase())??"";switch(s){case"geometrycollection":return Ju(n);case"topology":const t=n.objects,i=[];for(const r in t){const o=Jl.feature(n,t[r]);i.push(...o.features)}return{type:"FeatureCollection",features:i};case"feature":return{type:"FeatureCollection",features:Array.isArray(n)?n:[n]};case"featurecollection":return n;default:return console.warn(`GeoJson数据转换可能有误,数据类型${s}`),{type:"FeatureCollection",features:Array.isArray(n.features)?n.features:[]}}}function Ju(n,s){const e=[],t=n.geometries||[];function i(r,o={}){!r||!r.type||(r.type==="GeometryCollection"&&Array.isArray(r.geometries)?r.geometries.forEach(h=>i(h,o)):e.push({type:"Feature",geometry:r,properties:{...r.properties||{},...o}}))}return t.forEach(r=>i(r,{})),{type:"FeatureCollection",features:e}}function qu(n){const s=n.cloneNode(!0);s.style.position="fixed",s.style.visibility="hidden",s.style.pointerEvents="none",s.style.top="0",s.style.left="0",s.style.display="inline-block",document.body.appendChild(s);const e=s.getBoundingClientRect();return document.body.removeChild(s),{x:e.x,y:e.y,width:e.width,height:e.height}}function Xu(n,s,e=!1){var p,g,f,w,E,C;const t=[],i=[],r=[],o=[],h=[],c=new Set,l=new Map;if(s!=null&&s.features)for(const T of s.features){const R=((p=T.id)==null?void 0:p.toString())||((f=(g=T.properties)==null?void 0:g.id)==null?void 0:f.toString());R&&(c.add(R),l.set(R,T))}if(n!=null&&n.features)for(const T of n.features){const R=((w=T.id)==null?void 0:w.toString())||((C=(E=T.properties)==null?void 0:E.id)==null?void 0:C.toString());if(R)if(c.has(R)){if(e){const V=l.get(R);V&&_c(V,T)?o.push(R):h.push(R)}t.push(R)}else i.push(R)}for(const T of c)t.includes(T)||r.push(T);const u={unchangedIds:t,newIds:i,removedIds:r};return e&&(u.contentUnchangedIds=o,u.contentUpdatedIds=h),u}function _c(n,s){return wc(n.geometry,s.geometry)?JSON.stringify(n.properties)===JSON.stringify(s.properties):!1}function wc(n,s){if(n===s)return!0;if(!n||!s||n.type!==s.type)return!1;const e=n.coordinates,t=s.coordinates;if(n.type==="Point")return Yu(e,t);if(n.type==="LineString"||n.type==="MultiPoint")return Wn(e,t);if(n.type==="Polygon"){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Wn(e[i],t[i]))return!1;return!0}if(n.type==="MultiLineString"){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Wn(e[i],t[i]))return!1;return!0}if(n.type==="MultiPolygon"){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++){const r=e[i],o=t[i];if(r.length!==o.length)return!1;for(let h=0;h<r.length;h++)if(!Wn(r[h],o[h]))return!1}return!0}return JSON.stringify(n)===JSON.stringify(s)}function Yu(n,s){if(!n||!s)return n===s;if(n.length!==s.length)return!1;for(let e=0;e<n.length;e++)if(Math.abs(n[e]-s[e])>1e-10)return!1;return!0}function Wn(n,s){if(n===s)return!0;if(!n||!s||n.length!==s.length)return!1;for(let e=0;e<n.length;e++){const t=n[e],i=s[e];if(t.length!==i.length)return!1;for(let r=0;r<t.length;r++)if(Math.abs(t[r]-i[r])>1e-10)return!1}return!0}class lo extends b{constructor(e){super();a(this,"_sceneObject",this.dv(y(void 0)));this._id=e,this.d(()=>{this._sceneObject.value=void 0});const t=k.getSceneObjById(this._id);t&&(this._sceneObject.value=t),this.d(k.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(k.context.sceneObjToDestroyEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=void 0)}))}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}get id(){return this._id}}class Ku extends b{constructor(e,t){super();a(this,"_sofi");this._id=e,this._sofi=this.dv(new lo(this._id));{const i=()=>{t.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class yc extends b{constructor(){super();a(this,"_id",this.dv(y(void 0)));a(this,"_sceneObject",this.dv(y(void 0)));a(this,"_resetting",this.dv(new ce(this.idChanged,()=>{const{id:e}=this;if(e===void 0||e===""){this.sceneObject=void 0;return}return new Ku(e,this)})))}get id(){return this._id.value}get idChanged(){return this._id.changed}set id(e){this._id.value=e}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}set sceneObject(e){this._sceneObject.value=e}get resetting(){return this._resetting}}class Zu extends b{constructor(e,t,i,r){super();a(this,"_sceneObjectId",this.dv(new yc));this._id=e,this._startTimeStamp=t,this._duration=i,this._parent=r,this._sceneObjectId.id=this._id;const o=()=>{if(!this.player)return;const{currentTime:h=0}=this._parent,c=h-this._startTimeStamp;this.player.currentTime=kn(c,0,this._duration)*(this.player.speed??1)};o(),this.d(this._parent.currentTimeChanged.don(o)),this.d(this.playerChanged.don(o))}get player(){return this._sceneObjectId.sceneObject instanceof tt?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const Qu=`
24
24
  用来配置子播放器,它是一个数组形式,数组的每个元素仍然是一个数组,形式是[子播放器的ID, 起始时间, 持续时间]。
25
25
  注意时间的单位是毫秒。
26
26
  示例如下:
@@ -38,14 +38,10 @@ ${l.map(c=>`${c.id} ${c.typeName}
38
38
  ]
39
39
  ]
40
40
  \`\`\`
41
- `,pn=class pn extends U{constructor(){super();h(this,"_ratio",this.dv(z(0)));h(this,"_subPlayers",this.dv(new Jl));const t=this.dv(new dc);{const o=()=>{t.loop=this.loop??pn.defaults.loop};o(),this.d(this.loopChanged.don(o))}{const o=()=>{(this.loop??pn.defaults.loop)!==t.loop&&(this.loop=t.loop)};o(),this.d(t.loopChangedEvent.don(o))}{const o=()=>{t.currentTime=this.currentTime??pn.defaults.currentTime};o(),this.d(this.currentTimeChanged.don(o))}{const o=()=>{(this.currentTime??pn.defaults.currentTime)!==t.currentTime&&(this.currentTime=t.currentTime)};o(),this.d(t.currentTimeChangedEvent.don(o))}{const o=()=>{t.duration=this.duration??pn.defaults.duration};o(),this.d(this.durationChanged.don(o))}{const o=()=>{(this.duration??pn.defaults.duration)!==t.duration&&(this.duration=t.duration)};o(),this.d(t.durationChangedEvent.don(o))}{const o=()=>{t.speed=this.speed??pn.defaults.speed};o(),this.d(this.speedChanged.don(o))}{const o=()=>{(this.speed??pn.defaults.speed)!==t.speed&&(this.speed=t.speed)};o(),this.d(t.speedChangedEvent.don(o))}{const o=()=>{t.playing=this.playing??pn.defaults.playing};o(),this.d(this.playingChanged.don(o))}{const o=()=>{(this.playing??pn.defaults.playing)!==t.playing&&(this.playing=t.playing)};o(),this.d(t.playingChangedEvent.don(o))}const n=()=>{const o=this.duration??pn.defaults.duration;o>0&&(this._ratio.value=(this.currentTime??pn.defaults.currentTime)/o)};n();const i=this.dv(Se(this.currentTimeChanged,this.durationChanged));this.d(i.don(n)),this.d(()=>{const{length:o}=this._subPlayers;for(let a=0;a<o;++a)this._subPlayers.get(a).destroy();this._subPlayers.length=0});const s=()=>{for(let a of this._subPlayers)a.destroy();if(this._subPlayers.length=0,!this.channels)return;const o=this.channels.map(a=>{const[l,u,c]=a;return new eE(l,u,c,this)});this._subPlayers.splice(0,0,...o)};s(),this.d(this.channelsChanged.don(s))}get ratio(){return this._ratio.value}set ratio(t){Math.abs(this._ratio.value-t)<.001||(this.currentTime=(this.duration??pn.defaults.duration)*t)}get ratioChanged(){return this._ratio.changed}};h(pn,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),h(pn,"channelsReadMe",nE);let $r=pn;(r=>{r.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:Ls(void 0,(e,t)=>e==null?void 0:e.every((n,i)=>n===t[i]),e=>[...e])})})($r||($r={})),Fs($r.prototype,$r.createDefaultProps);class rE extends U{constructor(e,t,n,i){super(),this.disposeVar(new Ie(e.sceneObjectChanged,()=>{let s;i.debug&&console.log("正在获取Event事件...");const o=e.sceneObject;if(o&&t){const a=t.split(".");if(a.length===0)i.debug&&console.warn("propNames.length === 0");else{let l=Hh(o,!1,...a);(!l||!(l instanceof N))&&(a[a.length-1]=a[a.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${a[a.length-1]})再试试!`),l=Hh(o,!1,...a),i.debug&&l&&console.warn("event仍然获取不到!")),l?l instanceof N?(s=l,i.debug&&console.log(`Event获取成功 propChangedName: ${t}`,s)):i.debug&&console.warn(`the prop is not event from ${o.id}-${o.name}-${o.ref}-${t}`):i.debug&&console.warn(`cannot get changed from ${o.id}-${o.name}-${o.ref}-${t}`)}}if(s){const a=new U;return a.d(s.dwon(()=>n.emit())),a}else{i.debug&&console.log(`未获取到Event!propChangedName: ${t}`);return}}))}}const bm=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:class extends U{constructor(t,n,i){super();h(this,"_doEvalEvent",this.dv(new N));const s=this._doEvalEvent,o=this.disposeVar(Se(s)),a=t.map(([l,u])=>{const c=new Sd(l),d=u&&new rE(c,u,s,n)||void 0;return[c,d]});this.d(()=>{a.forEach(([l,u])=>{u==null||u.destroy(),l.destroy()}),a.length=0}),this.d(s.don(()=>{const{evalMode:l="NextAnimateFrame",evalOnlyWhenObjsAllExist:u=!0}=n;if(l==="Immediate"){const c=a.map(([d])=>d.sceneObject);(!u||c.every(d=>d!==void 0))&&i(c)}})),this.d(o.don(()=>{const{evalMode:l="NextAnimateFrame",evalOnlyWhenObjsAllExist:u=!0}=n;if(l==="NextAnimateFrame"){const c=a.map(([d])=>d.sceneObject);(!u||c.every(d=>d!==void 0))&&i(c)}}))}forceExecute(){this._doEvalEvent.emit()}}},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:iE}=bm;class ou extends U{constructor(){super();h(this,"_evalFunc");h(this,"_forceExecute",new N);const t=this.dv(z(void 0)),n=()=>{try{t.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",t.value)}catch(o){console.error(`evalFunc get error! ${o}`),t.value=void 0}};n(),this.dispose(this.evalFuncStrChanged.disposableOn(n));const i=o=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(o),t.value&&t.value(o))},s=this.disposeVar(new Ie(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new iE(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var o;(o=s.obj)==null||o.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(t){this._evalFunc=t}forceExecute(){this._forceExecute.emit()}}(r=>{r.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:tc([],(e,t)=>e[0]===t[0]&&e[1]===t[1],e=>[e[0],e[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:gt(void 0),devTags:Xt(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(ou||(ou={})),Fs(ou.prototype,ou.createDefaultProps);const Pm=tg("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function Kr(r){return Pm.forward(r)}function bd(r){return Pm.inverse(r)}const Im=tg("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");function sE(r){const e=Im.forward([r[0],r[1]]);return[e[0],e[1],r[2]]}function oE(r){const e=Im.inverse([r[0],r[1]]);return[e[0],e[1],r[2]]}function aE(r,e){const t=r[0],n=r[r.length-1];(t[0]!==n[0]||t[1]!==n[1]||t[2]!==n[2])&&r.push(t);const i=At.point(e),s=At.polygon([r]);return At.booleanPointInPolygon(i,s)}var an=63710088e-1,xm={centimeters:an*100,centimetres:an*100,degrees:an/111325,feet:an*3.28084,inches:an*39.37,kilometers:an/1e3,kilometres:an/1e3,meters:an,metres:an,miles:an/1609.344,millimeters:an*1e3,millimetres:an*1e3,nauticalmiles:an/1852,radians:1,yards:an*1.0936};function Zr(r,e,t){t===void 0&&(t={});var n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=e||{},n.geometry=r,n}function Jt(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Tm(r[0])||!Tm(r[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:r};return Zr(n,e,t)}function Nn(r,e,t){t===void 0&&(t={});for(var n=0,i=r;n<i.length;n++){var s=i[n];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:r};return Zr(a,e,t)}function Qr(r,e,t){if(t===void 0&&(t={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:r};return Zr(n,e,t)}function Da(r,e){e===void 0&&(e={});var t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=r,t}function Pd(r,e,t){t===void 0&&(t={});var n={type:"MultiPolygon",coordinates:r};return Zr(n,e,t)}function Id(r,e){e===void 0&&(e="kilometers");var t=xm[e];if(!t)throw new Error(e+" units is invalid");return r*t}function xd(r,e){e===void 0&&(e="kilometers");var t=xm[e];if(!t)throw new Error(e+" units is invalid");return r/t}function wc(r){var e=r%(2*Math.PI);return e*180/Math.PI}function vn(r){var e=r%360;return e*Math.PI/180}function Td(r,e,t){if(e===void 0&&(e="kilometers"),t===void 0&&(t="kilometers"),!(r>=0))throw new Error("length must be a positive number");return Id(xd(r,e),t)}function Tm(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Mn(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Io(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Om(r,e,t){if(!r)throw new Error("No feature passed");if(!t)throw new Error(".featureOf() requires a name");if(!r||r.type!=="Feature"||!r.geometry)throw new Error("Invalid input to "+t+", Feature with geometry required");if(!r.geometry||r.geometry.type!==e)throw new Error("Invalid input to "+t+": must be a "+e+", given "+r.geometry.type)}function rr(r){return r.type==="Feature"?r.geometry:r}function lE(r,e){return r.type==="FeatureCollection"?"FeatureCollection":r.type==="GeometryCollection"?"GeometryCollection":r.type==="Feature"&&r.geometry!==null?r.geometry.type:r.type}function au(r,e,t){if(t===void 0&&(t={}),t.final===!0)return uE(r,e);var n=Mn(r),i=Mn(e),s=vn(n[0]),o=vn(i[0]),a=vn(n[1]),l=vn(i[1]),u=Math.sin(o-s)*Math.cos(l),c=Math.cos(a)*Math.sin(l)-Math.sin(a)*Math.cos(l)*Math.cos(o-s);return wc(Math.atan2(u,c))}function uE(r,e){var t=au(e,r);return t=(t+180)%360,t}function xo(r,e,t,n){n===void 0&&(n={});var i=Mn(r),s=vn(i[0]),o=vn(i[1]),a=vn(t),l=xd(e,n.units),u=Math.asin(Math.sin(o)*Math.cos(l)+Math.cos(o)*Math.sin(l)*Math.cos(a)),c=s+Math.atan2(Math.sin(a)*Math.sin(l)*Math.cos(o),Math.cos(l)-Math.sin(o)*Math.sin(u)),d=wc(c),f=wc(u);return Jt([d,f],n.properties)}function us(r,e,t){t===void 0&&(t={});var n=Mn(r),i=Mn(e),s=vn(i[1]-n[1]),o=vn(i[0]-n[0]),a=vn(n[1]),l=vn(i[1]),u=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(a)*Math.cos(l);return Id(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),t.units)}function cE(r,e,t){t===void 0&&(t={});for(var n=rr(r),i=n.coordinates,s=0,o=0;o<i.length&&!(e>=s&&o===i.length-1);o++)if(s>=e){var a=e-s;if(a){var l=au(i[o],i[o-1])-180,u=xo(i[o],a,l,t);return u}else return Jt(i[o])}else s+=us(i[o],i[o+1],t);return Jt(i[i.length-1])}function hE(r,e){const t=Qr(r);return cE(t,e,{units:"meters"}).geometry.coordinates}function Na(r,e,t){if(r!==null)for(var n,i,s,o,a,l,u,c=0,d=0,f,p=r.type,_=p==="FeatureCollection",S=p==="Feature",b=_?r.features.length:1,I=0;I<b;I++){u=_?r.features[I].geometry:S?r.geometry:r,f=u?u.type==="GeometryCollection":!1,a=f?u.geometries.length:1;for(var m=0;m<a;m++){var w=0,g=0;if(o=f?u.geometries[m]:u,o!==null){l=o.coordinates;var y=o.type;switch(c=t&&(y==="Polygon"||y==="MultiPolygon")?1:0,y){case null:break;case"Point":if(e(l,d,I,w,g)===!1)return!1;d++,w++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(e(l[n],d,I,w,g)===!1)return!1;d++,y==="MultiPoint"&&w++}y==="LineString"&&w++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-c;i++){if(e(l[n][i],d,I,w,g)===!1)return!1;d++}y==="MultiLineString"&&w++,y==="Polygon"&&g++}y==="Polygon"&&w++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(g=0,i=0;i<l[n].length;i++){for(s=0;s<l[n][i].length-c;s++){if(e(l[n][i][s],d,I,w,g)===!1)return!1;d++}g++}w++}break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(Na(o.geometries[n],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Ec(r,e){if(r.type==="Feature")e(r,0);else if(r.type==="FeatureCollection")for(var t=0;t<r.features.length&&e(r.features[t],t)!==!1;t++);}function Cc(r,e){var t,n,i,s,o,a,l,u,c,d,f=0,p=r.type==="FeatureCollection",_=r.type==="Feature",S=p?r.features.length:1;for(t=0;t<S;t++){for(a=p?r.features[t].geometry:_?r.geometry:r,u=p?r.features[t].properties:_?r.properties:{},c=p?r.features[t].bbox:_?r.bbox:void 0,d=p?r.features[t].id:_?r.id:void 0,l=a?a.type==="GeometryCollection":!1,o=l?a.geometries.length:1,i=0;i<o;i++){if(s=l?a.geometries[i]:a,s===null){if(e(null,f,u,c,d)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,f,u,c,d)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<s.geometries.length;n++)if(e(s.geometries[n],f,u,c,d)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}f++}}function dE(r,e,t){var n=t;return Cc(r,function(i,s,o,a,l){n=e(n,i,s,o,a,l)}),n}function Od(r,e){Cc(r,function(t,n,i,s,o){var a=t===null?null:t.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return e(Zr(t,i,{bbox:s,id:o}),n,0)===!1?!1:void 0}var l;switch(a){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var u=0;u<t.coordinates.length;u++){var c=t.coordinates[u],d={type:l,coordinates:c};if(e(Zr(d,i),n,u)===!1)return!1}})}function fE(r,e){Od(r,function(t,n,i){var s=0;if(t.geometry){var o=t.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var a,l=0,u=0,c=0;if(Na(t,function(d,f,p,_,S){if(a===void 0||n>l||_>u||S>c){a=d,l=n,u=_,c=S,s=0;return}var b=Qr([a,d],t.properties);if(e(b,n,i,S,s)===!1)return!1;s++,a=d})===!1)return!1}}})}var Dm=6378137;function pE(r){return dE(r,function(e,t){return e+gE(t)},0)}function gE(r){var e=0,t;switch(r.type){case"Polygon":return Nm(r.coordinates);case"MultiPolygon":for(t=0;t<r.coordinates.length;t++)e+=Nm(r.coordinates[t]);return e;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function Nm(r){var e=0;if(r&&r.length>0){e+=Math.abs(Mm(r[0]));for(var t=1;t<r.length;t++)e-=Math.abs(Mm(r[t]))}return e}function Mm(r){var e,t,n,i,s,o,a,l=0,u=r.length;if(u>2){for(a=0;a<u;a++)a===u-2?(i=u-2,s=u-1,o=0):a===u-1?(i=u-1,s=0,o=1):(i=a,s=a+1,o=a+2),e=r[i],t=r[s],n=r[o],l+=(Dd(n[0])-Dd(e[0]))*Math.sin(Dd(t[1]));l=l*Dm*Dm/2}return l}function Dd(r){return r*Math.PI/180}function Nd(r){if((r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),r.length<=3)return 0;const e=Nn([r]);return pE(e)}var Sc={exports:{}},bc={exports:{}},mE=bc.exports,Rm;function Lm(){return Rm||(Rm=1,(function(r,e){(function(t,n){r.exports=n()})(mE,function(){function t(m,w,g,y,E){(function C(P,T,x,D,R){for(;D>x;){if(D-x>600){var L=D-x+1,O=T-x+1,B=Math.log(L),j=.5*Math.exp(2*B/3),H=.5*Math.sqrt(B*j*(L-j)/L)*(O-L/2<0?-1:1),nt=Math.max(x,Math.floor(T-O*j/L+H)),at=Math.min(D,Math.floor(T+(L-O)*j/L+H));C(P,T,nt,at,R)}var K=P[T],J=x,Q=D;for(n(P,x,T),R(P[D],K)>0&&n(P,x,D);J<Q;){for(n(P,J,Q),J++,Q--;R(P[J],K)<0;)J++;for(;R(P[Q],K)>0;)Q--}R(P[x],K)===0?n(P,x,Q):n(P,++Q,D),Q<=T&&(x=Q+1),T<=Q&&(D=Q-1)}})(m,w,g||0,y||m.length-1,E||i)}function n(m,w,g){var y=m[w];m[w]=m[g],m[g]=y}function i(m,w){return m<w?-1:m>w?1:0}var s=function(m){m===void 0&&(m=9),this._maxEntries=Math.max(4,m),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(m,w,g){if(!g)return w.indexOf(m);for(var y=0;y<w.length;y++)if(g(m,w[y]))return y;return-1}function a(m,w){l(m,0,m.children.length,w,m)}function l(m,w,g,y,E){E||(E=b(null)),E.minX=1/0,E.minY=1/0,E.maxX=-1/0,E.maxY=-1/0;for(var C=w;C<g;C++){var P=m.children[C];u(E,m.leaf?y(P):P)}return E}function u(m,w){return m.minX=Math.min(m.minX,w.minX),m.minY=Math.min(m.minY,w.minY),m.maxX=Math.max(m.maxX,w.maxX),m.maxY=Math.max(m.maxY,w.maxY),m}function c(m,w){return m.minX-w.minX}function d(m,w){return m.minY-w.minY}function f(m){return(m.maxX-m.minX)*(m.maxY-m.minY)}function p(m){return m.maxX-m.minX+(m.maxY-m.minY)}function _(m,w){return m.minX<=w.minX&&m.minY<=w.minY&&w.maxX<=m.maxX&&w.maxY<=m.maxY}function S(m,w){return w.minX<=m.maxX&&w.minY<=m.maxY&&w.maxX>=m.minX&&w.maxY>=m.minY}function b(m){return{children:m,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function I(m,w,g,y,E){for(var C=[w,g];C.length;)if(!((g=C.pop())-(w=C.pop())<=y)){var P=w+Math.ceil((g-w)/y/2)*y;t(m,P,w,g,E),C.push(w,P,P,g)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(m){var w=this.data,g=[];if(!S(m,w))return g;for(var y=this.toBBox,E=[];w;){for(var C=0;C<w.children.length;C++){var P=w.children[C],T=w.leaf?y(P):P;S(m,T)&&(w.leaf?g.push(P):_(m,T)?this._all(P,g):E.push(P))}w=E.pop()}return g},s.prototype.collides=function(m){var w=this.data;if(!S(m,w))return!1;for(var g=[];w;){for(var y=0;y<w.children.length;y++){var E=w.children[y],C=w.leaf?this.toBBox(E):E;if(S(m,C)){if(w.leaf||_(m,C))return!0;g.push(E)}}w=g.pop()}return!1},s.prototype.load=function(m){if(!m||!m.length)return this;if(m.length<this._minEntries){for(var w=0;w<m.length;w++)this.insert(m[w]);return this}var g=this._build(m.slice(),0,m.length-1,0);if(this.data.children.length)if(this.data.height===g.height)this._splitRoot(this.data,g);else{if(this.data.height<g.height){var y=this.data;this.data=g,g=y}this._insert(g,this.data.height-g.height-1,!0)}else this.data=g;return this},s.prototype.insert=function(m){return m&&this._insert(m,this.data.height-1),this},s.prototype.clear=function(){return this.data=b([]),this},s.prototype.remove=function(m,w){if(!m)return this;for(var g,y,E,C=this.data,P=this.toBBox(m),T=[],x=[];C||T.length;){if(C||(C=T.pop(),y=T[T.length-1],g=x.pop(),E=!0),C.leaf){var D=o(m,C.children,w);if(D!==-1)return C.children.splice(D,1),T.push(C),this._condense(T),this}E||C.leaf||!_(C,P)?y?(g++,C=y.children[g],E=!1):C=null:(T.push(C),x.push(g),g=0,y=C,C=C.children[0])}return this},s.prototype.toBBox=function(m){return m},s.prototype.compareMinX=function(m,w){return m.minX-w.minX},s.prototype.compareMinY=function(m,w){return m.minY-w.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(m){return this.data=m,this},s.prototype._all=function(m,w){for(var g=[];m;)m.leaf?w.push.apply(w,m.children):g.push.apply(g,m.children),m=g.pop();return w},s.prototype._build=function(m,w,g,y){var E,C=g-w+1,P=this._maxEntries;if(C<=P)return a(E=b(m.slice(w,g+1)),this.toBBox),E;y||(y=Math.ceil(Math.log(C)/Math.log(P)),P=Math.ceil(C/Math.pow(P,y-1))),(E=b([])).leaf=!1,E.height=y;var T=Math.ceil(C/P),x=T*Math.ceil(Math.sqrt(P));I(m,w,g,x,this.compareMinX);for(var D=w;D<=g;D+=x){var R=Math.min(D+x-1,g);I(m,D,R,T,this.compareMinY);for(var L=D;L<=R;L+=T){var O=Math.min(L+T-1,R);E.children.push(this._build(m,L,O,y-1))}}return a(E,this.toBBox),E},s.prototype._chooseSubtree=function(m,w,g,y){for(;y.push(w),!w.leaf&&y.length-1!==g;){for(var E=1/0,C=1/0,P=void 0,T=0;T<w.children.length;T++){var x=w.children[T],D=f(x),R=(L=m,O=x,(Math.max(O.maxX,L.maxX)-Math.min(O.minX,L.minX))*(Math.max(O.maxY,L.maxY)-Math.min(O.minY,L.minY))-D);R<C?(C=R,E=D<E?D:E,P=x):R===C&&D<E&&(E=D,P=x)}w=P||w.children[0]}var L,O;return w},s.prototype._insert=function(m,w,g){var y=g?m:this.toBBox(m),E=[],C=this._chooseSubtree(y,this.data,w,E);for(C.children.push(m),u(C,y);w>=0&&E[w].children.length>this._maxEntries;)this._split(E,w),w--;this._adjustParentBBoxes(y,E,w)},s.prototype._split=function(m,w){var g=m[w],y=g.children.length,E=this._minEntries;this._chooseSplitAxis(g,E,y);var C=this._chooseSplitIndex(g,E,y),P=b(g.children.splice(C,g.children.length-C));P.height=g.height,P.leaf=g.leaf,a(g,this.toBBox),a(P,this.toBBox),w?m[w-1].children.push(P):this._splitRoot(g,P)},s.prototype._splitRoot=function(m,w){this.data=b([m,w]),this.data.height=m.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(m,w,g){for(var y,E,C,P,T,x,D,R=1/0,L=1/0,O=w;O<=g-w;O++){var B=l(m,0,O,this.toBBox),j=l(m,O,g,this.toBBox),H=(E=B,C=j,P=void 0,T=void 0,x=void 0,D=void 0,P=Math.max(E.minX,C.minX),T=Math.max(E.minY,C.minY),x=Math.min(E.maxX,C.maxX),D=Math.min(E.maxY,C.maxY),Math.max(0,x-P)*Math.max(0,D-T)),nt=f(B)+f(j);H<R?(R=H,y=O,L=nt<L?nt:L):H===R&&nt<L&&(L=nt,y=O)}return y||g-w},s.prototype._chooseSplitAxis=function(m,w,g){var y=m.leaf?this.compareMinX:c,E=m.leaf?this.compareMinY:d;this._allDistMargin(m,w,g,y)<this._allDistMargin(m,w,g,E)&&m.children.sort(y)},s.prototype._allDistMargin=function(m,w,g,y){m.children.sort(y);for(var E=this.toBBox,C=l(m,0,w,E),P=l(m,g-w,g,E),T=p(C)+p(P),x=w;x<g-w;x++){var D=m.children[x];u(C,m.leaf?E(D):D),T+=p(C)}for(var R=g-w-1;R>=w;R--){var L=m.children[R];u(P,m.leaf?E(L):L),T+=p(P)}return T},s.prototype._adjustParentBBoxes=function(m,w,g){for(var y=g;y>=0;y--)u(w[y],m)},s.prototype._condense=function(m){for(var w=m.length-1,g=void 0;w>=0;w--)m[w].children.length===0?w>0?(g=m[w-1].children).splice(g.indexOf(m[w]),1):this.clear():a(m[w],this.toBBox)},s})})(bc)),bc.exports}class vE{constructor(e=[],t=yE){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:n}=this,i=t[e];for(;e>0;){const s=e-1>>1,o=t[s];if(n(i,o)>=0)break;t[e]=o,e=s}t[e]=i}_down(e){const{data:t,compare:n}=this,i=this.length>>1,s=t[e];for(;e<i;){let o=(e<<1)+1,a=t[o];const l=o+1;if(l<this.length&&n(t[l],a)<0&&(o=l,a=t[l]),n(a,s)>=0)break;t[e]=a,e=o}t[e]=s}}function yE(r,e){return r<e?-1:r>e?1:0}const _E=Pw(Object.freeze(Object.defineProperty({__proto__:null,default:vE},Symbol.toStringTag,{value:"Module"})));var lu={exports:{}},Md,Fm;function wE(){return Fm||(Fm=1,Md=function(e,t,n,i){var s=e[0],o=e[1],a=!1;n===void 0&&(n=0),i===void 0&&(i=t.length);for(var l=(i-n)/2,u=0,c=l-1;u<l;c=u++){var d=t[n+u*2+0],f=t[n+u*2+1],p=t[n+c*2+0],_=t[n+c*2+1],S=f>o!=_>o&&s<(p-d)*(o-f)/(_-f)+d;S&&(a=!a)}return a}),Md}var Rd,Am;function EE(){return Am||(Am=1,Rd=function(e,t,n,i){var s=e[0],o=e[1],a=!1;n===void 0&&(n=0),i===void 0&&(i=t.length);for(var l=i-n,u=0,c=l-1;u<l;c=u++){var d=t[u+n][0],f=t[u+n][1],p=t[c+n][0],_=t[c+n][1],S=f>o!=_>o&&s<(p-d)*(o-f)/(_-f)+d;S&&(a=!a)}return a}),Rd}var km;function CE(){if(km)return lu.exports;km=1;var r=wE(),e=EE();return lu.exports=function(n,i,s,o){return i.length>0&&Array.isArray(i[0])?e(n,i,s,o):r(n,i,s,o)},lu.exports.nested=e,lu.exports.flat=r,lu.exports}var uu={exports:{}},SE=uu.exports,Vm;function bE(){return Vm||(Vm=1,(function(r,e){(function(t,n){n(e)})(SE,function(t){const i=33306690738754706e-32;function s(S,b,I,m,w){let g,y,E,C,P=b[0],T=m[0],x=0,D=0;T>P==T>-P?(g=P,P=b[++x]):(g=T,T=m[++D]);let R=0;if(x<S&&D<I)for(T>P==T>-P?(E=g-((y=P+g)-P),P=b[++x]):(E=g-((y=T+g)-T),T=m[++D]),g=y,E!==0&&(w[R++]=E);x<S&&D<I;)T>P==T>-P?(E=g-((y=g+P)-(C=y-g))+(P-C),P=b[++x]):(E=g-((y=g+T)-(C=y-g))+(T-C),T=m[++D]),g=y,E!==0&&(w[R++]=E);for(;x<S;)E=g-((y=g+P)-(C=y-g))+(P-C),P=b[++x],g=y,E!==0&&(w[R++]=E);for(;D<I;)E=g-((y=g+T)-(C=y-g))+(T-C),T=m[++D],g=y,E!==0&&(w[R++]=E);return g===0&&R!==0||(w[R++]=g),R}function o(S){return new Float64Array(S)}const a=33306690738754716e-32,l=22204460492503146e-32,u=11093356479670487e-47,c=o(4),d=o(8),f=o(12),p=o(16),_=o(4);t.orient2d=function(S,b,I,m,w,g){const y=(b-g)*(I-w),E=(S-w)*(m-g),C=y-E;if(y===0||E===0||y>0!=E>0)return C;const P=Math.abs(y+E);return Math.abs(C)>=a*P?C:-(function(T,x,D,R,L,O,B){let j,H,nt,at,K,J,Q,mt,Ft,Ot,Dt,Gt,Ce,te,Tn,On,G,q;const yt=T-L,kt=D-L,ie=x-O,Pe=R-O;K=(Tn=(mt=yt-(Q=(J=134217729*yt)-(J-yt)))*(Ot=Pe-(Ft=(J=134217729*Pe)-(J-Pe)))-((te=yt*Pe)-Q*Ft-mt*Ft-Q*Ot))-(Dt=Tn-(G=(mt=ie-(Q=(J=134217729*ie)-(J-ie)))*(Ot=kt-(Ft=(J=134217729*kt)-(J-kt)))-((On=ie*kt)-Q*Ft-mt*Ft-Q*Ot))),c[0]=Tn-(Dt+K)+(K-G),K=(Ce=te-((Gt=te+Dt)-(K=Gt-te))+(Dt-K))-(Dt=Ce-On),c[1]=Ce-(Dt+K)+(K-On),K=(q=Gt+Dt)-Gt,c[2]=Gt-(q-K)+(Dt-K),c[3]=q;let vo=(function(MP,q_){let X_=q_[0];for(let Qp=1;Qp<MP;Qp++)X_+=q_[Qp];return X_})(4,c),Zu=l*B;if(vo>=Zu||-vo>=Zu||(j=T-(yt+(K=T-yt))+(K-L),nt=D-(kt+(K=D-kt))+(K-L),H=x-(ie+(K=x-ie))+(K-O),at=R-(Pe+(K=R-Pe))+(K-O),j===0&&H===0&&nt===0&&at===0)||(Zu=u*B+i*Math.abs(vo),(vo+=yt*at+Pe*j-(ie*nt+kt*H))>=Zu||-vo>=Zu))return vo;K=(Tn=(mt=j-(Q=(J=134217729*j)-(J-j)))*(Ot=Pe-(Ft=(J=134217729*Pe)-(J-Pe)))-((te=j*Pe)-Q*Ft-mt*Ft-Q*Ot))-(Dt=Tn-(G=(mt=H-(Q=(J=134217729*H)-(J-H)))*(Ot=kt-(Ft=(J=134217729*kt)-(J-kt)))-((On=H*kt)-Q*Ft-mt*Ft-Q*Ot))),_[0]=Tn-(Dt+K)+(K-G),K=(Ce=te-((Gt=te+Dt)-(K=Gt-te))+(Dt-K))-(Dt=Ce-On),_[1]=Ce-(Dt+K)+(K-On),K=(q=Gt+Dt)-Gt,_[2]=Gt-(q-K)+(Dt-K),_[3]=q;const OP=s(4,c,4,_,d);K=(Tn=(mt=yt-(Q=(J=134217729*yt)-(J-yt)))*(Ot=at-(Ft=(J=134217729*at)-(J-at)))-((te=yt*at)-Q*Ft-mt*Ft-Q*Ot))-(Dt=Tn-(G=(mt=ie-(Q=(J=134217729*ie)-(J-ie)))*(Ot=nt-(Ft=(J=134217729*nt)-(J-nt)))-((On=ie*nt)-Q*Ft-mt*Ft-Q*Ot))),_[0]=Tn-(Dt+K)+(K-G),K=(Ce=te-((Gt=te+Dt)-(K=Gt-te))+(Dt-K))-(Dt=Ce-On),_[1]=Ce-(Dt+K)+(K-On),K=(q=Gt+Dt)-Gt,_[2]=Gt-(q-K)+(Dt-K),_[3]=q;const DP=s(OP,d,4,_,f);K=(Tn=(mt=j-(Q=(J=134217729*j)-(J-j)))*(Ot=at-(Ft=(J=134217729*at)-(J-at)))-((te=j*at)-Q*Ft-mt*Ft-Q*Ot))-(Dt=Tn-(G=(mt=H-(Q=(J=134217729*H)-(J-H)))*(Ot=nt-(Ft=(J=134217729*nt)-(J-nt)))-((On=H*nt)-Q*Ft-mt*Ft-Q*Ot))),_[0]=Tn-(Dt+K)+(K-G),K=(Ce=te-((Gt=te+Dt)-(K=Gt-te))+(Dt-K))-(Dt=Ce-On),_[1]=Ce-(Dt+K)+(K-On),K=(q=Gt+Dt)-Gt,_[2]=Gt-(q-K)+(Dt-K),_[3]=q;const NP=s(DP,f,4,_,p);return p[NP-1]})(S,b,I,m,w,g,P)},t.orient2dfast=function(S,b,I,m,w,g){return(b-g)*(I-w)-(S-w)*(m-g)},Object.defineProperty(t,"__esModule",{value:!0})})})(uu,uu.exports)),uu.exports}var jm;function PE(){if(jm)return Sc.exports;jm=1;var r=Lm(),e=_E,t=CE(),n=bE().orient2d;e.default&&(e=e.default),Sc.exports=i,Sc.exports.default=i;function i(g,y,E){y=Math.max(0,y===void 0?2:y),E=E||0;var C=p(g),P=new r(16);P.toBBox=function(Q){return{minX:Q[0],minY:Q[1],maxX:Q[0],maxY:Q[1]}},P.compareMinX=function(Q,mt){return Q[0]-mt[0]},P.compareMinY=function(Q,mt){return Q[1]-mt[1]},P.load(g);for(var T=[],x=0,D;x<C.length;x++){var R=C[x];P.remove(R),D=_(R,D),T.push(D)}var L=new r(16);for(x=0;x<T.length;x++)L.insert(f(T[x]));for(var O=y*y,B=E*E;T.length;){var j=T.shift(),H=j.p,nt=j.next.p,at=S(H,nt);if(!(at<B)){var K=at/O;R=s(P,j.prev.p,H,nt,j.next.next.p,K,L),R&&Math.min(S(R,H),S(R,nt))<=K&&(T.push(j),T.push(_(R,j)),P.remove(R),L.remove(j),L.insert(f(j)),L.insert(f(j.next)))}}j=D;var J=[];do J.push(j.p),j=j.next;while(j!==D);return J.push(j.p),J}function s(g,y,E,C,P,T,x){for(var D=new e([],o),R=g.data;R;){for(var L=0;L<R.children.length;L++){var O=R.children[L],B=R.leaf?b(O,E,C):a(E,C,O);B>T||D.push({node:O,dist:B})}for(;D.length&&!D.peek().node.children;){var j=D.pop(),H=j.node,nt=b(H,y,E),at=b(H,C,P);if(j.dist<nt&&j.dist<at&&u(E,H,x)&&u(C,H,x))return H}R=D.pop(),R&&(R=R.node)}return null}function o(g,y){return g.dist-y.dist}function a(g,y,E){if(l(g,E)||l(y,E))return 0;var C=I(g[0],g[1],y[0],y[1],E.minX,E.minY,E.maxX,E.minY);if(C===0)return 0;var P=I(g[0],g[1],y[0],y[1],E.minX,E.minY,E.minX,E.maxY);if(P===0)return 0;var T=I(g[0],g[1],y[0],y[1],E.maxX,E.minY,E.maxX,E.maxY);if(T===0)return 0;var x=I(g[0],g[1],y[0],y[1],E.minX,E.maxY,E.maxX,E.maxY);return x===0?0:Math.min(C,P,T,x)}function l(g,y){return g[0]>=y.minX&&g[0]<=y.maxX&&g[1]>=y.minY&&g[1]<=y.maxY}function u(g,y,E){for(var C=Math.min(g[0],y[0]),P=Math.min(g[1],y[1]),T=Math.max(g[0],y[0]),x=Math.max(g[1],y[1]),D=E.search({minX:C,minY:P,maxX:T,maxY:x}),R=0;R<D.length;R++)if(d(D[R].p,D[R].next.p,g,y))return!1;return!0}function c(g,y,E){return n(g[0],g[1],y[0],y[1],E[0],E[1])}function d(g,y,E,C){return g!==C&&y!==E&&c(g,y,E)>0!=c(g,y,C)>0&&c(E,C,g)>0!=c(E,C,y)>0}function f(g){var y=g.p,E=g.next.p;return g.minX=Math.min(y[0],E[0]),g.minY=Math.min(y[1],E[1]),g.maxX=Math.max(y[0],E[0]),g.maxY=Math.max(y[1],E[1]),g}function p(g){for(var y=g[0],E=g[0],C=g[0],P=g[0],T=0;T<g.length;T++){var x=g[T];x[0]<y[0]&&(y=x),x[0]>C[0]&&(C=x),x[1]<E[1]&&(E=x),x[1]>P[1]&&(P=x)}var D=[y,E,C,P],R=D.slice();for(T=0;T<g.length;T++)t(g[T],D)||R.push(g[T]);return w(R)}function _(g,y){var E={p:g,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return y?(E.next=y.next,E.prev=y,y.next.prev=E,y.next=E):(E.prev=E,E.next=E),E}function S(g,y){var E=g[0]-y[0],C=g[1]-y[1];return E*E+C*C}function b(g,y,E){var C=y[0],P=y[1],T=E[0]-C,x=E[1]-P;if(T!==0||x!==0){var D=((g[0]-C)*T+(g[1]-P)*x)/(T*T+x*x);D>1?(C=E[0],P=E[1]):D>0&&(C+=T*D,P+=x*D)}return T=g[0]-C,x=g[1]-P,T*T+x*x}function I(g,y,E,C,P,T,x,D){var R=E-g,L=C-y,O=x-P,B=D-T,j=g-P,H=y-T,nt=R*R+L*L,at=R*O+L*B,K=O*O+B*B,J=R*j+L*H,Q=O*j+B*H,mt=nt*K-at*at,Ft,Ot,Dt,Gt,Ce=mt,te=mt;mt===0?(Ot=0,Ce=1,Gt=Q,te=K):(Ot=at*Q-K*J,Gt=nt*Q-at*J,Ot<0?(Ot=0,Gt=Q,te=K):Ot>Ce&&(Ot=Ce,Gt=Q+at,te=K)),Gt<0?(Gt=0,-J<0?Ot=0:-J>nt?Ot=Ce:(Ot=-J,Ce=nt)):Gt>te&&(Gt=te,-J+at<0?Ot=0:-J+at>nt?Ot=Ce:(Ot=-J+at,Ce=nt)),Ft=Ot===0?0:Ot/Ce,Dt=Gt===0?0:Gt/te;var Tn=(1-Ft)*g+Ft*E,On=(1-Ft)*y+Ft*C,G=(1-Dt)*P+Dt*x,q=(1-Dt)*T+Dt*D,yt=G-Tn,kt=q-On;return yt*yt+kt*kt}function m(g,y){return g[0]===y[0]?g[1]-y[1]:g[0]-y[0]}function w(g){g.sort(m);for(var y=[],E=0;E<g.length;E++){for(;y.length>=2&&c(y[y.length-2],y[y.length-1],g[E])<=0;)y.pop();y.push(g[E])}for(var C=[],P=g.length-1;P>=0;P--){for(;C.length>=2&&c(C[C.length-2],C[C.length-1],g[P])<=0;)C.pop();C.push(g[P])}return C.pop(),y.pop(),y.concat(C)}return Sc.exports}var IE=PE();const xE=pd(IE);function TE(r,e){e===void 0&&(e={}),e.concavity=e.concavity||1/0;var t=[];if(Na(r,function(i){t.push([i[0],i[1]])}),!t.length)return null;var n=xE(t,e.concavity);return n.length>3?Nn([n]):null}function Bm(r,e){e===void 0&&(e={});var t=0,n=0,i=0;return Na(r,function(s){t+=s[0],n+=s[1],i++},!0),Jt([t/i,n/i],e.properties)}function zm(r,e){switch(e===void 0&&(e={}),lE(r)){case"Point":return Jt(Mn(r),e.properties);case"Polygon":var t=[];Na(r,function(g){t.push(g)});var n=Bm(r,{properties:e.properties}),i=n.geometry.coordinates,s=0,o=0,a=0,l,u,c,d,f,p,_,S,b=t.map(function(g){return[g[0]-i[0],g[1]-i[1]]});for(l=0;l<t.length-1;l++)u=b[l],d=u[0],p=u[1],c=b[l+1],f=c[0],_=c[1],S=d*_-f*p,a+=S,s+=(d+f)*S,o+=(p+_)*S;if(a===0)return n;var I=a*.5,m=1/(6*I);return Jt([i[0]+m*s,i[1]+m*o],e.properties);default:var w=TE(r);return w?zm(w,{properties:e.properties}):Bm(r,{properties:e.properties})}}function OE(r){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]);const e=Nn([r]),n=zm(e).geometry.coordinates;return[n[0],n[1],n[2]??r[0][2]??0]}function Ld(...r){let[e,t,n,i]=r;const[s,o,a]=e;if(Array.isArray(t)){const[l,u,c]=t,d=Math.sqrt(l*l+u*u);let f=0;d>0&&(f=Math.atan2(l,u)*(180/Math.PI),f<0&&(f+=360));const p=xo(Jt([s,o]),d,f,{units:"meters"});return!p||!p.geometry||!p.geometry.coordinates?void 0:(n=n||[0,0,0],n[0]=p.geometry.coordinates[0],n[1]=p.geometry.coordinates[1],n[2]=a+(c||0),n)}else{const l=xo(Jt([s,o]),t,n,{units:"meters"});return!l||!l.geometry||!l.geometry.coordinates?void 0:(i=i||[0,0,0],i[0]=l.geometry.coordinates[0],i[1]=l.geometry.coordinates[1],i[2]=a,i)}}function Pc(r,e){return us(Jt(r),Jt(e),{units:"meters"})}function cu(r,e){return au(Jt(r),Jt(e))}function Um(r){if(!r)throw new Error("geojson is required");var e=[];return Od(r,function(t){DE(t,e)}),Da(e)}function DE(r,e){var t=[],n=r.geometry;if(n!==null){switch(n.type){case"Polygon":t=Io(n);break;case"LineString":t=[Io(n)]}t.forEach(function(i){var s=NE(i,r.properties);s.forEach(function(o){o.id=e.length,e.push(o)})})}}function NE(r,e){var t=[];return r.reduce(function(n,i){var s=Qr([n,i],e);return s.bbox=ME(n,i),t.push(s),i}),t}function ME(r,e){var t=r[0],n=r[1],i=e[0],s=e[1],o=t<i?t:i,a=n<s?n:s,l=t>i?t:i,u=n>s?n:s;return[o,a,l,u]}var Ic={exports:{}},Fd={},Gm;function Wm(){return Gm||(Gm=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.earthRadius=63710088e-1,r.factors={centimeters:r.earthRadius*100,centimetres:r.earthRadius*100,degrees:r.earthRadius/111325,feet:r.earthRadius*3.28084,inches:r.earthRadius*39.37,kilometers:r.earthRadius/1e3,kilometres:r.earthRadius/1e3,meters:r.earthRadius,metres:r.earthRadius,miles:r.earthRadius/1609.344,millimeters:r.earthRadius*1e3,millimetres:r.earthRadius*1e3,nauticalmiles:r.earthRadius/1852,radians:1,yards:r.earthRadius*1.0936},r.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/r.earthRadius,yards:1.0936133},r.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function e(D,R,L){L===void 0&&(L={});var O={type:"Feature"};return(L.id===0||L.id)&&(O.id=L.id),L.bbox&&(O.bbox=L.bbox),O.properties=R||{},O.geometry=D,O}r.feature=e;function t(D,R,L){switch(D){case"Point":return n(R).geometry;case"LineString":return a(R).geometry;case"Polygon":return s(R).geometry;case"MultiPoint":return d(R).geometry;case"MultiLineString":return c(R).geometry;case"MultiPolygon":return f(R).geometry;default:throw new Error(D+" is invalid")}}r.geometry=t;function n(D,R,L){if(L===void 0&&(L={}),!D)throw new Error("coordinates is required");if(!Array.isArray(D))throw new Error("coordinates must be an Array");if(D.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!C(D[0])||!C(D[1]))throw new Error("coordinates must contain numbers");var O={type:"Point",coordinates:D};return e(O,R,L)}r.point=n;function i(D,R,L){return L===void 0&&(L={}),u(D.map(function(O){return n(O,R)}),L)}r.points=i;function s(D,R,L){L===void 0&&(L={});for(var O=0,B=D;O<B.length;O++){var j=B[O];if(j.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var H=0;H<j[j.length-1].length;H++)if(j[j.length-1][H]!==j[0][H])throw new Error("First and last Position are not equivalent.")}var nt={type:"Polygon",coordinates:D};return e(nt,R,L)}r.polygon=s;function o(D,R,L){return L===void 0&&(L={}),u(D.map(function(O){return s(O,R)}),L)}r.polygons=o;function a(D,R,L){if(L===void 0&&(L={}),D.length<2)throw new Error("coordinates must be an array of two or more positions");var O={type:"LineString",coordinates:D};return e(O,R,L)}r.lineString=a;function l(D,R,L){return L===void 0&&(L={}),u(D.map(function(O){return a(O,R)}),L)}r.lineStrings=l;function u(D,R){R===void 0&&(R={});var L={type:"FeatureCollection"};return R.id&&(L.id=R.id),R.bbox&&(L.bbox=R.bbox),L.features=D,L}r.featureCollection=u;function c(D,R,L){L===void 0&&(L={});var O={type:"MultiLineString",coordinates:D};return e(O,R,L)}r.multiLineString=c;function d(D,R,L){L===void 0&&(L={});var O={type:"MultiPoint",coordinates:D};return e(O,R,L)}r.multiPoint=d;function f(D,R,L){L===void 0&&(L={});var O={type:"MultiPolygon",coordinates:D};return e(O,R,L)}r.multiPolygon=f;function p(D,R,L){L===void 0&&(L={});var O={type:"GeometryCollection",geometries:D};return e(O,R,L)}r.geometryCollection=p;function _(D,R){if(R===void 0&&(R=0),R&&!(R>=0))throw new Error("precision must be a positive number");var L=Math.pow(10,R||0);return Math.round(D*L)/L}r.round=_;function S(D,R){R===void 0&&(R="kilometers");var L=r.factors[R];if(!L)throw new Error(R+" units is invalid");return D*L}r.radiansToLength=S;function b(D,R){R===void 0&&(R="kilometers");var L=r.factors[R];if(!L)throw new Error(R+" units is invalid");return D/L}r.lengthToRadians=b;function I(D,R){return w(b(D,R))}r.lengthToDegrees=I;function m(D){var R=D%360;return R<0&&(R+=360),R}r.bearingToAzimuth=m;function w(D){var R=D%(2*Math.PI);return R*180/Math.PI}r.radiansToDegrees=w;function g(D){var R=D%360;return R*Math.PI/180}r.degreesToRadians=g;function y(D,R,L){if(R===void 0&&(R="kilometers"),L===void 0&&(L="kilometers"),!(D>=0))throw new Error("length must be a positive number");return S(b(D,R),L)}r.convertLength=y;function E(D,R,L){if(R===void 0&&(R="meters"),L===void 0&&(L="kilometers"),!(D>=0))throw new Error("area must be a positive number");var O=r.areaFactors[R];if(!O)throw new Error("invalid original units");var B=r.areaFactors[L];if(!B)throw new Error("invalid final units");return D/O*B}r.convertArea=E;function C(D){return!isNaN(D)&&D!==null&&!Array.isArray(D)}r.isNumber=C;function P(D){return!!D&&D.constructor===Object}r.isObject=P;function T(D){if(!D)throw new Error("bbox is required");if(!Array.isArray(D))throw new Error("bbox must be an Array");if(D.length!==4&&D.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");D.forEach(function(R){if(!C(R))throw new Error("bbox must only contain numbers")})}r.validateBBox=T;function x(D){if(!D)throw new Error("id is required");if(["string","number"].indexOf(typeof D)===-1)throw new Error("id must be a number or a string")}r.validateId=x})(Fd)),Fd}var Le={},Hm;function RE(){if(Hm)return Le;Hm=1,Object.defineProperty(Le,"__esModule",{value:!0});var r=Wm();function e(m,w,g){if(m!==null)for(var y,E,C,P,T,x,D,R=0,L=0,O,B=m.type,j=B==="FeatureCollection",H=B==="Feature",nt=j?m.features.length:1,at=0;at<nt;at++){D=j?m.features[at].geometry:H?m.geometry:m,O=D?D.type==="GeometryCollection":!1,T=O?D.geometries.length:1;for(var K=0;K<T;K++){var J=0,Q=0;if(P=O?D.geometries[K]:D,P!==null){x=P.coordinates;var mt=P.type;switch(R=g&&(mt==="Polygon"||mt==="MultiPolygon")?1:0,mt){case null:break;case"Point":if(w(x,L,at,J,Q)===!1)return!1;L++,J++;break;case"LineString":case"MultiPoint":for(y=0;y<x.length;y++){if(w(x[y],L,at,J,Q)===!1)return!1;L++,mt==="MultiPoint"&&J++}mt==="LineString"&&J++;break;case"Polygon":case"MultiLineString":for(y=0;y<x.length;y++){for(E=0;E<x[y].length-R;E++){if(w(x[y][E],L,at,J,Q)===!1)return!1;L++}mt==="MultiLineString"&&J++,mt==="Polygon"&&Q++}mt==="Polygon"&&J++;break;case"MultiPolygon":for(y=0;y<x.length;y++){for(Q=0,E=0;E<x[y].length;E++){for(C=0;C<x[y][E].length-R;C++){if(w(x[y][E][C],L,at,J,Q)===!1)return!1;L++}Q++}J++}break;case"GeometryCollection":for(y=0;y<P.geometries.length;y++)if(e(P.geometries[y],w,g)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function t(m,w,g,y){var E=g;return e(m,function(C,P,T,x,D){P===0&&g===void 0?E=C:E=w(E,C,P,T,x,D)},y),E}function n(m,w){var g;switch(m.type){case"FeatureCollection":for(g=0;g<m.features.length&&w(m.features[g].properties,g)!==!1;g++);break;case"Feature":w(m.properties,0);break}}function i(m,w,g){var y=g;return n(m,function(E,C){C===0&&g===void 0?y=E:y=w(y,E,C)}),y}function s(m,w){if(m.type==="Feature")w(m,0);else if(m.type==="FeatureCollection")for(var g=0;g<m.features.length&&w(m.features[g],g)!==!1;g++);}function o(m,w,g){var y=g;return s(m,function(E,C){C===0&&g===void 0?y=E:y=w(y,E,C)}),y}function a(m){var w=[];return e(m,function(g){w.push(g)}),w}function l(m,w){var g,y,E,C,P,T,x,D,R,L,O=0,B=m.type==="FeatureCollection",j=m.type==="Feature",H=B?m.features.length:1;for(g=0;g<H;g++){for(T=B?m.features[g].geometry:j?m.geometry:m,D=B?m.features[g].properties:j?m.properties:{},R=B?m.features[g].bbox:j?m.bbox:void 0,L=B?m.features[g].id:j?m.id:void 0,x=T?T.type==="GeometryCollection":!1,P=x?T.geometries.length:1,E=0;E<P;E++){if(C=x?T.geometries[E]:T,C===null){if(w(null,O,D,R,L)===!1)return!1;continue}switch(C.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(w(C,O,D,R,L)===!1)return!1;break}case"GeometryCollection":{for(y=0;y<C.geometries.length;y++)if(w(C.geometries[y],O,D,R,L)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}O++}}function u(m,w,g){var y=g;return l(m,function(E,C,P,T,x){C===0&&g===void 0?y=E:y=w(y,E,C,P,T,x)}),y}function c(m,w){l(m,function(g,y,E,C,P){var T=g===null?null:g.type;switch(T){case null:case"Point":case"LineString":case"Polygon":return w(r.feature(g,E,{bbox:C,id:P}),y,0)===!1?!1:void 0}var x;switch(T){case"MultiPoint":x="Point";break;case"MultiLineString":x="LineString";break;case"MultiPolygon":x="Polygon";break}for(var D=0;D<g.coordinates.length;D++){var R=g.coordinates[D],L={type:x,coordinates:R};if(w(r.feature(L,E),y,D)===!1)return!1}})}function d(m,w,g){var y=g;return c(m,function(E,C,P){C===0&&P===0&&g===void 0?y=E:y=w(y,E,C,P)}),y}function f(m,w){c(m,function(g,y,E){var C=0;if(g.geometry){var P=g.geometry.type;if(!(P==="Point"||P==="MultiPoint")){var T,x=0,D=0,R=0;if(e(g,function(L,O,B,j,H){if(T===void 0||y>x||j>D||H>R){T=L,x=y,D=j,R=H,C=0;return}var nt=r.lineString([T,L],g.properties);if(w(nt,y,E,H,C)===!1)return!1;C++,T=L})===!1)return!1}}})}function p(m,w,g){var y=g,E=!1;return f(m,function(C,P,T,x,D){E===!1&&g===void 0?y=C:y=w(y,C,P,T,x,D),E=!0}),y}function _(m,w){if(!m)throw new Error("geojson is required");c(m,function(g,y,E){if(g.geometry!==null){var C=g.geometry.type,P=g.geometry.coordinates;switch(C){case"LineString":if(w(g,y,E,0,0)===!1)return!1;break;case"Polygon":for(var T=0;T<P.length;T++)if(w(r.lineString(P[T],g.properties),y,E,T)===!1)return!1;break}}})}function S(m,w,g){var y=g;return _(m,function(E,C,P,T){C===0&&g===void 0?y=E:y=w(y,E,C,P,T)}),y}function b(m,w){if(w=w||{},!r.isObject(w))throw new Error("options is invalid");var g=w.featureIndex||0,y=w.multiFeatureIndex||0,E=w.geometryIndex||0,C=w.segmentIndex||0,P=w.properties,T;switch(m.type){case"FeatureCollection":g<0&&(g=m.features.length+g),P=P||m.features[g].properties,T=m.features[g].geometry;break;case"Feature":P=P||m.properties,T=m.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":T=m;break;default:throw new Error("geojson is invalid")}if(T===null)return null;var x=T.coordinates;switch(T.type){case"Point":case"MultiPoint":return null;case"LineString":return C<0&&(C=x.length+C-1),r.lineString([x[C],x[C+1]],P,w);case"Polygon":return E<0&&(E=x.length+E),C<0&&(C=x[E].length+C-1),r.lineString([x[E][C],x[E][C+1]],P,w);case"MultiLineString":return y<0&&(y=x.length+y),C<0&&(C=x[y].length+C-1),r.lineString([x[y][C],x[y][C+1]],P,w);case"MultiPolygon":return y<0&&(y=x.length+y),E<0&&(E=x[y].length+E),C<0&&(C=x[y][E].length-C-1),r.lineString([x[y][E][C],x[y][E][C+1]],P,w)}throw new Error("geojson is invalid")}function I(m,w){if(w=w||{},!r.isObject(w))throw new Error("options is invalid");var g=w.featureIndex||0,y=w.multiFeatureIndex||0,E=w.geometryIndex||0,C=w.coordIndex||0,P=w.properties,T;switch(m.type){case"FeatureCollection":g<0&&(g=m.features.length+g),P=P||m.features[g].properties,T=m.features[g].geometry;break;case"Feature":P=P||m.properties,T=m.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":T=m;break;default:throw new Error("geojson is invalid")}if(T===null)return null;var x=T.coordinates;switch(T.type){case"Point":return r.point(x,P,w);case"MultiPoint":return y<0&&(y=x.length+y),r.point(x[y],P,w);case"LineString":return C<0&&(C=x.length+C),r.point(x[C],P,w);case"Polygon":return E<0&&(E=x.length+E),C<0&&(C=x[E].length+C),r.point(x[E][C],P,w);case"MultiLineString":return y<0&&(y=x.length+y),C<0&&(C=x[y].length+C),r.point(x[y][C],P,w);case"MultiPolygon":return y<0&&(y=x.length+y),E<0&&(E=x[y].length+E),C<0&&(C=x[y][E].length-C),r.point(x[y][E][C],P,w)}throw new Error("geojson is invalid")}return Le.coordAll=a,Le.coordEach=e,Le.coordReduce=t,Le.featureEach=s,Le.featureReduce=o,Le.findPoint=I,Le.findSegment=b,Le.flattenEach=c,Le.flattenReduce=d,Le.geomEach=l,Le.geomReduce=u,Le.lineEach=_,Le.lineReduce=S,Le.propEach=n,Le.propReduce=i,Le.segmentEach=f,Le.segmentReduce=p,Le}var hu={},Fe={},zt={},qm;function LE(){if(qm)return zt;qm=1,Object.defineProperty(zt,"__esModule",{value:!0});var r=63710088e-1,e={centimeters:r*100,centimetres:r*100,degrees:360/(2*Math.PI),feet:r*3.28084,inches:r*39.37,kilometers:r/1e3,kilometres:r/1e3,meters:r,metres:r,miles:r/1609.344,millimeters:r*1e3,millimetres:r*1e3,nauticalmiles:r/1852,radians:1,yards:r*1.0936},t={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function n(O,B,j={}){const H={type:"Feature"};return(j.id===0||j.id)&&(H.id=j.id),j.bbox&&(H.bbox=j.bbox),H.properties=B||{},H.geometry=O,H}function i(O,B,j={}){switch(O){case"Point":return s(B).geometry;case"LineString":return u(B).geometry;case"Polygon":return a(B).geometry;case"MultiPoint":return p(B).geometry;case"MultiLineString":return f(B).geometry;case"MultiPolygon":return _(B).geometry;default:throw new Error(O+" is invalid")}}function s(O,B,j={}){if(!O)throw new Error("coordinates is required");if(!Array.isArray(O))throw new Error("coordinates must be an Array");if(O.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!x(O[0])||!x(O[1]))throw new Error("coordinates must contain numbers");return n({type:"Point",coordinates:O},B,j)}function o(O,B,j={}){return d(O.map(H=>s(H,B)),j)}function a(O,B,j={}){for(const nt of O){if(nt.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(nt[nt.length-1].length!==nt[0].length)throw new Error("First and last Position are not equivalent.");for(let at=0;at<nt[nt.length-1].length;at++)if(nt[nt.length-1][at]!==nt[0][at])throw new Error("First and last Position are not equivalent.")}return n({type:"Polygon",coordinates:O},B,j)}function l(O,B,j={}){return d(O.map(H=>a(H,B)),j)}function u(O,B,j={}){if(O.length<2)throw new Error("coordinates must be an array of two or more positions");return n({type:"LineString",coordinates:O},B,j)}function c(O,B,j={}){return d(O.map(H=>u(H,B)),j)}function d(O,B={}){const j={type:"FeatureCollection"};return B.id&&(j.id=B.id),B.bbox&&(j.bbox=B.bbox),j.features=O,j}function f(O,B,j={}){return n({type:"MultiLineString",coordinates:O},B,j)}function p(O,B,j={}){return n({type:"MultiPoint",coordinates:O},B,j)}function _(O,B,j={}){return n({type:"MultiPolygon",coordinates:O},B,j)}function S(O,B,j={}){return n({type:"GeometryCollection",geometries:O},B,j)}function b(O,B=0){if(B&&!(B>=0))throw new Error("precision must be a positive number");const j=Math.pow(10,B||0);return Math.round(O*j)/j}function I(O,B="kilometers"){const j=e[B];if(!j)throw new Error(B+" units is invalid");return O*j}function m(O,B="kilometers"){const j=e[B];if(!j)throw new Error(B+" units is invalid");return O/j}function w(O,B){return E(m(O,B))}function g(O){let B=O%360;return B<0&&(B+=360),B}function y(O){return O=O%360,O>180?O-360:O<-180?O+360:O}function E(O){return O%(2*Math.PI)*180/Math.PI}function C(O){return O%360*Math.PI/180}function P(O,B="kilometers",j="kilometers"){if(!(O>=0))throw new Error("length must be a positive number");return I(m(O,B),j)}function T(O,B="meters",j="kilometers"){if(!(O>=0))throw new Error("area must be a positive number");const H=t[B];if(!H)throw new Error("invalid original units");const nt=t[j];if(!nt)throw new Error("invalid final units");return O/H*nt}function x(O){return!isNaN(O)&&O!==null&&!Array.isArray(O)}function D(O){return O!==null&&typeof O=="object"&&!Array.isArray(O)}function R(O){if(!O)throw new Error("bbox is required");if(!Array.isArray(O))throw new Error("bbox must be an Array");if(O.length!==4&&O.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");O.forEach(B=>{if(!x(B))throw new Error("bbox must only contain numbers")})}function L(O){if(!O)throw new Error("id is required");if(["string","number"].indexOf(typeof O)===-1)throw new Error("id must be a number or a string")}return zt.areaFactors=t,zt.azimuthToBearing=y,zt.bearingToAzimuth=g,zt.convertArea=T,zt.convertLength=P,zt.degreesToRadians=C,zt.earthRadius=r,zt.factors=e,zt.feature=n,zt.featureCollection=d,zt.geometry=i,zt.geometryCollection=S,zt.isNumber=x,zt.isObject=D,zt.lengthToDegrees=w,zt.lengthToRadians=m,zt.lineString=u,zt.lineStrings=c,zt.multiLineString=f,zt.multiPoint=p,zt.multiPolygon=_,zt.point=s,zt.points=o,zt.polygon=a,zt.polygons=l,zt.radiansToDegrees=E,zt.radiansToLength=I,zt.round=b,zt.validateBBox=R,zt.validateId=L,zt}var Xm;function FE(){if(Xm)return Fe;Xm=1,Object.defineProperty(Fe,"__esModule",{value:!0});var r=LE();function e(m,w,g){if(m!==null)for(var y,E,C,P,T,x,D,R=0,L=0,O,B=m.type,j=B==="FeatureCollection",H=B==="Feature",nt=j?m.features.length:1,at=0;at<nt;at++){D=j?m.features[at].geometry:H?m.geometry:m,O=D?D.type==="GeometryCollection":!1,T=O?D.geometries.length:1;for(var K=0;K<T;K++){var J=0,Q=0;if(P=O?D.geometries[K]:D,P!==null){x=P.coordinates;var mt=P.type;switch(R=g&&(mt==="Polygon"||mt==="MultiPolygon")?1:0,mt){case null:break;case"Point":if(w(x,L,at,J,Q)===!1)return!1;L++,J++;break;case"LineString":case"MultiPoint":for(y=0;y<x.length;y++){if(w(x[y],L,at,J,Q)===!1)return!1;L++,mt==="MultiPoint"&&J++}mt==="LineString"&&J++;break;case"Polygon":case"MultiLineString":for(y=0;y<x.length;y++){for(E=0;E<x[y].length-R;E++){if(w(x[y][E],L,at,J,Q)===!1)return!1;L++}mt==="MultiLineString"&&J++,mt==="Polygon"&&Q++}mt==="Polygon"&&J++;break;case"MultiPolygon":for(y=0;y<x.length;y++){for(Q=0,E=0;E<x[y].length;E++){for(C=0;C<x[y][E].length-R;C++){if(w(x[y][E][C],L,at,J,Q)===!1)return!1;L++}Q++}J++}break;case"GeometryCollection":for(y=0;y<P.geometries.length;y++)if(e(P.geometries[y],w,g)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function t(m,w,g,y){var E=g;return e(m,function(C,P,T,x,D){P===0&&g===void 0?E=C:E=w(E,C,P,T,x,D)},y),E}function n(m,w){var g;switch(m.type){case"FeatureCollection":for(g=0;g<m.features.length&&w(m.features[g].properties,g)!==!1;g++);break;case"Feature":w(m.properties,0);break}}function i(m,w,g){var y=g;return n(m,function(E,C){C===0&&g===void 0?y=E:y=w(y,E,C)}),y}function s(m,w){if(m.type==="Feature")w(m,0);else if(m.type==="FeatureCollection")for(var g=0;g<m.features.length&&w(m.features[g],g)!==!1;g++);}function o(m,w,g){var y=g;return s(m,function(E,C){C===0&&g===void 0?y=E:y=w(y,E,C)}),y}function a(m){var w=[];return e(m,function(g){w.push(g)}),w}function l(m,w){var g,y,E,C,P,T,x,D,R,L,O=0,B=m.type==="FeatureCollection",j=m.type==="Feature",H=B?m.features.length:1;for(g=0;g<H;g++){for(T=B?m.features[g].geometry:j?m.geometry:m,D=B?m.features[g].properties:j?m.properties:{},R=B?m.features[g].bbox:j?m.bbox:void 0,L=B?m.features[g].id:j?m.id:void 0,x=T?T.type==="GeometryCollection":!1,P=x?T.geometries.length:1,E=0;E<P;E++){if(C=x?T.geometries[E]:T,C===null){if(w(null,O,D,R,L)===!1)return!1;continue}switch(C.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(w(C,O,D,R,L)===!1)return!1;break}case"GeometryCollection":{for(y=0;y<C.geometries.length;y++)if(w(C.geometries[y],O,D,R,L)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}O++}}function u(m,w,g){var y=g;return l(m,function(E,C,P,T,x){C===0&&g===void 0?y=E:y=w(y,E,C,P,T,x)}),y}function c(m,w){l(m,function(g,y,E,C,P){var T=g===null?null:g.type;switch(T){case null:case"Point":case"LineString":case"Polygon":return w(r.feature.call(void 0,g,E,{bbox:C,id:P}),y,0)===!1?!1:void 0}var x;switch(T){case"MultiPoint":x="Point";break;case"MultiLineString":x="LineString";break;case"MultiPolygon":x="Polygon";break}for(var D=0;D<g.coordinates.length;D++){var R=g.coordinates[D],L={type:x,coordinates:R};if(w(r.feature.call(void 0,L,E),y,D)===!1)return!1}})}function d(m,w,g){var y=g;return c(m,function(E,C,P){C===0&&P===0&&g===void 0?y=E:y=w(y,E,C,P)}),y}function f(m,w){c(m,function(g,y,E){var C=0;if(g.geometry){var P=g.geometry.type;if(!(P==="Point"||P==="MultiPoint")){var T,x=0,D=0,R=0;if(e(g,function(L,O,B,j,H){if(T===void 0||y>x||j>D||H>R){T=L,x=y,D=j,R=H,C=0;return}var nt=r.lineString.call(void 0,[T,L],g.properties);if(w(nt,y,E,H,C)===!1)return!1;C++,T=L})===!1)return!1}}})}function p(m,w,g){var y=g,E=!1;return f(m,function(C,P,T,x,D){E===!1&&g===void 0?y=C:y=w(y,C,P,T,x,D),E=!0}),y}function _(m,w){if(!m)throw new Error("geojson is required");c(m,function(g,y,E){if(g.geometry!==null){var C=g.geometry.type,P=g.geometry.coordinates;switch(C){case"LineString":if(w(g,y,E,0,0)===!1)return!1;break;case"Polygon":for(var T=0;T<P.length;T++)if(w(r.lineString.call(void 0,P[T],g.properties),y,E,T)===!1)return!1;break}}})}function S(m,w,g){var y=g;return _(m,function(E,C,P,T){C===0&&g===void 0?y=E:y=w(y,E,C,P,T)}),y}function b(m,w){if(w=w||{},!r.isObject.call(void 0,w))throw new Error("options is invalid");var g=w.featureIndex||0,y=w.multiFeatureIndex||0,E=w.geometryIndex||0,C=w.segmentIndex||0,P=w.properties,T;switch(m.type){case"FeatureCollection":g<0&&(g=m.features.length+g),P=P||m.features[g].properties,T=m.features[g].geometry;break;case"Feature":P=P||m.properties,T=m.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":T=m;break;default:throw new Error("geojson is invalid")}if(T===null)return null;var x=T.coordinates;switch(T.type){case"Point":case"MultiPoint":return null;case"LineString":return C<0&&(C=x.length+C-1),r.lineString.call(void 0,[x[C],x[C+1]],P,w);case"Polygon":return E<0&&(E=x.length+E),C<0&&(C=x[E].length+C-1),r.lineString.call(void 0,[x[E][C],x[E][C+1]],P,w);case"MultiLineString":return y<0&&(y=x.length+y),C<0&&(C=x[y].length+C-1),r.lineString.call(void 0,[x[y][C],x[y][C+1]],P,w);case"MultiPolygon":return y<0&&(y=x.length+y),E<0&&(E=x[y].length+E),C<0&&(C=x[y][E].length-C-1),r.lineString.call(void 0,[x[y][E][C],x[y][E][C+1]],P,w)}throw new Error("geojson is invalid")}function I(m,w){if(w=w||{},!r.isObject.call(void 0,w))throw new Error("options is invalid");var g=w.featureIndex||0,y=w.multiFeatureIndex||0,E=w.geometryIndex||0,C=w.coordIndex||0,P=w.properties,T;switch(m.type){case"FeatureCollection":g<0&&(g=m.features.length+g),P=P||m.features[g].properties,T=m.features[g].geometry;break;case"Feature":P=P||m.properties,T=m.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":T=m;break;default:throw new Error("geojson is invalid")}if(T===null)return null;var x=T.coordinates;switch(T.type){case"Point":return r.point.call(void 0,x,P,w);case"MultiPoint":return y<0&&(y=x.length+y),r.point.call(void 0,x[y],P,w);case"LineString":return C<0&&(C=x.length+C),r.point.call(void 0,x[C],P,w);case"Polygon":return E<0&&(E=x.length+E),C<0&&(C=x[E].length+C),r.point.call(void 0,x[E][C],P,w);case"MultiLineString":return y<0&&(y=x.length+y),C<0&&(C=x[y].length+C),r.point.call(void 0,x[y][C],P,w);case"MultiPolygon":return y<0&&(y=x.length+y),E<0&&(E=x[y].length+E),C<0&&(C=x[y][E].length-C),r.point.call(void 0,x[y][E][C],P,w)}throw new Error("geojson is invalid")}return Fe.coordAll=a,Fe.coordEach=e,Fe.coordReduce=t,Fe.featureEach=s,Fe.featureReduce=o,Fe.findPoint=I,Fe.findSegment=b,Fe.flattenEach=c,Fe.flattenReduce=d,Fe.geomEach=l,Fe.geomReduce=u,Fe.lineEach=_,Fe.lineReduce=S,Fe.propEach=n,Fe.propReduce=i,Fe.segmentEach=f,Fe.segmentReduce=p,Fe}var Ym;function AE(){if(Ym)return hu;Ym=1,Object.defineProperty(hu,"__esModule",{value:!0});var r=FE();function e(n,i={}){if(n.bbox!=null&&i.recompute!==!0)return n.bbox;const s=[1/0,1/0,-1/0,-1/0];return r.coordEach.call(void 0,n,o=>{s[0]>o[0]&&(s[0]=o[0]),s[1]>o[1]&&(s[1]=o[1]),s[2]<o[0]&&(s[2]=o[0]),s[3]<o[1]&&(s[3]=o[1])}),s}var t=e;return hu.bbox=e,hu.default=t,hu}var Jm;function kE(){if(Jm)return Ic.exports;Jm=1;var r=Lm(),e=Wm(),t=RE(),n=AE().default,i=t.featureEach;t.coordEach,e.polygon;var s=e.featureCollection;function o(a){var l=new r(a);return l.insert=function(u){if(u.type!=="Feature")throw new Error("invalid feature");return u.bbox=u.bbox?u.bbox:n(u),r.prototype.insert.call(this,u)},l.load=function(u){var c=[];return Array.isArray(u)?u.forEach(function(d){if(d.type!=="Feature")throw new Error("invalid features");d.bbox=d.bbox?d.bbox:n(d),c.push(d)}):i(u,function(d){if(d.type!=="Feature")throw new Error("invalid features");d.bbox=d.bbox?d.bbox:n(d),c.push(d)}),r.prototype.load.call(this,c)},l.remove=function(u,c){if(u.type!=="Feature")throw new Error("invalid feature");return u.bbox=u.bbox?u.bbox:n(u),r.prototype.remove.call(this,u,c)},l.clear=function(){return r.prototype.clear.call(this)},l.search=function(u){var c=r.prototype.search.call(this,this.toBBox(u));return s(c)},l.collides=function(u){return r.prototype.collides.call(this,this.toBBox(u))},l.all=function(){var u=r.prototype.all.call(this);return s(u)},l.toJSON=function(){return r.prototype.toJSON.call(this)},l.fromJSON=function(u){return r.prototype.fromJSON.call(this,u)},l.toBBox=function(u){var c;if(u.bbox)c=u.bbox;else if(Array.isArray(u)&&u.length===4)c=u;else if(Array.isArray(u)&&u.length===6)c=[u[0],u[1],u[3],u[4]];else if(u.type==="Feature")c=n(u);else if(u.type==="FeatureCollection")c=n(u);else throw new Error("invalid geojson");return{minX:c[0],minY:c[1],maxX:c[2],maxY:c[3]}},l}return Ic.exports=o,Ic.exports.default=o,Ic.exports}var VE=kE();const jE=pd(VE);function $m(r,e){var t={},n=[];if(r.type==="LineString"&&(r=Zr(r)),e.type==="LineString"&&(e=Zr(e)),r.type==="Feature"&&e.type==="Feature"&&r.geometry!==null&&e.geometry!==null&&r.geometry.type==="LineString"&&e.geometry.type==="LineString"&&r.geometry.coordinates.length===2&&e.geometry.coordinates.length===2){var i=Km(r,e);return i&&n.push(i),Da(n)}var s=jE();return s.load(Um(e)),Ec(Um(r),function(o){Ec(s.search(o),function(a){var l=Km(o,a);if(l){var u=Io(l).join(",");t[u]||(t[u]=!0,n.push(l))}})}),Da(n)}function Km(r,e){var t=Io(r),n=Io(e);if(t.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(n.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=t[0][0],s=t[0][1],o=t[1][0],a=t[1][1],l=n[0][0],u=n[0][1],c=n[1][0],d=n[1][1],f=(d-u)*(o-i)-(c-l)*(a-s),p=(c-l)*(s-u)-(d-u)*(i-l),_=(o-i)*(s-u)-(a-s)*(i-l);if(f===0)return null;var S=p/f,b=_/f;if(S>=0&&S<=1&&b>=0&&b<=1){var I=i+S*(o-i),m=s+S*(a-s);return Jt([I,m])}return null}function BE(r,e){return $m(Qr(r),Qr(e))}function zE(r,e){var t=us(r,e),n=au(r,e),i=xo(r,t/2,n);return i}function UE(r,e){const t=Jt(r),n=Jt(e),i=zE(t,n),s=(r[2]+e[2])/2;return[...i.geometry.coordinates,s]}function GE(r,e,t){t===void 0&&(t={});var n=Jt([1/0,1/0],{dist:1/0}),i=0;return Od(r,function(s){for(var o=Io(s),a=0;a<o.length-1;a++){var l=Jt(o[a]);l.properties.dist=us(e,l,t);var u=Jt(o[a+1]);u.properties.dist=us(e,u,t);var c=us(l,u,t),d=Math.max(l.properties.dist,u.properties.dist),f=au(l,u),p=xo(e,d,f+90,t),_=xo(e,d,f-90,t),S=$m(Qr([p.geometry.coordinates,_.geometry.coordinates]),Qr([l.geometry.coordinates,u.geometry.coordinates])),b=null;S.features.length>0&&(b=S.features[0],b.properties.dist=us(e,b,t),b.properties.location=i+us(l,b,t)),l.properties.dist<n.properties.dist&&(n=l,n.properties.index=a,n.properties.location=i),u.properties.dist<n.properties.dist&&(n=u,n.properties.index=a+1,n.properties.location=i+c),b&&b.properties.dist<n.properties.dist&&(n=b,n.properties.index=a),i+=c}}),n}function WE(r,e){const t=Jt(e),n=Qr(r);return GE(n,t,{units:"meters"})}function Zm(r,e,t){t===void 0&&(t={});var n=Mn(r),i=Mn(e);i[0]+=i[0]-n[0]>180?-360:n[0]-i[0]>180?360:0;var s=HE(n,i),o=Td(s,"meters",t.units);return o}function HE(r,e,t){t=t===void 0?an:Number(t);var n=t,i=r[1]*Math.PI/180,s=e[1]*Math.PI/180,o=s-i,a=Math.abs(e[0]-r[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var l=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),u=Math.abs(l)>1e-11?o/l:Math.cos(i),c=Math.sqrt(o*o+u*u*a*a),d=c*n;return d}function qE(r,e,t){if(t===void 0&&(t={}),t.method||(t.method="geodesic"),t.units||(t.units="kilometers"),!r)throw new Error("pt is required");if(Array.isArray(r)?r=Jt(r):r.type==="Point"?r=Zr(r):Om(r,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=Qr(e):e.type==="LineString"?e=Zr(e):Om(e,"LineString","line");var n=1/0,i=r.geometry.coordinates;return fE(e,function(s){var o=s.geometry.coordinates[0],a=s.geometry.coordinates[1],l=XE(i,o,a,t);l<n&&(n=l)}),Td(n,"degrees",t.units)}function XE(r,e,t,n){var i=[t[0]-e[0],t[1]-e[1]],s=[r[0]-e[0],r[1]-e[1]],o=Qm(s,i);if(o<=0)return Ad(r,e,{method:n.method,units:"degrees"});var a=Qm(i,i);if(a<=o)return Ad(r,t,{method:n.method,units:"degrees"});var l=o/a,u=[e[0]+l*i[0],e[1]+l*i[1]];return Ad(r,u,{method:n.method,units:"degrees"})}function Qm(r,e){return r[0]*e[0]+r[1]*e[1]}function Ad(r,e,t){return t.method==="planar"?Zm(r,e,t):us(r,e,t)}function YE(r,e){const t=Jt(r),n=Qr(e);return qE(t,n,{units:"meters"})}function JE(r,e,t,n){n===void 0&&(n={});var i=e<0,s=Td(Math.abs(e),n.units,"meters");i&&(s=-Math.abs(s));var o=Mn(r),a=$E(o,s,t);return a[0]+=a[0]-o[0]>180?-360:o[0]-a[0]>180?360:0,Jt(a,n.properties)}function $E(r,e,t,n){n=n===void 0?an:Number(n);var i=e/n,s=r[0]*Math.PI/180,o=vn(r[1]),a=vn(t),l=i*Math.cos(a),u=o+l;Math.abs(u)>Math.PI/2&&(u=u>0?Math.PI-u:-Math.PI-u);var c=Math.log(Math.tan(u/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),d=Math.abs(c)>1e-11?l/c:Math.cos(o),f=i*Math.sin(a)/d,p=s+f;return[(p*180/Math.PI+540)%360-180,u*180/Math.PI]}function KE(r,e,t,n){const[i,s,o]=r,a=JE(Jt([i,s]),e,t,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return n=n||[0,0,0],n[0]=a.geometry.coordinates[0],n[1]=a.geometry.coordinates[1],n[2]=o,n}function tv(r,e){return Zm(Jt(r),Jt(e),{units:"meters"})}function ZE(r,e,t){t===void 0&&(t={});var n;t.final?n=ev(Mn(e),Mn(r)):n=ev(Mn(r),Mn(e));var i=n>180?-(360-n):n;return i}function ev(r,e){var t=vn(r[1]),n=vn(e[1]),i=vn(e[0]-r[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var s=Math.log(Math.tan(n/2+Math.PI/4)/Math.tan(t/2+Math.PI/4)),o=Math.atan2(i,s);return(wc(o)+360)%360}function QE(r,e){return ZE(Jt(r),Jt(e))}function ti(r){var e=[1/0,1/0,-1/0,-1/0];return Na(r,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}ti.default=ti;function ei(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("point is required");if(!e)throw new Error("polygon is required");var n=Mn(r),i=rr(e),s=i.type,o=e.bbox,a=i.coordinates;if(o&&tC(n,o)===!1)return!1;s==="Polygon"&&(a=[a]);for(var l=!1,u=0;u<a.length&&!l;u++)if(nv(n,a[u][0],t.ignoreBoundary)){for(var c=!1,d=1;d<a[u].length&&!c;)nv(n,a[u][d],!t.ignoreBoundary)&&(c=!0),d++;c||(l=!0)}return l}function nv(r,e,t){var n=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,s=e.length-1;i<e.length;s=i++){var o=e[i][0],a=e[i][1],l=e[s][0],u=e[s][1],c=r[1]*(o-l)+a*(l-r[0])+u*(r[0]-o)===0&&(o-r[0])*(l-r[0])<=0&&(a-r[1])*(u-r[1])<=0;if(c)return!t;var d=a>r[1]!=u>r[1]&&r[0]<(l-o)*(r[1]-a)/(u-a)+o;d&&(n=!n)}return n}function tC(r,e){return e[0]<=r[0]&&e[1]<=r[1]&&e[2]>=r[0]&&e[3]>=r[1]}function cs(r,e,t){t===void 0&&(t={});for(var n=Mn(r),i=Io(e),s=0;s<i.length-1;s++){var o=!1;if(t.ignoreEndVertices&&(s===0&&(o="start"),s===i.length-2&&(o="end"),s===0&&s+1===i.length-1&&(o="both")),eC(i[s],i[s+1],n,o,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function eC(r,e,t,n,i){var s=t[0],o=t[1],a=r[0],l=r[1],u=e[0],c=e[1],d=t[0]-a,f=t[1]-l,p=u-a,_=c-l,S=d*_-f*p;if(i!==null){if(Math.abs(S)>i)return!1}else if(S!==0)return!1;if(n){if(n==="start")return Math.abs(p)>=Math.abs(_)?p>0?a<s&&s<=u:u<=s&&s<a:_>0?l<o&&o<=c:c<=o&&o<l;if(n==="end")return Math.abs(p)>=Math.abs(_)?p>0?a<=s&&s<u:u<s&&s<=a:_>0?l<=o&&o<c:c<o&&o<=l;if(n==="both")return Math.abs(p)>=Math.abs(_)?p>0?a<s&&s<u:u<s&&s<a:_>0?l<o&&o<c:c<o&&o<l}else return Math.abs(p)>=Math.abs(_)?p>0?a<=s&&s<=u:u<=s&&s<=a:_>0?l<=o&&o<=c:c<=o&&o<=l;return!1}function nC(r,e){var t=rr(r),n=rr(e),i=t.type,s=n.type,o=t.coordinates,a=n.coordinates;switch(i){case"Point":switch(s){case"Point":return kd(o,a);default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"Point":return rC(t,n);case"MultiPoint":return iC(t,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"Point":return cs(n,t,{ignoreEndVertices:!0});case"LineString":return aC(t,n);case"MultiPoint":return sC(t,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Point":return ei(n,t,{ignoreBoundary:!0});case"LineString":return lC(t,n);case"Polygon":return uC(t,n);case"MultiPoint":return oC(t,n);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function rC(r,e){var t,n=!1;for(t=0;t<r.coordinates.length;t++)if(kd(r.coordinates[t],e.coordinates)){n=!0;break}return n}function iC(r,e){for(var t=0,n=e.coordinates;t<n.length;t++){for(var i=n[t],s=!1,o=0,a=r.coordinates;o<a.length;o++){var l=a[o];if(kd(i,l)){s=!0;break}}if(!s)return!1}return!0}function sC(r,e){for(var t=!1,n=0,i=e.coordinates;n<i.length;n++){var s=i[n];if(cs(s,r,{ignoreEndVertices:!0})&&(t=!0),!cs(s,r))return!1}return!!t}function oC(r,e){for(var t=0,n=e.coordinates;t<n.length;t++){var i=n[t];if(!ei(i,r,{ignoreBoundary:!0}))return!1}return!0}function aC(r,e){for(var t=!1,n=0,i=e.coordinates;n<i.length;n++){var s=i[n];if(cs({type:"Point",coordinates:s},r,{ignoreEndVertices:!0})&&(t=!0),!cs({type:"Point",coordinates:s},r,{ignoreEndVertices:!1}))return!1}return t}function lC(r,e){var t=!1,n=0,i=ti(r),s=ti(e);if(!rv(i,s))return!1;for(n;n<e.coordinates.length-1;n++){var o=cC(e.coordinates[n],e.coordinates[n+1]);if(ei({type:"Point",coordinates:o},r,{ignoreBoundary:!0})){t=!0;break}}return t}function uC(r,e){if(r.type==="Feature"&&r.geometry===null||e.type==="Feature"&&e.geometry===null)return!1;var t=ti(r),n=ti(e);if(!rv(t,n))return!1;for(var i=rr(e).coordinates,s=0,o=i;s<o.length;s++)for(var a=o[s],l=0,u=a;l<u.length;l++){var c=u[l];if(!ei(c,r))return!1}return!0}function rv(r,e){return!(r[0]>e[0]||r[2]<e[2]||r[1]>e[1]||r[3]<e[3])}function kd(r,e){return r[0]===e[0]&&r[1]===e[1]}function cC(r,e){return[(r[0]+e[0])/2,(r[1]+e[1])/2]}function hC(r,e){var t=rr(r),n=rr(e),i=t.type,s=n.type;switch(i){case"Point":switch(s){case"MultiPoint":return dC(t,n);case"LineString":return cs(t,n,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return ei(t,n,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return fC(t,n);case"LineString":return pC(t,n);case"Polygon":case"MultiPolygon":return gC(t,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return mC(t,n);case"Polygon":case"MultiPolygon":return vC(t,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return yC(t,n);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function dC(r,e){var t,n=!1;for(t=0;t<e.coordinates.length;t++)if(sv(e.coordinates[t],r.coordinates)){n=!0;break}return n}function fC(r,e){for(var t=0;t<r.coordinates.length;t++){for(var n=!1,i=0;i<e.coordinates.length;i++)sv(r.coordinates[t],e.coordinates[i])&&(n=!0);if(!n)return!1}return!0}function pC(r,e){for(var t=!1,n=0;n<r.coordinates.length;n++){if(!cs(r.coordinates[n],e))return!1;t||(t=cs(r.coordinates[n],e,{ignoreEndVertices:!0}))}return t}function gC(r,e){for(var t=!0,n=!1,i=0;i<r.coordinates.length;i++){if(n=ei(r.coordinates[1],e),!n){t=!1;break}n=ei(r.coordinates[1],e,{ignoreBoundary:!0})}return t&&n}function mC(r,e){for(var t=0;t<r.coordinates.length;t++)if(!cs(r.coordinates[t],e))return!1;return!0}function vC(r,e){var t=ti(e),n=ti(r);if(!iv(t,n))return!1;for(var i=!1,s=0;s<r.coordinates.length-1;s++){if(!ei(r.coordinates[s],e))return!1;if(i||(i=ei(r.coordinates[s],e,{ignoreBoundary:!0})),!i){var o=_C(r.coordinates[s],r.coordinates[s+1]);i=ei(o,e,{ignoreBoundary:!0})}}return i}function yC(r,e){var t=ti(r),n=ti(e);if(!iv(n,t))return!1;for(var i=0;i<r.coordinates[0].length;i++)if(!ei(r.coordinates[0][i],e))return!1;return!0}function iv(r,e){return!(r[0]>e[0]||r[2]<e[2]||r[1]>e[1]||r[3]<e[3])}function sv(r,e){return r[0]===e[0]&&r[1]===e[1]}function _C(r,e){return[(r[0]+e[0])/2,(r[1]+e[1])/2]}function wC(r,e){e===void 0&&(e={});var t=ti(r),n=(t[0]+t[2])/2,i=(t[1]+t[3])/2;return Jt([n,i],e.properties,e)}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(e){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var t=Object(this),n=Math.max(Math.min(t.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(n+i,0):Math.min(i,n);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:n;for(s=s<0?Math.max(n+arguments[2],0):Math.min(s,n);i<s;)t[i]=e,++i;return t},writable:!0}),Number.isFinite=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)},Number.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(r){return r!==r},Math.trunc=Math.trunc||function(r){return r<0?Math.ceil(r):Math.floor(r)};var To=function(){};To.prototype.interfaces_=function(){return[]},To.prototype.getClass=function(){return To},To.prototype.equalsWithTolerance=function(e,t,n){return Math.abs(e-t)<=n};var $t=(function(r){function e(t){r.call(this,t),this.name="IllegalArgumentException",this.message=t,this.stack=new r().stack}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e})(Error),vt=function(){},ov={MAX_VALUE:{configurable:!0}};vt.isNaN=function(e){return Number.isNaN(e)},vt.doubleToLongBits=function(e){return e},vt.longBitsToDouble=function(e){return e},vt.isInfinite=function(e){return!Number.isFinite(e)},ov.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(vt,ov);var Wn=function(){},xc=function(){},Ma=function(){};function Hn(){}var F=function r(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=r.NULL_ORDINATE;else if(arguments.length===1){var e=arguments[0];this.x=e.x,this.y=e.y,this.z=e.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=r.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},Oo={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};F.prototype.setOrdinate=function(e,t){switch(e){case F.X:this.x=t;break;case F.Y:this.y=t;break;case F.Z:this.z=t;break;default:throw new $t("Invalid ordinate index: "+e)}},F.prototype.equals2D=function(){if(arguments.length===1){var e=arguments[0];return!(this.x!==e.x||this.y!==e.y)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];return!(!To.equalsWithTolerance(this.x,t.x,n)||!To.equalsWithTolerance(this.y,t.y,n))}},F.prototype.getOrdinate=function(e){switch(e){case F.X:return this.x;case F.Y:return this.y;case F.Z:return this.z}throw new $t("Invalid ordinate index: "+e)},F.prototype.equals3D=function(e){return this.x===e.x&&this.y===e.y&&(this.z===e.z||vt.isNaN(this.z))&&vt.isNaN(e.z)},F.prototype.equals=function(e){return e instanceof F?this.equals2D(e):!1},F.prototype.equalInZ=function(e,t){return To.equalsWithTolerance(this.z,e.z,t)},F.prototype.compareTo=function(e){var t=e;return this.x<t.x?-1:this.x>t.x?1:this.y<t.y?-1:this.y>t.y?1:0},F.prototype.clone=function(){},F.prototype.copy=function(){return new F(this)},F.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},F.prototype.distance3D=function(e){var t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return Math.sqrt(t*t+n*n+i*i)},F.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},F.prototype.hashCode=function(){var e=17;return e=37*e+F.hashCode(this.x),e=37*e+F.hashCode(this.y),e},F.prototype.setCoordinate=function(e){this.x=e.x,this.y=e.y,this.z=e.z},F.prototype.interfaces_=function(){return[Wn,xc,Hn]},F.prototype.getClass=function(){return F},F.hashCode=function(){if(arguments.length===1){var e=arguments[0],t=vt.doubleToLongBits(e);return Math.trunc((t^t)>>>32)}},Oo.DimensionalComparator.get=function(){return hs},Oo.serialVersionUID.get=function(){return 6683108902428367e3},Oo.NULL_ORDINATE.get=function(){return vt.NaN},Oo.X.get=function(){return 0},Oo.Y.get=function(){return 1},Oo.Z.get=function(){return 2},Object.defineProperties(F,Oo);var hs=function(e){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t!==2&&t!==3)throw new $t("only 2 or 3 dimensions may be specified");this._dimensionsToTest=t}}};hs.prototype.compare=function(e,t){var n=e,i=t,s=hs.compare(n.x,i.x);if(s!==0)return s;var o=hs.compare(n.y,i.y);if(o!==0)return o;if(this._dimensionsToTest<=2)return 0;var a=hs.compare(n.z,i.z);return a},hs.prototype.interfaces_=function(){return[Ma]},hs.prototype.getClass=function(){return hs},hs.compare=function(e,t){return e<t?-1:e>t?1:vt.isNaN(e)?vt.isNaN(t)?0:-1:vt.isNaN(t)?1:0};var Ra=function(){};Ra.prototype.create=function(){},Ra.prototype.interfaces_=function(){return[]},Ra.prototype.getClass=function(){return Ra};var k=function(){},du={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};k.prototype.interfaces_=function(){return[]},k.prototype.getClass=function(){return k},k.toLocationSymbol=function(e){switch(e){case k.EXTERIOR:return"e";case k.BOUNDARY:return"b";case k.INTERIOR:return"i";case k.NONE:return"-"}throw new $t("Unknown location value: "+e)},du.INTERIOR.get=function(){return 0},du.BOUNDARY.get=function(){return 1},du.EXTERIOR.get=function(){return 2},du.NONE.get=function(){return-1},Object.defineProperties(k,du);var pt=function(r,e){return r.interfaces_&&r.interfaces_().indexOf(e)>-1},Rn=function(){},av={LOG_10:{configurable:!0}};Rn.prototype.interfaces_=function(){return[]},Rn.prototype.getClass=function(){return Rn},Rn.log10=function(e){var t=Math.log(e);return vt.isInfinite(t)||vt.isNaN(t)?t:t/Rn.LOG_10},Rn.min=function(e,t,n,i){var s=e;return t<s&&(s=t),n<s&&(s=n),i<s&&(s=i),s},Rn.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],t=arguments[1],n=arguments[2];return e<t?t:e>n?n:e}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],s=arguments[1],o=arguments[2];return i<s?s:i>o?o:i}},Rn.wrap=function(e,t){return e<0?t- -e%t:e%t},Rn.max=function(){if(arguments.length===3){var e=arguments[0],t=arguments[1],n=arguments[2],i=e;return t>i&&(i=t),n>i&&(i=n),i}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],l=arguments[3],u=s;return o>u&&(u=o),a>u&&(u=a),l>u&&(u=l),u}},Rn.average=function(e,t){return(e+t)/2},av.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(Rn,av);var br=function(e){this.str=e};br.prototype.append=function(e){this.str+=e},br.prototype.setCharAt=function(e,t){this.str=this.str.substr(0,e)+t+this.str.substr(e+1)},br.prototype.toString=function(e){return this.str};var Pr=function(e){this.value=e};Pr.prototype.intValue=function(){return this.value},Pr.prototype.compareTo=function(e){return this.value<e?-1:this.value>e?1:0},Pr.isNaN=function(e){return Number.isNaN(e)};var fu=function(){};fu.isWhitespace=function(e){return e<=32&&e>=0||e===127},fu.toUpperCase=function(e){return e.toUpperCase()};var V=function r(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof r){var t=arguments[0];this.init(t)}else if(typeof arguments[0]=="string"){var n=arguments[0];r.call(this,r.parse(n))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},ir={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};V.prototype.le=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<=e._lo},V.prototype.extractSignificantDigits=function(e,t){var n=this.abs(),i=V.magnitude(n._hi),s=V.TEN.pow(i);n=n.divide(s),n.gt(V.TEN)?(n=n.divide(V.TEN),i+=1):n.lt(V.ONE)&&(n=n.multiply(V.TEN),i-=1);for(var o=i+1,a=new br,l=V.MAX_PRINT_DIGITS-1,u=0;u<=l;u++){e&&u===o&&a.append(".");var c=Math.trunc(n._hi);if(c<0)break;var d=!1,f=0;c>9?(d=!0,f="9"):f="0"+c,a.append(f),n=n.subtract(V.valueOf(c)).multiply(V.TEN),d&&n.selfAdd(V.TEN);var p=!0,_=V.magnitude(n._hi);if(_<0&&Math.abs(_)>=l-u&&(p=!1),!p)break}return t[0]=i,a.toString()},V.prototype.sqr=function(){return this.multiply(this)},V.prototype.doubleValue=function(){return this._hi+this._lo},V.prototype.subtract=function(){if(arguments[0]instanceof V){var e=arguments[0];return this.add(e.negate())}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.add(-t)}},V.prototype.equals=function(){if(arguments.length===1){var e=arguments[0];return this._hi===e._hi&&this._lo===e._lo}},V.prototype.isZero=function(){return this._hi===0&&this._lo===0},V.prototype.selfSubtract=function(){if(arguments[0]instanceof V){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e._hi,-e._lo)}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t,0)}},V.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},V.prototype.min=function(e){return this.le(e)?this:e},V.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof V){var e=arguments[0];return this.selfDivide(e._hi,e._lo)}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.selfDivide(t,0)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=null,o=null,a=null,l=null,u=null,c=null,d=null,f=null;return u=this._hi/n,c=V.SPLIT*u,s=c-u,f=V.SPLIT*n,s=c-s,o=u-s,a=f-n,d=u*n,a=f-a,l=n-a,f=s*a-d+s*l+o*a+o*l,c=(this._hi-d-f+this._lo-u*i)/n,f=u+c,this._hi=f,this._lo=u-f+c,this}},V.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},V.prototype.divide=function(){if(arguments[0]instanceof V){var e=arguments[0],t=null,n=null,i=null,s=null,o=null,a=null,l=null,u=null;o=this._hi/e._hi,a=V.SPLIT*o,t=a-o,u=V.SPLIT*e._hi,t=a-t,n=o-t,i=u-e._hi,l=o*e._hi,i=u-i,s=e._hi-i,u=t*i-l+t*s+n*i+n*s,a=(this._hi-l-u+this._lo-o*e._lo)/e._hi,u=o+a;var c=u,d=o-u+a;return new V(c,d)}else if(typeof arguments[0]=="number"){var f=arguments[0];return vt.isNaN(f)?V.createNaN():V.copy(this).selfDivide(f,0)}},V.prototype.ge=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>=e._lo},V.prototype.pow=function(e){if(e===0)return V.valueOf(1);var t=new V(this),n=V.valueOf(1),i=Math.abs(e);if(i>1)for(;i>0;)i%2===1&&n.selfMultiply(t),i/=2,i>0&&(t=t.sqr());else n=t;return e<0?n.reciprocal():n},V.prototype.ceil=function(){if(this.isNaN())return V.NaN;var e=Math.ceil(this._hi),t=0;return e===this._hi&&(t=Math.ceil(this._lo)),new V(e,t)},V.prototype.compareTo=function(e){var t=e;return this._hi<t._hi?-1:this._hi>t._hi?1:this._lo<t._lo?-1:this._lo>t._lo?1:0},V.prototype.rint=function(){if(this.isNaN())return this;var e=this.add(.5);return e.floor()},V.prototype.setValue=function(){if(arguments[0]instanceof V){var e=arguments[0];return this.init(e),this}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.init(t),this}},V.prototype.max=function(e){return this.ge(e)?this:e},V.prototype.sqrt=function(){if(this.isZero())return V.valueOf(0);if(this.isNegative())return V.NaN;var e=1/Math.sqrt(this._hi),t=this._hi*e,n=V.valueOf(t),i=this.subtract(n.sqr()),s=i._hi*(e*.5);return n.add(s)},V.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof V){var e=arguments[0];return this.selfAdd(e._hi,e._lo)}else if(typeof arguments[0]=="number"){var t=arguments[0],n=null,i=null,s=null,o=null,a=null,l=null;return s=this._hi+t,a=s-this._hi,o=s-a,o=t-a+(this._hi-o),l=o+this._lo,n=s+l,i=l+(s-n),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(arguments.length===2){var u=arguments[0],c=arguments[1],d=null,f=null,p=null,_=null,S=null,b=null,I=null,m=null;S=this._hi+u,p=this._lo+c,I=S-this._hi,m=p-this._lo,b=S-I,_=p-m,b=u-I+(this._hi-b),_=c-m+(this._lo-_),I=b+p,d=S+I,f=I+(S-d),I=_+f;var w=d+I,g=I+(d-w);return this._hi=w,this._lo=g,this}},V.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof V){var e=arguments[0];return this.selfMultiply(e._hi,e._lo)}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.selfMultiply(t,0)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=null,o=null,a=null,l=null,u=null,c=null;u=V.SPLIT*this._hi,s=u-this._hi,c=V.SPLIT*n,s=u-s,o=this._hi-s,a=c-n,u=this._hi*n,a=c-a,l=n-a,c=s*a-u+s*l+o*a+o*l+(this._hi*i+this._lo*n);var d=u+c;s=u-d;var f=c+s;return this._hi=d,this._lo=f,this}},V.prototype.selfSqr=function(){return this.selfMultiply(this)},V.prototype.floor=function(){if(this.isNaN())return V.NaN;var e=Math.floor(this._hi),t=0;return e===this._hi&&(t=Math.floor(this._lo)),new V(e,t)},V.prototype.negate=function(){return this.isNaN()?this:new V(-this._hi,-this._lo)},V.prototype.clone=function(){},V.prototype.multiply=function(){if(arguments[0]instanceof V){var e=arguments[0];return e.isNaN()?V.createNaN():V.copy(this).selfMultiply(e)}else if(typeof arguments[0]=="number"){var t=arguments[0];return vt.isNaN(t)?V.createNaN():V.copy(this).selfMultiply(t,0)}},V.prototype.isNaN=function(){return vt.isNaN(this._hi)},V.prototype.intValue=function(){return Math.trunc(this._hi)},V.prototype.toString=function(){var e=V.magnitude(this._hi);return e>=-3&&e<=20?this.toStandardNotation():this.toSciNotation()},V.prototype.toStandardNotation=function(){var e=this.getSpecialNumberString();if(e!==null)return e;var t=new Array(1).fill(null),n=this.extractSignificantDigits(!0,t),i=t[0]+1,s=n;if(n.charAt(0)===".")s="0"+n;else if(i<0)s="0."+V.stringOfChar("0",-i)+n;else if(n.indexOf(".")===-1){var o=i-n.length,a=V.stringOfChar("0",o);s=n+a+".0"}return this.isNegative()?"-"+s:s},V.prototype.reciprocal=function(){var e=null,t=null,n=null,i=null,s=null,o=null,a=null,l=null;s=1/this._hi,o=V.SPLIT*s,e=o-s,l=V.SPLIT*this._hi,e=o-e,t=s-e,n=l-this._hi,a=s*this._hi,n=l-n,i=this._hi-n,l=e*n-a+e*i+t*n+t*i,o=(1-a-l-s*this._lo)/this._hi;var u=s+o,c=s-u+o;return new V(u,c)},V.prototype.toSciNotation=function(){if(this.isZero())return V.SCI_NOT_ZERO;var e=this.getSpecialNumberString();if(e!==null)return e;var t=new Array(1).fill(null),n=this.extractSignificantDigits(!1,t),i=V.SCI_NOT_EXPONENT_CHAR+t[0];if(n.charAt(0)==="0")throw new Error("Found leading zero: "+n);var s="";n.length>1&&(s=n.substring(1));var o=n.charAt(0)+"."+s;return this.isNegative()?"-"+o+i:o+i},V.prototype.abs=function(){return this.isNaN()?V.NaN:this.isNegative()?this.negate():new V(this)},V.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},V.prototype.lt=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<e._lo},V.prototype.add=function(){if(arguments[0]instanceof V){var e=arguments[0];return V.copy(this).selfAdd(e)}else if(typeof arguments[0]=="number"){var t=arguments[0];return V.copy(this).selfAdd(t)}},V.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var e=arguments[0];this._hi=e,this._lo=0}else if(arguments[0]instanceof V){var t=arguments[0];this._hi=t._hi,this._lo=t._lo}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._hi=n,this._lo=i}},V.prototype.gt=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>e._lo},V.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},V.prototype.trunc=function(){return this.isNaN()?V.NaN:this.isPositive()?this.floor():this.ceil()},V.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},V.prototype.interfaces_=function(){return[Hn,Wn,xc]},V.prototype.getClass=function(){return V},V.sqr=function(e){return V.valueOf(e).selfMultiply(e)},V.valueOf=function(){if(typeof arguments[0]=="string"){var e=arguments[0];return V.parse(e)}else if(typeof arguments[0]=="number"){var t=arguments[0];return new V(t)}},V.sqrt=function(e){return V.valueOf(e).sqrt()},V.parse=function(e){for(var t=0,n=e.length;fu.isWhitespace(e.charAt(t));)t++;var i=!1;if(t<n){var s=e.charAt(t);(s==="-"||s==="+")&&(t++,s==="-"&&(i=!0))}for(var o=new V,a=0,l=0,u=0;!(t>=n);){var c=e.charAt(t);if(t++,fu.isDigit(c)){var d=c-"0";o.selfMultiply(V.TEN),o.selfAdd(d),a++;continue}if(c==="."){l=a;continue}if(c==="e"||c==="E"){var f=e.substring(t);try{u=Pr.parseInt(f)}catch(I){throw I instanceof Error?new Error("Invalid exponent "+f+" in string "+e):I}finally{}break}throw new Error("Unexpected character '"+c+"' at position "+t+" in string "+e)}var p=o,_=a-l-u;if(_===0)p=o;else if(_>0){var S=V.TEN.pow(_);p=o.divide(S)}else if(_<0){var b=V.TEN.pow(-_);p=o.multiply(b)}return i?p.negate():p},V.createNaN=function(){return new V(vt.NaN,vt.NaN)},V.copy=function(e){return new V(e)},V.magnitude=function(e){var t=Math.abs(e),n=Math.log(t)/Math.log(10),i=Math.trunc(Math.floor(n)),s=Math.pow(10,i);return s*10<=t&&(i+=1),i},V.stringOfChar=function(e,t){for(var n=new br,i=0;i<t;i++)n.append(e);return n.toString()},ir.PI.get=function(){return new V(3.141592653589793,12246467991473532e-32)},ir.TWO_PI.get=function(){return new V(6.283185307179586,24492935982947064e-32)},ir.PI_2.get=function(){return new V(1.5707963267948966,6123233995736766e-32)},ir.E.get=function(){return new V(2.718281828459045,14456468917292502e-32)},ir.NaN.get=function(){return new V(vt.NaN,vt.NaN)},ir.EPS.get=function(){return 123259516440783e-46},ir.SPLIT.get=function(){return 134217729},ir.MAX_PRINT_DIGITS.get=function(){return 32},ir.TEN.get=function(){return V.valueOf(10)},ir.ONE.get=function(){return V.valueOf(1)},ir.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},ir.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(V,ir);var ln=function(){},lv={DP_SAFE_EPSILON:{configurable:!0}};ln.prototype.interfaces_=function(){return[]},ln.prototype.getClass=function(){return ln},ln.orientationIndex=function(e,t,n){var i=ln.orientationIndexFilter(e,t,n);if(i<=1)return i;var s=V.valueOf(t.x).selfAdd(-e.x),o=V.valueOf(t.y).selfAdd(-e.y),a=V.valueOf(n.x).selfAdd(-t.x),l=V.valueOf(n.y).selfAdd(-t.y);return s.selfMultiply(l).selfSubtract(o.selfMultiply(a)).signum()},ln.signOfDet2x2=function(e,t,n,i){var s=e.multiply(i).selfSubtract(t.multiply(n));return s.signum()},ln.intersection=function(e,t,n,i){var s=V.valueOf(i.y).selfSubtract(n.y).selfMultiply(V.valueOf(t.x).selfSubtract(e.x)),o=V.valueOf(i.x).selfSubtract(n.x).selfMultiply(V.valueOf(t.y).selfSubtract(e.y)),a=s.subtract(o),l=V.valueOf(i.x).selfSubtract(n.x).selfMultiply(V.valueOf(e.y).selfSubtract(n.y)),u=V.valueOf(i.y).selfSubtract(n.y).selfMultiply(V.valueOf(e.x).selfSubtract(n.x)),c=l.subtract(u),d=c.selfDivide(a).doubleValue(),f=V.valueOf(e.x).selfAdd(V.valueOf(t.x).selfSubtract(e.x).selfMultiply(d)).doubleValue(),p=V.valueOf(t.x).selfSubtract(e.x).selfMultiply(V.valueOf(e.y).selfSubtract(n.y)),_=V.valueOf(t.y).selfSubtract(e.y).selfMultiply(V.valueOf(e.x).selfSubtract(n.x)),S=p.subtract(_),b=S.selfDivide(a).doubleValue(),I=V.valueOf(n.y).selfAdd(V.valueOf(i.y).selfSubtract(n.y).selfMultiply(b)).doubleValue();return new F(f,I)},ln.orientationIndexFilter=function(e,t,n){var i=null,s=(e.x-n.x)*(t.y-n.y),o=(e.y-n.y)*(t.x-n.x),a=s-o;if(s>0){if(o<=0)return ln.signum(a);i=s+o}else if(s<0){if(o>=0)return ln.signum(a);i=-s-o}else return ln.signum(a);var l=ln.DP_SAFE_EPSILON*i;return a>=l||-a>=l?ln.signum(a):2},ln.signum=function(e){return e>0?1:e<0?-1:0},lv.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(ln,lv);var Tt=function(){},pu={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};pu.X.get=function(){return 0},pu.Y.get=function(){return 1},pu.Z.get=function(){return 2},pu.M.get=function(){return 3},Tt.prototype.setOrdinate=function(e,t,n){},Tt.prototype.size=function(){},Tt.prototype.getOrdinate=function(e,t){},Tt.prototype.getCoordinate=function(){},Tt.prototype.getCoordinateCopy=function(e){},Tt.prototype.getDimension=function(){},Tt.prototype.getX=function(e){},Tt.prototype.clone=function(){},Tt.prototype.expandEnvelope=function(e){},Tt.prototype.copy=function(){},Tt.prototype.getY=function(e){},Tt.prototype.toCoordinateArray=function(){},Tt.prototype.interfaces_=function(){return[xc]},Tt.prototype.getClass=function(){return Tt},Object.defineProperties(Tt,pu);var uv=function(){},La=(function(r){function e(){r.call(this,"Projective point not representable on the Cartesian plane.")}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(uv),Ae=function(){};Ae.arraycopy=function(e,t,n,i,s){for(var o=0,a=t;a<t+s;a++)n[i+o]=e[a],o++},Ae.getProperty=function(e){return{"line.separator":`
42
- `}[e]};var sr=function r(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],n=arguments[1];this.x=t,this.y=n,this.w=1}else if(arguments[0]instanceof r&&arguments[1]instanceof r){var i=arguments[0],s=arguments[1];this.x=i.y*s.w-s.y*i.w,this.y=s.x*i.w-i.x*s.w,this.w=i.x*s.y-s.x*i.y}else if(arguments[0]instanceof F&&arguments[1]instanceof F){var o=arguments[0],a=arguments[1];this.x=o.y-a.y,this.y=a.x-o.x,this.w=o.x*a.y-a.x*o.y}}else if(arguments.length===3){var l=arguments[0],u=arguments[1],c=arguments[2];this.x=l,this.y=u,this.w=c}else if(arguments.length===4){var d=arguments[0],f=arguments[1],p=arguments[2],_=arguments[3],S=d.y-f.y,b=f.x-d.x,I=d.x*f.y-f.x*d.y,m=p.y-_.y,w=_.x-p.x,g=p.x*_.y-_.x*p.y;this.x=b*g-w*I,this.y=m*I-S*g,this.w=S*w-m*b}};sr.prototype.getY=function(){var e=this.y/this.w;if(vt.isNaN(e)||vt.isInfinite(e))throw new La;return e},sr.prototype.getX=function(){var e=this.x/this.w;if(vt.isNaN(e)||vt.isInfinite(e))throw new La;return e},sr.prototype.getCoordinate=function(){var e=new F;return e.x=this.getX(),e.y=this.getY(),e},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr},sr.intersection=function(e,t,n,i){var s=e.y-t.y,o=t.x-e.x,a=e.x*t.y-t.x*e.y,l=n.y-i.y,u=i.x-n.x,c=n.x*i.y-i.x*n.y,d=o*c-u*a,f=l*a-s*c,p=s*u-l*o,_=d/p,S=f/p;if(vt.isNaN(_)||vt.isInfinite(_)||vt.isNaN(S)||vt.isInfinite(S))throw new La;return new F(_,S)};var rt=function r(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof F){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof r){var t=arguments[0];this.init(t)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],l=arguments[3];this.init(s,o,a,l)}},cv={serialVersionUID:{configurable:!0}};rt.prototype.getArea=function(){return this.getWidth()*this.getHeight()},rt.prototype.equals=function(e){if(!(e instanceof rt))return!1;var t=e;return this.isNull()?t.isNull():this._maxx===t.getMaxX()&&this._maxy===t.getMaxY()&&this._minx===t.getMinX()&&this._miny===t.getMinY()},rt.prototype.intersection=function(e){if(this.isNull()||e.isNull()||!this.intersects(e))return new rt;var t=this._minx>e._minx?this._minx:e._minx,n=this._miny>e._miny?this._miny:e._miny,i=this._maxx<e._maxx?this._maxx:e._maxx,s=this._maxy<e._maxy?this._maxy:e._maxy;return new rt(t,i,n,s)},rt.prototype.isNull=function(){return this._maxx<this._minx},rt.prototype.getMaxX=function(){return this._maxx},rt.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof F){var e=arguments[0];return this.covers(e.x,e.y)}else if(arguments[0]instanceof rt){var t=arguments[0];return this.isNull()||t.isNull()?!1:t.getMinX()>=this._minx&&t.getMaxX()<=this._maxx&&t.getMinY()>=this._miny&&t.getMaxY()<=this._maxy}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.isNull()?!1:n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy}},rt.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof rt){var e=arguments[0];return this.isNull()||e.isNull()?!1:!(e._minx>this._maxx||e._maxx<this._minx||e._miny>this._maxy||e._maxy<this._miny)}else if(arguments[0]instanceof F){var t=arguments[0];return this.intersects(t.x,t.y)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.isNull()?!1:!(n>this._maxx||n<this._minx||i>this._maxy||i<this._miny)}},rt.prototype.getMinY=function(){return this._miny},rt.prototype.getMinX=function(){return this._minx},rt.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof F){var e=arguments[0];this.expandToInclude(e.x,e.y)}else if(arguments[0]instanceof rt){var t=arguments[0];if(t.isNull())return null;this.isNull()?(this._minx=t.getMinX(),this._maxx=t.getMaxX(),this._miny=t.getMinY(),this._maxy=t.getMaxY()):(t._minx<this._minx&&(this._minx=t._minx),t._maxx>this._maxx&&(this._maxx=t._maxx),t._miny<this._miny&&(this._miny=t._miny),t._maxy>this._maxy&&(this._maxy=t._maxy))}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},rt.prototype.minExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e<t?e:t},rt.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},rt.prototype.compareTo=function(e){var t=e;return this.isNull()?t.isNull()?0:-1:t.isNull()?1:this._minx<t._minx?-1:this._minx>t._minx?1:this._miny<t._miny?-1:this._miny>t._miny?1:this._maxx<t._maxx?-1:this._maxx>t._maxx?1:this._maxy<t._maxy?-1:this._maxy>t._maxy?1:0},rt.prototype.translate=function(e,t){if(this.isNull())return null;this.init(this.getMinX()+e,this.getMaxX()+e,this.getMinY()+t,this.getMaxY()+t)},rt.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},rt.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},rt.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},rt.prototype.maxExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e>t?e:t},rt.prototype.expandBy=function(){if(arguments.length===1){var e=arguments[0];this.expandBy(e,e)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=t,this._maxx+=t,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},rt.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof rt){var e=arguments[0];return this.covers(e)}else if(arguments[0]instanceof F){var t=arguments[0];return this.covers(t)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},rt.prototype.centre=function(){return this.isNull()?null:new F((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},rt.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof F){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof rt){var t=arguments[0];this._minx=t._minx,this._maxx=t._maxx,this._miny=t._miny,this._maxy=t._maxy}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],l=arguments[3];s<o?(this._minx=s,this._maxx=o):(this._minx=o,this._maxx=s),a<l?(this._miny=a,this._maxy=l):(this._miny=l,this._maxy=a)}},rt.prototype.getMaxY=function(){return this._maxy},rt.prototype.distance=function(e){if(this.intersects(e))return 0;var t=0;this._maxx<e._minx?t=e._minx-this._maxx:this._minx>e._maxx&&(t=this._minx-e._maxx);var n=0;return this._maxy<e._miny?n=e._miny-this._maxy:this._miny>e._maxy&&(n=this._miny-e._maxy),t===0?n:n===0?t:Math.sqrt(t*t+n*n)},rt.prototype.hashCode=function(){var e=17;return e=37*e+F.hashCode(this._minx),e=37*e+F.hashCode(this._maxx),e=37*e+F.hashCode(this._miny),e=37*e+F.hashCode(this._maxy),e},rt.prototype.interfaces_=function(){return[Wn,Hn]},rt.prototype.getClass=function(){return rt},rt.intersects=function(){if(arguments.length===3){var e=arguments[0],t=arguments[1],n=arguments[2];return n.x>=(e.x<t.x?e.x:t.x)&&n.x<=(e.x>t.x?e.x:t.x)&&n.y>=(e.y<t.y?e.y:t.y)&&n.y<=(e.y>t.y?e.y:t.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],l=Math.min(o.x,a.x),u=Math.max(o.x,a.x),c=Math.min(i.x,s.x),d=Math.max(i.x,s.x);return!(c>u||d<l||(l=Math.min(o.y,a.y),u=Math.max(o.y,a.y),c=Math.min(i.y,s.y),d=Math.max(i.y,s.y),c>u)||d<l)}},cv.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(rt,cv);var Ir={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},Tc=function(e){this.geometryFactory=e||new bt};Tc.prototype.read=function(e){var t,n,i;e=e.replace(/[\n\r]/g," ");var s=Ir.typeStr.exec(e);if(e.search("EMPTY")!==-1&&(s=Ir.emptyTypeStr.exec(e),s[2]=void 0),s&&(n=s[1].toLowerCase(),i=s[2],Fa[n]&&(t=Fa[n].apply(this,[i]))),t===void 0)throw new Error("Could not parse WKT "+e);return t},Tc.prototype.write=function(e){return this.extractGeometry(e)},Tc.prototype.extractGeometry=function(e){var t=e.getGeometryType().toLowerCase();if(!Ni[t])return null;var n=t.toUpperCase(),i;return e.isEmpty()?i=n+" EMPTY":i=n+"("+Ni[t].apply(this,[e])+")",i};var Ni={coordinate:function(e){return e.x+" "+e.y},point:function(e){return Ni.coordinate.call(this,e._coordinates._coordinates[0])},multipoint:function(e){for(var t=this,n=[],i=0,s=e._geometries.length;i<s;++i)n.push("("+Ni.point.apply(t,[e._geometries[i]])+")");return n.join(",")},linestring:function(e){for(var t=this,n=[],i=0,s=e._points._coordinates.length;i<s;++i)n.push(Ni.coordinate.apply(t,[e._points._coordinates[i]]));return n.join(",")},linearring:function(e){for(var t=this,n=[],i=0,s=e._points._coordinates.length;i<s;++i)n.push(Ni.coordinate.apply(t,[e._points._coordinates[i]]));return n.join(",")},multilinestring:function(e){for(var t=this,n=[],i=0,s=e._geometries.length;i<s;++i)n.push("("+Ni.linestring.apply(t,[e._geometries[i]])+")");return n.join(",")},polygon:function(e){var t=this,n=[];n.push("("+Ni.linestring.apply(this,[e._shell])+")");for(var i=0,s=e._holes.length;i<s;++i)n.push("("+Ni.linestring.apply(t,[e._holes[i]])+")");return n.join(",")},multipolygon:function(e){for(var t=this,n=[],i=0,s=e._geometries.length;i<s;++i)n.push("("+Ni.polygon.apply(t,[e._geometries[i]])+")");return n.join(",")},geometrycollection:function(e){for(var t=this,n=[],i=0,s=e._geometries.length;i<s;++i)n.push(t.extractGeometry(e._geometries[i]));return n.join(",")}},Fa={point:function(e){if(e===void 0)return this.geometryFactory.createPoint();var t=e.trim().split(Ir.spaces);return this.geometryFactory.createPoint(new F(Number.parseFloat(t[0]),Number.parseFloat(t[1])))},multipoint:function(e){var t=this;if(e===void 0)return this.geometryFactory.createMultiPoint();for(var n,i=e.trim().split(","),s=[],o=0,a=i.length;o<a;++o)n=i[o].replace(Ir.trimParens,"$1"),s.push(Fa.point.apply(t,[n]));return this.geometryFactory.createMultiPoint(s)},linestring:function(e){if(e===void 0)return this.geometryFactory.createLineString();for(var t=e.trim().split(","),n=[],i,s=0,o=t.length;s<o;++s)i=t[s].trim().split(Ir.spaces),n.push(new F(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(n)},linearring:function(e){if(e===void 0)return this.geometryFactory.createLinearRing();for(var t=e.trim().split(","),n=[],i,s=0,o=t.length;s<o;++s)i=t[s].trim().split(Ir.spaces),n.push(new F(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(n)},multilinestring:function(e){var t=this;if(e===void 0)return this.geometryFactory.createMultiLineString();for(var n,i=e.trim().split(Ir.parenComma),s=[],o=0,a=i.length;o<a;++o)n=i[o].replace(Ir.trimParens,"$1"),s.push(Fa.linestring.apply(t,[n]));return this.geometryFactory.createMultiLineString(s)},polygon:function(e){var t=this;if(e===void 0)return this.geometryFactory.createPolygon();for(var n,i,s,o=e.trim().split(Ir.parenComma),a,l=[],u=0,c=o.length;u<c;++u)n=o[u].replace(Ir.trimParens,"$1"),i=Fa.linestring.apply(t,[n]),s=t.geometryFactory.createLinearRing(i._points),u===0?a=s:l.push(s);return this.geometryFactory.createPolygon(a,l)},multipolygon:function(e){var t=this;if(e===void 0)return this.geometryFactory.createMultiPolygon();for(var n,i=e.trim().split(Ir.doubleParenComma),s=[],o=0,a=i.length;o<a;++o)n=i[o].replace(Ir.trimParens,"$1"),s.push(Fa.polygon.apply(t,[n]));return this.geometryFactory.createMultiPolygon(s)},geometrycollection:function(e){var t=this;if(e===void 0)return this.geometryFactory.createGeometryCollection();e=e.replace(/,\s*([A-Za-z])/g,"|$1");for(var n=e.trim().split("|"),i=[],s=0,o=n.length;s<o;++s)i.push(t.read(n[s]));return this.geometryFactory.createGeometryCollection(i)}},or=function(e){this.parser=new Tc(e)};or.prototype.write=function(e){return this.parser.write(e)},or.toLineString=function(e,t){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+e.x+" "+e.y+", "+t.x+" "+t.y+" )"};var Mi=(function(r){function e(t){r.call(this,t),this.name="RuntimeException",this.message=t,this.stack=new r().stack}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e})(Error),Oc=(function(r){function e(){if(r.call(this),arguments.length===0)r.call(this);else if(arguments.length===1){var t=arguments[0];r.call(this,t)}}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(Mi),wt=function(){};wt.prototype.interfaces_=function(){return[]},wt.prototype.getClass=function(){return wt},wt.shouldNeverReachHere=function(){if(arguments.length===0)wt.shouldNeverReachHere(null);else if(arguments.length===1){var e=arguments[0];throw new Oc("Should never reach here"+(e!==null?": "+e:""))}},wt.isTrue=function(){var e,t;if(arguments.length===1)e=arguments[0],wt.isTrue(e,null);else if(arguments.length===2&&(e=arguments[0],t=arguments[1],!e))throw t===null?new Oc:new Oc(t)},wt.equals=function(){var e,t,n;if(arguments.length===2)e=arguments[0],t=arguments[1],wt.equals(e,t,null);else if(arguments.length===3&&(e=arguments[0],t=arguments[1],n=arguments[2],!t.equals(e)))throw new Oc("Expected "+e+" but encountered "+t+(n!==null?": "+n:""))};var Zt=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new F,this._intPt[1]=new F,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},Do={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};Zt.prototype.getIndexAlongSegment=function(e,t){return this.computeIntLineIndex(),this._intLineIndex[e][t]},Zt.prototype.getTopologySummary=function(){var e=new br;return this.isEndPoint()&&e.append(" endpoint"),this._isProper&&e.append(" proper"),this.isCollinear()&&e.append(" collinear"),e.toString()},Zt.prototype.computeIntersection=function(e,t,n,i){this._inputLines[0][0]=e,this._inputLines[0][1]=t,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(e,t,n,i)},Zt.prototype.getIntersectionNum=function(){return this._result},Zt.prototype.computeIntLineIndex=function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var e=arguments[0],t=this.getEdgeDistance(e,0),n=this.getEdgeDistance(e,1);t>n?(this._intLineIndex[e][0]=0,this._intLineIndex[e][1]=1):(this._intLineIndex[e][0]=1,this._intLineIndex[e][1]=0)}},Zt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},Zt.prototype.setPrecisionModel=function(e){this._precisionModel=e},Zt.prototype.isInteriorIntersection=function(){var e=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var t=arguments[0],n=0;n<this._result;n++)if(!(e._intPt[n].equals2D(e._inputLines[t][0])||e._intPt[n].equals2D(e._inputLines[t][1])))return!0;return!1}},Zt.prototype.getIntersection=function(e){return this._intPt[e]},Zt.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},Zt.prototype.hasIntersection=function(){return this._result!==Zt.NO_INTERSECTION},Zt.prototype.getEdgeDistance=function(e,t){var n=Zt.computeEdgeDistance(this._intPt[t],this._inputLines[e][0],this._inputLines[e][1]);return n},Zt.prototype.isCollinear=function(){return this._result===Zt.COLLINEAR_INTERSECTION},Zt.prototype.toString=function(){return or.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+or.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},Zt.prototype.getEndpoint=function(e,t){return this._inputLines[e][t]},Zt.prototype.isIntersection=function(e){for(var t=this,n=0;n<this._result;n++)if(t._intPt[n].equals2D(e))return!0;return!1},Zt.prototype.getIntersectionAlongSegment=function(e,t){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[e][t]]},Zt.prototype.interfaces_=function(){return[]},Zt.prototype.getClass=function(){return Zt},Zt.computeEdgeDistance=function(e,t,n){var i=Math.abs(n.x-t.x),s=Math.abs(n.y-t.y),o=-1;if(e.equals(t))o=0;else if(e.equals(n))i>s?o=i:o=s;else{var a=Math.abs(e.x-t.x),l=Math.abs(e.y-t.y);i>s?o=a:o=l,o===0&&!e.equals(t)&&(o=Math.max(a,l))}return wt.isTrue(!(o===0&&!e.equals(t)),"Bad distance calculation"),o},Zt.nonRobustComputeEdgeDistance=function(e,t,n){var i=e.x-t.x,s=e.y-t.y,o=Math.sqrt(i*i+s*s);return wt.isTrue(!(o===0&&!e.equals(t)),"Invalid distance calculation"),o},Do.DONT_INTERSECT.get=function(){return 0},Do.DO_INTERSECT.get=function(){return 1},Do.COLLINEAR.get=function(){return 2},Do.NO_INTERSECTION.get=function(){return 0},Do.POINT_INTERSECTION.get=function(){return 1},Do.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(Zt,Do);var js=(function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(n){var i=new rt(this._inputLines[0][0],this._inputLines[0][1]),s=new rt(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(n)&&s.contains(n)},e.prototype.computeIntersection=function(){if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];if(this._isProper=!1,rt.intersects(i,s,n)&&$.orientationIndex(i,s,n)===0&&$.orientationIndex(s,i,n)===0)return this._isProper=!0,(n.equals(i)||n.equals(s))&&(this._isProper=!1),this._result=r.POINT_INTERSECTION,null;this._result=r.NO_INTERSECTION}else return r.prototype.computeIntersection.apply(this,arguments)},e.prototype.normalizeToMinimum=function(n,i,s,o,a){a.x=this.smallestInAbsValue(n.x,i.x,s.x,o.x),a.y=this.smallestInAbsValue(n.y,i.y,s.y,o.y),n.x-=a.x,n.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},e.prototype.safeHCoordinateIntersection=function(n,i,s,o){var a=null;try{a=sr.intersection(n,i,s,o)}catch(l){if(l instanceof La)a=e.nearestEndpoint(n,i,s,o);else throw l}finally{}return a},e.prototype.intersection=function(n,i,s,o){var a=this.intersectionWithNormalization(n,i,s,o);return this.isInSegmentEnvelopes(a)||(a=new F(e.nearestEndpoint(n,i,s,o))),this._precisionModel!==null&&this._precisionModel.makePrecise(a),a},e.prototype.smallestInAbsValue=function(n,i,s,o){var a=n,l=Math.abs(a);return Math.abs(i)<l&&(a=i,l=Math.abs(i)),Math.abs(s)<l&&(a=s,l=Math.abs(s)),Math.abs(o)<l&&(a=o),a},e.prototype.checkDD=function(n,i,s,o,a){var l=ln.intersection(n,i,s,o),u=this.isInSegmentEnvelopes(l);Ae.out.println("DD in env = "+u+" --------------------- "+l),a.distance(l)>1e-4&&Ae.out.println("Distance = "+a.distance(l))},e.prototype.intersectionWithNormalization=function(n,i,s,o){var a=new F(n),l=new F(i),u=new F(s),c=new F(o),d=new F;this.normalizeToEnvCentre(a,l,u,c,d);var f=this.safeHCoordinateIntersection(a,l,u,c);return f.x+=d.x,f.y+=d.y,f},e.prototype.computeCollinearIntersection=function(n,i,s,o){var a=rt.intersects(n,i,s),l=rt.intersects(n,i,o),u=rt.intersects(s,o,n),c=rt.intersects(s,o,i);return a&&l?(this._intPt[0]=s,this._intPt[1]=o,r.COLLINEAR_INTERSECTION):u&&c?(this._intPt[0]=n,this._intPt[1]=i,r.COLLINEAR_INTERSECTION):a&&u?(this._intPt[0]=s,this._intPt[1]=n,s.equals(n)&&!l&&!c?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):a&&c?(this._intPt[0]=s,this._intPt[1]=i,s.equals(i)&&!l&&!u?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):l&&u?(this._intPt[0]=o,this._intPt[1]=n,o.equals(n)&&!a&&!c?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):l&&c?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!a&&!u?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):r.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(n,i,s,o,a){var l=n.x<i.x?n.x:i.x,u=n.y<i.y?n.y:i.y,c=n.x>i.x?n.x:i.x,d=n.y>i.y?n.y:i.y,f=s.x<o.x?s.x:o.x,p=s.y<o.y?s.y:o.y,_=s.x>o.x?s.x:o.x,S=s.y>o.y?s.y:o.y,b=l>f?l:f,I=c<_?c:_,m=u>p?u:p,w=d<S?d:S,g=(b+I)/2,y=(m+w)/2;a.x=g,a.y=y,n.x-=a.x,n.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},e.prototype.computeIntersect=function(n,i,s,o){if(this._isProper=!1,!rt.intersects(n,i,s,o))return r.NO_INTERSECTION;var a=$.orientationIndex(n,i,s),l=$.orientationIndex(n,i,o);if(a>0&&l>0||a<0&&l<0)return r.NO_INTERSECTION;var u=$.orientationIndex(s,o,n),c=$.orientationIndex(s,o,i);if(u>0&&c>0||u<0&&c<0)return r.NO_INTERSECTION;var d=a===0&&l===0&&u===0&&c===0;return d?this.computeCollinearIntersection(n,i,s,o):(a===0||l===0||u===0||c===0?(this._isProper=!1,n.equals2D(s)||n.equals2D(o)?this._intPt[0]=n:i.equals2D(s)||i.equals2D(o)?this._intPt[0]=i:a===0?this._intPt[0]=new F(s):l===0?this._intPt[0]=new F(o):u===0?this._intPt[0]=new F(n):c===0&&(this._intPt[0]=new F(i))):(this._isProper=!0,this._intPt[0]=this.intersection(n,i,s,o)),r.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(n,i,s,o){var a=n,l=$.distancePointLine(n,s,o),u=$.distancePointLine(i,s,o);return u<l&&(l=u,a=i),u=$.distancePointLine(s,n,i),u<l&&(l=u,a=s),u=$.distancePointLine(o,n,i),u<l&&(l=u,a=o),a},e})(Zt),No=function(){};No.prototype.interfaces_=function(){return[]},No.prototype.getClass=function(){return No},No.orientationIndex=function(e,t,n){var i=t.x-e.x,s=t.y-e.y,o=n.x-t.x,a=n.y-t.y;return No.signOfDet2x2(i,s,o,a)},No.signOfDet2x2=function(e,t,n,i){var s=null,o=null,a=null;if(s=1,e===0||i===0)return t===0||n===0?0:t>0?n>0?-s:s:n>0?s:-s;if(t===0||n===0)return i>0?e>0?s:-s:e>0?-s:s;if(t>0?i>0?t<=i||(s=-s,o=e,e=n,n=o,o=t,t=i,i=o):t<=-i?(s=-s,n=-n,i=-i):(o=e,e=-n,n=o,o=t,t=-i,i=o):i>0?-t<=i?(s=-s,e=-e,t=-t):(o=-e,e=n,n=o,o=-t,t=i,i=o):t>=i?(e=-e,t=-t,n=-n,i=-i):(s=-s,o=-e,e=-n,n=o,o=-t,t=-i,i=o),e>0)if(n>0){if(!(e<=n))return s}else return s;else{if(n>0)return-s;if(e>=n)s=-s,e=-e,n=-n;else return-s}for(;;){if(a=Math.floor(n/e),n=n-a*e,i=i-a*t,i<0)return-s;if(i>t)return s;if(e>n+n){if(t<i+i)return s}else{if(t>i+i)return-s;n=e-n,i=t-i,s=-s}if(i===0)return n===0?0:-s;if(n===0||(a=Math.floor(e/n),e=e-a*n,t=t-a*i,t<0))return s;if(t>i)return-s;if(n>e+e){if(i<t+t)return-s}else{if(i>t+t)return s;e=n-e,t=i-t,s=-s}if(t===0)return e===0?0:s;if(e===0)return-s}};var xr=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var e=arguments[0];this._p=e};xr.prototype.countSegment=function(e,t){if(e.x<this._p.x&&t.x<this._p.x)return null;if(this._p.x===t.x&&this._p.y===t.y)return this._isPointOnSegment=!0,null;if(e.y===this._p.y&&t.y===this._p.y){var n=e.x,i=t.x;return n>i&&(n=t.x,i=e.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(e.y>this._p.y&&t.y<=this._p.y||t.y>this._p.y&&e.y<=this._p.y){var s=e.x-this._p.x,o=e.y-this._p.y,a=t.x-this._p.x,l=t.y-this._p.y,u=No.signOfDet2x2(s,o,a,l);if(u===0)return this._isPointOnSegment=!0,null;l<o&&(u=-u),u>0&&this._crossingCount++}},xr.prototype.isPointInPolygon=function(){return this.getLocation()!==k.EXTERIOR},xr.prototype.getLocation=function(){return this._isPointOnSegment?k.BOUNDARY:this._crossingCount%2===1?k.INTERIOR:k.EXTERIOR},xr.prototype.isOnSegment=function(){return this._isPointOnSegment},xr.prototype.interfaces_=function(){return[]},xr.prototype.getClass=function(){return xr},xr.locatePointInRing=function(){if(arguments[0]instanceof F&&pt(arguments[1],Tt)){for(var e=arguments[0],t=arguments[1],n=new xr(e),i=new F,s=new F,o=1;o<t.size();o++)if(t.getCoordinate(o,i),t.getCoordinate(o-1,s),n.countSegment(i,s),n.isOnSegment())return n.getLocation();return n.getLocation()}else if(arguments[0]instanceof F&&arguments[1]instanceof Array){for(var a=arguments[0],l=arguments[1],u=new xr(a),c=1;c<l.length;c++){var d=l[c],f=l[c-1];if(u.countSegment(d,f),u.isOnSegment())return u.getLocation()}return u.getLocation()}};var $=function(){},Mo={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};$.prototype.interfaces_=function(){return[]},$.prototype.getClass=function(){return $},$.orientationIndex=function(e,t,n){return ln.orientationIndex(e,t,n)},$.signedArea=function(){if(arguments[0]instanceof Array){var e=arguments[0];if(e.length<3)return 0;for(var t=0,n=e[0].x,i=1;i<e.length-1;i++){var s=e[i].x-n,o=e[i+1].y,a=e[i-1].y;t+=s*(a-o)}return t/2}else if(pt(arguments[0],Tt)){var l=arguments[0],u=l.size();if(u<3)return 0;var c=new F,d=new F,f=new F;l.getCoordinate(0,d),l.getCoordinate(1,f);var p=d.x;f.x-=p;for(var _=0,S=1;S<u-1;S++)c.y=d.y,d.x=f.x,d.y=f.y,l.getCoordinate(S+1,f),f.x-=p,_+=d.x*(c.y-f.y);return _/2}},$.distanceLineLine=function(e,t,n,i){if(e.equals(t))return $.distancePointLine(e,n,i);if(n.equals(i))return $.distancePointLine(i,e,t);var s=!1;if(!rt.intersects(e,t,n,i))s=!0;else{var o=(t.x-e.x)*(i.y-n.y)-(t.y-e.y)*(i.x-n.x);if(o===0)s=!0;else{var a=(e.y-n.y)*(i.x-n.x)-(e.x-n.x)*(i.y-n.y),l=(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y),u=l/o,c=a/o;(c<0||c>1||u<0||u>1)&&(s=!0)}}return s?Rn.min($.distancePointLine(e,n,i),$.distancePointLine(t,n,i),$.distancePointLine(n,e,t),$.distancePointLine(i,e,t)):0},$.isPointInRing=function(e,t){return $.locatePointInRing(e,t)!==k.EXTERIOR},$.computeLength=function(e){var t=e.size();if(t<=1)return 0;var n=0,i=new F;e.getCoordinate(0,i);for(var s=i.x,o=i.y,a=1;a<t;a++){e.getCoordinate(a,i);var l=i.x,u=i.y,c=l-s,d=u-o;n+=Math.sqrt(c*c+d*d),s=l,o=u}return n},$.isCCW=function(e){var t=e.length-1;if(t<3)throw new $t("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=e[0],i=0,s=1;s<=t;s++){var o=e[s];o.y>n.y&&(n=o,i=s)}var a=i;do a=a-1,a<0&&(a=t);while(e[a].equals2D(n)&&a!==i);var l=i;do l=(l+1)%t;while(e[l].equals2D(n)&&l!==i);var u=e[a],c=e[l];if(u.equals2D(n)||c.equals2D(n)||u.equals2D(c))return!1;var d=$.computeOrientation(u,n,c),f=!1;return d===0?f=u.x>c.x:f=d>0,f},$.locatePointInRing=function(e,t){return xr.locatePointInRing(e,t)},$.distancePointLinePerpendicular=function(e,t,n){var i=(n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y),s=((t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y))/i;return Math.abs(s)*Math.sqrt(i)},$.computeOrientation=function(e,t,n){return $.orientationIndex(e,t,n)},$.distancePointLine=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1];if(t.length===0)throw new $t("Line array must contain at least one vertex");for(var n=e.distance(t[0]),i=0;i<t.length-1;i++){var s=$.distancePointLine(e,t[i],t[i+1]);s<n&&(n=s)}return n}else if(arguments.length===3){var o=arguments[0],a=arguments[1],l=arguments[2];if(a.x===l.x&&a.y===l.y)return o.distance(a);var u=(l.x-a.x)*(l.x-a.x)+(l.y-a.y)*(l.y-a.y),c=((o.x-a.x)*(l.x-a.x)+(o.y-a.y)*(l.y-a.y))/u;if(c<=0)return o.distance(a);if(c>=1)return o.distance(l);var d=((a.y-o.y)*(l.x-a.x)-(a.x-o.x)*(l.y-a.y))/u;return Math.abs(d)*Math.sqrt(u)}},$.isOnLine=function(e,t){for(var n=new js,i=1;i<t.length;i++){var s=t[i-1],o=t[i];if(n.computeIntersection(e,s,o),n.hasIntersection())return!0}return!1},Mo.CLOCKWISE.get=function(){return-1},Mo.RIGHT.get=function(){return $.CLOCKWISE},Mo.COUNTERCLOCKWISE.get=function(){return 1},Mo.LEFT.get=function(){return $.COUNTERCLOCKWISE},Mo.COLLINEAR.get=function(){return 0},Mo.STRAIGHT.get=function(){return $.COLLINEAR},Object.defineProperties($,Mo);var Ri=function(){};Ri.prototype.filter=function(e){},Ri.prototype.interfaces_=function(){return[]},Ri.prototype.getClass=function(){return Ri};var ht=function(){var e=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=e,this._SRID=e.getSRID()},ni={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};ht.prototype.isGeometryCollection=function(){return this.getSortIndex()===ht.SORTINDEX_GEOMETRYCOLLECTION},ht.prototype.getFactory=function(){return this._factory},ht.prototype.getGeometryN=function(e){return this},ht.prototype.getArea=function(){return 0},ht.prototype.isRectangle=function(){return!1},ht.prototype.equals=function(){if(arguments[0]instanceof ht){var e=arguments[0];return e===null?!1:this.equalsTopo(e)}else if(arguments[0]instanceof Object){var t=arguments[0];if(!(t instanceof ht))return!1;var n=t;return this.equalsExact(n)}},ht.prototype.equalsExact=function(e){return this===e||this.equalsExact(e,0)},ht.prototype.geometryChanged=function(){this.apply(ht.geometryChangedFilter)},ht.prototype.geometryChangedAction=function(){this._envelope=null},ht.prototype.equalsNorm=function(e){return e===null?!1:this.norm().equalsExact(e.norm())},ht.prototype.getLength=function(){return 0},ht.prototype.getNumGeometries=function(){return 1},ht.prototype.compareTo=function(){if(arguments.length===1){var e=arguments[0],t=e;return this.getSortIndex()!==t.getSortIndex()?this.getSortIndex()-t.getSortIndex():this.isEmpty()&&t.isEmpty()?0:this.isEmpty()?-1:t.isEmpty()?1:this.compareToSameClass(e)}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,i)}},ht.prototype.getUserData=function(){return this._userData},ht.prototype.getSRID=function(){return this._SRID},ht.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},ht.prototype.checkNotGeometryCollection=function(e){if(e.getSortIndex()===ht.SORTINDEX_GEOMETRYCOLLECTION)throw new $t("This method does not support GeometryCollection arguments")},ht.prototype.equal=function(e,t,n){return n===0?e.equals(t):e.distance(t)<=n},ht.prototype.norm=function(){var e=this.copy();return e.normalize(),e},ht.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},ht.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new rt(this._envelope)},ht.prototype.setSRID=function(e){this._SRID=e},ht.prototype.setUserData=function(e){this._userData=e},ht.prototype.compare=function(e,t){for(var n=e.iterator(),i=t.iterator();n.hasNext()&&i.hasNext();){var s=n.next(),o=i.next(),a=s.compareTo(o);if(a!==0)return a}return n.hasNext()?1:i.hasNext()?-1:0},ht.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},ht.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===ht.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===ht.SORTINDEX_MULTIPOINT||this.getSortIndex()===ht.SORTINDEX_MULTILINESTRING||this.getSortIndex()===ht.SORTINDEX_MULTIPOLYGON},ht.prototype.interfaces_=function(){return[xc,Wn,Hn]},ht.prototype.getClass=function(){return ht},ht.hasNonEmptyElements=function(e){for(var t=0;t<e.length;t++)if(!e[t].isEmpty())return!0;return!1},ht.hasNullElements=function(e){for(var t=0;t<e.length;t++)if(e[t]===null)return!0;return!1},ni.serialVersionUID.get=function(){return 8763622679187377e3},ni.SORTINDEX_POINT.get=function(){return 0},ni.SORTINDEX_MULTIPOINT.get=function(){return 1},ni.SORTINDEX_LINESTRING.get=function(){return 2},ni.SORTINDEX_LINEARRING.get=function(){return 3},ni.SORTINDEX_MULTILINESTRING.get=function(){return 4},ni.SORTINDEX_POLYGON.get=function(){return 5},ni.SORTINDEX_MULTIPOLYGON.get=function(){return 6},ni.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},ni.geometryChangedFilter.get=function(){return Vd},Object.defineProperties(ht,ni);var Vd=function(){};Vd.interfaces_=function(){return[Ri]},Vd.filter=function(e){e.geometryChangedAction()};var ri=function(){};ri.prototype.filter=function(e){},ri.prototype.interfaces_=function(){return[]},ri.prototype.getClass=function(){return ri};var qn=function(){},Li={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};qn.prototype.isInBoundary=function(e){},qn.prototype.interfaces_=function(){return[]},qn.prototype.getClass=function(){return qn},Li.Mod2BoundaryNodeRule.get=function(){return Aa},Li.EndPointBoundaryNodeRule.get=function(){return ka},Li.MultiValentEndPointBoundaryNodeRule.get=function(){return Va},Li.MonoValentEndPointBoundaryNodeRule.get=function(){return ja},Li.MOD2_BOUNDARY_RULE.get=function(){return new Aa},Li.ENDPOINT_BOUNDARY_RULE.get=function(){return new ka},Li.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new Va},Li.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new ja},Li.OGC_SFS_BOUNDARY_RULE.get=function(){return qn.MOD2_BOUNDARY_RULE},Object.defineProperties(qn,Li);var Aa=function(){};Aa.prototype.isInBoundary=function(e){return e%2===1},Aa.prototype.interfaces_=function(){return[qn]},Aa.prototype.getClass=function(){return Aa};var ka=function(){};ka.prototype.isInBoundary=function(e){return e>0},ka.prototype.interfaces_=function(){return[qn]},ka.prototype.getClass=function(){return ka};var Va=function(){};Va.prototype.isInBoundary=function(e){return e>1},Va.prototype.interfaces_=function(){return[qn]},Va.prototype.getClass=function(){return Va};var ja=function(){};ja.prototype.isInBoundary=function(e){return e===1},ja.prototype.interfaces_=function(){return[qn]},ja.prototype.getClass=function(){return ja};var me=function(){};me.prototype.add=function(){},me.prototype.addAll=function(){},me.prototype.isEmpty=function(){},me.prototype.iterator=function(){},me.prototype.size=function(){},me.prototype.toArray=function(){},me.prototype.remove=function(){};function jd(r){this.message=r||""}jd.prototype=new Error,jd.prototype.name="IndexOutOfBoundsException";var Ba=function(){};Ba.prototype.hasNext=function(){},Ba.prototype.next=function(){},Ba.prototype.remove=function(){};var ar=(function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e})(me);function za(r){this.message=r||""}za.prototype=new Error,za.prototype.name="NoSuchElementException";var Y=(function(r){function e(){r.call(this),this.array_=[],arguments[0]instanceof me&&this.addAll(arguments[0])}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[r,me]},e.prototype.add=function(n){return arguments.length===1?this.array_.push(n):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(n){for(var i=this,s=n.iterator();s.hasNext();)i.add(s.next());return!0},e.prototype.set=function(n,i){var s=this.array_[n];return this.array_[n]=i,s},e.prototype.iterator=function(){return new EC(this)},e.prototype.get=function(n){if(n<0||n>=this.size())throw new jd;return this.array_[n]},e.prototype.isEmpty=function(){return this.array_.length===0},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var n=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(n.array_[s]);return i},e.prototype.remove=function(n){for(var i=this,s=!1,o=0,a=this.array_.length;o<a;o++)if(i.array_[o]===n){i.array_.splice(o,1),s=!0;break}return s},e})(ar),EC=(function(r){function e(t){r.call(this),this.arrayList_=t,this.position_=0}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new za;return this.arrayList_.get(this.position_++)},e.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},e.prototype.set=function(n){return this.arrayList_.set(this.position_-1,n)},e.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},e})(Ba),gu=(function(r){function e(){if(r.call(this),arguments.length!==0){if(arguments.length===1){var n=arguments[0];this.ensureCapacity(n.length),this.add(n,!0)}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.ensureCapacity(i.length),this.add(i,s)}}}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={coordArrayType:{configurable:!0}};return t.coordArrayType.get=function(){return new Array(0).fill(null)},e.prototype.getCoordinate=function(i){return this.get(i)},e.prototype.addAll=function(){var i=this;if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=!1,l=s.iterator();l.hasNext();)i.add(l.next(),o),a=!0;return a}else return r.prototype.addAll.apply(this,arguments)},e.prototype.clone=function(){for(var i=this,s=r.prototype.clone.call(this),o=0;o<this.size();o++)s.add(o,i.get(o).copy());return s},e.prototype.toCoordinateArray=function(){return this.toArray(e.coordArrayType)},e.prototype.add=function(){var i=this;if(arguments.length===1){var s=arguments[0];r.prototype.add.call(this,s)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1];return this.add(o,a,!0),!0}else if(arguments[0]instanceof F&&typeof arguments[1]=="boolean"){var l=arguments[0],u=arguments[1];if(!u&&this.size()>=1){var c=this.get(this.size()-1);if(c.equals2D(l))return null}r.prototype.add.call(this,l)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var d=arguments[0],f=arguments[1];return this.add(d,f),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var p=arguments[0],_=arguments[1],S=arguments[2];if(S)for(var b=0;b<p.length;b++)i.add(p[b],_);else for(var I=p.length-1;I>=0;I--)i.add(p[I],_);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof F){var m=arguments[0],w=arguments[1],g=arguments[2];if(!g){var y=this.size();if(y>0){if(m>0){var E=this.get(m-1);if(E.equals2D(w))return null}if(m<y){var C=this.get(m);if(C.equals2D(w))return null}}}r.prototype.add.call(this,m,w)}}else if(arguments.length===4){var P=arguments[0],T=arguments[1],x=arguments[2],D=arguments[3],R=1;x>D&&(R=-1);for(var L=x;L!==D;L+=R)i.add(P[L],T);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new F(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,t),e})(Y),St=function(){},Dc={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};Dc.ForwardComparator.get=function(){return mu},Dc.BidirectionalComparator.get=function(){return Ua},Dc.coordArrayType.get=function(){return new Array(0).fill(null)},St.prototype.interfaces_=function(){return[]},St.prototype.getClass=function(){return St},St.isRing=function(e){return!(e.length<4||!e[0].equals2D(e[e.length-1]))},St.ptNotInList=function(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(St.indexOf(i,t)<0)return i}return null},St.scroll=function(e,t){var n=St.indexOf(t,e);if(n<0)return null;var i=new Array(e.length).fill(null);Ae.arraycopy(e,n,i,0,e.length-n),Ae.arraycopy(e,0,i,e.length-n,n),Ae.arraycopy(i,0,e,0,e.length)},St.equals=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1];if(e===t)return!0;if(e===null||t===null||e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].equals(t[n]))return!1;return!0}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(i===s)return!0;if(i===null||s===null||i.length!==s.length)return!1;for(var a=0;a<i.length;a++)if(o.compare(i[a],s[a])!==0)return!1;return!0}},St.intersection=function(e,t){for(var n=new gu,i=0;i<e.length;i++)t.intersects(e[i])&&n.add(e[i],!0);return n.toCoordinateArray()},St.hasRepeatedPoints=function(e){for(var t=1;t<e.length;t++)if(e[t-1].equals(e[t]))return!0;return!1},St.removeRepeatedPoints=function(e){if(!St.hasRepeatedPoints(e))return e;var t=new gu(e,!1);return t.toCoordinateArray()},St.reverse=function(e){for(var t=e.length-1,n=Math.trunc(t/2),i=0;i<=n;i++){var s=e[i];e[i]=e[t-i],e[t-i]=s}},St.removeNull=function(e){for(var t=0,n=0;n<e.length;n++)e[n]!==null&&t++;var i=new Array(t).fill(null);if(t===0)return i;for(var s=0,o=0;o<e.length;o++)e[o]!==null&&(i[s++]=e[o]);return i},St.copyDeep=function(){if(arguments.length===1){for(var e=arguments[0],t=new Array(e.length).fill(null),n=0;n<e.length;n++)t[n]=new F(e[n]);return t}else if(arguments.length===5)for(var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],l=arguments[4],u=0;u<l;u++)o[a+u]=new F(i[s+u])},St.isEqualReversed=function(e,t){for(var n=0;n<e.length;n++){var i=e[n],s=t[e.length-n-1];if(i.compareTo(s)!==0)return!1}return!0},St.envelope=function(e){for(var t=new rt,n=0;n<e.length;n++)t.expandToInclude(e[n]);return t},St.toCoordinateArray=function(e){return e.toArray(St.coordArrayType)},St.atLeastNCoordinatesOrNothing=function(e,t){return t.length>=e?t:[]},St.indexOf=function(e,t){for(var n=0;n<t.length;n++)if(e.equals(t[n]))return n;return-1},St.increasingDirection=function(e){for(var t=0;t<Math.trunc(e.length/2);t++){var n=e.length-1-t,i=e[t].compareTo(e[n]);if(i!==0)return i}return 1},St.compare=function(e,t){for(var n=0;n<e.length&&n<t.length;){var i=e[n].compareTo(t[n]);if(i!==0)return i;n++}return n<t.length?-1:n<e.length?1:0},St.minCoordinate=function(e){for(var t=null,n=0;n<e.length;n++)(t===null||t.compareTo(e[n])>0)&&(t=e[n]);return t},St.extract=function(e,t,n){t=Rn.clamp(t,0,e.length),n=Rn.clamp(n,-1,e.length);var i=n-t+1;n<0&&(i=0),t>=e.length&&(i=0),n<t&&(i=0);var s=new Array(i).fill(null);if(i===0)return s;for(var o=0,a=t;a<=n;a++)s[o++]=e[a];return s},Object.defineProperties(St,Dc);var mu=function(){};mu.prototype.compare=function(e,t){var n=e,i=t;return St.compare(n,i)},mu.prototype.interfaces_=function(){return[Ma]},mu.prototype.getClass=function(){return mu};var Ua=function(){};Ua.prototype.compare=function(e,t){var n=e,i=t;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;var s=St.compare(n,i),o=St.isEqualReversed(n,i);return o?0:s},Ua.prototype.OLDcompare=function(e,t){var n=e,i=t;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;for(var s=St.increasingDirection(n),o=St.increasingDirection(i),a=s>0?0:n.length-1,l=o>0?0:n.length-1,u=0;u<n.length;u++){var c=n[a].compareTo(i[l]);if(c!==0)return c;a+=s,l+=o}return 0},Ua.prototype.interfaces_=function(){return[Ma]},Ua.prototype.getClass=function(){return Ua};var Ro=function(){};Ro.prototype.get=function(){},Ro.prototype.put=function(){},Ro.prototype.size=function(){},Ro.prototype.values=function(){},Ro.prototype.entrySet=function(){};var CC=(function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e})(Ro);function vu(r){this.message=r||""}vu.prototype=new Error,vu.prototype.name="OperationNotSupported";function Nc(){}Nc.prototype=new me,Nc.prototype.contains=function(){};var Bd=(function(r){function e(){r.call(this),this.array_=[],arguments[0]instanceof me&&this.addAll(arguments[0])}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.contains=function(n){for(var i=this,s=0,o=this.array_.length;s<o;s++){var a=i.array_[s];if(a===n)return!0}return!1},e.prototype.add=function(n){return this.contains(n)?!1:(this.array_.push(n),!0)},e.prototype.addAll=function(n){for(var i=this,s=n.iterator();s.hasNext();)i.add(s.next());return!0},e.prototype.remove=function(n){throw new Error},e.prototype.size=function(){return this.array_.length},e.prototype.isEmpty=function(){return this.array_.length===0},e.prototype.toArray=function(){for(var n=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(n.array_[s]);return i},e.prototype.iterator=function(){return new SC(this)},e})(Nc),SC=(function(r){function e(t){r.call(this),this.hashSet_=t,this.position_=0}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new za;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new vu},e})(Ba),Fi=0,Bs=1;function hv(r){return r===null?Fi:r.color}function Ht(r){return r===null?null:r.parent}function Ai(r,e){r!==null&&(r.color=e)}function zd(r){return r===null?null:r.left}function dv(r){return r===null?null:r.right}function qe(){this.root_=null,this.size_=0}qe.prototype=new CC,qe.prototype.get=function(r){for(var e=this.root_;e!==null;){var t=r.compareTo(e.key);if(t<0)e=e.left;else if(t>0)e=e.right;else return e.value}return null},qe.prototype.put=function(r,e){if(this.root_===null)return this.root_={key:r,value:e,left:null,right:null,parent:null,color:Fi,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var t=this.root_,n,i;do if(n=t,i=r.compareTo(t.key),i<0)t=t.left;else if(i>0)t=t.right;else{var s=t.value;return t.value=e,s}while(t!==null);var o={key:r,left:null,right:null,value:e,parent:n,color:Fi,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=o:n.right=o,this.fixAfterInsertion(o),this.size_++,null},qe.prototype.fixAfterInsertion=function(r){var e=this;for(r.color=Bs;r!=null&&r!==this.root_&&r.parent.color===Bs;)if(Ht(r)===zd(Ht(Ht(r)))){var t=dv(Ht(Ht(r)));hv(t)===Bs?(Ai(Ht(r),Fi),Ai(t,Fi),Ai(Ht(Ht(r)),Bs),r=Ht(Ht(r))):(r===dv(Ht(r))&&(r=Ht(r),e.rotateLeft(r)),Ai(Ht(r),Fi),Ai(Ht(Ht(r)),Bs),e.rotateRight(Ht(Ht(r))))}else{var n=zd(Ht(Ht(r)));hv(n)===Bs?(Ai(Ht(r),Fi),Ai(n,Fi),Ai(Ht(Ht(r)),Bs),r=Ht(Ht(r))):(r===zd(Ht(r))&&(r=Ht(r),e.rotateRight(r)),Ai(Ht(r),Fi),Ai(Ht(Ht(r)),Bs),e.rotateLeft(Ht(Ht(r))))}this.root_.color=Fi},qe.prototype.values=function(){var r=new Y,e=this.getFirstEntry();if(e!==null)for(r.add(e.value);(e=qe.successor(e))!==null;)r.add(e.value);return r},qe.prototype.entrySet=function(){var r=new Bd,e=this.getFirstEntry();if(e!==null)for(r.add(e);(e=qe.successor(e))!==null;)r.add(e);return r},qe.prototype.rotateLeft=function(r){if(r!=null){var e=r.right;r.right=e.left,e.left!=null&&(e.left.parent=r),e.parent=r.parent,r.parent===null?this.root_=e:r.parent.left===r?r.parent.left=e:r.parent.right=e,e.left=r,r.parent=e}},qe.prototype.rotateRight=function(r){if(r!=null){var e=r.left;r.left=e.right,e.right!=null&&(e.right.parent=r),e.parent=r.parent,r.parent===null?this.root_=e:r.parent.right===r?r.parent.right=e:r.parent.left=e,e.right=r,r.parent=e}},qe.prototype.getFirstEntry=function(){var r=this.root_;if(r!=null)for(;r.left!=null;)r=r.left;return r},qe.successor=function(r){if(r===null)return null;if(r.right!==null){for(var e=r.right;e.left!==null;)e=e.left;return e}else{for(var t=r.parent,n=r;t!==null&&n===t.right;)n=t,t=t.parent;return t}},qe.prototype.size=function(){return this.size_};var yu=function(){};yu.prototype.interfaces_=function(){return[]},yu.prototype.getClass=function(){return yu};function fv(){}fv.prototype=new Nc;function Tr(){this.array_=[],arguments[0]instanceof me&&this.addAll(arguments[0])}Tr.prototype=new fv,Tr.prototype.contains=function(r){for(var e=this,t=0,n=this.array_.length;t<n;t++){var i=e.array_[t];if(i.compareTo(r)===0)return!0}return!1},Tr.prototype.add=function(r){var e=this;if(this.contains(r))return!1;for(var t=0,n=this.array_.length;t<n;t++){var i=e.array_[t];if(i.compareTo(r)===1)return e.array_.splice(t,0,r),!0}return this.array_.push(r),!0},Tr.prototype.addAll=function(r){for(var e=this,t=r.iterator();t.hasNext();)e.add(t.next());return!0},Tr.prototype.remove=function(r){throw new vu},Tr.prototype.size=function(){return this.array_.length},Tr.prototype.isEmpty=function(){return this.array_.length===0},Tr.prototype.toArray=function(){for(var r=this,e=[],t=0,n=this.array_.length;t<n;t++)e.push(r.array_[t]);return e},Tr.prototype.iterator=function(){return new Mc(this)};var Mc=function(r){this.treeSet_=r,this.position_=0};Mc.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new za;return this.treeSet_.array_[this.position_++]},Mc.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Mc.prototype.remove=function(){throw new vu};var zs=function(){};zs.sort=function(){var e=arguments[0],t,n,i,s;if(arguments.length===1)s=function(a,l){return a.compareTo(l)},e.sort(s);else if(arguments.length===2)i=arguments[1],s=function(a,l){return i.compare(a,l)},e.sort(s);else if(arguments.length===3){n=e.slice(arguments[1],arguments[2]),n.sort();var o=e.slice(0,arguments[1]).concat(n,e.slice(arguments[2],e.length));for(e.splice(0,e.length),t=0;t<o.length;t++)e.push(o[t])}else if(arguments.length===4)for(n=e.slice(arguments[1],arguments[2]),i=arguments[3],s=function(a,l){return i.compare(a,l)},n.sort(s),o=e.slice(0,arguments[1]).concat(n,e.slice(arguments[2],e.length)),e.splice(0,e.length),t=0;t<o.length;t++)e.push(o[t])},zs.asList=function(e){for(var t=new Y,n=0,i=e.length;n<i;n++)t.add(e[n]);return t};var Nt=function(){},lr={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};lr.P.get=function(){return 0},lr.L.get=function(){return 1},lr.A.get=function(){return 2},lr.FALSE.get=function(){return-1},lr.TRUE.get=function(){return-2},lr.DONTCARE.get=function(){return-3},lr.SYM_FALSE.get=function(){return"F"},lr.SYM_TRUE.get=function(){return"T"},lr.SYM_DONTCARE.get=function(){return"*"},lr.SYM_P.get=function(){return"0"},lr.SYM_L.get=function(){return"1"},lr.SYM_A.get=function(){return"2"},Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt},Nt.toDimensionSymbol=function(e){switch(e){case Nt.FALSE:return Nt.SYM_FALSE;case Nt.TRUE:return Nt.SYM_TRUE;case Nt.DONTCARE:return Nt.SYM_DONTCARE;case Nt.P:return Nt.SYM_P;case Nt.L:return Nt.SYM_L;case Nt.A:return Nt.SYM_A}throw new $t("Unknown dimension value: "+e)},Nt.toDimensionValue=function(e){switch(fu.toUpperCase(e)){case Nt.SYM_FALSE:return Nt.FALSE;case Nt.SYM_TRUE:return Nt.TRUE;case Nt.SYM_DONTCARE:return Nt.DONTCARE;case Nt.SYM_P:return Nt.P;case Nt.SYM_L:return Nt.L;case Nt.SYM_A:return Nt.A}throw new $t("Unknown dimension symbol: "+e)},Object.defineProperties(Nt,lr);var Or=function(){};Or.prototype.filter=function(e){},Or.prototype.interfaces_=function(){return[]},Or.prototype.getClass=function(){return Or};var ur=function(){};ur.prototype.filter=function(e,t){},ur.prototype.isDone=function(){},ur.prototype.isGeometryChanged=function(){},ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur};var Ke=(function(r){function e(n,i){if(r.call(this,i),this._geometries=n||[],r.hasNullElements(this._geometries))throw new $t("geometries must not contain null elements")}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){for(var i=this,s=new rt,o=0;o<this._geometries.length;o++)s.expandToInclude(i._geometries[o].getEnvelopeInternal());return s},e.prototype.getGeometryN=function(i){return this._geometries[i]},e.prototype.getSortIndex=function(){return r.SORTINDEX_GEOMETRYCOLLECTION},e.prototype.getCoordinates=function(){for(var i=this,s=new Array(this.getNumPoints()).fill(null),o=-1,a=0;a<this._geometries.length;a++)for(var l=i._geometries[a].getCoordinates(),u=0;u<l.length;u++)o++,s[o]=l[u];return s},e.prototype.getArea=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getArea();return s},e.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._geometries.length!==a._geometries.length)return!1;for(var l=0;l<this._geometries.length;l++)if(!i._geometries[l].equalsExact(a._geometries[l],o))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var i=this,s=0;s<this._geometries.length;s++)i._geometries[s].normalize();zs.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var i=this,s=Nt.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getBoundaryDimension());return s},e.prototype.getDimension=function(){for(var i=this,s=Nt.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getDimension());return s},e.prototype.getLength=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getLength();return s},e.prototype.getNumPoints=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getNumPoints();return s},e.prototype.getNumGeometries=function(){return this._geometries.length},e.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createGeometryCollection(o)},e.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=new Tr(zs.asList(this._geometries)),a=new Tr(zs.asList(s._geometries));return this.compare(o,a)}else if(arguments.length===2){for(var l=arguments[0],u=arguments[1],c=l,d=this.getNumGeometries(),f=c.getNumGeometries(),p=0;p<d&&p<f;){var _=i.getGeometryN(p),S=c.getGeometryN(p),b=_.compareToSameClass(S,u);if(b!==0)return b;p++}return p<d?1:p<f?-1:0}},e.prototype.apply=function(){var i=this;if(pt(arguments[0],ri))for(var s=arguments[0],o=0;o<this._geometries.length;o++)i._geometries[o].apply(s);else if(pt(arguments[0],ur)){var a=arguments[0];if(this._geometries.length===0)return null;for(var l=0;l<this._geometries.length&&(i._geometries[l].apply(a),!a.isDone());l++);a.isGeometryChanged()&&this.geometryChanged()}else if(pt(arguments[0],Or)){var u=arguments[0];u.filter(this);for(var c=0;c<this._geometries.length;c++)i._geometries[c].apply(u)}else if(pt(arguments[0],Ri)){var d=arguments[0];d.filter(this);for(var f=0;f<this._geometries.length;f++)i._geometries[f].apply(d)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),wt.shouldNeverReachHere(),null},e.prototype.clone=function(){var i=this,s=r.prototype.clone.call(this);s._geometries=new Array(this._geometries.length).fill(null);for(var o=0;o<this._geometries.length;o++)s._geometries[o]=i._geometries[o].clone();return s},e.prototype.getGeometryType=function(){return"GeometryCollection"},e.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new e(s,this._factory)},e.prototype.isEmpty=function(){for(var i=this,s=0;s<this._geometries.length;s++)if(!i._geometries[s].isEmpty())return!1;return!0},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(e,t),e})(ht),Us=(function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ht.SORTINDEX_MULTILINESTRING},e.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Nt.FALSE:0},e.prototype.isClosed=function(){var i=this;if(this.isEmpty())return!1;for(var s=0;s<this._geometries.length;s++)if(!i._geometries[s].isClosed())return!1;return!0},e.prototype.getDimension=function(){return 1},e.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[s-1-a]=i._geometries[a].reverse();return this.getFactory().createMultiLineString(o)},e.prototype.getBoundary=function(){return new Xn(this).getBoundary()},e.prototype.getGeometryType=function(){return"MultiLineString"},e.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new e(s,this._factory)},e.prototype.interfaces_=function(){return[yu]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(e,t),e})(Ke),Xn=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var e=arguments[0],t=qn.MOD2_BOUNDARY_RULE;this._geom=e,this._geomFact=e.getFactory(),this._bnRule=t}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=i}};Xn.prototype.boundaryMultiLineString=function(e){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var t=this.computeBoundaryCoordinates(e);return t.length===1?this._geomFact.createPoint(t[0]):this._geomFact.createMultiPointFromCoords(t)},Xn.prototype.getBoundary=function(){return this._geom instanceof ee?this.boundaryLineString(this._geom):this._geom instanceof Us?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},Xn.prototype.boundaryLineString=function(e){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(e.isClosed()){var t=this._bnRule.isInBoundary(2);return t?e.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([e.getStartPoint(),e.getEndPoint()])},Xn.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},Xn.prototype.computeBoundaryCoordinates=function(e){var t=this,n=new Y;this._endpointMap=new qe;for(var i=0;i<e.getNumGeometries();i++){var s=e.getGeometryN(i);s.getNumPoints()!==0&&(t.addEndpoint(s.getCoordinateN(0)),t.addEndpoint(s.getCoordinateN(s.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var a=o.next(),l=a.getValue(),u=l.count;t._bnRule.isInBoundary(u)&&n.add(a.getKey())}return St.toCoordinateArray(n)},Xn.prototype.addEndpoint=function(e){var t=this._endpointMap.get(e);t===null&&(t=new Rc,this._endpointMap.put(e,t)),t.count++},Xn.prototype.interfaces_=function(){return[]},Xn.prototype.getClass=function(){return Xn},Xn.getBoundary=function(){if(arguments.length===1){var e=arguments[0],t=new Xn(e);return t.getBoundary()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=new Xn(n,i);return s.getBoundary()}};var Rc=function(){this.count=null};Rc.prototype.interfaces_=function(){return[]},Rc.prototype.getClass=function(){return Rc};function bC(){}function PC(){}var IC=function(){};function xC(){}function TC(){}function OC(){}var Yn=function(){},Ud={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Yn.prototype.interfaces_=function(){return[]},Yn.prototype.getClass=function(){return Yn},Yn.chars=function(e,t){for(var n=new Array(t).fill(null),i=0;i<t;i++)n[i]=e;return String(n)},Yn.getStackTrace=function(){if(arguments.length===1){var e=arguments[0],t=new xC,n=new bC;return e.printStackTrace(n),t.toString()}else if(arguments.length===2){var i=arguments[0],s=arguments[1],o="";new PC(Yn.getStackTrace(i));for(var a=new OC,l=0;l<s;l++)try{o+=a.readLine()+Yn.NEWLINE}catch(u){if(u instanceof TC)wt.shouldNeverReachHere();else throw u}finally{}return o}},Yn.split=function(e,t){for(var n=t.length,i=new Y,s=""+e,o=s.indexOf(t);o>=0;){var a=s.substring(0,o);i.add(a),s=s.substring(o+n),o=s.indexOf(t)}s.length>0&&i.add(s);for(var l=new Array(i.size()).fill(null),u=0;u<l.length;u++)l[u]=i.get(u);return l},Yn.toString=function(){if(arguments.length===1){var e=arguments[0];return Yn.SIMPLE_ORDINATE_FORMAT.format(e)}},Yn.spaces=function(e){return Yn.chars(" ",e)},Ud.NEWLINE.get=function(){return Ae.getProperty("line.separator")},Ud.SIMPLE_ORDINATE_FORMAT.get=function(){return new IC},Object.defineProperties(Yn,Ud);var se=function(){};se.prototype.interfaces_=function(){return[]},se.prototype.getClass=function(){return se},se.copyCoord=function(e,t,n,i){for(var s=Math.min(e.getDimension(),n.getDimension()),o=0;o<s;o++)n.setOrdinate(i,o,e.getOrdinate(t,o))},se.isRing=function(e){var t=e.size();return t===0?!0:t<=3?!1:e.getOrdinate(0,Tt.X)===e.getOrdinate(t-1,Tt.X)&&e.getOrdinate(0,Tt.Y)===e.getOrdinate(t-1,Tt.Y)},se.isEqual=function(e,t){var n=e.size(),i=t.size();if(n!==i)return!1;for(var s=Math.min(e.getDimension(),t.getDimension()),o=0;o<n;o++)for(var a=0;a<s;a++){var l=e.getOrdinate(o,a),u=t.getOrdinate(o,a);if(e.getOrdinate(o,a)!==t.getOrdinate(o,a)&&!(vt.isNaN(l)&&vt.isNaN(u)))return!1}return!0},se.extend=function(e,t,n){var i=e.create(n,t.getDimension()),s=t.size();if(se.copy(t,0,i,0,s),s>0)for(var o=s;o<n;o++)se.copy(t,s-1,i,o,1);return i},se.reverse=function(e){for(var t=e.size()-1,n=Math.trunc(t/2),i=0;i<=n;i++)se.swap(e,i,t-i)},se.swap=function(e,t,n){if(t===n)return null;for(var i=0;i<e.getDimension();i++){var s=e.getOrdinate(t,i);e.setOrdinate(t,i,e.getOrdinate(n,i)),e.setOrdinate(n,i,s)}},se.copy=function(e,t,n,i,s){for(var o=0;o<s;o++)se.copyCoord(e,t+o,n,i+o)},se.toString=function(){if(arguments.length===1){var e=arguments[0],t=e.size();if(t===0)return"()";var n=e.getDimension(),i=new br;i.append("(");for(var s=0;s<t;s++){s>0&&i.append(" ");for(var o=0;o<n;o++)o>0&&i.append(","),i.append(Yn.toString(e.getOrdinate(s,o)))}return i.append(")"),i.toString()}},se.ensureValidRing=function(e,t){var n=t.size();if(n===0)return t;if(n<=3)return se.createClosedRing(e,t,4);var i=t.getOrdinate(0,Tt.X)===t.getOrdinate(n-1,Tt.X)&&t.getOrdinate(0,Tt.Y)===t.getOrdinate(n-1,Tt.Y);return i?t:se.createClosedRing(e,t,n+1)},se.createClosedRing=function(e,t,n){var i=e.create(n,t.getDimension()),s=t.size();se.copy(t,0,i,0,s);for(var o=s;o<n;o++)se.copy(t,0,i,o,1);return i};var ee=(function(r){function e(n,i){r.call(this,i),this._points=null,this.init(n)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new rt:this._points.expandEnvelope(new rt)},e.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},e.prototype.getSortIndex=function(){return r.SORTINDEX_LINESTRING},e.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},e.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._points.size()!==a._points.size())return!1;for(var l=0;l<this._points.size();l++)if(!i.equal(i._points.getCoordinate(l),a._points.getCoordinate(l),o))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var i=this,s=0;s<Math.trunc(this._points.size()/2);s++){var o=i._points.size()-1-s;if(!i._points.getCoordinate(s).equals(i._points.getCoordinate(o)))return i._points.getCoordinate(s).compareTo(i._points.getCoordinate(o))>0&&se.reverse(i._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Nt.FALSE:0},e.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return $.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var i=this._points.copy();se.reverse(i);var s=this.getFactory().createLineString(i);return s},e.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var s=arguments[0],o=s,a=0,l=0;a<this._points.size()&&l<o._points.size();){var u=i._points.getCoordinate(a).compareTo(o._points.getCoordinate(l));if(u!==0)return u;a++,l++}return a<this._points.size()?1:l<o._points.size()?-1:0}else if(arguments.length===2){var c=arguments[0],d=arguments[1],f=c;return d.compare(this._points,f._points)}},e.prototype.apply=function(){var i=this;if(pt(arguments[0],ri))for(var s=arguments[0],o=0;o<this._points.size();o++)s.filter(i._points.getCoordinate(o));else if(pt(arguments[0],ur)){var a=arguments[0];if(this._points.size()===0)return null;for(var l=0;l<this._points.size()&&(a.filter(i._points,l),!a.isDone());l++);a.isGeometryChanged()&&this.geometryChanged()}else if(pt(arguments[0],Or)){var u=arguments[0];u.filter(this)}else if(pt(arguments[0],Ri)){var c=arguments[0];c.filter(this)}},e.prototype.getBoundary=function(){return new Xn(this).getBoundary()},e.prototype.isEquivalentClass=function(i){return i instanceof e},e.prototype.clone=function(){var i=r.prototype.clone.call(this);return i._points=this._points.clone(),i},e.prototype.getCoordinateN=function(i){return this._points.getCoordinate(i)},e.prototype.getGeometryType=function(){return"LineString"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._points},e.prototype.isEmpty=function(){return this._points.size()===0},e.prototype.init=function(i){if(i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),i.size()===1)throw new $t("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},e.prototype.isCoordinate=function(i){for(var s=this,o=0;o<this._points.size();o++)if(s._points.getCoordinate(o).equals(i))return!0;return!1},e.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},e.prototype.getPointN=function(i){return this.getFactory().createPoint(this._points.getCoordinate(i))},e.prototype.interfaces_=function(){return[yu]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,t),e})(ht),_u=function(){};_u.prototype.interfaces_=function(){return[]},_u.prototype.getClass=function(){return _u};var yn=(function(r){function e(n,i){r.call(this,i),this._coordinates=n||null,this.init(this._coordinates)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new rt;var i=new rt;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},e.prototype.getSortIndex=function(){return r.SORTINDEX_POINT},e.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},e.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?this.isEmpty()&&i.isEmpty()?!0:this.isEmpty()!==i.isEmpty()?!1:this.equal(i.getCoordinate(),this.getCoordinate(),s):!1}else return r.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){},e.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},e.prototype.getBoundaryDimension=function(){return Nt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getNumPoints=function(){return this.isEmpty()?0:1},e.prototype.reverse=function(){return this.copy()},e.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},e.prototype.compareToSameClass=function(){if(arguments.length===1){var i=arguments[0],s=i;return this.getCoordinate().compareTo(s.getCoordinate())}else if(arguments.length===2){var o=arguments[0],a=arguments[1],l=o;return a.compare(this._coordinates,l._coordinates)}},e.prototype.apply=function(){if(pt(arguments[0],ri)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(pt(arguments[0],ur)){var s=arguments[0];if(this.isEmpty())return null;s.filter(this._coordinates,0),s.isGeometryChanged()&&this.geometryChanged()}else if(pt(arguments[0],Or)){var o=arguments[0];o.filter(this)}else if(pt(arguments[0],Ri)){var a=arguments[0];a.filter(this)}},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.clone=function(){var i=r.prototype.clone.call(this);return i._coordinates=this._coordinates.clone(),i},e.prototype.getGeometryType=function(){return"Point"},e.prototype.copy=function(){return new e(this._coordinates.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._coordinates},e.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},e.prototype.isEmpty=function(){return this._coordinates.size()===0},e.prototype.init=function(i){i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),wt.isTrue(i.size()<=1),this._coordinates=i},e.prototype.isSimple=function(){return!0},e.prototype.interfaces_=function(){return[_u]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(e,t),e})(ht),ds=function(){};ds.prototype.interfaces_=function(){return[]},ds.prototype.getClass=function(){return ds};var ve=(function(r){function e(n,i,s){if(r.call(this,s),this._shell=null,this._holes=null,n===null&&(n=this.getFactory().createLinearRing()),i===null&&(i=[]),r.hasNullElements(i))throw new $t("holes must not contain null elements");if(n.isEmpty()&&r.hasNonEmptyElements(i))throw new $t("shell is empty but holes are not");this._shell=n,this._holes=i}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},e.prototype.getSortIndex=function(){return r.SORTINDEX_POLYGON},e.prototype.getCoordinates=function(){var i=this;if(this.isEmpty())return[];for(var s=new Array(this.getNumPoints()).fill(null),o=-1,a=this._shell.getCoordinates(),l=0;l<a.length;l++)o++,s[o]=a[l];for(var u=0;u<this._holes.length;u++)for(var c=i._holes[u].getCoordinates(),d=0;d<c.length;d++)o++,s[o]=c[d];return s},e.prototype.getArea=function(){var i=this,s=0;s+=Math.abs($.signedArea(this._shell.getCoordinateSequence()));for(var o=0;o<this._holes.length;o++)s-=Math.abs($.signedArea(i._holes[o].getCoordinateSequence()));return s},e.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var i=this._shell.getCoordinateSequence(),s=this.getEnvelopeInternal(),o=0;o<5;o++){var a=i.getX(o);if(!(a===s.getMinX()||a===s.getMaxX()))return!1;var l=i.getY(o);if(!(l===s.getMinY()||l===s.getMaxY()))return!1}for(var u=i.getX(0),c=i.getY(0),d=1;d<=4;d++){var f=i.getX(d),p=i.getY(d),_=f!==u,S=p!==c;if(_===S)return!1;u=f,c=p}return!0},e.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s,l=this._shell,u=a._shell;if(!l.equalsExact(u,o)||this._holes.length!==a._holes.length)return!1;for(var c=0;c<this._holes.length;c++)if(!i._holes[c].equalsExact(a._holes[c],o))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){var i=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var s=0;s<this._holes.length;s++)i.normalize(i._holes[s],!1);zs.sort(this._holes)}else if(arguments.length===2){var o=arguments[0],a=arguments[1];if(o.isEmpty())return null;var l=new Array(o.getCoordinates().length-1).fill(null);Ae.arraycopy(o.getCoordinates(),0,l,0,l.length);var u=St.minCoordinate(o.getCoordinates());St.scroll(l,u),Ae.arraycopy(l,0,o.getCoordinates(),0,l.length),o.getCoordinates()[l.length]=l[0],$.isCCW(o.getCoordinates())===a&&St.reverse(o.getCoordinates())}},e.prototype.getCoordinate=function(){return this._shell.getCoordinate()},e.prototype.getNumInteriorRing=function(){return this._holes.length},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.getLength=function(){var i=this,s=0;s+=this._shell.getLength();for(var o=0;o<this._holes.length;o++)s+=i._holes[o].getLength();return s},e.prototype.getNumPoints=function(){for(var i=this,s=this._shell.getNumPoints(),o=0;o<this._holes.length;o++)s+=i._holes[o].getNumPoints();return s},e.prototype.reverse=function(){var i=this,s=this.copy();s._shell=this._shell.copy().reverse(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].copy().reverse();return s},e.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},e.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=this._shell,a=s._shell;return o.compareToSameClass(a)}else if(arguments.length===2){var l=arguments[0],u=arguments[1],c=l,d=this._shell,f=c._shell,p=d.compareToSameClass(f,u);if(p!==0)return p;for(var _=this.getNumInteriorRing(),S=c.getNumInteriorRing(),b=0;b<_&&b<S;){var I=i.getInteriorRingN(b),m=c.getInteriorRingN(b),w=I.compareToSameClass(m,u);if(w!==0)return w;b++}return b<_?1:b<S?-1:0}},e.prototype.apply=function(i){var s=this;if(pt(i,ri)){this._shell.apply(i);for(var o=0;o<this._holes.length;o++)s._holes[o].apply(i)}else if(pt(i,ur)){if(this._shell.apply(i),!i.isDone())for(var a=0;a<this._holes.length&&(s._holes[a].apply(i),!i.isDone());a++);i.isGeometryChanged()&&this.geometryChanged()}else if(pt(i,Or))i.filter(this);else if(pt(i,Ri)){i.filter(this),this._shell.apply(i);for(var l=0;l<this._holes.length;l++)s._holes[l].apply(i)}},e.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var s=new Array(this._holes.length+1).fill(null);s[0]=this._shell;for(var o=0;o<this._holes.length;o++)s[o+1]=i._holes[o];return s.length<=1?this.getFactory().createLinearRing(s[0].getCoordinateSequence()):this.getFactory().createMultiLineString(s)},e.prototype.clone=function(){var i=this,s=r.prototype.clone.call(this);s._shell=this._shell.clone(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].clone();return s},e.prototype.getGeometryType=function(){return"Polygon"},e.prototype.copy=function(){for(var i=this,s=this._shell.copy(),o=new Array(this._holes.length).fill(null),a=0;a<o.length;a++)o[a]=i._holes[a].copy();return new e(s,o,this._factory)},e.prototype.getExteriorRing=function(){return this._shell},e.prototype.isEmpty=function(){return this._shell.isEmpty()},e.prototype.getInteriorRingN=function(i){return this._holes[i]},e.prototype.interfaces_=function(){return[ds]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,t),e})(ht),Ga=(function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ht.SORTINDEX_MULTIPOINT},e.prototype.isValid=function(){return!0},e.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},e.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return r.prototype.getCoordinate.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return Nt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.getGeometryType=function(){return"MultiPoint"},e.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new e(s,this._factory)},e.prototype.interfaces_=function(){return[_u]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(e,t),e})(Ke),ii=(function(r){function e(n,i){n instanceof F&&i instanceof bt&&(n=i.getCoordinateSequenceFactory().create(n)),r.call(this,n,i),this.validateConstruction()}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ht.SORTINDEX_LINEARRING},e.prototype.getBoundaryDimension=function(){return Nt.FALSE},e.prototype.isClosed=function(){return this.isEmpty()?!0:r.prototype.isClosed.call(this)},e.prototype.reverse=function(){var i=this._points.copy();se.reverse(i);var s=this.getFactory().createLinearRing(i);return s},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!r.prototype.isClosed.call(this))throw new $t("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new $t("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},t.MINIMUM_VALID_SIZE.get=function(){return 4},t.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,t),e})(ee),si=(function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ht.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createMultiPolygon(o)},e.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var s=new Y,o=0;o<this._geometries.length;o++)for(var a=i._geometries[o],l=a.getBoundary(),u=0;u<l.getNumGeometries();u++)s.add(l.getGeometryN(u));var c=new Array(s.size()).fill(null);return this.getFactory().createMultiLineString(s.toArray(c))},e.prototype.getGeometryType=function(){return"MultiPolygon"},e.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new e(s,this._factory)},e.prototype.interfaces_=function(){return[ds]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,t),e})(Ke),Jn=function(e){this._factory=e||null,this._isUserDataCopied=!1},Lc={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};Jn.prototype.setCopyUserData=function(e){this._isUserDataCopied=e},Jn.prototype.edit=function(e,t){if(e===null)return null;var n=this.editInternal(e,t);return this._isUserDataCopied&&n.setUserData(e.getUserData()),n},Jn.prototype.editInternal=function(e,t){return this._factory===null&&(this._factory=e.getFactory()),e instanceof Ke?this.editGeometryCollection(e,t):e instanceof ve?this.editPolygon(e,t):e instanceof yn?t.edit(e,this._factory):e instanceof ee?t.edit(e,this._factory):(wt.shouldNeverReachHere("Unsupported Geometry class: "+e.getClass().getName()),null)},Jn.prototype.editGeometryCollection=function(e,t){for(var n=this,i=t.edit(e,this._factory),s=new Y,o=0;o<i.getNumGeometries();o++){var a=n.edit(i.getGeometryN(o),t);a===null||a.isEmpty()||s.add(a)}return i.getClass()===Ga?this._factory.createMultiPoint(s.toArray([])):i.getClass()===Us?this._factory.createMultiLineString(s.toArray([])):i.getClass()===si?this._factory.createMultiPolygon(s.toArray([])):this._factory.createGeometryCollection(s.toArray([]))},Jn.prototype.editPolygon=function(e,t){var n=this,i=t.edit(e,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var s=this.edit(i.getExteriorRing(),t);if(s===null||s.isEmpty())return this._factory.createPolygon();for(var o=new Y,a=0;a<i.getNumInteriorRing();a++){var l=n.edit(i.getInteriorRingN(a),t);l===null||l.isEmpty()||o.add(l)}return this._factory.createPolygon(s,o.toArray([]))},Jn.prototype.interfaces_=function(){return[]},Jn.prototype.getClass=function(){return Jn},Jn.GeometryEditorOperation=function(){},Lc.NoOpGeometryOperation.get=function(){return wu},Lc.CoordinateOperation.get=function(){return Eu},Lc.CoordinateSequenceOperation.get=function(){return Cu},Object.defineProperties(Jn,Lc);var wu=function(){};wu.prototype.edit=function(e,t){return e},wu.prototype.interfaces_=function(){return[Jn.GeometryEditorOperation]},wu.prototype.getClass=function(){return wu};var Eu=function(){};Eu.prototype.edit=function(e,t){var n=this.editCoordinates(e.getCoordinates(),e);return n===null?e:e instanceof ii?t.createLinearRing(n):e instanceof ee?t.createLineString(n):e instanceof yn?n.length>0?t.createPoint(n[0]):t.createPoint():e},Eu.prototype.interfaces_=function(){return[Jn.GeometryEditorOperation]},Eu.prototype.getClass=function(){return Eu};var Cu=function(){};Cu.prototype.edit=function(e,t){return e instanceof ii?t.createLinearRing(this.edit(e.getCoordinateSequence(),e)):e instanceof ee?t.createLineString(this.edit(e.getCoordinateSequence(),e)):e instanceof yn?t.createPoint(this.edit(e.getCoordinateSequence(),e)):e},Cu.prototype.interfaces_=function(){return[Jn.GeometryEditorOperation]},Cu.prototype.getClass=function(){return Cu};var oe=function(){var e=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var t=arguments[0];this._coordinates=new Array(t).fill(null);for(var n=0;n<t;n++)e._coordinates[n]=new F}else if(pt(arguments[0],Tt)){var i=arguments[0];if(i===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._coordinates=new Array(i.size()).fill(null);for(var s=0;s<this._coordinates.length;s++)e._coordinates[s]=i.getCoordinateCopy(s)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var o=arguments[0],a=arguments[1];this._coordinates=o,this._dimension=a,o===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var l=arguments[0],u=arguments[1];this._coordinates=new Array(l).fill(null),this._dimension=u;for(var c=0;c<l;c++)e._coordinates[c]=new F}}},pv={serialVersionUID:{configurable:!0}};oe.prototype.setOrdinate=function(e,t,n){switch(t){case Tt.X:this._coordinates[e].x=n;break;case Tt.Y:this._coordinates[e].y=n;break;case Tt.Z:this._coordinates[e].z=n;break;default:throw new $t("invalid ordinateIndex")}},oe.prototype.size=function(){return this._coordinates.length},oe.prototype.getOrdinate=function(e,t){switch(t){case Tt.X:return this._coordinates[e].x;case Tt.Y:return this._coordinates[e].y;case Tt.Z:return this._coordinates[e].z}return vt.NaN},oe.prototype.getCoordinate=function(){if(arguments.length===1){var e=arguments[0];return this._coordinates[e]}else if(arguments.length===2){var t=arguments[0],n=arguments[1];n.x=this._coordinates[t].x,n.y=this._coordinates[t].y,n.z=this._coordinates[t].z}},oe.prototype.getCoordinateCopy=function(e){return new F(this._coordinates[e])},oe.prototype.getDimension=function(){return this._dimension},oe.prototype.getX=function(e){return this._coordinates[e].x},oe.prototype.clone=function(){for(var e=this,t=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)t[n]=e._coordinates[n].clone();return new oe(t,this._dimension)},oe.prototype.expandEnvelope=function(e){for(var t=this,n=0;n<this._coordinates.length;n++)e.expandToInclude(t._coordinates[n]);return e},oe.prototype.copy=function(){for(var e=this,t=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)t[n]=e._coordinates[n].copy();return new oe(t,this._dimension)},oe.prototype.toString=function(){var e=this;if(this._coordinates.length>0){var t=new br(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var n=1;n<this._coordinates.length;n++)t.append(", "),t.append(e._coordinates[n]);return t.append(")"),t.toString()}else return"()"},oe.prototype.getY=function(e){return this._coordinates[e].y},oe.prototype.toCoordinateArray=function(){return this._coordinates},oe.prototype.interfaces_=function(){return[Tt,Hn]},oe.prototype.getClass=function(){return oe},pv.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(oe,pv);var oi=function(){},Gd={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};oi.prototype.readResolve=function(){return oi.instance()},oi.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new oe(e)}else if(pt(arguments[0],Tt)){var t=arguments[0];return new oe(t)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new oe(n):new oe(n,i)}},oi.prototype.interfaces_=function(){return[Ra,Hn]},oi.prototype.getClass=function(){return oi},oi.instance=function(){return oi.instanceObject},Gd.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},Gd.instanceObject.get=function(){return new oi},Object.defineProperties(oi,Gd);var gv=(function(r){function e(){r.call(this),this.map_=new Map}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.get=function(n){return this.map_.get(n)||null},e.prototype.put=function(n,i){return this.map_.set(n,i),i},e.prototype.values=function(){for(var n=new Y,i=this.map_.values(),s=i.next();!s.done;)n.add(s.value),s=i.next();return n},e.prototype.entrySet=function(){var n=new Bd;return this.map_.entries().forEach(function(i){return n.add(i)}),n},e.prototype.size=function(){return this.map_.size()},e})(Ro),Mt=function r(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=r.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof Dr){var e=arguments[0];this._modelType=e,e===r.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var t=arguments[0];this._modelType=r.FIXED,this.setScale(t)}else if(arguments[0]instanceof r){var n=arguments[0];this._modelType=n._modelType,this._scale=n._scale}}},Wd={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Mt.prototype.equals=function(e){if(!(e instanceof Mt))return!1;var t=e;return this._modelType===t._modelType&&this._scale===t._scale},Mt.prototype.compareTo=function(e){var t=e,n=this.getMaximumSignificantDigits(),i=t.getMaximumSignificantDigits();return new Pr(n).compareTo(new Pr(i))},Mt.prototype.getScale=function(){return this._scale},Mt.prototype.isFloating=function(){return this._modelType===Mt.FLOATING||this._modelType===Mt.FLOATING_SINGLE},Mt.prototype.getType=function(){return this._modelType},Mt.prototype.toString=function(){var e="UNKNOWN";return this._modelType===Mt.FLOATING?e="Floating":this._modelType===Mt.FLOATING_SINGLE?e="Floating-Single":this._modelType===Mt.FIXED&&(e="Fixed (Scale="+this.getScale()+")"),e},Mt.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var e=arguments[0];if(vt.isNaN(e))return e;if(this._modelType===Mt.FLOATING_SINGLE){var t=e;return t}return this._modelType===Mt.FIXED?Math.round(e*this._scale)/this._scale:e}else if(arguments[0]instanceof F){var n=arguments[0];if(this._modelType===Mt.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}},Mt.prototype.getMaximumSignificantDigits=function(){var e=16;return this._modelType===Mt.FLOATING?e=16:this._modelType===Mt.FLOATING_SINGLE?e=6:this._modelType===Mt.FIXED&&(e=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),e},Mt.prototype.setScale=function(e){this._scale=Math.abs(e)},Mt.prototype.interfaces_=function(){return[Hn,Wn]},Mt.prototype.getClass=function(){return Mt},Mt.mostPrecise=function(e,t){return e.compareTo(t)>=0?e:t},Wd.serialVersionUID.get=function(){return 7777263578777804e3},Wd.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Mt,Wd);var Dr=function r(e){this._name=e||null,r.nameToTypeMap.put(e,this)},Hd={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};Dr.prototype.readResolve=function(){return Dr.nameToTypeMap.get(this._name)},Dr.prototype.toString=function(){return this._name},Dr.prototype.interfaces_=function(){return[Hn]},Dr.prototype.getClass=function(){return Dr},Hd.serialVersionUID.get=function(){return-552860263173159e4},Hd.nameToTypeMap.get=function(){return new gv},Object.defineProperties(Dr,Hd),Mt.Type=Dr,Mt.FIXED=new Dr("FIXED"),Mt.FLOATING=new Dr("FLOATING"),Mt.FLOATING_SINGLE=new Dr("FLOATING SINGLE");var bt=function r(){this._precisionModel=new Mt,this._SRID=0,this._coordinateSequenceFactory=r.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?pt(arguments[0],Ra)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Mt&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},mv={serialVersionUID:{configurable:!0}};bt.prototype.toGeometry=function(e){return e.isNull()?this.createPoint(null):e.getMinX()===e.getMaxX()&&e.getMinY()===e.getMaxY()?this.createPoint(new F(e.getMinX(),e.getMinY())):e.getMinX()===e.getMaxX()||e.getMinY()===e.getMaxY()?this.createLineString([new F(e.getMinX(),e.getMinY()),new F(e.getMaxX(),e.getMaxY())]):this.createPolygon(this.createLinearRing([new F(e.getMinX(),e.getMinY()),new F(e.getMinX(),e.getMaxY()),new F(e.getMaxX(),e.getMaxY()),new F(e.getMaxX(),e.getMinY()),new F(e.getMinX(),e.getMinY())]),null)},bt.prototype.createLineString=function(e){if(e){if(e instanceof Array)return new ee(this.getCoordinateSequenceFactory().create(e),this);if(pt(e,Tt))return new ee(e,this)}else return new ee(this.getCoordinateSequenceFactory().create([]),this)},bt.prototype.createMultiLineString=function(){if(arguments.length===0)return new Us(null,this);if(arguments.length===1){var e=arguments[0];return new Us(e,this)}},bt.prototype.buildGeometry=function(e){for(var t=null,n=!1,i=!1,s=e.iterator();s.hasNext();){var o=s.next(),a=o.getClass();t===null&&(t=a),a!==t&&(n=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(t===null)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(bt.toGeometryArray(e));var l=e.iterator().next(),u=e.size()>1;if(u){if(l instanceof ve)return this.createMultiPolygon(bt.toPolygonArray(e));if(l instanceof ee)return this.createMultiLineString(bt.toLineStringArray(e));if(l instanceof yn)return this.createMultiPoint(bt.toPointArray(e));wt.shouldNeverReachHere("Unhandled class: "+l.getClass().getName())}return l},bt.prototype.createMultiPointFromCoords=function(e){return this.createMultiPoint(e!==null?this.getCoordinateSequenceFactory().create(e):null)},bt.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof F){var e=arguments[0];return this.createPoint(e!==null?this.getCoordinateSequenceFactory().create([e]):null)}else if(pt(arguments[0],Tt)){var t=arguments[0];return new yn(t,this)}}},bt.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},bt.prototype.createPolygon=function(){if(arguments.length===0)return new ve(null,null,this);if(arguments.length===1){if(pt(arguments[0],Tt)){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof Array){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof ii){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return new ve(i,s,this)}},bt.prototype.getSRID=function(){return this._SRID},bt.prototype.createGeometryCollection=function(){if(arguments.length===0)return new Ke(null,this);if(arguments.length===1){var e=arguments[0];return new Ke(e,this)}},bt.prototype.createGeometry=function(e){var t=new Jn(this);return t.edit(e,{edit:function(){if(arguments.length===2){var n=arguments[0];return this._coordinateSequenceFactory.create(n)}}})},bt.prototype.getPrecisionModel=function(){return this._precisionModel},bt.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return this.createLinearRing(e!==null?this.getCoordinateSequenceFactory().create(e):null)}else if(pt(arguments[0],Tt)){var t=arguments[0];return new ii(t,this)}}},bt.prototype.createMultiPolygon=function(){if(arguments.length===0)return new si(null,this);if(arguments.length===1){var e=arguments[0];return new si(e,this)}},bt.prototype.createMultiPoint=function(){var e=this;if(arguments.length===0)return new Ga(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new Ga(t,this)}else if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}else if(pt(arguments[0],Tt)){var i=arguments[0];if(i===null)return this.createMultiPoint(new Array(0).fill(null));for(var s=new Array(i.size()).fill(null),o=0;o<i.size();o++){var a=e.getCoordinateSequenceFactory().create(1,i.getDimension());se.copy(i,o,a,0,1),s[o]=e.createPoint(a)}return this.createMultiPoint(s)}}},bt.prototype.interfaces_=function(){return[Hn]},bt.prototype.getClass=function(){return bt},bt.toMultiPolygonArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},bt.toGeometryArray=function(e){if(e===null)return null;var t=new Array(e.size()).fill(null);return e.toArray(t)},bt.getDefaultCoordinateSequenceFactory=function(){return oi.instance()},bt.toMultiLineStringArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},bt.toLineStringArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},bt.toMultiPointArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},bt.toLinearRingArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},bt.toPointArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},bt.toPolygonArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},bt.createPointFromInternalCoord=function(e,t){return t.getPrecisionModel().makePrecise(e),t.getFactory().createPoint(e)},mv.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties(bt,mv);var DC=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],Fc=function(e){this.geometryFactory=e||new bt};Fc.prototype.read=function(e){var t;typeof e=="string"?t=JSON.parse(e):t=e;var n=t.type;if(!Nr[n])throw new Error("Unknown GeoJSON type: "+t.type);return DC.indexOf(n)!==-1?Nr[n].apply(this,[t.coordinates]):n==="GeometryCollection"?Nr[n].apply(this,[t.geometries]):Nr[n].apply(this,[t])},Fc.prototype.write=function(e){var t=e.getGeometryType();if(!ki[t])throw new Error("Geometry is not supported");return ki[t].apply(this,[e])};var Nr={Feature:function(r){var e={};for(var t in r)e[t]=r[t];if(r.geometry){var n=r.geometry.type;if(!Nr[n])throw new Error("Unknown GeoJSON type: "+r.type);e.geometry=this.read(r.geometry)}return r.bbox&&(e.bbox=Nr.bbox.apply(this,[r.bbox])),e},FeatureCollection:function(r){var e=this,t={};if(r.features){t.features=[];for(var n=0;n<r.features.length;++n)t.features.push(e.read(r.features[n]))}return r.bbox&&(t.bbox=this.parse.bbox.apply(this,[r.bbox])),t},coordinates:function(r){for(var e=[],t=0;t<r.length;++t){var n=r[t];e.push(new F(n[0],n[1]))}return e},bbox:function(r){return this.geometryFactory.createLinearRing([new F(r[0],r[1]),new F(r[2],r[1]),new F(r[2],r[3]),new F(r[0],r[3]),new F(r[0],r[1])])},Point:function(r){var e=new F(r[0],r[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(r){for(var e=this,t=[],n=0;n<r.length;++n)t.push(Nr.Point.apply(e,[r[n]]));return this.geometryFactory.createMultiPoint(t)},LineString:function(r){var e=Nr.coordinates.apply(this,[r]);return this.geometryFactory.createLineString(e)},MultiLineString:function(r){for(var e=this,t=[],n=0;n<r.length;++n)t.push(Nr.LineString.apply(e,[r[n]]));return this.geometryFactory.createMultiLineString(t)},Polygon:function(r){for(var e=this,t=Nr.coordinates.apply(this,[r[0]]),n=this.geometryFactory.createLinearRing(t),i=[],s=1;s<r.length;++s){var o=r[s],a=Nr.coordinates.apply(e,[o]),l=e.geometryFactory.createLinearRing(a);i.push(l)}return this.geometryFactory.createPolygon(n,i)},MultiPolygon:function(r){for(var e=this,t=[],n=0;n<r.length;++n){var i=r[n];t.push(Nr.Polygon.apply(e,[i]))}return this.geometryFactory.createMultiPolygon(t)},GeometryCollection:function(r){for(var e=this,t=[],n=0;n<r.length;++n){var i=r[n];t.push(e.read(i))}return this.geometryFactory.createGeometryCollection(t)}},ki={coordinate:function(r){return[r.x,r.y]},Point:function(r){var e=ki.coordinate.apply(this,[r.getCoordinate()]);return{type:"Point",coordinates:e}},MultiPoint:function(r){for(var e=this,t=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=ki.Point.apply(e,[i]);t.push(s.coordinates)}return{type:"MultiPoint",coordinates:t}},LineString:function(r){for(var e=this,t=[],n=r.getCoordinates(),i=0;i<n.length;++i){var s=n[i];t.push(ki.coordinate.apply(e,[s]))}return{type:"LineString",coordinates:t}},MultiLineString:function(r){for(var e=this,t=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=ki.LineString.apply(e,[i]);t.push(s.coordinates)}return{type:"MultiLineString",coordinates:t}},Polygon:function(r){var e=this,t=[],n=ki.LineString.apply(this,[r._shell]);t.push(n.coordinates);for(var i=0;i<r._holes.length;++i){var s=r._holes[i],o=ki.LineString.apply(e,[s]);t.push(o.coordinates)}return{type:"Polygon",coordinates:t}},MultiPolygon:function(r){for(var e=this,t=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=ki.Polygon.apply(e,[i]);t.push(s.coordinates)}return{type:"MultiPolygon",coordinates:t}},GeometryCollection:function(r){for(var e=this,t=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=i.getGeometryType();t.push(ki[s].apply(e,[i]))}return{type:"GeometryCollection",geometries:t}}},qd=function(e){this.geometryFactory=e||new bt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Fc(this.geometryFactory)};qd.prototype.read=function(e){var t=this.parser.read(e);return this.precisionModel.getType()===Mt.FIXED&&this.reducePrecision(t),t},qd.prototype.reducePrecision=function(e){var t=this,n,i;if(e.coordinate)this.precisionModel.makePrecise(e.coordinate);else if(e.points)for(n=0,i=e.points.length;n<i;n++)t.precisionModel.makePrecise(e.points[n]);else if(e.geometries)for(n=0,i=e.geometries.length;n<i;n++)t.reducePrecision(e.geometries[n])};var vv=function(){this.parser=new Fc(this.geometryFactory)};vv.prototype.write=function(e){return this.parser.write(e)};var W=function(){},Ac={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};W.prototype.interfaces_=function(){return[]},W.prototype.getClass=function(){return W},W.opposite=function(e){return e===W.LEFT?W.RIGHT:e===W.RIGHT?W.LEFT:e},Ac.ON.get=function(){return 0},Ac.LEFT.get=function(){return 1},Ac.RIGHT.get=function(){return 2},Object.defineProperties(W,Ac);function kc(r){this.message=r||""}kc.prototype=new Error,kc.prototype.name="EmptyStackException";function Mr(){this.array_=[]}Mr.prototype=new ar,Mr.prototype.add=function(r){return this.array_.push(r),!0},Mr.prototype.get=function(r){if(r<0||r>=this.size())throw new Error;return this.array_[r]},Mr.prototype.push=function(r){return this.array_.push(r),r},Mr.prototype.pop=function(r){if(this.array_.length===0)throw new kc;return this.array_.pop()},Mr.prototype.peek=function(){if(this.array_.length===0)throw new kc;return this.array_[this.array_.length-1]},Mr.prototype.empty=function(){return this.array_.length===0},Mr.prototype.isEmpty=function(){return this.empty()},Mr.prototype.search=function(r){return this.array_.indexOf(r)},Mr.prototype.size=function(){return this.array_.length},Mr.prototype.toArray=function(){for(var r=this,e=[],t=0,n=this.array_.length;t<n;t++)e.push(r.array_[t]);return e};var Rr=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Rr.prototype.getCoordinate=function(){return this._minCoord},Rr.prototype.getRightmostSide=function(e,t){var n=this.getRightmostSideOfSegment(e,t);return n<0&&(n=this.getRightmostSideOfSegment(e,t-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(e)),n},Rr.prototype.findRightmostEdgeAtVertex=function(){var e=this._minDe.getEdge().getCoordinates();wt.isTrue(this._minIndex>0&&this._minIndex<e.length,"rightmost point expected to be interior vertex of edge");var t=e[this._minIndex-1],n=e[this._minIndex+1],i=$.computeOrientation(this._minCoord,n,t),s=!1;(t.y<this._minCoord.y&&n.y<this._minCoord.y&&i===$.COUNTERCLOCKWISE||t.y>this._minCoord.y&&n.y>this._minCoord.y&&i===$.CLOCKWISE)&&(s=!0),s&&(this._minIndex=this._minIndex-1)},Rr.prototype.getRightmostSideOfSegment=function(e,t){var n=e.getEdge(),i=n.getCoordinates();if(t<0||t+1>=i.length||i[t].y===i[t+1].y)return-1;var s=W.LEFT;return i[t].y<i[t+1].y&&(s=W.RIGHT),s},Rr.prototype.getEdge=function(){return this._orientedDe},Rr.prototype.checkForRightmostCoordinate=function(e){for(var t=this,n=e.getEdge().getCoordinates(),i=0;i<n.length-1;i++)(t._minCoord===null||n[i].x>t._minCoord.x)&&(t._minDe=e,t._minIndex=i,t._minCoord=n[i])},Rr.prototype.findRightmostEdgeAtNode=function(){var e=this._minDe.getNode(),t=e.getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Rr.prototype.findEdge=function(e){for(var t=this,n=e.iterator();n.hasNext();){var i=n.next();i.isForward()&&t.checkForRightmostCoordinate(i)}wt.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var s=this.getRightmostSide(this._minDe,this._minIndex);s===W.LEFT&&(this._orientedDe=this._minDe.getSym())},Rr.prototype.interfaces_=function(){return[]},Rr.prototype.getClass=function(){return Rr};var Vi=(function(r){function e(t,n){r.call(this,e.msgWithCoord(t,n)),this.pt=n?new F(n):null,this.name="TopologyException"}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(n,i){return i?n:n+" [ "+i+" ]"},e})(Mi),Vc=function(){this.array_=[]};Vc.prototype.addLast=function(e){this.array_.push(e)},Vc.prototype.removeFirst=function(){return this.array_.shift()},Vc.prototype.isEmpty=function(){return this.array_.length===0};var Ze=function(){this._finder=null,this._dirEdgeList=new Y,this._nodes=new Y,this._rightMostCoord=null,this._env=null,this._finder=new Rr};Ze.prototype.clearVisitedEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var t=e.next();t.setVisited(!1)}},Ze.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Ze.prototype.computeNodeDepth=function(e){for(var t=this,n=null,i=e.getEdges().iterator();i.hasNext();){var s=i.next();if(s.isVisited()||s.getSym().isVisited()){n=s;break}}if(n===null)throw new Vi("unable to find edge to compute depths at "+e.getCoordinate());e.getEdges().computeDepths(n);for(var o=e.getEdges().iterator();o.hasNext();){var a=o.next();a.setVisited(!0),t.copySymDepths(a)}},Ze.prototype.computeDepth=function(e){this.clearVisitedEdges();var t=this._finder.getEdge();t.setEdgeDepths(W.RIGHT,e),this.copySymDepths(t),this.computeDepths(t)},Ze.prototype.create=function(e){this.addReachable(e),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Ze.prototype.findResultEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var t=e.next();t.getDepth(W.RIGHT)>=1&&t.getDepth(W.LEFT)<=0&&!t.isInteriorAreaEdge()&&t.setInResult(!0)}},Ze.prototype.computeDepths=function(e){var t=this,n=new Bd,i=new Vc,s=e.getNode();for(i.addLast(s),n.add(s),e.setVisited(!0);!i.isEmpty();){var o=i.removeFirst();n.add(o),t.computeNodeDepth(o);for(var a=o.getEdges().iterator();a.hasNext();){var l=a.next(),u=l.getSym();if(!u.isVisited()){var c=u.getNode();n.contains(c)||(i.addLast(c),n.add(c))}}}},Ze.prototype.compareTo=function(e){var t=e;return this._rightMostCoord.x<t._rightMostCoord.x?-1:this._rightMostCoord.x>t._rightMostCoord.x?1:0},Ze.prototype.getEnvelope=function(){if(this._env===null){for(var e=new rt,t=this._dirEdgeList.iterator();t.hasNext();)for(var n=t.next(),i=n.getEdge().getCoordinates(),s=0;s<i.length-1;s++)e.expandToInclude(i[s]);this._env=e}return this._env},Ze.prototype.addReachable=function(e){var t=this,n=new Mr;for(n.add(e);!n.empty();){var i=n.pop();t.add(i,n)}},Ze.prototype.copySymDepths=function(e){var t=e.getSym();t.setDepth(W.LEFT,e.getDepth(W.RIGHT)),t.setDepth(W.RIGHT,e.getDepth(W.LEFT))},Ze.prototype.add=function(e,t){var n=this;e.setVisited(!0),this._nodes.add(e);for(var i=e.getEdges().iterator();i.hasNext();){var s=i.next();n._dirEdgeList.add(s);var o=s.getSym(),a=o.getNode();a.isVisited()||t.push(a)}},Ze.prototype.getNodes=function(){return this._nodes},Ze.prototype.getDirectedEdges=function(){return this._dirEdgeList},Ze.prototype.interfaces_=function(){return[Wn]},Ze.prototype.getClass=function(){return Ze};var qt=function r(){var e=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];this.init(t.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[W.ON]=n}else if(arguments[0]instanceof r){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var s=0;s<this.location.length;s++)e.location[s]=i.location[s]}}else if(arguments.length===3){var o=arguments[0],a=arguments[1],l=arguments[2];this.init(3),this.location[W.ON]=o,this.location[W.LEFT]=a,this.location[W.RIGHT]=l}};qt.prototype.setAllLocations=function(e){for(var t=this,n=0;n<this.location.length;n++)t.location[n]=e},qt.prototype.isNull=function(){for(var e=this,t=0;t<this.location.length;t++)if(e.location[t]!==k.NONE)return!1;return!0},qt.prototype.setAllLocationsIfNull=function(e){for(var t=this,n=0;n<this.location.length;n++)t.location[n]===k.NONE&&(t.location[n]=e)},qt.prototype.isLine=function(){return this.location.length===1},qt.prototype.merge=function(e){var t=this;if(e.location.length>this.location.length){var n=new Array(3).fill(null);n[W.ON]=this.location[W.ON],n[W.LEFT]=k.NONE,n[W.RIGHT]=k.NONE,this.location=n}for(var i=0;i<this.location.length;i++)t.location[i]===k.NONE&&i<e.location.length&&(t.location[i]=e.location[i])},qt.prototype.getLocations=function(){return this.location},qt.prototype.flip=function(){if(this.location.length<=1)return null;var e=this.location[W.LEFT];this.location[W.LEFT]=this.location[W.RIGHT],this.location[W.RIGHT]=e},qt.prototype.toString=function(){var e=new br;return this.location.length>1&&e.append(k.toLocationSymbol(this.location[W.LEFT])),e.append(k.toLocationSymbol(this.location[W.ON])),this.location.length>1&&e.append(k.toLocationSymbol(this.location[W.RIGHT])),e.toString()},qt.prototype.setLocations=function(e,t,n){this.location[W.ON]=e,this.location[W.LEFT]=t,this.location[W.RIGHT]=n},qt.prototype.get=function(e){return e<this.location.length?this.location[e]:k.NONE},qt.prototype.isArea=function(){return this.location.length>1},qt.prototype.isAnyNull=function(){for(var e=this,t=0;t<this.location.length;t++)if(e.location[t]===k.NONE)return!0;return!1},qt.prototype.setLocation=function(){if(arguments.length===1){var e=arguments[0];this.setLocation(W.ON,e)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];this.location[t]=n}},qt.prototype.init=function(e){this.location=new Array(e).fill(null),this.setAllLocations(k.NONE)},qt.prototype.isEqualOnSide=function(e,t){return this.location[t]===e.location[t]},qt.prototype.allPositionsEqual=function(e){for(var t=this,n=0;n<this.location.length;n++)if(t.location[n]!==e)return!1;return!0},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt};var Vt=function r(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new qt(e),this.elt[1]=new qt(e)}else if(arguments[0]instanceof r){var t=arguments[0];this.elt[0]=new qt(t.elt[0]),this.elt[1]=new qt(t.elt[1])}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.elt[0]=new qt(k.NONE),this.elt[1]=new qt(k.NONE),this.elt[n].setLocation(i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this.elt[0]=new qt(s,o,a),this.elt[1]=new qt(s,o,a)}else if(arguments.length===4){var l=arguments[0],u=arguments[1],c=arguments[2],d=arguments[3];this.elt[0]=new qt(k.NONE,k.NONE,k.NONE),this.elt[1]=new qt(k.NONE,k.NONE,k.NONE),this.elt[l].setLocations(u,c,d)}};Vt.prototype.getGeometryCount=function(){var e=0;return this.elt[0].isNull()||e++,this.elt[1].isNull()||e++,e},Vt.prototype.setAllLocations=function(e,t){this.elt[e].setAllLocations(t)},Vt.prototype.isNull=function(e){return this.elt[e].isNull()},Vt.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var e=arguments[0];this.setAllLocationsIfNull(0,e),this.setAllLocationsIfNull(1,e)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];this.elt[t].setAllLocationsIfNull(n)}},Vt.prototype.isLine=function(e){return this.elt[e].isLine()},Vt.prototype.merge=function(e){for(var t=this,n=0;n<2;n++)t.elt[n]===null&&e.elt[n]!==null?t.elt[n]=new qt(e.elt[n]):t.elt[n].merge(e.elt[n])},Vt.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Vt.prototype.getLocation=function(){if(arguments.length===1){var e=arguments[0];return this.elt[e].get(W.ON)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];return this.elt[t].get(n)}},Vt.prototype.toString=function(){var e=new br;return this.elt[0]!==null&&(e.append("A:"),e.append(this.elt[0].toString())),this.elt[1]!==null&&(e.append(" B:"),e.append(this.elt[1].toString())),e.toString()},Vt.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var e=arguments[0];return this.elt[e].isArea()}},Vt.prototype.isAnyNull=function(e){return this.elt[e].isAnyNull()},Vt.prototype.setLocation=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1];this.elt[e].setLocation(W.ON,t)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this.elt[n].setLocation(i,s)}},Vt.prototype.isEqualOnSide=function(e,t){return this.elt[0].isEqualOnSide(e.elt[0],t)&&this.elt[1].isEqualOnSide(e.elt[1],t)},Vt.prototype.allPositionsEqual=function(e,t){return this.elt[e].allPositionsEqual(t)},Vt.prototype.toLine=function(e){this.elt[e].isArea()&&(this.elt[e]=new qt(this.elt[e].location[0]))},Vt.prototype.interfaces_=function(){return[]},Vt.prototype.getClass=function(){return Vt},Vt.toLineLabel=function(e){for(var t=new Vt(k.NONE),n=0;n<2;n++)t.setLocation(n,e.getLocation(n));return t};var he=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new Y,this._pts=new Y,this._label=new Vt(k.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new Y,this._geometryFactory=null;var e=arguments[0],t=arguments[1];this._geometryFactory=t,this.computePoints(e),this.computeRing()};he.prototype.computeRing=function(){var e=this;if(this._ring!==null)return null;for(var t=new Array(this._pts.size()).fill(null),n=0;n<this._pts.size();n++)t[n]=e._pts.get(n);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=$.isCCW(this._ring.getCoordinates())},he.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},he.prototype.computePoints=function(e){var t=this;this._startDe=e;var n=e,i=!0;do{if(n===null)throw new Vi("Found null DirectedEdge");if(n.getEdgeRing()===t)throw new Vi("Directed Edge visited twice during ring-building at "+n.getCoordinate());t._edges.add(n);var s=n.getLabel();wt.isTrue(s.isArea()),t.mergeLabel(s),t.addPoints(n.getEdge(),n.isForward(),i),i=!1,t.setEdgeRing(n,t),n=t.getNext(n)}while(n!==this._startDe)},he.prototype.getLinearRing=function(){return this._ring},he.prototype.getCoordinate=function(e){return this._pts.get(e)},he.prototype.computeMaxNodeDegree=function(){var e=this;this._maxNodeDegree=0;var t=this._startDe;do{var n=t.getNode(),i=n.getEdges().getOutgoingDegree(e);i>e._maxNodeDegree&&(e._maxNodeDegree=i),t=e.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},he.prototype.addPoints=function(e,t,n){var i=this,s=e.getCoordinates();if(t){var o=1;n&&(o=0);for(var a=o;a<s.length;a++)i._pts.add(s[a])}else{var l=s.length-2;n&&(l=s.length-1);for(var u=l;u>=0;u--)i._pts.add(s[u])}},he.prototype.isHole=function(){return this._isHole},he.prototype.setInResult=function(){var e=this._startDe;do e.getEdge().setInResult(!0),e=e.getNext();while(e!==this._startDe)},he.prototype.containsPoint=function(e){var t=this.getLinearRing(),n=t.getEnvelopeInternal();if(!n.contains(e)||!$.isPointInRing(e,t.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var s=i.next();if(s.containsPoint(e))return!1}return!0},he.prototype.addHole=function(e){this._holes.add(e)},he.prototype.isShell=function(){return this._shell===null},he.prototype.getLabel=function(){return this._label},he.prototype.getEdges=function(){return this._edges},he.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},he.prototype.getShell=function(){return this._shell},he.prototype.mergeLabel=function(){if(arguments.length===1){var e=arguments[0];this.mergeLabel(e,0),this.mergeLabel(e,1)}else if(arguments.length===2){var t=arguments[0],n=arguments[1],i=t.getLocation(n,W.RIGHT);if(i===k.NONE)return null;if(this._label.getLocation(n)===k.NONE)return this._label.setLocation(n,i),null}},he.prototype.setShell=function(e){this._shell=e,e!==null&&e.addHole(this)},he.prototype.toPolygon=function(e){for(var t=this,n=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)n[i]=t._holes.get(i).getLinearRing();var s=e.createPolygon(this.getLinearRing(),n);return s},he.prototype.interfaces_=function(){return[]},he.prototype.getClass=function(){return he};var NC=(function(r){function e(){var t=arguments[0],n=arguments[1];r.call(this,t,n)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=function(n,i){n.setMinEdgeRing(i)},e.prototype.getNext=function(n){return n.getNextMin()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(he),MC=(function(r){function e(){var t=arguments[0],n=arguments[1];r.call(this,t,n)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=function(){var n=this,i=new Y,s=this._startDe;do{if(s.getMinEdgeRing()===null){var o=new NC(s,n._geometryFactory);i.add(o)}s=s.getNext()}while(s!==this._startDe);return i},e.prototype.setEdgeRing=function(n,i){n.setEdgeRing(i)},e.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var n=this,i=this._startDe;do{var s=i.getNode();s.getEdges().linkMinimalDirectedEdges(n),i=i.getNext()}while(i!==this._startDe)},e.prototype.getNext=function(n){return n.getNext()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(he),Ln=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this._label=e}}};Ln.prototype.setVisited=function(e){this._isVisited=e},Ln.prototype.setInResult=function(e){this._isInResult=e},Ln.prototype.isCovered=function(){return this._isCovered},Ln.prototype.isCoveredSet=function(){return this._isCoveredSet},Ln.prototype.setLabel=function(e){this._label=e},Ln.prototype.getLabel=function(){return this._label},Ln.prototype.setCovered=function(e){this._isCovered=e,this._isCoveredSet=!0},Ln.prototype.updateIM=function(e){wt.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(e)},Ln.prototype.isInResult=function(){return this._isInResult},Ln.prototype.isVisited=function(){return this._isVisited},Ln.prototype.interfaces_=function(){return[]},Ln.prototype.getClass=function(){return Ln};var jc=(function(r){function e(){r.call(this),this._coord=null,this._edges=null;var t=arguments[0],n=arguments[1];this._coord=t,this._edges=n,this._label=new Vt(0,k.NONE)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var n=this.getEdges().getEdges().iterator();n.hasNext();){var i=n.next();if(i.getEdge().isInResult())return!0}return!1},e.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(n){n.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(n){},e.prototype.computeMergedLocation=function(n,i){var s=k.NONE;if(s=this._label.getLocation(i),!n.isNull(i)){var o=n.getLocation(i);s!==k.BOUNDARY&&(s=o)}return s},e.prototype.setLabel=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];this._label===null?this._label=new Vt(n,i):this._label.setLocation(n,i)}else return r.prototype.setLabel.apply(this,arguments)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){var n=this;if(arguments[0]instanceof e){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof Vt)for(var s=arguments[0],o=0;o<2;o++){var a=n.computeMergedLocation(s,o),l=n._label.getLocation(o);l===k.NONE&&n._label.setLocation(o,a)}},e.prototype.add=function(n){this._edges.insert(n),n.setNode(this)},e.prototype.setLabelBoundary=function(n){if(this._label===null)return null;var i=k.NONE;this._label!==null&&(i=this._label.getLocation(n));var s=null;switch(i){case k.BOUNDARY:s=k.INTERIOR;break;case k.INTERIOR:s=k.BOUNDARY;break;default:s=k.BOUNDARY;break}this._label.setLocation(n,s)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(Ln),Lr=function(){this.nodeMap=new qe,this.nodeFact=null;var e=arguments[0];this.nodeFact=e};Lr.prototype.find=function(e){return this.nodeMap.get(e)},Lr.prototype.addNode=function(){if(arguments[0]instanceof F){var e=arguments[0],t=this.nodeMap.get(e);return t===null&&(t=this.nodeFact.createNode(e),this.nodeMap.put(e,t)),t}else if(arguments[0]instanceof jc){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return i===null?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},Lr.prototype.print=function(e){for(var t=this.iterator();t.hasNext();){var n=t.next();n.print(e)}},Lr.prototype.iterator=function(){return this.nodeMap.values().iterator()},Lr.prototype.values=function(){return this.nodeMap.values()},Lr.prototype.getBoundaryNodes=function(e){for(var t=new Y,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(e)===k.BOUNDARY&&t.add(i)}return t},Lr.prototype.add=function(e){var t=e.getCoordinate(),n=this.addNode(t);n.add(e)},Lr.prototype.interfaces_=function(){return[]},Lr.prototype.getClass=function(){return Lr};var Ut=function(){},Su={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Ut.prototype.interfaces_=function(){return[]},Ut.prototype.getClass=function(){return Ut},Ut.isNorthern=function(e){return e===Ut.NE||e===Ut.NW},Ut.isOpposite=function(e,t){if(e===t)return!1;var n=(e-t+4)%4;return n===2},Ut.commonHalfPlane=function(e,t){if(e===t)return e;var n=(e-t+4)%4;if(n===2)return-1;var i=e<t?e:t,s=e>t?e:t;return i===0&&s===3?3:i},Ut.isInHalfPlane=function(e,t){return t===Ut.SE?e===Ut.SE||e===Ut.SW:e===t||e===t+1},Ut.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],t=arguments[1];if(e===0&&t===0)throw new $t("Cannot compute the quadrant for point ( "+e+", "+t+" )");return e>=0?t>=0?Ut.NE:Ut.SE:t>=0?Ut.NW:Ut.SW}else if(arguments[0]instanceof F&&arguments[1]instanceof F){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new $t("Cannot compute the quadrant for two identical points "+n);return i.x>=n.x?i.y>=n.y?Ut.NE:Ut.SE:i.y>=n.y?Ut.NW:Ut.SW}},Su.NE.get=function(){return 0},Su.NW.get=function(){return 1},Su.SW.get=function(){return 2},Su.SE.get=function(){return 3},Object.defineProperties(Ut,Su);var Xe=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var e=arguments[0];this._edge=e}else if(arguments.length===3){var t=arguments[0],n=arguments[1],i=arguments[2],s=null;this._edge=t,this.init(n,i),this._label=s}else if(arguments.length===4){var o=arguments[0],a=arguments[1],l=arguments[2],u=arguments[3];this._edge=o,this.init(a,l),this._label=u}};Xe.prototype.compareDirection=function(e){return this._dx===e._dx&&this._dy===e._dy?0:this._quadrant>e._quadrant?1:this._quadrant<e._quadrant?-1:$.computeOrientation(e._p0,e._p1,this._p1)},Xe.prototype.getDy=function(){return this._dy},Xe.prototype.getCoordinate=function(){return this._p0},Xe.prototype.setNode=function(e){this._node=e},Xe.prototype.print=function(e){var t=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),i=n.lastIndexOf("."),s=n.substring(i+1);e.print(" "+s+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label)},Xe.prototype.compareTo=function(e){var t=e;return this.compareDirection(t)},Xe.prototype.getDirectedCoordinate=function(){return this._p1},Xe.prototype.getDx=function(){return this._dx},Xe.prototype.getLabel=function(){return this._label},Xe.prototype.getEdge=function(){return this._edge},Xe.prototype.getQuadrant=function(){return this._quadrant},Xe.prototype.getNode=function(){return this._node},Xe.prototype.toString=function(){var e=Math.atan2(this._dy,this._dx),t=this.getClass().getName(),n=t.lastIndexOf("."),i=t.substring(n+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label},Xe.prototype.computeLabel=function(e){},Xe.prototype.init=function(e,t){this._p0=e,this._p1=t,this._dx=t.x-e.x,this._dy=t.y-e.y,this._quadrant=Ut.quadrant(this._dx,this._dy),wt.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},Xe.prototype.interfaces_=function(){return[Wn]},Xe.prototype.getClass=function(){return Xe};var Xd=(function(r){function e(){var t=arguments[0],n=arguments[1];if(r.call(this,t),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(t.getCoordinate(0),t.getCoordinate(1));else{var i=t.getNumPoints()-1;this.init(t.getCoordinate(i),t.getCoordinate(i-1))}this.computeDirectedLabel()}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.getNextMin=function(){return this._nextMin},e.prototype.getDepth=function(n){return this._depth[n]},e.prototype.setVisited=function(n){this._isVisited=n},e.prototype.computeDirectedLabel=function(){this._label=new Vt(this._edge.getLabel()),this._isForward||this._label.flip()},e.prototype.getNext=function(){return this._next},e.prototype.setDepth=function(n,i){if(this._depth[n]!==-999&&this._depth[n]!==i)throw new Vi("assigned depths do not match",this.getCoordinate());this._depth[n]=i},e.prototype.isInteriorAreaEdge=function(){for(var n=this,i=!0,s=0;s<2;s++)n._label.isArea(s)&&n._label.getLocation(s,W.LEFT)===k.INTERIOR&&n._label.getLocation(s,W.RIGHT)===k.INTERIOR||(i=!1);return i},e.prototype.setNextMin=function(n){this._nextMin=n},e.prototype.print=function(n){r.prototype.print.call(this,n),n.print(" "+this._depth[W.LEFT]+"/"+this._depth[W.RIGHT]),n.print(" ("+this.getDepthDelta()+")"),this._isInResult&&n.print(" inResult")},e.prototype.setMinEdgeRing=function(n){this._minEdgeRing=n},e.prototype.isLineEdge=function(){var n=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,k.EXTERIOR),s=!this._label.isArea(1)||this._label.allPositionsEqual(1,k.EXTERIOR);return n&&i&&s},e.prototype.setEdgeRing=function(n){this._edgeRing=n},e.prototype.getMinEdgeRing=function(){return this._minEdgeRing},e.prototype.getDepthDelta=function(){var n=this._edge.getDepthDelta();return this._isForward||(n=-n),n},e.prototype.setInResult=function(n){this._isInResult=n},e.prototype.getSym=function(){return this._sym},e.prototype.isForward=function(){return this._isForward},e.prototype.getEdge=function(){return this._edge},e.prototype.printEdge=function(n){this.print(n),n.print(" "),this._isForward?this._edge.print(n):this._edge.printReverse(n)},e.prototype.setSym=function(n){this._sym=n},e.prototype.setVisitedEdge=function(n){this.setVisited(n),this._sym.setVisited(n)},e.prototype.setEdgeDepths=function(n,i){var s=this.getEdge().getDepthDelta();this._isForward||(s=-s);var o=1;n===W.LEFT&&(o=-1);var a=W.opposite(n),l=s*o,u=i+l;this.setDepth(n,i),this.setDepth(a,u)},e.prototype.getEdgeRing=function(){return this._edgeRing},e.prototype.isInResult=function(){return this._isInResult},e.prototype.setNext=function(n){this._next=n},e.prototype.isVisited=function(){return this._isVisited},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.depthFactor=function(n,i){return n===k.EXTERIOR&&i===k.INTERIOR?1:n===k.INTERIOR&&i===k.EXTERIOR?-1:0},e})(Xe),Wa=function(){};Wa.prototype.createNode=function(e){return new jc(e,null)},Wa.prototype.interfaces_=function(){return[]},Wa.prototype.getClass=function(){return Wa};var Qt=function(){if(this._edges=new Y,this._nodes=null,this._edgeEndList=new Y,arguments.length===0)this._nodes=new Lr(new Wa);else if(arguments.length===1){var e=arguments[0];this._nodes=new Lr(e)}};Qt.prototype.printEdges=function(e){var t=this;e.println("Edges:");for(var n=0;n<this._edges.size();n++){e.println("edge "+n+":");var i=t._edges.get(n);i.print(e),i.eiList.print(e)}},Qt.prototype.find=function(e){return this._nodes.find(e)},Qt.prototype.addNode=function(){if(arguments[0]instanceof jc){var e=arguments[0];return this._nodes.addNode(e)}else if(arguments[0]instanceof F){var t=arguments[0];return this._nodes.addNode(t)}},Qt.prototype.getNodeIterator=function(){return this._nodes.iterator()},Qt.prototype.linkResultDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();){var t=e.next();t.getEdges().linkResultDirectedEdges()}},Qt.prototype.debugPrintln=function(e){Ae.out.println(e)},Qt.prototype.isBoundaryNode=function(e,t){var n=this._nodes.find(t);if(n===null)return!1;var i=n.getLabel();return i!==null&&i.getLocation(e)===k.BOUNDARY},Qt.prototype.linkAllDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();){var t=e.next();t.getEdges().linkAllDirectedEdges()}},Qt.prototype.matchInSameDirection=function(e,t,n,i){return e.equals(n)?$.computeOrientation(e,t,i)===$.COLLINEAR&&Ut.quadrant(e,t)===Ut.quadrant(n,i):!1},Qt.prototype.getEdgeEnds=function(){return this._edgeEndList},Qt.prototype.debugPrint=function(e){Ae.out.print(e)},Qt.prototype.getEdgeIterator=function(){return this._edges.iterator()},Qt.prototype.findEdgeInSameDirection=function(e,t){for(var n=this,i=0;i<this._edges.size();i++){var s=n._edges.get(i),o=s.getCoordinates();if(n.matchInSameDirection(e,t,o[0],o[1])||n.matchInSameDirection(e,t,o[o.length-1],o[o.length-2]))return s}return null},Qt.prototype.insertEdge=function(e){this._edges.add(e)},Qt.prototype.findEdgeEnd=function(e){for(var t=this.getEdgeEnds().iterator();t.hasNext();){var n=t.next();if(n.getEdge()===e)return n}return null},Qt.prototype.addEdges=function(e){for(var t=this,n=e.iterator();n.hasNext();){var i=n.next();t._edges.add(i);var s=new Xd(i,!0),o=new Xd(i,!1);s.setSym(o),o.setSym(s),t.add(s),t.add(o)}},Qt.prototype.add=function(e){this._nodes.add(e),this._edgeEndList.add(e)},Qt.prototype.getNodes=function(){return this._nodes.values()},Qt.prototype.findEdge=function(e,t){for(var n=this,i=0;i<this._edges.size();i++){var s=n._edges.get(i),o=s.getCoordinates();if(e.equals(o[0])&&t.equals(o[1]))return s}return null},Qt.prototype.interfaces_=function(){return[]},Qt.prototype.getClass=function(){return Qt},Qt.linkResultDirectedEdges=function(e){for(var t=e.iterator();t.hasNext();){var n=t.next();n.getEdges().linkResultDirectedEdges()}};var _n=function(){this._geometryFactory=null,this._shellList=new Y;var e=arguments[0];this._geometryFactory=e};_n.prototype.sortShellsAndHoles=function(e,t,n){for(var i=e.iterator();i.hasNext();){var s=i.next();s.isHole()?n.add(s):t.add(s)}},_n.prototype.computePolygons=function(e){for(var t=this,n=new Y,i=e.iterator();i.hasNext();){var s=i.next(),o=s.toPolygon(t._geometryFactory);n.add(o)}return n},_n.prototype.placeFreeHoles=function(e,t){for(var n=this,i=t.iterator();i.hasNext();){var s=i.next();if(s.getShell()===null){var o=n.findEdgeRingContaining(s,e);if(o===null)throw new Vi("unable to assign hole to a shell",s.getCoordinate(0));s.setShell(o)}}},_n.prototype.buildMinimalEdgeRings=function(e,t,n){for(var i=this,s=new Y,o=e.iterator();o.hasNext();){var a=o.next();if(a.getMaxNodeDegree()>2){a.linkDirectedEdgesForMinimalEdgeRings();var l=a.buildMinimalRings(),u=i.findShell(l);u!==null?(i.placePolygonHoles(u,l),t.add(u)):n.addAll(l)}else s.add(a)}return s},_n.prototype.containsPoint=function(e){for(var t=this._shellList.iterator();t.hasNext();){var n=t.next();if(n.containsPoint(e))return!0}return!1},_n.prototype.buildMaximalEdgeRings=function(e){for(var t=this,n=new Y,i=e.iterator();i.hasNext();){var s=i.next();if(s.isInResult()&&s.getLabel().isArea()&&s.getEdgeRing()===null){var o=new MC(s,t._geometryFactory);n.add(o),o.setInResult()}}return n},_n.prototype.placePolygonHoles=function(e,t){for(var n=t.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(e)}},_n.prototype.getPolygons=function(){var e=this.computePolygons(this._shellList);return e},_n.prototype.findEdgeRingContaining=function(e,t){for(var n=e.getLinearRing(),i=n.getEnvelopeInternal(),s=n.getCoordinateN(0),o=null,a=null,l=t.iterator();l.hasNext();){var u=l.next(),c=u.getLinearRing(),d=c.getEnvelopeInternal();o!==null&&(a=o.getLinearRing().getEnvelopeInternal());var f=!1;d.contains(i)&&$.isPointInRing(s,c.getCoordinates())&&(f=!0),f&&(o===null||a.contains(d))&&(o=u)}return o},_n.prototype.findShell=function(e){for(var t=0,n=null,i=e.iterator();i.hasNext();){var s=i.next();s.isHole()||(n=s,t++)}return wt.isTrue(t<=1,"found two shells in MinimalEdgeRing list"),n},_n.prototype.add=function(){if(arguments.length===1){var e=arguments[0];this.add(e.getEdgeEnds(),e.getNodes())}else if(arguments.length===2){var t=arguments[0],n=arguments[1];Qt.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(t),s=new Y,o=this.buildMinimalEdgeRings(i,this._shellList,s);this.sortShellsAndHoles(o,this._shellList,s),this.placeFreeHoles(this._shellList,s)}},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n};var Ha=function(){};Ha.prototype.getBounds=function(){},Ha.prototype.interfaces_=function(){return[]},Ha.prototype.getClass=function(){return Ha};var cr=function(){this._bounds=null,this._item=null;var e=arguments[0],t=arguments[1];this._bounds=e,this._item=t};cr.prototype.getItem=function(){return this._item},cr.prototype.getBounds=function(){return this._bounds},cr.prototype.interfaces_=function(){return[Ha,Hn]},cr.prototype.getClass=function(){return cr};var ji=function(){this._size=null,this._items=null,this._size=0,this._items=new Y,this._items.add(null)};ji.prototype.poll=function(){if(this.isEmpty())return null;var e=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),e},ji.prototype.size=function(){return this._size},ji.prototype.reorder=function(e){for(var t=this,n=null,i=this._items.get(e);e*2<=this._size&&(n=e*2,n!==t._size&&t._items.get(n+1).compareTo(t._items.get(n))<0&&n++,t._items.get(n).compareTo(i)<0);e=n)t._items.set(e,t._items.get(n));this._items.set(e,i)},ji.prototype.clear=function(){this._size=0,this._items.clear()},ji.prototype.isEmpty=function(){return this._size===0},ji.prototype.add=function(e){var t=this;this._items.add(null),this._size+=1;var n=this._size;for(this._items.set(0,e);e.compareTo(this._items.get(Math.trunc(n/2)))<0;n/=2)t._items.set(n,t._items.get(Math.trunc(n/2)));this._items.set(n,e)},ji.prototype.interfaces_=function(){return[]},ji.prototype.getClass=function(){return ji};var fs=function(){};fs.prototype.visitItem=function(e){},fs.prototype.interfaces_=function(){return[]},fs.prototype.getClass=function(){return fs};var Lo=function(){};Lo.prototype.insert=function(e,t){},Lo.prototype.remove=function(e,t){},Lo.prototype.query=function(){},Lo.prototype.interfaces_=function(){return[]},Lo.prototype.getClass=function(){return Lo};var ye=function(){if(this._childBoundables=new Y,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this._level=e}}},yv={serialVersionUID:{configurable:!0}};ye.prototype.getLevel=function(){return this._level},ye.prototype.size=function(){return this._childBoundables.size()},ye.prototype.getChildBoundables=function(){return this._childBoundables},ye.prototype.addChildBoundable=function(e){wt.isTrue(this._bounds===null),this._childBoundables.add(e)},ye.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},ye.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},ye.prototype.interfaces_=function(){return[Ha,Hn]},ye.prototype.getClass=function(){return ye},yv.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(ye,yv);var hr=function(){};hr.reverseOrder=function(){return{compare:function(t,n){return n.compareTo(t)}}},hr.min=function(e){return hr.sort(e),e.get(0)},hr.sort=function(e,t){var n=e.toArray();t?zs.sort(n,t):zs.sort(n);for(var i=e.iterator(),s=0,o=n.length;s<o;s++)i.next(),i.set(n[s])},hr.singletonList=function(e){var t=new Y;return t.add(e),t};var de=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var e=arguments[0],t=arguments[1],n=arguments[2];this._boundable1=e,this._boundable2=t,this._itemDistance=n,this._distance=this.distance()};de.prototype.expandToQueue=function(e,t){var n=de.isComposite(this._boundable1),i=de.isComposite(this._boundable2);if(n&&i)return de.area(this._boundable1)>de.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,e,t),null):(this.expand(this._boundable2,this._boundable1,e,t),null);if(n)return this.expand(this._boundable1,this._boundable2,e,t),null;if(i)return this.expand(this._boundable2,this._boundable1,e,t),null;throw new $t("neither boundable is composite")},de.prototype.isLeaves=function(){return!(de.isComposite(this._boundable1)||de.isComposite(this._boundable2))},de.prototype.compareTo=function(e){var t=e;return this._distance<t._distance?-1:this._distance>t._distance?1:0},de.prototype.expand=function(e,t,n,i){for(var s=this,o=e.getChildBoundables(),a=o.iterator();a.hasNext();){var l=a.next(),u=new de(l,t,s._itemDistance);u.getDistance()<i&&n.add(u)}},de.prototype.getBoundable=function(e){return e===0?this._boundable1:this._boundable2},de.prototype.getDistance=function(){return this._distance},de.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},de.prototype.interfaces_=function(){return[Wn]},de.prototype.getClass=function(){return de},de.area=function(e){return e.getBounds().getArea()},de.isComposite=function(e){return e instanceof ye};var Te=function r(){if(this._root=null,this._built=!1,this._itemBoundables=new Y,this._nodeCapacity=null,arguments.length===0){var e=r.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(arguments.length===1){var t=arguments[0];wt.isTrue(t>1,"Node capacity must be greater than 1"),this._nodeCapacity=t}},Bc={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};Te.prototype.getNodeCapacity=function(){return this._nodeCapacity},Te.prototype.lastNode=function(e){return e.get(e.size()-1)},Te.prototype.size=function(){var e=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var t=arguments[0],n=0,i=t.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof ye?n+=e.size(s):s instanceof cr&&(n+=1)}return n}},Te.prototype.removeItem=function(e,t){for(var n=null,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof cr&&s.getItem()===t&&(n=s)}return n!==null?(e.getChildBoundables().remove(n),!0):!1},Te.prototype.itemsTree=function(){var e=this;if(arguments.length===0){this.build();var t=this.itemsTree(this._root);return t===null?new Y:t}else if(arguments.length===1){for(var n=arguments[0],i=new Y,s=n.getChildBoundables().iterator();s.hasNext();){var o=s.next();if(o instanceof ye){var a=e.itemsTree(o);a!==null&&i.add(a)}else o instanceof cr?i.add(o.getItem()):wt.shouldNeverReachHere()}return i.size()<=0?null:i}},Te.prototype.insert=function(e,t){wt.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new cr(e,t))},Te.prototype.boundablesAtLevel=function(){var e=this;if(arguments.length===1){var t=arguments[0],n=new Y;return this.boundablesAtLevel(t,this._root,n),n}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(wt.isTrue(i>-2),s.getLevel()===i)return o.add(s),null;for(var a=s.getChildBoundables().iterator();a.hasNext();){var l=a.next();l instanceof ye?e.boundablesAtLevel(i,l,o):(wt.isTrue(l instanceof cr),i===-1&&o.add(l))}return null}},Te.prototype.query=function(){var e=this;if(arguments.length===1){var t=arguments[0];this.build();var n=new Y;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,n),n}else if(arguments.length===2){var i=arguments[0],s=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),i)&&this.query(i,this._root,s)}else if(arguments.length===3){if(pt(arguments[2],fs)&&arguments[0]instanceof Object&&arguments[1]instanceof ye)for(var o=arguments[0],a=arguments[1],l=arguments[2],u=a.getChildBoundables(),c=0;c<u.size();c++){var d=u.get(c);e.getIntersectsOp().intersects(d.getBounds(),o)&&(d instanceof ye?e.query(o,d,l):d instanceof cr?l.visitItem(d.getItem()):wt.shouldNeverReachHere())}else if(pt(arguments[2],ar)&&arguments[0]instanceof Object&&arguments[1]instanceof ye)for(var f=arguments[0],p=arguments[1],_=arguments[2],S=p.getChildBoundables(),b=0;b<S.size();b++){var I=S.get(b);e.getIntersectsOp().intersects(I.getBounds(),f)&&(I instanceof ye?e.query(f,I,_):I instanceof cr?_.add(I.getItem()):wt.shouldNeverReachHere())}}},Te.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},Te.prototype.getRoot=function(){return this.build(),this._root},Te.prototype.remove=function(){var e=this;if(arguments.length===2){var t=arguments[0],n=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),t)?this.remove(t,this._root,n):!1}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=this.removeItem(s,o);if(a)return!0;for(var l=null,u=s.getChildBoundables().iterator();u.hasNext();){var c=u.next();if(e.getIntersectsOp().intersects(c.getBounds(),i)&&c instanceof ye&&(a=e.remove(i,c,o),a)){l=c;break}}return l!==null&&l.getChildBoundables().isEmpty()&&s.getChildBoundables().remove(l),a}},Te.prototype.createHigherLevels=function(e,t){wt.isTrue(!e.isEmpty());var n=this.createParentBoundables(e,t+1);return n.size()===1?n.get(0):this.createHigherLevels(n,t+1)},Te.prototype.depth=function(){var e=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var t=arguments[0],n=0,i=t.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof ye){var o=e.depth(s);o>n&&(n=o)}}return n+1}},Te.prototype.createParentBoundables=function(e,t){var n=this;wt.isTrue(!e.isEmpty());var i=new Y;i.add(this.createNode(t));var s=new Y(e);hr.sort(s,this.getComparator());for(var o=s.iterator();o.hasNext();){var a=o.next();n.lastNode(i).getChildBoundables().size()===n.getNodeCapacity()&&i.add(n.createNode(t)),n.lastNode(i).addChildBoundable(a)}return i},Te.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},Te.prototype.interfaces_=function(){return[Hn]},Te.prototype.getClass=function(){return Te},Te.compareDoubles=function(e,t){return e>t?1:e<t?-1:0},Bc.IntersectsOp.get=function(){return RC},Bc.serialVersionUID.get=function(){return-3886435814360241e3},Bc.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(Te,Bc);var RC=function(){},qa=function(){};qa.prototype.distance=function(e,t){},qa.prototype.interfaces_=function(){return[]},qa.prototype.getClass=function(){return qa};var _v=(function(r){function e(n){n=n||e.DEFAULT_NODE_CAPACITY,r.call(this,n)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return e.prototype.createParentBoundablesFromVerticalSlices=function(i,s){var o=this;wt.isTrue(i.length>0);for(var a=new Y,l=0;l<i.length;l++)a.addAll(o.createParentBoundablesFromVerticalSlice(i[l],s));return a},e.prototype.createNode=function(i){return new wv(i)},e.prototype.size=function(){return arguments.length===0?r.prototype.size.call(this):r.prototype.size.apply(this,arguments)},e.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];if(i.isNull())return null;r.prototype.insert.call(this,i,s)}else return r.prototype.insert.apply(this,arguments)},e.prototype.getIntersectsOp=function(){return e.intersectsOp},e.prototype.verticalSlices=function(i,s){for(var o=Math.trunc(Math.ceil(i.size()/s)),a=new Array(s).fill(null),l=i.iterator(),u=0;u<s;u++){a[u]=new Y;for(var c=0;l.hasNext()&&c<o;){var d=l.next();a[u].add(d),c++}}return a},e.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return r.prototype.query.call(this,i)}else if(arguments.length===2){var s=arguments[0],o=arguments[1];r.prototype.query.call(this,s,o)}else if(arguments.length===3){if(pt(arguments[2],fs)&&arguments[0]instanceof Object&&arguments[1]instanceof ye){var a=arguments[0],l=arguments[1],u=arguments[2];r.prototype.query.call(this,a,l,u)}else if(pt(arguments[2],ar)&&arguments[0]instanceof Object&&arguments[1]instanceof ye){var c=arguments[0],d=arguments[1],f=arguments[2];r.prototype.query.call(this,c,d,f)}}},e.prototype.getComparator=function(){return e.yComparator},e.prototype.createParentBoundablesFromVerticalSlice=function(i,s){return r.prototype.createParentBoundables.call(this,i,s)},e.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return r.prototype.remove.call(this,i,s)}else return r.prototype.remove.apply(this,arguments)},e.prototype.depth=function(){return arguments.length===0?r.prototype.depth.call(this):r.prototype.depth.apply(this,arguments)},e.prototype.createParentBoundables=function(i,s){wt.isTrue(!i.isEmpty());var o=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),a=new Y(i);hr.sort(a,e.xComparator);var l=this.verticalSlices(a,Math.trunc(Math.ceil(Math.sqrt(o))));return this.createParentBoundablesFromVerticalSlices(l,s)},e.prototype.nearestNeighbour=function(){if(arguments.length===1){if(pt(arguments[0],qa)){var i=arguments[0],s=new de(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(s)}else if(arguments[0]instanceof de){var o=arguments[0];return this.nearestNeighbour(o,vt.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof e&&pt(arguments[1],qa)){var a=arguments[0],l=arguments[1],u=new de(this.getRoot(),a.getRoot(),l);return this.nearestNeighbour(u)}else if(arguments[0]instanceof de&&typeof arguments[1]=="number"){var c=arguments[0],d=arguments[1],f=d,p=null,_=new ji;for(_.add(c);!_.isEmpty()&&f>0;){var S=_.poll(),b=S.getDistance();if(b>=f)break;S.isLeaves()?(f=b,p=S):S.expandToQueue(_,f)}return[p.getBoundable(0).getItem(),p.getBoundable(1).getItem()]}}else if(arguments.length===3){var I=arguments[0],m=arguments[1],w=arguments[2],g=new cr(I,m),y=new de(this.getRoot(),g,w);return this.nearestNeighbour(y)[0]}},e.prototype.interfaces_=function(){return[Lo,Hn]},e.prototype.getClass=function(){return e},e.centreX=function(i){return e.avg(i.getMinX(),i.getMaxX())},e.avg=function(i,s){return(i+s)/2},e.centreY=function(i){return e.avg(i.getMinY(),i.getMaxY())},t.STRtreeNode.get=function(){return wv},t.serialVersionUID.get=function(){return 0x39920f7d5f261e0},t.xComparator.get=function(){return{interfaces_:function(){return[Ma]},compare:function(n,i){return r.compareDoubles(e.centreX(n.getBounds()),e.centreX(i.getBounds()))}}},t.yComparator.get=function(){return{interfaces_:function(){return[Ma]},compare:function(n,i){return r.compareDoubles(e.centreY(n.getBounds()),e.centreY(i.getBounds()))}}},t.intersectsOp.get=function(){return{interfaces_:function(){return[r.IntersectsOp]},intersects:function(n,i){return n.intersects(i)}}},t.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(e,t),e})(Te),wv=(function(r){function e(){var t=arguments[0];r.call(this,t)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var n=null,i=this.getChildBoundables().iterator();i.hasNext();){var s=i.next();n===null?n=new rt(s.getBounds()):n.expandToInclude(s.getBounds())}return n},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(ye),un=function(){};un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un},un.relativeSign=function(e,t){return e<t?-1:e>t?1:0},un.compare=function(e,t,n){if(t.equals2D(n))return 0;var i=un.relativeSign(t.x,n.x),s=un.relativeSign(t.y,n.y);switch(e){case 0:return un.compareValue(i,s);case 1:return un.compareValue(s,i);case 2:return un.compareValue(s,-i);case 3:return un.compareValue(-i,s);case 4:return un.compareValue(-i,-s);case 5:return un.compareValue(-s,-i);case 6:return un.compareValue(-s,i);case 7:return un.compareValue(i,-s)}return wt.shouldNeverReachHere("invalid octant value"),0},un.compareValue=function(e,t){return e<0?-1:e>0?1:t<0?-1:t>0?1:0};var ps=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];this._segString=e,this.coord=new F(t),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!t.equals2D(e.getCoordinate(n))};ps.prototype.getCoordinate=function(){return this.coord},ps.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex)},ps.prototype.compareTo=function(e){var t=e;return this.segmentIndex<t.segmentIndex?-1:this.segmentIndex>t.segmentIndex?1:this.coord.equals2D(t.coord)?0:un.compare(this._segmentOctant,this.coord,t.coord)},ps.prototype.isEndPoint=function(e){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===e},ps.prototype.isInterior=function(){return this._isInterior},ps.prototype.interfaces_=function(){return[Wn]},ps.prototype.getClass=function(){return ps};var Qe=function(){this._nodeMap=new qe,this._edge=null;var e=arguments[0];this._edge=e};Qe.prototype.getSplitCoordinates=function(){var e=this,t=new gu;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next();e.addEdgeCoordinates(i,s,t),i=s}return t.toCoordinateArray()},Qe.prototype.addCollapsedNodes=function(){var e=this,t=new Y;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var n=t.iterator();n.hasNext();){var i=n.next().intValue();e.add(e._edge.getCoordinate(i),i)}},Qe.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();){var n=t.next();n.print(e)}},Qe.prototype.findCollapsesFromExistingVertices=function(e){for(var t=this,n=0;n<this._edge.size()-2;n++){var i=t._edge.getCoordinate(n),s=t._edge.getCoordinate(n+2);i.equals2D(s)&&e.add(new Pr(n+1))}},Qe.prototype.addEdgeCoordinates=function(e,t,n){var i=this,s=this._edge.getCoordinate(t.segmentIndex),o=t.isInterior()||!t.coord.equals2D(s);n.add(new F(e.coord),!1);for(var a=e.segmentIndex+1;a<=t.segmentIndex;a++)n.add(i._edge.getCoordinate(a));o&&n.add(new F(t.coord))},Qe.prototype.iterator=function(){return this._nodeMap.values().iterator()},Qe.prototype.addSplitEdges=function(e){var t=this;this.addEndpoints(),this.addCollapsedNodes();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next(),o=t.createSplitEdge(i,s);e.add(o),i=s}},Qe.prototype.findCollapseIndex=function(e,t,n){if(!e.coord.equals2D(t.coord))return!1;var i=t.segmentIndex-e.segmentIndex;return t.isInterior()||i--,i===1?(n[0]=e.segmentIndex+1,!0):!1},Qe.prototype.findCollapsesFromInsertedNodes=function(e){for(var t=this,n=new Array(1).fill(null),i=this.iterator(),s=i.next();i.hasNext();){var o=i.next(),a=t.findCollapseIndex(s,o,n);a&&e.add(new Pr(n[0])),s=o}},Qe.prototype.getEdge=function(){return this._edge},Qe.prototype.addEndpoints=function(){var e=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(e),e)},Qe.prototype.createSplitEdge=function(e,t){var n=this,i=t.segmentIndex-e.segmentIndex+2,s=this._edge.getCoordinate(t.segmentIndex),o=t.isInterior()||!t.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),l=0;a[l++]=new F(e.coord);for(var u=e.segmentIndex+1;u<=t.segmentIndex;u++)a[l++]=n._edge.getCoordinate(u);return o&&(a[l]=new F(t.coord)),new ae(a,this._edge.getData())},Qe.prototype.add=function(e,t){var n=new ps(this._edge,e,t,this._edge.getSegmentOctant(t)),i=this._nodeMap.get(n);return i!==null?(wt.isTrue(i.coord.equals2D(e),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(n,n),n)},Qe.prototype.checkSplitEdgesCorrectness=function(e){var t=this._edge.getCoordinates(),n=e.get(0),i=n.getCoordinate(0);if(!i.equals2D(t[0]))throw new Mi("bad split edge start point at "+i);var s=e.get(e.size()-1),o=s.getCoordinates(),a=o[o.length-1];if(!a.equals2D(t[t.length-1]))throw new Mi("bad split edge end point at "+a)},Qe.prototype.interfaces_=function(){return[]},Qe.prototype.getClass=function(){return Qe};var Fo=function(){};Fo.prototype.interfaces_=function(){return[]},Fo.prototype.getClass=function(){return Fo},Fo.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],t=arguments[1];if(e===0&&t===0)throw new $t("Cannot compute the octant for point ( "+e+", "+t+" )");var n=Math.abs(e),i=Math.abs(t);return e>=0?t>=0?n>=i?0:1:n>=i?7:6:t>=0?n>=i?3:2:n>=i?4:5}else if(arguments[0]instanceof F&&arguments[1]instanceof F){var s=arguments[0],o=arguments[1],a=o.x-s.x,l=o.y-s.y;if(a===0&&l===0)throw new $t("Cannot compute the octant for two identical points "+s);return Fo.octant(a,l)}};var ai=function(){};ai.prototype.getCoordinates=function(){},ai.prototype.size=function(){},ai.prototype.getCoordinate=function(e){},ai.prototype.isClosed=function(){},ai.prototype.setData=function(e){},ai.prototype.getData=function(){},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai};var bu=function(){};bu.prototype.addIntersection=function(e,t){},bu.prototype.interfaces_=function(){return[ai]},bu.prototype.getClass=function(){return bu};var ae=function(){this._nodeList=new Qe(this),this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};ae.prototype.getCoordinates=function(){return this._pts},ae.prototype.size=function(){return this._pts.length},ae.prototype.getCoordinate=function(e){return this._pts[e]},ae.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},ae.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(e),this.getCoordinate(e+1))},ae.prototype.setData=function(e){this._data=e},ae.prototype.safeOctant=function(e,t){return e.equals2D(t)?0:Fo.octant(e,t)},ae.prototype.getData=function(){return this._data},ae.prototype.addIntersection=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1];this.addIntersectionNode(e,t)}else if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[3],o=new F(n.getIntersection(s));this.addIntersection(o,i)}},ae.prototype.toString=function(){return or.toLineString(new oe(this._pts))},ae.prototype.getNodeList=function(){return this._nodeList},ae.prototype.addIntersectionNode=function(e,t){var n=t,i=n+1;if(i<this._pts.length){var s=this._pts[i];e.equals2D(s)&&(n=i)}var o=this._nodeList.add(e,n);return o},ae.prototype.addIntersections=function(e,t,n){for(var i=this,s=0;s<e.getIntersectionNum();s++)i.addIntersection(e,t,n,s)},ae.prototype.interfaces_=function(){return[bu]},ae.prototype.getClass=function(){return ae},ae.getNodedSubstrings=function(){if(arguments.length===1){var e=arguments[0],t=new Y;return ae.getNodedSubstrings(e,t),t}else if(arguments.length===2)for(var n=arguments[0],i=arguments[1],s=n.iterator();s.hasNext();){var o=s.next();o.getNodeList().addSplitEdges(i)}};var ot=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new F,this.p1=new F;else if(arguments.length===1){var e=arguments[0];this.p0=new F(e.p0),this.p1=new F(e.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var t=arguments[0],n=arguments[1],i=arguments[2],s=arguments[3];this.p0=new F(t,n),this.p1=new F(i,s)}},Ev={serialVersionUID:{configurable:!0}};ot.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},ot.prototype.orientationIndex=function(){if(arguments[0]instanceof ot){var e=arguments[0],t=$.orientationIndex(this.p0,this.p1,e.p0),n=$.orientationIndex(this.p0,this.p1,e.p1);return t>=0&&n>=0||t<=0&&n<=0?Math.max(t,n):0}else if(arguments[0]instanceof F){var i=arguments[0];return $.orientationIndex(this.p0,this.p1,i)}},ot.prototype.toGeometry=function(e){return e.createLineString([this.p0,this.p1])},ot.prototype.isVertical=function(){return this.p0.x===this.p1.x},ot.prototype.equals=function(e){if(!(e instanceof ot))return!1;var t=e;return this.p0.equals(t.p0)&&this.p1.equals(t.p1)},ot.prototype.intersection=function(e){var t=new js;return t.computeIntersection(this.p0,this.p1,e.p0,e.p1),t.hasIntersection()?t.getIntersection(0):null},ot.prototype.project=function(){if(arguments[0]instanceof F){var e=arguments[0];if(e.equals(this.p0)||e.equals(this.p1))return new F(e);var t=this.projectionFactor(e),n=new F;return n.x=this.p0.x+t*(this.p1.x-this.p0.x),n.y=this.p0.y+t*(this.p1.y-this.p0.y),n}else if(arguments[0]instanceof ot){var i=arguments[0],s=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(s>=1&&o>=1||s<=0&&o<=0)return null;var a=this.project(i.p0);s<0&&(a=this.p0),s>1&&(a=this.p1);var l=this.project(i.p1);return o<0&&(l=this.p0),o>1&&(l=this.p1),new ot(a,l)}},ot.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},ot.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},ot.prototype.getCoordinate=function(e){return e===0?this.p0:this.p1},ot.prototype.distancePerpendicular=function(e){return $.distancePointLinePerpendicular(e,this.p0,this.p1)},ot.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},ot.prototype.midPoint=function(){return ot.midPoint(this.p0,this.p1)},ot.prototype.projectionFactor=function(e){if(e.equals(this.p0))return 0;if(e.equals(this.p1))return 1;var t=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=t*t+n*n;if(i<=0)return vt.NaN;var s=((e.x-this.p0.x)*t+(e.y-this.p0.y)*n)/i;return s},ot.prototype.closestPoints=function(e){var t=this.intersection(e);if(t!==null)return[t,t];var n=new Array(2).fill(null),i=vt.MAX_VALUE,s=null,o=this.closestPoint(e.p0);i=o.distance(e.p0),n[0]=o,n[1]=e.p0;var a=this.closestPoint(e.p1);s=a.distance(e.p1),s<i&&(i=s,n[0]=a,n[1]=e.p1);var l=e.closestPoint(this.p0);s=l.distance(this.p0),s<i&&(i=s,n[0]=this.p0,n[1]=l);var u=e.closestPoint(this.p1);return s=u.distance(this.p1),s<i&&(i=s,n[0]=this.p1,n[1]=u),n},ot.prototype.closestPoint=function(e){var t=this.projectionFactor(e);if(t>0&&t<1)return this.project(e);var n=this.p0.distance(e),i=this.p1.distance(e);return n<i?this.p0:this.p1},ot.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},ot.prototype.getLength=function(){return this.p0.distance(this.p1)},ot.prototype.compareTo=function(e){var t=e,n=this.p0.compareTo(t.p0);return n!==0?n:this.p1.compareTo(t.p1)},ot.prototype.reverse=function(){var e=this.p0;this.p0=this.p1,this.p1=e},ot.prototype.equalsTopo=function(e){return this.p0.equals(e.p0)&&(this.p1.equals(e.p1)||this.p0.equals(e.p1))&&this.p1.equals(e.p0)},ot.prototype.lineIntersection=function(e){try{var t=sr.intersection(this.p0,this.p1,e.p0,e.p1);return t}catch(n){if(!(n instanceof La))throw n}finally{}return null},ot.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},ot.prototype.pointAlongOffset=function(e,t){var n=this.p0.x+e*(this.p1.x-this.p0.x),i=this.p0.y+e*(this.p1.y-this.p0.y),s=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,a=Math.sqrt(s*s+o*o),l=0,u=0;if(t!==0){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");l=t*s/a,u=t*o/a}var c=n-u,d=i+l,f=new F(c,d);return f},ot.prototype.setCoordinates=function(){if(arguments.length===1){var e=arguments[0];this.setCoordinates(e.p0,e.p1)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];this.p0.x=t.x,this.p0.y=t.y,this.p1.x=n.x,this.p1.y=n.y}},ot.prototype.segmentFraction=function(e){var t=this.projectionFactor(e);return t<0?t=0:(t>1||vt.isNaN(t))&&(t=1),t},ot.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},ot.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},ot.prototype.distance=function(){if(arguments[0]instanceof ot){var e=arguments[0];return $.distanceLineLine(this.p0,this.p1,e.p0,e.p1)}else if(arguments[0]instanceof F){var t=arguments[0];return $.distancePointLine(t,this.p0,this.p1)}},ot.prototype.pointAlong=function(e){var t=new F;return t.x=this.p0.x+e*(this.p1.x-this.p0.x),t.y=this.p0.y+e*(this.p1.y-this.p0.y),t},ot.prototype.hashCode=function(){var e=vt.doubleToLongBits(this.p0.x);e^=vt.doubleToLongBits(this.p0.y)*31;var t=Math.trunc(e)^Math.trunc(e>>32),n=vt.doubleToLongBits(this.p1.x);n^=vt.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(n)^Math.trunc(n>>32);return t^i},ot.prototype.interfaces_=function(){return[Wn,Hn]},ot.prototype.getClass=function(){return ot},ot.midPoint=function(e,t){return new F((e.x+t.x)/2,(e.y+t.y)/2)},Ev.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(ot,Ev);var Pu=function(){this.tempEnv1=new rt,this.tempEnv2=new rt,this._overlapSeg1=new ot,this._overlapSeg2=new ot};Pu.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];e.getLineSegment(t,this._overlapSeg1),n.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},Pu.prototype.interfaces_=function(){return[]},Pu.prototype.getClass=function(){return Pu};var wn=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];this._pts=e,this._start=t,this._end=n,this._context=i};wn.prototype.getLineSegment=function(e,t){t.p0=this._pts[e],t.p1=this._pts[e+1]},wn.prototype.computeSelect=function(e,t,n,i){var s=this._pts[t],o=this._pts[n];if(i.tempEnv1.init(s,o),n-t===1)return i.select(this,t),null;if(!e.intersects(i.tempEnv1))return null;var a=Math.trunc((t+n)/2);t<a&&this.computeSelect(e,t,a,i),a<n&&this.computeSelect(e,a,n,i)},wn.prototype.getCoordinates=function(){for(var e=this,t=new Array(this._end-this._start+1).fill(null),n=0,i=this._start;i<=this._end;i++)t[n++]=e._pts[i];return t},wn.prototype.computeOverlaps=function(e,t){this.computeOverlapsInternal(this._start,this._end,e,e._start,e._end,t)},wn.prototype.setId=function(e){this._id=e},wn.prototype.select=function(e,t){this.computeSelect(e,this._start,this._end,t)},wn.prototype.getEnvelope=function(){if(this._env===null){var e=this._pts[this._start],t=this._pts[this._end];this._env=new rt(e,t)}return this._env},wn.prototype.getEndIndex=function(){return this._end},wn.prototype.getStartIndex=function(){return this._start},wn.prototype.getContext=function(){return this._context},wn.prototype.getId=function(){return this._id},wn.prototype.computeOverlapsInternal=function(e,t,n,i,s,o){var a=this._pts[e],l=this._pts[t],u=n._pts[i],c=n._pts[s];if(t-e===1&&s-i===1)return o.overlap(this,e,n,i),null;if(o.tempEnv1.init(a,l),o.tempEnv2.init(u,c),!o.tempEnv1.intersects(o.tempEnv2))return null;var d=Math.trunc((e+t)/2),f=Math.trunc((i+s)/2);e<d&&(i<f&&this.computeOverlapsInternal(e,d,n,i,f,o),f<s&&this.computeOverlapsInternal(e,d,n,f,s,o)),d<t&&(i<f&&this.computeOverlapsInternal(d,t,n,i,f,o),f<s&&this.computeOverlapsInternal(d,t,n,f,s,o))},wn.prototype.interfaces_=function(){return[]},wn.prototype.getClass=function(){return wn};var Fr=function(){};Fr.prototype.interfaces_=function(){return[]},Fr.prototype.getClass=function(){return Fr},Fr.getChainStartIndices=function(e){var t=0,n=new Y;n.add(new Pr(t));do{var i=Fr.findChainEnd(e,t);n.add(new Pr(i)),t=i}while(t<e.length-1);var s=Fr.toIntArray(n);return s},Fr.findChainEnd=function(e,t){for(var n=t;n<e.length-1&&e[n].equals2D(e[n+1]);)n++;if(n>=e.length-1)return e.length-1;for(var i=Ut.quadrant(e[n],e[n+1]),s=t+1;s<e.length;){if(!e[s-1].equals2D(e[s])){var o=Ut.quadrant(e[s-1],e[s]);if(o!==i)break}s++}return s-1},Fr.getChains=function(){if(arguments.length===1){var e=arguments[0];return Fr.getChains(e,null)}else if(arguments.length===2){for(var t=arguments[0],n=arguments[1],i=new Y,s=Fr.getChainStartIndices(t),o=0;o<s.length-1;o++){var a=new wn(t,s[o],s[o+1],n);i.add(a)}return i}},Fr.toIntArray=function(e){for(var t=new Array(e.size()).fill(null),n=0;n<t.length;n++)t[n]=e.get(n).intValue();return t};var Gs=function(){};Gs.prototype.computeNodes=function(e){},Gs.prototype.getNodedSubstrings=function(){},Gs.prototype.interfaces_=function(){return[]},Gs.prototype.getClass=function(){return Gs};var Iu=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this.setSegmentIntersector(e)}}};Iu.prototype.setSegmentIntersector=function(e){this._segInt=e},Iu.prototype.interfaces_=function(){return[Gs]},Iu.prototype.getClass=function(){return Iu};var Yd=(function(r){function e(n){n?r.call(this,n):r.call(this),this._monoChains=new Y,this._index=new _v,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=function(){return this._monoChains},e.prototype.getNodedSubstrings=function(){return ae.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(i){for(var s=this,o=Fr.getChains(i.getCoordinates(),i),a=o.iterator();a.hasNext();){var l=a.next();l.setId(s._idCounter++),s._index.insert(l.getEnvelope(),l),s._monoChains.add(l)}},e.prototype.computeNodes=function(i){var s=this;this._nodedSegStrings=i;for(var o=i.iterator();o.hasNext();)s.add(o.next());this.intersectChains()},e.prototype.intersectChains=function(){for(var i=this,s=new Cv(this._segInt),o=this._monoChains.iterator();o.hasNext();)for(var a=o.next(),l=i._index.query(a.getEnvelope()),u=l.iterator();u.hasNext();){var c=u.next();if(c.getId()>a.getId()&&(a.computeOverlaps(c,s),i._nOverlaps++),i._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},t.SegmentOverlapAction.get=function(){return Cv},Object.defineProperties(e,t),e})(Iu),Cv=(function(r){function e(){r.call(this),this._si=null;var t=arguments[0];this._si=t}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3],a=n.getContext(),l=s.getContext();this._si.processIntersections(a,i,l,o)}else return r.prototype.overlap.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(Pu),Rt=function r(){if(this._quadrantSegments=r.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=r.CAP_ROUND,this._joinStyle=r.JOIN_ROUND,this._mitreLimit=r.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=r.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this.setQuadrantSegments(e)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];this.setQuadrantSegments(t),this.setEndCapStyle(n)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(s),this.setJoinStyle(o),this.setMitreLimit(a)}}},Bi={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Rt.prototype.getEndCapStyle=function(){return this._endCapStyle},Rt.prototype.isSingleSided=function(){return this._isSingleSided},Rt.prototype.setQuadrantSegments=function(e){this._quadrantSegments=e,this._quadrantSegments===0&&(this._joinStyle=Rt.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Rt.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),e<=0&&(this._quadrantSegments=1),this._joinStyle!==Rt.JOIN_ROUND&&(this._quadrantSegments=Rt.DEFAULT_QUADRANT_SEGMENTS)},Rt.prototype.getJoinStyle=function(){return this._joinStyle},Rt.prototype.setJoinStyle=function(e){this._joinStyle=e},Rt.prototype.setSimplifyFactor=function(e){this._simplifyFactor=e<0?0:e},Rt.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Rt.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Rt.prototype.setEndCapStyle=function(e){this._endCapStyle=e},Rt.prototype.getMitreLimit=function(){return this._mitreLimit},Rt.prototype.setMitreLimit=function(e){this._mitreLimit=e},Rt.prototype.setSingleSided=function(e){this._isSingleSided=e},Rt.prototype.interfaces_=function(){return[]},Rt.prototype.getClass=function(){return Rt},Rt.bufferDistanceError=function(e){var t=Math.PI/2/e;return 1-Math.cos(t/2)},Bi.CAP_ROUND.get=function(){return 1},Bi.CAP_FLAT.get=function(){return 2},Bi.CAP_SQUARE.get=function(){return 3},Bi.JOIN_ROUND.get=function(){return 1},Bi.JOIN_MITRE.get=function(){return 2},Bi.JOIN_BEVEL.get=function(){return 3},Bi.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Bi.DEFAULT_MITRE_LIMIT.get=function(){return 5},Bi.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(Rt,Bi);var ne=function(e){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=$.COUNTERCLOCKWISE,this._inputLine=e||null},xu={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};ne.prototype.isDeletable=function(e,t,n,i){var s=this._inputLine[e],o=this._inputLine[t],a=this._inputLine[n];return!this.isConcave(s,o,a)||!this.isShallow(s,o,a,i)?!1:this.isShallowSampled(s,o,e,n,i)},ne.prototype.deleteShallowConcavities=function(){for(var e=this,t=1,n=this.findNextNonDeletedIndex(t),i=this.findNextNonDeletedIndex(n),s=!1;i<this._inputLine.length;){var o=!1;e.isDeletable(t,n,i,e._distanceTol)&&(e._isDeleted[n]=ne.DELETE,o=!0,s=!0),o?t=i:t=n,n=e.findNextNonDeletedIndex(t),i=e.findNextNonDeletedIndex(n)}return s},ne.prototype.isShallowConcavity=function(e,t,n,i){var s=$.computeOrientation(e,t,n),o=s===this._angleOrientation;if(!o)return!1;var a=$.distancePointLine(t,e,n);return a<i},ne.prototype.isShallowSampled=function(e,t,n,i,s){var o=this,a=Math.trunc((i-n)/ne.NUM_PTS_TO_CHECK);a<=0&&(a=1);for(var l=n;l<i;l+=a)if(!o.isShallow(e,t,o._inputLine[l],s))return!1;return!0},ne.prototype.isConcave=function(e,t,n){var i=$.computeOrientation(e,t,n),s=i===this._angleOrientation;return s},ne.prototype.simplify=function(e){var t=this;this._distanceTol=Math.abs(e),e<0&&(this._angleOrientation=$.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var n=!1;do n=t.deleteShallowConcavities();while(n);return this.collapseLine()},ne.prototype.findNextNonDeletedIndex=function(e){for(var t=e+1;t<this._inputLine.length&&this._isDeleted[t]===ne.DELETE;)t++;return t},ne.prototype.isShallow=function(e,t,n,i){var s=$.distancePointLine(t,e,n);return s<i},ne.prototype.collapseLine=function(){for(var e=this,t=new gu,n=0;n<this._inputLine.length;n++)e._isDeleted[n]!==ne.DELETE&&t.add(e._inputLine[n]);return t.toCoordinateArray()},ne.prototype.interfaces_=function(){return[]},ne.prototype.getClass=function(){return ne},ne.simplify=function(e,t){var n=new ne(e);return n.simplify(t)},xu.INIT.get=function(){return 0},xu.DELETE.get=function(){return 1},xu.KEEP.get=function(){return 1},xu.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(ne,xu);var Fn=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new Y},Sv={COORDINATE_ARRAY_TYPE:{configurable:!0}};Fn.prototype.getCoordinates=function(){var e=this._ptList.toArray(Fn.COORDINATE_ARRAY_TYPE);return e},Fn.prototype.setPrecisionModel=function(e){this._precisionModel=e},Fn.prototype.addPt=function(e){var t=new F(e);if(this._precisionModel.makePrecise(t),this.isRedundant(t))return null;this._ptList.add(t)},Fn.prototype.revere=function(){},Fn.prototype.addPts=function(e,t){var n=this;if(t)for(var i=0;i<e.length;i++)n.addPt(e[i]);else for(var s=e.length-1;s>=0;s--)n.addPt(e[s])},Fn.prototype.isRedundant=function(e){if(this._ptList.size()<1)return!1;var t=this._ptList.get(this._ptList.size()-1),n=e.distance(t);return n<this._minimimVertexDistance},Fn.prototype.toString=function(){var e=new bt,t=e.createLineString(this.getCoordinates());return t.toString()},Fn.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var e=new F(this._ptList.get(0)),t=this._ptList.get(this._ptList.size()-1);if(e.equals(t))return null;this._ptList.add(e)},Fn.prototype.setMinimumVertexDistance=function(e){this._minimimVertexDistance=e},Fn.prototype.interfaces_=function(){return[]},Fn.prototype.getClass=function(){return Fn},Sv.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Fn,Sv);var xt=function(){},Ao={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};xt.prototype.interfaces_=function(){return[]},xt.prototype.getClass=function(){return xt},xt.toDegrees=function(e){return e*180/Math.PI},xt.normalize=function(e){for(;e>Math.PI;)e-=xt.PI_TIMES_2;for(;e<=-Math.PI;)e+=xt.PI_TIMES_2;return e},xt.angle=function(){if(arguments.length===1){var e=arguments[0];return Math.atan2(e.y,e.x)}else if(arguments.length===2){var t=arguments[0],n=arguments[1],i=n.x-t.x,s=n.y-t.y;return Math.atan2(s,i)}},xt.isAcute=function(e,t,n){var i=e.x-t.x,s=e.y-t.y,o=n.x-t.x,a=n.y-t.y,l=i*o+s*a;return l>0},xt.isObtuse=function(e,t,n){var i=e.x-t.x,s=e.y-t.y,o=n.x-t.x,a=n.y-t.y,l=i*o+s*a;return l<0},xt.interiorAngle=function(e,t,n){var i=xt.angle(t,e),s=xt.angle(t,n);return Math.abs(s-i)},xt.normalizePositive=function(e){if(e<0){for(;e<0;)e+=xt.PI_TIMES_2;e>=xt.PI_TIMES_2&&(e=0)}else{for(;e>=xt.PI_TIMES_2;)e-=xt.PI_TIMES_2;e<0&&(e=0)}return e},xt.angleBetween=function(e,t,n){var i=xt.angle(t,e),s=xt.angle(t,n);return xt.diff(i,s)},xt.diff=function(e,t){var n=null;return e<t?n=t-e:n=e-t,n>Math.PI&&(n=2*Math.PI-n),n},xt.toRadians=function(e){return e*Math.PI/180},xt.getTurn=function(e,t){var n=Math.sin(t-e);return n>0?xt.COUNTERCLOCKWISE:n<0?xt.CLOCKWISE:xt.NONE},xt.angleBetweenOriented=function(e,t,n){var i=xt.angle(t,e),s=xt.angle(t,n),o=s-i;return o<=-Math.PI?o+xt.PI_TIMES_2:o>Math.PI?o-xt.PI_TIMES_2:o},Ao.PI_TIMES_2.get=function(){return 2*Math.PI},Ao.PI_OVER_2.get=function(){return Math.PI/2},Ao.PI_OVER_4.get=function(){return Math.PI/4},Ao.COUNTERCLOCKWISE.get=function(){return $.COUNTERCLOCKWISE},Ao.CLOCKWISE.get=function(){return $.CLOCKWISE},Ao.NONE.get=function(){return $.COLLINEAR},Object.defineProperties(xt,Ao);var Yt=function r(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new ot,this._seg1=new ot,this._offset0=new ot,this._offset1=new ot,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],t=arguments[1],n=arguments[2];this._precisionModel=e,this._bufParams=t,this._li=new js,this._filletAngleQuantum=Math.PI/2/t.getQuadrantSegments(),t.getQuadrantSegments()>=8&&t.getJoinStyle()===Rt.JOIN_ROUND&&(this._closingSegLengthFactor=r.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)},Tu={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Yt.prototype.addNextSegment=function(e,t){if(this._s0=this._s1,this._s1=this._s2,this._s2=e,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=$.computeOrientation(this._s0,this._s1,this._s2),i=n===$.CLOCKWISE&&this._side===W.LEFT||n===$.COUNTERCLOCKWISE&&this._side===W.RIGHT;n===0?this.addCollinear(t):i?this.addOutsideTurn(n,t):this.addInsideTurn(n,t)},Yt.prototype.addLineEndCap=function(e,t){var n=new ot(e,t),i=new ot;this.computeOffsetSegment(n,W.LEFT,this._distance,i);var s=new ot;this.computeOffsetSegment(n,W.RIGHT,this._distance,s);var o=t.x-e.x,a=t.y-e.y,l=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case Rt.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(t,l+Math.PI/2,l-Math.PI/2,$.CLOCKWISE,this._distance),this._segList.addPt(s.p1);break;case Rt.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(s.p1);break;case Rt.CAP_SQUARE:var u=new F;u.x=Math.abs(this._distance)*Math.cos(l),u.y=Math.abs(this._distance)*Math.sin(l);var c=new F(i.p1.x+u.x,i.p1.y+u.y),d=new F(s.p1.x+u.x,s.p1.y+u.y);this._segList.addPt(c),this._segList.addPt(d);break}},Yt.prototype.getCoordinates=function(){var e=this._segList.getCoordinates();return e},Yt.prototype.addMitreJoin=function(e,t,n,i){var s=!0,o=null;try{o=sr.intersection(t.p0,t.p1,n.p0,n.p1);var a=i<=0?1:o.distance(e)/Math.abs(i);a>this._bufParams.getMitreLimit()&&(s=!1)}catch(l){if(l instanceof La)o=new F(0,0),s=!1;else throw l}finally{}s?this._segList.addPt(o):this.addLimitedMitreJoin(t,n,i,this._bufParams.getMitreLimit())},Yt.prototype.addFilletCorner=function(e,t,n,i,s){var o=t.x-e.x,a=t.y-e.y,l=Math.atan2(a,o),u=n.x-e.x,c=n.y-e.y,d=Math.atan2(c,u);i===$.CLOCKWISE?l<=d&&(l+=2*Math.PI):l>=d&&(l-=2*Math.PI),this._segList.addPt(t),this.addFilletArc(e,l,d,i,s),this._segList.addPt(n)},Yt.prototype.addOutsideTurn=function(e,t){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Yt.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===Rt.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===Rt.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(t&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,e,this._distance),this._segList.addPt(this._offset1.p0))},Yt.prototype.createSquare=function(e){this._segList.addPt(new F(e.x+this._distance,e.y+this._distance)),this._segList.addPt(new F(e.x+this._distance,e.y-this._distance)),this._segList.addPt(new F(e.x-this._distance,e.y-this._distance)),this._segList.addPt(new F(e.x-this._distance,e.y+this._distance)),this._segList.closeRing()},Yt.prototype.addSegments=function(e,t){this._segList.addPts(e,t)},Yt.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Yt.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Yt.prototype.initSideSegments=function(e,t,n){this._s1=e,this._s2=t,this._side=n,this._seg1.setCoordinates(e,t),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},Yt.prototype.addLimitedMitreJoin=function(e,t,n,i){var s=this._seg0.p1,o=xt.angle(s,this._seg0.p0),a=xt.angleBetweenOriented(this._seg0.p0,s,this._seg1.p1),l=a/2,u=xt.normalize(o+l),c=xt.normalize(u+Math.PI),d=i*n,f=d*Math.abs(Math.sin(l)),p=n-f,_=s.x+d*Math.cos(c),S=s.y+d*Math.sin(c),b=new F(_,S),I=new ot(s,b),m=I.pointAlongOffset(1,p),w=I.pointAlongOffset(1,-p);this._side===W.LEFT?(this._segList.addPt(m),this._segList.addPt(w)):(this._segList.addPt(w),this._segList.addPt(m))},Yt.prototype.computeOffsetSegment=function(e,t,n,i){var s=t===W.LEFT?1:-1,o=e.p1.x-e.p0.x,a=e.p1.y-e.p0.y,l=Math.sqrt(o*o+a*a),u=s*n*o/l,c=s*n*a/l;i.p0.x=e.p0.x-c,i.p0.y=e.p0.y+u,i.p1.x=e.p1.x-c,i.p1.y=e.p1.y+u},Yt.prototype.addFilletArc=function(e,t,n,i,s){var o=this,a=i===$.CLOCKWISE?-1:1,l=Math.abs(t-n),u=Math.trunc(l/this._filletAngleQuantum+.5);if(u<1)return null;for(var c=0,d=l/u,f=c,p=new F;f<l;){var _=t+a*f;p.x=e.x+s*Math.cos(_),p.y=e.y+s*Math.sin(_),o._segList.addPt(p),f+=d}},Yt.prototype.addInsideTurn=function(e,t){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Yt.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new F((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var i=new F((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Yt.prototype.createCircle=function(e){var t=new F(e.x+this._distance,e.y);this._segList.addPt(t),this.addFilletArc(e,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Yt.prototype.addBevelJoin=function(e,t){this._segList.addPt(e.p1),this._segList.addPt(t.p0)},Yt.prototype.init=function(e){this._distance=e,this._maxCurveSegmentError=e*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Fn,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(e*Yt.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Yt.prototype.addCollinear=function(e){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var t=this._li.getIntersectionNum();t>=2&&(this._bufParams.getJoinStyle()===Rt.JOIN_BEVEL||this._bufParams.getJoinStyle()===Rt.JOIN_MITRE?(e&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,$.CLOCKWISE,this._distance))},Yt.prototype.closeRing=function(){this._segList.closeRing()},Yt.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Tu.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},Tu.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},Tu.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Tu.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Yt,Tu);var cn=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var e=arguments[0],t=arguments[1];this._precisionModel=e,this._bufParams=t};cn.prototype.getOffsetCurve=function(e,t){if(this._distance=t,t===0)return null;var n=t<0,i=Math.abs(t),s=this.getSegGen(i);e.length<=1?this.computePointCurve(e[0],s):this.computeOffsetCurve(e,n,s);var o=s.getCoordinates();return n&&St.reverse(o),o},cn.prototype.computeSingleSidedBufferCurve=function(e,t,n){var i=this.simplifyTolerance(this._distance);if(t){n.addSegments(e,!0);var s=ne.simplify(e,-i),o=s.length-1;n.initSideSegments(s[o],s[o-1],W.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(s[a],!0)}else{n.addSegments(e,!1);var l=ne.simplify(e,i),u=l.length-1;n.initSideSegments(l[0],l[1],W.LEFT),n.addFirstSegment();for(var c=2;c<=u;c++)n.addNextSegment(l[c],!0)}n.addLastSegment(),n.closeRing()},cn.prototype.computeRingBufferCurve=function(e,t,n){var i=this.simplifyTolerance(this._distance);t===W.RIGHT&&(i=-i);var s=ne.simplify(e,i),o=s.length-1;n.initSideSegments(s[o-1],s[0],t);for(var a=1;a<=o;a++){var l=a!==1;n.addNextSegment(s[a],l)}n.closeRing()},cn.prototype.computeLineBufferCurve=function(e,t){var n=this.simplifyTolerance(this._distance),i=ne.simplify(e,n),s=i.length-1;t.initSideSegments(i[0],i[1],W.LEFT);for(var o=2;o<=s;o++)t.addNextSegment(i[o],!0);t.addLastSegment(),t.addLineEndCap(i[s-1],i[s]);var a=ne.simplify(e,-n),l=a.length-1;t.initSideSegments(a[l],a[l-1],W.LEFT);for(var u=l-2;u>=0;u--)t.addNextSegment(a[u],!0);t.addLastSegment(),t.addLineEndCap(a[1],a[0]),t.closeRing()},cn.prototype.computePointCurve=function(e,t){switch(this._bufParams.getEndCapStyle()){case Rt.CAP_ROUND:t.createCircle(e);break;case Rt.CAP_SQUARE:t.createSquare(e);break}},cn.prototype.getLineCurve=function(e,t){if(this._distance=t,t<0&&!this._bufParams.isSingleSided()||t===0)return null;var n=Math.abs(t),i=this.getSegGen(n);if(e.length<=1)this.computePointCurve(e[0],i);else if(this._bufParams.isSingleSided()){var s=t<0;this.computeSingleSidedBufferCurve(e,s,i)}else this.computeLineBufferCurve(e,i);var o=i.getCoordinates();return o},cn.prototype.getBufferParameters=function(){return this._bufParams},cn.prototype.simplifyTolerance=function(e){return e*this._bufParams.getSimplifyFactor()},cn.prototype.getRingCurve=function(e,t,n){if(this._distance=n,e.length<=2)return this.getLineCurve(e,n);if(n===0)return cn.copyCoordinates(e);var i=this.getSegGen(n);return this.computeRingBufferCurve(e,t,i),i.getCoordinates()},cn.prototype.computeOffsetCurve=function(e,t,n){var i=this.simplifyTolerance(this._distance);if(t){var s=ne.simplify(e,-i),o=s.length-1;n.initSideSegments(s[o],s[o-1],W.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(s[a],!0)}else{var l=ne.simplify(e,i),u=l.length-1;n.initSideSegments(l[0],l[1],W.LEFT),n.addFirstSegment();for(var c=2;c<=u;c++)n.addNextSegment(l[c],!0)}n.addLastSegment()},cn.prototype.getSegGen=function(e){return new Yt(this._precisionModel,this._bufParams,e)},cn.prototype.interfaces_=function(){return[]},cn.prototype.getClass=function(){return cn},cn.copyCoordinates=function(e){for(var t=new Array(e.length).fill(null),n=0;n<t.length;n++)t[n]=new F(e[n]);return t};var ko=function(){this._subgraphs=null,this._seg=new ot,this._cga=new $;var e=arguments[0];this._subgraphs=e},bv={DepthSegment:{configurable:!0}};ko.prototype.findStabbedSegments=function(){var e=this;if(arguments.length===1){for(var t=arguments[0],n=new Y,i=this._subgraphs.iterator();i.hasNext();){var s=i.next(),o=s.getEnvelope();t.y<o.getMinY()||t.y>o.getMaxY()||e.findStabbedSegments(t,s.getDirectedEdges(),n)}return n}else if(arguments.length===3){if(pt(arguments[2],ar)&&arguments[0]instanceof F&&arguments[1]instanceof Xd)for(var a=arguments[0],l=arguments[1],u=arguments[2],c=l.getEdge().getCoordinates(),d=0;d<c.length-1;d++){e._seg.p0=c[d],e._seg.p1=c[d+1],e._seg.p0.y>e._seg.p1.y&&e._seg.reverse();var f=Math.max(e._seg.p0.x,e._seg.p1.x);if(!(f<a.x)&&!e._seg.isHorizontal()&&!(a.y<e._seg.p0.y||a.y>e._seg.p1.y)&&$.computeOrientation(e._seg.p0,e._seg.p1,a)!==$.RIGHT){var p=l.getDepth(W.LEFT);e._seg.p0.equals(c[d])||(p=l.getDepth(W.RIGHT));var _=new Ws(e._seg,p);u.add(_)}}else if(pt(arguments[2],ar)&&arguments[0]instanceof F&&pt(arguments[1],ar))for(var S=arguments[0],b=arguments[1],I=arguments[2],m=b.iterator();m.hasNext();){var w=m.next();w.isForward()&&e.findStabbedSegments(S,w,I)}}},ko.prototype.getDepth=function(e){var t=this.findStabbedSegments(e);if(t.size()===0)return 0;var n=hr.min(t);return n._leftDepth},ko.prototype.interfaces_=function(){return[]},ko.prototype.getClass=function(){return ko},bv.DepthSegment.get=function(){return Ws},Object.defineProperties(ko,bv);var Ws=function(){this._upwardSeg=null,this._leftDepth=null;var e=arguments[0],t=arguments[1];this._upwardSeg=new ot(e),this._leftDepth=t};Ws.prototype.compareTo=function(e){var t=e;if(this._upwardSeg.minX()>=t._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=t._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(t._upwardSeg);return n!==0||(n=-1*t._upwardSeg.orientationIndex(this._upwardSeg),n!==0)?n:this._upwardSeg.compareTo(t._upwardSeg)},Ws.prototype.compareX=function(e,t){var n=e.p0.compareTo(t.p0);return n!==0?n:e.p1.compareTo(t.p1)},Ws.prototype.toString=function(){return this._upwardSeg.toString()},Ws.prototype.interfaces_=function(){return[Wn]},Ws.prototype.getClass=function(){return Ws};var Lt=function(e,t,n){this.p0=e||null,this.p1=t||null,this.p2=n||null};Lt.prototype.area=function(){return Lt.area(this.p0,this.p1,this.p2)},Lt.prototype.signedArea=function(){return Lt.signedArea(this.p0,this.p1,this.p2)},Lt.prototype.interpolateZ=function(e){if(e===null)throw new $t("Supplied point is null.");return Lt.interpolateZ(e,this.p0,this.p1,this.p2)},Lt.prototype.longestSideLength=function(){return Lt.longestSideLength(this.p0,this.p1,this.p2)},Lt.prototype.isAcute=function(){return Lt.isAcute(this.p0,this.p1,this.p2)},Lt.prototype.circumcentre=function(){return Lt.circumcentre(this.p0,this.p1,this.p2)},Lt.prototype.area3D=function(){return Lt.area3D(this.p0,this.p1,this.p2)},Lt.prototype.centroid=function(){return Lt.centroid(this.p0,this.p1,this.p2)},Lt.prototype.inCentre=function(){return Lt.inCentre(this.p0,this.p1,this.p2)},Lt.prototype.interfaces_=function(){return[]},Lt.prototype.getClass=function(){return Lt},Lt.area=function(e,t,n){return Math.abs(((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2)},Lt.signedArea=function(e,t,n){return((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2},Lt.det=function(e,t,n,i){return e*i-t*n},Lt.interpolateZ=function(e,t,n,i){var s=t.x,o=t.y,a=n.x-s,l=i.x-s,u=n.y-o,c=i.y-o,d=a*c-l*u,f=e.x-s,p=e.y-o,_=(c*f-l*p)/d,S=(-u*f+a*p)/d,b=t.z+_*(n.z-t.z)+S*(i.z-t.z);return b},Lt.longestSideLength=function(e,t,n){var i=e.distance(t),s=t.distance(n),o=n.distance(e),a=i;return s>a&&(a=s),o>a&&(a=o),a},Lt.isAcute=function(e,t,n){return!(!xt.isAcute(e,t,n)||!xt.isAcute(t,n,e)||!xt.isAcute(n,e,t))},Lt.circumcentre=function(e,t,n){var i=n.x,s=n.y,o=e.x-i,a=e.y-s,l=t.x-i,u=t.y-s,c=2*Lt.det(o,a,l,u),d=Lt.det(a,o*o+a*a,u,l*l+u*u),f=Lt.det(o,o*o+a*a,l,l*l+u*u),p=i-d/c,_=s+f/c;return new F(p,_)},Lt.perpendicularBisector=function(e,t){var n=t.x-e.x,i=t.y-e.y,s=new sr(e.x+n/2,e.y+i/2,1),o=new sr(e.x-i+n/2,e.y+n+i/2,1);return new sr(s,o)},Lt.angleBisector=function(e,t,n){var i=t.distance(e),s=t.distance(n),o=i/(i+s),a=n.x-e.x,l=n.y-e.y,u=new F(e.x+o*a,e.y+o*l);return u},Lt.area3D=function(e,t,n){var i=t.x-e.x,s=t.y-e.y,o=t.z-e.z,a=n.x-e.x,l=n.y-e.y,u=n.z-e.z,c=s*u-o*l,d=o*a-i*u,f=i*l-s*a,p=c*c+d*d+f*f,_=Math.sqrt(p)/2;return _},Lt.centroid=function(e,t,n){var i=(e.x+t.x+n.x)/3,s=(e.y+t.y+n.y)/3;return new F(i,s)},Lt.inCentre=function(e,t,n){var i=t.distance(n),s=e.distance(n),o=e.distance(t),a=i+s+o,l=(i*e.x+s*t.x+o*n.x)/a,u=(i*e.y+s*t.y+o*n.y)/a;return new F(l,u)};var $n=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Y;var e=arguments[0],t=arguments[1],n=arguments[2];this._inputGeom=e,this._distance=t,this._curveBuilder=n};$n.prototype.addPoint=function(e){if(this._distance<=0)return null;var t=e.getCoordinates(),n=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(n,k.EXTERIOR,k.INTERIOR)},$n.prototype.addPolygon=function(e){var t=this,n=this._distance,i=W.LEFT;this._distance<0&&(n=-this._distance,i=W.RIGHT);var s=e.getExteriorRing(),o=St.removeRepeatedPoints(s.getCoordinates());if(this._distance<0&&this.isErodedCompletely(s,this._distance)||this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,n,i,k.EXTERIOR,k.INTERIOR);for(var a=0;a<e.getNumInteriorRing();a++){var l=e.getInteriorRingN(a),u=St.removeRepeatedPoints(l.getCoordinates());t._distance>0&&t.isErodedCompletely(l,-t._distance)||t.addPolygonRing(u,n,W.opposite(i),k.INTERIOR,k.EXTERIOR)}},$n.prototype.isTriangleErodedCompletely=function(e,t){var n=new Lt(e[0],e[1],e[2]),i=n.inCentre(),s=$.distancePointLine(i,n.p0,n.p1);return s<Math.abs(t)},$n.prototype.addLineString=function(e){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var t=St.removeRepeatedPoints(e.getCoordinates()),n=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(n,k.EXTERIOR,k.INTERIOR)},$n.prototype.addCurve=function(e,t,n){if(e===null||e.length<2)return null;var i=new ae(e,new Vt(0,k.BOUNDARY,t,n));this._curveList.add(i)},$n.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},$n.prototype.addPolygonRing=function(e,t,n,i,s){if(t===0&&e.length<ii.MINIMUM_VALID_SIZE)return null;var o=i,a=s;e.length>=ii.MINIMUM_VALID_SIZE&&$.isCCW(e)&&(o=s,a=i,n=W.opposite(n));var l=this._curveBuilder.getRingCurve(e,n,t);this.addCurve(l,o,a)},$n.prototype.add=function(e){if(e.isEmpty())return null;e instanceof ve?this.addPolygon(e):e instanceof ee?this.addLineString(e):e instanceof yn?this.addPoint(e):e instanceof Ga?this.addCollection(e):e instanceof Us?this.addCollection(e):e instanceof si?this.addCollection(e):e instanceof Ke&&this.addCollection(e)},$n.prototype.isErodedCompletely=function(e,t){var n=e.getCoordinates();if(n.length<4)return t<0;if(n.length===4)return this.isTriangleErodedCompletely(n,t);var i=e.getEnvelopeInternal(),s=Math.min(i.getHeight(),i.getWidth());return t<0&&2*Math.abs(t)>s},$n.prototype.addCollection=function(e){for(var t=this,n=0;n<e.getNumGeometries();n++){var i=e.getGeometryN(n);t.add(i)}},$n.prototype.interfaces_=function(){return[]},$n.prototype.getClass=function(){return $n};var Xa=function(){};Xa.prototype.locate=function(e){},Xa.prototype.interfaces_=function(){return[]},Xa.prototype.getClass=function(){return Xa};var li=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var e=arguments[0];this._parent=e,this._atStart=!0,this._index=0,this._max=e.getNumGeometries()};li.prototype.next=function(){if(this._atStart)return this._atStart=!1,li.isAtomic(this._parent)&&this._index++,this._parent;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new za;var e=this._parent.getGeometryN(this._index++);return e instanceof Ke?(this._subcollectionIterator=new li(e),this._subcollectionIterator.next()):e},li.prototype.remove=function(){throw new Error(this.getClass().getName())},li.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},li.prototype.interfaces_=function(){return[Ba]},li.prototype.getClass=function(){return li},li.isAtomic=function(e){return!(e instanceof Ke)};var An=function(){this._geom=null;var e=arguments[0];this._geom=e};An.prototype.locate=function(e){return An.locate(e,this._geom)},An.prototype.interfaces_=function(){return[Xa]},An.prototype.getClass=function(){return An},An.isPointInRing=function(e,t){return t.getEnvelopeInternal().intersects(e)?$.isPointInRing(e,t.getCoordinates()):!1},An.containsPointInPolygon=function(e,t){if(t.isEmpty())return!1;var n=t.getExteriorRing();if(!An.isPointInRing(e,n))return!1;for(var i=0;i<t.getNumInteriorRing();i++){var s=t.getInteriorRingN(i);if(An.isPointInRing(e,s))return!1}return!0},An.containsPoint=function(e,t){if(t instanceof ve)return An.containsPointInPolygon(e,t);if(t instanceof Ke)for(var n=new li(t);n.hasNext();){var i=n.next();if(i!==t&&An.containsPoint(e,i))return!0}return!1},An.locate=function(e,t){return t.isEmpty()?k.EXTERIOR:An.containsPoint(e,t)?k.INTERIOR:k.EXTERIOR};var Ye=function(){this._edgeMap=new qe,this._edgeList=null,this._ptInAreaLocation=[k.NONE,k.NONE]};Ye.prototype.getNextCW=function(e){this.getEdges();var t=this._edgeList.indexOf(e),n=t-1;return t===0&&(n=this._edgeList.size()-1),this._edgeList.get(n)},Ye.prototype.propagateSideLabels=function(e){for(var t=k.NONE,n=this.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();s.isArea(e)&&s.getLocation(e,W.LEFT)!==k.NONE&&(t=s.getLocation(e,W.LEFT))}if(t===k.NONE)return null;for(var o=t,a=this.iterator();a.hasNext();){var l=a.next(),u=l.getLabel();if(u.getLocation(e,W.ON)===k.NONE&&u.setLocation(e,W.ON,o),u.isArea(e)){var c=u.getLocation(e,W.LEFT),d=u.getLocation(e,W.RIGHT);if(d!==k.NONE){if(d!==o)throw new Vi("side location conflict",l.getCoordinate());c===k.NONE&&wt.shouldNeverReachHere("found single null side (at "+l.getCoordinate()+")"),o=c}else wt.isTrue(u.getLocation(e,W.LEFT)===k.NONE,"found single null side"),u.setLocation(e,W.RIGHT,o),u.setLocation(e,W.LEFT,o)}}},Ye.prototype.getCoordinate=function(){var e=this.iterator();if(!e.hasNext())return null;var t=e.next();return t.getCoordinate()},Ye.prototype.print=function(e){Ae.out.println("EdgeEndStar: "+this.getCoordinate());for(var t=this.iterator();t.hasNext();){var n=t.next();n.print(e)}},Ye.prototype.isAreaLabelsConsistent=function(e){return this.computeEdgeEndLabels(e.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Ye.prototype.checkAreaLabelsConsistent=function(e){var t=this.getEdges();if(t.size()<=0)return!0;var n=t.size()-1,i=t.get(n).getLabel(),s=i.getLocation(e,W.LEFT);wt.isTrue(s!==k.NONE,"Found unlabelled area edge");for(var o=s,a=this.iterator();a.hasNext();){var l=a.next(),u=l.getLabel();wt.isTrue(u.isArea(e),"Found non-area edge");var c=u.getLocation(e,W.LEFT),d=u.getLocation(e,W.RIGHT);if(c===d||d!==o)return!1;o=c}return!0},Ye.prototype.findIndex=function(e){var t=this;this.iterator();for(var n=0;n<this._edgeList.size();n++){var i=t._edgeList.get(n);if(i===e)return n}return-1},Ye.prototype.iterator=function(){return this.getEdges().iterator()},Ye.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new Y(this._edgeMap.values())),this._edgeList},Ye.prototype.getLocation=function(e,t,n){return this._ptInAreaLocation[e]===k.NONE&&(this._ptInAreaLocation[e]=An.locate(t,n[e].getGeometry())),this._ptInAreaLocation[e]},Ye.prototype.toString=function(){var e=new br;e.append("EdgeEndStar: "+this.getCoordinate()),e.append(`
43
- `);for(var t=this.iterator();t.hasNext();){var n=t.next();e.append(n),e.append(`
44
- `)}return e.toString()},Ye.prototype.computeEdgeEndLabels=function(e){for(var t=this.iterator();t.hasNext();){var n=t.next();n.computeLabel(e)}},Ye.prototype.computeLabelling=function(e){var t=this;this.computeEdgeEndLabels(e[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var n=[!1,!1],i=this.iterator();i.hasNext();)for(var s=i.next(),o=s.getLabel(),a=0;a<2;a++)o.isLine(a)&&o.getLocation(a)===k.BOUNDARY&&(n[a]=!0);for(var l=this.iterator();l.hasNext();)for(var u=l.next(),c=u.getLabel(),d=0;d<2;d++)if(c.isAnyNull(d)){var f=k.NONE;if(n[d])f=k.EXTERIOR;else{var p=u.getCoordinate();f=t.getLocation(d,p,e)}c.setAllLocationsIfNull(d,f)}},Ye.prototype.getDegree=function(){return this._edgeMap.size()},Ye.prototype.insertEdgeEnd=function(e,t){this._edgeMap.put(e,t),this._edgeList=null},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye};var LC=(function(r){function e(){r.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){var n=this;this.getResultAreaEdges();for(var i=null,s=null,o=this._SCANNING_FOR_INCOMING,a=0;a<this._resultAreaEdgeList.size();a++){var l=n._resultAreaEdgeList.get(a),u=l.getSym();if(l.getLabel().isArea())switch(i===null&&l.isInResult()&&(i=l),o){case n._SCANNING_FOR_INCOMING:if(!u.isInResult())continue;s=u,o=n._LINKING_TO_OUTGOING;break;case n._LINKING_TO_OUTGOING:if(!l.isInResult())continue;s.setNext(l),o=n._SCANNING_FOR_INCOMING;break}}if(o===this._LINKING_TO_OUTGOING){if(i===null)throw new Vi("no outgoing dirEdge found",this.getCoordinate());wt.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),s.setNext(i)}},e.prototype.insert=function(n){var i=n;this.insertEdgeEnd(i,i)},e.prototype.getRightmostEdge=function(){var n=this.getEdges(),i=n.size();if(i<1)return null;var s=n.get(0);if(i===1)return s;var o=n.get(i-1),a=s.getQuadrant(),l=o.getQuadrant();return Ut.isNorthern(a)&&Ut.isNorthern(l)?s:!Ut.isNorthern(a)&&!Ut.isNorthern(l)?o:s.getDy()!==0?s:o.getDy()!==0?o:(wt.shouldNeverReachHere("found two horizontal edges incident on node"),null)},e.prototype.print=function(n){Ae.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var s=i.next();n.print("out "),s.print(n),n.println(),n.print("in "),s.getSym().print(n),n.println()}},e.prototype.getResultAreaEdges=function(){var n=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new Y;for(var i=this.iterator();i.hasNext();){var s=i.next();(s.isInResult()||s.getSym().isInResult())&&n._resultAreaEdgeList.add(s)}return this._resultAreaEdgeList},e.prototype.updateLabelling=function(n){for(var i=this.iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.setAllLocationsIfNull(0,n.getLocation(0)),o.setAllLocationsIfNull(1,n.getLocation(1))}},e.prototype.linkAllDirectedEdges=function(){var n=this;this.getEdges();for(var i=null,s=null,o=this._edgeList.size()-1;o>=0;o--){var a=n._edgeList.get(o),l=a.getSym();s===null&&(s=l),i!==null&&l.setNext(i),i=a}s.setNext(i)},e.prototype.computeDepths=function(){var n=this;if(arguments.length===1){var i=arguments[0],s=this.findIndex(i),o=i.getDepth(W.LEFT),a=i.getDepth(W.RIGHT),l=this.computeDepths(s+1,this._edgeList.size(),o),u=this.computeDepths(0,s,l);if(u!==a)throw new Vi("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var c=arguments[0],d=arguments[1],f=arguments[2],p=f,_=c;_<d;_++){var S=n._edgeList.get(_);S.setEdgeDepths(W.RIGHT,p),p=S.getDepth(W.LEFT)}return p}},e.prototype.mergeSymLabels=function(){for(var n=this.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();s.merge(i.getSym().getLabel())}},e.prototype.linkMinimalDirectedEdges=function(n){for(var i=this,s=null,o=null,a=this._SCANNING_FOR_INCOMING,l=this._resultAreaEdgeList.size()-1;l>=0;l--){var u=i._resultAreaEdgeList.get(l),c=u.getSym();switch(s===null&&u.getEdgeRing()===n&&(s=u),a){case i._SCANNING_FOR_INCOMING:if(c.getEdgeRing()!==n)continue;o=c,a=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(u.getEdgeRing()!==n)continue;o.setNextMin(u),a=i._SCANNING_FOR_INCOMING;break}}a===this._LINKING_TO_OUTGOING&&(wt.isTrue(s!==null,"found null for first outgoing dirEdge"),wt.isTrue(s.getEdgeRing()===n,"unable to link last incoming dirEdge"),o.setNextMin(s))},e.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var n=0,i=this.iterator();i.hasNext();){var s=i.next();s.isInResult()&&n++}return n}else if(arguments.length===1){for(var o=arguments[0],a=0,l=this.iterator();l.hasNext();){var u=l.next();u.getEdgeRing()===o&&a++}return a}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var n=k.NONE,i=this.iterator();i.hasNext();){var s=i.next(),o=s.getSym();if(!s.isLineEdge()){if(s.isInResult()){n=k.INTERIOR;break}if(o.isInResult()){n=k.EXTERIOR;break}}}if(n===k.NONE)return null;for(var a=n,l=this.iterator();l.hasNext();){var u=l.next(),c=u.getSym();u.isLineEdge()?u.getEdge().setCovered(a===k.INTERIOR):(u.isInResult()&&(a=k.EXTERIOR),c.isInResult()&&(a=k.INTERIOR))}},e.prototype.computeLabelling=function(n){var i=this;r.prototype.computeLabelling.call(this,n),this._label=new Vt(k.NONE);for(var s=this.iterator();s.hasNext();)for(var o=s.next(),a=o.getEdge(),l=a.getLabel(),u=0;u<2;u++){var c=l.getLocation(u);(c===k.INTERIOR||c===k.BOUNDARY)&&i._label.setLocation(u,k.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(Ye),Pv=(function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.createNode=function(n){return new jc(n,new LC)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(Wa),gs=function r(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=r.orientation(e)};gs.prototype.compareTo=function(e){var t=e,n=gs.compareOriented(this._pts,this._orientation,t._pts,t._orientation);return n},gs.prototype.interfaces_=function(){return[Wn]},gs.prototype.getClass=function(){return gs},gs.orientation=function(e){return St.increasingDirection(e)===1},gs.compareOriented=function(e,t,n,i){for(var s=t?1:-1,o=i?1:-1,a=t?e.length:-1,l=i?n.length:-1,u=t?0:e.length-1,c=i?0:n.length-1;;){var d=e[u].compareTo(n[c]);if(d!==0)return d;u+=s,c+=o;var f=u===a,p=c===l;if(f&&!p)return-1;if(!f&&p)return 1;if(f&&p)return 0}};var dr=function(){this._edges=new Y,this._ocaMap=new qe};dr.prototype.print=function(e){var t=this;e.print("MULTILINESTRING ( ");for(var n=0;n<this._edges.size();n++){var i=t._edges.get(n);n>0&&e.print(","),e.print("(");for(var s=i.getCoordinates(),o=0;o<s.length;o++)o>0&&e.print(","),e.print(s[o].x+" "+s[o].y);e.println(")")}e.print(") ")},dr.prototype.addAll=function(e){for(var t=this,n=e.iterator();n.hasNext();)t.add(n.next())},dr.prototype.findEdgeIndex=function(e){for(var t=this,n=0;n<this._edges.size();n++)if(t._edges.get(n).equals(e))return n;return-1},dr.prototype.iterator=function(){return this._edges.iterator()},dr.prototype.getEdges=function(){return this._edges},dr.prototype.get=function(e){return this._edges.get(e)},dr.prototype.findEqualEdge=function(e){var t=new gs(e.getCoordinates()),n=this._ocaMap.get(t);return n},dr.prototype.add=function(e){this._edges.add(e);var t=new gs(e.getCoordinates());this._ocaMap.put(t,e)},dr.prototype.interfaces_=function(){return[]},dr.prototype.getClass=function(){return dr};var Hs=function(){};Hs.prototype.processIntersections=function(e,t,n,i){},Hs.prototype.isDone=function(){},Hs.prototype.interfaces_=function(){return[]},Hs.prototype.getClass=function(){return Hs};var kn=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var e=arguments[0];this._li=e};kn.prototype.isTrivialIntersection=function(e,t,n,i){if(e===n&&this._li.getIntersectionNum()===1){if(kn.isAdjacentSegments(t,i))return!0;if(e.isClosed()){var s=e.size()-1;if(t===0&&i===s||i===0&&t===s)return!0}}return!1},kn.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},kn.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},kn.prototype.getLineIntersector=function(){return this._li},kn.prototype.hasProperIntersection=function(){return this._hasProper},kn.prototype.processIntersections=function(e,t,n,i){if(e===n&&t===i)return null;this.numTests++;var s=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=n.getCoordinates()[i],l=n.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,l),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(e,t,n,i)||(this._hasIntersection=!0,e.addIntersections(this._li,t,0),n.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},kn.prototype.hasIntersection=function(){return this._hasIntersection},kn.prototype.isDone=function(){return!1},kn.prototype.hasInteriorIntersection=function(){return this._hasInterior},kn.prototype.interfaces_=function(){return[Hs]},kn.prototype.getClass=function(){return kn},kn.isAdjacentSegments=function(e,t){return Math.abs(e-t)===1};var Ar=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var e=arguments[0],t=arguments[1],n=arguments[2];this.coord=new F(e),this.segmentIndex=t,this.dist=n};Ar.prototype.getSegmentIndex=function(){return this.segmentIndex},Ar.prototype.getCoordinate=function(){return this.coord},Ar.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex),e.println(" dist = "+this.dist)},Ar.prototype.compareTo=function(e){var t=e;return this.compare(t.segmentIndex,t.dist)},Ar.prototype.isEndPoint=function(e){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===e},Ar.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},Ar.prototype.getDistance=function(){return this.dist},Ar.prototype.compare=function(e,t){return this.segmentIndex<e?-1:this.segmentIndex>e?1:this.dist<t?-1:this.dist>t?1:0},Ar.prototype.interfaces_=function(){return[Wn]},Ar.prototype.getClass=function(){return Ar};var ui=function(){this._nodeMap=new qe,this.edge=null;var e=arguments[0];this.edge=e};ui.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();){var n=t.next();n.print(e)}},ui.prototype.iterator=function(){return this._nodeMap.values().iterator()},ui.prototype.addSplitEdges=function(e){var t=this;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next(),o=t.createSplitEdge(i,s);e.add(o),i=s}},ui.prototype.addEndpoints=function(){var e=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[e],e,0)},ui.prototype.createSplitEdge=function(e,t){var n=this,i=t.segmentIndex-e.segmentIndex+2,s=this.edge.pts[t.segmentIndex],o=t.dist>0||!t.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),l=0;a[l++]=new F(e.coord);for(var u=e.segmentIndex+1;u<=t.segmentIndex;u++)a[l++]=n.edge.pts[u];return o&&(a[l]=t.coord),new zc(a,new Vt(this.edge._label))},ui.prototype.add=function(e,t,n){var i=new Ar(e,t,n),s=this._nodeMap.get(i);return s!==null?s:(this._nodeMap.put(i,i),i)},ui.prototype.isIntersection=function(e){for(var t=this.iterator();t.hasNext();){var n=t.next();if(n.coord.equals(e))return!0}return!1},ui.prototype.interfaces_=function(){return[]},ui.prototype.getClass=function(){return ui};var qs=function(){};qs.prototype.getChainStartIndices=function(e){var t=this,n=0,i=new Y;i.add(new Pr(n));do{var s=t.findChainEnd(e,n);i.add(new Pr(s)),n=s}while(n<e.length-1);var o=qs.toIntArray(i);return o},qs.prototype.findChainEnd=function(e,t){for(var n=Ut.quadrant(e[t],e[t+1]),i=t+1;i<e.length;){var s=Ut.quadrant(e[i-1],e[i]);if(s!==n)break;i++}return i-1},qs.prototype.interfaces_=function(){return[]},qs.prototype.getClass=function(){return qs},qs.toIntArray=function(e){for(var t=new Array(e.size()).fill(null),n=0;n<t.length;n++)t[n]=e.get(n).intValue();return t};var zi=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new rt,this.env2=new rt;var e=arguments[0];this.e=e,this.pts=e.getCoordinates();var t=new qs;this.startIndex=t.getChainStartIndices(this.pts)};zi.prototype.getCoordinates=function(){return this.pts},zi.prototype.getMaxX=function(e){var t=this.pts[this.startIndex[e]].x,n=this.pts[this.startIndex[e+1]].x;return t>n?t:n},zi.prototype.getMinX=function(e){var t=this.pts[this.startIndex[e]].x,n=this.pts[this.startIndex[e+1]].x;return t<n?t:n},zi.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[e],this.startIndex[e+1],t,t.startIndex[n],t.startIndex[n+1],i)}else if(arguments.length===6){var s=arguments[0],o=arguments[1],a=arguments[2],l=arguments[3],u=arguments[4],c=arguments[5],d=this.pts[s],f=this.pts[o],p=a.pts[l],_=a.pts[u];if(o-s===1&&u-l===1)return c.addIntersections(this.e,s,a.e,l),null;if(this.env1.init(d,f),this.env2.init(p,_),!this.env1.intersects(this.env2))return null;var S=Math.trunc((s+o)/2),b=Math.trunc((l+u)/2);s<S&&(l<b&&this.computeIntersectsForChain(s,S,a,l,b,c),b<u&&this.computeIntersectsForChain(s,S,a,b,u,c)),S<o&&(l<b&&this.computeIntersectsForChain(S,o,a,l,b,c),b<u&&this.computeIntersectsForChain(S,o,a,b,u,c))}},zi.prototype.getStartIndexes=function(){return this.startIndex},zi.prototype.computeIntersects=function(e,t){for(var n=this,i=0;i<this.startIndex.length-1;i++)for(var s=0;s<e.startIndex.length-1;s++)n.computeIntersectsForChain(i,e,s,t)},zi.prototype.interfaces_=function(){return[]},zi.prototype.getClass=function(){return zi};var ke=function r(){var e=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var t=0;t<2;t++)for(var n=0;n<3;n++)e._depth[t][n]=r.NULL_VALUE},Iv={NULL_VALUE:{configurable:!0}};ke.prototype.getDepth=function(e,t){return this._depth[e][t]},ke.prototype.setDepth=function(e,t,n){this._depth[e][t]=n},ke.prototype.isNull=function(){var e=this;if(arguments.length===0){for(var t=0;t<2;t++)for(var n=0;n<3;n++)if(e._depth[t][n]!==ke.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===ke.NULL_VALUE}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._depth[s][o]===ke.NULL_VALUE}},ke.prototype.normalize=function(){for(var e=this,t=0;t<2;t++)if(!e.isNull(t)){var n=e._depth[t][1];e._depth[t][2]<n&&(n=e._depth[t][2]),n<0&&(n=0);for(var i=1;i<3;i++){var s=0;e._depth[t][i]>n&&(s=1),e._depth[t][i]=s}}},ke.prototype.getDelta=function(e){return this._depth[e][W.RIGHT]-this._depth[e][W.LEFT]},ke.prototype.getLocation=function(e,t){return this._depth[e][t]<=0?k.EXTERIOR:k.INTERIOR},ke.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},ke.prototype.add=function(){var e=this;if(arguments.length===1)for(var t=arguments[0],n=0;n<2;n++)for(var i=1;i<3;i++){var s=t.getLocation(n,i);(s===k.EXTERIOR||s===k.INTERIOR)&&(e.isNull(n,i)?e._depth[n][i]=ke.depthAtLocation(s):e._depth[n][i]+=ke.depthAtLocation(s))}else if(arguments.length===3){var o=arguments[0],a=arguments[1],l=arguments[2];l===k.INTERIOR&&this._depth[o][a]++}},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke},ke.depthAtLocation=function(e){return e===k.EXTERIOR?0:e===k.INTERIOR?1:ke.NULL_VALUE},Iv.NULL_VALUE.get=function(){return-1},Object.defineProperties(ke,Iv);var zc=(function(r){function e(){if(r.call(this),this.pts=null,this._env=null,this.eiList=new ui(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ke,this._depthDelta=0,arguments.length===1){var t=arguments[0];e.call(this,t,null)}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.pts=n,this._label=i}}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var n=new Array(2).fill(null);n[0]=this.pts[0],n[1]=this.pts[1];var i=new e(n,Vt.toLineLabel(this._label));return i},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(n){this._isIsolated=n},e.prototype.setName=function(n){this._name=n},e.prototype.equals=function(n){var i=this;if(!(n instanceof e))return!1;var s=n;if(this.pts.length!==s.pts.length)return!1;for(var o=!0,a=!0,l=this.pts.length,u=0;u<this.pts.length;u++)if(i.pts[u].equals2D(s.pts[u])||(o=!1),i.pts[u].equals2D(s.pts[--l])||(a=!1),!o&&!a)return!1;return!0},e.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var n=arguments[0];return this.pts[n]}},e.prototype.print=function(n){var i=this;n.print("edge "+this._name+": "),n.print("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&n.print(","),n.print(i.pts[s].x+" "+i.pts[s].y);n.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(n){e.updateIM(this._label,n)},e.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(n){var i=this;n.print("edge "+this._name+": ");for(var s=this.pts.length-1;s>=0;s--)n.print(i.pts[s]+" ");n.println("")},e.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new zi(this)),this._mce},e.prototype.getEnvelope=function(){var n=this;if(this._env===null){this._env=new rt;for(var i=0;i<this.pts.length;i++)n._env.expandToInclude(n.pts[i])}return this._env},e.prototype.addIntersection=function(n,i,s,o){var a=new F(n.getIntersection(o)),l=i,u=n.getEdgeDistance(s,o),c=l+1;if(c<this.pts.length){var d=this.pts[c];a.equals2D(d)&&(l=c,u=0)}this.eiList.add(a,l,u)},e.prototype.toString=function(){var n=this,i=new br;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&i.append(","),i.append(n.pts[s].x+" "+n.pts[s].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},e.prototype.isPointwiseEqual=function(n){var i=this;if(this.pts.length!==n.pts.length)return!1;for(var s=0;s<this.pts.length;s++)if(!i.pts[s].equals2D(n.pts[s]))return!1;return!0},e.prototype.setDepthDelta=function(n){this._depthDelta=n},e.prototype.getEdgeIntersectionList=function(){return this.eiList},e.prototype.addIntersections=function(n,i,s){for(var o=this,a=0;a<n.getIntersectionNum();a++)o.addIntersection(n,i,s,a)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.updateIM=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];i.setAtLeastIfValid(n.getLocation(0,W.ON),n.getLocation(1,W.ON),1),n.isArea()&&(i.setAtLeastIfValid(n.getLocation(0,W.LEFT),n.getLocation(1,W.LEFT),2),i.setAtLeastIfValid(n.getLocation(0,W.RIGHT),n.getLocation(1,W.RIGHT),2))}else return r.prototype.updateIM.apply(this,arguments)},e})(Ln),tn=function(e){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new dr,this._bufParams=e||null};tn.prototype.setWorkingPrecisionModel=function(e){this._workingPrecisionModel=e},tn.prototype.insertUniqueEdge=function(e){var t=this._edgeList.findEqualEdge(e);if(t!==null){var n=t.getLabel(),i=e.getLabel();t.isPointwiseEqual(e)||(i=new Vt(e.getLabel()),i.flip()),n.merge(i);var s=tn.depthDelta(i),o=t.getDepthDelta(),a=o+s;t.setDepthDelta(a)}else this._edgeList.add(e),e.setDepthDelta(tn.depthDelta(e.getLabel()))},tn.prototype.buildSubgraphs=function(e,t){for(var n=new Y,i=e.iterator();i.hasNext();){var s=i.next(),o=s.getRightmostCoordinate(),a=new ko(n),l=a.getDepth(o);s.computeDepth(l),s.findResultEdges(),n.add(s),t.add(s.getDirectedEdges(),s.getNodes())}},tn.prototype.createSubgraphs=function(e){for(var t=new Y,n=e.getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isVisited()){var s=new Ze;s.create(i),t.add(s)}}return hr.sort(t,hr.reverseOrder()),t},tn.prototype.createEmptyResultGeometry=function(){var e=this._geomFact.createPolygon();return e},tn.prototype.getNoder=function(e){if(this._workingNoder!==null)return this._workingNoder;var t=new Yd,n=new js;return n.setPrecisionModel(e),t.setSegmentIntersector(new kn(n)),t},tn.prototype.buffer=function(e,t){var n=this._workingPrecisionModel;n===null&&(n=e.getPrecisionModel()),this._geomFact=e.getFactory();var i=new cn(n,this._bufParams),s=new $n(e,t,i),o=s.getCurves();if(o.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(o,n),this._graph=new Qt(new Pv),this._graph.addEdges(this._edgeList.getEdges());var a=this.createSubgraphs(this._graph),l=new _n(this._geomFact);this.buildSubgraphs(a,l);var u=l.getPolygons();if(u.size()<=0)return this.createEmptyResultGeometry();var c=this._geomFact.buildGeometry(u);return c},tn.prototype.computeNodedEdges=function(e,t){var n=this,i=this.getNoder(t);i.computeNodes(e);for(var s=i.getNodedSubstrings(),o=s.iterator();o.hasNext();){var a=o.next(),l=a.getCoordinates();if(!(l.length===2&&l[0].equals2D(l[1]))){var u=a.getData(),c=new zc(a.getCoordinates(),new Vt(u));n.insertUniqueEdge(c)}}},tn.prototype.setNoder=function(e){this._workingNoder=e},tn.prototype.interfaces_=function(){return[]},tn.prototype.getClass=function(){return tn},tn.depthDelta=function(e){var t=e.getLocation(0,W.LEFT),n=e.getLocation(0,W.RIGHT);return t===k.INTERIOR&&n===k.EXTERIOR?1:t===k.EXTERIOR&&n===k.INTERIOR?-1:0},tn.convertSegStrings=function(e){for(var t=new bt,n=new Y;e.hasNext();){var i=e.next(),s=t.createLineString(i.getCoordinates());n.add(s)}return t.buildGeometry(n)};var ms=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var e=arguments[0],t=arguments[1];this._noder=e,this._scaleFactor=t,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3];this._noder=n,this._scaleFactor=i,this._offsetX=s,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};ms.prototype.rescale=function(){var e=this;if(pt(arguments[0],me))for(var t=arguments[0],n=t.iterator();n.hasNext();){var i=n.next();e.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var s=arguments[0],o=0;o<s.length;o++)s[o].x=s[o].x/e._scaleFactor+e._offsetX,s[o].y=s[o].y/e._scaleFactor+e._offsetY;s.length===2&&s[0].equals2D(s[1])&&Ae.out.println(s)}},ms.prototype.scale=function(){var e=this;if(pt(arguments[0],me)){for(var t=arguments[0],n=new Y,i=t.iterator();i.hasNext();){var s=i.next();n.add(new ae(e.scale(s.getCoordinates()),s.getData()))}return n}else if(arguments[0]instanceof Array){for(var o=arguments[0],a=new Array(o.length).fill(null),l=0;l<o.length;l++)a[l]=new F(Math.round((o[l].x-e._offsetX)*e._scaleFactor),Math.round((o[l].y-e._offsetY)*e._scaleFactor),o[l].z);var u=St.removeRepeatedPoints(a);return u}},ms.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},ms.prototype.getNodedSubstrings=function(){var e=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(e),e},ms.prototype.computeNodes=function(e){var t=e;this._isScaled&&(t=this.scale(e)),this._noder.computeNodes(t)},ms.prototype.interfaces_=function(){return[Gs]},ms.prototype.getClass=function(){return ms};var kr=function(){this._li=new js,this._segStrings=null;var e=arguments[0];this._segStrings=e},xv={fact:{configurable:!0}};kr.prototype.checkEndPtVertexIntersections=function(){var e=this;if(arguments.length===0)for(var t=this._segStrings.iterator();t.hasNext();){var n=t.next(),i=n.getCoordinates();e.checkEndPtVertexIntersections(i[0],e._segStrings),e.checkEndPtVertexIntersections(i[i.length-1],e._segStrings)}else if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=o.iterator();a.hasNext();)for(var l=a.next(),u=l.getCoordinates(),c=1;c<u.length-1;c++)if(u[c].equals(s))throw new Mi("found endpt/interior pt intersection at index "+c+" :pt "+s)}},kr.prototype.checkInteriorIntersections=function(){var e=this;if(arguments.length===0)for(var t=this._segStrings.iterator();t.hasNext();)for(var n=t.next(),i=this._segStrings.iterator();i.hasNext();){var s=i.next();e.checkInteriorIntersections(n,s)}else if(arguments.length===2)for(var o=arguments[0],a=arguments[1],l=o.getCoordinates(),u=a.getCoordinates(),c=0;c<l.length-1;c++)for(var d=0;d<u.length-1;d++)e.checkInteriorIntersections(o,c,a,d);else if(arguments.length===4){var f=arguments[0],p=arguments[1],_=arguments[2],S=arguments[3];if(f===_&&p===S)return null;var b=f.getCoordinates()[p],I=f.getCoordinates()[p+1],m=_.getCoordinates()[S],w=_.getCoordinates()[S+1];if(this._li.computeIntersection(b,I,m,w),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,b,I)||this.hasInteriorIntersection(this._li,m,w)))throw new Mi("found non-noded intersection at "+b+"-"+I+" and "+m+"-"+w)}},kr.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},kr.prototype.checkCollapses=function(){var e=this;if(arguments.length===0)for(var t=this._segStrings.iterator();t.hasNext();){var n=t.next();e.checkCollapses(n)}else if(arguments.length===1)for(var i=arguments[0],s=i.getCoordinates(),o=0;o<s.length-2;o++)e.checkCollapse(s[o],s[o+1],s[o+2])},kr.prototype.hasInteriorIntersection=function(e,t,n){for(var i=0;i<e.getIntersectionNum();i++){var s=e.getIntersection(i);if(!(s.equals(t)||s.equals(n)))return!0}return!1},kr.prototype.checkCollapse=function(e,t,n){if(e.equals(n))throw new Mi("found non-noded collapse at "+kr.fact.createLineString([e,t,n]))},kr.prototype.interfaces_=function(){return[]},kr.prototype.getClass=function(){return kr},xv.fact.get=function(){return new bt},Object.defineProperties(kr,xv);var hn=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var e=arguments[0],t=arguments[1],n=arguments[2];if(this._originalPt=e,this._pt=e,this._scaleFactor=t,this._li=n,t<=0)throw new $t("Scale factor must be non-zero");t!==1&&(this._pt=new F(this.scale(e.x),this.scale(e.y)),this._p0Scaled=new F,this._p1Scaled=new F),this.initCorners(this._pt)},Tv={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};hn.prototype.intersectsScaled=function(e,t){var n=Math.min(e.x,t.x),i=Math.max(e.x,t.x),s=Math.min(e.y,t.y),o=Math.max(e.y,t.y),a=this._maxx<n||this._minx>i||this._maxy<s||this._miny>o;if(a)return!1;var l=this.intersectsToleranceSquare(e,t);return wt.isTrue(!(a&&l),"Found bad envelope test"),l},hn.prototype.initCorners=function(e){var t=.5;this._minx=e.x-t,this._maxx=e.x+t,this._miny=e.y-t,this._maxy=e.y+t,this._corner[0]=new F(this._maxx,this._maxy),this._corner[1]=new F(this._minx,this._maxy),this._corner[2]=new F(this._minx,this._miny),this._corner[3]=new F(this._maxx,this._miny)},hn.prototype.intersects=function(e,t){return this._scaleFactor===1?this.intersectsScaled(e,t):(this.copyScaled(e,this._p0Scaled),this.copyScaled(t,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},hn.prototype.scale=function(e){return Math.round(e*this._scaleFactor)},hn.prototype.getCoordinate=function(){return this._originalPt},hn.prototype.copyScaled=function(e,t){t.x=this.scale(e.x),t.y=this.scale(e.y)},hn.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var e=hn.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new rt(this._originalPt.x-e,this._originalPt.x+e,this._originalPt.y-e,this._originalPt.y+e)}return this._safeEnv},hn.prototype.intersectsPixelClosure=function(e,t){return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),this._li.hasIntersection()))},hn.prototype.intersectsToleranceSquare=function(e,t){var n=!1,i=!1;return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),this._li.isProper())||n&&i||e.equals(this._pt)||t.equals(this._pt))},hn.prototype.addSnappedNode=function(e,t){var n=e.getCoordinate(t),i=e.getCoordinate(t+1);return this.intersects(n,i)?(e.addIntersection(this.getCoordinate(),t),!0):!1},hn.prototype.interfaces_=function(){return[]},hn.prototype.getClass=function(){return hn},Tv.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(hn,Tv);var Ou=function(){this.tempEnv1=new rt,this.selectedSegment=new ot};Ou.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var e=arguments[0],t=arguments[1];e.getLineSegment(t,this.selectedSegment),this.select(this.selectedSegment)}}},Ou.prototype.interfaces_=function(){return[]},Ou.prototype.getClass=function(){return Ou};var Ya=function(){this._index=null;var e=arguments[0];this._index=e},Ov={HotPixelSnapAction:{configurable:!0}};Ya.prototype.snap=function(){if(arguments.length===1){var e=arguments[0];return this.snap(e,null,-1)}else if(arguments.length===3){var t=arguments[0],n=arguments[1],i=arguments[2],s=t.getSafeEnvelope(),o=new Dv(t,n,i);return this._index.query(s,{interfaces_:function(){return[fs]},visitItem:function(a){var l=a;l.select(s,o)}}),o.isNodeAdded()}},Ya.prototype.interfaces_=function(){return[]},Ya.prototype.getClass=function(){return Ya},Ov.HotPixelSnapAction.get=function(){return Dv},Object.defineProperties(Ya,Ov);var Dv=(function(r){function e(){r.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var t=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=t,this._parentEdge=n,this._hotPixelVertexIndex=i}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1],s=n.getContext();if(this._parentEdge!==null&&s===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(s,i)}else return r.prototype.select.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(Ou),Vo=function(){this._li=null,this._interiorIntersections=null;var e=arguments[0];this._li=e,this._interiorIntersections=new Y};Vo.prototype.processIntersections=function(e,t,n,i){var s=this;if(e===n&&t===i)return null;var o=e.getCoordinates()[t],a=e.getCoordinates()[t+1],l=n.getCoordinates()[i],u=n.getCoordinates()[i+1];if(this._li.computeIntersection(o,a,l,u),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var c=0;c<this._li.getIntersectionNum();c++)s._interiorIntersections.add(s._li.getIntersection(c));e.addIntersections(this._li,t,0),n.addIntersections(this._li,i,1)}},Vo.prototype.isDone=function(){return!1},Vo.prototype.getInteriorIntersections=function(){return this._interiorIntersections},Vo.prototype.interfaces_=function(){return[Hs]},Vo.prototype.getClass=function(){return Vo};var ci=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var e=arguments[0];this._pm=e,this._li=new js,this._li.setPrecisionModel(e),this._scaleFactor=e.getScale()};ci.prototype.checkCorrectness=function(e){var t=ae.getNodedSubstrings(e),n=new kr(t);try{n.checkValid()}catch(i){if(i instanceof uv)i.printStackTrace();else throw i}finally{}},ci.prototype.getNodedSubstrings=function(){return ae.getNodedSubstrings(this._nodedSegStrings)},ci.prototype.snapRound=function(e,t){var n=this.findInteriorIntersections(e,t);this.computeIntersectionSnaps(n),this.computeVertexSnaps(e)},ci.prototype.findInteriorIntersections=function(e,t){var n=new Vo(t);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(e),n.getInteriorIntersections()},ci.prototype.computeVertexSnaps=function(){var e=this;if(pt(arguments[0],me))for(var t=arguments[0],n=t.iterator();n.hasNext();){var i=n.next();e.computeVertexSnaps(i)}else if(arguments[0]instanceof ae)for(var s=arguments[0],o=s.getCoordinates(),a=0;a<o.length;a++){var l=new hn(o[a],e._scaleFactor,e._li),u=e._pointSnapper.snap(l,s,a);u&&s.addIntersection(o[a],a)}},ci.prototype.computeNodes=function(e){this._nodedSegStrings=e,this._noder=new Yd,this._pointSnapper=new Ya(this._noder.getIndex()),this.snapRound(e,this._li)},ci.prototype.computeIntersectionSnaps=function(e){for(var t=this,n=e.iterator();n.hasNext();){var i=n.next(),s=new hn(i,t._scaleFactor,t._li);t._pointSnapper.snap(s)}},ci.prototype.interfaces_=function(){return[Gs]},ci.prototype.getClass=function(){return ci};var Ve=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new Rt,this._resultGeometry=null,this._saveException=null,arguments.length===1){var e=arguments[0];this._argGeom=e}else if(arguments.length===2){var t=arguments[0],n=arguments[1];this._argGeom=t,this._bufParams=n}},Ja={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};Ve.prototype.bufferFixedPrecision=function(e){var t=new ms(new ci(new Mt(1)),e.getScale()),n=new tn(this._bufParams);n.setWorkingPrecisionModel(e),n.setNoder(t),this._resultGeometry=n.buffer(this._argGeom,this._distance)},Ve.prototype.bufferReducedPrecision=function(){var e=this;if(arguments.length===0){for(var t=Ve.MAX_PRECISION_DIGITS;t>=0;t--){try{e.bufferReducedPrecision(t)}catch(o){if(o instanceof Vi)e._saveException=o;else throw o}finally{}if(e._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var n=arguments[0],i=Ve.precisionScaleFactor(this._argGeom,this._distance,n),s=new Mt(i);this.bufferFixedPrecision(s)}},Ve.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var e=this._argGeom.getFactory().getPrecisionModel();e.getType()===Mt.FIXED?this.bufferFixedPrecision(e):this.bufferReducedPrecision()},Ve.prototype.setQuadrantSegments=function(e){this._bufParams.setQuadrantSegments(e)},Ve.prototype.bufferOriginalPrecision=function(){try{var e=new tn(this._bufParams);this._resultGeometry=e.buffer(this._argGeom,this._distance)}catch(t){if(t instanceof Mi)this._saveException=t;else throw t}finally{}},Ve.prototype.getResultGeometry=function(e){return this._distance=e,this.computeGeometry(),this._resultGeometry},Ve.prototype.setEndCapStyle=function(e){this._bufParams.setEndCapStyle(e)},Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve},Ve.bufferOp=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],n=new Ve(e),i=n.getResultGeometry(t);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ht&&typeof arguments[1]=="number"){var s=arguments[0],o=arguments[1],a=arguments[2],l=new Ve(s);l.setQuadrantSegments(a);var u=l.getResultGeometry(o);return u}else if(arguments[2]instanceof Rt&&arguments[0]instanceof ht&&typeof arguments[1]=="number"){var c=arguments[0],d=arguments[1],f=arguments[2],p=new Ve(c,f),_=p.getResultGeometry(d);return _}}else if(arguments.length===4){var S=arguments[0],b=arguments[1],I=arguments[2],m=arguments[3],w=new Ve(S);w.setQuadrantSegments(I),w.setEndCapStyle(m);var g=w.getResultGeometry(b);return g}},Ve.precisionScaleFactor=function(e,t,n){var i=e.getEnvelopeInternal(),s=Rn.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),o=t>0?t:0,a=s+2*o,l=Math.trunc(Math.log(a)/Math.log(10)+1),u=n-l,c=Math.pow(10,u);return c},Ja.CAP_ROUND.get=function(){return Rt.CAP_ROUND},Ja.CAP_BUTT.get=function(){return Rt.CAP_FLAT},Ja.CAP_FLAT.get=function(){return Rt.CAP_FLAT},Ja.CAP_SQUARE.get=function(){return Rt.CAP_SQUARE},Ja.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(Ve,Ja);var en=function(){this._pt=[new F,new F],this._distance=vt.NaN,this._isNull=!0};en.prototype.getCoordinates=function(){return this._pt},en.prototype.getCoordinate=function(e){return this._pt[e]},en.prototype.setMinimum=function(){if(arguments.length===1){var e=arguments[0];this.setMinimum(e._pt[0],e._pt[1])}else if(arguments.length===2){var t=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var i=t.distance(n);i<this._distance&&this.initialize(t,n,i)}},en.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var e=arguments[0],t=arguments[1];this._pt[0].setCoordinate(e),this._pt[1].setCoordinate(t),this._distance=e.distance(t),this._isNull=!1}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},en.prototype.getDistance=function(){return this._distance},en.prototype.setMaximum=function(){if(arguments.length===1){var e=arguments[0];this.setMaximum(e._pt[0],e._pt[1])}else if(arguments.length===2){var t=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var i=t.distance(n);i>this._distance&&this.initialize(t,n,i)}},en.prototype.interfaces_=function(){return[]},en.prototype.getClass=function(){return en};var hi=function(){};hi.prototype.interfaces_=function(){return[]},hi.prototype.getClass=function(){return hi},hi.computeDistance=function(){if(arguments[2]instanceof en&&arguments[0]instanceof ee&&arguments[1]instanceof F)for(var e=arguments[0],t=arguments[1],n=arguments[2],i=e.getCoordinates(),s=new ot,o=0;o<i.length-1;o++){s.setCoordinates(i[o],i[o+1]);var a=s.closestPoint(t);n.setMinimum(a,t)}else if(arguments[2]instanceof en&&arguments[0]instanceof ve&&arguments[1]instanceof F){var l=arguments[0],u=arguments[1],c=arguments[2];hi.computeDistance(l.getExteriorRing(),u,c);for(var d=0;d<l.getNumInteriorRing();d++)hi.computeDistance(l.getInteriorRingN(d),u,c)}else if(arguments[2]instanceof en&&arguments[0]instanceof ht&&arguments[1]instanceof F){var f=arguments[0],p=arguments[1],_=arguments[2];if(f instanceof ee)hi.computeDistance(f,p,_);else if(f instanceof ve)hi.computeDistance(f,p,_);else if(f instanceof Ke)for(var S=f,b=0;b<S.getNumGeometries();b++){var I=S.getGeometryN(b);hi.computeDistance(I,p,_)}else _.setMinimum(f.getCoordinate(),p)}else if(arguments[2]instanceof en&&arguments[0]instanceof ot&&arguments[1]instanceof F){var m=arguments[0],w=arguments[1],g=arguments[2],y=m.closestPoint(w);g.setMinimum(y,w)}};var Xs=function(e){this._maxPtDist=new en,this._inputGeom=e||null},Jd={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};Xs.prototype.computeMaxMidpointDistance=function(e){var t=new vs(this._inputGeom);e.apply(t),this._maxPtDist.setMaximum(t.getMaxPointDistance())},Xs.prototype.computeMaxVertexDistance=function(e){var t=new jo(this._inputGeom);e.apply(t),this._maxPtDist.setMaximum(t.getMaxPointDistance())},Xs.prototype.findDistance=function(e){return this.computeMaxVertexDistance(e),this.computeMaxMidpointDistance(e),this._maxPtDist.getDistance()},Xs.prototype.getDistancePoints=function(){return this._maxPtDist},Xs.prototype.interfaces_=function(){return[]},Xs.prototype.getClass=function(){return Xs},Jd.MaxPointDistanceFilter.get=function(){return jo},Jd.MaxMidpointDistanceFilter.get=function(){return vs},Object.defineProperties(Xs,Jd);var jo=function(e){this._maxPtDist=new en,this._minPtDist=new en,this._geom=e||null};jo.prototype.filter=function(e){this._minPtDist.initialize(),hi.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},jo.prototype.getMaxPointDistance=function(){return this._maxPtDist},jo.prototype.interfaces_=function(){return[ri]},jo.prototype.getClass=function(){return jo};var vs=function(e){this._maxPtDist=new en,this._minPtDist=new en,this._geom=e||null};vs.prototype.filter=function(e,t){if(t===0)return null;var n=e.getCoordinate(t-1),i=e.getCoordinate(t),s=new F((n.x+i.x)/2,(n.y+i.y)/2);this._minPtDist.initialize(),hi.computeDistance(this._geom,s,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},vs.prototype.isDone=function(){return!1},vs.prototype.isGeometryChanged=function(){return!1},vs.prototype.getMaxPointDistance=function(){return this._maxPtDist},vs.prototype.interfaces_=function(){return[ur]},vs.prototype.getClass=function(){return vs};var Ui=function(e){this._comps=e||null};Ui.prototype.filter=function(e){e instanceof ve&&this._comps.add(e)},Ui.prototype.interfaces_=function(){return[Or]},Ui.prototype.getClass=function(){return Ui},Ui.getPolygons=function(){if(arguments.length===1){var e=arguments[0];return Ui.getPolygons(e,new Y)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];return t instanceof ve?n.add(t):t instanceof Ke&&t.apply(new Ui(n)),n}};var je=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var e=arguments[0];this._lines=e}else if(arguments.length===2){var t=arguments[0],n=arguments[1];this._lines=t,this._isForcedToLineString=n}};je.prototype.filter=function(e){if(this._isForcedToLineString&&e instanceof ii){var t=e.getFactory().createLineString(e.getCoordinateSequence());return this._lines.add(t),null}e instanceof ee&&this._lines.add(e)},je.prototype.setForceToLineString=function(e){this._isForcedToLineString=e},je.prototype.interfaces_=function(){return[Ri]},je.prototype.getClass=function(){return je},je.getGeometry=function(){if(arguments.length===1){var e=arguments[0];return e.getFactory().buildGeometry(je.getLines(e))}else if(arguments.length===2){var t=arguments[0],n=arguments[1];return t.getFactory().buildGeometry(je.getLines(t,n))}},je.getLines=function(){if(arguments.length===1){var e=arguments[0];return je.getLines(e,!1)}else if(arguments.length===2){if(pt(arguments[0],me)&&pt(arguments[1],me)){for(var t=arguments[0],n=arguments[1],i=t.iterator();i.hasNext();){var s=i.next();je.getLines(s,n)}return n}else if(arguments[0]instanceof ht&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1],l=new Y;return o.apply(new je(l,a)),l}else if(arguments[0]instanceof ht&&pt(arguments[1],me)){var u=arguments[0],c=arguments[1];return u instanceof ee?c.add(u):u.apply(new je(c)),c}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&pt(arguments[0],me)&&pt(arguments[1],me)){for(var d=arguments[0],f=arguments[1],p=arguments[2],_=d.iterator();_.hasNext();){var S=_.next();je.getLines(S,f,p)}return f}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof ht&&pt(arguments[1],me)){var b=arguments[0],I=arguments[1],m=arguments[2];return b.apply(new je(I,m)),I}}};var fr=function(){if(this._boundaryRule=qn.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e===null)throw new $t("Rule must be non-null");this._boundaryRule=e}}};fr.prototype.locateInternal=function(){var e=this;if(arguments[0]instanceof F&&arguments[1]instanceof ve){var t=arguments[0],n=arguments[1];if(n.isEmpty())return k.EXTERIOR;var i=n.getExteriorRing(),s=this.locateInPolygonRing(t,i);if(s===k.EXTERIOR)return k.EXTERIOR;if(s===k.BOUNDARY)return k.BOUNDARY;for(var o=0;o<n.getNumInteriorRing();o++){var a=n.getInteriorRingN(o),l=e.locateInPolygonRing(t,a);if(l===k.INTERIOR)return k.EXTERIOR;if(l===k.BOUNDARY)return k.BOUNDARY}return k.INTERIOR}else if(arguments[0]instanceof F&&arguments[1]instanceof ee){var u=arguments[0],c=arguments[1];if(!c.getEnvelopeInternal().intersects(u))return k.EXTERIOR;var d=c.getCoordinates();return!c.isClosed()&&(u.equals(d[0])||u.equals(d[d.length-1]))?k.BOUNDARY:$.isOnLine(u,d)?k.INTERIOR:k.EXTERIOR}else if(arguments[0]instanceof F&&arguments[1]instanceof yn){var f=arguments[0],p=arguments[1],_=p.getCoordinate();return _.equals2D(f)?k.INTERIOR:k.EXTERIOR}},fr.prototype.locateInPolygonRing=function(e,t){return t.getEnvelopeInternal().intersects(e)?$.locatePointInRing(e,t.getCoordinates()):k.EXTERIOR},fr.prototype.intersects=function(e,t){return this.locate(e,t)!==k.EXTERIOR},fr.prototype.updateLocationInfo=function(e){e===k.INTERIOR&&(this._isIn=!0),e===k.BOUNDARY&&this._numBoundaries++},fr.prototype.computeLocation=function(e,t){var n=this;if(t instanceof yn&&this.updateLocationInfo(this.locateInternal(e,t)),t instanceof ee)this.updateLocationInfo(this.locateInternal(e,t));else if(t instanceof ve)this.updateLocationInfo(this.locateInternal(e,t));else if(t instanceof Us)for(var i=t,s=0;s<i.getNumGeometries();s++){var o=i.getGeometryN(s);n.updateLocationInfo(n.locateInternal(e,o))}else if(t instanceof si)for(var a=t,l=0;l<a.getNumGeometries();l++){var u=a.getGeometryN(l);n.updateLocationInfo(n.locateInternal(e,u))}else if(t instanceof Ke)for(var c=new li(t);c.hasNext();){var d=c.next();d!==t&&n.computeLocation(e,d)}},fr.prototype.locate=function(e,t){return t.isEmpty()?k.EXTERIOR:t instanceof ee?this.locateInternal(e,t):t instanceof ve?this.locateInternal(e,t):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(e,t),this._boundaryRule.isInBoundary(this._numBoundaries)?k.BOUNDARY:this._numBoundaries>0||this._isIn?k.INTERIOR:k.EXTERIOR)},fr.prototype.interfaces_=function(){return[]},fr.prototype.getClass=function(){return fr};var nn=function r(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var e=arguments[0],t=arguments[1];r.call(this,e,r.INSIDE_AREA,t)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._component=n,this._segIndex=i,this._pt=s}},Nv={INSIDE_AREA:{configurable:!0}};nn.prototype.isInsideArea=function(){return this._segIndex===nn.INSIDE_AREA},nn.prototype.getCoordinate=function(){return this._pt},nn.prototype.getGeometryComponent=function(){return this._component},nn.prototype.getSegmentIndex=function(){return this._segIndex},nn.prototype.interfaces_=function(){return[]},nn.prototype.getClass=function(){return nn},Nv.INSIDE_AREA.get=function(){return-1},Object.defineProperties(nn,Nv);var ys=function(e){this._pts=e||null};ys.prototype.filter=function(e){e instanceof yn&&this._pts.add(e)},ys.prototype.interfaces_=function(){return[Or]},ys.prototype.getClass=function(){return ys},ys.getPoints=function(){if(arguments.length===1){var e=arguments[0];return e instanceof yn?hr.singletonList(e):ys.getPoints(e,new Y)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];return t instanceof yn?n.add(t):t instanceof Ke&&t.apply(new ys(n)),n}};var Bo=function(){this._locations=null;var e=arguments[0];this._locations=e};Bo.prototype.filter=function(e){(e instanceof yn||e instanceof ee||e instanceof ve)&&this._locations.add(new nn(e,0,e.getCoordinate()))},Bo.prototype.interfaces_=function(){return[Or]},Bo.prototype.getClass=function(){return Bo},Bo.getLocations=function(e){var t=new Y;return e.apply(new Bo(t)),t};var Be=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new fr,this._minDistanceLocation=null,this._minDistance=vt.MAX_VALUE,arguments.length===2){var e=arguments[0],t=arguments[1];this._geom=[e,t],this._terminateDistance=0}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=s}};Be.prototype.computeContainmentDistance=function(){var e=this;if(arguments.length===0){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=1-n,o=Ui.getPolygons(this._geom[n]);if(o.size()>0){var a=Bo.getLocations(this._geom[s]);if(this.computeContainmentDistance(a,o,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[s]=i[0],this._minDistanceLocation[n]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&pt(arguments[0],ar)&&pt(arguments[1],ar)){for(var l=arguments[0],u=arguments[1],c=arguments[2],d=0;d<l.size();d++)for(var f=l.get(d),p=0;p<u.size();p++)if(e.computeContainmentDistance(f,u.get(p),c),e._minDistance<=e._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof nn&&arguments[1]instanceof ve){var _=arguments[0],S=arguments[1],b=arguments[2],I=_.getCoordinate();if(k.EXTERIOR!==this._ptLocator.locate(I,S))return this._minDistance=0,b[0]=_,b[1]=new nn(S,I),null}}},Be.prototype.computeMinDistanceLinesPoints=function(e,t,n){for(var i=this,s=0;s<e.size();s++)for(var o=e.get(s),a=0;a<t.size();a++){var l=t.get(a);if(i.computeMinDistance(o,l,n),i._minDistance<=i._terminateDistance)return null}},Be.prototype.computeFacetDistance=function(){var e=new Array(2).fill(null),t=je.getLines(this._geom[0]),n=je.getLines(this._geom[1]),i=ys.getPoints(this._geom[0]),s=ys.getPoints(this._geom[1]);if(this.computeMinDistanceLines(t,n,e),this.updateMinDistance(e,!1),this._minDistance<=this._terminateDistance||(e[0]=null,e[1]=null,this.computeMinDistanceLinesPoints(t,s,e),this.updateMinDistance(e,!1),this._minDistance<=this._terminateDistance)||(e[0]=null,e[1]=null,this.computeMinDistanceLinesPoints(n,i,e),this.updateMinDistance(e,!0),this._minDistance<=this._terminateDistance))return null;e[0]=null,e[1]=null,this.computeMinDistancePoints(i,s,e),this.updateMinDistance(e,!1)},Be.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Be.prototype.updateMinDistance=function(e,t){if(e[0]===null)return null;t?(this._minDistanceLocation[0]=e[1],this._minDistanceLocation[1]=e[0]):(this._minDistanceLocation[0]=e[0],this._minDistanceLocation[1]=e[1])},Be.prototype.nearestPoints=function(){this.computeMinDistance();var e=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return e},Be.prototype.computeMinDistance=function(){var e=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof ee&&arguments[1]instanceof yn){var t=arguments[0],n=arguments[1],i=arguments[2];if(t.getEnvelopeInternal().distance(n.getEnvelopeInternal())>this._minDistance)return null;for(var s=t.getCoordinates(),o=n.getCoordinate(),a=0;a<s.length-1;a++){var l=$.distancePointLine(o,s[a],s[a+1]);if(l<e._minDistance){e._minDistance=l;var u=new ot(s[a],s[a+1]),c=u.closestPoint(o);i[0]=new nn(t,a,c),i[1]=new nn(n,0,o)}if(e._minDistance<=e._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof ee&&arguments[1]instanceof ee){var d=arguments[0],f=arguments[1],p=arguments[2];if(d.getEnvelopeInternal().distance(f.getEnvelopeInternal())>this._minDistance)return null;for(var _=d.getCoordinates(),S=f.getCoordinates(),b=0;b<_.length-1;b++)for(var I=0;I<S.length-1;I++){var m=$.distanceLineLine(_[b],_[b+1],S[I],S[I+1]);if(m<e._minDistance){e._minDistance=m;var w=new ot(_[b],_[b+1]),g=new ot(S[I],S[I+1]),y=w.closestPoints(g);p[0]=new nn(d,b,y[0]),p[1]=new nn(f,I,y[1])}if(e._minDistance<=e._terminateDistance)return null}}}},Be.prototype.computeMinDistancePoints=function(e,t,n){for(var i=this,s=0;s<e.size();s++)for(var o=e.get(s),a=0;a<t.size();a++){var l=t.get(a),u=o.getCoordinate().distance(l.getCoordinate());if(u<i._minDistance&&(i._minDistance=u,n[0]=new nn(o,0,o.getCoordinate()),n[1]=new nn(l,0,l.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},Be.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new $t("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Be.prototype.computeMinDistanceLines=function(e,t,n){for(var i=this,s=0;s<e.size();s++)for(var o=e.get(s),a=0;a<t.size();a++){var l=t.get(a);if(i.computeMinDistance(o,l,n),i._minDistance<=i._terminateDistance)return null}},Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be},Be.distance=function(e,t){var n=new Be(e,t);return n.distance()},Be.isWithinDistance=function(e,t,n){var i=new Be(e,t,n);return i.distance()<=n},Be.nearestPoints=function(e,t){var n=new Be(e,t);return n.nearestPoints()};var Je=function(){this._pt=[new F,new F],this._distance=vt.NaN,this._isNull=!0};Je.prototype.getCoordinates=function(){return this._pt},Je.prototype.getCoordinate=function(e){return this._pt[e]},Je.prototype.setMinimum=function(){if(arguments.length===1){var e=arguments[0];this.setMinimum(e._pt[0],e._pt[1])}else if(arguments.length===2){var t=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var i=t.distance(n);i<this._distance&&this.initialize(t,n,i)}},Je.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var e=arguments[0],t=arguments[1];this._pt[0].setCoordinate(e),this._pt[1].setCoordinate(t),this._distance=e.distance(t),this._isNull=!1}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},Je.prototype.toString=function(){return or.toLineString(this._pt[0],this._pt[1])},Je.prototype.getDistance=function(){return this._distance},Je.prototype.setMaximum=function(){if(arguments.length===1){var e=arguments[0];this.setMaximum(e._pt[0],e._pt[1])}else if(arguments.length===2){var t=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var i=t.distance(n);i>this._distance&&this.initialize(t,n,i)}},Je.prototype.interfaces_=function(){return[]},Je.prototype.getClass=function(){return Je};var Vr=function(){};Vr.prototype.interfaces_=function(){return[]},Vr.prototype.getClass=function(){return Vr},Vr.computeDistance=function(){if(arguments[2]instanceof Je&&arguments[0]instanceof ee&&arguments[1]instanceof F)for(var e=arguments[0],t=arguments[1],n=arguments[2],i=new ot,s=e.getCoordinates(),o=0;o<s.length-1;o++){i.setCoordinates(s[o],s[o+1]);var a=i.closestPoint(t);n.setMinimum(a,t)}else if(arguments[2]instanceof Je&&arguments[0]instanceof ve&&arguments[1]instanceof F){var l=arguments[0],u=arguments[1],c=arguments[2];Vr.computeDistance(l.getExteriorRing(),u,c);for(var d=0;d<l.getNumInteriorRing();d++)Vr.computeDistance(l.getInteriorRingN(d),u,c)}else if(arguments[2]instanceof Je&&arguments[0]instanceof ht&&arguments[1]instanceof F){var f=arguments[0],p=arguments[1],_=arguments[2];if(f instanceof ee)Vr.computeDistance(f,p,_);else if(f instanceof ve)Vr.computeDistance(f,p,_);else if(f instanceof Ke)for(var S=f,b=0;b<S.getNumGeometries();b++){var I=S.getGeometryN(b);Vr.computeDistance(I,p,_)}else _.setMinimum(f.getCoordinate(),p)}else if(arguments[2]instanceof Je&&arguments[0]instanceof ot&&arguments[1]instanceof F){var m=arguments[0],w=arguments[1],g=arguments[2],y=m.closestPoint(w);g.setMinimum(y,w)}};var Kn=function(){this._g0=null,this._g1=null,this._ptDist=new Je,this._densifyFrac=0;var e=arguments[0],t=arguments[1];this._g0=e,this._g1=t},$d={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Kn.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Kn.prototype.setDensifyFraction=function(e){if(e>1||e<=0)throw new $t("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=e},Kn.prototype.compute=function(e,t){this.computeOrientedDistance(e,t,this._ptDist),this.computeOrientedDistance(t,e,this._ptDist)},Kn.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Kn.prototype.computeOrientedDistance=function(e,t,n){var i=new zo(t);if(e.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var s=new _s(t,this._densifyFrac);e.apply(s),n.setMaximum(s.getMaxPointDistance())}},Kn.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Kn.prototype.interfaces_=function(){return[]},Kn.prototype.getClass=function(){return Kn},Kn.distance=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],n=new Kn(e,t);return n.distance()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new Kn(i,s);return a.setDensifyFraction(o),a.distance()}},$d.MaxPointDistanceFilter.get=function(){return zo},$d.MaxDensifiedByFractionDistanceFilter.get=function(){return _s},Object.defineProperties(Kn,$d);var zo=function(){this._maxPtDist=new Je,this._minPtDist=new Je,this._euclideanDist=new Vr,this._geom=null;var e=arguments[0];this._geom=e};zo.prototype.filter=function(e){this._minPtDist.initialize(),Vr.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},zo.prototype.getMaxPointDistance=function(){return this._maxPtDist},zo.prototype.interfaces_=function(){return[ri]},zo.prototype.getClass=function(){return zo};var _s=function(){this._maxPtDist=new Je,this._minPtDist=new Je,this._geom=null,this._numSubSegs=0;var e=arguments[0],t=arguments[1];this._geom=e,this._numSubSegs=Math.trunc(Math.round(1/t))};_s.prototype.filter=function(e,t){var n=this;if(t===0)return null;for(var i=e.getCoordinate(t-1),s=e.getCoordinate(t),o=(s.x-i.x)/this._numSubSegs,a=(s.y-i.y)/this._numSubSegs,l=0;l<this._numSubSegs;l++){var u=i.x+l*o,c=i.y+l*a,d=new F(u,c);n._minPtDist.initialize(),Vr.computeDistance(n._geom,d,n._minPtDist),n._maxPtDist.setMaximum(n._minPtDist)}},_s.prototype.isDone=function(){return!1},_s.prototype.isGeometryChanged=function(){return!1},_s.prototype.getMaxPointDistance=function(){return this._maxPtDist},_s.prototype.interfaces_=function(){return[ur]},_s.prototype.getClass=function(){return _s};var En=function(e,t,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=e||null,this._bufDistance=t||null,this._result=n||null},Kd={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};En.prototype.checkMaximumDistance=function(e,t,n){var i=new Kn(t,e);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var s=i.getCoordinates();this._errorLocation=s[1],this._errorIndicator=e.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+or.toLineString(s[0],s[1])+")"}},En.prototype.isValid=function(){var e=Math.abs(this._bufDistance),t=En.MAX_DISTANCE_DIFF_FRAC*e;return this._minValidDistance=e-t,this._maxValidDistance=e+t,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),En.VERBOSE&&Ae.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},En.prototype.checkNegativeValid=function(){if(!(this._input instanceof ve||this._input instanceof si||this._input instanceof Ke))return null;var e=this.getPolygonLines(this._input);if(this.checkMinimumDistance(e,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(e,this._result,this._maxValidDistance)},En.prototype.getErrorIndicator=function(){return this._errorIndicator},En.prototype.checkMinimumDistance=function(e,t,n){var i=new Be(e,t,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound<n){this._isValid=!1;var s=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=e.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+or.toLineString(s[0],s[1])+" )"}},En.prototype.checkPositiveValid=function(){var e=this._result.getBoundary();if(this.checkMinimumDistance(this._input,e,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,e,this._maxValidDistance)},En.prototype.getErrorLocation=function(){return this._errorLocation},En.prototype.getPolygonLines=function(e){for(var t=new Y,n=new je(t),i=Ui.getPolygons(e),s=i.iterator();s.hasNext();){var o=s.next();o.apply(n)}return e.getFactory().buildGeometry(t)},En.prototype.getErrorMessage=function(){return this._errMsg},En.prototype.interfaces_=function(){return[]},En.prototype.getClass=function(){return En},Kd.VERBOSE.get=function(){return!1},Kd.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(En,Kd);var ze=function(e,t,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=e||null,this._distance=t||null,this._result=n||null},Zd={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};ze.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},ze.prototype.checkEnvelope=function(){if(this._distance<0)return null;var e=this._distance*ze.MAX_ENV_DIFF_FRAC;e===0&&(e=.001);var t=new rt(this._input.getEnvelopeInternal());t.expandBy(this._distance);var n=new rt(this._result.getEnvelopeInternal());n.expandBy(e),n.contains(t)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")},ze.prototype.checkDistance=function(){var e=new En(this._input,this._distance,this._result);e.isValid()||(this._isValid=!1,this._errorMsg=e.getErrorMessage(),this._errorLocation=e.getErrorLocation(),this._errorIndicator=e.getErrorIndicator()),this.report("Distance")},ze.prototype.checkArea=function(){var e=this._input.getArea(),t=this._result.getArea();this._distance>0&&e>t&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&e<t&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},ze.prototype.checkPolygonal=function(){this._result instanceof ve||this._result instanceof si||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},ze.prototype.getErrorIndicator=function(){return this._errorIndicator},ze.prototype.getErrorLocation=function(){return this._errorLocation},ze.prototype.checkExpectedEmpty=function(){if(this._input.getDimension()>=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")},ze.prototype.report=function(e){if(!ze.VERBOSE)return null;Ae.out.println("Check "+e+": "+(this._isValid?"passed":"FAILED"))},ze.prototype.getErrorMessage=function(){return this._errorMsg},ze.prototype.interfaces_=function(){return[]},ze.prototype.getClass=function(){return ze},ze.isValidMsg=function(e,t,n){var i=new ze(e,t,n);return i.isValid()?null:i.getErrorMessage()},ze.isValid=function(e,t,n){var i=new ze(e,t,n);return!!i.isValid()},Zd.VERBOSE.get=function(){return!1},Zd.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(ze,Zd);var jr=function(){this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};jr.prototype.getCoordinates=function(){return this._pts},jr.prototype.size=function(){return this._pts.length},jr.prototype.getCoordinate=function(e){return this._pts[e]},jr.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},jr.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:Fo.octant(this.getCoordinate(e),this.getCoordinate(e+1))},jr.prototype.setData=function(e){this._data=e},jr.prototype.getData=function(){return this._data},jr.prototype.toString=function(){return or.toLineString(new oe(this._pts))},jr.prototype.interfaces_=function(){return[ai]},jr.prototype.getClass=function(){return jr};var Oe=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Y,this._intersectionCount=0,this._keepIntersections=!0;var e=arguments[0];this._li=e,this._interiorIntersection=null};Oe.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Oe.prototype.setCheckEndSegmentsOnly=function(e){this._isCheckEndSegmentsOnly=e},Oe.prototype.getIntersectionSegments=function(){return this._intSegments},Oe.prototype.count=function(){return this._intersectionCount},Oe.prototype.getIntersections=function(){return this._intersections},Oe.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},Oe.prototype.setKeepIntersections=function(e){this._keepIntersections=e},Oe.prototype.processIntersections=function(e,t,n,i){if(!this._findAllIntersections&&this.hasIntersection()||e===n&&t===i)return null;if(this._isCheckEndSegmentsOnly){var s=this.isEndSegment(e,t)||this.isEndSegment(n,i);if(!s)return null}var o=e.getCoordinates()[t],a=e.getCoordinates()[t+1],l=n.getCoordinates()[i],u=n.getCoordinates()[i+1];this._li.computeIntersection(o,a,l,u),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=a,this._intSegments[2]=l,this._intSegments[3]=u,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Oe.prototype.isEndSegment=function(e,t){return t===0||t>=e.size()-2},Oe.prototype.hasIntersection=function(){return this._interiorIntersection!==null},Oe.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},Oe.prototype.interfaces_=function(){return[Hs]},Oe.prototype.getClass=function(){return Oe},Oe.createAllIntersectionsFinder=function(e){var t=new Oe(e);return t.setFindAllIntersections(!0),t},Oe.createAnyIntersectionFinder=function(e){return new Oe(e)},Oe.createIntersectionCounter=function(e){var t=new Oe(e);return t.setFindAllIntersections(!0),t.setKeepIntersections(!1),t};var pr=function(){this._li=new js,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var e=arguments[0];this._segStrings=e};pr.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},pr.prototype.getIntersections=function(){return this._segInt.getIntersections()},pr.prototype.isValid=function(){return this.execute(),this._isValid},pr.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},pr.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Oe(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var e=new Yd;if(e.setSegmentIntersector(this._segInt),e.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},pr.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Vi(this.getErrorMessage(),this._segInt.getInteriorIntersection())},pr.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var e=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+or.toLineString(e[0],e[1])+" and "+or.toLineString(e[2],e[3])},pr.prototype.interfaces_=function(){return[]},pr.prototype.getClass=function(){return pr},pr.computeIntersections=function(e){var t=new pr(e);return t.setFindAllIntersections(!0),t.isValid(),t.getIntersections()};var Ys=function r(){this._nv=null;var e=arguments[0];this._nv=new pr(r.toSegmentStrings(e))};Ys.prototype.checkValid=function(){this._nv.checkValid()},Ys.prototype.interfaces_=function(){return[]},Ys.prototype.getClass=function(){return Ys},Ys.toSegmentStrings=function(e){for(var t=new Y,n=e.iterator();n.hasNext();){var i=n.next();t.add(new jr(i.getCoordinates(),i))}return t},Ys.checkValid=function(e){var t=new Ys(e);t.checkValid()};var Uo=function(e){this._mapOp=e};Uo.prototype.map=function(e){for(var t=this,n=new Y,i=0;i<e.getNumGeometries();i++){var s=t._mapOp.map(e.getGeometryN(i));s.isEmpty()||n.add(s)}return e.getFactory().createGeometryCollection(bt.toGeometryArray(n))},Uo.prototype.interfaces_=function(){return[]},Uo.prototype.getClass=function(){return Uo},Uo.map=function(e,t){var n=new Uo(t);return n.map(e)};var Br=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new Y,this._resultLineList=new Y;var e=arguments[0],t=arguments[1],n=arguments[2];this._op=e,this._geometryFactory=t,this._ptLocator=n};Br.prototype.collectLines=function(e){for(var t=this,n=this._op.getGraph().getEdgeEnds().iterator();n.hasNext();){var i=n.next();t.collectLineEdge(i,e,t._lineEdgesList),t.collectBoundaryTouchEdge(i,e,t._lineEdgesList)}},Br.prototype.labelIsolatedLine=function(e,t){var n=this._ptLocator.locate(e.getCoordinate(),this._op.getArgGeometry(t));e.getLabel().setLocation(t,n)},Br.prototype.build=function(e){return this.findCoveredLineEdges(),this.collectLines(e),this.buildLines(e),this._resultLineList},Br.prototype.collectLineEdge=function(e,t,n){var i=e.getLabel(),s=e.getEdge();e.isLineEdge()&&!e.isVisited()&&_t.isResultOfOp(i,t)&&!s.isCovered()&&(n.add(s),e.setVisitedEdge(!0))},Br.prototype.findCoveredLineEdges=function(){for(var e=this,t=this._op.getGraph().getNodes().iterator();t.hasNext();){var n=t.next();n.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getEdge();if(s.isLineEdge()&&!o.isCoveredSet()){var a=e._op.isCoveredByA(s.getCoordinate());o.setCovered(a)}}},Br.prototype.labelIsolatedLines=function(e){for(var t=this,n=e.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();i.isIsolated()&&(s.isNull(0)?t.labelIsolatedLine(i,0):t.labelIsolatedLine(i,1))}},Br.prototype.buildLines=function(e){for(var t=this,n=this._lineEdgesList.iterator();n.hasNext();){var i=n.next(),s=t._geometryFactory.createLineString(i.getCoordinates());t._resultLineList.add(s),i.setInResult(!0)}},Br.prototype.collectBoundaryTouchEdge=function(e,t,n){var i=e.getLabel();if(e.isLineEdge()||e.isVisited()||e.isInteriorAreaEdge()||e.getEdge().isInResult())return null;wt.isTrue(!(e.isInResult()||e.getSym().isInResult())||!e.getEdge().isInResult()),_t.isResultOfOp(i,t)&&t===_t.INTERSECTION&&(n.add(e.getEdge()),e.setVisitedEdge(!0))},Br.prototype.interfaces_=function(){return[]},Br.prototype.getClass=function(){return Br};var Go=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new Y;var e=arguments[0],t=arguments[1];this._op=e,this._geometryFactory=t};Go.prototype.filterCoveredNodeToPoint=function(e){var t=e.getCoordinate();if(!this._op.isCoveredByLA(t)){var n=this._geometryFactory.createPoint(t);this._resultPointList.add(n)}},Go.prototype.extractNonCoveredResultNodes=function(e){for(var t=this,n=this._op.getGraph().getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||e===_t.INTERSECTION)){var s=i.getLabel();_t.isResultOfOp(s,e)&&t.filterCoveredNodeToPoint(i)}}},Go.prototype.build=function(e){return this.extractNonCoveredResultNodes(e),this._resultPointList},Go.prototype.interfaces_=function(){return[]},Go.prototype.getClass=function(){return Go};var dn=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};dn.prototype.transformPoint=function(e,t){return this._factory.createPoint(this.transformCoordinates(e.getCoordinateSequence(),e))},dn.prototype.transformPolygon=function(e,t){var n=this,i=!0,s=this.transformLinearRing(e.getExteriorRing(),e);(s===null||!(s instanceof ii)||s.isEmpty())&&(i=!1);for(var o=new Y,a=0;a<e.getNumInteriorRing();a++){var l=n.transformLinearRing(e.getInteriorRingN(a),e);l===null||l.isEmpty()||(l instanceof ii||(i=!1),o.add(l))}if(i)return this._factory.createPolygon(s,o.toArray([]));var u=new Y;return s!==null&&u.add(s),u.addAll(o),this._factory.buildGeometry(u)},dn.prototype.createCoordinateSequence=function(e){return this._factory.getCoordinateSequenceFactory().create(e)},dn.prototype.getInputGeometry=function(){return this._inputGeom},dn.prototype.transformMultiLineString=function(e,t){for(var n=this,i=new Y,s=0;s<e.getNumGeometries();s++){var o=n.transformLineString(e.getGeometryN(s),e);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},dn.prototype.transformCoordinates=function(e,t){return this.copy(e)},dn.prototype.transformLineString=function(e,t){return this._factory.createLineString(this.transformCoordinates(e.getCoordinateSequence(),e))},dn.prototype.transformMultiPoint=function(e,t){for(var n=this,i=new Y,s=0;s<e.getNumGeometries();s++){var o=n.transformPoint(e.getGeometryN(s),e);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},dn.prototype.transformMultiPolygon=function(e,t){for(var n=this,i=new Y,s=0;s<e.getNumGeometries();s++){var o=n.transformPolygon(e.getGeometryN(s),e);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},dn.prototype.copy=function(e){return e.copy()},dn.prototype.transformGeometryCollection=function(e,t){for(var n=this,i=new Y,s=0;s<e.getNumGeometries();s++){var o=n.transform(e.getGeometryN(s));o!==null&&(n._pruneEmptyGeometry&&o.isEmpty()||i.add(o))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(bt.toGeometryArray(i)):this._factory.buildGeometry(i)},dn.prototype.transform=function(e){if(this._inputGeom=e,this._factory=e.getFactory(),e instanceof yn)return this.transformPoint(e,null);if(e instanceof Ga)return this.transformMultiPoint(e,null);if(e instanceof ii)return this.transformLinearRing(e,null);if(e instanceof ee)return this.transformLineString(e,null);if(e instanceof Us)return this.transformMultiLineString(e,null);if(e instanceof ve)return this.transformPolygon(e,null);if(e instanceof si)return this.transformMultiPolygon(e,null);if(e instanceof Ke)return this.transformGeometryCollection(e,null);throw new $t("Unknown Geometry subtype: "+e.getClass().getName())},dn.prototype.transformLinearRing=function(e,t){var n=this.transformCoordinates(e.getCoordinateSequence(),e);if(n===null)return this._factory.createLinearRing(null);var i=n.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},dn.prototype.interfaces_=function(){return[]},dn.prototype.getClass=function(){return dn};var di=function r(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new ot,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof ee&&typeof arguments[1]=="number"){var e=arguments[0],t=arguments[1];r.call(this,e.getCoordinates(),t)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var n=arguments[0],i=arguments[1];this._srcPts=n,this._isClosed=r.isClosed(n),this._snapTolerance=i}};di.prototype.snapVertices=function(e,t){for(var n=this,i=this._isClosed?e.size()-1:e.size(),s=0;s<i;s++){var o=e.get(s),a=n.findSnapForVertex(o,t);a!==null&&(e.set(s,new F(a)),s===0&&n._isClosed&&e.set(e.size()-1,new F(a)))}},di.prototype.findSnapForVertex=function(e,t){for(var n=this,i=0;i<t.length;i++){if(e.equals2D(t[i]))return null;if(e.distance(t[i])<n._snapTolerance)return t[i]}return null},di.prototype.snapTo=function(e){var t=new gu(this._srcPts);this.snapVertices(t,e),this.snapSegments(t,e);var n=t.toCoordinateArray();return n},di.prototype.snapSegments=function(e,t){var n=this;if(t.length===0)return null;var i=t.length;t[0].equals2D(t[t.length-1])&&(i=t.length-1);for(var s=0;s<i;s++){var o=t[s],a=n.findSegmentIndexToSnap(o,e);a>=0&&e.add(a+1,new F(o),!1)}},di.prototype.findSegmentIndexToSnap=function(e,t){for(var n=this,i=vt.MAX_VALUE,s=-1,o=0;o<t.size()-1;o++){if(n._seg.p0=t.get(o),n._seg.p1=t.get(o+1),n._seg.p0.equals2D(e)||n._seg.p1.equals2D(e)){if(n._allowSnappingToSourceVertices)continue;return-1}var a=n._seg.distance(e);a<n._snapTolerance&&a<i&&(i=a,s=o)}return s},di.prototype.setAllowSnappingToSourceVertices=function(e){this._allowSnappingToSourceVertices=e},di.prototype.interfaces_=function(){return[]},di.prototype.getClass=function(){return di},di.isClosed=function(e){return e.length<=1?!1:e[0].equals2D(e[e.length-1])};var le=function(e){this._srcGeom=e||null},Mv={SNAP_PRECISION_FACTOR:{configurable:!0}};le.prototype.snapTo=function(e,t){var n=this.extractTargetCoordinates(e),i=new Rv(t,n);return i.transform(this._srcGeom)},le.prototype.snapToSelf=function(e,t){var n=this.extractTargetCoordinates(this._srcGeom),i=new Rv(e,n,!0),s=i.transform(this._srcGeom),o=s;return t&&pt(o,ds)&&(o=s.buffer(0)),o},le.prototype.computeSnapTolerance=function(e){var t=this.computeMinimumSegmentLength(e),n=t/10;return n},le.prototype.extractTargetCoordinates=function(e){for(var t=new Tr,n=e.getCoordinates(),i=0;i<n.length;i++)t.add(n[i]);return t.toArray(new Array(0).fill(null))},le.prototype.computeMinimumSegmentLength=function(e){for(var t=vt.MAX_VALUE,n=0;n<e.length-1;n++){var i=e[n].distance(e[n+1]);i<t&&(t=i)}return t},le.prototype.interfaces_=function(){return[]},le.prototype.getClass=function(){return le},le.snap=function(e,t,n){var i=new Array(2).fill(null),s=new le(e);i[0]=s.snapTo(t,n);var o=new le(t);return i[1]=o.snapTo(i[0],n),i},le.computeOverlaySnapTolerance=function(){if(arguments.length===1){var e=arguments[0],t=le.computeSizeBasedSnapTolerance(e),n=e.getPrecisionModel();if(n.getType()===Mt.FIXED){var i=1/n.getScale()*2/1.415;i>t&&(t=i)}return t}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return Math.min(le.computeOverlaySnapTolerance(s),le.computeOverlaySnapTolerance(o))}},le.computeSizeBasedSnapTolerance=function(e){var t=e.getEnvelopeInternal(),n=Math.min(t.getHeight(),t.getWidth()),i=n*le.SNAP_PRECISION_FACTOR;return i},le.snapToSelf=function(e,t,n){var i=new le(e);return i.snapToSelf(t,n)},Mv.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(le,Mv);var Rv=(function(r){function e(t,n,i){r.call(this),this._snapTolerance=t||null,this._snapPts=n||null,this._isSelfSnap=i!==void 0?i:!1}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(n,i){var s=new di(n,this._snapTolerance);return s.setAllowSnappingToSourceVertices(this._isSelfSnap),s.snapTo(i)},e.prototype.transformCoordinates=function(n,i){var s=n.toCoordinateArray(),o=this.snapLine(s,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(o)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(dn),rn=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};rn.prototype.getCommon=function(){return vt.longBitsToDouble(this._commonBits)},rn.prototype.add=function(e){var t=vt.doubleToLongBits(e);if(this._isFirst)return this._commonBits=t,this._commonSignExp=rn.signExpBits(this._commonBits),this._isFirst=!1,null;var n=rn.signExpBits(t);if(n!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=rn.numCommonMostSigMantissaBits(this._commonBits,t),this._commonBits=rn.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},rn.prototype.toString=function(){if(arguments.length===1){var e=arguments[0],t=vt.longBitsToDouble(e),n=vt.toBinaryString(e),i="0000000000000000000000000000000000000000000000000000000000000000"+n,s=i.substring(i.length-64),o=s.substring(0,1)+" "+s.substring(1,12)+"(exp) "+s.substring(12)+" [ "+t+" ]";return o}},rn.prototype.interfaces_=function(){return[]},rn.prototype.getClass=function(){return rn},rn.getBit=function(e,t){var n=1<<t;return(e&n)!==0?1:0},rn.signExpBits=function(e){return e>>52},rn.zeroLowerBits=function(e,t){var n=(1<<t)-1,i=~n,s=e&i;return s},rn.numCommonMostSigMantissaBits=function(e,t){for(var n=0,i=52;i>=0;i--){if(rn.getBit(e,i)!==rn.getBit(t,i))return n;n++}return 52};var ws=function(){this._commonCoord=null,this._ccFilter=new Wo},Qd={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};ws.prototype.addCommonBits=function(e){var t=new Es(this._commonCoord);e.apply(t),e.geometryChanged()},ws.prototype.removeCommonBits=function(e){if(this._commonCoord.x===0&&this._commonCoord.y===0)return e;var t=new F(this._commonCoord);t.x=-t.x,t.y=-t.y;var n=new Es(t);return e.apply(n),e.geometryChanged(),e},ws.prototype.getCommonCoordinate=function(){return this._commonCoord},ws.prototype.add=function(e){e.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},ws.prototype.interfaces_=function(){return[]},ws.prototype.getClass=function(){return ws},Qd.CommonCoordinateFilter.get=function(){return Wo},Qd.Translater.get=function(){return Es},Object.defineProperties(ws,Qd);var Wo=function(){this._commonBitsX=new rn,this._commonBitsY=new rn};Wo.prototype.filter=function(e){this._commonBitsX.add(e.x),this._commonBitsY.add(e.y)},Wo.prototype.getCommonCoordinate=function(){return new F(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},Wo.prototype.interfaces_=function(){return[ri]},Wo.prototype.getClass=function(){return Wo};var Es=function(){this.trans=null;var e=arguments[0];this.trans=e};Es.prototype.filter=function(e,t){var n=e.getOrdinate(t,0)+this.trans.x,i=e.getOrdinate(t,1)+this.trans.y;e.setOrdinate(t,0,n),e.setOrdinate(t,1,i)},Es.prototype.isDone=function(){return!1},Es.prototype.isGeometryChanged=function(){return!0},Es.prototype.interfaces_=function(){return[ur]},Es.prototype.getClass=function(){return Es};var De=function(e,t){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=e,this._geom[1]=t,this.computeSnapTolerance()};De.prototype.selfSnap=function(e){var t=new le(e),n=t.snapTo(e,this._snapTolerance);return n},De.prototype.removeCommonBits=function(e){this._cbr=new ws,this._cbr.add(e[0]),this._cbr.add(e[1]);var t=new Array(2).fill(null);return t[0]=this._cbr.removeCommonBits(e[0].copy()),t[1]=this._cbr.removeCommonBits(e[1].copy()),t},De.prototype.prepareResult=function(e){return this._cbr.addCommonBits(e),e},De.prototype.getResultGeometry=function(e){var t=this.snap(this._geom),n=_t.overlayOp(t[0],t[1],e);return this.prepareResult(n)},De.prototype.checkValid=function(e){e.isValid()||Ae.out.println("Snapped geometry is invalid")},De.prototype.computeSnapTolerance=function(){this._snapTolerance=le.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},De.prototype.snap=function(e){var t=this.removeCommonBits(e),n=le.snap(t[0],t[1],this._snapTolerance);return n},De.prototype.interfaces_=function(){return[]},De.prototype.getClass=function(){return De},De.overlayOp=function(e,t,n){var i=new De(e,t);return i.getResultGeometry(n)},De.union=function(e,t){return De.overlayOp(e,t,_t.UNION)},De.intersection=function(e,t){return De.overlayOp(e,t,_t.INTERSECTION)},De.symDifference=function(e,t){return De.overlayOp(e,t,_t.SYMDIFFERENCE)},De.difference=function(e,t){return De.overlayOp(e,t,_t.DIFFERENCE)};var sn=function(e,t){this._geom=new Array(2).fill(null),this._geom[0]=e,this._geom[1]=t};sn.prototype.getResultGeometry=function(e){var t=null,n=!1,i=null;try{t=_t.overlayOp(this._geom[0],this._geom[1],e);var s=!0;s&&(n=!0)}catch(o){if(o instanceof Mi)i=o;else throw o}finally{}if(!n)try{t=De.overlayOp(this._geom[0],this._geom[1],e)}catch(o){throw o instanceof Mi?i:o}finally{}return t},sn.prototype.interfaces_=function(){return[]},sn.prototype.getClass=function(){return sn},sn.overlayOp=function(e,t,n){var i=new sn(e,t);return i.getResultGeometry(n)},sn.union=function(e,t){return sn.overlayOp(e,t,_t.UNION)},sn.intersection=function(e,t){return sn.overlayOp(e,t,_t.INTERSECTION)},sn.symDifference=function(e,t){return sn.overlayOp(e,t,_t.SYMDIFFERENCE)},sn.difference=function(e,t){return sn.overlayOp(e,t,_t.DIFFERENCE)};var Du=function(){this.mce=null,this.chainIndex=null;var e=arguments[0],t=arguments[1];this.mce=e,this.chainIndex=t};Du.prototype.computeIntersections=function(e,t){this.mce.computeIntersectsForChain(this.chainIndex,e.mce,e.chainIndex,t)},Du.prototype.interfaces_=function(){return[]},Du.prototype.getClass=function(){return Du};var Cn=function r(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var e=arguments[0],t=arguments[1];this._eventType=r.DELETE,this._xValue=e,this._insertEvent=t}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._eventType=r.INSERT,this._label=n,this._xValue=i,this._obj=s}},tf={INSERT:{configurable:!0},DELETE:{configurable:!0}};Cn.prototype.isDelete=function(){return this._eventType===Cn.DELETE},Cn.prototype.setDeleteEventIndex=function(e){this._deleteEventIndex=e},Cn.prototype.getObject=function(){return this._obj},Cn.prototype.compareTo=function(e){var t=e;return this._xValue<t._xValue?-1:this._xValue>t._xValue?1:this._eventType<t._eventType?-1:this._eventType>t._eventType?1:0},Cn.prototype.getInsertEvent=function(){return this._insertEvent},Cn.prototype.isInsert=function(){return this._eventType===Cn.INSERT},Cn.prototype.isSameLabel=function(e){return this._label===null?!1:this._label===e._label},Cn.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},Cn.prototype.interfaces_=function(){return[Wn]},Cn.prototype.getClass=function(){return Cn},tf.INSERT.get=function(){return 1},tf.DELETE.get=function(){return 2},Object.defineProperties(Cn,tf);var Uc=function(){};Uc.prototype.interfaces_=function(){return[]},Uc.prototype.getClass=function(){return Uc};var Ue=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var e=arguments[0],t=arguments[1],n=arguments[2];this._li=e,this._includeProper=t,this._recordIsolated=n};Ue.prototype.isTrivialIntersection=function(e,t,n,i){if(e===n&&this._li.getIntersectionNum()===1){if(Ue.isAdjacentSegments(t,i))return!0;if(e.isClosed()){var s=e.getNumPoints()-1;if(t===0&&i===s||i===0&&t===s)return!0}}return!1},Ue.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Ue.prototype.setIsDoneIfProperInt=function(e){this._isDoneWhenProperInt=e},Ue.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Ue.prototype.isBoundaryPointInternal=function(e,t){for(var n=t.iterator();n.hasNext();){var i=n.next(),s=i.getCoordinate();if(e.isIntersection(s))return!0}return!1},Ue.prototype.hasProperIntersection=function(){return this._hasProper},Ue.prototype.hasIntersection=function(){return this._hasIntersection},Ue.prototype.isDone=function(){return this._isDone},Ue.prototype.isBoundaryPoint=function(e,t){return t===null?!1:!!(this.isBoundaryPointInternal(e,t[0])||this.isBoundaryPointInternal(e,t[1]))},Ue.prototype.setBoundaryNodes=function(e,t){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=e,this._bdyNodes[1]=t},Ue.prototype.addIntersections=function(e,t,n,i){if(e===n&&t===i)return null;this.numTests++;var s=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=n.getCoordinates()[i],l=n.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,l),this._li.hasIntersection()&&(this._recordIsolated&&(e.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(e,t,n,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(e.addIntersections(this._li,t,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},Ue.prototype.interfaces_=function(){return[]},Ue.prototype.getClass=function(){return Ue},Ue.isAdjacentSegments=function(e,t){return Math.abs(e-t)===1};var FC=(function(r){function e(){r.call(this),this.events=new Y,this.nOverlaps=null}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){var n=this;hr.sort(this.events);for(var i=0;i<this.events.size();i++){var s=n.events.get(i);s.isDelete()&&s.getInsertEvent().setDeleteEventIndex(i)}},e.prototype.computeIntersections=function(){var n=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var s=0;s<this.events.size();s++){var o=n.events.get(s);if(o.isInsert()&&n.processOverlaps(s,o.getDeleteEventIndex(),o,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof Ue&&pt(arguments[0],ar)&&pt(arguments[1],ar)){var a=arguments[0],l=arguments[1],u=arguments[2];this.addEdges(a,a),this.addEdges(l,l),this.computeIntersections(u)}else if(typeof arguments[2]=="boolean"&&pt(arguments[0],ar)&&arguments[1]instanceof Ue){var c=arguments[0],d=arguments[1],f=arguments[2];f?this.addEdges(c,null):this.addEdges(c),this.computeIntersections(d)}}},e.prototype.addEdge=function(n,i){for(var s=this,o=n.getMonotoneChainEdge(),a=o.getStartIndexes(),l=0;l<a.length-1;l++){var u=new Du(o,l),c=new Cn(i,o.getMinX(l),u);s.events.add(c),s.events.add(new Cn(o.getMaxX(l),c))}},e.prototype.processOverlaps=function(n,i,s,o){for(var a=this,l=s.getObject(),u=n;u<i;u++){var c=a.events.get(u);if(c.isInsert()){var d=c.getObject();s.isSameLabel(c)||(l.computeIntersections(d,o),a.nOverlaps++)}}},e.prototype.addEdges=function(){var n=this;if(arguments.length===1)for(var i=arguments[0],s=i.iterator();s.hasNext();){var o=s.next();n.addEdge(o,o)}else if(arguments.length===2)for(var a=arguments[0],l=arguments[1],u=a.iterator();u.hasNext();){var c=u.next();n.addEdge(c,l)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(Uc),fi=function(){this._min=vt.POSITIVE_INFINITY,this._max=vt.NEGATIVE_INFINITY},Lv={NodeComparator:{configurable:!0}};fi.prototype.getMin=function(){return this._min},fi.prototype.intersects=function(e,t){return!(this._min>t||this._max<e)},fi.prototype.getMax=function(){return this._max},fi.prototype.toString=function(){return or.toLineString(new F(this._min,0),new F(this._max,0))},fi.prototype.interfaces_=function(){return[]},fi.prototype.getClass=function(){return fi},Lv.NodeComparator.get=function(){return Nu},Object.defineProperties(fi,Lv);var Nu=function(){};Nu.prototype.compare=function(e,t){var n=e,i=t,s=(n._min+n._max)/2,o=(i._min+i._max)/2;return s<o?-1:s>o?1:0},Nu.prototype.interfaces_=function(){return[Ma]},Nu.prototype.getClass=function(){return Nu};var AC=(function(r){function e(){r.call(this),this._item=null;var t=arguments[0],n=arguments[1],i=arguments[2];this._min=t,this._max=n,this._item=i}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.query=function(n,i,s){if(!this.intersects(n,i))return null;s.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(fi),kC=(function(r){function e(){r.call(this),this._node1=null,this._node2=null;var t=arguments[0],n=arguments[1];this._node1=t,this._node2=n,this.buildExtent(this._node1,this._node2)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(n,i){this._min=Math.min(n._min,i._min),this._max=Math.max(n._max,i._max)},e.prototype.query=function(n,i,s){if(!this.intersects(n,i))return null;this._node1!==null&&this._node1.query(n,i,s),this._node2!==null&&this._node2.query(n,i,s)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(fi),pi=function(){this._leaves=new Y,this._root=null,this._level=0};pi.prototype.buildTree=function(){var e=this;hr.sort(this._leaves,new fi.NodeComparator);for(var t=this._leaves,n=null,i=new Y;;){if(e.buildLevel(t,i),i.size()===1)return i.get(0);n=t,t=i,i=n}},pi.prototype.insert=function(e,t,n){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new AC(e,t,n))},pi.prototype.query=function(e,t,n){this.init(),this._root.query(e,t,n)},pi.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},pi.prototype.printNode=function(e){Ae.out.println(or.toLineString(new F(e._min,this._level),new F(e._max,this._level)))},pi.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},pi.prototype.buildLevel=function(e,t){this._level++,t.clear();for(var n=0;n<e.size();n+=2){var i=e.get(n),s=n+1<e.size()?e.get(n):null;if(s===null)t.add(i);else{var o=new kC(e.get(n),e.get(n+1));t.add(o)}}},pi.prototype.interfaces_=function(){return[]},pi.prototype.getClass=function(){return pi};var $a=function(){this._items=new Y};$a.prototype.visitItem=function(e){this._items.add(e)},$a.prototype.getItems=function(){return this._items},$a.prototype.interfaces_=function(){return[fs]},$a.prototype.getClass=function(){return $a};var Ka=function(){this._index=null;var e=arguments[0];if(!pt(e,ds))throw new $t("Argument must be Polygonal");this._index=new Js(e)},ef={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};Ka.prototype.locate=function(e){var t=new xr(e),n=new Za(t);return this._index.query(e.y,e.y,n),t.getLocation()},Ka.prototype.interfaces_=function(){return[Xa]},Ka.prototype.getClass=function(){return Ka},ef.SegmentVisitor.get=function(){return Za},ef.IntervalIndexedGeometry.get=function(){return Js},Object.defineProperties(Ka,ef);var Za=function(){this._counter=null;var e=arguments[0];this._counter=e};Za.prototype.visitItem=function(e){var t=e;this._counter.countSegment(t.getCoordinate(0),t.getCoordinate(1))},Za.prototype.interfaces_=function(){return[fs]},Za.prototype.getClass=function(){return Za};var Js=function(){this._index=new pi;var e=arguments[0];this.init(e)};Js.prototype.init=function(e){for(var t=this,n=je.getLines(e),i=n.iterator();i.hasNext();){var s=i.next(),o=s.getCoordinates();t.addLine(o)}},Js.prototype.addLine=function(e){for(var t=this,n=1;n<e.length;n++){var i=new ot(e[n-1],e[n]),s=Math.min(i.p0.y,i.p1.y),o=Math.max(i.p0.y,i.p1.y);t._index.insert(s,o,i)}},Js.prototype.query=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],n=new $a;return this._index.query(e,t,n),n.getItems()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];this._index.query(i,s,o)}},Js.prototype.interfaces_=function(){return[]},Js.prototype.getClass=function(){return Js};var Mu=(function(r){function e(){if(r.call(this),this._parentGeom=null,this._lineEdgeMap=new gv,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new fr,arguments.length===2){var t=arguments[0],n=arguments[1],i=qn.OGC_SFS_BOUNDARY_RULE;this._argIndex=t,this._parentGeom=n,this._boundaryNodeRule=i,n!==null&&this.add(n)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=s,this._parentGeom=o,this._boundaryNodeRule=a,o!==null&&this.add(o)}}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=function(n,i){var s=this._nodes.addNode(i),o=s.getLabel(),a=1,l=k.NONE;l=o.getLocation(n,W.ON),l===k.BOUNDARY&&a++;var u=e.determineBoundary(this._boundaryNodeRule,a);o.setLocation(n,u)},e.prototype.computeSelfNodes=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.computeSelfNodes(n,i,!1)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2],l=new Ue(s,!0,!1);l.setIsDoneIfProperInt(a);var u=this.createEdgeSetIntersector(),c=this._parentGeom instanceof ii||this._parentGeom instanceof ve||this._parentGeom instanceof si,d=o||!c;return u.computeIntersections(this._edges,l,d),this.addSelfIntersectionNodes(this._argIndex),l}},e.prototype.computeSplitEdges=function(n){for(var i=this._edges.iterator();i.hasNext();){var s=i.next();s.eiList.addSplitEdges(n)}},e.prototype.computeEdgeIntersections=function(n,i,s){var o=new Ue(i,s,!0);o.setBoundaryNodes(this.getBoundaryNodes(),n.getBoundaryNodes());var a=this.createEdgeSetIntersector();return a.computeIntersections(this._edges,n._edges,o),o},e.prototype.getGeometry=function(){return this._parentGeom},e.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},e.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},e.prototype.addPoint=function(){if(arguments[0]instanceof yn){var n=arguments[0],i=n.getCoordinate();this.insertPoint(this._argIndex,i,k.INTERIOR)}else if(arguments[0]instanceof F){var s=arguments[0];this.insertPoint(this._argIndex,s,k.INTERIOR)}},e.prototype.addPolygon=function(n){var i=this;this.addPolygonRing(n.getExteriorRing(),k.EXTERIOR,k.INTERIOR);for(var s=0;s<n.getNumInteriorRing();s++){var o=n.getInteriorRingN(s);i.addPolygonRing(o,k.INTERIOR,k.EXTERIOR)}},e.prototype.addEdge=function(n){this.insertEdge(n);var i=n.getCoordinates();this.insertPoint(this._argIndex,i[0],k.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],k.BOUNDARY)},e.prototype.addLineString=function(n){var i=St.removeRepeatedPoints(n.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var s=new zc(i,new Vt(this._argIndex,k.INTERIOR));this._lineEdgeMap.put(n,s),this.insertEdge(s),wt.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var n=this.getBoundaryNodes(),i=new Array(n.size()).fill(null),s=0,o=n.iterator();o.hasNext();){var a=o.next();i[s++]=a.getCoordinate().copy()}return i},e.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(n,i,s){if(this.isBoundaryNode(n,i))return null;s===k.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(n,i):this.insertPoint(n,i,s)},e.prototype.addPolygonRing=function(n,i,s){if(n.isEmpty())return null;var o=St.removeRepeatedPoints(n.getCoordinates());if(o.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=o[0],null;var a=i,l=s;$.isCCW(o)&&(a=s,l=i);var u=new zc(o,new Vt(this._argIndex,k.BOUNDARY,a,l));this._lineEdgeMap.put(n,u),this.insertEdge(u),this.insertPoint(this._argIndex,o[0],k.BOUNDARY)},e.prototype.insertPoint=function(n,i,s){var o=this._nodes.addNode(i),a=o.getLabel();a===null?o._label=new Vt(n,s):a.setLocation(n,s)},e.prototype.createEdgeSetIntersector=function(){return new FC},e.prototype.addSelfIntersectionNodes=function(n){for(var i=this,s=this._edges.iterator();s.hasNext();)for(var o=s.next(),a=o.getLabel().getLocation(n),l=o.eiList.iterator();l.hasNext();){var u=l.next();i.addSelfIntersectionNode(n,u.coord,a)}},e.prototype.add=function(){if(arguments.length===1){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof si&&(this._useBoundaryDeterminationRule=!1),n instanceof ve)this.addPolygon(n);else if(n instanceof ee)this.addLineString(n);else if(n instanceof yn)this.addPoint(n);else if(n instanceof Ga)this.addCollection(n);else if(n instanceof Us)this.addCollection(n);else if(n instanceof si)this.addCollection(n);else if(n instanceof Ke)this.addCollection(n);else throw new Error(n.getClass().getName())}else return r.prototype.add.apply(this,arguments)},e.prototype.addCollection=function(n){for(var i=this,s=0;s<n.getNumGeometries();s++){var o=n.getGeometryN(s);i.add(o)}},e.prototype.locate=function(n){return pt(this._parentGeom,ds)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new Ka(this._parentGeom)),this._areaPtLocator.locate(n)):this._ptLocator.locate(n,this._parentGeom)},e.prototype.findEdge=function(){if(arguments.length===1){var n=arguments[0];return this._lineEdgeMap.get(n)}else return r.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(n,i){return n.isInBoundary(i)?k.BOUNDARY:k.INTERIOR},e})(Qt),Qa=function(){if(this._li=new js,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var e=arguments[0];this.setComputationPrecision(e.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Mu(0,e)}else if(arguments.length===2){var t=arguments[0],n=arguments[1],i=qn.OGC_SFS_BOUNDARY_RULE;t.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(t.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Mu(0,t,i),this._arg[1]=new Mu(1,n,i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];s.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(s.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Mu(0,s,a),this._arg[1]=new Mu(1,o,a)}};Qa.prototype.getArgGeometry=function(e){return this._arg[e].getGeometry()},Qa.prototype.setComputationPrecision=function(e){this._resultPrecisionModel=e,this._li.setPrecisionModel(this._resultPrecisionModel)},Qa.prototype.interfaces_=function(){return[]},Qa.prototype.getClass=function(){return Qa};var $s=function(){};$s.prototype.interfaces_=function(){return[]},$s.prototype.getClass=function(){return $s},$s.map=function(){if(arguments[0]instanceof ht&&pt(arguments[1],$s.MapOp)){for(var e=arguments[0],t=arguments[1],n=new Y,i=0;i<e.getNumGeometries();i++){var s=t.map(e.getGeometryN(i));s!==null&&n.add(s)}return e.getFactory().buildGeometry(n)}else if(pt(arguments[0],me)&&pt(arguments[1],$s.MapOp)){for(var o=arguments[0],a=arguments[1],l=new Y,u=o.iterator();u.hasNext();){var c=u.next(),d=a.map(c);d!==null&&l.add(d)}return l}},$s.MapOp=function(){};var _t=(function(r){function e(){var t=arguments[0],n=arguments[1];r.call(this,t,n),this._ptLocator=new fr,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new dr,this._resultPolyList=new Y,this._resultLineList=new Y,this._resultPointList=new Y,this._graph=new Qt(new Pv),this._geomFact=t.getFactory()}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=function(n){var i=this._edgeList.findEqualEdge(n);if(i!==null){var s=i.getLabel(),o=n.getLabel();i.isPointwiseEqual(n)||(o=new Vt(n.getLabel()),o.flip());var a=i.getDepth();a.isNull()&&a.add(s),a.add(o),s.merge(o)}else this._edgeList.add(n)},e.prototype.getGraph=function(){return this._graph},e.prototype.cancelDuplicateResultEdges=function(){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var i=n.next(),s=i.getSym();i.isInResult()&&s.isInResult()&&(i.setInResult(!1),s.setInResult(!1))}},e.prototype.isCoveredByLA=function(n){return!!(this.isCovered(n,this._resultLineList)||this.isCovered(n,this._resultPolyList))},e.prototype.computeGeometry=function(n,i,s,o){var a=new Y;return a.addAll(n),a.addAll(i),a.addAll(s),a.isEmpty()?e.createEmptyResult(o,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(a)},e.prototype.mergeSymLabels=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next();i.getEdges().mergeSymLabels()}},e.prototype.isCovered=function(n,i){for(var s=this,o=i.iterator();o.hasNext();){var a=o.next(),l=s._ptLocator.locate(n,a);if(l!==k.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var n=new Y,i=this._edgeList.iterator();i.hasNext();){var s=i.next();s.isCollapsed()&&(i.remove(),n.add(s.getCollapsedEdge()))}this._edgeList.addAll(n)},e.prototype.updateNodeLabelling=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next(),s=i.getEdges().getLabel();i.getLabel().merge(s)}},e.prototype.getResultGeometry=function(n){return this.computeOverlay(n),this._resultGeom},e.prototype.insertUniqueEdges=function(n){for(var i=this,s=n.iterator();s.hasNext();){var o=s.next();i.insertUniqueEdge(o)}},e.prototype.computeOverlay=function(n){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var i=new Y;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Ys.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(n),this.cancelDuplicateResultEdges();var s=new _n(this._geomFact);s.add(this._graph),this._resultPolyList=s.getPolygons();var o=new Br(this,this._geomFact,this._ptLocator);this._resultLineList=o.build(n);var a=new Go(this,this._geomFact,this._ptLocator);this._resultPointList=a.build(n),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,n)},e.prototype.labelIncompleteNode=function(n,i){var s=this._ptLocator.locate(n.getCoordinate(),this._arg[i].getGeometry());n.getLabel().setLocation(i,s)},e.prototype.copyPoints=function(n){for(var i=this,s=this._arg[n].getNodeIterator();s.hasNext();){var o=s.next(),a=i._graph.addNode(o.getCoordinate());a.setLabel(n,o.getLabel().getLocation(n))}},e.prototype.findResultAreaEdges=function(n){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.isArea()&&!s.isInteriorAreaEdge()&&e.isResultOfOp(o.getLocation(0,W.RIGHT),o.getLocation(1,W.RIGHT),n)&&s.setInResult(!0)}},e.prototype.computeLabelsFromDepths=function(){for(var n=this._edgeList.iterator();n.hasNext();){var i=n.next(),s=i.getLabel(),o=i.getDepth();if(!o.isNull()){o.normalize();for(var a=0;a<2;a++)!s.isNull(a)&&s.isArea()&&!o.isNull(a)&&(o.getDelta(a)===0?s.toLine(a):(wt.isTrue(!o.isNull(a,W.LEFT),"depth of LEFT side has not been initialized"),s.setLocation(a,W.LEFT,o.getLocation(a,W.LEFT)),wt.isTrue(!o.isNull(a,W.RIGHT),"depth of RIGHT side has not been initialized"),s.setLocation(a,W.RIGHT,o.getLocation(a,W.RIGHT))))}}},e.prototype.computeLabelling=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next();s.getEdges().computeLabelling(n._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},e.prototype.labelIncompleteNodes=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();s.isIsolated()&&(o.isNull(0)?n.labelIncompleteNode(s,0):n.labelIncompleteNode(s,1)),s.getEdges().updateLabelling(o)}},e.prototype.isCoveredByA=function(n){return!!this.isCovered(n,this._resultPolyList)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(Qa);_t.overlayOp=function(r,e,t){var n=new _t(r,e),i=n.getResultGeometry(t);return i},_t.intersection=function(r,e){if(r.isEmpty()||e.isEmpty())return _t.createEmptyResult(_t.INTERSECTION,r,e,r.getFactory());if(r.isGeometryCollection()){var t=e;return Uo.map(r,{interfaces_:function(){return[$s.MapOp]},map:function(n){return n.intersection(t)}})}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(e),sn.overlayOp(r,e,_t.INTERSECTION)},_t.symDifference=function(r,e){if(r.isEmpty()||e.isEmpty()){if(r.isEmpty()&&e.isEmpty())return _t.createEmptyResult(_t.SYMDIFFERENCE,r,e,r.getFactory());if(r.isEmpty())return e.copy();if(e.isEmpty())return r.copy()}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(e),sn.overlayOp(r,e,_t.SYMDIFFERENCE)},_t.resultDimension=function(r,e,t){var n=e.getDimension(),i=t.getDimension(),s=-1;switch(r){case _t.INTERSECTION:s=Math.min(n,i);break;case _t.UNION:s=Math.max(n,i);break;case _t.DIFFERENCE:s=n;break;case _t.SYMDIFFERENCE:s=Math.max(n,i);break}return s},_t.createEmptyResult=function(r,e,t,n){var i=null;switch(_t.resultDimension(r,e,t)){case-1:i=n.createGeometryCollection(new Array(0).fill(null));break;case 0:i=n.createPoint();break;case 1:i=n.createLineString();break;case 2:i=n.createPolygon();break}return i},_t.difference=function(r,e){return r.isEmpty()?_t.createEmptyResult(_t.DIFFERENCE,r,e,r.getFactory()):e.isEmpty()?r.copy():(r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(e),sn.overlayOp(r,e,_t.DIFFERENCE))},_t.isResultOfOp=function(){if(arguments.length===2){var r=arguments[0],e=arguments[1],t=r.getLocation(0),n=r.getLocation(1);return _t.isResultOfOp(t,n,e)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];switch(i===k.BOUNDARY&&(i=k.INTERIOR),s===k.BOUNDARY&&(s=k.INTERIOR),o){case _t.INTERSECTION:return i===k.INTERIOR&&s===k.INTERIOR;case _t.UNION:return i===k.INTERIOR||s===k.INTERIOR;case _t.DIFFERENCE:return i===k.INTERIOR&&s!==k.INTERIOR;case _t.SYMDIFFERENCE:return i===k.INTERIOR&&s!==k.INTERIOR||i!==k.INTERIOR&&s===k.INTERIOR}return!1}},_t.INTERSECTION=1,_t.UNION=2,_t.DIFFERENCE=3,_t.SYMDIFFERENCE=4;var Cs=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new fr,this._seg=new ot;var e=arguments[0],t=arguments[1];this._g=e,this._boundaryDistanceTolerance=t,this._linework=this.extractLinework(e)};Cs.prototype.isWithinToleranceOfBoundary=function(e){for(var t=this,n=0;n<this._linework.getNumGeometries();n++)for(var i=t._linework.getGeometryN(n),s=i.getCoordinateSequence(),o=0;o<s.size()-1;o++){s.getCoordinate(o,t._seg.p0),s.getCoordinate(o+1,t._seg.p1);var a=t._seg.distance(e);if(a<=t._boundaryDistanceTolerance)return!0}return!1},Cs.prototype.getLocation=function(e){return this.isWithinToleranceOfBoundary(e)?k.BOUNDARY:this._ptLocator.locate(e,this._g)},Cs.prototype.extractLinework=function(e){var t=new tl;e.apply(t);var n=t.getLinework(),i=bt.toLineStringArray(n);return e.getFactory().createMultiLineString(i)},Cs.prototype.interfaces_=function(){return[]},Cs.prototype.getClass=function(){return Cs};var tl=function(){this._linework=null,this._linework=new Y};tl.prototype.getLinework=function(){return this._linework},tl.prototype.filter=function(e){var t=this;if(e instanceof ve){var n=e;this._linework.add(n.getExteriorRing());for(var i=0;i<n.getNumInteriorRing();i++)t._linework.add(n.getInteriorRingN(i))}},tl.prototype.interfaces_=function(){return[Or]},tl.prototype.getClass=function(){return tl};var Ks=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var e=arguments[0];this._g=e};Ks.prototype.extractPoints=function(e,t,n){for(var i=this,s=e.getCoordinates(),o=0;o<s.length-1;o++)i.computeOffsetPoints(s[o],s[o+1],t,n)},Ks.prototype.setSidesToGenerate=function(e,t){this._doLeft=e,this._doRight=t},Ks.prototype.getPoints=function(e){for(var t=this,n=new Y,i=je.getLines(this._g),s=i.iterator();s.hasNext();){var o=s.next();t.extractPoints(o,e,n)}return n},Ks.prototype.computeOffsetPoints=function(e,t,n,i){var s=t.x-e.x,o=t.y-e.y,a=Math.sqrt(s*s+o*o),l=n*s/a,u=n*o/a,c=(t.x+e.x)/2,d=(t.y+e.y)/2;if(this._doLeft){var f=new F(c-u,d+l);i.add(f)}if(this._doRight){var p=new F(c+u,d-l);i.add(p)}},Ks.prototype.interfaces_=function(){return[]},Ks.prototype.getClass=function(){return Ks};var Vn=function r(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=r.TOLERANCE,this._testCoords=new Y;var e=arguments[0],t=arguments[1],n=arguments[2];this._boundaryDistanceTolerance=r.computeBoundaryDistanceTolerance(e,t),this._geom=[e,t,n],this._locFinder=[new Cs(this._geom[0],this._boundaryDistanceTolerance),new Cs(this._geom[1],this._boundaryDistanceTolerance),new Cs(this._geom[2],this._boundaryDistanceTolerance)]},Fv={TOLERANCE:{configurable:!0}};Vn.prototype.reportResult=function(e,t,n){Ae.out.println("Overlay result invalid - A:"+k.toLocationSymbol(t[0])+" B:"+k.toLocationSymbol(t[1])+" expected:"+(n?"i":"e")+" actual:"+k.toLocationSymbol(t[2]))},Vn.prototype.isValid=function(e){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var t=this.checkValid(e);return t},Vn.prototype.checkValid=function(){var e=this;if(arguments.length===1){for(var t=arguments[0],n=0;n<this._testCoords.size();n++){var i=e._testCoords.get(n);if(!e.checkValid(t,i))return e._invalidLocation=i,!1}return!0}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),Vn.hasLocation(this._location,k.BOUNDARY)?!0:this.isValidResult(s,this._location)}},Vn.prototype.addTestPts=function(e){var t=new Ks(e);this._testCoords.addAll(t.getPoints(5*this._boundaryDistanceTolerance))},Vn.prototype.isValidResult=function(e,t){var n=_t.isResultOfOp(t[0],t[1],e),i=t[2]===k.INTERIOR,s=!(n^i);return s||this.reportResult(e,t,n),s},Vn.prototype.getInvalidLocation=function(){return this._invalidLocation},Vn.prototype.interfaces_=function(){return[]},Vn.prototype.getClass=function(){return Vn},Vn.hasLocation=function(e,t){for(var n=0;n<3;n++)if(e[n]===t)return!0;return!1},Vn.computeBoundaryDistanceTolerance=function(e,t){return Math.min(le.computeSizeBasedSnapTolerance(e),le.computeSizeBasedSnapTolerance(t))},Vn.isValid=function(e,t,n,i){var s=new Vn(e,t,i);return s.isValid(n)},Fv.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Vn,Fv);var jn=function r(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=r.extractFactory(e),this._inputGeoms=e};jn.prototype.extractElements=function(e,t){var n=this;if(e===null)return null;for(var i=0;i<e.getNumGeometries();i++){var s=e.getGeometryN(i);n._skipEmpty&&s.isEmpty()||t.add(s)}},jn.prototype.combine=function(){for(var e=this,t=new Y,n=this._inputGeoms.iterator();n.hasNext();){var i=n.next();e.extractElements(i,t)}return t.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(t)},jn.prototype.interfaces_=function(){return[]},jn.prototype.getClass=function(){return jn},jn.combine=function(){if(arguments.length===1){var e=arguments[0],t=new jn(e);return t.combine()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=new jn(jn.createList(n,i));return s.combine()}else if(arguments.length===3){var o=arguments[0],a=arguments[1],l=arguments[2],u=new jn(jn.createList(o,a,l));return u.combine()}},jn.extractFactory=function(e){return e.isEmpty()?null:e.iterator().next().getFactory()},jn.createList=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],n=new Y;return n.add(e),n.add(t),n}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new Y;return a.add(i),a.add(s),a.add(o),a}};var fe=function(){this._inputPolys=null,this._geomFactory=null;var e=arguments[0];this._inputPolys=e,this._inputPolys===null&&(this._inputPolys=new Y)},Av={STRTREE_NODE_CAPACITY:{configurable:!0}};fe.prototype.reduceToGeometries=function(e){for(var t=this,n=new Y,i=e.iterator();i.hasNext();){var s=i.next(),o=null;pt(s,ar)?o=t.unionTree(s):s instanceof ht&&(o=s),n.add(o)}return n},fe.prototype.extractByEnvelope=function(e,t,n){for(var i=new Y,s=0;s<t.getNumGeometries();s++){var o=t.getGeometryN(s);o.getEnvelopeInternal().intersects(e)?i.add(o):n.add(o)}return this._geomFactory.buildGeometry(i)},fe.prototype.unionOptimized=function(e,t){var n=e.getEnvelopeInternal(),i=t.getEnvelopeInternal();if(!n.intersects(i)){var s=jn.combine(e,t);return s}if(e.getNumGeometries()<=1&&t.getNumGeometries()<=1)return this.unionActual(e,t);var o=n.intersection(i);return this.unionUsingEnvelopeIntersection(e,t,o)},fe.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var e=new _v(fe.STRTREE_NODE_CAPACITY),t=this._inputPolys.iterator();t.hasNext();){var n=t.next();e.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var i=e.itemsTree(),s=this.unionTree(i);return s},fe.prototype.binaryUnion=function(){if(arguments.length===1){var e=arguments[0];return this.binaryUnion(e,0,e.size())}else if(arguments.length===3){var t=arguments[0],n=arguments[1],i=arguments[2];if(i-n<=1){var s=fe.getGeometry(t,n);return this.unionSafe(s,null)}else{if(i-n===2)return this.unionSafe(fe.getGeometry(t,n),fe.getGeometry(t,n+1));var o=Math.trunc((i+n)/2),a=this.binaryUnion(t,n,o),l=this.binaryUnion(t,o,i);return this.unionSafe(a,l)}}},fe.prototype.repeatedUnion=function(e){for(var t=null,n=e.iterator();n.hasNext();){var i=n.next();t===null?t=i.copy():t=t.union(i)}return t},fe.prototype.unionSafe=function(e,t){return e===null&&t===null?null:e===null?t.copy():t===null?e.copy():this.unionOptimized(e,t)},fe.prototype.unionActual=function(e,t){return fe.restrictToPolygons(e.union(t))},fe.prototype.unionTree=function(e){var t=this.reduceToGeometries(e),n=this.binaryUnion(t);return n},fe.prototype.unionUsingEnvelopeIntersection=function(e,t,n){var i=new Y,s=this.extractByEnvelope(n,e,i),o=this.extractByEnvelope(n,t,i),a=this.unionActual(s,o);i.add(a);var l=jn.combine(i);return l},fe.prototype.bufferUnion=function(){if(arguments.length===1){var e=arguments[0],t=e.get(0).getFactory(),n=t.buildGeometry(e),i=n.buffer(0);return i}else if(arguments.length===2){var s=arguments[0],o=arguments[1],a=s.getFactory(),l=a.createGeometryCollection([s,o]),u=l.buffer(0);return u}},fe.prototype.interfaces_=function(){return[]},fe.prototype.getClass=function(){return fe},fe.restrictToPolygons=function(e){if(pt(e,ds))return e;var t=Ui.getPolygons(e);return t.size()===1?t.get(0):e.getFactory().createMultiPolygon(bt.toPolygonArray(t))},fe.getGeometry=function(e,t){return t>=e.size()?null:e.get(t)},fe.union=function(e){var t=new fe(e);return t.union()},Av.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(fe,Av);var Gc=function(){};Gc.prototype.interfaces_=function(){return[]},Gc.prototype.getClass=function(){return Gc},Gc.union=function(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return _t.createEmptyResult(_t.UNION,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),sn.overlayOp(e,t,_t.UNION)};function Zs(){return new Wc}function Wc(){this.reset()}Wc.prototype={constructor:Wc,reset:function(){this.s=this.t=0},add:function(r){kv(Hc,r,this.t),kv(this,Hc.s,this.s),this.s?this.t+=Hc.t:this.s=Hc.t},valueOf:function(){return this.s}};var Hc=new Wc;function kv(r,e,t){var n=r.s=e+t,i=n-e,s=n-i;r.t=e-s+(t-i)}var re=1e-6,Wt=Math.PI,Gi=Wt/2,Vv=Wt/4,Wi=Wt*2,Qs=180/Wt,zr=Wt/180,on=Math.abs,VC=Math.atan,el=Math.atan2,_e=Math.cos,we=Math.sin,nl=Math.sqrt;function jv(r){return r>1?0:r<-1?Wt:Math.acos(r)}function Ho(r){return r>1?Gi:r<-1?-Gi:Math.asin(r)}function Ru(){}function qc(r,e){r&&zv.hasOwnProperty(r.type)&&zv[r.type](r,e)}var Bv={Feature:function(r,e){qc(r.geometry,e)},FeatureCollection:function(r,e){for(var t=r.features,n=-1,i=t.length;++n<i;)qc(t[n].geometry,e)}},zv={Sphere:function(r,e){e.sphere()},Point:function(r,e){r=r.coordinates,e.point(r[0],r[1],r[2])},MultiPoint:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)r=t[n],e.point(r[0],r[1],r[2])},LineString:function(r,e){nf(r.coordinates,e,0)},MultiLineString:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)nf(t[n],e,0)},Polygon:function(r,e){Uv(r.coordinates,e)},MultiPolygon:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)Uv(t[n],e)},GeometryCollection:function(r,e){for(var t=r.geometries,n=-1,i=t.length;++n<i;)qc(t[n],e)}};function nf(r,e,t){var n=-1,i=r.length-t,s;for(e.lineStart();++n<i;)s=r[n],e.point(s[0],s[1],s[2]);e.lineEnd()}function Uv(r,e){var t=-1,n=r.length;for(e.polygonStart();++t<n;)nf(r[t],e,1);e.polygonEnd()}function jC(r,e){r&&Bv.hasOwnProperty(r.type)?Bv[r.type](r,e):qc(r,e)}Zs(),Zs();function rf(r){return[el(r[1],r[0]),Ho(r[2])]}function rl(r){var e=r[0],t=r[1],n=_e(t);return[n*_e(e),n*we(e),we(t)]}function Xc(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function Yc(r,e){return[r[1]*e[2]-r[2]*e[1],r[2]*e[0]-r[0]*e[2],r[0]*e[1]-r[1]*e[0]]}function sf(r,e){r[0]+=e[0],r[1]+=e[1],r[2]+=e[2]}function Jc(r,e){return[r[0]*e,r[1]*e,r[2]*e]}function of(r){var e=nl(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);r[0]/=e,r[1]/=e,r[2]/=e}Zs();function Gv(r,e){function t(n,i){return n=r(n,i),e(n[0],n[1])}return r.invert&&e.invert&&(t.invert=function(n,i){return n=e.invert(n,i),n&&r.invert(n[0],n[1])}),t}function af(r,e){return[r>Wt?r-Wi:r<-Wt?r+Wi:r,e]}af.invert=af;function BC(r,e,t){return(r%=Wi)?e||t?Gv(Hv(r),qv(e,t)):Hv(r):e||t?qv(e,t):af}function Wv(r){return function(e,t){return e+=r,[e>Wt?e-Wi:e<-Wt?e+Wi:e,t]}}function Hv(r){var e=Wv(r);return e.invert=Wv(-r),e}function qv(r,e){var t=_e(r),n=we(r),i=_e(e),s=we(e);function o(a,l){var u=_e(l),c=_e(a)*u,d=we(a)*u,f=we(l),p=f*t+c*n;return[el(d*i-p*s,c*t-f*n),Ho(p*i+d*s)]}return o.invert=function(a,l){var u=_e(l),c=_e(a)*u,d=we(a)*u,f=we(l),p=f*i-d*s;return[el(d*i+f*s,c*t+p*n),Ho(p*t-c*n)]},o}function zC(r,e,t,n,i,s){if(t){var o=_e(e),a=we(e),l=n*t;i==null?(i=e+n*Wi,s=e-l/2):(i=Xv(o,i),s=Xv(o,s),(n>0?i<s:i>s)&&(i+=n*Wi));for(var u,c=i;n>0?c>s:c<s;c-=l)u=rf([o,-a*_e(c),-a*we(c)]),r.point(u[0],u[1])}}function Xv(r,e){e=rl(e),e[0]-=r,of(e);var t=jv(-e[1]);return((-e[2]<0?-t:t)+Wi-re)%Wi}function Yv(){var r=[],e;return{point:function(t,n){e.push([t,n])},lineStart:function(){r.push(e=[])},lineEnd:Ru,rejoin:function(){r.length>1&&r.push(r.pop().concat(r.shift()))},result:function(){var t=r;return r=[],e=null,t}}}function UC(r,e,t,n,i,s){var o=r[0],a=r[1],l=e[0],u=e[1],c=0,d=1,f=l-o,p=u-a,_;if(_=t-o,!(!f&&_>0)){if(_/=f,f<0){if(_<c)return;_<d&&(d=_)}else if(f>0){if(_>d)return;_>c&&(c=_)}if(_=i-o,!(!f&&_<0)){if(_/=f,f<0){if(_>d)return;_>c&&(c=_)}else if(f>0){if(_<c)return;_<d&&(d=_)}if(_=n-a,!(!p&&_>0)){if(_/=p,p<0){if(_<c)return;_<d&&(d=_)}else if(p>0){if(_>d)return;_>c&&(c=_)}if(_=s-a,!(!p&&_<0)){if(_/=p,p<0){if(_>d)return;_>c&&(c=_)}else if(p>0){if(_<c)return;_<d&&(d=_)}return c>0&&(r[0]=o+c*f,r[1]=a+c*p),d<1&&(e[0]=o+d*f,e[1]=a+d*p),!0}}}}}function $c(r,e){return on(r[0]-e[0])<re&&on(r[1]-e[1])<re}function Kc(r,e,t,n){this.x=r,this.z=e,this.o=t,this.e=n,this.v=!1,this.n=this.p=null}function Jv(r,e,t,n,i){var s=[],o=[],a,l;if(r.forEach(function(_){if(!((S=_.length-1)<=0)){var S,b=_[0],I=_[S],m;if($c(b,I)){for(i.lineStart(),a=0;a<S;++a)i.point((b=_[a])[0],b[1]);i.lineEnd();return}s.push(m=new Kc(b,_,null,!0)),o.push(m.o=new Kc(b,null,m,!1)),s.push(m=new Kc(I,_,null,!1)),o.push(m.o=new Kc(I,null,m,!0))}}),!!s.length){for(o.sort(e),$v(s),$v(o),a=0,l=o.length;a<l;++a)o[a].e=t=!t;for(var u=s[0],c,d;;){for(var f=u,p=!0;f.v;)if((f=f.n)===u)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(a=0,l=c.length;a<l;++a)i.point((d=c[a])[0],d[1]);else n(f.x,f.n.x,1,i);f=f.n}else{if(p)for(c=f.p.z,a=c.length-1;a>=0;--a)i.point((d=c[a])[0],d[1]);else n(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,p=!p}while(!f.v);i.lineEnd()}}}function $v(r){if(e=r.length){for(var e,t=0,n=r[0],i;++t<e;)n.n=i=r[t],i.p=n,n=i;n.n=i=r[0],i.p=n}}function Kv(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function GC(r){return r.length===1&&(r=WC(r)),{left:function(e,t,n,i){for(n==null&&(n=0),i==null&&(i=e.length);n<i;){var s=n+i>>>1;r(e[s],t)<0?n=s+1:i=s}return n},right:function(e,t,n,i){for(n==null&&(n=0),i==null&&(i=e.length);n<i;){var s=n+i>>>1;r(e[s],t)>0?i=s:n=s+1}return n}}}function WC(r){return function(e,t){return Kv(r(e),t)}}GC(Kv);function Zv(r){for(var e=r.length,t,n=-1,i=0,s,o;++n<e;)i+=r[n].length;for(s=new Array(i);--e>=0;)for(o=r[e],t=o.length;--t>=0;)s[--i]=o[t];return s}var Lu=1e9,Zc=-Lu;function HC(r,e,t,n){function i(u,c){return r<=u&&u<=t&&e<=c&&c<=n}function s(u,c,d,f){var p=0,_=0;if(u==null||(p=o(u,d))!==(_=o(c,d))||l(u,c)<0^d>0)do f.point(p===0||p===3?r:t,p>1?n:e);while((p=(p+d+4)%4)!==_);else f.point(c[0],c[1])}function o(u,c){return on(u[0]-r)<re?c>0?0:3:on(u[0]-t)<re?c>0?2:1:on(u[1]-e)<re?c>0?1:0:c>0?3:2}function a(u,c){return l(u.x,c.x)}function l(u,c){var d=o(u,1),f=o(c,1);return d!==f?d-f:d===0?c[1]-u[1]:d===1?u[0]-c[0]:d===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,d=Yv(),f,p,_,S,b,I,m,w,g,y,E,C={point:P,lineStart:R,lineEnd:L,polygonStart:x,polygonEnd:D};function P(B,j){i(B,j)&&c.point(B,j)}function T(){for(var B=0,j=0,H=p.length;j<H;++j)for(var nt=p[j],at=1,K=nt.length,J=nt[0],Q,mt,Ft=J[0],Ot=J[1];at<K;++at)Q=Ft,mt=Ot,J=nt[at],Ft=J[0],Ot=J[1],mt<=n?Ot>n&&(Ft-Q)*(n-mt)>(Ot-mt)*(r-Q)&&++B:Ot<=n&&(Ft-Q)*(n-mt)<(Ot-mt)*(r-Q)&&--B;return B}function x(){c=d,f=[],p=[],E=!0}function D(){var B=T(),j=E&&B,H=(f=Zv(f)).length;(j||H)&&(u.polygonStart(),j&&(u.lineStart(),s(null,null,1,u),u.lineEnd()),H&&Jv(f,a,B,s,u),u.polygonEnd()),c=u,f=p=_=null}function R(){C.point=O,p&&p.push(_=[]),y=!0,g=!1,m=w=NaN}function L(){f&&(O(S,b),I&&g&&d.rejoin(),f.push(d.result())),C.point=P,g&&c.lineEnd()}function O(B,j){var H=i(B,j);if(p&&_.push([B,j]),y)S=B,b=j,I=H,y=!1,H&&(c.lineStart(),c.point(B,j));else if(H&&g)c.point(B,j);else{var nt=[m=Math.max(Zc,Math.min(Lu,m)),w=Math.max(Zc,Math.min(Lu,w))],at=[B=Math.max(Zc,Math.min(Lu,B)),j=Math.max(Zc,Math.min(Lu,j))];UC(nt,at,r,e,t,n)?(g||(c.lineStart(),c.point(nt[0],nt[1])),c.point(at[0],at[1]),H||c.lineEnd(),E=!1):H&&(c.lineStart(),c.point(B,j),E=!1)}m=B,w=j,g=H}return C}}var lf=Zs();function qC(r,e){var t=e[0],n=e[1],i=[we(t),-_e(t),0],s=0,o=0;lf.reset();for(var a=0,l=r.length;a<l;++a)if(c=(u=r[a]).length)for(var u,c,d=u[c-1],f=d[0],p=d[1]/2+Vv,_=we(p),S=_e(p),b=0;b<c;++b,f=m,_=g,S=y,d=I){var I=u[b],m=I[0],w=I[1]/2+Vv,g=we(w),y=_e(w),E=m-f,C=E>=0?1:-1,P=C*E,T=P>Wt,x=_*g;if(lf.add(el(x*C*we(P),S*y+x*_e(P))),s+=T?E+C*Wi:E,T^f>=t^m>=t){var D=Yc(rl(d),rl(I));of(D);var R=Yc(i,D);of(R);var L=(T^E>=0?-1:1)*Ho(R[2]);(n>L||n===L&&(D[0]||D[1]))&&(o+=T^E>=0?1:-1)}}return(s<-re||s<re&&lf<-re)^o&1}Zs();function Qv(r){return r}Zs(),Zs();var il=1/0,Qc=il,Fu=-il,th=Fu,ty={point:XC,lineStart:Ru,lineEnd:Ru,polygonStart:Ru,polygonEnd:Ru,result:function(){var r=[[il,Qc],[Fu,th]];return Fu=th=-(Qc=il=1/0),r}};function XC(r,e){r<il&&(il=r),r>Fu&&(Fu=r),e<Qc&&(Qc=e),e>th&&(th=e)}Zs();function ey(r,e,t,n){return function(i,s){var o=e(s),a=i.invert(n[0],n[1]),l=Yv(),u=e(l),c=!1,d,f,p,_={point:S,lineStart:I,lineEnd:m,polygonStart:function(){_.point=w,_.lineStart=g,_.lineEnd=y,f=[],d=[]},polygonEnd:function(){_.point=S,_.lineStart=I,_.lineEnd=m,f=Zv(f);var E=qC(d,a);f.length?(c||(s.polygonStart(),c=!0),Jv(f,JC,E,t,s)):E&&(c||(s.polygonStart(),c=!0),s.lineStart(),t(null,null,1,s),s.lineEnd()),c&&(s.polygonEnd(),c=!1),f=d=null},sphere:function(){s.polygonStart(),s.lineStart(),t(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function S(E,C){var P=i(E,C);r(E=P[0],C=P[1])&&s.point(E,C)}function b(E,C){var P=i(E,C);o.point(P[0],P[1])}function I(){_.point=b,o.lineStart()}function m(){_.point=S,o.lineEnd()}function w(E,C){p.push([E,C]);var P=i(E,C);u.point(P[0],P[1])}function g(){u.lineStart(),p=[]}function y(){w(p[0][0],p[0][1]),u.lineEnd();var E=u.clean(),C=l.result(),P,T=C.length,x,D,R;if(p.pop(),d.push(p),p=null,!!T){if(E&1){if(D=C[0],(x=D.length-1)>0){for(c||(s.polygonStart(),c=!0),s.lineStart(),P=0;P<x;++P)s.point((R=D[P])[0],R[1]);s.lineEnd()}return}T>1&&E&2&&C.push(C.pop().concat(C.shift())),f.push(C.filter(YC))}}return _}}function YC(r){return r.length>1}function JC(r,e){return((r=r.x)[0]<0?r[1]-Gi-re:Gi-r[1])-((e=e.x)[0]<0?e[1]-Gi-re:Gi-e[1])}const ny=ey(function(){return!0},$C,ZC,[-Wt,-Gi]);function $C(r){var e=NaN,t=NaN,n=NaN,i;return{lineStart:function(){r.lineStart(),i=1},point:function(s,o){var a=s>0?Wt:-Wt,l=on(s-e);on(l-Wt)<re?(r.point(e,t=(t+o)/2>0?Gi:-Gi),r.point(n,t),r.lineEnd(),r.lineStart(),r.point(a,t),r.point(s,t),i=0):n!==a&&l>=Wt&&(on(e-n)<re&&(e-=n*re),on(s-a)<re&&(s-=a*re),t=KC(e,t,s,o),r.point(n,t),r.lineEnd(),r.lineStart(),r.point(a,t),i=0),r.point(e=s,t=o),n=a},lineEnd:function(){r.lineEnd(),e=t=NaN},clean:function(){return 2-i}}}function KC(r,e,t,n){var i,s,o=we(r-t);return on(o)>re?VC((we(e)*(s=_e(n))*we(t)-we(n)*(i=_e(e))*we(r))/(i*s*o)):(e+n)/2}function ZC(r,e,t,n){var i;if(r==null)i=t*Gi,n.point(-Wt,i),n.point(0,i),n.point(Wt,i),n.point(Wt,0),n.point(Wt,-i),n.point(0,-i),n.point(-Wt,-i),n.point(-Wt,0),n.point(-Wt,i);else if(on(r[0]-e[0])>re){var s=r[0]<e[0]?Wt:-Wt;i=t*s/2,n.point(-s,i),n.point(0,i),n.point(s,i)}else n.point(e[0],e[1])}function QC(r,e){var t=_e(r),n=t>0,i=on(t)>re;function s(c,d,f,p){zC(p,r,e,f,c,d)}function o(c,d){return _e(c)*_e(d)>t}function a(c){var d,f,p,_,S;return{lineStart:function(){_=p=!1,S=1},point:function(b,I){var m=[b,I],w,g=o(b,I),y=n?g?0:u(b,I):g?u(b+(b<0?Wt:-Wt),I):0;if(!d&&(_=p=g)&&c.lineStart(),g!==p&&(w=l(d,m),(!w||$c(d,w)||$c(m,w))&&(m[0]+=re,m[1]+=re,g=o(m[0],m[1]))),g!==p)S=0,g?(c.lineStart(),w=l(m,d),c.point(w[0],w[1])):(w=l(d,m),c.point(w[0],w[1]),c.lineEnd()),d=w;else if(i&&d&&n^g){var E;!(y&f)&&(E=l(m,d,!0))&&(S=0,n?(c.lineStart(),c.point(E[0][0],E[0][1]),c.point(E[1][0],E[1][1]),c.lineEnd()):(c.point(E[1][0],E[1][1]),c.lineEnd(),c.lineStart(),c.point(E[0][0],E[0][1])))}g&&(!d||!$c(d,m))&&c.point(m[0],m[1]),d=m,p=g,f=y},lineEnd:function(){p&&c.lineEnd(),d=null},clean:function(){return S|(_&&p)<<1}}}function l(c,d,f){var p=rl(c),_=rl(d),S=[1,0,0],b=Yc(p,_),I=Xc(b,b),m=b[0],w=I-m*m;if(!w)return!f&&c;var g=t*I/w,y=-t*m/w,E=Yc(S,b),C=Jc(S,g),P=Jc(b,y);sf(C,P);var T=E,x=Xc(C,T),D=Xc(T,T),R=x*x-D*(Xc(C,C)-1);if(!(R<0)){var L=nl(R),O=Jc(T,(-x-L)/D);if(sf(O,C),O=rf(O),!f)return O;var B=c[0],j=d[0],H=c[1],nt=d[1],at;j<B&&(at=B,B=j,j=at);var K=j-B,J=on(K-Wt)<re,Q=J||K<re;if(!J&&nt<H&&(at=H,H=nt,nt=at),Q?J?H+nt>0^O[1]<(on(O[0]-B)<re?H:nt):H<=O[1]&&O[1]<=nt:K>Wt^(B<=O[0]&&O[0]<=j)){var mt=Jc(T,(-x+L)/D);return sf(mt,C),[O,rf(mt)]}}}function u(c,d){var f=n?r:Wt-r,p=0;return c<-f?p|=1:c>f&&(p|=2),d<-f?p|=4:d>f&&(p|=8),p}return ey(o,a,s,n?[0,-r]:[-Wt,r-Wt])}function ry(r){return function(e){var t=new uf;for(var n in r)t[n]=r[n];return t.stream=e,t}}function uf(){}uf.prototype={constructor:uf,point:function(r,e){this.stream.point(r,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function iy(r,e,t){var n=e[1][0]-e[0][0],i=e[1][1]-e[0][1],s=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),s!=null&&r.clipExtent(null),jC(t,r.stream(ty));var o=ty.result(),a=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),l=+e[0][0]+(n-a*(o[1][0]+o[0][0]))/2,u=+e[0][1]+(i-a*(o[1][1]+o[0][1]))/2;return s!=null&&r.clipExtent(s),r.scale(a*150).translate([l,u])}function tS(r,e,t){return iy(r,[[0,0],e],t)}var sy=16,eS=_e(30*zr);function oy(r,e){return+e?rS(r,e):nS(r)}function nS(r){return ry({point:function(e,t){e=r(e,t),this.stream.point(e[0],e[1])}})}function rS(r,e){function t(n,i,s,o,a,l,u,c,d,f,p,_,S,b){var I=u-n,m=c-i,w=I*I+m*m;if(w>4*e&&S--){var g=o+f,y=a+p,E=l+_,C=nl(g*g+y*y+E*E),P=Ho(E/=C),T=on(on(E)-1)<re||on(s-d)<re?(s+d)/2:el(y,g),x=r(T,P),D=x[0],R=x[1],L=D-n,O=R-i,B=m*L-I*O;(B*B/w>e||on((I*L+m*O)/w-.5)>.3||o*f+a*p+l*_<eS)&&(t(n,i,s,o,a,l,D,R,T,g/=C,y/=C,E,S,b),b.point(D,R),t(D,R,T,g,y,E,u,c,d,f,p,_,S,b))}}return function(n){var i,s,o,a,l,u,c,d,f,p,_,S,b={point:I,lineStart:m,lineEnd:g,polygonStart:function(){n.polygonStart(),b.lineStart=y},polygonEnd:function(){n.polygonEnd(),b.lineStart=m}};function I(P,T){P=r(P,T),n.point(P[0],P[1])}function m(){d=NaN,b.point=w,n.lineStart()}function w(P,T){var x=rl([P,T]),D=r(P,T);t(d,f,c,p,_,S,d=D[0],f=D[1],c=P,p=x[0],_=x[1],S=x[2],sy,n),n.point(d,f)}function g(){b.point=I,n.lineEnd()}function y(){m(),b.point=E,b.lineEnd=C}function E(P,T){w(i=P,T),s=d,o=f,a=p,l=_,u=S,b.point=w}function C(){t(d,f,c,p,_,S,s,o,i,a,l,u,sy,n),b.lineEnd=g,g()}return b}}var iS=ry({point:function(r,e){this.stream.point(r*zr,e*zr)}});function sS(r){return oS(function(){return r})()}function oS(r){var e,t=150,n=480,i=250,s,o,a=0,l=0,u=0,c=0,d=0,f,p,_=null,S=ny,b=null,I,m,w,g=Qv,y=.5,E=oy(D,y),C,P;function T(O){return O=p(O[0]*zr,O[1]*zr),[O[0]*t+s,o-O[1]*t]}function x(O){return O=p.invert((O[0]-s)/t,(o-O[1])/t),O&&[O[0]*Qs,O[1]*Qs]}function D(O,B){return O=e(O,B),[O[0]*t+s,o-O[1]*t]}T.stream=function(O){return C&&P===O?C:C=iS(S(f,E(g(P=O))))},T.clipAngle=function(O){return arguments.length?(S=+O?QC(_=O*zr,6*zr):(_=null,ny),L()):_*Qs},T.clipExtent=function(O){return arguments.length?(g=O==null?(b=I=m=w=null,Qv):HC(b=+O[0][0],I=+O[0][1],m=+O[1][0],w=+O[1][1]),L()):b==null?null:[[b,I],[m,w]]},T.scale=function(O){return arguments.length?(t=+O,R()):t},T.translate=function(O){return arguments.length?(n=+O[0],i=+O[1],R()):[n,i]},T.center=function(O){return arguments.length?(a=O[0]%360*zr,l=O[1]%360*zr,R()):[a*Qs,l*Qs]},T.rotate=function(O){return arguments.length?(u=O[0]%360*zr,c=O[1]%360*zr,d=O.length>2?O[2]%360*zr:0,R()):[u*Qs,c*Qs,d*Qs]},T.precision=function(O){return arguments.length?(E=oy(D,y=O*O),L()):nl(y)},T.fitExtent=function(O,B){return iy(T,O,B)},T.fitSize=function(O,B){return tS(T,O,B)};function R(){p=Gv(f=BC(u,c,d),e);var O=e(a,l);return s=n-O[0]*t,o=i+O[1]*t,L()}function L(){return C=P=null,T}return function(){return e=r.apply(this,arguments),T.invert=e.invert&&x,R()}}function ay(r){return function(e,t){var n=_e(e),i=_e(t),s=r(n*i);return[s*i*we(e),s*we(t)]}}function ly(r){return function(e,t){var n=nl(e*e+t*t),i=r(n),s=we(i),o=_e(i);return[el(e*s,n*o),Ho(n&&t*s/n)]}}var aS=ay(function(r){return nl(2/(1+r))});aS.invert=ly(function(r){return 2*Ho(r/2)});var uy=ay(function(r){return(r=jv(r))&&r/we(r)});uy.invert=ly(function(r){return r});function lS(){return sS(uy).scale(79.4188).clipAngle(180-.001)}function cy(r,e){return[r,e]}cy.invert=cy;function uS(r,e,t){t=t||{};var n=t.units||"kilometers",i=t.steps||8;if(!r)throw new Error("geojson is required");if(typeof t!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(e===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(r.type){case"GeometryCollection":return Cc(r,function(o){var a=eh(o,e,n,i);a&&s.push(a)}),Da(s);case"FeatureCollection":return Ec(r,function(o){var a=eh(o,e,n,i);a&&Ec(a,function(l){l&&s.push(l)})}),Da(s)}return eh(r,e,n,i)}function eh(r,e,t,n){var i=r.properties||{},s=r.type==="Feature"?r.geometry:r;if(s.type==="GeometryCollection"){var o=[];return Cc(r,function(S){var b=eh(S,e,t,n);b&&o.push(b)}),Da(o)}var a=cS(s),l={type:s.type,coordinates:dy(s.coordinates,a)},u=new qd,c=u.read(l),d=Id(xd(e,t),"meters"),f=Ve.bufferOp(c,d,n),p=new vv;if(f=p.write(f),!hy(f.coordinates)){var _={type:f.type,coordinates:fy(f.coordinates,a)};return Zr(_,i)}}function hy(r){return Array.isArray(r[0])?hy(r[0]):isNaN(r[0])}function dy(r,e){return typeof r[0]!="object"?e(r):r.map(function(t){return dy(t,e)})}function fy(r,e){return typeof r[0]!="object"?e.invert(r):r.map(function(t){return fy(t,e)})}function cS(r){var e=wC(r).geometry.coordinates,t=[-e[0],-e[1]];return lS().rotate(t).scale(an)}function hS(r,e,t){t===void 0&&(t={});for(var n=t.steps||64,i=t.properties?t.properties:!Array.isArray(r)&&r.type==="Feature"&&r.properties?r.properties:{},s=[],o=0;o<n;o++)s.push(xo(r,e,o*-360/n,t).geometry.coordinates);return s.push(s[0]),Nn([s],i)}class to{constructor(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null}}function dS(r,e){return r>e?1:r<e?-1:0}function eo(r,e,t){const n=new to(null,null);let i=n,s=n;for(;;){const o=t(r,e.key);if(o<0){if(e.left===null)break;if(t(r,e.left.key)<0){const a=e.left;if(e.left=a.right,a.right=e,e=a,e.left===null)break}s.left=e,s=e,e=e.left}else if(o>0){if(e.right===null)break;if(t(r,e.right.key)>0){const a=e.right;if(e.right=a.left,a.left=e,e=a,e.right===null)break}i.right=e,i=e,e=e.right}else break}return i.right=e.left,s.left=e.right,e.left=n.right,e.right=n.left,e}function cf(r,e,t,n){const i=new to(r,e);if(t===null)return i.left=i.right=null,i;t=eo(r,t,n);const s=n(r,t.key);return s<0?(i.left=t.left,i.right=t,t.left=null):s>=0&&(i.right=t.right,i.left=t,t.right=null),i}function py(r,e,t){let n=null,i=null;if(e){e=eo(r,e,t);const s=t(e.key,r);s===0?(n=e.left,i=e.right):s<0?(i=e.right,e.right=null,n=e):(n=e.left,e.left=null,i=e)}return{left:n,right:i}}function fS(r,e,t){return e===null?r:(r===null||(e=eo(r.key,e,t),e.left=r),e)}function hf(r,e,t,n,i){if(r){n(`${e}${t?"└── ":"├── "}${i(r)}
45
- `);const s=e+(t?" ":"│ ");r.left&&hf(r.left,s,!1,n,i),r.right&&hf(r.right,s,!0,n,i)}}class df{constructor(e=dS){this._root=null,this._size=0,this._comparator=e}insert(e,t){return this._size++,this._root=cf(e,t,this._root,this._comparator)}add(e,t){const n=new to(e,t);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);const i=this._comparator,s=eo(e,this._root,i),o=i(e,s.key);return o===0?this._root=s:(o<0?(n.left=s.left,n.right=s,s.left=null):o>0&&(n.right=s.right,n.left=s,s.right=null),this._size++,this._root=n),this._root}remove(e){this._root=this._remove(e,this._root,this._comparator)}_remove(e,t,n){let i;return t===null?null:(t=eo(e,t,n),n(e,t.key)===0?(t.left===null?i=t.right:(i=eo(e,t.left,n),i.right=t.right),this._size--,i):t)}pop(){let e=this._root;if(e){for(;e.left;)e=e.left;return this._root=eo(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null}findStatic(e){let t=this._root;const n=this._comparator;for(;t;){const i=n(e,t.key);if(i===0)return t;i<0?t=t.left:t=t.right}return null}find(e){return this._root&&(this._root=eo(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root}contains(e){let t=this._root;const n=this._comparator;for(;t;){const i=n(e,t.key);if(i===0)return!0;i<0?t=t.left:t=t.right}return!1}forEach(e,t){let n=this._root;const i=[];let s=!1;for(;!s;)n!==null?(i.push(n),n=n.left):i.length!==0?(n=i.pop(),e.call(t,n),n=n.right):s=!0;return this}range(e,t,n,i){const s=[],o=this._comparator;let a=this._root,l;for(;s.length!==0||a;)if(a)s.push(a),a=a.left;else{if(a=s.pop(),l=o(a.key,t),l>0)break;if(o(a.key,e)>=0&&n.call(i,a))return this;a=a.right}return this}keys(){const e=[];return this.forEach(({key:t})=>{e.push(t)}),e}values(){const e=[];return this.forEach(({data:t})=>{e.push(t)}),e}min(){return this._root?this.minNode(this._root).key:null}max(){return this._root?this.maxNode(this._root).key:null}minNode(e=this._root){if(e)for(;e.left;)e=e.left;return e}maxNode(e=this._root){if(e)for(;e.right;)e=e.right;return e}at(e){let t=this._root,n=!1,i=0;const s=[];for(;!n;)if(t)s.push(t),t=t.left;else if(s.length>0){if(t=s.pop(),i===e)return t;i++,t=t.right}else n=!0;return null}next(e){let t=this._root,n=null;if(e.right){for(n=e.right;n.left;)n=n.left;return n}const i=this._comparator;for(;t;){const s=i(e.key,t.key);if(s===0)break;s<0?(n=t,t=t.left):t=t.right}return n}prev(e){let t=this._root,n=null;if(e.left!==null){for(n=e.left;n.right;)n=n.right;return n}const i=this._comparator;for(;t;){const s=i(e.key,t.key);if(s===0)break;s<0?t=t.left:(n=t,t=t.right)}return n}clear(){return this._root=null,this._size=0,this}toList(){return gS(this._root)}load(e,t=[],n=!1){let i=e.length;const s=this._comparator;if(n&&gf(e,t,0,i-1,s),this._root===null)this._root=ff(e,t,0,i),this._size=i;else{const o=mS(this.toList(),pS(e,t),s);i=this._size+i,this._root=pf({head:o},0,i)}return this}isEmpty(){return this._root===null}get size(){return this._size}get root(){return this._root}toString(e=t=>String(t.key)){const t=[];return hf(this._root,"",!0,n=>t.push(n),e),t.join("")}update(e,t,n){const i=this._comparator;let{left:s,right:o}=py(e,this._root,i);i(e,t)<0?o=cf(t,n,o,i):s=cf(t,n,s,i),this._root=fS(s,o,i)}split(e){return py(e,this._root,this._comparator)}*[Symbol.iterator](){let e=this._root;const t=[];let n=!1;for(;!n;)e!==null?(t.push(e),e=e.left):t.length!==0?(e=t.pop(),yield e,e=e.right):n=!0}}function ff(r,e,t,n){const i=n-t;if(i>0){const s=t+Math.floor(i/2),o=r[s],a=e[s],l=new to(o,a);return l.left=ff(r,e,t,s),l.right=ff(r,e,s+1,n),l}return null}function pS(r,e){const t=new to(null,null);let n=t;for(let i=0;i<r.length;i++)n=n.next=new to(r[i],e[i]);return n.next=null,t.next}function gS(r){let e=r;const t=[];let n=!1;const i=new to(null,null);let s=i;for(;!n;)e?(t.push(e),e=e.left):t.length>0?(e=s=s.next=t.pop(),e=e.right):n=!0;return s.next=null,i.next}function pf(r,e,t){const n=t-e;if(n>0){const i=e+Math.floor(n/2),s=pf(r,e,i),o=r.head;return o.left=s,r.head=r.head.next,o.right=pf(r,i+1,t),o}return null}function mS(r,e,t){const n=new to(null,null);let i=n,s=r,o=e;for(;s!==null&&o!==null;)t(s.key,o.key)<0?(i.next=s,s=s.next):(i.next=o,o=o.next),i=i.next;return s!==null?i.next=s:o!==null&&(i.next=o),n.next}function gf(r,e,t,n,i){if(t>=n)return;const s=r[t+n>>1];let o=t-1,a=n+1;for(;;){do o++;while(i(r[o],s)<0);do a--;while(i(r[a],s)>0);if(o>=a)break;let l=r[o];r[o]=r[a],r[a]=l,l=e[o],e[o]=e[a],e[a]=l}gf(r,e,t,a,i),gf(r,e,a+1,n,i)}const Ss=11102230246251565e-32,Sn=134217729,vS=(3+8*Ss)*Ss;function mf(r,e,t,n,i){let s,o,a,l,u=e[0],c=n[0],d=0,f=0;c>u==c>-u?(s=u,u=e[++d]):(s=c,c=n[++f]);let p=0;if(d<r&&f<t)for(c>u==c>-u?(o=u+s,a=s-(o-u),u=e[++d]):(o=c+s,a=s-(o-c),c=n[++f]),s=o,a!==0&&(i[p++]=a);d<r&&f<t;)c>u==c>-u?(o=s+u,l=o-s,a=s-(o-l)+(u-l),u=e[++d]):(o=s+c,l=o-s,a=s-(o-l)+(c-l),c=n[++f]),s=o,a!==0&&(i[p++]=a);for(;d<r;)o=s+u,l=o-s,a=s-(o-l)+(u-l),u=e[++d],s=o,a!==0&&(i[p++]=a);for(;f<t;)o=s+c,l=o-s,a=s-(o-l)+(c-l),c=n[++f],s=o,a!==0&&(i[p++]=a);return(s!==0||p===0)&&(i[p++]=s),p}function yS(r,e){let t=e[0];for(let n=1;n<r;n++)t+=e[n];return t}function Au(r){return new Float64Array(r)}const _S=(3+16*Ss)*Ss,wS=(2+12*Ss)*Ss,ES=(9+64*Ss)*Ss*Ss,sl=Au(4),gy=Au(8),my=Au(12),vy=Au(16),Bn=Au(4);function CS(r,e,t,n,i,s,o){let a,l,u,c,d,f,p,_,S,b,I,m,w,g,y,E,C,P;const T=r-i,x=t-i,D=e-s,R=n-s;g=T*R,f=Sn*T,p=f-(f-T),_=T-p,f=Sn*R,S=f-(f-R),b=R-S,y=_*b-(g-p*S-_*S-p*b),E=D*x,f=Sn*D,p=f-(f-D),_=D-p,f=Sn*x,S=f-(f-x),b=x-S,C=_*b-(E-p*S-_*S-p*b),I=y-C,d=y-I,sl[0]=y-(I+d)+(d-C),m=g+I,d=m-g,w=g-(m-d)+(I-d),I=w-E,d=w-I,sl[1]=w-(I+d)+(d-E),P=m+I,d=P-m,sl[2]=m-(P-d)+(I-d),sl[3]=P;let L=yS(4,sl),O=wS*o;if(L>=O||-L>=O||(d=r-T,a=r-(T+d)+(d-i),d=t-x,u=t-(x+d)+(d-i),d=e-D,l=e-(D+d)+(d-s),d=n-R,c=n-(R+d)+(d-s),a===0&&l===0&&u===0&&c===0)||(O=ES*o+vS*Math.abs(L),L+=T*c+R*a-(D*u+x*l),L>=O||-L>=O))return L;g=a*R,f=Sn*a,p=f-(f-a),_=a-p,f=Sn*R,S=f-(f-R),b=R-S,y=_*b-(g-p*S-_*S-p*b),E=l*x,f=Sn*l,p=f-(f-l),_=l-p,f=Sn*x,S=f-(f-x),b=x-S,C=_*b-(E-p*S-_*S-p*b),I=y-C,d=y-I,Bn[0]=y-(I+d)+(d-C),m=g+I,d=m-g,w=g-(m-d)+(I-d),I=w-E,d=w-I,Bn[1]=w-(I+d)+(d-E),P=m+I,d=P-m,Bn[2]=m-(P-d)+(I-d),Bn[3]=P;const B=mf(4,sl,4,Bn,gy);g=T*c,f=Sn*T,p=f-(f-T),_=T-p,f=Sn*c,S=f-(f-c),b=c-S,y=_*b-(g-p*S-_*S-p*b),E=D*u,f=Sn*D,p=f-(f-D),_=D-p,f=Sn*u,S=f-(f-u),b=u-S,C=_*b-(E-p*S-_*S-p*b),I=y-C,d=y-I,Bn[0]=y-(I+d)+(d-C),m=g+I,d=m-g,w=g-(m-d)+(I-d),I=w-E,d=w-I,Bn[1]=w-(I+d)+(d-E),P=m+I,d=P-m,Bn[2]=m-(P-d)+(I-d),Bn[3]=P;const j=mf(B,gy,4,Bn,my);g=a*c,f=Sn*a,p=f-(f-a),_=a-p,f=Sn*c,S=f-(f-c),b=c-S,y=_*b-(g-p*S-_*S-p*b),E=l*u,f=Sn*l,p=f-(f-l),_=l-p,f=Sn*u,S=f-(f-u),b=u-S,C=_*b-(E-p*S-_*S-p*b),I=y-C,d=y-I,Bn[0]=y-(I+d)+(d-C),m=g+I,d=m-g,w=g-(m-d)+(I-d),I=w-E,d=w-I,Bn[1]=w-(I+d)+(d-E),P=m+I,d=P-m,Bn[2]=m-(P-d)+(I-d),Bn[3]=P;const H=mf(j,my,4,Bn,vy);return vy[H-1]}function SS(r,e,t,n,i,s){const o=(e-s)*(t-i),a=(r-i)*(n-s),l=o-a,u=Math.abs(o+a);return Math.abs(l)>=_S*u?l:-CS(r,e,t,n,i,s,u)}const ku=(r,e)=>r.ll.x<=e.x&&e.x<=r.ur.x&&r.ll.y<=e.y&&e.y<=r.ur.y,vf=(r,e)=>{if(e.ur.x<r.ll.x||r.ur.x<e.ll.x||e.ur.y<r.ll.y||r.ur.y<e.ll.y)return null;const t=r.ll.x<e.ll.x?e.ll.x:r.ll.x,n=r.ur.x<e.ur.x?r.ur.x:e.ur.x,i=r.ll.y<e.ll.y?e.ll.y:r.ll.y,s=r.ur.y<e.ur.y?r.ur.y:e.ur.y;return{ll:{x:t,y:i},ur:{x:n,y:s}}};let no=Number.EPSILON;no===void 0&&(no=Math.pow(2,-52));const bS=no*no,yy=(r,e)=>{if(-no<r&&r<no&&-no<e&&e<no)return 0;const t=r-e;return t*t<bS*r*e?0:r<e?-1:1};class PS{constructor(){this.reset()}reset(){this.xRounder=new _y,this.yRounder=new _y}round(e,t){return{x:this.xRounder.round(e),y:this.yRounder.round(t)}}}class _y{constructor(){this.tree=new df,this.round(0)}round(e){const t=this.tree.add(e),n=this.tree.prev(t);if(n!==null&&yy(t.key,n.key)===0)return this.tree.remove(e),n.key;const i=this.tree.next(t);return i!==null&&yy(t.key,i.key)===0?(this.tree.remove(e),i.key):e}}const Vu=new PS,nh=(r,e)=>r.x*e.y-r.y*e.x,wy=(r,e)=>r.x*e.x+r.y*e.y,Ey=(r,e,t)=>{const n=SS(r.x,r.y,e.x,e.y,t.x,t.y);return n>0?-1:n<0?1:0},rh=r=>Math.sqrt(wy(r,r)),IS=(r,e,t)=>{const n={x:e.x-r.x,y:e.y-r.y},i={x:t.x-r.x,y:t.y-r.y};return nh(i,n)/rh(i)/rh(n)},xS=(r,e,t)=>{const n={x:e.x-r.x,y:e.y-r.y},i={x:t.x-r.x,y:t.y-r.y};return wy(i,n)/rh(i)/rh(n)},Cy=(r,e,t)=>e.y===0?null:{x:r.x+e.x/e.y*(t-r.y),y:t},Sy=(r,e,t)=>e.x===0?null:{x:t,y:r.y+e.y/e.x*(t-r.x)},TS=(r,e,t,n)=>{if(e.x===0)return Sy(t,n,r.x);if(n.x===0)return Sy(r,e,t.x);if(e.y===0)return Cy(t,n,r.y);if(n.y===0)return Cy(r,e,t.y);const i=nh(e,n);if(i==0)return null;const s={x:t.x-r.x,y:t.y-r.y},o=nh(s,e)/i,a=nh(s,n)/i,l=r.x+a*e.x,u=t.x+o*n.x,c=r.y+a*e.y,d=t.y+o*n.y,f=(l+u)/2,p=(c+d)/2;return{x:f,y:p}};class Ur{static compare(e,t){const n=Ur.comparePoints(e.point,t.point);return n!==0?n:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:ro.compare(e.segment,t.segment))}static comparePoints(e,t){return e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0}constructor(e,t){e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const t=e.point.events;for(let n=0,i=t.length;n<i;n++){const s=t[n];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}checkForConsuming(){const e=this.point.events.length;for(let t=0;t<e;t++){const n=this.point.events[t];if(n.segment.consumedBy===void 0)for(let i=t+1;i<e;i++){const s=this.point.events[i];s.consumedBy===void 0&&n.otherSE.point.events===s.otherSE.point.events&&n.segment.consume(s.segment)}}}getAvailableLinkedEvents(){const e=[];for(let t=0,n=this.point.events.length;t<n;t++){const i=this.point.events[t];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&e.push(i)}return e}getLeftmostComparator(e){const t=new Map,n=i=>{const s=i.otherSE;t.set(i,{sine:IS(this.point,e.point,s.point),cosine:xS(this.point,e.point,s.point)})};return(i,s)=>{t.has(i)||n(i),t.has(s)||n(s);const{sine:o,cosine:a}=t.get(i),{sine:l,cosine:u}=t.get(s);return o>=0&&l>=0?a<u?1:a>u?-1:0:o<0&&l<0?a<u?-1:a>u?1:0:l<o?-1:l>o?1:0}}}let OS=0;class ro{static compare(e,t){const n=e.leftSE.point.x,i=t.leftSE.point.x,s=e.rightSE.point.x,o=t.rightSE.point.x;if(o<n)return 1;if(s<i)return-1;const a=e.leftSE.point.y,l=t.leftSE.point.y,u=e.rightSE.point.y,c=t.rightSE.point.y;if(n<i){if(l<a&&l<u)return 1;if(l>a&&l>u)return-1;const d=e.comparePoint(t.leftSE.point);if(d<0)return 1;if(d>0)return-1;const f=t.comparePoint(e.rightSE.point);return f!==0?f:-1}if(n>i){if(a<l&&a<c)return-1;if(a>l&&a>c)return 1;const d=t.comparePoint(e.leftSE.point);if(d!==0)return d;const f=e.comparePoint(t.rightSE.point);return f<0?1:f>0?-1:1}if(a<l)return-1;if(a>l)return 1;if(s<o){const d=t.comparePoint(e.rightSE.point);if(d!==0)return d}if(s>o){const d=e.comparePoint(t.rightSE.point);if(d<0)return 1;if(d>0)return-1}if(s!==o){const d=u-a,f=s-n,p=c-l,_=o-i;if(d>f&&p<_)return 1;if(d<f&&p>_)return-1}return s>o?1:s<o||u<c?-1:u>c?1:e.id<t.id?-1:e.id>t.id?1:0}constructor(e,t,n,i){this.id=++OS,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=n,this.windings=i}static fromRing(e,t,n){let i,s,o;const a=Ur.comparePoints(e,t);if(a<0)i=e,s=t,o=1;else if(a>0)i=t,s=e,o=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const l=new Ur(i,!0),u=new Ur(s,!1);return new ro(l,u,[n],[o])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<t?e:t},ur:{x:this.rightSE.point.x,y:e>t?e:t}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}comparePoint(e){if(this.isAnEndpoint(e))return 0;const t=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(t.x===n.x)return e.x===t.x?0:e.x<t.x?1:-1;const s=(e.y-t.y)/i.y,o=t.x+s*i.x;if(e.x===o)return 0;const a=(e.x-t.x)/i.x,l=t.y+a*i.y;return e.y===l?0:e.y<l?-1:1}getIntersection(e){const t=this.bbox(),n=e.bbox(),i=vf(t,n);if(i===null)return null;const s=this.leftSE.point,o=this.rightSE.point,a=e.leftSE.point,l=e.rightSE.point,u=ku(t,a)&&this.comparePoint(a)===0,c=ku(n,s)&&e.comparePoint(s)===0,d=ku(t,l)&&this.comparePoint(l)===0,f=ku(n,o)&&e.comparePoint(o)===0;if(c&&u)return f&&!d?o:!f&&d?l:null;if(c)return d&&s.x===l.x&&s.y===l.y?null:s;if(u)return f&&o.x===a.x&&o.y===a.y?null:a;if(f&&d)return null;if(f)return o;if(d)return l;const p=TS(s,this.vector(),a,e.vector());return p===null||!ku(i,p)?null:Vu.round(p.x,p.y)}split(e){const t=[],n=e.events!==void 0,i=new Ur(e,!0),s=new Ur(e,!1),o=this.rightSE;this.replaceRightSE(s),t.push(s),t.push(i);const a=new ro(i,o,this.rings.slice(),this.windings.slice());return Ur.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),Ur.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),s.checkForConsuming()),t}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,n=this.windings.length;t<n;t++)this.windings[t]*=-1}consume(e){let t=this,n=e;for(;t.consumedBy;)t=t.consumedBy;for(;n.consumedBy;)n=n.consumedBy;const i=ro.compare(t,n);if(i!==0){if(i>0){const s=t;t=n,n=s}if(t.prev===n){const s=t;t=n,n=s}for(let s=0,o=n.rings.length;s<o;s++){const a=n.rings[s],l=n.windings[s],u=t.rings.indexOf(a);u===-1?(t.rings.push(a),t.windings.push(l)):t.windings[u]+=l}n.rings=null,n.windings=null,n.consumedBy=t,n.leftSE.consumedBy=t.leftSE,n.rightSE.consumedBy=t.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};const t=this._afterState.rings,n=this._afterState.windings,i=this._afterState.multiPolys;for(let a=0,l=this.rings.length;a<l;a++){const u=this.rings[a],c=this.windings[a],d=t.indexOf(u);d===-1?(t.push(u),n.push(c)):n[d]+=c}const s=[],o=[];for(let a=0,l=t.length;a<l;a++){if(n[a]===0)continue;const u=t[a],c=u.poly;if(o.indexOf(c)===-1)if(u.isExterior)s.push(c);else{o.indexOf(c)===-1&&o.push(c);const d=s.indexOf(u.poly);d!==-1&&s.splice(d,1)}}for(let a=0,l=s.length;a<l;a++){const u=s[a].multiPoly;i.indexOf(u)===-1&&i.push(u)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(gi.type){case"union":{const n=e.length===0,i=t.length===0;this._isInResult=n!==i;break}case"intersection":{let n,i;e.length<t.length?(n=e.length,i=t.length):(n=t.length,i=e.length),this._isInResult=i===gi.numMultiPolys&&n<i;break}case"xor":{const n=Math.abs(e.length-t.length);this._isInResult=n%2===1;break}case"difference":{const n=i=>i.length===1&&i[0].isSubject;this._isInResult=n(e)!==n(t);break}default:throw new Error(`Unrecognized operation type found ${gi.type}`)}return this._isInResult}}class by{constructor(e,t,n){if(!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=n,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=Vu.round(e[0][0],e[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let s=i;for(let o=1,a=e.length;o<a;o++){if(typeof e[o][0]!="number"||typeof e[o][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let l=Vu.round(e[o][0],e[o][1]);l.x===s.x&&l.y===s.y||(this.segments.push(ro.fromRing(s,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),s=l)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(ro.fromRing(s,i,this))}getSweepEvents(){const e=[];for(let t=0,n=this.segments.length;t<n;t++){const i=this.segments[t];e.push(i.leftSE),e.push(i.rightSE)}return e}}class DS{constructor(e,t){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new by(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let n=1,i=e.length;n<i;n++){const s=new by(e[n],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=t}getSweepEvents(){const e=this.exteriorRing.getSweepEvents();for(let t=0,n=this.interiorRings.length;t<n;t++){const i=this.interiorRings[t].getSweepEvents();for(let s=0,o=i.length;s<o;s++)e.push(i[s])}return e}}class Py{constructor(e,t){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof e[0][0][0]=="number"&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let n=0,i=e.length;n<i;n++){const s=new DS(e[n],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=t}getSweepEvents(){const e=[];for(let t=0,n=this.polys.length;t<n;t++){const i=this.polys[t].getSweepEvents();for(let s=0,o=i.length;s<o;s++)e.push(i[s])}return e}}class ih{static factory(e){const t=[];for(let n=0,i=e.length;n<i;n++){const s=e[n];if(!s.isInResult()||s.ringOut)continue;let o=null,a=s.leftSE,l=s.rightSE;const u=[a],c=a.point,d=[];for(;o=a,a=l,u.push(a),a.point!==c;)for(;;){const f=a.getAvailableLinkedEvents();if(f.length===0){const S=u[0].point,b=u[u.length-1].point;throw new Error(`Unable to complete output ring starting at [${S.x}, ${S.y}]. Last matching segment found ends at [${b.x}, ${b.y}].`)}if(f.length===1){l=f[0].otherSE;break}let p=null;for(let S=0,b=d.length;S<b;S++)if(d[S].point===a.point){p=S;break}if(p!==null){const S=d.splice(p)[0],b=u.splice(S.index);b.unshift(b[0].otherSE),t.push(new ih(b.reverse()));continue}d.push({index:u.length,point:a.point});const _=a.getLeftmostComparator(o);l=f.sort(_)[0].otherSE;break}t.push(new ih(u))}return t}constructor(e){this.events=e;for(let t=0,n=e.length;t<n;t++)e[t].segment.ringOut=this;this.poly=null}getGeom(){let e=this.events[0].point;const t=[e];for(let u=1,c=this.events.length-1;u<c;u++){const d=this.events[u].point,f=this.events[u+1].point;Ey(d,e,f)!==0&&(t.push(d),e=d)}if(t.length===1)return null;const n=t[0],i=t[1];Ey(n,e,i)===0&&t.shift(),t.push(t[0]);const s=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:t.length-1,a=this.isExteriorRing()?t.length:-1,l=[];for(let u=o;u!=a;u+=s)l.push([t[u].x,t[u].y]);return l}isExteriorRing(){if(this._isExteriorRing===void 0){const e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let e=this.events[0];for(let i=1,s=this.events.length;i<s;i++){const o=this.events[i];Ur.compare(e,o)>0&&(e=o)}let t=e.segment.prevInResult(),n=t?t.prevInResult():null;for(;;){if(!t)return null;if(!n)return t.ringOut;if(n.ringOut!==t.ringOut)return n.ringOut.enclosingRing()!==t.ringOut?t.ringOut:t.ringOut.enclosingRing();t=n.prevInResult(),n=t?t.prevInResult():null}}}class Iy{constructor(e){this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){const e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(let t=0,n=this.interiorRings.length;t<n;t++){const i=this.interiorRings[t].getGeom();i!==null&&e.push(i)}return e}}class NS{constructor(e){this.rings=e,this.polys=this._composePolys(e)}getGeom(){const e=[];for(let t=0,n=this.polys.length;t<n;t++){const i=this.polys[t].getGeom();i!==null&&e.push(i)}return e}_composePolys(e){const t=[];for(let n=0,i=e.length;n<i;n++){const s=e[n];if(!s.poly)if(s.isExteriorRing())t.push(new Iy(s));else{const o=s.enclosingRing();o.poly||t.push(new Iy(o)),o.poly.addInterior(s)}}return t}}class MS{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ro.compare;this.queue=e,this.tree=new df(t),this.segments=[]}process(e){const t=e.segment,n=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),n;const i=e.isLeft?this.tree.add(t):this.tree.find(t);if(!i)throw new Error(`Unable to find segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] in SweepLine tree.`);let s=i,o=i,a,l;for(;a===void 0;)s=this.tree.prev(s),s===null?a=null:s.key.consumedBy===void 0&&(a=s.key);for(;l===void 0;)o=this.tree.next(o),o===null?l=null:o.key.consumedBy===void 0&&(l=o.key);if(e.isLeft){let u=null;if(a){const d=a.getIntersection(t);if(d!==null&&(t.isAnEndpoint(d)||(u=d),!a.isAnEndpoint(d))){const f=this._splitSafely(a,d);for(let p=0,_=f.length;p<_;p++)n.push(f[p])}}let c=null;if(l){const d=l.getIntersection(t);if(d!==null&&(t.isAnEndpoint(d)||(c=d),!l.isAnEndpoint(d))){const f=this._splitSafely(l,d);for(let p=0,_=f.length;p<_;p++)n.push(f[p])}}if(u!==null||c!==null){let d=null;u===null?d=c:c===null?d=u:d=Ur.comparePoints(u,c)<=0?u:c,this.queue.remove(t.rightSE),n.push(t.rightSE);const f=t.split(d);for(let p=0,_=f.length;p<_;p++)n.push(f[p])}n.length>0?(this.tree.remove(t),n.push(e)):(this.segments.push(t),t.prev=a)}else{if(a&&l){const u=a.getIntersection(l);if(u!==null){if(!a.isAnEndpoint(u)){const c=this._splitSafely(a,u);for(let d=0,f=c.length;d<f;d++)n.push(c[d])}if(!l.isAnEndpoint(u)){const c=this._splitSafely(l,u);for(let d=0,f=c.length;d<f;d++)n.push(c[d])}}}this.tree.remove(t)}return n}_splitSafely(e,t){this.tree.remove(e);const n=e.rightSE;this.queue.remove(n);const i=e.split(t);return i.push(n),e.consumedBy===void 0&&this.tree.add(e),i}}const xy=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,RS=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class LS{run(e,t,n){gi.type=e,Vu.reset();const i=[new Py(t,!0)];for(let d=0,f=n.length;d<f;d++)i.push(new Py(n[d],!1));if(gi.numMultiPolys=i.length,gi.type==="difference"){const d=i[0];let f=1;for(;f<i.length;)vf(i[f].bbox,d.bbox)!==null?f++:i.splice(f,1)}if(gi.type==="intersection")for(let d=0,f=i.length;d<f;d++){const p=i[d];for(let _=d+1,S=i.length;_<S;_++)if(vf(p.bbox,i[_].bbox)===null)return[]}const s=new df(Ur.compare);for(let d=0,f=i.length;d<f;d++){const p=i[d].getSweepEvents();for(let _=0,S=p.length;_<S;_++)if(s.insert(p[_]),s.size>xy)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const o=new MS(s);let a=s.size,l=s.pop();for(;l;){const d=l.key;if(s.size===a){const p=d.segment;throw new Error(`Unable to pop() ${d.isLeft?"left":"right"} SweepEvent [${d.point.x}, ${d.point.y}] from segment #${p.id} [${p.leftSE.point.x}, ${p.leftSE.point.y}] -> [${p.rightSE.point.x}, ${p.rightSE.point.y}] from queue.`)}if(s.size>xy)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(o.segments.length>RS)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const f=o.process(d);for(let p=0,_=f.length;p<_;p++){const S=f[p];S.consumedBy===void 0&&s.insert(S)}a=s.size,l=s.pop()}Vu.reset();const u=ih.factory(o.segments);return new NS(u).getGeom()}}const gi=new LS;var yf={union:function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return gi.run("union",r,t)},intersection:function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return gi.run("intersection",r,t)},xor:function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return gi.run("xor",r,t)},difference:function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return gi.run("difference",r,t)}};function FS(r,e){var t=rr(r),n=rr(e),i=r.properties||{},s=yf.difference(t.coordinates,n.coordinates);return s.length===0?null:s.length===1?Nn(s[0],i):Pd(s,i)}function AS(r,e,t){t===void 0&&(t={});var n=rr(r),i=rr(e),s=yf.intersection(n.coordinates,i.coordinates);return s.length===0?null:s.length===1?Nn(s[0],t.properties):Pd(s,t.properties)}function kS(r,e,t){t===void 0&&(t={});var n=rr(r),i=rr(e),s=yf.union(n.coordinates,i.coordinates);return s.length===0?null:s.length===1?Nn(s[0],t.properties):Pd(s,t.properties)}function Ty(r,e){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(e[0][0]!==e[e.length-1][0]||e[0][1]!==e[e.length-1][1]||e[0][2]!==e[e.length-1][2])&&e.push(e[0]);const t=AS(Nn([r]),Nn([e]));if(t)return t.geometry.coordinates}function Oy(r,e){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(e[0][0]!==e[e.length-1][0]||e[0][1]!==e[e.length-1][1]||e[0][2]!==e[e.length-1][2])&&e.push(e[0]);const t=kS(Nn([r]),Nn([e]));if(t)return t.geometry.coordinates}function Dy(r,e=500,t="meters"){const n=uS(Qr(r),e,{units:t});if(n)return n.geometry.coordinates}function Ny(r,e){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(e[0][0]!==e[e.length-1][0]||e[0][1]!==e[e.length-1][1]||e[0][2]!==e[e.length-1][2])&&e.push(e[0]);const t=FS(Nn([r]),Nn([e]));if(t)return t.geometry.coordinates}function My(r,e,t=10,n="meters"){return hS(r,e,{steps:t,units:n}).geometry.coordinates}function _f(r,e){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(e[0][0]!==e[e.length-1][0]||e[0][1]!==e[e.length-1][1]||e[0][2]!==e[e.length-1][2])&&e.push(e[0]);const t=Nn([r]),n=Nn([e]);return nC(t,n)?"oneBig":hC(t,n)?"twoBig":!1}function sh(r){const e=As(wo(r,["0"])),t=As(wo(r,["1"])),n=As(wo(r,["2"])),i=os(wo(r,["0"])),s=os(wo(r,["1"])),o=os(wo(r,["2"]));return{minPos:[e,t,n],maxPos:[i,s,o],center:[(e+i)*.5,(t+s)*.5,(n+o)*.5]}}function Ry(r){const{minPos:e,maxPos:t,center:n}=sh(r);if(e.some(a=>!Number.isFinite(a)||t.some(l=>!Number.isFinite(l))||n.some(l=>!Number.isFinite(l)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=Pc(e,t);let s=i*.5;const o=Math.abs(e[2]-t[2]);return o!=0&&(s=Math.sqrt(i*i+o*o)*.5),{center:n,radius:s}}function Ly(r,e){const t=Kr(r),n=Kr(e);return v.Vector.distance(t,n)}function bs(r,e){const t=[],n=r.length;let i=0;for(let s=0;s<n-1;++s){if(e===void 0||e==="GEODESIC"){const o=Pc(r[s],r[s+1]),a=Math.abs(r[s][2]-r[s+1][2]);if(a===0)i+=o;else{const l=Math.sqrt(o*o+a*a);i+=l}}else if(e==="RHUMB"){const o=tv(r[s],r[s+1]),a=Math.abs(r[s][2]-r[s+1][2]);if(a===0)i+=o;else{const l=Math.sqrt(o*o+a*a);i+=l}}else if(e==="NONE"){const o=Ly(r[s],r[s+1]);i+=o}else console.warn(`未知的arcType: ${e},导致距离无法计算!`);t.push(i)}return t}function wf(r){const e="__getXyzFromPostion";let t=er(r,e);return(!t||!v.Vector.equals(t[0],r))&&(t=[[...r],Kr(r)],Ii(r,e,t)),t[1]}class VS{constructor(e){this.points=e.points||[],this.duration=e.duration||1e4,this.sharpness=e.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=e.stepLength||60,this.length=this.points.length,this.delay=0;for(let t=0;t<this.length;t++)this.points[t].z=this.points[t].z||0;for(let t=0;t<this.length-1;t++){const n=this.points[t],i=this.points[t+1];this.centers.push({x:(n.x+i.x)/2,y:(n.y+i.y)/2,z:(n.z+i.z)/2})}this.controls.push([this.points[0],this.points[0]]);for(let t=0;t<this.centers.length-1;t++){const n=this.points[t+1].x-(this.centers[t].x+this.centers[t+1].x)/2,i=this.points[t+1].y-(this.centers[t].y+this.centers[t+1].y)/2,s=this.points[t+1].z-(this.centers[t].z+this.centers[t+1].z)/2;this.controls.push([{x:(1-this.sharpness)*this.points[t+1].x+this.sharpness*(this.centers[t].x+n),y:(1-this.sharpness)*this.points[t+1].y+this.sharpness*(this.centers[t].y+i),z:(1-this.sharpness)*this.points[t+1].z+this.sharpness*(this.centers[t].z+s)},{x:(1-this.sharpness)*this.points[t+1].x+this.sharpness*(this.centers[t+1].x+n),y:(1-this.sharpness)*this.points[t+1].y+this.sharpness*(this.centers[t+1].y+i),z:(1-this.sharpness)*this.points[t+1].z+this.sharpness*(this.centers[t+1].z+s)}])}return this.controls.push([this.points[this.length-1],this.points[this.length-1]]),this.steps=this.cacheSteps(this.stepLength),this}cacheSteps(e){const t=[];let n=this.pos(0);t.push(0);for(let i=0;i<this.duration;i+=10){const s=this.pos(i);Math.sqrt((s.x-n.x)*(s.x-n.x)+(s.y-n.y)*(s.y-n.y)+(s.z-n.z)*(s.z-n.z))>e&&(t.push(i),n=s)}return t}vector(e){const t=this.pos(e+10),n=this.pos(e-10);return{angle:180*Math.atan2(t.y-n.y,t.x-n.x)/3.14,speed:Math.sqrt((n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y)+(n.z-t.z)*(n.z-t.z))}}pos(e){let t=e-this.delay;t<0&&(t=0),t>this.duration&&(t=this.duration-1);const n=t/this.duration;if(n>=1)return this.points[this.length-1];const i=Math.floor((this.points.length-1)*n),s=(this.length-1)*n-i;return jS(s,this.points[i],this.controls[i][1],this.controls[i+1][0],this.points[i+1])}}function jS(r,e,t,n,i){const s=BS(r);return{x:i.x*s[0]+n.x*s[1]+t.x*s[2]+e.x*s[3],y:i.y*s[0]+n.y*s[1]+t.y*s[2]+e.y*s[3],z:i.z*s[0]+n.z*s[1]+t.z*s[2]+e.z*s[3]}}function BS(r){const e=r*r;return[e*r,3*e*(1-r),3*r*(1-r)*(1-r),(1-r)*(1-r)*(1-r)]}function zS(r,e){e===void 0&&(e={});var t=e.resolution||1e3,n=e.sharpness||.85;const i=[],s=r.map(u=>{const[c,d,f]=Kr(u);return{x:c,y:d,z:f}});for(var o=new VS({duration:t,points:s,sharpness:n}),a=function(u){var c=o.pos(u);const d=bd([c.x,c.y,c.z]);i.push(d)},l=0;l<o.duration;l+=10)a(l);return a(o.duration),i}function ol(r,e,t){return zS(r,{resolution:e,sharpness:t})}function Ef(r){return Ls(r,(e,t)=>e[0]===t[0]&&e[1]===t[1],e=>[...e])}function Fy(r,e){const t=new Array;for(let n of r)t.push(e(n));return t}function oh(r,e){return r===void 0&&e===void 0?!0:!r||!e?!1:r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}function Ay(r,e,t){var i;((i=e.attachedViewers.values().toArray()[0])==null?void 0:i.getEngineObject(e))?t.call(r):requestAnimationFrame(()=>Ay(r,e,t))}function US(r,e,t,n=!0){n&&t(),r.dispose(e.disposableOn(t))}function GS(r,e){const{type:t,id:n}=r;if(t){const i=lt.create(t,n);if(i)return i.json=r,i;console.warn(`cannot create sceneObject from type(${t})`)}else console.warn(`cannot create sceneObject from type(${t})`)}function ky(r){const e=r.children&&Gh(r.children,n=>{if(!(n instanceof zn))throw new Error("!(treeItem instanceof SceneTreeItem)");return!n.show})||!1,t=r.sceneTree.getSceneObjectShowFunc(r.sceneObject);return!e||t}class zn extends ru{constructor(t,n=!1,i,s,o=!0){super(t,n,i);h(this,"_dragDrop");h(this,"_showChangedNotAffectChildren",!1);h(this,"_showChangedNotAffectParent",!1);h(this,"_type",this.dv(z("Unknown")));h(this,"_isExport",this.dv(z(!0)));const a=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(a)),this.name=`未命名条目(${this.id})`,this.extras=s,this._isExport.value=o;let l;const u=()=>{l&&(l(),l=void 0)};this.dispose(u),this.dispose(this.sceneObjectChanged.disposableOn(c=>{u(),c&&(l=tt([this,"name"],[c,"name"]))})),this.dispose(this.showChanged.disposableOn(c=>{if(t.setSceneObjectShowFunc(this.sceneObject,c),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let d of this.children)d instanceof zn&&(d._showChangedNotAffectParent=!0,d.show=c,d._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof zn&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=ky(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new Ie(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const c=new U;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof N){const d=()=>{this.show=t.getSceneObjectShowFunc(this.sceneObject)};d(),c.dispose(this.sceneObject.showChanged.disposableOn(d))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof N){const d=()=>{this.show=t.getSceneObjectShowFunc(this.sceneObject)};d(),c.dispose(this.sceneObject.enabledChanged.disposableOn(d))}return c})),this.childrenChangedEvent.disposableOn(()=>{const c=ky(this);this._showChangedNotAffectChildren=!0,this.show=c,this._showChangedNotAffectChildren=!1});{const c=()=>{let d="Unknown";this.sceneObject?d=this.sceneObject.typeName:this.children&&(d="Folder"),this._type.value=d};this.dispose(this.sceneObjectChanged.disposableOn(c)),this.dispose(this.childrenResetedEvent.disposableOn(c)),c()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(t){this._isExport.value=t}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(t){try{this.json=JSON.parse(t)}catch(n){console.error(`sceneTreeItem.jsonStr error ${n}`,n)}}get completeJson(){const t=this.children&&[...this.children].filter(n=>n.isExport).map(n=>n.completeJson);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.completeJson,children:t,extras:this.extras}}get json(){const t=this.children&&[...this.children].filter(n=>n.isExport).map(n=>n.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:t,extras:this.extras}}set json(t){if(t.name!==void 0&&(this.name=t.name),this.extras=t.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=t.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=t.collapsed??!1,this.sceneObject=void 0,t.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(t.sceneObj,this)),!!t.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let n of t.children){const i=new zn(this.tree,!0);i.json=n,this.children.push(i)}}}clone(){try{const t=new zn(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return t.json=this.json,t.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),t}catch(t){console.error(`SceneTreeItem.clone error: ${t}`,t)}}insertNewTreeItem(t,n){if(t==="FolderInnerOrAfter"||t==="FolderInnerOrBefore"||t==="FolderInner"){if(n&&n.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&!(t.includes("Or")&&this.sceneObject))return n&&this.children.push(n),!0;if(t==="FolderInner")return!1;if(t==="FolderInnerOrAfter")return super.insertNewTreeItem("After",n);if(t==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",n);throw new Error("should not be here!")}else return super.insertNewTreeItem(t,n)}}(r=>{r.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:Kt(void 0)})})(zn||(zn={})),Fs(zn.prototype,zn.createDefaultProps);function Vy(r,e,t){let{offsetY:n}=e;if(!e.target||!("clientTop"in e.target))return"none";n+=2,n+=e.target.clientTop;let i="none";return r.children?n<=t*.3?i="before":n>=t*.7?!r.uiTreeObject.collapsed&&r.children.length>0?i="inner":i="after":i="inner":n<=t*.5?i="before":i="after",i}class jy extends mm{constructor(e){super(),this._treeItem=e;const{dragStartDataManager:t}=this._treeItem.sceneTree;let n="none";const i=this.disposeVar(Sg(()=>{this._treeItem.uiTreeObject.moveToPositionMode=n,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${n});`)},200));function s(o){n!==o&&(n=o,i.restart())}this.dispose(this._dragStartEvent.disposableOn(o=>{t.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(o=>{if(!o.dataTransfer)return;o.preventDefault();const a=t;if(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0){const l=a.data.value,u=this._treeItem,{tree:c}=u;if(c){const d=[...c.selectedItems];~d.indexOf(l)||d.push(l);const f=Vy(u,o,c.itemDivHeight);if(f!=="none"&&Po.canMoveToTreeItems(d,u,f)){o.dataTransfer.dropEffect="move",s(f);return}}}o.dataTransfer.dropEffect="none",s("none")})),this.dispose(this._dropEvent.disposableOn(o=>{const a=t;if(!(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0))return;const l=a.data.value,u=this._treeItem,{tree:c}=u;if(!c)return;const d=[...c.selectedItems];~d.indexOf(l)||d.push(l);const f=Vy(u,o,c.itemDivHeight);f!=="none"&&Po.canMoveToTreeItems(d,u,f)&&(Po.moveToTreeItems(d,u,f),a.data=void 0,s("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{n="none",i.restart()}))}}function WS(r){if(!(r instanceof zn))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new jy(r)}function HS(r){let e=!1;return r&&("show"in r?e=r.show??!0:"enabled"in r&&(e=r.enabled??!0)),e}function qS(r,e){r&&("show"in r?r.show=e:"enabled"in r&&(r.enabled=e))}const XS=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function YS(r){const e=[],{root:t={}}=r,n=[t];for(;n.length>0;){const i=n.pop();if(!i)throw new Error("!todo");if(i.children){for(let s of i.children)if(s.children&&n.unshift(s),s.sceneObj){const{type:o=void 0}=s.sceneObj;o||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(s.sceneObj)),o&&XS.includes(o)&&e.push(s.sceneObj)}}}return e}async function JS(r,e){const t=YS(r);let n=0;const i=t.length;for(let s of t)if(++n,e){const o=n/i;e(o,n,i)}}class By extends U{constructor(t,n){super();h(this,"treeItemContexMenuCallback");this._sceneTree=t,this._projectManager=n}get sceneTree(){return this._sceneTree}}class $S extends U{constructor(t){super();h(this,"_jsonLoadingEvent",this.disposeVar(new N));h(this,"_setJsonProcessing",this.disposeVar(nr(async(t,n)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),n&&await t.promise(this._sceneTree.preloadFunc(n)),this._setJson(n),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=t,this._setJsonProcessing.errorFunc=n=>{this._jsonLoadingEvent.emit({type:"error",error:n})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(t){try{this._sceneTree.setJson(t||{})}catch(n){console.error(`json数据装配时发生错误!error: ${n}`)}}get json(){return this._sceneTree.getJson()}set json(t){this._setJsonProcessing.restart(new Jr("JSON重新赋值!"),t)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(t){this.json=JSON.parse(t)}}function KS(r){return r.name+"_clone"}function Cf(r,e,t){if(r instanceof zn)return r.insertNewTreeItem(e,t);{const n={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return r.insertNewTreeItem(n[e],t)}}function ZS(r){[r,...r.getDescendants()].forEach(e=>e.destroy())}const Zn=class Zn extends Po{constructor(t,n,i,s){super(i);h(this,"_jsonLoading",this.disposeVar(new $S(this)));h(this,"createSceneObjectFunc",Zn.defaultCreateSceneObjectFunc);h(this,"createTreeItemDragDropFunc",Zn.defaultCreateTreeItemDragDropFunc);h(this,"preloadFunc",Zn.defaultPreload);h(this,"getSceneObjectShowFunc",Zn.defaultGetSceneObjectShow);h(this,"setSceneObjectShowFunc",Zn.defaultSetSceneObjectShow);h(this,"getSceneTreeItemCloneNameFunc",Zn.defaultGetSceneTreeItemCloneNameFunc);h(this,"debug",!1);h(this,"_contextMenu",this.disposeVar(new By(this,this.projectManager)));h(this,"_showPropUiOnSelecting",this.disposeVar(z(!0)));this._name=t,this._dragStartDataManager=n,this._projectManager=s,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var a,l;globalThis.lssn=this.lastSelectedItem,globalThis.lsso=(a=this.lastSelectedItem)==null?void 0:a.sceneObject,this.debug&&console.log(((l=this.lastSelectedItem)==null?void 0:l.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(a=>{for(let l of a){const u=l,{sceneObject:c}=u;c&&o.deleteSceneObject(c)&&c.destroy()&&vc(c,void 0);for(let d of u.getDescendants()){const{sceneObject:f}=d;f&&o.deleteSceneObject(f)&&f.destroy()&&vc(f,void 0)}ZS(l)}})),this.dispose(this.itemsAdded.disposableOn(a=>{for(let l of a){const u=l;u.sceneObject&&o.addSceneObject(u.sceneObject)&&vc(u.sceneObject,u)}}))}get json(){return this._jsonLoading.json}set json(t){this._jsonLoading.json=t}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(t){this._jsonLoading.jsonStr=t}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(t){this._showPropUiOnSelecting.value=t}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(t){const n=this.getDescendants();let i;for(let s of n)if(s.sceneObject&&s.sceneObject.id===t){i=s;break}return i}getTreeItemsFromSceneObjType(t){const n=this.getDescendants(),i=[],s=Array.isArray(t)?t:[t];for(let o of n)o.sceneObject&&s.includes(o.sceneObject.typeName)&&i.push(o);return i}getTreeItemsFromSceneObjName(t){var s;const n=this.getDescendants(),i=[];for(let o of n)(s=o.sceneObject)!=null&&s.name.includes(t)&&i.push(o);return i}get dragStartDataManager(){return this._dragStartDataManager}get completeJson(){return{root:{children:[...this.children].filter(t=>t.isExport).map(t=>t.completeJson)}}}getJson(){return{root:{children:[...this.children].filter(t=>t.isExport).map(t=>t.json)}}}setJson(t){var i;t.root=t.root||{};const n=t.root.children??[];this.root.resetChildren(!0);for(let s of n){const o=new zn(this,!0);o.json=s,(i=this.root.children)==null||i.push(o)}}testAddNewTreeItem(t,n){const i=t||this.lastSelectedItem||this.root;return i?Cf(i,n):!1}addNewTreeItem(t,n,i,s){const o=t||this.lastSelectedItem||this.root;if(o&&Cf(o,n)){const a=new zn(this,i);if(a.sceneObject=s,!Cf(o,n,a))throw new Error("currentTreeItem.insertNewTreeItem return false!");return a}}createSceneObjectTreeItem(t,n,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=lt.create(t,n);return a?this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0,a):void 0}createGroupTreeItem(t,n,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0);if(!a){console.warn("addNewTreeItem error!");return}return a.name=t??"未命名组节点",a}createSceneObjectTreeItemFromClass(t,n,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o))return;const a=lt.createFromClass(t,n);return a?this.addNewTreeItem(i,o,!0,a):void 0}createSceneObjectTreeItemFromJson(t,n,i){const s=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(n,s))return;const o=lt.createFromJson(t);return console.log(o),o?this.addNewTreeItem(n,i??"FolderInnerOrAfter",!0,o):void 0}destroySceneObjectTreeItem(t){if(t===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}t.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const t=[...this.root.children];for(let n of t)this.destroySceneObjectTreeItem(n)}};h(Zn,"defaultCreateSceneObjectFunc",GS),h(Zn,"defaultCreateTreeItemDragDropFunc",WS),h(Zn,"defaultPreload",JS),h(Zn,"defaultGetSceneObjectShow",HS),h(Zn,"defaultSetSceneObjectShow",qS),h(Zn,"defaultGetSceneTreeItemCloneNameFunc",KS);let ju=Zn;const Sf={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class QS extends U{constructor(t){super();h(this,"_currentPosition",this.disposeVar(Xt(void 0)));h(this,"_currentRotation",this.disposeVar(Xt(void 0)));h(this,"_currentHeading",this.disposeVar(z(void 0)));h(this,"_isRotating",this.disposeVar(z(!1)));h(this,"_isGround",this.disposeVar(z(!1)));h(this,"_startPosition",[0,0,0]);h(this,"_startRotation",[0,0,0]);h(this,"_processing",this.disposeVar(nr(async(t,n,i,s)=>{const{currentPosition:o,currentRotation:a}=this;if(!o||s<=0||!a){this._currentPosition.value=n,this._currentRotation.value=i;return}const l=this._startPosition;l.splice(0,3,...o);const u=this._startRotation;u.splice(0,3,...a);let c=Date.now();const d=cu(l,n);this._currentHeading.value=d;const p=Pc(l,n)/s,_=[i[0]-u[0],i[1]-u[1],i[2]-u[2]],S=n[2]-l[2];await t.promise(new Promise(b=>{t.disposer.dispose(rc(async()=>{let I=Date.now()-c;I=I<0?0:I,I=I>s?s:I;const m=I*p,w=Ld(l,m,d);if(this.isGround&&w){const g=await this._esviewer.getTerrainHeight([w[0],w[1]]);this._currentPosition.value=[w[0],w[1],g??0]}else w&&(w[2]+=S*(I/s)),this._currentPosition.value=w;if(this.isRotating){const[g,y,E]=_,C=I/s;this._currentRotation.value=[u[0]+g*C,u[1]+y*C,u[2]+E*C]}I===s&&(this._currentPosition.value=n,this.isRotating&&(this._currentRotation.value=i),this.isRotating=!1,this.isGround=!1,b())}))}))})));this._esviewer=t}get currentPosition(){return this._currentPosition.value}get currentPositionChanged(){return this._currentPosition.changed}get currentRotation(){return this._currentRotation.value}get currentRotationChanged(){return this._currentRotation.changed}get currentHeading(){return this._currentHeading.value}get currentHeadingChanged(){return this._currentHeading.changed}get isRotating(){return this._isRotating.value}set isRotating(t){this._isRotating.value=t}get isRotatingChanged(){return this._isRotating.changed}get isGround(){return this._isGround.value}set isGround(t){this._isGround.value=t}get isGroundChanged(){return this._isGround.changed}get processing(){return this._processing}restart(t,n,i){this._processing.restart(void 0,t,n,i)}cancel(){this._processing.cancel()}}const tb=.06,zy=1.5,Uy=2,Gy=70,Wy=60;function qo(r){return At.point(r)}function Hi(r,e,t){const n=qo(r),i=At.destination(n,t,e,{units:"meters"}),[s,o]=At.getCoords(i);return[s,o,r[2]]}function ah(r,e){return At.bearing(qo(r),qo(e))}function lh(r,e,t,n,i=1e3){const s=At.lineString([At.getCoords(At.destination(qo(r),i,(e+180)%360,{units:"meters"})),r,At.getCoords(At.destination(qo(r),i,e,{units:"meters"}))]),o=At.lineString([At.getCoords(At.destination(qo(t),i,(n+180)%360,{units:"meters"})),t,At.getCoords(At.destination(qo(t),i,n,{units:"meters"}))]),a=At.lineIntersect(s,o);if(a.features.length>0){const[l,u]=At.getCoords(a.features[0]);return[l,u,(r[2]+t[2])/2]}return t}function Hy(r,e,t,n){const i=(t-90+360)%360,s=(t+90+360)%360;r.leftPoints.push(Hi(e,i-Gy,n*zy)),r.headPoints.push(Hi(e,i-Wy,n*Uy)),r.headPoints.push(e),r.headPoints.push(Hi(e,s+Wy,n*Uy)),r.rightPoints.push(Hi(e,s+Gy,n*zy))}function eb(r,e,t,n){const i=(e-90+360)%360,s=(e+90+360)%360,o=t*tb*Math.min(.3,1-n);return{leftPoint:Hi(r,i,o),rightPoint:Hi(r,s,o),verticalLen:o}}function nb(r,e){if(!r||r.length<2)return;const t=e==="swallowTailArrow",n=r.length,i=n-1,s=Math.max(...bs(r,"NONE")),o={leftPoints:[],rightPoints:[],headPoints:[]};let a;for(let p=0;p<n;p++){const _=r[p],S=p==i?r[r.length-2]:r[p+1],b=p==i?ah(S,_):ah(_,S),{leftPoint:I,rightPoint:m,verticalLen:w}=eb(_,b,s,p/n);p===0?(o.leftPoints.push(I),o.rightPoints.push(m),t&&(o.tailPoint=Hi(_,b,w))):p===i?Hy(o,_,b,w):a!==void 0?(o.leftPoints.push(lh(o.leftPoints[p-1],a,I,b,s)),o.rightPoints.push(lh(o.rightPoints[p-1],a,m,b,s))):(o.leftPoints.push(I),o.rightPoints.push(m)),a=b}const l=o.leftPoints,u=o.rightPoints,c=l.length>=2?ol(l):l,d=u.length>=2?ol(u):u,f=[...c,...o.headPoints,...d.reverse()];return o.tailPoint&&f.push(o.tailPoint),f.push(o.leftPoints[0]),f}function rb(r,e,t,n){const i=At.lineString([[r[0],r[1]],[e[0],e[1]]]),s=At.lineString([[t[0],t[1]],[n[0],n[1]]]);return At.lineIntersect(i,s).features.length>0}function ib(r,e,t,n){const i=(e-90+360)%360,s=(e+90+360)%360,o=t*Math.min(.3,1-n);return{leftPoint:Hi(r,i,o),rightPoint:Hi(r,s,o),verticalLen:o}}function sb(r,e){if(!r||r.length<3)return;const t=e==="swallowTailArrow",n=r.length,i=n-1,s=r.slice(0,2),o=sh(s),a=bs(s,"NONE").pop()??0,l=Math.max(...bs(r,"NONE")),u={leftPoints:[],rightPoints:[],headPoints:[]};let c;for(let b=1;b<n;b++){const I=b===1?o.center:r[b],m=b===i?r[n-2]:r[b+1],w=b===i?ah(m,I):ah(I,m);let{leftPoint:g,rightPoint:y,verticalLen:E}=ib(I,w,a,b/n);if(b===1)u.leftPoints.push(s[0]),u.rightPoints.push(s[1]),t&&(u.tailPoint=Hi(I,w,a));else if(b===i)Hy(u,I,w,E);else if(c!==void 0){if(b===2&&rb(u.leftPoints[0],g,u.rightPoints[0],y)){const P=u.leftPoints[0];u.leftPoints[0]=u.rightPoints[0],u.rightPoints[0]=P}const C=b-2;u.leftPoints.push(lh(u.leftPoints[C],c,g,w,l)),u.rightPoints.push(lh(u.rightPoints[C],c,y,w,l))}else u.leftPoints.push(g),u.rightPoints.push(y);c=w}let d=u.leftPoints,f=u.rightPoints;const p=d.length>=2?ol(d):d,_=f.length>=2?ol(f):f,S=[...p,...u.headPoints,..._.reverse()];return u.tailPoint&&S.push(u.tailPoint),S.push(d[0]),S}function bf(r,e,t=!1){return t?sb(r,e):nb(r,e)}function qy(r){let e=0;function t(n,i){i++,e=Math.max(i,e),n.forEach(s=>{Array.isArray(s)&&t(s,i)})}return t(r,0),e}const Xi=class Xi extends jt{constructor(t){super(t);h(this,"editingBindMode","lineString");h(this,"_area",this.dv(z(0)));h(this,"_perimeter",this.dv(z(0)));this.d(Ne(this.pointsChanged,()=>{this._updateArea(),this._updatePerimeter()},{immediate:!0}))}updateEditing(){var n;const t=[];this.editingBindMode=="doublePoints"?t.push(Z.DoublePoints):this.editingBindMode=="lineString"?t.push(Z.LineStringAppend,Z.LineStringInsert,Z.Translation):this.editingBindMode=="circular"?(t.push(Z.CircularAppend,Z.CircularInsert,Z.Translation),this.supportEditingModes().includes(Z.HeightModify)&&t.push(Z.HeightModify)):this.editingBindMode=="visibility"?t.push(Z.VisibilityAppend,Z.VisibilityModify):this.editingBindMode=="scatter"&&t.push(Z.ScatterAppend,Z.ScatterModify),(n=this.activeViewer)==null||n.startEditing(this,t,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return Nd([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const t=bs(this.points,"GEODESIC");return t[t.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const t=[...this.points,this.points[0]],n=bs(t,"GEODESIC");return n[n.length-1]}else return}getIntersect(t){if(this.points&&this.points.length>=3&&t.length>=3){const n=Ty(this.points,t);if(!n)return;const i=n[0][0][0];if(Array.isArray(i)){const s=[...n],o=[];return s.forEach(a=>{const l=a[0].map(u=>[...u,0]);o.push(l)}),o}else return[[...n][0].map(a=>[...a,0])]}else return}getUnion(t){if(this.points&&this.points.length>=3&&t.length>=3){const n=Oy(this.points,t);if(!n)return;const i=n[0][0][0];if(Array.isArray(i)){const s=[...n],o=[];return s.forEach(a=>{const l=a[0].map(u=>[...u,0]);o.push(l)}),o}else return[[...n][0].map(a=>[...a,0])]}else return}getDifference(t){if(this.points&&this.points.length>=3&&t.length>=3){let n=[...t];const i=t[0],s=t[t.length-1];i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]||n.push(i);const o=Ny([...this.points,this.points[0]],[...n]);if(!o)return{status:"undefined",positions:void 0};const a=[...o];if(qy(a)===3){const l=a.map(f=>f.map(p=>[...p,0]));if(l.length<=1)return{status:"notIncluded",positions:l};const u=l[0],c=l[1];return _f([...u],[...c])==="oneBig"?{status:"included",positions:l}:{status:"notIncluded",positions:l}}else if(qy(a)===4){const u=[...a.map(d=>d.map(f=>f.map(p=>[...p,0])))],c=[];return u.forEach(d=>{c.push(d[0])}),{status:"notIncluded",positions:c}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(t=500,n){if(this.points&&this.points.length>=2){const i=Dy(this.points,t,n);return i?[i[0].map(s=>[...s,0])]:void 0}else return}geoPolygonOverlap(t){if(this.points&&this.points.length>=3&&t.length>=3){const n=_f(this.points,t);return n==="oneBig"?!0:n==="twoBig"?!1:void 0}else return}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"style",coordinate:[...t.coordinate,new X([this,"editing"],"编辑",!1),new ge([this,"points"],"位置数组",Xi.defaults.points,void 0,!0)],style:[...t.style,new dt("点样式"),new X([this,"pointed"],"开启",!1),new M([this,"pointSize"],"点大小",1),new st([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Pt([this,"pointColor"],"点颜色",[1,1,1,1]),new Pt([this,"pointOutlineColor"],"轮廓颜色",Xi.defaults.pointStyle.outlineColor),new M([this,"pointOutlineWidth"],"轮廓宽度",Xi.defaults.pointStyle.outlineWidth),new dt("线样式"),new X([this,"stroked"],"开启线样式",!0),new X([this,"strokeGround"],"贴地",!1),new M([this,"strokeWidth"],"线宽",1),new st([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Pt([this,"strokeColor"],"线颜色",[1,1,1,1]),new dt("面样式"),new X([this,"filled"],"开启",!1),new X([this,"fillGround"],"贴地",!1),new Pt([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...t.more,new dt("点样式集合"),new ct([this,"pointMaterial"],"点材质"),new ft([this,"pointMaterialParams"],"点材质参数",{}),new dt("线样式集合"),new ct([this,"strokeMaterial"],"线材质"),new ft([this,"strokeMaterialParams"],"线材质参数",{}),new dt("面样式集合"),new ct([this,"fillMaterial"],"面材质"),new ft([this,"fillMaterialParams"],"面材质参数",{})]}}get pointSize(){return this.pointStyle.size}set pointSize(t){this.pointStyle={...this.pointStyle,size:t}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(t){this.pointStyle={...this.pointStyle,sizeType:t}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(t){this.pointStyle={...this.pointStyle,color:[...t]}}get pointColorChanged(){return this.pointStyleChanged}get pointOutlineColor(){return this.pointStyle.outlineColor}set pointOutlineColor(t){this.pointStyle={...this.pointStyle,outlineColor:[...t]}}get pointOutlineColorChanged(){return this.pointStyleChanged}get pointOutlineWidth(){return this.pointStyle.outlineWidth}set pointOutlineWidth(t){this.pointStyle={...this.pointStyle,outlineWidth:t}}get pointOutlineWidthChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(t){this.pointStyle={...this.pointStyle,material:t}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(t){this.pointStyle={...this.pointStyle,materialParams:t}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(t){this.strokeStyle={...this.strokeStyle,widthType:t}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(t){this.strokeStyle={...this.strokeStyle,color:[...t]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(t){this.strokeStyle={...this.strokeStyle,material:t}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(t){this.strokeStyle={...this.strokeStyle,materialParams:t}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(t){this.strokeStyle={...this.strokeStyle,ground:t}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(t){this.fillStyle={...this.fillStyle,color:[...t]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle,materialParams:t}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(t){this.fillStyle={...this.fillStyle,ground:t}}get fillGroundChanged(){return this.fillStyleChanged}};h(Xi,"createDefaultProps",()=>({...jt.createDefaultProps(),pointed:!1,pointStyle:gt({size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),stroked:!1,strokeStyle:gt({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:gt({color:[1,1,1,1],material:"",materialParams:{},ground:!1}),points:_o([])})),h(Xi,"type",Xi.register("ESGeoVector",Xi,{chsName:"地理矢量",tags:["ESObjects"],description:"地理矢量"})),h(Xi,"supportEditingModes",[...jt.supportEditingModes,Z.Translation]);let Ct=Xi;const Ko=class Ko extends jt{constructor(){super(...arguments);h(this,"_statusDis",this.dv(z(!0)));h(this,"_smoothMoveEvent",this.dv(new N));h(this,"_smoothMoveWithRotationEvent",this.dv(new N));h(this,"_smoothMoveOnGroundEvent",this.dv(new N));h(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new N));h(this,"_automaticLandingEvent",this.dv(new N));h(this,"_smoothMoveKeepPitchEvent",this.dv(new N));h(this,"_smoothMoveRelativelyEvent",this.dv(new N));h(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new N));h(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var n;const t=[];this.editingBindMode=="singlePoint"?(t.push(Z.SinglePoint),["ESLocationMeasurement"].includes(this.typeName)||t.push(Z.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||t.push(Z.Scale)):this.editingBindMode=="doublePoints"&&t.push(Z.DoublePoints),(n=this.activeViewer)==null||n.startEditing(this,t,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(t,n){this._smoothMoveEvent.emit(t,n)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(t,n,i){this._smoothMoveWithRotationEvent.emit(t,n,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(t,n,i,s){this._smoothMoveOnGroundEvent.emit(t,n,i,s)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(t,n,i,s,o){this._smoothMoveWithRotationOnGroundEvent.emit(t,n,i,s,o)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const t=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(t)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(t,n){this._smoothMoveKeepPitchEvent.emit(t,n)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(t,n){this._smoothMoveRelativelyEvent.emit(t,n)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(t,n,i){this._smoothMoveRelativelyWithRotationEvent.emit(t,n,i)}getESProperties(){const t={...super.getESProperties()},n=[...t.location,new X([this,"editing"],"是否编辑"),new ut("自动落地",this.automaticLanding.bind(this),[]),new Di([this,"position"],"位置数组",[0,0,0]),new iu([this,"rotation"],"姿态数组",[0,0,0]),new He([this,"scale"],"缩放",[1,1,1]),new M([this,"minVisibleDistance"],"最小可见距离",0),new M([this,"maxVisibleDistance"],"最大可见距离",0)];return["ESHuman","ESGltfModel","ESFountainParticleSystem","ESHumanFountain"].includes(this.typeName)&&n.push(new He([this,"positionOffset"],"位置偏移",[0,0,0])),{...t,defaultMenu:"basic",location:n,more:[...t.more,new ut("平滑移动",this.smoothMove.bind(this),[[0,0,0],0]),new ut("固定方向平滑移动",this.smoothMoveKeepPitch.bind(this),[[0,0,0],0]),new ut("平滑偏移",this.smoothMoveWithRotation.bind(this),[[0,0,0],[0,0,0],0]),new ut("贴地平滑移动",this.smoothMoveOnGround.bind(this),[0,0,0,""]),new ut("贴地平滑偏移",this.smoothMoveWithRotationOnGround.bind(this),[[0,0,0],0,0,0,""]),new ut("相对平滑移动",this.smoothMoveRelatively.bind(this),[[0,0,0],0]),new ut("相对平滑偏移",this.smoothMoveRelativelyWithRotation.bind(this),[[0,0,0],[0,0,0],0]),new X([this,"enableVisibleDistance"],"是否应用距离显隐")]}}get pointSize(){return this.pointStyle.size}set pointSize(t){this.pointStyle={...this.pointStyle,size:t}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(t){this.pointStyle={...this.pointStyle,sizeType:t}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(t){this.pointStyle={...this.pointStyle,color:[...t]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(t){this.pointStyle={...this.pointStyle,material:t}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(t){this.pointStyle={...this.pointStyle,materialParams:t}}get pointMaterialParamsChanged(){return this.pointStyleChanged}};h(Ko,"createDefaultProps",()=>({...jt.createDefaultProps(),pointed:!1,pointStyle:gt({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),position:et([0,0,0]),rotation:et([0,0,0]),positionOffset:et([0,0,0]),scale:et([1,1,1]),minVisibleDistance:z(0),maxVisibleDistance:z(0)})),h(Ko,"type",Ko.register("ESObjectWithLocation",Ko,{chsName:"对象位置",tags:["ESObjects"],description:"对象位置"})),h(Ko,"supportEditingModes",[...jt.supportEditingModes,Z.SinglePoint,Z.Place,Z.Translation,Z.Rotation,Z.Scale,Z.DoublePoints,Z.DoublePointsAppend,Z.DoublePointsModify]);let it=Ko;const fl=class fl extends it{getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new dt("点样式集合"),new X([this,"pointed"],"开启点样式",!1),new M([this,"pointSize"],"点大小",1),new st([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Pt([this,"pointColor"],"点颜色",[1,1,1,1]),new dt("线样式集合"),new X([this,"stroked"],"开启线样式",!1),new X([this,"strokeGround"],"是否贴地(线)",!1),new M([this,"strokeWidth"],"线宽",1),new st([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Pt([this,"strokeColor"],"线颜色",[1,1,1,1]),new dt("面样式集合"),new X([this,"filled"],"开启填充样式",!1),new X([this,"fillGround"],"是否贴地",!1),new Pt([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...e.more,new dt("点样式"),new ct([this,"pointMaterial"],"点材质",""),new ft([this,"pointMaterialParams"],"点材质参数",{}),new dt("线样式"),new ct([this,"strokeMaterial"],"线材质",""),new ft([this,"strokeMaterialParams"],"线材质参数",{}),new dt("填充样式"),new ct([this,"fillMaterial"],"面材质",""),new ft([this,"fillMaterialParams"],"面材质参数",{})]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}};h(fl,"createDefaultProps",()=>({...it.createDefaultProps(),pointed:!1,pointStyle:gt({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:1}),stroked:!1,strokeStyle:gt({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:gt({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),h(fl,"type",fl.register("ESLocalVector",fl,{chsName:"本地矢量",tags:["ESObjects"],description:"本地矢量对象"}));let al=fl;const Ju=class Ju extends al{};h(Ju,"type",Ju.register("ESLocalVector2D",Ju,{chsName:"本地矢量2D",tags:["ESObjects"],description:"本地矢量2D对象"}));let Ps=Ju;const ob=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],ab=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]],pl=class pl extends it{constructor(){super(...arguments);h(this,"_widgetEvent",this.dv(new N))}get widgetEvent(){return this._widgetEvent}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new X([this,"screenRender"],"屏幕渲染",!0),new X([this,"sizeByContent"],"尺寸自适应",!0),new Me([this,"size"],"尺寸大小",[100,100]),new Me([this,"anchor"],"偏移比例",[.5,1]),new Me([this,"offset"],"像素偏移",[0,0]),new st([this,"renderMode"],ab,"渲染模式",0),new st([this,"rotationType"],ob,"漫游旋转类型",1),new ct([this,"actorTag"],"绑定对象"),new ct([this,"socketName"],"插槽名称"),new He([this,"positionOffset"],"位置偏移"),new He([this,"rotationOffset"],"相对姿态")],more:[...t.more,new M([this,"zOrder"],"排序",0)]}}};h(pl,"createDefaultProps",()=>({...it.createDefaultProps(),screenRender:!0,size:et([100,100]),anchor:et([.5,1]),offset:et([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:et([0,0,0]),rotationOffset:et([0,0,0])})),h(pl,"type",pl.register("ESLabel",pl,{chsName:"标签",tags:["ESObjects"],description:"标签对象"}));let gr=pl;const Ee=class Ee extends lt{constructor(e){super(e)}func(e,t=!0){e.includes("completeJson")&&console.log("ESTestObject.completeJson",this.completeJson),e.includes("json")&&console.log("ESTestObject.json",this.json),t&&console.log("ESTestObject func")}func1(e,t){e.includes("completeJson")&&console.log("ESTestObject.completeJson",this.completeJson),e.includes("json")&&console.log("ESTestObject.json",this.json),t&&console.log("ESTestObject func")}getESProperties(){return{defaultMenu:"basic",basic:[new ct([this,"typeName"],"类型",void 0,!1,!0),new ct([this,"id"],"id",void 0,!1,!0),new ct([this,"name"],"名称"),new ct([this,"ref"],"引用",void 0,!0),new ft([this,"extras"],"扩展属性",{},void 0,!0),new yd("JSON",()=>this._jsonStr,e=>e&&(this._jsonStr=e))],general:[new X([this,"show"],"是否显示",Ee.defaults.show),new Pt([this,"color"],"颜色",Ee.defaults.color),new st([this,"paramType"],[["screen","screen"],["world","world"]],"参数类型",Ee.defaults.paramType),new gc([this,"text"],"内容",Ee.defaults.text)],dataSource:[new Oi([this,"startTime"],"开始时间",Ee.defaults.startTime),new ls([this,"code"],"js代码",Ee.defaults.code),new vd([this,"times"],"时间组",Ee.defaults.times),new ct([this,"url"],"服务地址",Ee.defaults.url),new ut("func",this.func.bind(this),[["completeJson","json"]]),new ut("func1",(e,t)=>this.func1(e,t),[["completeJson","json"],!0])],location:[new He([this,"positionOffset"],"位置偏移",Ee.defaults.positionOffset),new Di([this,"position"],"位置数组",Ee.defaults.position),new iu([this,"rotation"],"姿态数组",Ee.defaults.rotation)],coordinate:[new M([this,"height"],"高度(m)",Ee.defaults.height),new ge([this,"points"],"位置数组",Ee.defaults.points)],style:[new Sr([this,"padding"],"内边距",Ee.defaults.padding),new Me([this,"offset"],"像素偏移",Ee.defaults.offset),new dt("样式"),new dm([this,"dashPattern"],"虚线图案",255),new dt("样式2"),new Pt([this,"color"],"颜色",Ee.defaults.color),new ft([this,"strokeStyle"],"线样式参数",Ee.defaults.strokeStyle)],more:[]}}};h(Ee,"createDefaultProps",()=>({...lt.createDefaultProps(),show:!0,url:"http://localhost:8080/earthsdk3/earthsdk3.gltf",height:100,position:et([116.39,39.9,100]),rotation:et([0,-90,0]),points:_o([]),color:et([1,0,0,1]),strokeStyle:gt({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),paramType:"screen",text:"默认",code:'console.log("hello world")',dashPattern:255,startTime:Date.now(),times:et([]),offset:et([10,0]),positionOffset:et([0,2,0]),padding:et([0,2,0,2])})),h(Ee,"type",Ee.register("ESTestObject",Ee,{chsName:"测试",tags:["ESObjects"],description:""}));let Pf=Ee;const Yi=class Yi extends jt{constructor(t){super(t);h(this,"_refreshTilesetEvent",this.dv(new N));h(this,"_tilesetReadyEvent",this.dv(new N));h(this,"_supportEdit",this.dv(z(!0)));h(this,"_highlightFeatureEvent",this.dv(new N));h(this,"_highlightFeatureAndFlyToEvent",this.dv(new N));h(this,"_strokeFeatureEvent",this.disposeVar(new N));h(this,"_getFeatureTableEvent",this.dv(new N));h(this,"_featureTableResultEvent",this.dv(new N));h(this,"_getMaterialNameListEvent",this.disposeVar(new N));h(this,"_setFeatureStyleEvent",this.dv(new N));h(this,"_setFeatureColorEvent",this.dv(new N));h(this,"_setFeatureVisableEvent",this.dv(new N));h(this,"_resetFeatureStyleEvent",this.dv(new N));h(this,"setMaterialInfoEvent",this.ad(new N));h(this,"_setMaterialEvent",this.disposeVar(new N));h(this,"_clippingPlanesId",this.dv(z("")));h(this,"_clippingPlaneIds",this.dv(z([])));h(this,"_flattenedPlaneId",this.dv(z("")));h(this,"_flattenedPlaneEnabled",this.dv(z(!1)));h(this,"_clippingPlaneId",this.dv(z("")));h(this,"_excavateId",this.dv(et([])))}updateEditing(){var t;(t=this.activeViewer)==null||t.startEditing(this,[Z.Translation,Z.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(t){this._supportEdit.value=t}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(t,n){this._highlightFeatureEvent.emit(t,n)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(t,n,i,s){this._highlightFeatureAndFlyToEvent.emit(t,n,i,s)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(t,n=[1,0,0,1]){this._strokeFeatureEvent.emit(t,n)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(t=>{const n=this.d(this._featureTableResultEvent.donce(t));this._getFeatureTableEvent.emit(),setTimeout(()=>{n(),t(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(t=>{const n=new U;n.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(n.destroy(),t(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{n.isDestroyed()||(n.destroy(),t(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(t,n=!1){this._setFeatureStyleEvent.emit(t,n)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(t,n,i=!1){this._setFeatureColorEvent.emit(t,typeof n=="string"?JSON.parse(n):n,i)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(t,n,i=!1){this._setFeatureVisableEvent.emit(t,typeof n=="string"?JSON.parse(n):n,i)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(t){this._resetFeatureStyleEvent.emit(t)}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(t){return new Promise(n=>{const i=new U;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),n(s)})),this._setMaterialEvent.emit(t)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(t){this._clippingPlanesId.value=t}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(t){this._clippingPlaneIds.value=t}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(t){this._flattenedPlaneId.value=t}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(t){this._flattenedPlaneEnabled.value=t}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(t){this._clippingPlaneId.value=t}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(t){this._excavateId.value=t}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...Sf}}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",basic:[...t.basic,new Re([this,"maximumScreenSpaceError"],1,[0,256],"精度",16),new st([this,"materialMode"],[["常规","normal"],["科技感","technology"]],"材质模式","normal",!0),new st([this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"颜色模式","HIGHLIGHT"),new ft([this,"materialOverrideMap"],"材质替换",Yi.defaults.materialOverrideMap)],dataSource:[...t.dataSource,new ft([this,"url"],"服务地址",Yi.defaults.url,void 0,!0)],coordinate:[...t.coordinate,new X([this,"editing"],"编辑",!1,!0),new He([this,"offset"],"偏移",[0,0,0],!0),new iu([this,"rotation"],"旋转",[0,0,0])],more:[...t.more,new ft([this,"materialParams"],"materialParams",Yi.defaults.materialParams),new ut("高亮要素",this.highlightFeature.bind(this),["id_value","rgba(255,0,0,1)"],"highlightFeature"),new ut("高亮并且定位到要素",this.highlightFeatureAndFlyTo.bind(this),["id_value",[1116.39,39.9,100,1e3],"rgba(255,0,0,1)",1],"highlightFeatureAndFlyTo"),new ut("要素着色控制",this.setFeatureColor.bind(this),["height",[{minValue:1e5,color:[1,0,0,1]},{maxValue:5e5,color:[1,1,0,1]}]],"setFeatureColor"),new ut("要素可见性控制",this.setFeatureVisable.bind(this),["height",[{minValue:1e5,visable:!0},{maxValue:5e5,visable:!1}]],"setFeatureVisable"),new ut("重置样式",()=>this.resetFeatureStyle(),[],"resetFeatureStyle"),new dt("ue"),new ut("刷新 tileset",()=>this.refreshTileset(),[],"refreshTileset"),new ct([this,"actorTag"]),new X([this,"highlight"],"是否高亮"),new Pt([this,"highlightColor"]),new M([this,"highlightID"]),new dt("czm"),new Me([this,"czmImageBasedLightingFactor"],"反射强度"),new M([this,"czmAtmosphereScatteringIntensity"],"大气散射强度"),new ft([this,"czmEnvironmentMapManager"],"动态环境贴图管理器"),new M([this,"czmMaximumMemoryUsage"],"最大内存"),new dt("常用"),new st([this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]],"czmClassificationType","NONE",!0),new ft([this,"czmStyleJson"],"czmStyle"),new X([this,"czmBackFaceCulling"]),new X([this,"czmSkipLevelOfDetail"]),new X([this,"czmDebugWireframe"]),new M([this,"cacheBytes"],"最大缓存",512*1024*1024),new dt("调试信息"),new X([this,"czmDebugShowBoundingVolume"]),new X([this,"czmDebugShowContentBoundingVolume"]),new dt("裁剪"),new X([this,"clippingPlaneEnabled"]),new X([this,"unionClippingRegions"]),new Pt([this,"clippingPlaneEdgeColor"]),new M([this,"clippingPlaneEdgeWidth"])]}}};h(Yi,"createDefaultProps",()=>({...jt.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:et([1,0,0,1]),offset:Xt([0,0,0]),rotation:et([0,0,0]),czmImageBasedLightingFactor:et([1,1]),czmEnvironmentMapManager:Kt(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:gt({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:512*1024*1024,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:et([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:Kt({}),featureIdLabel:0,splitDirection:"NONE",czmDebugWireframe:!1})),h(Yi,"type",Yi.register("ES3DTileset",Yi,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),h(Yi,"supportEditingModes",[...jt.supportEditingModes,Z.Translation,Z.Rotation]);let mr=Yi;const gl=class gl extends it{constructor(t){super(t);h(this,"_isFlyInCreated",this.dv(z(!1)));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position)this.d(Ne([this.positionChanged,this.editingChanged],()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()},{time:"donce"}));else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(t){this._isFlyInCreated.value=t}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new st([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new M([this,"radius"],"半径",10)]}}};h(gl,"createDefaultProps",()=>({...it.createDefaultProps(),mode:"cylinder",radius:10})),h(gl,"type",gl.register("ESAlarm",gl,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"}));let If=gl;const lb=[["扫描","scan"],["扩散","diffuse"]],oo=class oo extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new M([this,"radius"],"半径",1),new st([this,"mode"],lb,"模式",oo.defaults.mode),new Pt([this,"color"],"颜色",oo.defaults.color)]}}};h(oo,"createDefaultProps",()=>({...it.createDefaultProps(),radius:1,mode:"scan",color:[0,.7,1,1],collision:!1})),h(oo,"type",oo.register("ESApertureEffect",oo,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"}));let xf=oo;const ub=Object.entries({inner:"inner",outer:"outer",both:"both"}),Un=class Un extends Ct{constructor(t){super(t);h(this,"editingBindMode","circular")}get bufferShow(){var t;return(t=this.buffer)==null?void 0:t.show}set bufferShow(t){this.buffer={...this.buffer,show:t}}get bufferShowChanged(){return this.bufferChanged}get bufferColor(){var t;return(t=this.buffer)==null?void 0:t.color}set bufferColor(t){this.buffer={...this.buffer,color:t}}get bufferColorChanged(){return this.bufferChanged}get bufferGradient(){var t;return(t=this.buffer)==null?void 0:t.gradient}set bufferGradient(t){this.buffer={...this.buffer,gradient:t}}get bufferGradientChanged(){return this.bufferChanged}get bufferDistance(){var t;return(t=this.buffer)==null?void 0:t.distance}set bufferDistance(t){this.buffer={...this.buffer,distance:t}}get bufferDistanceChanged(){return this.bufferChanged}get bufferMode(){var t;return(t=this.buffer)==null?void 0:t.mode}set bufferMode(t){this.buffer={...this.buffer,mode:t}}get bufferModeChanged(){return this.bufferChanged}get bufferLight(){var t;return(t=this.buffer)==null?void 0:t.light}set bufferLight(t){this.buffer={...this.buffer,light:t}}get bufferLightChanged(){return this.bufferChanged}getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new st([this,"classificationType"],_d,"贴地附着目标",Un.defaults.classificationType),new X([this,"instancing"],"实例化渲染",Un.defaults.instancing),new X([this,"bufferShow"],"缓冲区显隐",Un.defaults.buffer.show),new Pt([this,"bufferColor"],"缓冲区颜色",Un.defaults.buffer.color),new X([this,"bufferLight"],"缓冲区光照",Un.defaults.buffer.light),new M([this,"bufferDistance"],"缓冲区距离",Un.defaults.buffer.distance),new st([this,"bufferMode"],ub,"缓冲区模式",Un.defaults.buffer.mode),new X([this,"bufferGradient"],"缓冲区渐变",Un.defaults.buffer.gradient)],coordinate:[...t.coordinate,new M([this,"area"],"面积",0,!1,!0),new M([this,"perimeter"],"周长",0,!1,!0)]}}};h(Un,"createDefaultProps",()=>({...Ct.createDefaultProps(),buffer:gt({show:!1,color:[0,0,0,.8],gradient:!0,distance:100,mode:"outer",light:!1}),classificationType:"TERRAIN",instancing:!1,fillStyle:gt({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),strokeStyle:gt({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!0,stroked:!1,collision:!1})),h(Un,"type",Un.register("ESGeoPolygon",Un,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),h(Un,"supportEditingModes",[...Ct.supportEditingModes,Z.CircularAppend,Z.CircularInsert]);let Bt=Un;const Is=class Is extends Bt{get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:Is.defaults.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle??Is.defaults.fillStyle,materialParams:e??Is.defaults.fillStyle.materialParams}}constructor(e){super(e)}};h(Is,"createDefaultProps",()=>({...Bt.createDefaultProps(),stroked:!0,filled:!0,units:et(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"]),fillStyle:gt({color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!0}),strokeStyle:gt({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),h(Is,"type",Is.register("ESAreaMeasurement",Is,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"面积测量"}));let Tf=Is;const ml=class ml extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"general",more:[...e.more,new dt("czm"),new ct([this,"image"],"图片"),new He([this,"translation"],"偏移")]}}};h(ml,"createDefaultProps",()=>({...it.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:et([0,0,0])})),h(ml,"type",ml.register("ESBlastParticleSystem",ml,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"}));let Of=ml;const _i=class _i extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new X([this,"reverse"],"反转",_i.defaults.reverse),new He([this,"size"],"尺寸",_i.defaults.size),new Pt([this,"edgeColor"],"边框颜色",_i.defaults.edgeColor),new M([this,"edgeWidth"],"边框宽度",_i.defaults.edgeWidth),new ct([this,"targetID"],"目标图层id",_i.defaults.targetID)]}}};h(_i,"createDefaultProps",()=>({...it.createDefaultProps(),reverse:!1,edgeColor:et([1,1,1,1]),edgeWidth:2,size:et([10,10,10]),targetID:""})),h(_i,"type",_i.register("ESBoxClipping",_i,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"}));let Df=_i;const $u=class $u extends it{constructor(){super(...arguments);h(this,"_thumbnail",this.dv(z("")));h(this,"_duration",this.dv(z(1)));h(this,"_resetWithCurrentCameraEvent",this.dv(new N));h(this,"_captureEvent",this.dv(new N))}get thumbnail(){return this._thumbnail.value}set thumbnail(t){this._thumbnail.value=t}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(t){this._duration.value=t}get durationChanged(){return this._duration.changed}flyIn(t=1,n="default"){this.flyInEvent.emit(t,-1,n)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(t,n){this._captureEvent.emit(t,n)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new dt("视角信息"),new ut("设置为当前视角",()=>this.resetWithCurrentCamera(),[]),new ut("获取缩略图",(n,i)=>this.capture(n,i),[64,64],"capture"),new ct([this,"thumbnail"],"缩略图","",!0),new M([this,"duration"],"飞行时间",1,!0)]}}};h($u,"type",$u.register("ESCameraView",$u,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"}));let uh=$u;class ch extends U{constructor(t,n,i){super();h(this,"_view",this.dv(new uh));if(this.d(t.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${t.views.length+1}`,n){const a=this._view,l=n;a.duration=l.duration??1,a.position=l.position,a.rotation=l.rotation??[0,0,0],a.thumbnail=l.thumbnail??"",a.name=l.name}else{const a=(i==null?void 0:i.size)??[64,64];this.d(Sa(()=>{this._view.resetWithCurrentCamera(),this._view.capture(a[0],a[1])}))}const s=this._view,o=this.dv(Se(s.durationChanged,s.positionChanged,s.rotationChanged,s.thumbnailChanged,s.nameChanged));this.d(o.don(()=>t.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const t=this._view;return{duration:t.duration,position:t.position,rotation:t.rotation,thumbnail:t.thumbnail,name:t.name}}}const Gr=class Gr extends lt{constructor(t){super(t);h(this,"_currentViewIndex",this.dv(z(-1)));h(this,"_viewWrappers",this.dv(new Jl));h(this,"_currentViewWrapper",this.dv(z(void 0)));h(this,"_container",this.dv(z(void 0)));this.initProcessing();{const n=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};n(),this.d(this._viewWrappers.changedEvent.don(n))}{const n=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};n(),this.d(this._viewWrappers.changedEvent.don(n)),this.d(this._currentViewWrapper.changed.don(n))}this.d(()=>{this.clearAllViews()})}get json(){return{...this._innerGetJson(),views:this.views}}set json(t){this._innerSetJson(t),this.views=t.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(t){this._container.value=t}get views(){return Fy(this._viewWrappers,t=>t.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(t){if(t.length===this._viewWrappers.length){const n=this._viewWrappers;if(t.every((i,s)=>{const o=n.get(s).view;return i.duration===o.duration&&oh(i.position,o.position)&&oh(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let n of t)this._viewWrappers.push(new ch(this,n))}_getIndex(t){return this._viewWrappers.indexOf(t)}clearAllViews(){for(let t of this._viewWrappers)t.destroy();this._viewWrappers.length=0}add(t=`视角${this.views.length+1}`,n=[64,64]){this._viewWrappers.push(new ch(this,void 0,{name:t,size:n}))}update(t,n,i=[64,64]){if(t>=this._viewWrappers.length||t<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const s=this._viewWrappers.get(t);return n&&(s.view.name=n),s.view.resetWithCurrentCamera(),s.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new ch(this))}insertView(t){if(this._viewWrappers.length+1<=t||t<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(t,0,new ch(this))}setCurrentView(t){if(t>=this._viewWrappers.length||t<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const n=this._viewWrappers.get(t);return this._currentViewWrapper.value=n,!0}resetView(t){if(t>=this._viewWrappers.length||t<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const n=this._viewWrappers.get(t);n.view.resetWithCurrentCamera(),n.view.capture()}resetViewName(t,n){if(t>=this._viewWrappers.length||t<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(t);i.view.name=n}updateView(t,n){if(t>=this._viewWrappers.length||t<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(t);return i.view.position=n.position,i.view.rotation=n.rotation??[0,0,0],i.view.duration=n.duration??1,i.view.thumbnail=n.thumbnail??"",i.view.name=n.name??"",!0}flyToView(t){if(this.setCurrentView(t)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const n=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(n,this.flyMode??Gr.defaults.flyMode)}}flyToPrevView(){const t=this._currentViewWrapper.value;if(!t)return this.flyToView(0),!0;const n=this._getIndex(t);return this.loop??Gr.defaults.loop?(this.flyToView((this._viewWrappers.length+n-1)%this._viewWrappers.length),!0):n-1<0?!1:(this.flyToView(n-1),!0)}moveToPreView(){const t=this._currentViewWrapper.value;if(!t)return;const n=this._getIndex(t);if(n===0)return;const i=this._viewWrappers.splice(n-1,1,t)[0];this._viewWrappers.set(n,i)}moveToNextView(){const t=this._currentViewWrapper.value;if(!t)return;const n=this._getIndex(t);if(n===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(n+1,1,t)[0];this._viewWrappers.set(n,i)}flyToNextView(){const t=this._currentViewWrapper.value;if(!t)return this.flyToView(0),!0;const n=this._getIndex(t);return this.loop??Gr.defaults.loop?(this.flyToView((n+1)%this._viewWrappers.length),!0):n+1>this._viewWrappers.length-1?!1:(this.flyToView(n+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(t){if(t<0||t>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(t).destroy(),this._viewWrappers.splice(t,1)}deleteCurrentView(){const t=this._currentViewWrapper.value;if(!t){console.warn("!this._currentViewWrapper.value");return}const n=this._getIndex(t);if(n===-1){console.warn("index === -1");return}this.deleteView(n)}transitionImageUrl(t){return lt.context.getStrFromEnv(t)}_flyStep(t){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const n=this.intervalTime??Gr.defaults.intervalTime,s=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+n)*1e3;return t.promise(Zl(s)).then(()=>this._flyStep(t))}initProcessing(){const t=this.dv(nr(async i=>this._flyStep(i))),n=()=>{this.playing?t.restart():t.cancel()};n(),this.d(this.playingChanged.don(n))}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new st([this,"flyMode"],[["默认","default"],["直线飞行","uniform"]],"飞行模式",Gr.defaults.flyMode),new ut("添加视角",()=>this.addView(),[],"addView"),new ut("插入视角",n=>this.insertView(n),[0],"insertView"),new ut("清空视角",()=>this.clearAllViews(),[],"clearAllViews"),new ut("当前位置插入视角",()=>this.insertView(this.currentViewIndex+1),[],"insertView"),new ut("上一个视角",()=>this.flyToPrevView(),[],"flyToPrevView"),new ut("下一个视角",()=>this.flyToNextView(),[],"flyToNextView"),new ut("飞入指定视角",n=>this.flyToView(n),[0],"flyToView"),new ut("更改指定视角为轮播视角",n=>this.setCurrentView(n),[0],"setCurrentView"),new ut("删除当前视角",()=>this.deleteCurrentView(),[],"deleteCurrentView"),new ut("删除指定视角",n=>this.deleteView(n),[0],"deleteView"),new ut("更改指定视角为当前视角信息",n=>this.resetView(n),[0],"resetView"),new M([this,"currentViewIndex"],"当前序号",-1,!1,!0),new fm([this,"playing"],()=>this.stop(),[this,"loop"],"播放",Gr.defaults),new X([this,"playing"],"是否播放"),new ut("停止播放",()=>this.stop(),[],"stop"),new X([this,"loop"],"是否循环"),new M([this,"intervalTime"],"间隔时间"),new ge([this,"views"],"视角集合",[],void 0,!0)]}}};h(Gr,"createDefaultProps",()=>({...lt.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})),h(Gr,"type",Gr.register("ESCameraViewCollection",Gr,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"}));let hh=Gr;const vl=class vl extends it{constructor(t){super(t);h(this,"editingBindMode","doublePoints")}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new M([this,"aspectRatio"],"宽高比",1.77778),new M([this,"fov"],"横向夹角",90),new M([this,"far"],"视野长度",100),new M([this,"near"],"近面距离",5)]}}};h(vl,"createDefaultProps",()=>({...it.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})),h(vl,"type",vl.register("ESCameraVisibleRange",vl,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"}));let Nf=vl;const yl=class yl extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new st([this,"mode"],[["警车","policeCar"]],"模式","policeCar")]}}};h(yl,"createDefaultProps",()=>({...it.createDefaultProps(),mode:"policeCar",allowPicking:!0})),h(yl,"type",yl.register("ESCar",yl,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"}));let dh=yl;const Zo=class Zo extends Ct{constructor(t){super(t);h(this,"editingBindMode","circular")}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new M([this,"height"],"高度",10)],coordinate:[...t.coordinate,new M([this,"area"],"面积",0,!1,!0),new M([this,"perimeter"],"周长",0,!1,!0)]}}};h(Zo,"createDefaultProps",()=>({...Ct.createDefaultProps(),height:10,filled:!0,fillStyle:gt({material:"",materialParams:{},ground:!0,color:[1,1,1,1]})})),h(Zo,"type",Zo.register("ESClassification",Zo,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),h(Zo,"supportEditingModes",[...Ct.supportEditingModes,Z.CircularAppend,Z.CircularInsert,Z.HeightModify]);let fh=Zo;const _l=class _l extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new X([this,"showArrow"],"显示箭头",!0),new Pt([this,"edgeColor"],"线框颜色",[1,1,1,1]),new M([this,"edgetWidth"],"线框宽度",2),new M([this,"width"],"裁剪宽度",200),new M([this,"height"],"裁剪高度",200),new ct([this,"targetID"],"目标图层id","")]}}};h(_l,"createDefaultProps",()=>({...it.createDefaultProps(),showArrow:!0,edgeColor:et([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})),h(_l,"type",_l.register("ESClippingPlane",_l,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"}));let Mf=_l;class cb extends U{constructor(e,t,n){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${t.id})(viewer: ${n.id}) container`);{const l=()=>{const c=` ${t.cssText}
46
- ${t.cssAllInitial?"all: initial;":""}
47
- ${t.show?"":"display: none"}
48
- `;i.style.cssText=c};l();const u=this.dv(Se(t.cssAllInitialChanged,t.cssTextChanged,t.showChanged));this.d(u.don(l))}e.appendChild(i),this.d(()=>e.removeChild(i));const s=this.dv(Se(t.instanceClassChanged,t.containerChanged,t.shadowDomChanged)),o=this.dv(new Ie(s,()=>{const{instanceClass:l,container:u}=t;if(!l||u)return;let c=i;if(i.firstElementChild&&i.removeChild(i.firstElementChild),t.shadowDom){const d=i.appendChild(document.createElement("div"));d.setAttribute("xe2-div",`ESCustomDiv(${t.id})(viewer: ${n.id}) container shadowDiv`),c=d.attachShadow({mode:"open"}).appendChild(document.createElement("div")),c.setAttribute("xe2-div",`ESCustomDiv(${t.id})(viewer: ${n.id}) container shadowDiv div`)}return new l(c,t,n)})),{_updateEvent:a}=t;this.d(a.don(l=>{if(o.obj)try{l(o.obj,t,n)}catch(u){console.error(`ESCustomDiv update error! ${u}`)}}))}}const Xy=`class MyDiv {
41
+ `,ye=class ye extends b{constructor(){super();a(this,"_ratio",this.dv(y(0)));a(this,"_subPlayers",this.dv(new Xs));const e=this.dv(new Rn);{const o=()=>{e.loop=this.loop??ye.defaults.loop};o(),this.d(this.loopChanged.don(o))}{const o=()=>{(this.loop??ye.defaults.loop)!==e.loop&&(this.loop=e.loop)};o(),this.d(e.loopChangedEvent.don(o))}{const o=()=>{e.currentTime=this.currentTime??ye.defaults.currentTime};o(),this.d(this.currentTimeChanged.don(o))}{const o=()=>{(this.currentTime??ye.defaults.currentTime)!==e.currentTime&&(this.currentTime=e.currentTime)};o(),this.d(e.currentTimeChangedEvent.don(o))}{const o=()=>{e.duration=this.duration??ye.defaults.duration};o(),this.d(this.durationChanged.don(o))}{const o=()=>{(this.duration??ye.defaults.duration)!==e.duration&&(this.duration=e.duration)};o(),this.d(e.durationChangedEvent.don(o))}{const o=()=>{e.speed=this.speed??ye.defaults.speed};o(),this.d(this.speedChanged.don(o))}{const o=()=>{(this.speed??ye.defaults.speed)!==e.speed&&(this.speed=e.speed)};o(),this.d(e.speedChangedEvent.don(o))}{const o=()=>{e.playing=this.playing??ye.defaults.playing};o(),this.d(this.playingChanged.don(o))}{const o=()=>{(this.playing??ye.defaults.playing)!==e.playing&&(this.playing=e.playing)};o(),this.d(e.playingChangedEvent.don(o))}const t=()=>{const o=this.duration??ye.defaults.duration;o>0&&(this._ratio.value=(this.currentTime??ye.defaults.currentTime)/o)};t();const i=this.dv(ae(this.currentTimeChanged,this.durationChanged));this.d(i.don(t)),this.d(()=>{const{length:o}=this._subPlayers;for(let h=0;h<o;++h)this._subPlayers.get(h).destroy();this._subPlayers.length=0});const r=()=>{for(let h of this._subPlayers)h.destroy();if(this._subPlayers.length=0,!this.channels)return;const o=this.channels.map(h=>{const[c,l,u]=h;return new Zu(c,l,u,this)});this._subPlayers.splice(0,0,...o)};r(),this.d(this.channelsChanged.don(r))}get ratio(){return this._ratio.value}set ratio(e){Math.abs(this._ratio.value-e)<.001||(this.currentTime=(this.duration??ye.defaults.duration)*e)}get ratioChanged(){return this._ratio.changed}};a(ye,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),a(ye,"channelsReadMe",Qu);let tt=ye;(n=>{n.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:Xt(void 0,(s,e)=>s==null?void 0:s.every((t,i)=>t===e[i]),s=>[...s])})})(tt||(tt={})),Yt(tt.prototype,tt.createDefaultProps);class ep extends b{constructor(s,e,t,i){super(),this.disposeVar(new ce(s.sceneObjectChanged,()=>{let r;i.debug&&console.log("正在获取Event事件...");const o=s.sceneObject;if(o&&e){const h=e.split(".");if(h.length===0)i.debug&&console.warn("propNames.length === 0");else{let c=Mr(o,!1,...h);(!c||!(c instanceof m))&&(h[h.length-1]=h[h.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${h[h.length-1]})再试试!`),c=Mr(o,!1,...h),i.debug&&c&&console.warn("event仍然获取不到!")),c?c instanceof m?(r=c,i.debug&&console.log(`Event获取成功 propChangedName: ${e}`,r)):i.debug&&console.warn(`the prop is not event from ${o.id}-${o.name}-${o.ref}-${e}`):i.debug&&console.warn(`cannot get changed from ${o.id}-${o.name}-${o.ref}-${e}`)}}if(r){const h=new b;return h.d(r.dwon(()=>t.emit())),h}else{i.debug&&console.log(`未获取到Event!propChangedName: ${e}`);return}}))}}const bc=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:class extends b{constructor(e,t,i){super();a(this,"_doEvalEvent",this.dv(new m));const r=this._doEvalEvent,o=this.disposeVar(ae(r)),h=e.map(([c,l])=>{const u=new lo(c),p=l&&new ep(u,l,r,t)||void 0;return[u,p]});this.d(()=>{h.forEach(([c,l])=>{l==null||l.destroy(),c.destroy()}),h.length=0}),this.d(r.don(()=>{const{evalMode:c="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=t;if(c==="Immediate"){const u=h.map(([p])=>p.sceneObject);(!l||u.every(p=>p!==void 0))&&i(u)}})),this.d(o.don(()=>{const{evalMode:c="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=t;if(c==="NextAnimateFrame"){const u=h.map(([p])=>p.sceneObject);(!l||u.every(p=>p!==void 0))&&i(u)}}))}forceExecute(){this._doEvalEvent.emit()}}},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:tp}=bc;class an extends b{constructor(){super();a(this,"_evalFunc");a(this,"_forceExecute",new m);const e=this.dv(y(void 0)),t=()=>{try{e.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",e.value)}catch(o){console.error(`evalFunc get error! ${o}`),e.value=void 0}};t(),this.dispose(this.evalFuncStrChanged.disposableOn(t));const i=o=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(o),e.value&&e.value(o))},r=this.disposeVar(new ce(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new tp(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var o;(o=r.obj)==null||o.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(e){this._evalFunc=e}forceExecute(){this._forceExecute.emit()}}(n=>{n.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:Cn([],(s,e)=>s[0]===e[0]&&s[1]===e[1],s=>[s[0],s[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:W(void 0),devTags:ee(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(an||(an={})),Yt(an.prototype,an.createDefaultProps);const Ec=Za("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function it(n){return Ec.forward(n)}function uo(n){return Ec.inverse(n)}const Cc=Za("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");function ip(n){const s=Cc.forward([n[0],n[1]]);return[s[0],s[1],n[2]]}function sp(n){const s=Cc.inverse([n[0],n[1]]);return[s[0],s[1],n[2]]}function np(n,s){const e=n[0],t=n[n.length-1];(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2])&&n.push(e);const i=X.point(s),r=X.polygon([n]);return X.booleanPointInPolygon(i,r)}function rp(n,s){const e=U.lineString(n);return U.along(e,s,{units:"meters"}).geometry.coordinates}function po(n){if((n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),n.length<=3)return 0;const s=U.polygon([n]);return U.area(s)}function op(n){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]);const s=U.polygon([n]),t=U.centerOfMass(s).geometry.coordinates;return[t[0],t[1],t[2]??n[0][2]??0]}function go(...n){let[s,e,t,i]=n;const[r,o,h]=s;if(Array.isArray(e)){const[c,l,u]=e,p=Math.sqrt(c*c+l*l);let g=0;p>0&&(g=Math.atan2(c,l)*(180/Math.PI),g<0&&(g+=360));const f=U.destination(U.point([r,o]),p,g,{units:"meters"});return!f||!f.geometry||!f.geometry.coordinates?void 0:(t=t||[0,0,0],t[0]=f.geometry.coordinates[0],t[1]=f.geometry.coordinates[1],t[2]=h+(u||0),t)}else{const c=U.destination(U.point([r,o]),e,t,{units:"meters"});return!c||!c.geometry||!c.geometry.coordinates?void 0:(i=i||[0,0,0],i[0]=c.geometry.coordinates[0],i[1]=c.geometry.coordinates[1],i[2]=h,i)}}function Bn(n,s){return U.distance(U.point(n),U.point(s),{units:"meters"})}function hn(n,s){return U.bearing(U.point(n),U.point(s))}function ap(n,s){return U.lineIntersect(U.lineString(n),U.lineString(s))}function hp(n,s){const e=U.point(n),t=U.point(s),i=U.midpoint(e,t),r=(n[2]+s[2])/2;return[...i.geometry.coordinates,r]}function cp(n,s){const e=U.point(s),t=U.lineString(n);return U.nearestPointOnLine(t,e,{units:"meters"})}function lp(n,s){const e=U.point(n),t=U.lineString(s);return U.pointToLineDistance(e,t,{units:"meters"})}function dp(n,s,e,t){const[i,r,o]=n,h=U.rhumbDestination(U.point([i,r]),s,e,{units:"meters"});if(!(!h||!h.geometry||!h.geometry.coordinates))return t=t||[0,0,0],t[0]=h.geometry.coordinates[0],t[1]=h.geometry.coordinates[1],t[2]=o,t}function Sc(n,s){return U.rhumbDistance(U.point(n),U.point(s),{units:"meters"})}function up(n,s){return U.rhumbBearing(U.point(n),U.point(s))}function Pc(n,s){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(s[0][0]!==s[s.length-1][0]||s[0][1]!==s[s.length-1][1]||s[0][2]!==s[s.length-1][2])&&s.push(s[0]);const e=U.intersect(U.polygons([[n],[s]]));if(e)return e.geometry.coordinates}function Tc(n,s){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(s[0][0]!==s[s.length-1][0]||s[0][1]!==s[s.length-1][1]||s[0][2]!==s[s.length-1][2])&&s.push(s[0]);const e=U.union(U.polygons([[n],[s]]));if(e)return e.geometry.coordinates}function Ic(n,s=500,e="meters"){const t=U.buffer(U.lineString(n),s,{units:e});if(t)return t.geometry.coordinates}function Oc(n,s){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(s[0][0]!==s[s.length-1][0]||s[0][1]!==s[s.length-1][1]||s[0][2]!==s[s.length-1][2])&&s.push(s[0]);const e=U.difference(U.polygons([[n],[s]]));if(e)return e.geometry.coordinates}function Dc(n,s,e=10,t="meters"){const i={steps:e,units:t};return U.circle(n,s,i).geometry.coordinates}function fo(n,s){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(s[0][0]!==s[s.length-1][0]||s[0][1]!==s[s.length-1][1]||s[0][2]!==s[s.length-1][2])&&s.push(s[0]);const e=U.polygon([n]),t=U.polygon([s]);return U.booleanContains(e,t)?"oneBig":U.booleanWithin(e,t)?"twoBig":!1}function Hn(n){const s=Kt(mi(n,["0"])),e=Kt(mi(n,["1"])),t=Kt(mi(n,["2"])),i=At(mi(n,["0"])),r=At(mi(n,["1"])),o=At(mi(n,["2"]));return{minPos:[s,e,t],maxPos:[i,r,o],center:[(s+i)*.5,(e+r)*.5,(t+o)*.5]}}function Fc(n){const{minPos:s,maxPos:e,center:t}=Hn(n);if(s.some(h=>!Number.isFinite(h)||e.some(c=>!Number.isFinite(c))||t.some(c=>!Number.isFinite(c)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=Bn(s,e);let r=i*.5;const o=Math.abs(s[2]-e[2]);return o!=0&&(r=Math.sqrt(i*i+o*o)*.5),{center:t,radius:r}}function xc(n,s){const e=it(n),t=it(s);return d.Vector.distance(e,t)}function Lt(n,s){const e=[],t=n.length;let i=0;for(let r=0;r<t-1;++r){if(s===void 0||s==="GEODESIC"){const o=Bn(n[r],n[r+1]),h=Math.abs(n[r][2]-n[r+1][2]);if(h===0)i+=o;else{const c=Math.sqrt(o*o+h*h);i+=c}}else if(s==="RHUMB"){const o=Sc(n[r],n[r+1]),h=Math.abs(n[r][2]-n[r+1][2]);if(h===0)i+=o;else{const c=Math.sqrt(o*o+h*h);i+=c}}else if(s==="NONE"){const o=xc(n[r],n[r+1]);i+=o}else console.warn(`未知的arcType: ${s},导致距离无法计算!`);e.push(i)}return e}function mo(n){const s="__getXyzFromPostion";let e=Ae(n,s);return(!e||!d.Vector.equals(e[0],n))&&(e=[[...n],it(n)],gt(n,s,e)),e[1]}class pp{constructor(s={}){a(this,"points");a(this,"duration");a(this,"sharpness");a(this,"centers");a(this,"controls");a(this,"stepLength");a(this,"length");a(this,"delay");a(this,"steps");this.points=s.points||[],this.duration=s.duration||1e4,this.sharpness=s.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=s.stepLength||60,this.length=this.points.length,this.delay=0;for(let e=0;e<this.length;e++)this.points[e].z=this.points[e].z||0;for(let e=0;e<this.length-1;e++){const t=this.points[e],i=this.points[e+1];this.centers.push({x:(t.x+i.x)/2,y:(t.y+i.y)/2,z:(t.z+i.z)/2})}this.controls.push([this.points[0],this.points[0]]);for(let e=0;e<this.centers.length-1;e++){const t=this.points[e+1].x-(this.centers[e].x+this.centers[e+1].x)/2,i=this.points[e+1].y-(this.centers[e].y+this.centers[e+1].y)/2,r=this.points[e+1].z-(this.centers[e].z+this.centers[e+1].z)/2;this.controls.push([{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e].x+t),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e].y+i),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e].z+r)},{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e+1].x+t),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e+1].y+i),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e+1].z+r)}])}this.controls.push([this.points[this.length-1],this.points[this.length-1]]),this.steps=this.cacheSteps(this.stepLength)}cacheSteps(s){const e=[];let t=this.pos(0);e.push(0);for(let i=0;i<this.duration;i+=10){const r=this.pos(i);Math.sqrt((r.x-t.x)*(r.x-t.x)+(r.y-t.y)*(r.y-t.y)+(r.z-t.z)*(r.z-t.z))>s&&(e.push(i),t=r)}return e}vector(s){const e=this.pos(s+10),t=this.pos(s-10);return{angle:180*Math.atan2(e.y-t.y,e.x-t.x)/3.14,speed:Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)+(t.z-e.z)*(t.z-e.z))}}pos(s){let e=s-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);const t=e/this.duration;if(t>=1)return this.points[this.length-1];const i=Math.floor((this.points.length-1)*t),r=(this.length-1)*t-i;return gp(r,this.points[i],this.controls[i][1],this.controls[i+1][0],this.points[i+1])}}function gp(n,s,e,t,i){const r=fp(n);return{x:i.x*r[0]+t.x*r[1]+e.x*r[2]+s.x*r[3],y:i.y*r[0]+t.y*r[1]+e.y*r[2]+s.y*r[3],z:i.z*r[0]+t.z*r[1]+e.z*r[2]+s.z*r[3]}}function fp(n){const s=n*n;return[s*n,3*s*(1-n),3*n*(1-n)*(1-n),(1-n)*(1-n)*(1-n)]}function mp(n,s){s===void 0&&(s={});var e=s.resolution||1e3,t=s.sharpness||.85;const i=[],r=n.map(l=>{const[u,p,g]=it(l);return{x:u,y:p,z:g}});for(var o=new pp({duration:e,points:r,sharpness:t}),h=function(l){var u=o.pos(l);const p=uo([u.x,u.y,u.z]);i.push(p)},c=0;c<o.duration;c+=10)h(c);return h(o.duration),i}function rs(n,s,e){return mp(n,{resolution:s,sharpness:e})}function vo(n){return Xt(n,(s,e)=>s[0]===e[0]&&s[1]===e[1],s=>[...s])}function kc(n,s){const e=new Array;for(let t of n)e.push(s(t));return e}function $n(n,s){return n===void 0&&s===void 0?!0:!n||!s?!1:n[0]===s[0]&&n[1]===s[1]&&n[2]===s[2]}function Mc(n,s,e){var i;((i=s.attachedViewers.values().toArray()[0])==null?void 0:i.getEngineObject(s))?e.call(n):requestAnimationFrame(()=>Mc(n,s,e))}function vp(n,s,e,t=!0){t&&e(),n.dispose(s.disposableOn(e))}function _p(n,s){const{type:e,id:t}=n;if(e){const i=k.create(e,t);if(i)return i.json=n,i;console.warn(`cannot create sceneObject from type(${e})`)}else console.warn(`cannot create sceneObject from type(${e})`)}function jc(n){const s=n.children&&xr(n.children,t=>{if(!(t instanceof Oe))throw new Error("!(treeItem instanceof SceneTreeItem)");return!t.show})||!1,e=n.sceneTree.getSceneObjectShowFunc(n.sceneObject);return!s||e}class Oe extends nn{constructor(e,t=!1,i,r,o=!0){super(e,t,i);a(this,"_dragDrop");a(this,"_showChangedNotAffectChildren",!1);a(this,"_showChangedNotAffectParent",!1);a(this,"_type",this.dv(y("Unknown")));a(this,"_isExport",this.dv(y(!0)));const h=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(h)),this.name=`未命名条目(${this.id})`,this.extras=r,this._isExport.value=o;let c;const l=()=>{c&&(c(),c=void 0)};this.dispose(l),this.dispose(this.sceneObjectChanged.disposableOn(u=>{l(),u&&(c=x([this,"name"],[u,"name"]))})),this.dispose(this.showChanged.disposableOn(u=>{if(e.setSceneObjectShowFunc(this.sceneObject,u),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let p of this.children)p instanceof Oe&&(p._showChangedNotAffectParent=!0,p.show=u,p._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof Oe&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=jc(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new ce(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const u=new b;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof m){const p=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};p(),u.dispose(this.sceneObject.showChanged.disposableOn(p))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof m){const p=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};p(),u.dispose(this.sceneObject.enabledChanged.disposableOn(p))}return u})),this.childrenChangedEvent.disposableOn(()=>{const u=jc(this);this._showChangedNotAffectChildren=!0,this.show=u,this._showChangedNotAffectChildren=!1});{const u=()=>{let p="Unknown";this.sceneObject?p=this.sceneObject.typeName:this.children&&(p="Folder"),this._type.value=p};this.dispose(this.sceneObjectChanged.disposableOn(u)),this.dispose(this.childrenResetedEvent.disposableOn(u)),u()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(e){this._isExport.value=e}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){try{this.json=JSON.parse(e)}catch(t){console.error(`sceneTreeItem.jsonStr error ${t}`,t)}}get completeJson(){const e=this.children&&[...this.children].filter(t=>t.isExport).map(t=>t.completeJson);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.completeJson,children:e,extras:this.extras}}get json(){const e=this.children&&[...this.children].filter(t=>t.isExport).map(t=>t.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:e,extras:this.extras}}set json(e){if(e.name!==void 0&&(this.name=e.name),this.extras=e.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=e.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=e.collapsed??!1,this.sceneObject=void 0,e.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(e.sceneObj,this)),!!e.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let t of e.children){const i=new Oe(this.tree,!0);i.json=t,this.children.push(i)}}}clone(){try{const e=new Oe(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return e.json=this.json,e.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),e}catch(e){console.error(`SceneTreeItem.clone error: ${e}`,e)}}insertNewTreeItem(e,t){if(e==="FolderInnerOrAfter"||e==="FolderInnerOrBefore"||e==="FolderInner"){if(t&&t.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&!(e.includes("Or")&&this.sceneObject))return t&&this.children.push(t),!0;if(e==="FolderInner")return!1;if(e==="FolderInnerOrAfter")return super.insertNewTreeItem("After",t);if(e==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",t);throw new Error("should not be here!")}else return super.insertNewTreeItem(e,t)}}(n=>{n.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:te(void 0)})})(Oe||(Oe={})),Yt(Oe.prototype,Oe.createDefaultProps);function Rc(n,s,e){let{offsetY:t}=s;if(!s.target||!("clientTop"in s.target))return"none";t+=2,t+=s.target.clientTop;let i="none";return n.children?t<=e*.3?i="before":t>=e*.7?!n.uiTreeObject.collapsed&&n.children.length>0?i="inner":i="after":i="inner":t<=e*.5?i="before":i="after",i}class Ac extends pc{constructor(s){super(),this._treeItem=s;const{dragStartDataManager:e}=this._treeItem.sceneTree;let t="none";const i=this.disposeVar(yh(()=>{this._treeItem.uiTreeObject.moveToPositionMode=t,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${t});`)},200));function r(o){t!==o&&(t=o,i.restart())}this.dispose(this._dragStartEvent.disposableOn(o=>{e.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(o=>{if(!o.dataTransfer)return;o.preventDefault();const h=e;if(h.data&&h.data.type==="UITreeA"&&h.data.value!==void 0){const c=h.data.value,l=this._treeItem,{tree:u}=l;if(u){const p=[...u.selectedItems];~p.indexOf(c)||p.push(c);const g=Rc(l,o,u.itemDivHeight);if(g!=="none"&&bi.canMoveToTreeItems(p,l,g)){o.dataTransfer.dropEffect="move",r(g);return}}}o.dataTransfer.dropEffect="none",r("none")})),this.dispose(this._dropEvent.disposableOn(o=>{const h=e;if(!(h.data&&h.data.type==="UITreeA"&&h.data.value!==void 0))return;const c=h.data.value,l=this._treeItem,{tree:u}=l;if(!u)return;const p=[...u.selectedItems];~p.indexOf(c)||p.push(c);const g=Rc(l,o,u.itemDivHeight);g!=="none"&&bi.canMoveToTreeItems(p,l,g)&&(bi.moveToTreeItems(p,l,g),h.data=void 0,r("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{t="none",i.restart()}))}}function wp(n){if(!(n instanceof Oe))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new Ac(n)}function yp(n){let s=!1;return n&&("show"in n?s=n.show??!0:"enabled"in n&&(s=n.enabled??!0)),s}function bp(n,s){n&&("show"in n?n.show=s:"enabled"in n&&(n.enabled=s))}const Ep=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function Cp(n){const s=[],{root:e={}}=n,t=[e];for(;t.length>0;){const i=t.pop();if(!i)throw new Error("!todo");if(i.children){for(let r of i.children)if(r.children&&t.unshift(r),r.sceneObj){const{type:o=void 0}=r.sceneObj;o||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(r.sceneObj)),o&&Ep.includes(o)&&s.push(r.sceneObj)}}}return s}async function Sp(n,s){const e=Cp(n);let t=0;const i=e.length;for(let r of e)if(++t,s){const o=t/i;s(o,t,i)}}class Nc extends b{constructor(e,t){super();a(this,"treeItemContexMenuCallback");this._sceneTree=e,this._projectManager=t}get sceneTree(){return this._sceneTree}}class Pp extends b{constructor(e){super();a(this,"_jsonLoadingEvent",this.disposeVar(new m));a(this,"_setJsonProcessing",this.disposeVar(Ne(async(e,t)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),t&&await e.promise(this._sceneTree.preloadFunc(t)),this._setJson(t),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=e,this._setJsonProcessing.errorFunc=t=>{this._jsonLoadingEvent.emit({type:"error",error:t})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(e){try{this._sceneTree.setJson(e||{})}catch(t){console.error(`json数据装配时发生错误!error: ${t}`)}}get json(){return this._sceneTree.getJson()}set json(e){this._setJsonProcessing.restart(new et("JSON重新赋值!"),e)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){this.json=JSON.parse(e)}}function Tp(n){return n.name+"_clone"}function _o(n,s,e){if(n instanceof Oe)return n.insertNewTreeItem(s,e);{const t={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return n.insertNewTreeItem(t[s],e)}}function Ip(n){[n,...n.getDescendants()].forEach(s=>s.destroy())}const xe=class xe extends bi{constructor(e,t,i,r){super(i);a(this,"_jsonLoading",this.disposeVar(new Pp(this)));a(this,"createSceneObjectFunc",xe.defaultCreateSceneObjectFunc);a(this,"createTreeItemDragDropFunc",xe.defaultCreateTreeItemDragDropFunc);a(this,"preloadFunc",xe.defaultPreload);a(this,"getSceneObjectShowFunc",xe.defaultGetSceneObjectShow);a(this,"setSceneObjectShowFunc",xe.defaultSetSceneObjectShow);a(this,"getSceneTreeItemCloneNameFunc",xe.defaultGetSceneTreeItemCloneNameFunc);a(this,"debug",!1);a(this,"_contextMenu",this.disposeVar(new Nc(this,this.projectManager)));a(this,"_showPropUiOnSelecting",this.disposeVar(y(!0)));this._name=e,this._dragStartDataManager=t,this._projectManager=r,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var h,c;globalThis.lssn=this.lastSelectedItem,globalThis.lsso=(h=this.lastSelectedItem)==null?void 0:h.sceneObject,this.debug&&console.log(((c=this.lastSelectedItem)==null?void 0:c.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(h=>{for(let c of h){const l=c,{sceneObject:u}=l;u&&o.deleteSceneObject(u)&&u.destroy()&&zn(u,void 0);for(let p of l.getDescendants()){const{sceneObject:g}=p;g&&o.deleteSceneObject(g)&&g.destroy()&&zn(g,void 0)}Ip(c)}})),this.dispose(this.itemsAdded.disposableOn(h=>{for(let c of h){const l=c;l.sceneObject&&o.addSceneObject(l.sceneObject)&&zn(l.sceneObject,l)}}))}get json(){return this._jsonLoading.json}set json(e){this._jsonLoading.json=e}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(e){this._jsonLoading.jsonStr=e}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(e){this._showPropUiOnSelecting.value=e}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(e){const t=this.getDescendants();let i;for(let r of t)if(r.sceneObject&&r.sceneObject.id===e){i=r;break}return i}getTreeItemsFromSceneObjType(e){const t=this.getDescendants(),i=[],r=Array.isArray(e)?e:[e];for(let o of t)o.sceneObject&&r.includes(o.sceneObject.typeName)&&i.push(o);return i}getTreeItemsFromSceneObjName(e){var r;const t=this.getDescendants(),i=[];for(let o of t)(r=o.sceneObject)!=null&&r.name.includes(e)&&i.push(o);return i}get dragStartDataManager(){return this._dragStartDataManager}get completeJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.completeJson)}}}getJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.json)}}}setJson(e){var i;e.root=e.root||{};const t=e.root.children??[];this.root.resetChildren(!0);for(let r of t){const o=new Oe(this,!0);o.json=r,(i=this.root.children)==null||i.push(o)}}testAddNewTreeItem(e,t){const i=e||this.lastSelectedItem||this.root;return i?_o(i,t):!1}addNewTreeItem(e,t,i,r){const o=e||this.lastSelectedItem||this.root;if(o&&_o(o,t)){const h=new Oe(this,i);if(h.sceneObject=r,!_o(o,t,h))throw new Error("currentTreeItem.insertNewTreeItem return false!");return h}}createSceneObjectTreeItem(e,t,i,r){const o=r??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const h=k.create(e,t);return h?this.addNewTreeItem(i,r??"FolderInnerOrAfter",!0,h):void 0}createGroupTreeItem(e,t,i,r){const o=r??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const h=this.addNewTreeItem(i,r??"FolderInnerOrAfter",!0);if(!h){console.warn("addNewTreeItem error!");return}return h.name=e??"未命名组节点",h}createSceneObjectTreeItemFromClass(e,t,i,r){const o=r??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o))return;const h=k.createFromClass(e,t);return h?this.addNewTreeItem(i,o,!0,h):void 0}createSceneObjectTreeItemFromJson(e,t,i){const r=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(t,r))return;const o=k.createFromJson(e);return console.log(o),o?this.addNewTreeItem(t,i??"FolderInnerOrAfter",!0,o):void 0}destroySceneObjectTreeItem(e){if(e===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}e.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const e=[...this.root.children];for(let t of e)this.destroySceneObjectTreeItem(t)}};a(xe,"defaultCreateSceneObjectFunc",_p),a(xe,"defaultCreateTreeItemDragDropFunc",wp),a(xe,"defaultPreload",Sp),a(xe,"defaultGetSceneObjectShow",yp),a(xe,"defaultSetSceneObjectShow",bp),a(xe,"defaultGetSceneTreeItemCloneNameFunc",Tp);let cn=xe;const wo={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class Op extends b{constructor(e){super();a(this,"_currentPosition",this.disposeVar(ee(void 0)));a(this,"_currentRotation",this.disposeVar(ee(void 0)));a(this,"_currentHeading",this.disposeVar(y(void 0)));a(this,"_isRotating",this.disposeVar(y(!1)));a(this,"_isGround",this.disposeVar(y(!1)));a(this,"_startPosition",[0,0,0]);a(this,"_startRotation",[0,0,0]);a(this,"_processing",this.disposeVar(Ne(async(e,t,i,r)=>{const{currentPosition:o,currentRotation:h}=this;if(!o||r<=0||!h){this._currentPosition.value=t,this._currentRotation.value=i;return}const c=this._startPosition;c.splice(0,3,...o);const l=this._startRotation;l.splice(0,3,...h);let u=Date.now();const p=hn(c,t);this._currentHeading.value=p;const f=Bn(c,t)/r,w=[i[0]-l[0],i[1]-l[1],i[2]-l[2]],E=t[2]-c[2];await e.promise(new Promise(C=>{e.disposer.dispose(Tn(async()=>{let T=Date.now()-u;T=T<0?0:T,T=T>r?r:T;const R=T*f,V=go(c,R,p);if(this.isGround&&V){const I=await this._esviewer.getTerrainHeight([V[0],V[1]]);this._currentPosition.value=[V[0],V[1],I??0]}else V&&(V[2]+=E*(T/r)),this._currentPosition.value=V;if(this.isRotating){const[I,H,q]=w,Z=T/r;this._currentRotation.value=[l[0]+I*Z,l[1]+H*Z,l[2]+q*Z]}T===r&&(this._currentPosition.value=t,this.isRotating&&(this._currentRotation.value=i),this.isRotating=!1,this.isGround=!1,C())}))}))})));this._esviewer=e}get currentPosition(){return this._currentPosition.value}get currentPositionChanged(){return this._currentPosition.changed}get currentRotation(){return this._currentRotation.value}get currentRotationChanged(){return this._currentRotation.changed}get currentHeading(){return this._currentHeading.value}get currentHeadingChanged(){return this._currentHeading.changed}get isRotating(){return this._isRotating.value}set isRotating(e){this._isRotating.value=e}get isRotatingChanged(){return this._isRotating.changed}get isGround(){return this._isGround.value}set isGround(e){this._isGround.value=e}get isGroundChanged(){return this._isGround.changed}get processing(){return this._processing}restart(e,t,i){this._processing.restart(void 0,e,t,i)}cancel(){this._processing.cancel()}}const Dp=.06,Vc=1.5,Lc=2,zc=70,Uc=60;function Ei(n){return X.point(n)}function wt(n,s,e){const t=Ei(n),i=X.destination(t,e,s,{units:"meters"}),[r,o]=X.getCoords(i);return[r,o,n[2]]}function Gn(n,s){return X.bearing(Ei(n),Ei(s))}function Jn(n,s,e,t,i=1e3){const r=X.lineString([X.getCoords(X.destination(Ei(n),i,(s+180)%360,{units:"meters"})),n,X.getCoords(X.destination(Ei(n),i,s,{units:"meters"}))]),o=X.lineString([X.getCoords(X.destination(Ei(e),i,(t+180)%360,{units:"meters"})),e,X.getCoords(X.destination(Ei(e),i,t,{units:"meters"}))]),h=X.lineIntersect(r,o);if(h.features.length>0){const[c,l]=X.getCoords(h.features[0]);return[c,l,(n[2]+e[2])/2]}return e}function Wc(n,s,e,t){const i=(e-90+360)%360,r=(e+90+360)%360;n.leftPoints.push(wt(s,i-zc,t*Vc)),n.headPoints.push(wt(s,i-Uc,t*Lc)),n.headPoints.push(s),n.headPoints.push(wt(s,r+Uc,t*Lc)),n.rightPoints.push(wt(s,r+zc,t*Vc))}function Fp(n,s,e,t){const i=(s-90+360)%360,r=(s+90+360)%360,o=e*Dp*Math.min(.3,1-t);return{leftPoint:wt(n,i,o),rightPoint:wt(n,r,o),verticalLen:o}}function xp(n,s){if(!n||n.length<2)return;const e=s==="swallowTailArrow",t=n.length,i=t-1,r=Math.max(...Lt(n,"NONE")),o={leftPoints:[],rightPoints:[],headPoints:[]};let h;for(let f=0;f<t;f++){const w=n[f],E=f==i?n[n.length-2]:n[f+1],C=f==i?Gn(E,w):Gn(w,E),{leftPoint:T,rightPoint:R,verticalLen:V}=Fp(w,C,r,f/t);f===0?(o.leftPoints.push(T),o.rightPoints.push(R),e&&(o.tailPoint=wt(w,C,V))):f===i?Wc(o,w,C,V):h!==void 0?(o.leftPoints.push(Jn(o.leftPoints[f-1],h,T,C,r)),o.rightPoints.push(Jn(o.rightPoints[f-1],h,R,C,r))):(o.leftPoints.push(T),o.rightPoints.push(R)),h=C}const c=o.leftPoints,l=o.rightPoints,u=c.length>=2?rs(c):c,p=l.length>=2?rs(l):l,g=[...u,...o.headPoints,...p.reverse()];return o.tailPoint&&g.push(o.tailPoint),g.push(o.leftPoints[0]),g}function kp(n,s,e,t){const i=X.lineString([[n[0],n[1]],[s[0],s[1]]]),r=X.lineString([[e[0],e[1]],[t[0],t[1]]]);return X.lineIntersect(i,r).features.length>0}function Mp(n,s,e,t){const i=(s-90+360)%360,r=(s+90+360)%360,o=e*Math.min(.3,1-t);return{leftPoint:wt(n,i,o),rightPoint:wt(n,r,o),verticalLen:o}}function jp(n,s){if(!n||n.length<3)return;const e=s==="swallowTailArrow",t=n.length,i=t-1,r=n.slice(0,2),o=Hn(r),h=Lt(r,"NONE").pop()??0,c=Math.max(...Lt(n,"NONE")),l={leftPoints:[],rightPoints:[],headPoints:[]};let u;for(let C=1;C<t;C++){const T=C===1?o.center:n[C],R=C===i?n[t-2]:n[C+1],V=C===i?Gn(R,T):Gn(T,R);let{leftPoint:I,rightPoint:H,verticalLen:q}=Mp(T,V,h,C/t);if(C===1)l.leftPoints.push(r[0]),l.rightPoints.push(r[1]),e&&(l.tailPoint=wt(T,V,h));else if(C===i)Wc(l,T,V,q);else if(u!==void 0){if(C===2&&kp(l.leftPoints[0],I,l.rightPoints[0],H)){const Me=l.leftPoints[0];l.leftPoints[0]=l.rightPoints[0],l.rightPoints[0]=Me}const Z=C-2;l.leftPoints.push(Jn(l.leftPoints[Z],u,I,V,c)),l.rightPoints.push(Jn(l.rightPoints[Z],u,H,V,c))}else l.leftPoints.push(I),l.rightPoints.push(H);u=V}let p=l.leftPoints,g=l.rightPoints;const f=p.length>=2?rs(p):p,w=g.length>=2?rs(g):g,E=[...f,...l.headPoints,...w.reverse()];return l.tailPoint&&E.push(l.tailPoint),E.push(p[0]),E}function yo(n,s,e=!1){return e?jp(n,s):xp(n,s)}function Bc(n){let s=0;function e(t,i){i++,s=Math.max(i,s),t.forEach(r=>{Array.isArray(r)&&e(r,i)})}return e(n,0),s}const bt=class bt extends Y{constructor(e){super(e);a(this,"editingBindMode","lineString");a(this,"_area",this.dv(y(0)));a(this,"_perimeter",this.dv(y(0)));this.d(ue(this.pointsChanged,()=>{this._updateArea(),this._updatePerimeter()},{immediate:!0}))}updateEditing(){var t;const e=[];this.editingBindMode=="doublePoints"?e.push(D.DoublePoints):this.editingBindMode=="lineString"?e.push(D.LineStringAppend,D.LineStringInsert,D.Translation):this.editingBindMode=="circular"?(e.push(D.CircularAppend,D.CircularInsert,D.Translation),this.supportEditingModes().includes(D.HeightModify)&&e.push(D.HeightModify)):this.editingBindMode=="visibility"?e.push(D.VisibilityAppend,D.VisibilityModify):this.editingBindMode=="scatter"&&e.push(D.ScatterAppend,D.ScatterModify),(t=this.activeViewer)==null||t.startEditing(this,e,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return po([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const e=Lt(this.points,"GEODESIC");return e[e.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const e=[...this.points,this.points[0]],t=Lt(e,"GEODESIC");return t[t.length-1]}else return}getIntersect(e){if(this.points&&this.points.length>=3&&e.length>=3){const t=Pc(this.points,e);if(!t)return;const i=t[0][0][0];if(Array.isArray(i)){const r=[...t],o=[];return r.forEach(h=>{const c=h[0].map(l=>[...l,0]);o.push(c)}),o}else return[[...t][0].map(h=>[...h,0])]}else return}getUnion(e){if(this.points&&this.points.length>=3&&e.length>=3){const t=Tc(this.points,e);if(!t)return;const i=t[0][0][0];if(Array.isArray(i)){const r=[...t],o=[];return r.forEach(h=>{const c=h[0].map(l=>[...l,0]);o.push(c)}),o}else return[[...t][0].map(h=>[...h,0])]}else return}getDifference(e){if(this.points&&this.points.length>=3&&e.length>=3){let t=[...e];const i=e[0],r=e[e.length-1];i[0]===r[0]&&i[1]===r[1]&&i[2]===r[2]||t.push(i);const o=Oc([...this.points,this.points[0]],[...t]);if(!o)return{status:"undefined",positions:void 0};const h=[...o];if(Bc(h)===3){const c=h.map(g=>g.map(f=>[...f,0]));if(c.length<=1)return{status:"notIncluded",positions:c};const l=c[0],u=c[1];return fo([...l],[...u])==="oneBig"?{status:"included",positions:c}:{status:"notIncluded",positions:c}}else if(Bc(h)===4){const l=[...h.map(p=>p.map(g=>g.map(f=>[...f,0])))],u=[];return l.forEach(p=>{u.push(p[0])}),{status:"notIncluded",positions:u}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(e=500,t){if(this.points&&this.points.length>=2){const i=Ic(this.points,e,t);return i?[i[0].map(r=>[...r,0])]:void 0}else return}geoPolygonOverlap(e){if(this.points&&this.points.length>=3&&e.length>=3){const t=fo(this.points,e);return t==="oneBig"?!0:t==="twoBig"?!1:void 0}else return}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",coordinate:[...e.coordinate,new S([this,"editing"],"编辑",!1),new re([this,"points"],"位置数组",bt.defaults.points,void 0,!0)],style:[...e.style,new L("点样式"),new S([this,"pointed"],"开启",!1),new v([this,"pointSize"],"点大小",1),new j([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new G([this,"pointColor"],"点颜色",[1,1,1,1]),new G([this,"pointOutlineColor"],"轮廓颜色",bt.defaults.pointStyle.outlineColor),new v([this,"pointOutlineWidth"],"轮廓宽度",bt.defaults.pointStyle.outlineWidth),new L("线样式"),new S([this,"stroked"],"开启线样式",!0),new S([this,"strokeGround"],"贴地",!1),new v([this,"strokeWidth"],"线宽",1),new j([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new G([this,"strokeColor"],"线颜色",[1,1,1,1]),new L("面样式"),new S([this,"filled"],"开启",!1),new S([this,"fillGround"],"贴地",!1),new G([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...e.more,new L("点样式集合"),new A([this,"pointMaterial"],"点材质"),new z([this,"pointMaterialParams"],"点材质参数",{}),new L("线样式集合"),new A([this,"strokeMaterial"],"线材质"),new z([this,"strokeMaterialParams"],"线材质参数",{}),new L("面样式集合"),new A([this,"fillMaterial"],"面材质"),new z([this,"fillMaterialParams"],"面材质参数",{})]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointOutlineColor(){return this.pointStyle.outlineColor}set pointOutlineColor(e){this.pointStyle={...this.pointStyle,outlineColor:[...e]}}get pointOutlineColorChanged(){return this.pointStyleChanged}get pointOutlineWidth(){return this.pointStyle.outlineWidth}set pointOutlineWidth(e){this.pointStyle={...this.pointStyle,outlineWidth:e}}get pointOutlineWidthChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}};a(bt,"createDefaultProps",()=>({...Y.createDefaultProps(),pointed:!1,pointStyle:W({size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),stroked:!1,strokeStyle:W({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:W({color:[1,1,1,1],material:"",materialParams:{},ground:!1}),points:fi([])})),a(bt,"type",bt.register("ESGeoVector",bt,{chsName:"地理矢量",tags:["ESObjects"],description:"地理矢量"})),a(bt,"supportEditingModes",[...Y.supportEditingModes,D.Translation]);let $=bt;const Ii=class Ii extends Y{constructor(){super(...arguments);a(this,"_statusDis",this.dv(y(!0)));a(this,"_smoothMoveEvent",this.dv(new m));a(this,"_smoothMoveWithRotationEvent",this.dv(new m));a(this,"_smoothMoveOnGroundEvent",this.dv(new m));a(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new m));a(this,"_automaticLandingEvent",this.dv(new m));a(this,"_smoothMoveKeepPitchEvent",this.dv(new m));a(this,"_smoothMoveRelativelyEvent",this.dv(new m));a(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new m));a(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var t;const e=[];this.editingBindMode=="singlePoint"?(e.push(D.SinglePoint),["ESLocationMeasurement"].includes(this.typeName)||e.push(D.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||e.push(D.Scale)):this.editingBindMode=="doublePoints"&&e.push(D.DoublePoints),(t=this.activeViewer)==null||t.startEditing(this,e,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(e,t){this._smoothMoveEvent.emit(e,t)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(e,t,i){this._smoothMoveWithRotationEvent.emit(e,t,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(e,t,i,r){this._smoothMoveOnGroundEvent.emit(e,t,i,r)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(e,t,i,r,o){this._smoothMoveWithRotationOnGroundEvent.emit(e,t,i,r,o)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const e=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(e)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(e,t){this._smoothMoveKeepPitchEvent.emit(e,t)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(e,t){this._smoothMoveRelativelyEvent.emit(e,t)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(e,t,i){this._smoothMoveRelativelyWithRotationEvent.emit(e,t,i)}getESProperties(){const e={...super.getESProperties()},t=[...e.location,new S([this,"editing"],"是否编辑"),new N("自动落地",this.automaticLanding.bind(this),[]),new _t([this,"position"],"位置数组",[0,0,0]),new rn([this,"rotation"],"姿态数组",[0,0,0]),new ve([this,"scale"],"缩放",[1,1,1]),new v([this,"minVisibleDistance"],"最小可见距离",0),new v([this,"maxVisibleDistance"],"最大可见距离",0)];return["ESHuman","ESGltfModel","ESFountainParticleSystem","ESHumanFountain"].includes(this.typeName)&&t.push(new ve([this,"positionOffset"],"位置偏移",[0,0,0])),{...e,defaultMenu:"basic",location:t,more:[...e.more,new N("平滑移动",this.smoothMove.bind(this),[[0,0,0],0]),new N("固定方向平滑移动",this.smoothMoveKeepPitch.bind(this),[[0,0,0],0]),new N("平滑偏移",this.smoothMoveWithRotation.bind(this),[[0,0,0],[0,0,0],0]),new N("贴地平滑移动",this.smoothMoveOnGround.bind(this),[0,0,0,""]),new N("贴地平滑偏移",this.smoothMoveWithRotationOnGround.bind(this),[[0,0,0],0,0,0,""]),new N("相对平滑移动",this.smoothMoveRelatively.bind(this),[[0,0,0],0]),new N("相对平滑偏移",this.smoothMoveRelativelyWithRotation.bind(this),[[0,0,0],[0,0,0],0]),new S([this,"enableVisibleDistance"],"是否应用距离显隐")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}};a(Ii,"createDefaultProps",()=>({...Y.createDefaultProps(),pointed:!1,pointStyle:W({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),position:F([0,0,0]),rotation:F([0,0,0]),positionOffset:F([0,0,0]),scale:F([1,1,1]),minVisibleDistance:y(0),maxVisibleDistance:y(0)})),a(Ii,"type",Ii.register("ESObjectWithLocation",Ii,{chsName:"对象位置",tags:["ESObjects"],description:"对象位置"})),a(Ii,"supportEditingModes",[...Y.supportEditingModes,D.SinglePoint,D.Place,D.Translation,D.Rotation,D.Scale,D.DoublePoints,D.DoublePointsAppend,D.DoublePointsModify]);let M=Ii;const us=class us extends M{getESProperties(){const s={...super.getESProperties()};return{...s,style:[...s.style,new L("点样式集合"),new S([this,"pointed"],"开启点样式",!1),new v([this,"pointSize"],"点大小",1),new j([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new G([this,"pointColor"],"点颜色",[1,1,1,1]),new L("线样式集合"),new S([this,"stroked"],"开启线样式",!1),new S([this,"strokeGround"],"是否贴地(线)",!1),new v([this,"strokeWidth"],"线宽",1),new j([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new G([this,"strokeColor"],"线颜色",[1,1,1,1]),new L("面样式集合"),new S([this,"filled"],"开启填充样式",!1),new S([this,"fillGround"],"是否贴地",!1),new G([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...s.more,new L("点样式"),new A([this,"pointMaterial"],"点材质",""),new z([this,"pointMaterialParams"],"点材质参数",{}),new L("线样式"),new A([this,"strokeMaterial"],"线材质",""),new z([this,"strokeMaterialParams"],"线材质参数",{}),new L("填充样式"),new A([this,"fillMaterial"],"面材质",""),new z([this,"fillMaterialParams"],"面材质参数",{})]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(s){this.strokeStyle={...this.strokeStyle,width:s}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(s){this.strokeStyle={...this.strokeStyle,widthType:s}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(s){this.strokeStyle={...this.strokeStyle,color:[...s]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(s){this.strokeStyle={...this.strokeStyle,material:s}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(s){this.strokeStyle={...this.strokeStyle,materialParams:s}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(s){this.strokeStyle={...this.strokeStyle,ground:s}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(s){this.fillStyle={...this.fillStyle,color:[...s]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(s){this.fillStyle={...this.fillStyle,material:s}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(s){this.fillStyle={...this.fillStyle,materialParams:s}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(s){this.fillStyle={...this.fillStyle,ground:s}}get fillGroundChanged(){return this.fillStyleChanged}};a(us,"createDefaultProps",()=>({...M.createDefaultProps(),pointed:!1,pointStyle:W({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:1}),stroked:!1,strokeStyle:W({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:W({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(us,"type",us.register("ESLocalVector",us,{chsName:"本地矢量",tags:["ESObjects"],description:"本地矢量对象"}));let os=us;const wn=class wn extends os{};a(wn,"type",wn.register("ESLocalVector2D",wn,{chsName:"本地矢量2D",tags:["ESObjects"],description:"本地矢量2D对象"}));let zt=wn;const Rp=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],Ap=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]],ps=class ps extends M{constructor(){super(...arguments);a(this,"_widgetEvent",this.dv(new m))}get widgetEvent(){return this._widgetEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new S([this,"screenRender"],"屏幕渲染",!0),new S([this,"sizeByContent"],"尺寸自适应",!0),new pe([this,"size"],"尺寸大小",[100,100]),new pe([this,"anchor"],"偏移比例",[.5,1]),new pe([this,"offset"],"像素偏移",[0,0]),new j([this,"renderMode"],Ap,"渲染模式",0),new j([this,"rotationType"],Rp,"漫游旋转类型",1),new A([this,"actorTag"],"绑定对象"),new A([this,"socketName"],"插槽名称"),new ve([this,"positionOffset"],"位置偏移"),new ve([this,"rotationOffset"],"相对姿态")],more:[...e.more,new v([this,"zOrder"],"排序",0)]}}};a(ps,"createDefaultProps",()=>({...M.createDefaultProps(),screenRender:!0,size:F([100,100]),anchor:F([.5,1]),offset:F([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:F([0,0,0]),rotationOffset:F([0,0,0])})),a(ps,"type",ps.register("ESLabel",ps,{chsName:"标签",tags:["ESObjects"],description:"标签对象"}));let Ve=ps;const oe=class oe extends k{constructor(s){super(s)}func(s,e=!0){s.includes("completeJson")&&console.log("ESTestObject.completeJson",this.completeJson),s.includes("json")&&console.log("ESTestObject.json",this.json),e&&console.log("ESTestObject func")}func1(s,e){s.includes("completeJson")&&console.log("ESTestObject.completeJson",this.completeJson),s.includes("json")&&console.log("ESTestObject.json",this.json),e&&console.log("ESTestObject func")}getESProperties(){return{defaultMenu:"basic",basic:[new A([this,"typeName"],"类型",void 0,!1,!0),new A([this,"id"],"id",void 0,!1,!0),new A([this,"name"],"名称"),new A([this,"ref"],"引用",void 0,!0),new z([this,"extras"],"扩展属性",{},void 0,!0),new ro("JSON",()=>this._jsonStr,s=>s&&(this._jsonStr=s))],general:[new S([this,"show"],"是否显示",oe.defaults.show),new G([this,"color"],"颜色",oe.defaults.color),new j([this,"paramType"],[["screen","screen"],["world","world"]],"参数类型",oe.defaults.paramType),new Vn([this,"text"],"内容",oe.defaults.text)],dataSource:[new vt([this,"startTime"],"开始时间",oe.defaults.startTime),new Vt([this,"code"],"js代码",oe.defaults.code),new no([this,"times"],"时间组",oe.defaults.times),new A([this,"url"],"服务地址",oe.defaults.url),new N("func",this.func.bind(this),[["completeJson","json"]]),new N("func1",(s,e)=>this.func1(s,e),[["completeJson","json"],!0])],location:[new ve([this,"positionOffset"],"位置偏移",oe.defaults.positionOffset),new _t([this,"position"],"位置数组",oe.defaults.position),new rn([this,"rotation"],"姿态数组",oe.defaults.rotation)],coordinate:[new v([this,"height"],"高度(m)",oe.defaults.height),new re([this,"points"],"位置数组",oe.defaults.points)],style:[new Je([this,"padding"],"内边距",oe.defaults.padding),new pe([this,"offset"],"像素偏移",oe.defaults.offset),new L("样式"),new cc([this,"dashPattern"],"虚线图案",255),new L("样式2"),new G([this,"color"],"颜色",oe.defaults.color),new z([this,"strokeStyle"],"线样式参数",oe.defaults.strokeStyle)],more:[]}}};a(oe,"createDefaultProps",()=>({...k.createDefaultProps(),show:!0,url:"http://localhost:8080/earthsdk3/earthsdk3.gltf",height:100,position:F([116.39,39.9,100]),rotation:F([0,-90,0]),points:fi([]),color:F([1,0,0,1]),strokeStyle:W({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),paramType:"screen",text:"默认",code:'console.log("hello world")',dashPattern:255,startTime:Date.now(),times:F([]),offset:F([10,0]),positionOffset:F([0,2,0]),padding:F([0,2,0,2])})),a(oe,"type",oe.register("ESTestObject",oe,{chsName:"测试",tags:["ESObjects"],description:""}));let bo=oe;const Et=class Et extends Y{constructor(e){super(e);a(this,"_refreshTilesetEvent",this.dv(new m));a(this,"_tilesetReadyEvent",this.dv(new m));a(this,"_supportEdit",this.dv(y(!0)));a(this,"_highlightFeatureEvent",this.dv(new m));a(this,"_highlightFeatureAndFlyToEvent",this.dv(new m));a(this,"_strokeFeatureEvent",this.disposeVar(new m));a(this,"_getFeatureTableEvent",this.dv(new m));a(this,"_featureTableResultEvent",this.dv(new m));a(this,"_getMaterialNameListEvent",this.disposeVar(new m));a(this,"_setFeatureStyleEvent",this.dv(new m));a(this,"_setFeatureColorEvent",this.dv(new m));a(this,"_setFeatureVisableEvent",this.dv(new m));a(this,"_resetFeatureStyleEvent",this.dv(new m));a(this,"setMaterialInfoEvent",this.ad(new m));a(this,"_setMaterialEvent",this.disposeVar(new m));a(this,"_clippingPlanesId",this.dv(y("")));a(this,"_clippingPlaneIds",this.dv(y([])));a(this,"_flattenedPlaneId",this.dv(y("")));a(this,"_flattenedPlaneEnabled",this.dv(y(!1)));a(this,"_clippingPlaneId",this.dv(y("")));a(this,"_excavateId",this.dv(F([])))}updateEditing(){var e;(e=this.activeViewer)==null||e.startEditing(this,[D.Translation,D.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(e){this._supportEdit.value=e}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(e,t){this._highlightFeatureEvent.emit(e,t)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(e,t,i,r){this._highlightFeatureAndFlyToEvent.emit(e,t,i,r)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(e,t=[1,0,0,1]){this._strokeFeatureEvent.emit(e,t)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(e=>{const t=this.d(this._featureTableResultEvent.donce(e));this._getFeatureTableEvent.emit(),setTimeout(()=>{t(),e(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(e=>{const t=new b;t.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(t.destroy(),e(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{t.isDestroyed()||(t.destroy(),e(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e,t=!1){this._setFeatureStyleEvent.emit(e,t)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(e,t,i=!1){this._setFeatureColorEvent.emit(e,typeof t=="string"?JSON.parse(t):t,i)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(e,t,i=!1){this._setFeatureVisableEvent.emit(e,typeof t=="string"?JSON.parse(t):t,i)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(e){this._resetFeatureStyleEvent.emit(e)}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(t=>{const i=new b;i.ad(this.setMaterialInfoEvent.donce(r=>{i.destroy(),t(r)})),this._setMaterialEvent.emit(e)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(e){this._clippingPlanesId.value=e}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(e){this._clippingPlaneIds.value=e}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(e){this._flattenedPlaneId.value=e}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(e){this._flattenedPlaneEnabled.value=e}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(e){this._clippingPlaneId.value=e}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(e){this._excavateId.value=e}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...wo}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new ge([this,"maximumScreenSpaceError"],1,[0,256],"精度",16),new j([this,"materialMode"],[["常规","normal"],["科技感","technology"]],"材质模式","normal",!0),new j([this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"颜色模式","HIGHLIGHT"),new z([this,"materialOverrideMap"],"材质替换",Et.defaults.materialOverrideMap)],dataSource:[...e.dataSource,new z([this,"url"],"服务地址",Et.defaults.url,void 0,!0)],coordinate:[...e.coordinate,new S([this,"editing"],"编辑",!1,!0),new ve([this,"offset"],"偏移",[0,0,0],!0),new rn([this,"rotation"],"旋转",[0,0,0])],more:[...e.more,new z([this,"materialParams"],"materialParams",Et.defaults.materialParams),new N("高亮要素",this.highlightFeature.bind(this),["id_value","rgba(255,0,0,1)"],"highlightFeature"),new N("高亮并且定位到要素",this.highlightFeatureAndFlyTo.bind(this),["id_value",[1116.39,39.9,100,1e3],"rgba(255,0,0,1)",1],"highlightFeatureAndFlyTo"),new N("要素着色控制",this.setFeatureColor.bind(this),["height",[{minValue:1e5,color:[1,0,0,1]},{maxValue:5e5,color:[1,1,0,1]}]],"setFeatureColor"),new N("要素可见性控制",this.setFeatureVisable.bind(this),["height",[{minValue:1e5,visable:!0},{maxValue:5e5,visable:!1}]],"setFeatureVisable"),new N("重置样式",()=>this.resetFeatureStyle(),[],"resetFeatureStyle"),new L("ue"),new N("刷新 tileset",()=>this.refreshTileset(),[],"refreshTileset"),new A([this,"actorTag"]),new S([this,"highlight"],"是否高亮"),new G([this,"highlightColor"]),new v([this,"highlightID"]),new L("czm"),new pe([this,"czmImageBasedLightingFactor"],"反射强度"),new v([this,"czmAtmosphereScatteringIntensity"],"大气散射强度"),new z([this,"czmEnvironmentMapManager"],"动态环境贴图管理器"),new v([this,"czmMaximumMemoryUsage"],"最大内存"),new L("常用"),new j([this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]],"czmClassificationType","NONE",!0),new z([this,"czmStyleJson"],"czmStyle"),new S([this,"czmBackFaceCulling"]),new S([this,"czmSkipLevelOfDetail"]),new S([this,"czmDebugWireframe"]),new v([this,"cacheBytes"],"最大缓存",512*1024*1024),new L("调试信息"),new S([this,"czmDebugShowBoundingVolume"]),new S([this,"czmDebugShowContentBoundingVolume"]),new L("裁剪"),new S([this,"clippingPlaneEnabled"]),new S([this,"unionClippingRegions"]),new G([this,"clippingPlaneEdgeColor"]),new v([this,"clippingPlaneEdgeWidth"])]}}};a(Et,"createDefaultProps",()=>({...Y.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:F([1,0,0,1]),offset:ee([0,0,0]),rotation:F([0,0,0]),czmImageBasedLightingFactor:F([1,1]),czmEnvironmentMapManager:te(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:W({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:512*1024*1024,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:F([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:te({}),featureIdLabel:0,splitDirection:"NONE",czmDebugWireframe:!1})),a(Et,"type",Et.register("ES3DTileset",Et,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),a(Et,"supportEditingModes",[...Y.supportEditingModes,D.Translation,D.Rotation]);let Le=Et;const gs=class gs extends M{constructor(e){super(e);a(this,"_isFlyInCreated",this.dv(y(!1)));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position)this.d(ue([this.positionChanged,this.editingChanged],()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()},{time:"donce"}));else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(e){this._isFlyInCreated.value=e}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new j([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new v([this,"radius"],"半径",10)]}}};a(gs,"createDefaultProps",()=>({...M.createDefaultProps(),mode:"cylinder",radius:10})),a(gs,"type",gs.register("ESAlarm",gs,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"}));let Eo=gs;const Np=[["扫描","scan"],["扩散","diffuse"]],ii=class ii extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new v([this,"radius"],"半径",1),new j([this,"mode"],Np,"模式",ii.defaults.mode),new G([this,"color"],"颜色",ii.defaults.color)]}}};a(ii,"createDefaultProps",()=>({...M.createDefaultProps(),radius:1,mode:"scan",color:[0,.7,1,1],collision:!1})),a(ii,"type",ii.register("ESApertureEffect",ii,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"}));let Co=ii;const Vp=Object.entries({inner:"inner",outer:"outer",both:"both"}),De=class De extends ${constructor(e){super(e);a(this,"editingBindMode","circular")}get bufferShow(){var e;return(e=this.buffer)==null?void 0:e.show}set bufferShow(e){this.buffer={...this.buffer,show:e}}get bufferShowChanged(){return this.bufferChanged}get bufferColor(){var e;return(e=this.buffer)==null?void 0:e.color}set bufferColor(e){this.buffer={...this.buffer,color:e}}get bufferColorChanged(){return this.bufferChanged}get bufferGradient(){var e;return(e=this.buffer)==null?void 0:e.gradient}set bufferGradient(e){this.buffer={...this.buffer,gradient:e}}get bufferGradientChanged(){return this.bufferChanged}get bufferDistance(){var e;return(e=this.buffer)==null?void 0:e.distance}set bufferDistance(e){this.buffer={...this.buffer,distance:e}}get bufferDistanceChanged(){return this.bufferChanged}get bufferMode(){var e;return(e=this.buffer)==null?void 0:e.mode}set bufferMode(e){this.buffer={...this.buffer,mode:e}}get bufferModeChanged(){return this.bufferChanged}get bufferLight(){var e;return(e=this.buffer)==null?void 0:e.light}set bufferLight(e){this.buffer={...this.buffer,light:e}}get bufferLightChanged(){return this.bufferChanged}getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new j([this,"classificationType"],oo,"贴地附着目标",De.defaults.classificationType),new S([this,"instancing"],"实例化渲染",De.defaults.instancing),new S([this,"bufferShow"],"缓冲区显隐",De.defaults.buffer.show),new G([this,"bufferColor"],"缓冲区颜色",De.defaults.buffer.color),new S([this,"bufferLight"],"缓冲区光照",De.defaults.buffer.light),new v([this,"bufferDistance"],"缓冲区距离",De.defaults.buffer.distance),new j([this,"bufferMode"],Vp,"缓冲区模式",De.defaults.buffer.mode),new S([this,"bufferGradient"],"缓冲区渐变",De.defaults.buffer.gradient)],coordinate:[...e.coordinate,new v([this,"area"],"面积",0,!1,!0),new v([this,"perimeter"],"周长",0,!1,!0)]}}};a(De,"createDefaultProps",()=>({...$.createDefaultProps(),buffer:W({show:!1,color:[0,0,0,.8],gradient:!0,distance:100,mode:"outer",light:!1}),classificationType:"TERRAIN",instancing:!1,fillStyle:W({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),strokeStyle:W({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!0,stroked:!1,collision:!1})),a(De,"type",De.register("ESGeoPolygon",De,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),a(De,"supportEditingModes",[...$.supportEditingModes,D.CircularAppend,D.CircularInsert]);let Q=De;const Ut=class Ut extends Q{get fillMaterial(){return this.fillStyle.material}set fillMaterial(s){this.fillStyle={...this.fillStyle,material:s}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:Ut.defaults.fillStyle.materialParams}set fillMaterialParams(s){this.fillStyle={...this.fillStyle??Ut.defaults.fillStyle,materialParams:s??Ut.defaults.fillStyle.materialParams}}constructor(s){super(s)}};a(Ut,"createDefaultProps",()=>({...Q.createDefaultProps(),stroked:!0,filled:!0,units:F(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"]),fillStyle:W({color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!0}),strokeStyle:W({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(Ut,"type",Ut.register("ESAreaMeasurement",Ut,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"面积测量"}));let So=Ut;const fs=class fs extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,defaultMenu:"general",more:[...s.more,new L("czm"),new A([this,"image"],"图片"),new ve([this,"translation"],"偏移")]}}};a(fs,"createDefaultProps",()=>({...M.createDefaultProps(),image:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/smoke.png"),translation:F([0,0,0])})),a(fs,"type",fs.register("ESBlastParticleSystem",fs,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"}));let Po=fs;const ot=class ot extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new S([this,"reverse"],"反转",ot.defaults.reverse),new ve([this,"size"],"尺寸",ot.defaults.size),new G([this,"edgeColor"],"边框颜色",ot.defaults.edgeColor),new v([this,"edgeWidth"],"边框宽度",ot.defaults.edgeWidth),new A([this,"targetID"],"目标图层id",ot.defaults.targetID)]}}};a(ot,"createDefaultProps",()=>({...M.createDefaultProps(),reverse:!1,edgeColor:F([1,1,1,1]),edgeWidth:2,size:F([10,10,10]),targetID:""})),a(ot,"type",ot.register("ESBoxClipping",ot,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"}));let To=ot;const yn=class yn extends M{constructor(){super(...arguments);a(this,"_thumbnail",this.dv(y("")));a(this,"_duration",this.dv(y(1)));a(this,"_resetWithCurrentCameraEvent",this.dv(new m));a(this,"_captureEvent",this.dv(new m))}get thumbnail(){return this._thumbnail.value}set thumbnail(e){this._thumbnail.value=e}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(e){this._duration.value=e}get durationChanged(){return this._duration.changed}flyIn(e=1,t="default"){this.flyInEvent.emit(e,-1,t)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(e,t){this._captureEvent.emit(e,t)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("视角信息"),new N("设置为当前视角",()=>this.resetWithCurrentCamera(),[]),new N("获取缩略图",(t,i)=>this.capture(t,i),[64,64],"capture"),new A([this,"thumbnail"],"缩略图","",!0),new v([this,"duration"],"飞行时间",1,!0)]}}};a(yn,"type",yn.register("ESCameraView",yn,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"}));let qn=yn;class Xn extends b{constructor(e,t,i){super();a(this,"_view",this.dv(new qn));if(this.d(e.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${e.views.length+1}`,t){const h=this._view,c=t;h.duration=c.duration??1,h.position=c.position,h.rotation=c.rotation??[0,0,0],h.thumbnail=c.thumbnail??"",h.name=c.name}else{const h=(i==null?void 0:i.size)??[64,64];this.d(Zi(()=>{this._view.resetWithCurrentCamera(),this._view.capture(h[0],h[1])}))}const r=this._view,o=this.dv(ae(r.durationChanged,r.positionChanged,r.rotationChanged,r.thumbnailChanged,r.nameChanged));this.d(o.don(()=>e.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const e=this._view;return{duration:e.duration,position:e.position,rotation:e.rotation,thumbnail:e.thumbnail,name:e.name}}}const qe=class qe extends k{constructor(e){super(e);a(this,"_currentViewIndex",this.dv(y(-1)));a(this,"_viewWrappers",this.dv(new Xs));a(this,"_currentViewWrapper",this.dv(y(void 0)));a(this,"_container",this.dv(y(void 0)));this.initProcessing();{const t=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};t(),this.d(this._viewWrappers.changedEvent.don(t))}{const t=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};t(),this.d(this._viewWrappers.changedEvent.don(t)),this.d(this._currentViewWrapper.changed.don(t))}this.d(()=>{this.clearAllViews()})}get json(){return{...this._innerGetJson(),views:this.views}}set json(e){this._innerSetJson(e),this.views=e.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}get views(){return kc(this._viewWrappers,e=>e.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(e){if(e.length===this._viewWrappers.length){const t=this._viewWrappers;if(e.every((i,r)=>{const o=t.get(r).view;return i.duration===o.duration&&$n(i.position,o.position)&&$n(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let t of e)this._viewWrappers.push(new Xn(this,t))}_getIndex(e){return this._viewWrappers.indexOf(e)}clearAllViews(){for(let e of this._viewWrappers)e.destroy();this._viewWrappers.length=0}add(e=`视角${this.views.length+1}`,t=[64,64]){this._viewWrappers.push(new Xn(this,void 0,{name:e,size:t}))}update(e,t,i=[64,64]){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const r=this._viewWrappers.get(e);return t&&(r.view.name=t),r.view.resetWithCurrentCamera(),r.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new Xn(this))}insertView(e){if(this._viewWrappers.length+1<=e||e<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(e,0,new Xn(this))}setCurrentView(e){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const t=this._viewWrappers.get(e);return this._currentViewWrapper.value=t,!0}resetView(e){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const t=this._viewWrappers.get(e);t.view.resetWithCurrentCamera(),t.view.capture()}resetViewName(e,t){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(e);i.view.name=t}updateView(e,t){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(e);return i.view.position=t.position,i.view.rotation=t.rotation??[0,0,0],i.view.duration=t.duration??1,i.view.thumbnail=t.thumbnail??"",i.view.name=t.name??"",!0}flyToView(e){if(this.setCurrentView(e)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const t=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(t,this.flyMode??qe.defaults.flyMode)}}flyToPrevView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const t=this._getIndex(e);return this.loop??qe.defaults.loop?(this.flyToView((this._viewWrappers.length+t-1)%this._viewWrappers.length),!0):t-1<0?!1:(this.flyToView(t-1),!0)}moveToPreView(){const e=this._currentViewWrapper.value;if(!e)return;const t=this._getIndex(e);if(t===0)return;const i=this._viewWrappers.splice(t-1,1,e)[0];this._viewWrappers.set(t,i)}moveToNextView(){const e=this._currentViewWrapper.value;if(!e)return;const t=this._getIndex(e);if(t===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(t+1,1,e)[0];this._viewWrappers.set(t,i)}flyToNextView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const t=this._getIndex(e);return this.loop??qe.defaults.loop?(this.flyToView((t+1)%this._viewWrappers.length),!0):t+1>this._viewWrappers.length-1?!1:(this.flyToView(t+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(e){if(e<0||e>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(e).destroy(),this._viewWrappers.splice(e,1)}deleteCurrentView(){const e=this._currentViewWrapper.value;if(!e){console.warn("!this._currentViewWrapper.value");return}const t=this._getIndex(e);if(t===-1){console.warn("index === -1");return}this.deleteView(t)}transitionImageUrl(e){return k.context.getStrFromEnv(e)}_flyStep(e){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const t=this.intervalTime??qe.defaults.intervalTime,r=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+t)*1e3;return e.promise(Zs(r)).then(()=>this._flyStep(e))}initProcessing(){const e=this.dv(Ne(async i=>this._flyStep(i))),t=()=>{this.playing?e.restart():e.cancel()};t(),this.d(this.playingChanged.don(t))}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new j([this,"flyMode"],[["默认","default"],["直线飞行","uniform"]],"飞行模式",qe.defaults.flyMode),new N("添加视角",()=>this.addView(),[],"addView"),new N("插入视角",t=>this.insertView(t),[0],"insertView"),new N("清空视角",()=>this.clearAllViews(),[],"clearAllViews"),new N("当前位置插入视角",()=>this.insertView(this.currentViewIndex+1),[],"insertView"),new N("上一个视角",()=>this.flyToPrevView(),[],"flyToPrevView"),new N("下一个视角",()=>this.flyToNextView(),[],"flyToNextView"),new N("飞入指定视角",t=>this.flyToView(t),[0],"flyToView"),new N("更改指定视角为轮播视角",t=>this.setCurrentView(t),[0],"setCurrentView"),new N("删除当前视角",()=>this.deleteCurrentView(),[],"deleteCurrentView"),new N("删除指定视角",t=>this.deleteView(t),[0],"deleteView"),new N("更改指定视角为当前视角信息",t=>this.resetView(t),[0],"resetView"),new v([this,"currentViewIndex"],"当前序号",-1,!1,!0),new lc([this,"playing"],()=>this.stop(),[this,"loop"],"播放",qe.defaults),new S([this,"playing"],"是否播放"),new N("停止播放",()=>this.stop(),[],"stop"),new S([this,"loop"],"是否循环"),new v([this,"intervalTime"],"间隔时间"),new re([this,"views"],"视角集合",[],void 0,!0)]}}};a(qe,"createDefaultProps",()=>({...k.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})),a(qe,"type",qe.register("ESCameraViewCollection",qe,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"}));let Yn=qe;const ms=class ms extends M{constructor(e){super(e);a(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new v([this,"aspectRatio"],"宽高比",1.77778),new v([this,"fov"],"横向夹角",90),new v([this,"far"],"视野长度",100),new v([this,"near"],"近面距离",5)]}}};a(ms,"createDefaultProps",()=>({...M.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})),a(ms,"type",ms.register("ESCameraVisibleRange",ms,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"}));let Io=ms;const vs=class vs extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new j([this,"mode"],[["警车","policeCar"]],"模式","policeCar")]}}};a(vs,"createDefaultProps",()=>({...M.createDefaultProps(),mode:"policeCar",allowPicking:!0})),a(vs,"type",vs.register("ESCar",vs,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"}));let Kn=vs;const Oi=class Oi extends ${constructor(e){super(e);a(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new v([this,"height"],"高度",10)],coordinate:[...e.coordinate,new v([this,"area"],"面积",0,!1,!0),new v([this,"perimeter"],"周长",0,!1,!0)]}}};a(Oi,"createDefaultProps",()=>({...$.createDefaultProps(),height:10,filled:!0,fillStyle:W({material:"",materialParams:{},ground:!0,color:[1,1,1,1]})})),a(Oi,"type",Oi.register("ESClassification",Oi,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),a(Oi,"supportEditingModes",[...$.supportEditingModes,D.CircularAppend,D.CircularInsert,D.HeightModify]);let Zn=Oi;const _s=class _s extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new S([this,"showArrow"],"显示箭头",!0),new G([this,"edgeColor"],"线框颜色",[1,1,1,1]),new v([this,"edgetWidth"],"线框宽度",2),new v([this,"width"],"裁剪宽度",200),new v([this,"height"],"裁剪高度",200),new A([this,"targetID"],"目标图层id","")]}}};a(_s,"createDefaultProps",()=>({...M.createDefaultProps(),showArrow:!0,edgeColor:F([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})),a(_s,"type",_s.register("ESClippingPlane",_s,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"}));let Oo=_s;class Lp extends b{constructor(s,e,t){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${t.id}) container`);{const c=()=>{const u=` ${e.cssText}
42
+ ${e.cssAllInitial?"all: initial;":""}
43
+ ${e.show?"":"display: none"}
44
+ `;i.style.cssText=u};c();const l=this.dv(ae(e.cssAllInitialChanged,e.cssTextChanged,e.showChanged));this.d(l.don(c))}s.appendChild(i),this.d(()=>s.removeChild(i));const r=this.dv(ae(e.instanceClassChanged,e.containerChanged,e.shadowDomChanged)),o=this.dv(new ce(r,()=>{const{instanceClass:c,container:l}=e;if(!c||l)return;let u=i;if(i.firstElementChild&&i.removeChild(i.firstElementChild),e.shadowDom){const p=i.appendChild(document.createElement("div"));p.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${t.id}) container shadowDiv`),u=p.attachShadow({mode:"open"}).appendChild(document.createElement("div")),u.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${t.id}) container shadowDiv div`)}return new c(u,e,t)})),{_updateEvent:h}=e;this.d(h.don(c=>{if(o.obj)try{c(o.obj,e,t)}catch(l){console.error(`ESCustomDiv update error! ${l}`)}}))}}const Hc=`class MyDiv {
49
45
  // subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
50
46
  // customDiv指向当前的CustomDiv场景对象
51
47
  // viewer指定当前的视口
@@ -83,11 +79,11 @@ ${l.map(c=>`${c.id} ${c.typeName}
83
79
  destroy() {
84
80
  this._container.removeChild(this._div);
85
81
  }
86
- }`,hb=`示例代码:
82
+ }`,zp=`示例代码:
87
83
  \`\`\`
88
- ${Xy}
84
+ ${Hc}
89
85
  \`\`\`
90
- `,Wr=class Wr extends lt{constructor(t){super(t);h(this,"_updateEvent",this.dv(new N));h(this,"_instanceClassReact",this.dv(z(void 0)));h(this,"_innerHtmlMounted",this.dv(new N));h(this,"_container",this.dv(z(void 0)));this.registerAttachedObjectForContainer((i,s)=>new cb(s,this,i));{const i=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};i(),this.d(this.instanceClassStrChanged.don(i))}{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const s=`class MyDiv {
86
+ `,Xe=class Xe extends k{constructor(e){super(e);a(this,"_updateEvent",this.dv(new m));a(this,"_instanceClassReact",this.dv(y(void 0)));a(this,"_innerHtmlMounted",this.dv(new m));a(this,"_container",this.dv(y(void 0)));this.registerAttachedObjectForContainer((i,r)=>new Lp(r,this,i));{const i=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};i(),this.d(this.instanceClassStrChanged.don(i))}{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const r=`class MyDiv {
91
87
  // subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
92
88
  // customDiv指向当前的CustomDiv场景对象
93
89
  // viewer指定当前的视口
@@ -105,16 +101,16 @@ ${Xy}
105
101
  destroy() {
106
102
  this._container.removeChild(this._div);
107
103
  }
108
- }`;this.instanceClassStr=s};i(),this.d(this.innerHTMLChanged.don(i))}const n=document.createElement("div");n.setAttribute("xe2-div",`ESCustomDiv(${this.id}) container`);{const i=()=>{const o=` ${this.cssText};
104
+ }`;this.instanceClassStr=r};i(),this.d(this.innerHTMLChanged.don(i))}const t=document.createElement("div");t.setAttribute("xe2-div",`ESCustomDiv(${this.id}) container`);{const i=()=>{const o=` ${this.cssText};
109
105
  ${this.cssAllInitial?"all: initial;":""}
110
106
  ${this.show?"":"display: none;"}
111
- `;n.style.cssText=o};i();const s=this.dv(Se(this.cssAllInitialChanged,this.cssTextChanged,this.showChanged));this.d(s.don(i))}{const i=()=>{if(this.containerId===void 0||this.containerId==="")this.container=void 0;else{const s=document.getElementById(this.containerId);s instanceof HTMLElement?this.container=s:(this.container=void 0,console.warn(`Div from containerId(${this.containerId}) is not HTMLDivElement!`))}};i(),this.d(this.containerIdChanged.don(i))}{class i extends U{constructor(o){super(),o.appendChild(n),this.d(()=>o.removeChild(n))}}this.dv(new Ie(this.containerChanged,()=>{if(this.container)return new i(this.container)}))}{const i=this.dv(Se(this.containerChanged,this.instanceClassChanged,this.shadowDomChanged));this.dv(new Ie(i,()=>{if(!this.container||!this.instanceClass)return;let s=n;if(n.firstElementChild&&n.removeChild(n.firstElementChild),this.shadowDom){const o=n.appendChild(document.createElement("div"));o.setAttribute("xe2-div","ESCustomDiv container shadowDiv"),s=o.attachShadow({mode:"open"}).appendChild(document.createElement("div")),s.setAttribute("xe2-div","ESCustomDiv container shadowDiv div")}return new this.instanceClass(s,this,void 0)}))}}update(t){this._updateEvent.emit(t)}get instanceClass(){return this._instanceClassReact.value}set instanceClass(t){this._instanceClassReact.value=t}get instanceClassChanged(){return this._instanceClassReact.changed}get innerHtmlMounted(){return this._innerHtmlMounted}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(t){this._container.value=t}getESProperties(){const t={...super.getESProperties()},n=i=>{i||alert("evalFuncStr为空,无法执行!");try{const s=i&&Function(`"use strict";return (${i})`)();this.update(s)}catch(s){alert(`updateDivFunc error: ${s}`)}};return{...t,more:[...t.more,new dt("ESCustomDiv"),new X([this,"show"],"显示"),new ls([this,"instanceClassStr"],"实例类",Xy,hb,!0),new ls([this,"innerHTML"],"innerHTML",Wr.defaultInnerHTML,Wr.innerHTMLReadMe,!0),new ut("强制更新",n,["(divClass, dom, viewer) => divClass.update && divClass.update()"],"update"),new X([this,"allowPicking"],"允许拾取",!0),new ct([this,"containerId"],"容器ID",Wr.defaults.containerId,!0),new X([this,"shadowDom"],"shadowDom"),new X([this,"cssAllInitial"],"cssAllInitial"),new ct([this,"cssText"],"cssText")]}}};h(Wr,"createDefaultProps",()=>({...lt.createDefaultProps(),show:!0,instanceClassStr:void 0,innerHTML:void 0,allowPicking:void 0,containerId:"",shadowDom:!1,cssAllInitial:!1,cssText:""})),h(Wr,"type",Wr.register("ESCustomDiv",Wr,{chsName:"ESCustomDiv",tags:["ESObjects"],description:"自定义div"})),h(Wr,"defaultInnerHTML",` <!-- z-index样式需要设置,否则可能导致看不到!-->
107
+ `;t.style.cssText=o};i();const r=this.dv(ae(this.cssAllInitialChanged,this.cssTextChanged,this.showChanged));this.d(r.don(i))}{const i=()=>{if(this.containerId===void 0||this.containerId==="")this.container=void 0;else{const r=document.getElementById(this.containerId);r instanceof HTMLElement?this.container=r:(this.container=void 0,console.warn(`Div from containerId(${this.containerId}) is not HTMLDivElement!`))}};i(),this.d(this.containerIdChanged.don(i))}{class i extends b{constructor(o){super(),o.appendChild(t),this.d(()=>o.removeChild(t))}}this.dv(new ce(this.containerChanged,()=>{if(this.container)return new i(this.container)}))}{const i=this.dv(ae(this.containerChanged,this.instanceClassChanged,this.shadowDomChanged));this.dv(new ce(i,()=>{if(!this.container||!this.instanceClass)return;let r=t;if(t.firstElementChild&&t.removeChild(t.firstElementChild),this.shadowDom){const o=t.appendChild(document.createElement("div"));o.setAttribute("xe2-div","ESCustomDiv container shadowDiv"),r=o.attachShadow({mode:"open"}).appendChild(document.createElement("div")),r.setAttribute("xe2-div","ESCustomDiv container shadowDiv div")}return new this.instanceClass(r,this,void 0)}))}}update(e){this._updateEvent.emit(e)}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}get innerHtmlMounted(){return this._innerHtmlMounted}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}getESProperties(){const e={...super.getESProperties()},t=i=>{i||alert("evalFuncStr为空,无法执行!");try{const r=i&&Function(`"use strict";return (${i})`)();this.update(r)}catch(r){alert(`updateDivFunc error: ${r}`)}};return{...e,more:[...e.more,new L("ESCustomDiv"),new S([this,"show"],"显示"),new Vt([this,"instanceClassStr"],"实例类",Hc,zp,!0),new Vt([this,"innerHTML"],"innerHTML",Xe.defaultInnerHTML,Xe.innerHTMLReadMe,!0),new N("强制更新",t,["(divClass, dom, viewer) => divClass.update && divClass.update()"],"update"),new S([this,"allowPicking"],"允许拾取",!0),new A([this,"containerId"],"容器ID",Xe.defaults.containerId,!0),new S([this,"shadowDom"],"shadowDom"),new S([this,"cssAllInitial"],"cssAllInitial"),new A([this,"cssText"],"cssText")]}}};a(Xe,"createDefaultProps",()=>({...k.createDefaultProps(),show:!0,instanceClassStr:void 0,innerHTML:void 0,allowPicking:void 0,containerId:"",shadowDom:!1,cssAllInitial:!1,cssText:""})),a(Xe,"type",Xe.register("ESCustomDiv",Xe,{chsName:"ESCustomDiv",tags:["ESObjects"],description:"自定义div"})),a(Xe,"defaultInnerHTML",` <!-- z-index样式需要设置,否则可能导致看不到!-->
112
108
  <div style="width: 300px; height: 50px; z-index: 100; position: absolute; left: 10px; top: 10px; background: rgba(120, 120, 0, 0.7); color: white; font-size: 30px; line-height: 50px; border: 1px solid white;">Hello world!</div>
113
- `),h(Wr,"innerHTMLReadMe",` 示例代码:
109
+ `),a(Xe,"innerHTMLReadMe",` 示例代码:
114
110
  \`\`\`
115
- ${Wr.defaultInnerHTML}
111
+ ${Xe.defaultInnerHTML}
116
112
  \`\`\`
117
- `);let ph=Wr;const Qo=class Qo extends it{constructor(t){super(t);h(this,"_maxTime",this.dv(z(23)))}get maxTime(){return this._maxTime.value}get maxTimeChanged(){return this._maxTime.changed}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new ft([this,"url"]),new M([this,"maxTime"],"maxTime",23,!0,!0),new M([this,"currentTime"]),new M([this,"minPropValue"]),new M([this,"maxPropValue"]),new ge([this,"colorStops"],"colorStops",Qo.defaults.colorStops,void 0,!0)]}}};h(Qo,"createDefaultProps",()=>({...it.createDefaultProps(),url:"http://114.242.26.126:6003/ESDataMesh/water-assets2/",currentTime:0,minPropValue:0,maxPropValue:1,colorStops:Kt([{ratio:0,rgba:[0,0,1,1]},{ratio:.2,rgba:[0,1,0,1]},{ratio:.8,rgba:[1,1,0,1]},{ratio:1,rgba:[1,0,0,1]}])})),h(Qo,"type",Qo.register("ESDataMesh",Qo,{chsName:"数值面着色",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"数值面着色"}));let Rf=Qo;const ao=class ao extends Ct{constructor(t){super(t);h(this,"_distance",this.dv(z(0)));h(this,"editingBindMode","lineString");const n=()=>{this._distance.value=this.getDistance()??0};n(),this.d(this.pointsChanged.don(n))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new st([this,"classificationType"],_d,"贴地附着目标",ao.defaults.classificationType)],coordinate:[...t.coordinate,new M([this,"distance"],"长度",0,!1,!0)]}}};h(ao,"createDefaultProps",()=>({...Ct.createDefaultProps(),classificationType:"TERRAIN",stroked:!0,strokeStyle:gt({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),h(ao,"type",ao.register("ESGeoLineString",ao,{chsName:"地理折线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理折线"})),h(ao,"supportEditingModes",[...Ct.supportEditingModes,Z.LineStringAppend,Z.LineStringInsert]);let fn=ao;const wl=class wl extends fn{constructor(e){super(e)}};h(wl,"createDefaultProps",()=>({...fn.createDefaultProps(),strokeStyle:gt({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),h(wl,"type",wl.register("ESDistanceMeasurement",wl,{chsName:"距离测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"距离测量"}));let Lf=wl;const lo=class lo extends Bt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new st([this,"mode"],lo.modes,"模式","in"),new ct([this,"targetID"],"目标图层id","")]}}};h(lo,"createDefaultProps",()=>({...Bt.createDefaultProps(),mode:"in",targetID:"",filled:!1})),h(lo,"type",lo.register("ESExcavate",lo,{chsName:"挖坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"挖坑"})),h(lo,"modes",[["向内","in"],["向外","out"]]);let Bu=lo;const El=class El extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"general",basic:[...e.basic,new X([this,"smokeShow"],"显示烟雾")],more:[...e.more,new ct([this,"image"],"图片"),new He([this,"translation"],"偏移")]}}};h(El,"createDefaultProps",()=>({...it.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/fire.png",translation:et([0,0,0]),smokeShow:!1})),h(El,"type",El.register("ESFireParticleSystem",El,{chsName:"粒子烟火",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子烟火"}));let gh=El;const db=`
113
+ `);let Qn=Xe;const Di=class Di extends M{constructor(e){super(e);a(this,"_maxTime",this.dv(y(23)))}get maxTime(){return this._maxTime.value}get maxTimeChanged(){return this._maxTime.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new z([this,"url"]),new v([this,"maxTime"],"maxTime",23,!0,!0),new v([this,"currentTime"]),new v([this,"minPropValue"]),new v([this,"maxPropValue"]),new re([this,"colorStops"],"colorStops",Di.defaults.colorStops,void 0,!0)]}}};a(Di,"createDefaultProps",()=>({...M.createDefaultProps(),url:"http://114.242.26.126:6003/ESDataMesh/water-assets2/",currentTime:0,minPropValue:0,maxPropValue:1,colorStops:te([{ratio:0,rgba:[0,0,1,1]},{ratio:.2,rgba:[0,1,0,1]},{ratio:.8,rgba:[1,1,0,1]},{ratio:1,rgba:[1,0,0,1]}])})),a(Di,"type",Di.register("ESDataMesh",Di,{chsName:"数值面着色",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"数值面着色"}));let Do=Di;const si=class si extends ${constructor(e){super(e);a(this,"_distance",this.dv(y(0)));a(this,"editingBindMode","lineString");const t=()=>{this._distance.value=this.getDistance()??0};t(),this.d(this.pointsChanged.don(t))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new j([this,"classificationType"],oo,"贴地附着目标",si.defaults.classificationType)],coordinate:[...e.coordinate,new v([this,"distance"],"长度",0,!1,!0)]}}};a(si,"createDefaultProps",()=>({...$.createDefaultProps(),classificationType:"TERRAIN",stroked:!0,strokeStyle:W({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(si,"type",si.register("ESGeoLineString",si,{chsName:"地理折线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理折线"})),a(si,"supportEditingModes",[...$.supportEditingModes,D.LineStringAppend,D.LineStringInsert]);let we=si;const ws=class ws extends we{constructor(s){super(s)}};a(ws,"createDefaultProps",()=>({...we.createDefaultProps(),strokeStyle:W({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(ws,"type",ws.register("ESDistanceMeasurement",ws,{chsName:"距离测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"距离测量"}));let Fo=ws;const ni=class ni extends Q{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new j([this,"mode"],ni.modes,"模式","in"),new A([this,"targetID"],"目标图层id","")]}}};a(ni,"createDefaultProps",()=>({...Q.createDefaultProps(),mode:"in",targetID:"",filled:!1})),a(ni,"type",ni.register("ESExcavate",ni,{chsName:"挖坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"挖坑"})),a(ni,"modes",[["向内","in"],["向外","out"]]);let ln=ni;const ys=class ys extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,defaultMenu:"general",basic:[...s.basic,new S([this,"smokeShow"],"显示烟雾")],more:[...s.more,new A([this,"image"],"图片"),new ve([this,"translation"],"偏移")]}}};a(ys,"createDefaultProps",()=>({...M.createDefaultProps(),image:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/fire.png"),translation:F([0,0,0]),smokeShow:!1})),a(ys,"type",ys.register("ESFireParticleSystem",ys,{chsName:"粒子烟火",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子烟火"}));let er=ys;const Up=`
118
114
  ## 参数类型为 ESTreeType
119
115
  \`\`\`js
120
116
  type ESJVector2D = [number, number]
@@ -124,7 +120,7 @@ ${Xy}
124
120
  space: number
125
121
  }
126
122
  \`\`\`
127
- `,ta=class ta extends jt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new ft([this,"url"],"路径",!0),new ge([this,"treeTypes"],"treeTypes",[],void 0,!0),new ft([this,"xiaoBanWidget"],"xiaoBanWidget",ta.defaults.xiaoBanWidget,db,!0),new ct([this,"youShiSZ"]),new ct([this,"diLei"]),new ct([this,"senLinLB"]),new ct([this,"labelMaterial"]),new M([this,"heightOffset"])]}}};h(ta,"createDefaultProps",()=>({...jt.createDefaultProps(),url:"",treeTypes:Kt([]),xiaoBanWidget:Kt({class:"WidgetBlueprint'/ESFoliage/ESDefaultXiaoBan.ESDefaultXiaoBan",pivot:[.5,1],space:1}),youShiSZ:"StringTable'/ESFoliage/You_Shi_SZ.You_Shi_SZ'",diLei:"StringTable'/ESFoliage/Di_Lei.Di_Lei'",senLinLB:"StringTable'/ESFoliage/Sen_Lin_LB.Sen_Lin_LB'",labelMaterial:"Material'/ESFoliage/ES3DWidgetMaterial.ES3DWidgetMaterial'",heightOffset:40})),h(ta,"type",ta.register("ESForestTileset",ta,{chsName:"森林切片图层",tags:["ESObjects","_ES_Impl_UE"],description:"ESForestTileset"}));let Ff=ta;const Yy=`class MyDiv {
123
+ `,Fi=class Fi extends Y{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new z([this,"url"],"路径",!0),new re([this,"treeTypes"],"treeTypes",[],void 0,!0),new z([this,"xiaoBanWidget"],"xiaoBanWidget",Fi.defaults.xiaoBanWidget,Up,!0),new A([this,"youShiSZ"]),new A([this,"diLei"]),new A([this,"senLinLB"]),new A([this,"labelMaterial"]),new v([this,"heightOffset"])]}}};a(Fi,"createDefaultProps",()=>({...Y.createDefaultProps(),url:"",treeTypes:te([]),xiaoBanWidget:te({class:"WidgetBlueprint'/ESFoliage/ESDefaultXiaoBan.ESDefaultXiaoBan",pivot:[.5,1],space:1}),youShiSZ:"StringTable'/ESFoliage/You_Shi_SZ.You_Shi_SZ'",diLei:"StringTable'/ESFoliage/Di_Lei.Di_Lei'",senLinLB:"StringTable'/ESFoliage/Sen_Lin_LB.Sen_Lin_LB'",labelMaterial:"Material'/ESFoliage/ES3DWidgetMaterial.ES3DWidgetMaterial'",heightOffset:40})),a(Fi,"type",Fi.register("ESForestTileset",Fi,{chsName:"森林切片图层",tags:["ESObjects","_ES_Impl_UE"],description:"ESForestTileset"}));let xo=Fi;const $c=`class MyDiv {
128
124
  // container是Poi的div
129
125
  // geoCustomDivPoi指向当前的GeoCustomDivPoi场景对象
130
126
  // viewer指定当前的视口
@@ -155,16 +151,16 @@ ${Xy}
155
151
  destroy() {
156
152
  this._container.removeChild(this._div);
157
153
  }
158
- }`,fb=`示例代码:
154
+ }`,Wp=`示例代码:
159
155
  \`\`\`
160
- ${Yy}
156
+ ${$c}
161
157
  \`\`\`
162
- `,Jy=`<div style="width: 300px; height: 50px; background: rgba(120, 120, 0, 0.7); color: white; font-size: 30px; line-height: 50px; border: 1px solid white;">Hello world!</div>
163
- `,pb=`示例代码:
158
+ `,Gc=`<div style="width: 300px; height: 50px; background: rgba(120, 120, 0, 0.7); color: white; font-size: 30px; line-height: 50px; border: 1px solid white;">Hello world!</div>
159
+ `,Bp=`示例代码:
164
160
  \`\`\`
165
- ${Jy}
161
+ ${Gc}
166
162
  \`\`\`
167
- `,wi=class wi extends it{constructor(t){super(t);h(this,"_widgetEvent",this.dv(new N));h(this,"_echartsFunReact",this.dv(z(void 0)));h(this,"_instanceClassReact",this.dv(z(void 0)));const n=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};n(),this.d(this.instanceClassStrChanged.don(n));{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const s=`class MyDiv {
163
+ `,at=class at extends M{constructor(e){super(e);a(this,"_widgetEvent",this.dv(new m));a(this,"_echartsFunReact",this.dv(y(void 0)));a(this,"_instanceClassReact",this.dv(y(void 0)));const t=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};t(),this.d(this.instanceClassStrChanged.don(t));{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const r=`class MyDiv {
168
164
  // container是Poi的div
169
165
  // geoCustomDivPoi指向当前的GeoCustomDivPoi场景对象
170
166
  // viewer指定当前的视口
@@ -180,7 +176,7 @@ ${Jy}
180
176
  destroy() {
181
177
  this._container.removeChild(this._div);
182
178
  }
183
- }`;this.instanceClassStr=s};i(),this.d(this.innerHTMLChanged.don(i))}}get widgetEvent(){return this._widgetEvent}get echartsFun(){return this._echartsFunReact.value}set echartsFun(t){this._echartsFunReact.value=t}get echartsFunChanged(){return this._echartsFunReact.changed}get instanceClass(){return this._instanceClassReact.value}set instanceClass(t){this._instanceClassReact.value=t}get instanceClassChanged(){return this._instanceClassReact.changed}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new M([this,"opacity"],"透明度",wi.defaults.opacity,!0),new M([this,"zOrder"],"zOrder",wi.defaults.zOrder,!0),new Me([this,"anchor"],"偏移比例",wi.defaults.anchor,!0),new ls([this,"innerHTML"],"innerHTML",wi.defaults.innerHTML,pb,!0),new ls([this,"instanceClassStr"],"实例类",wi.defaults.instanceClassStr,fb,!0),new X([this,"renderInUE"],"是否在UE中渲染",!0,!1)]}}};h(wi,"createDefaultProps",()=>({...it.createDefaultProps(),opacity:1,anchor:et([.5,1]),instanceClassStr:Yy,innerHTML:Jy,zOrder:0,renderInUE:!1})),h(wi,"type",wi.register("ESGeoDiv",wi,{chsName:"ESGeoDiv",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESGeoDiv"}));let Af=wi;const ea=class ea extends fn{constructor(t){super(t);h(this,"_line",this.ad(new fn));h(this,"_arrowPolygon",this.ad(new Bt));this.ad(this.components.disposableAdd(this.line,!0)),this.line.show=!1,this.ad(this.components.disposableAdd(this.arrowPolygon));const{line:n,arrowPolygon:i}=this;this.ad(tt([n,"points"],[this,"points"])),this.ad(Ne([this.pointsChanged,this.modeChanged],()=>{this.updateArrowPolygon()},{immediate:!0})),this.ad(A([i,"show"],[this,"show"])),this.ad(A([i,"collision"],[this,"collision"])),this.ad(A([i,"allowPicking"],[this,"allowPicking"])),this.ad(A([i,"filled"],[this,"filled"])),this.ad(A([i,"fillGround"],[this,"fillGround"])),this.ad(A([i,"fillColor"],[this,"fillColor"])),this.ad(A([i,"fillMaterial"],[this,"fillMaterial"])),this.ad(A([i,"fillMaterialParams"],[this,"fillMaterialParams"])),this.ad(A([i,"stroked"],[this,"stroked"])),this.ad(A([i,"strokeGround"],[this,"strokeGround"])),this.ad(A([i,"strokeColor"],[this,"strokeColor"])),this.ad(A([i,"strokeMaterial"],[this,"strokeMaterial"])),this.ad(A([i,"strokeMaterialParams"],[this,"strokeMaterialParams"])),this.ad(A([i,"strokeWidth"],[this,"strokeWidth"])),this.ad(A([i,"strokeWidthType"],[this,"strokeWidthType"])),this.ad(A([i,"classificationType"],[this,"classificationType"]))}get line(){return this._line}get arrowPolygon(){return this._arrowPolygon}getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new st([this,"mode"],wd,"箭头模式",ea.defaults.mode)]}}updateArrowPolygon(){const t=this.points;if(!t||t.length<2){this._arrowPolygon.points=[];return}let n=bf(t,this.mode);n&&n.length>=3?this._arrowPolygon.points=[...n,n[0]]:this._arrowPolygon.points=[]}};h(ea,"createDefaultProps",()=>({...fn.createDefaultProps(),mode:"straightArrow",stroked:!1,filled:!0,fillStyle:gt({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),h(ea,"type",ea.register("ESSquadCombatArrow",ea,{chsName:"分队战斗箭头",tags:["ESObjects","_ES_Impl_Cesium"],description:"分队战斗箭头,军事标绘箭头类,支持直箭头和燕尾箭头"}));let kf=ea;const na=class na extends Bt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new X([this,"fireShow"],"显示火焰",!0),new M([this,"fireHeight"],"火焰高度",na.defaults.fireHeight)]}}};h(na,"createDefaultProps",()=>({...Bt.createDefaultProps(),fireShow:!0,fireHeight:gt(15)})),h(na,"type",na.register("ESGeoPolygonWithFire",na,{chsName:"火焰多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_OL","_ES_Impl_UE"],description:"带火焰效果的地理多边形"}));let Vf=na;const yr=class yr extends Ct{constructor(t){super(t);h(this,"editingBindMode","circular");h(this,"fires",[]);this.ad(()=>{this.clear()}),this.ad(Ne([this.pointsChanged,this.interpolationCountChanged,this.useFireParticleSystemChanged],()=>{this.clear(),this.createFires()},{immediate:!0}))}createFires(){if(!this.points||this.points.length<2||!this.useFireParticleSystem)return;let t=this.interpolationCount,n=this.points;for(;t>0;)t--,n=this.interpolationPoints(n);n.forEach(i=>{const s=new gh;this.fires.push(s),this.components.add(s),s.position=i,s.ad(A([s,"show"],[this,"show"])),s.ad(A([s,"collision"],[this,"collision"])),s.ad(A([s,"allowPicking"],[this,"allowPicking"])),s.ad(A([s,"smokeShow"],[this,"smokeShow"])),s.ad(A([s,"scale"],[this,"scale"]))})}interpolationPoints(t){return t.map((n,i)=>{const s=t[(i+1)%t.length],{center:o}=sh([n,s]);return[n,o]}).flat()}clear(){this.fires.forEach(t=>{this.components.delete(t),t.destroy()}),this.fires=[]}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new dt("火焰参数"),new X([this,"useFireParticleSystem"],"使用粒子系统",yr.defaults.useFireParticleSystem),new M([this,"interpolationCount"],"火焰粒子插值次数",yr.defaults.interpolationCount),new X([this,"smokeShow"],"粒子显示烟雾",yr.defaults.smokeShow),new He([this,"scale"],"缩放",[1,1,1]),new M([this,"fireWidth"],"火焰宽度(米)",yr.defaults.fireWidth),new M([this,"fireHeight"],"火焰高度(米)",yr.defaults.fireHeight),new M([this,"fireIntensity"],"火焰强度",yr.defaults.fireIntensity),new M([this,"stepCount"],"步进次数(16-256)",void 0)]}}};h(yr,"createDefaultProps",()=>({...Ct.createDefaultProps(),fireWidth:5,fireHeight:10,fireIntensity:1,stepCount:64,interpolationCount:1,useFireParticleSystem:!0,smokeShow:!1,scale:et([1,1,1])})),h(yr,"type",yr.register("ESFireWall",yr,{chsName:"火焰墙",tags:["ESObjects","_ES_Impl_Cesium"],description:"火焰墙效果对象"})),h(yr,"supportEditingModes",[...Ct.supportEditingModes,Z.CircularAppend,Z.CircularInsert,Z.Translation,Z.HeightModify]);let jf=yr;const ra=class ra extends Ct{constructor(t){super(t);h(this,"editingBindMode","doublePoints")}toPolygon(){if(this.points&&this.points.length>=2){const t=[...this.points][0],n=[...this.points][1];return[t,[t[0],n[1],t[2]],n,[n[0],t[1],n[2]]]}else return}_updateArea(){if(this.points&&this.points.length>=2){const t=[...this.points],n=t[0],i=t[1],s=[n,[n[0],i[1],n[2]],i,[i[0],n[1],i[2]]];this._area.value=Nd(s)}else this._area.value=0}_updatePerimeter(){if(this.points&&this.points.length>=2){const t=[...this.points],n=t[0],i=t[1],s=[n,[n[0],i[1],n[2]],i,[i[0],n[1],i[2]]],o=[...s,s[0]],a=bs(o,"GEODESIC"),l=a[a.length-1];this._perimeter.value=l}else this._perimeter.value=0}getESProperties(){const t=super.getESProperties();return{...t,coordinate:[...t.coordinate,new M([this,"area"],"面积",0,!1,!0),new M([this,"perimeter"],"周长",0,!1,!0)]}}};h(ra,"createDefaultProps",()=>({...Ct.createDefaultProps(),collision:!1,stroked:!0,filled:!0,fillStyle:gt({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),h(ra,"type",ra.register("ESGeoRectangle",ra,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),h(ra,"supportEditingModes",[...Ct.supportEditingModes,Z.DoublePoints,Z.DoublePointsAppend,Z.DoublePointsModify]);let Bf=ra;const zf={translationX:0,translationY:0,translationZ:0,rotationHeading:0,rotationPitch:0,rotationRoll:0,scaleX:1,scaleY:1,scaleZ:1},uo=class uo extends it{constructor(t){super(t);h(this,"_nodeTransformations",this.dv(z(void 0)));h(this,"_czmModelReadyEvent",this.dv(new N));h(this,"_setNodePositionEvent",this.dv(new N));h(this,"_setNodeRotationEvent",this.dv(new N));h(this,"_setNodeScaleEvent",this.dv(new N));h(this,"_printDebugInfoEvent",this.dv(new N));h(this,"setMaterialInfoEvent",this.ad(new N));h(this,"_setMaterialEvent",this.disposeVar(new N))}get nodeTransformations(){return this._nodeTransformations.value}set nodeTransformations(t){this._nodeTransformations.value=t}get nodeTransformationsChanged(){return this._nodeTransformations.changed}get czmModelReadyEvent(){return this._czmModelReadyEvent}deleteNodeTransformation(t){if(!this.nodeTransformations||!this.nodeTransformations[t])return;const n={...this.nodeTransformations};delete n[t],this.nodeTransformations=n}get setNodePositionEvent(){return this._setNodePositionEvent}setNodePosition(t,n){this._setNodePositionEvent.emit(t,n),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[t]??{...zf};if(n.some(s=>!Number.isFinite(s))){console.error(`setNodePosition error: ${t} ${n}`);return}this._nodeTransformations.value={...this.nodeTransformations,[t]:{...i,translationX:n[0],translationY:n[1],translationZ:n[2]}}}get setNodeRotationEvent(){return this._setNodeRotationEvent}setNodeRotation(t,n){this._setNodeRotationEvent.emit(t,n),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[t]??{...zf};if(n.some(s=>!Number.isFinite(s))){console.error(`setNodeRotation error: ${t} ${n}`);return}this._nodeTransformations.value={...this.nodeTransformations,[t]:{...i,rotationHeading:n[0],rotationPitch:n[1],rotationRoll:n[2]}}}get setNodeScaleEvent(){return this._setNodeScaleEvent}setNodeScale(t,n){this._setNodeScaleEvent.emit(t,n),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[t]??{...zf};if(n.some(s=>!Number.isFinite(s)||s<0)){console.error(`setNodeScale error: !Number.isFinite(e) || e < 0 ${t} ${n}`);return}this._nodeTransformations.value={...this.nodeTransformations,[t]:{...i,scaleX:n[0],scaleY:n[1],scaleZ:n[2]}}}getNodePosition(t){if(!this.nodeTransformations)return;const n=this.nodeTransformations[t];if(n)return[n.translationX,n.translationY,n.translationZ]}getNodeRotation(t){if(!this.nodeTransformations)return;const n=this.nodeTransformations[t];if(n)return[n.rotationHeading,n.rotationPitch,n.rotationRoll]}getNodeScale(t){if(!this.nodeTransformations)return;const n=this.nodeTransformations[t];if(n)return[n.scaleX,n.scaleY,n.scaleZ]}get printDebugInfoEvent(){return this._printDebugInfoEvent}printDebugInfo(){this._printDebugInfoEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(t){return new Promise(n=>{const i=new U;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),n(s)})),this._setMaterialEvent.emit(t)})}setLight122(){this.czmEnvironmentMapManager={...Sf}}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",dataSource:[...t.dataSource,new ft([this,"url"],"模型路径",uo.defaults.url,void 0,!0),new ge([this,"instances"],"实例化矩阵",uo.defaults.instances,void 0,!0)],more:[...t.more,new Me([this,"czmImageBasedLightingFactor"]),new M([this,"czmAtmosphereScatteringIntensity"]),new ft([this,"czmEnvironmentMapManager"]),new ut("控制台输出模型信息",()=>this.printDebugInfo(),[],"printDebugInfo"),new M([this,"czmMaximumScale"],"最大缩放比例",void 0,!0),new M([this,"czmNativeScale"],"统一缩放值"),new M([this,"czmMinimumPixelSize"],"最小像素尺寸"),new Pt([this,"czmColor"],"颜色")]}}};h(uo,"createDefaultProps",()=>({...it.createDefaultProps(),url:"${earthsdk3-assets-script-dir}/assets/glb/building.glb",czmMaximumScale:void 0,czmMinimumPixelSize:0,czmNativeScale:1,czmColor:et([1,1,1,1]),allowPicking:!0,instances:Xt([]),czmImageBasedLightingFactor:et([1,1]),czmAtmosphereScatteringIntensity:2,czmEnvironmentMapManager:Kt(void 0)})),h(uo,"type",uo.register("ESGltfModel",uo,{chsName:"模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"gltf模型"}));let qi=uo;const _r=class _r extends it{constructor(t){super(t);h(this,"_aiMoveToEvent",this.dv(new N));h(this,"_stopAIMoveEvent",this.dv(new N))}get aiMoveToEvent(){return this._aiMoveToEvent}aiMoveTo(t,n){this._aiMoveToEvent.emit(t,n)}get stopAIMoveEvent(){return this._stopAIMoveEvent}stopAIMove(){this._stopAIMoveEvent.emit()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new st([this,"mode"],_r.modes,"模式",_r.defaults.mode,!0),new st([this,"animation"],_r.animations,"动画",_r.defaults.animation,!0),new ge([this,"instances"],"实例化矩阵",_r.defaults.instances,void 0,!0)],more:[...t.more,new ut("自动寻路",this.aiMoveTo.bind(this),[[0,0,0],0],"aiMoveTo,UE生效"),new ut("停止自动寻路",()=>this.stopAIMove(),[],"stopAIMove")]}}};h(_r,"createDefaultProps",()=>({...it.createDefaultProps(),mode:"worker",animation:"standing",allowPicking:!0,instances:Xt([])})),h(_r,"type",_r.register("ESHuman",_r,{chsName:"人员",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"工人 警察 路人"})),h(_r,"modes",[["工人","worker"],["警察","police"],["路人","pedestrian"],["陌生人","stranger"],["男士","suitMan"],["女士","suitWoman"],["维修工","repairMan"],["消防员","fireMan"],["消防员-水泵","firefighterWithWaterPump"],["消防员-打火鞭","firefighterWithFirestick"],["消防员-点火器","firefighterWithDripIgniter"],["消防员-风力灭火机","firefighterWithBlower"],["消防员-水枪","firefighterWithHose"],["消防员-灭火弹","firefighterWithThrowable"],["消防员-工具包","firefighterWithToolkit"],["消防员-行走","firefighterWalking"],["消防员-防护服","firefighterUniform"]]),h(_r,"animations",[["站立","standing"],["行走","walking"],["奔跑","running"]]);let vr=_r;const ia=class ia extends gr{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ft([this,"url"],"图片路径",ia.defaults.url),new X([this,"isHoverZoom"],"悬浮放大"),new X([this,"hoverHighlight"],"悬浮高亮")]}}};h(ia,"createDefaultProps",()=>({...gr.createDefaultProps(),url:"inner://CameraBlue.png",isHoverZoom:!1,hoverHighlight:!1,renderMode:4})),h(ia,"type",ia.register("ESImageLabel",ia,{chsName:"图片标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"基础图片标签。"}));let mh=ia;const Ji=class Ji extends jt{constructor(e){super(e),this.ad(tt([this,"czmSplitDirection"],[this,"splitDirection"])),this.ad(tt([this,"czmAlpha"],[this,"opacity"]))}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new M([this,"zIndex"],"层级序号",Ji.defaults.zIndex)],dataSource:[...e.dataSource,new ft([this,"url"],"影像服务地址"),new Sr([this,"rectangle"],"矩形范围",Ji.defaults.rectangle,!0),new Re([this,"maximumLevel"],1,[1,24],"最大级别",Ji.defaults.maximumLevel,!0),new ft([this,"options"],"options",Ji.defaults.options,void 0,!0),new ct([this,"targetID"],"targetID"),new Re([this,"opacity"],.01,[0,1],"opacity",1)],more:[...e.more,new dt("通用"),new M([this,"height"],"高度"),new ct([this,"actorTag"]),new ct([this,"componentTag"]),new M([this,"minimumLevel"]),new dt("图像"),new M([this,"czmAlpha"],"透明度"),new M([this,"czmBrightness"],"亮度"),new M([this,"czmContrast"],"对比度"),new M([this,"czmHue"],"色相"),new M([this,"czmSaturation"],"饱和度"),new M([this,"czmGamma"],"伽马值")]}}};h(Ji,"createDefaultProps",()=>({...jt.createDefaultProps(),url:"",rectangle:Kt([-180,-90,180,90]),options:Kt(void 0),zIndex:0,actorTag:"",componentTag:"",maximumLevel:22,minimumLevel:0,targetID:"",czmSplitDirection:"NONE",czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1,opacity:1,splitDirection:"NONE"})),h(Ji,"type",Ji.register("ESImageryLayer",Ji,{chsName:"影像图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"影像图层"}));let zu=Ji;const gb=`
179
+ }`;this.instanceClassStr=r};i(),this.d(this.innerHTMLChanged.don(i))}}get widgetEvent(){return this._widgetEvent}get echartsFun(){return this._echartsFunReact.value}set echartsFun(e){this._echartsFunReact.value=e}get echartsFunChanged(){return this._echartsFunReact.changed}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new v([this,"opacity"],"透明度",at.defaults.opacity,!0),new v([this,"zOrder"],"zOrder",at.defaults.zOrder,!0),new pe([this,"anchor"],"偏移比例",at.defaults.anchor,!0),new Vt([this,"innerHTML"],"innerHTML",at.defaults.innerHTML,Bp,!0),new Vt([this,"instanceClassStr"],"实例类",at.defaults.instanceClassStr,Wp,!0),new S([this,"renderInUE"],"是否在UE中渲染",!0,!1)]}}};a(at,"createDefaultProps",()=>({...M.createDefaultProps(),opacity:1,anchor:F([.5,1]),instanceClassStr:$c,innerHTML:Gc,zOrder:0,renderInUE:!1})),a(at,"type",at.register("ESGeoDiv",at,{chsName:"ESGeoDiv",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESGeoDiv"}));let ko=at;const xi=class xi extends we{constructor(e){super(e);a(this,"_line",this.ad(new we));a(this,"_arrowPolygon",this.ad(new Q));this.ad(this.components.disposableAdd(this.line,!0)),this.line.show=!1,this.ad(this.components.disposableAdd(this.arrowPolygon));const{line:t,arrowPolygon:i}=this;this.ad(x([t,"points"],[this,"points"])),this.ad(ue([this.pointsChanged,this.modeChanged],()=>{this.updateArrowPolygon()},{immediate:!0})),this.ad(_([i,"show"],[this,"show"])),this.ad(_([i,"collision"],[this,"collision"])),this.ad(_([i,"allowPicking"],[this,"allowPicking"])),this.ad(_([i,"filled"],[this,"filled"])),this.ad(_([i,"fillGround"],[this,"fillGround"])),this.ad(_([i,"fillColor"],[this,"fillColor"])),this.ad(_([i,"fillMaterial"],[this,"fillMaterial"])),this.ad(_([i,"fillMaterialParams"],[this,"fillMaterialParams"])),this.ad(_([i,"stroked"],[this,"stroked"])),this.ad(_([i,"strokeGround"],[this,"strokeGround"])),this.ad(_([i,"strokeColor"],[this,"strokeColor"])),this.ad(_([i,"strokeMaterial"],[this,"strokeMaterial"])),this.ad(_([i,"strokeMaterialParams"],[this,"strokeMaterialParams"])),this.ad(_([i,"strokeWidth"],[this,"strokeWidth"])),this.ad(_([i,"strokeWidthType"],[this,"strokeWidthType"])),this.ad(_([i,"classificationType"],[this,"classificationType"]))}get line(){return this._line}get arrowPolygon(){return this._arrowPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new j([this,"mode"],ao,"箭头模式",xi.defaults.mode)]}}updateArrowPolygon(){const e=this.points;if(!e||e.length<2){this._arrowPolygon.points=[];return}let t=yo(e,this.mode);t&&t.length>=3?this._arrowPolygon.points=[...t,t[0]]:this._arrowPolygon.points=[]}};a(xi,"createDefaultProps",()=>({...we.createDefaultProps(),mode:"straightArrow",stroked:!1,filled:!0,fillStyle:W({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),a(xi,"type",xi.register("ESSquadCombatArrow",xi,{chsName:"分队战斗箭头",tags:["ESObjects","_ES_Impl_Cesium"],description:"分队战斗箭头,军事标绘箭头类,支持直箭头和燕尾箭头"}));let Mo=xi;const ki=class ki extends Q{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new S([this,"fireShow"],"显示火焰",!0),new v([this,"fireHeight"],"火焰高度",ki.defaults.fireHeight)]}}};a(ki,"createDefaultProps",()=>({...Q.createDefaultProps(),fireShow:!0,fireHeight:W(15)})),a(ki,"type",ki.register("ESGeoPolygonWithFire",ki,{chsName:"火焰多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_OL","_ES_Impl_UE"],description:"带火焰效果的地理多边形"}));let jo=ki;const Ue=class Ue extends ${constructor(e){super(e);a(this,"editingBindMode","circular");a(this,"fires",[]);this.ad(()=>{this.clear()}),this.ad(ue([this.pointsChanged,this.interpolationCountChanged,this.useFireParticleSystemChanged],()=>{this.clear(),this.createFires()},{immediate:!0}))}createFires(){if(!this.points||this.points.length<2||!this.useFireParticleSystem)return;let e=this.interpolationCount,t=this.points;for(;e>0;)e--,t=this.interpolationPoints(t);t.forEach(i=>{const r=new er;this.fires.push(r),this.components.add(r),r.position=i,r.ad(_([r,"show"],[this,"show"])),r.ad(_([r,"collision"],[this,"collision"])),r.ad(_([r,"allowPicking"],[this,"allowPicking"])),r.ad(_([r,"smokeShow"],[this,"smokeShow"])),r.ad(_([r,"scale"],[this,"scale"]))})}interpolationPoints(e){return e.map((t,i)=>{const r=e[(i+1)%e.length],{center:o}=Hn([t,r]);return[t,o]}).flat()}clear(){this.fires.forEach(e=>{this.components.delete(e),e.destroy()}),this.fires=[]}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L("火焰参数"),new S([this,"useFireParticleSystem"],"使用粒子系统",Ue.defaults.useFireParticleSystem),new v([this,"interpolationCount"],"火焰粒子插值次数",Ue.defaults.interpolationCount),new S([this,"smokeShow"],"粒子显示烟雾",Ue.defaults.smokeShow),new ve([this,"scale"],"缩放",[1,1,1]),new v([this,"fireWidth"],"火焰宽度(米)",Ue.defaults.fireWidth),new v([this,"fireHeight"],"火焰高度(米)",Ue.defaults.fireHeight),new v([this,"fireIntensity"],"火焰强度",Ue.defaults.fireIntensity),new v([this,"stepCount"],"步进次数(16-256)",void 0)]}}};a(Ue,"createDefaultProps",()=>({...$.createDefaultProps(),fireWidth:5,fireHeight:10,fireIntensity:1,stepCount:64,interpolationCount:1,useFireParticleSystem:!0,smokeShow:!1,scale:F([1,1,1])})),a(Ue,"type",Ue.register("ESFireWall",Ue,{chsName:"火焰墙",tags:["ESObjects","_ES_Impl_Cesium"],description:"火焰墙效果对象"})),a(Ue,"supportEditingModes",[...$.supportEditingModes,D.CircularAppend,D.CircularInsert,D.Translation,D.HeightModify]);let Ro=Ue;const Mi=class Mi extends ${constructor(e){super(e);a(this,"editingBindMode","doublePoints")}toPolygon(){if(this.points&&this.points.length>=2){const e=[...this.points][0],t=[...this.points][1];return[e,[e[0],t[1],e[2]],t,[t[0],e[1],t[2]]]}else return}_updateArea(){if(this.points&&this.points.length>=2){const e=[...this.points],t=e[0],i=e[1],r=[t,[t[0],i[1],t[2]],i,[i[0],t[1],i[2]]];this._area.value=po(r)}else this._area.value=0}_updatePerimeter(){if(this.points&&this.points.length>=2){const e=[...this.points],t=e[0],i=e[1],r=[t,[t[0],i[1],t[2]],i,[i[0],t[1],i[2]]],o=[...r,r[0]],h=Lt(o,"GEODESIC"),c=h[h.length-1];this._perimeter.value=c}else this._perimeter.value=0}getESProperties(){const e=super.getESProperties();return{...e,coordinate:[...e.coordinate,new v([this,"area"],"面积",0,!1,!0),new v([this,"perimeter"],"周长",0,!1,!0)]}}};a(Mi,"createDefaultProps",()=>({...$.createDefaultProps(),collision:!1,stroked:!0,filled:!0,fillStyle:W({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),a(Mi,"type",Mi.register("ESGeoRectangle",Mi,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),a(Mi,"supportEditingModes",[...$.supportEditingModes,D.DoublePoints,D.DoublePointsAppend,D.DoublePointsModify]);let Ao=Mi;const No={translationX:0,translationY:0,translationZ:0,rotationHeading:0,rotationPitch:0,rotationRoll:0,scaleX:1,scaleY:1,scaleZ:1},ri=class ri extends M{constructor(e){super(e);a(this,"_nodeTransformations",this.dv(y(void 0)));a(this,"_czmModelReadyEvent",this.dv(new m));a(this,"_setNodePositionEvent",this.dv(new m));a(this,"_setNodeRotationEvent",this.dv(new m));a(this,"_setNodeScaleEvent",this.dv(new m));a(this,"_printDebugInfoEvent",this.dv(new m));a(this,"setMaterialInfoEvent",this.ad(new m));a(this,"_setMaterialEvent",this.disposeVar(new m))}get nodeTransformations(){return this._nodeTransformations.value}set nodeTransformations(e){this._nodeTransformations.value=e}get nodeTransformationsChanged(){return this._nodeTransformations.changed}get czmModelReadyEvent(){return this._czmModelReadyEvent}deleteNodeTransformation(e){if(!this.nodeTransformations||!this.nodeTransformations[e])return;const t={...this.nodeTransformations};delete t[e],this.nodeTransformations=t}get setNodePositionEvent(){return this._setNodePositionEvent}setNodePosition(e,t){this._setNodePositionEvent.emit(e,t),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...No};if(t.some(r=>!Number.isFinite(r))){console.error(`setNodePosition error: ${e} ${t}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,translationX:t[0],translationY:t[1],translationZ:t[2]}}}get setNodeRotationEvent(){return this._setNodeRotationEvent}setNodeRotation(e,t){this._setNodeRotationEvent.emit(e,t),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...No};if(t.some(r=>!Number.isFinite(r))){console.error(`setNodeRotation error: ${e} ${t}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,rotationHeading:t[0],rotationPitch:t[1],rotationRoll:t[2]}}}get setNodeScaleEvent(){return this._setNodeScaleEvent}setNodeScale(e,t){this._setNodeScaleEvent.emit(e,t),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...No};if(t.some(r=>!Number.isFinite(r)||r<0)){console.error(`setNodeScale error: !Number.isFinite(e) || e < 0 ${e} ${t}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,scaleX:t[0],scaleY:t[1],scaleZ:t[2]}}}getNodePosition(e){if(!this.nodeTransformations)return;const t=this.nodeTransformations[e];if(t)return[t.translationX,t.translationY,t.translationZ]}getNodeRotation(e){if(!this.nodeTransformations)return;const t=this.nodeTransformations[e];if(t)return[t.rotationHeading,t.rotationPitch,t.rotationRoll]}getNodeScale(e){if(!this.nodeTransformations)return;const t=this.nodeTransformations[e];if(t)return[t.scaleX,t.scaleY,t.scaleZ]}get printDebugInfoEvent(){return this._printDebugInfoEvent}printDebugInfo(){this._printDebugInfoEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(t=>{const i=new b;i.ad(this.setMaterialInfoEvent.donce(r=>{i.destroy(),t(r)})),this._setMaterialEvent.emit(e)})}setLight122(){this.czmEnvironmentMapManager={...wo}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",dataSource:[...e.dataSource,new z([this,"url"],"模型路径",ri.defaults.url,void 0,!0),new re([this,"instances"],"实例化矩阵",ri.defaults.instances,void 0,!0)],more:[...e.more,new v([this,"czmAnimationsIndex"],"动画索引",void 0,!0),new pe([this,"czmImageBasedLightingFactor"]),new v([this,"czmAtmosphereScatteringIntensity"]),new z([this,"czmEnvironmentMapManager"]),new N("控制台输出模型信息",()=>this.printDebugInfo(),[],"printDebugInfo"),new v([this,"czmMaximumScale"],"最大缩放比例",void 0,!0),new v([this,"czmNativeScale"],"统一缩放值"),new v([this,"czmMinimumPixelSize"],"最小像素尺寸"),new G([this,"czmColor"],"颜色")]}}};a(ri,"createDefaultProps",()=>({...M.createDefaultProps(),url:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/building.glb"),czmAnimationsIndex:void 0,czmMaximumScale:void 0,czmMinimumPixelSize:0,czmNativeScale:1,czmColor:F([1,1,1,1]),allowPicking:!0,instances:ee([]),czmImageBasedLightingFactor:F([1,1]),czmAtmosphereScatteringIntensity:2,czmEnvironmentMapManager:te(void 0)})),a(ri,"type",ri.register("ESGltfModel",ri,{chsName:"模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"gltf模型"}));let yt=ri;const We=class We extends M{constructor(e){super(e);a(this,"_aiMoveToEvent",this.dv(new m));a(this,"_stopAIMoveEvent",this.dv(new m))}get aiMoveToEvent(){return this._aiMoveToEvent}aiMoveTo(e,t){this._aiMoveToEvent.emit(e,t)}get stopAIMoveEvent(){return this._stopAIMoveEvent}stopAIMove(){this._stopAIMoveEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new j([this,"mode"],We.modes,"模式",We.defaults.mode,!0),new j([this,"animation"],We.animations,"动画",We.defaults.animation,!0),new re([this,"instances"],"实例化矩阵",We.defaults.instances,void 0,!0)],more:[...e.more,new N("自动寻路",this.aiMoveTo.bind(this),[[0,0,0],0],"aiMoveTo,UE生效"),new N("停止自动寻路",()=>this.stopAIMove(),[],"stopAIMove")]}}};a(We,"createDefaultProps",()=>({...M.createDefaultProps(),mode:"worker",animation:"standing",allowPicking:!0,instances:ee([])})),a(We,"type",We.register("ESHuman",We,{chsName:"人员",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"工人 警察 路人"})),a(We,"modes",[["工人","worker"],["警察","police"],["路人","pedestrian"],["陌生人","stranger"],["男士","suitMan"],["女士","suitWoman"],["维修工","repairMan"],["消防员","fireMan"],["消防员-水泵","firefighterWithWaterPump"],["消防员-打火鞭","firefighterWithFirestick"],["消防员-点火器","firefighterWithDripIgniter"],["消防员-风力灭火机","firefighterWithBlower"],["消防员-水枪","firefighterWithHose"],["消防员-灭火弹","firefighterWithThrowable"],["消防员-工具包","firefighterWithToolkit"],["消防员-行走","firefighterWalking"],["消防员-防护服","firefighterUniform"]]),a(We,"animations",[["站立","standing"],["行走","walking"],["奔跑","running"]]);let ze=We;const ji=class ji extends Ve{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new z([this,"url"],"图片路径",ji.defaults.url),new S([this,"isHoverZoom"],"悬浮放大"),new S([this,"hoverHighlight"],"悬浮高亮")]}}};a(ji,"createDefaultProps",()=>({...Ve.createDefaultProps(),url:"inner://CameraBlue.png",isHoverZoom:!1,hoverHighlight:!1,renderMode:4})),a(ji,"type",ji.register("ESImageLabel",ji,{chsName:"图片标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"基础图片标签。"}));let tr=ji;const Ct=class Ct extends Y{constructor(s){super(s),this.ad(x([this,"czmSplitDirection"],[this,"splitDirection"])),this.ad(x([this,"czmAlpha"],[this,"opacity"]))}getESProperties(){const s={...super.getESProperties()};return{...s,defaultMenu:"dataSource",basic:[...s.basic,new v([this,"zIndex"],"层级序号",Ct.defaults.zIndex)],dataSource:[...s.dataSource,new z([this,"url"],"影像服务地址"),new Je([this,"rectangle"],"矩形范围",Ct.defaults.rectangle,!0),new ge([this,"maximumLevel"],1,[1,24],"最大级别",Ct.defaults.maximumLevel,!0),new z([this,"options"],"options",Ct.defaults.options,void 0,!0),new A([this,"targetID"],"targetID"),new ge([this,"opacity"],.01,[0,1],"opacity",1)],more:[...s.more,new L("通用"),new v([this,"height"],"高度"),new A([this,"actorTag"]),new A([this,"componentTag"]),new v([this,"minimumLevel"]),new L("图像"),new v([this,"czmAlpha"],"透明度"),new v([this,"czmBrightness"],"亮度"),new v([this,"czmContrast"],"对比度"),new v([this,"czmHue"],"色相"),new v([this,"czmSaturation"],"饱和度"),new v([this,"czmGamma"],"伽马值")]}}};a(Ct,"createDefaultProps",()=>({...Y.createDefaultProps(),url:"",rectangle:te([-180,-90,180,90]),options:te(void 0),zIndex:0,actorTag:"",componentTag:"",maximumLevel:22,minimumLevel:0,targetID:"",czmSplitDirection:"NONE",czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1,opacity:1,splitDirection:"NONE"})),a(Ct,"type",Ct.register("ESImageryLayer",Ct,{chsName:"影像图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"影像图层"}));let dn=Ct;const Hp=`
184
180
  # 声明文件
185
181
  ### options 类型
186
182
  \`\`\`javascript
@@ -286,14 +282,14 @@ export type ESJTimeIntervalCollectionJsonType = {
286
282
  };
287
283
 
288
284
  \`\`\`
289
- `,Ei=class Ei extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new M([this,"size"],"尺寸",Ei.defaults.size),new X([this,"autoFollow"],"自动跟随",Ei.defaults.autoFollow),new st([this,"mode"],Ei.modes,"模式","blueSky")],more:[...e.more,new M([this,"autoOpacityFactor"],"自动消失系数",Ei.defaults.autoOpacityFactor)]}}};h(Ei,"createDefaultProps",()=>({...it.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky",collision:!1,allowPicking:!1})),h(Ei,"type",Ei.register("ESLocalSkyBox",Ei,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),h(Ei,"modes",[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]);let Uf=Ei;const Ku=class Ku extends it{constructor(t){super(t);h(this,"_location",this.disposeVar(z(void 0)));{const n=()=>{this.location=this.position};n(),this.ad(this.positionChanged.don(n))}}get location(){return this._location.value}set location(t){this._location.value=t}get locationChanged(){return this._location.changed}};h(Ku,"type",Ku.register("ESLocationMeasurement",Ku,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"位置测量点"}));let Gf=Ku;const gn=class gn extends it{constructor(t){super(t);h(this,"_player",this.dv(new $r));{const n=gn.defaults;this.d(tt([this._player,"loop"],[this,"playingLoop"],i=>i??n.playingLoop,i=>i??n.playingLoop)),this.d(tt([this._player,"currentTime"],[this,"currentTime"],i=>i??n.currentTime,i=>i??n.currentTime)),this.d(tt([this._player,"duration"],[this,"duration"],i=>i??n.duration,i=>i??n.duration)),this.d(tt([this._player,"playing"],[this,"playing"],i=>i??n.playing,i=>i??n.playing)),this.d(tt([this._player,"speed"],[this,"playingSpeed"],i=>i??n.playingSpeed,i=>i??n.playingSpeed))}}get player(){return this._player}get ratio(){return this._player.ratio}set ratio(t){this._player.ratio=t}get ratioChanged(){return this._player.ratioChanged}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new dt("通用"),new ut("飞入",n=>this.flyTo(n),[1e3],"flyTo"),new ls([this,"updateCallback"],"更新回调函数",void 0,void 0,!0),new M([this,"emissionRate"],"发射率",5,!0),new X([this,"loop"],"是否循环",!0,!0),new M([this,"particleScale"],"等级",1,!0),new M([this,"startScale"],"初始等级",void 0,!0),new M([this,"endScale"],"结束等级",gn.defaults.endScale,!0),new Pt([this,"color"],"颜色",void 0,!0),new Pt([this,"startColor"],"初始颜色",void 0,!0),new Pt([this,"endColor"],"结束颜色",void 0,!0),new X([this,"sizeInMeters"],"尺寸单位为米",void 0,!0),new M([this,"speed"],"速度",1,!0),new M([this,"minimumSpeed"],"最小速度",void 0,!0),new M([this,"maximumSpeed"],"最大速度",void 0,!0),new M([this,"lifetime"],"生命周期",Number.MAX_VALUE,!0),new M([this,"particleLife"],"粒子生命周期",gn.defaults.particleLife,!0),new M([this,"minimumParticleLife"],"最小粒子生命周期",void 0,!0),new M([this,"maximumParticleLife"],"最大粒子生命周期",void 0,!0),new M([this,"mass"],"块数量",1,!0),new M([this,"minimumMass"],"最小块数量",void 0,!0),new M([this,"maximumMass"],"最大块数量",void 0,!0),new Me([this,"imageSize"],"图片尺寸",gn.defaults.imageSize,!0),new Me([this,"minimumImageSize"],"最小图片尺寸",void 0,!0),new Me([this,"maximumImageSize"],"最大图片尺寸",void 0,!0),new ct([this,"image"],"图片",gn.defaults.image,!0),new He([this,"translation"],"偏移",[0,0,0],!0),new ge([this,"bursts"],"bursts",[]),new ft([this,"emitter"],"emitter",gn.defaults.emitter),new dt("播放器"),new M([this,"ratio"],"播放比率",0,!0),new mc([this,"playing"],[this,"ratio"],[this,"playingLoop"],"播放器"),new X([this,"playingLoop"],"是否循环",gn.defaults.playingLoop,!0),new M([this,"currentTime"],"当前时间",gn.defaults.currentTime,!0),new M([this,"duration"],"过渡时间",gn.defaults.duration,!0),new X([this,"playing"],"是否播放",gn.defaults.playing,!0),new M([this,"playingSpeed"],"播放速度",gn.defaults.playingSpeed,!0)]}}};h(gn,"createDefaultProps",()=>({...it.createDefaultProps(),emitter:Kt({type:"CircleEmitter",radius:.5}),bursts:kh(void 0),translation:Xt(void 0),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",imageSize:Xt([20,20]),minimumImageSize:Xt(void 0),maximumImageSize:Xt(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:4,color:Xt(void 0),startColor:Xt(void 0),endColor:Xt(void 0),sizeInMeters:void 0,speed:void 0,minimumSpeed:void 0,maximumSpeed:void 0,lifetime:void 0,particleLife:.5,minimumParticleLife:void 0,maximumParticleLife:void 0,mass:void 0,minimumMass:void 0,maximumMass:void 0,playingLoop:!0,currentTime:0,duration:6e3,playingSpeed:1,playing:!0})),h(gn,"type",gn.register("ESParticleSystemPrimitive",gn,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"}));let vh=gn;const Ci=class Ci extends gr{constructor(t){super(t);h(this,"initialStyle",this.ad(Kt(void 0)));h(this,"_getInitialStyleEvent",this.disposeVar(new N))}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(t=>{const n=this.d(this.initialStyle.changed.disposableOnce(t));this.getInitialStyleEvent.emit(),setTimeout(()=>{n(),t(void 0)},2e3)})])}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new st([this,"mode"],Ci.modes,"模式",Ci.defaults.mode),new ft([this,"style"],"样式",Ci.defaults.style),new X([this,"autoAnchor"],"自动锚点对齐",Ci.defaults.autoAnchor)]}}};h(Ci,"createDefaultProps",()=>({...gr.createDefaultProps(),mode:"SquareH01",style:gt({fontSize:16,imageSize:[60,60],textBackgroundColor:[1,1,1,0],textBackgroundSize:[120,30],textColor:[1,1,1,1],textOffset:[10,2],textBoxOffset:[40,0],textBoxAlign:"start",textBoxShow:!0,textBoxMode:"default"}),autoAnchor:!0})),h(Ci,"type",Ci.register("ESPoi2D",Ci,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),h(Ci,"modes",[["自定义","Custom"],["SquareH01","SquareH01"],["SquareH02","SquareH02"],["SquareV01","SquareV01"],["SquareV02","SquareV02"],["SquareV03","SquareV03"],["SquareV04","SquareV04"],["Flag01","Flag01"],["Flag02","Flag02"],["Linear01","Linear01"],["Linear02","Linear02"],["Linear03","Linear03"],["CircularH01","CircularH01"],["CircularH02","CircularH02"],["CircularV01","CircularV01"],["CircularV02","CircularV02"],["CircularV03","CircularV03"],["CircularV04","CircularV04"],["CircularV05","CircularV05"],["P3D01","P3D01"],["P3D02","P3D02"],["P3D03","P3D03"],["P3D04","P3D04"],["P3D05","P3D05"],["P3D06","P3D06"],["P3D07","P3D07"],["Diamond01","Diamond01"],["Diamond02","Diamond02"],["Stranger","Stranger"],["ManNormal","ManNormal"],["ManAbnormal","ManAbnormal"],["WomanNormal","WomanNormal"],["WomanAbnormal","WomanAbnormal"],["Camera","Camera"]]);let Uu=Ci;const $i=class $i extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new st([this,"mode"],$i.modes,"模式",$i.defaults.mode),new ft([this,"style"],"样式",$i.defaults.style)]}}};h($i,"createDefaultProps",()=>({...it.createDefaultProps(),mode:"triangle",style:gt({UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]})})),h($i,"type",$i.register("ESPoi3D",$i,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),h($i,"modes",[["三角形","triangle"],["菱形","diamond"],["制(存)梁场","BridgePrefabricationSite"],["汽车运输便道","ExportRoad"],["拌合站","MixingStation"],["小型预制构件厂","PrefabricatedComponentsSite"],["项目部","ProjectDepartment"],["铁路岔线","RailwayFork"],["钢筋加工厂","RebarMachining"],["临时电力干线","TempElectricMain"],["铺轨基地","TrackLayingBase"],["汽车运梁通道","TransportationBridge"]]);let Wf=$i;const Cl=class Cl extends Bt{constructor(t){super(t);h(this,"_czmFlattenedPlaneId",this.dv(z("")))}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(t){this._czmFlattenedPlaneId.value=t}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ct([this,"targetID"],"目标图层id","")]}}};h(Cl,"createDefaultProps",()=>({...Bt.createDefaultProps(),targetID:"",filled:!1})),h(Cl,"type",Cl.register("ESPolygonFlattenedPlane",Cl,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"}));let Hf=Cl;const $y=async(r,e,t)=>{const{viewer:n}=r;if(!n){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await n.callUeFunc({f:"AddTrees",p:{id:e,TreeParams:t}});return i.error&&console.error("AddTrees:",i.error),i},Ky=async(r,e)=>{const{viewer:t}=r;if(!t){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const n=await t.callUeFunc({f:"RemoveAllTrees",p:{id:e}});return n.error&&console.error("RemoveAllTrees:",n.error),n},Zy=async(r,e,t)=>{const{viewer:n}=r;if(!n){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await n.callUeFunc({f:"UpdateTreeParams",p:{id:e,TreeParams:t}});return i.error&&console.error("UpdateTreeParams:",i.error),i},Qy=async(r,e,t,n)=>{const{viewer:i}=r;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const s=await i.callUeFunc({f:"CutDownTrees",p:{id:e,TreeIds:t,TimeLength:n}});return s.error&&console.error("CutDownTrees:",s.error),s},t_=async(r,e,t,n,i)=>{const{viewer:s}=r;if(!s){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const o=await s.callUeFunc({f:"GrowthSimulation",p:{id:e,ToParams:t,SwitchTime:i,TimeLength:n}});return o.error&&console.error("GrowthSimulation:",o.error),o},Sl=class Sl extends jt{constructor(t){super(t);h(this,"_addTreesEvent",this.dv(new N));h(this,"_removeAllTreesEvent",this.dv(new N));h(this,"_updateTreeParamsEvent",this.dv(new N));h(this,"_cutDownTreesEvent",this.dv(new N));h(this,"_growthSimulationEvent",this.dv(new N))}async addTreesCallFunc(t,n){return await $y(t,this.id,n)}async updateTreeParamsCallFunc(t,n){return await Zy(t,this.id,n)}async cutDownTreesCallFunc(t,n,i){return await Qy(t,this.id,n,i)}async removeAllTreesCallFunc(t){return await Ky(t,this.id)}async growthSimulationCallFunc(t,n,i,s){return await t_(t,this.id,n,i,s)}async getIdByComponentNameAndHitItem(t,n,i){return await t.getIdByComponentNameAndHitItem(this.id,n,i)}get addTreesEvent(){return this._addTreesEvent}addTrees(t){this._addTreesEvent.emit(t)}get removeAllTreesEvent(){return this._removeAllTreesEvent}removeAllTrees(){this._removeAllTreesEvent.emit()}get updateTreeParamsEvent(){return this._updateTreeParamsEvent}updateTreeParams(t){this._updateTreeParamsEvent.emit(t)}get cutDownTreesEvent(){return this._cutDownTreesEvent}cutDownTrees(t,n){this._cutDownTreesEvent.emit(t,n)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(t,n,i){this._growthSimulationEvent.emit(t,n,i)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new dt("通用"),new ge([this,"treeTypes"],"treeTypes",[],"{ name: string, meshPath: string }[]",!0),new M([this,"stumpId"],"树桩id"),new M([this,"intervalTime"],"动画间隔时间"),new M([this,"switchIntervalTime"],"切换间隔时间")]}}};h(Sl,"createDefaultProps",()=>({...jt.createDefaultProps(),treeTypes:Kt([]),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})),h(Sl,"type",Sl.register("ESSeparateFoliage",Sl,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"}));let qf=Sl;function yh(r,e,t){const n="buffer"in r,i=n?r.buffer:r;n&&(e+=r.byteOffset);const s=new Array(t),o=new DataView(i);for(let a=0;a<t;++a){const l=o.getUint8(e+a);s[a]=String.fromCharCode(l)}return s.join("")}function _h(r,e){const t="buffer"in r,n=t?r.buffer:r;return t&&(e+=r.byteOffset),new DataView(n).getUint32(e,!0)}function e_(r,e,t){const n="buffer"in r,i=n?r.buffer:r;if(n&&(e+=r.byteOffset),e+t>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,e,t)}function mb(r,e,t){const n="buffer"in r,i=n?r.buffer:r;if(n&&(e+=r.byteOffset),e+t*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,e,t)}function vb(r,e,t){const n="buffer"in r,i=n?r.buffer:r;if(n&&(e+=r.byteOffset),e+t*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,e,t)}function yb(r,e,t){const n="buffer"in r,i=n?r.buffer:r;if(n&&(e+=r.byteOffset),e+t*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,e,t)}function n_(r){if(yh(r,0,4)!=="glTF"){console.error("Not a glTF file");return}const t=_h(r,4);if(t!==2){console.error("Unsupported glTF version");return}const n=_h(r,8);if(n!==r.byteLength){console.error("Invalid glTF length");return}const i=_h(r,12);if(i+12+4>n){console.error("Invalid glTF chunk length");return}if(yh(r,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const o=yh(r,20,i),a={version:t,length:n,gltfJson:o};if(20+i<r.byteLength){const l=_h(r,20+i);if(yh(r,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const c=e_(r,20+i+8,l);a.gltfBinary=c}return a}globalThis.parseGlb=n_;function r_(r){const e=n_(r);if(e===void 0||!e.gltfBinary)return;const t=JSON.parse(e.gltfJson);return t.nodes.map(n=>{var i=t.meshes[n.mesh],s=i.primitives[0].attributes.POSITION,o=i.primitives[0].indices,a=t.accessors[s],l=t.bufferViews[a.bufferView];if(!e.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const u=yb(e.gltfBinary,l.byteOffset??0,l.byteLength/4);var c=t.accessors[o],d=t.bufferViews[c.bufferView];if(!e.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let f;return c.componentType===5121?f=e_(e.gltfBinary,d.byteOffset??0,d.byteLength/1):c.componentType===5123?f=mb(e.gltfBinary,d.byteOffset??0,d.byteLength/2):c.componentType===5125&&(f=vb(e.gltfBinary,d.byteOffset??0,d.byteLength/4)),{name:n.name,posBuffer:u,indicesBuffer:f}})}globalThis.parseWaterGlb=r_;const bn=class bn extends it{constructor(t){super(t);h(this,"_submergingData");h(this,"_allMoments",[]);{const n=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(s=>{this._submergingData=r_(s);const o=this._submergingData.map(a=>Date.parse(a.name)).sort();this._allMoments=o,this.currentTime==0&&(this.currentTime=o[0]),this.readyEvent.emit(void 0)})}).catch(i=>{console.log(i)})};n(),this.d(this.urlChanged.don(()=>{n()}))}this.ad(Ne([this.waterColorChanged,this.frequencyChanged,this.amplitudeChanged,this.waveVelocityChanged,this.specularIntensityChanged,this.murkinessChanged,this.flowSpeedChanged],()=>{this.waterType="custom"}))}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ct([this,"url"],"Url地址",bn.defaults.url),new Re([this,"amplitude"],.01,[0,1],"振幅",bn.defaults.amplitude),new M([this,"frequency"],"频率",bn.defaults.frequency),new M([this,"currentTime"],"当前时间",bn.defaults.currentTime),new ft([this,"materialParams"],"材质参数",bn.defaults.materialParams),new st([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型","river"),new Pt([this,"waterColor"],"水的底色",bn.defaults.waterColor),new Re([this,"waveVelocity"],.01,[0,1],"波动频率",bn.defaults.waveVelocity),new M([this,"flowSpeed"],"水流速度",bn.defaults.flowSpeed),new Re([this,"specularIntensity"],.01,[0,1],"镜面反射强度",bn.defaults.specularIntensity),new Re([this,"murkiness"],.01,[0,10],"水体浑浊度",bn.defaults.murkiness)]}}};h(bn,"createDefaultProps",()=>({...it.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:gt({}),waterColor:[.15,.16,0,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})),h(bn,"type",bn.register("ESSubmergingAnalysis",bn,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"}));let Xf=bn;const sa=class sa extends Bt{constructor(t){super(t);h(this,"_groundHeight",this.disposeVar(z(0)));h(this,"_startEvent",this.dv(new N));h(this,"_stopEvent",this.dv(new N));this.ad(Ne(this.pointsChanged,()=>{var n,i;this.groundHeight=((i=(n=this.points)==null?void 0:n[0])==null?void 0:i[2])??0},{immediate:!0}))}get groundHeight(){return this._groundHeight.value}set groundHeight(t){this._groundHeight.value=t}get groundHeightChanged(){return this._groundHeight.changed}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new Pt([this,"startColor"],"起始颜色"),new Pt([this,"endColor"],"结束颜色"),new M([this,"progress"],"计算进度(%)",0,!0),new M([this,"height"],"分析区域高度(m)"),new M([this,"groundHeight"],"地面高度(m)",0,!1,!0),new M([this,"sampleDistance"],"采样间距(m)"),new Oi([this,"startTime"],"起始时间(ms)"),new Oi([this,"endTime"],"结束时间(ms)"),new M([this,"spanTime"],"时间跨度(h)"),new ut("开始分析",()=>this.start(),[],"start"),new ut("结束分析",()=>this.stop(),[],"stop")]}}};h(sa,"createDefaultProps",()=>({...Bt.createDefaultProps(),height:30,sampleDistance:10,startColor:et([1,1,0,1]),endColor:et([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0,filled:!1,stroked:!1})),h(sa,"type",sa.register("ESSunshineAnalysis",sa,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),h(sa,"supportEditingModes",[...Bt.supportEditingModes,Z.HeightModify]);let Yf=sa;const xs=class xs extends jt{constructor(t){super(t);h(this,"_activateEvent",this.disposeVar(new N));h(this,"activate",!1)}get activateEvent(){return this._activateEvent}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",basic:[...t.basic,new M([this,"zIndex"],"层级序号",xs.defaults.zIndex)],dataSource:[...t.dataSource,new ft([this,"url"],"地形服务地址",xs.defaults.url),new Sr([this,"rectangle"],"矩形范围",xs.defaults.rectangle)],more:[...t.more,new M([this,"czmMinzoom"],"czmMinzoom",void 0,!0),new M([this,"czmMaxzoom"],"czmMaxzoom",void 0,!0)]}}};h(xs,"createDefaultProps",()=>({...jt.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:et([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0})),h(xs,"type",xs.register("ESTerrainLayer",xs,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"}));let Jf=xs;const Si=class Si extends gr{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Pt([this,"color"],"文本颜色",[1,1,1,1]),new M([this,"fontSize"],"文字大小",14),new gc([this,"text"],"内容",Si.defaults.text,void 0,!0),new Pt([this,"backgroundColor"],"背景颜色",Si.defaults.backgroundColor),new Sr([this,"padding"],"内边距",Si.defaults.padding),new Pt([this,"borderColor"],"边界颜色"),new Sr([this,"borderRadius"],"边界圆角"),new M([this,"borderWidth"],"边界宽度"),new M([this,"rotate"],"旋转角度",Si.defaults.rotate)],more:[...e.more,new dt("czm"),new X([this,"textEditingInteraction"],"文本编辑交互"),new X([this,"textEditing"],"文本编辑"),new M([this,"width"],"宽度",Si.defaults.width,!0),new M([this,"opacity"],"透明度"),new st([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置","left"),new st([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};h(Si,"createDefaultProps",()=>({...gr.createDefaultProps(),text:"请输入文字",width:80,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:et([1,1,1,1]),backgroundColor:et([0,0,0,.8]),padding:et([5,5,5,5]),borderRadius:et([6,6,6,6]),borderWidth:0,borderColor:et([1,1,1,1]),borderStyle:"solid",rotate:0})),h(Si,"type",Si.register("ESTextLabel",Si,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"}));let ll=Si;const _b=`
285
+ `,ht=class ht extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new v([this,"size"],"尺寸",ht.defaults.size),new S([this,"autoFollow"],"自动跟随",ht.defaults.autoFollow),new j([this,"mode"],ht.modes,"模式","blueSky")],more:[...s.more,new v([this,"autoOpacityFactor"],"自动消失系数",ht.defaults.autoOpacityFactor)]}}};a(ht,"createDefaultProps",()=>({...M.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky",collision:!1,allowPicking:!1})),a(ht,"type",ht.register("ESLocalSkyBox",ht,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),a(ht,"modes",[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]);let Vo=ht;const bn=class bn extends M{constructor(e){super(e);a(this,"_location",this.disposeVar(y(void 0)));{const t=()=>{this.location=this.position};t(),this.ad(this.positionChanged.don(t))}}get location(){return this._location.value}set location(e){this._location.value=e}get locationChanged(){return this._location.changed}};a(bn,"type",bn.register("ESLocationMeasurement",bn,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"位置测量点"}));let Lo=bn;const be=class be extends M{constructor(e){super(e);a(this,"_player",this.dv(new tt));{const t=be.defaults;this.d(x([this._player,"loop"],[this,"playingLoop"],i=>i??t.playingLoop,i=>i??t.playingLoop)),this.d(x([this._player,"currentTime"],[this,"currentTime"],i=>i??t.currentTime,i=>i??t.currentTime)),this.d(x([this._player,"duration"],[this,"duration"],i=>i??t.duration,i=>i??t.duration)),this.d(x([this._player,"playing"],[this,"playing"],i=>i??t.playing,i=>i??t.playing)),this.d(x([this._player,"speed"],[this,"playingSpeed"],i=>i??t.playingSpeed,i=>i??t.playingSpeed))}}get player(){return this._player}get ratio(){return this._player.ratio}set ratio(e){this._player.ratio=e}get ratioChanged(){return this._player.ratioChanged}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("通用"),new N("飞入",t=>this.flyTo(t),[1e3],"flyTo"),new Vt([this,"updateCallback"],"更新回调函数",void 0,void 0,!0),new v([this,"emissionRate"],"发射率",5,!0),new S([this,"loop"],"是否循环",!0,!0),new v([this,"particleScale"],"等级",1,!0),new v([this,"startScale"],"初始等级",void 0,!0),new v([this,"endScale"],"结束等级",be.defaults.endScale,!0),new G([this,"color"],"颜色",void 0,!0),new G([this,"startColor"],"初始颜色",void 0,!0),new G([this,"endColor"],"结束颜色",void 0,!0),new S([this,"sizeInMeters"],"尺寸单位为米",void 0,!0),new v([this,"speed"],"速度",1,!0),new v([this,"minimumSpeed"],"最小速度",void 0,!0),new v([this,"maximumSpeed"],"最大速度",void 0,!0),new v([this,"lifetime"],"生命周期",Number.MAX_VALUE,!0),new v([this,"particleLife"],"粒子生命周期",be.defaults.particleLife,!0),new v([this,"minimumParticleLife"],"最小粒子生命周期",void 0,!0),new v([this,"maximumParticleLife"],"最大粒子生命周期",void 0,!0),new v([this,"mass"],"块数量",1,!0),new v([this,"minimumMass"],"最小块数量",void 0,!0),new v([this,"maximumMass"],"最大块数量",void 0,!0),new pe([this,"imageSize"],"图片尺寸",be.defaults.imageSize,!0),new pe([this,"minimumImageSize"],"最小图片尺寸",void 0,!0),new pe([this,"maximumImageSize"],"最大图片尺寸",void 0,!0),new A([this,"image"],"图片",be.defaults.image,!0),new ve([this,"translation"],"偏移",[0,0,0],!0),new re([this,"bursts"],"bursts",[]),new z([this,"emitter"],"emitter",be.defaults.emitter),new L("播放器"),new v([this,"ratio"],"播放比率",0,!0),new Ln([this,"playing"],[this,"ratio"],[this,"playingLoop"],"播放器"),new S([this,"playingLoop"],"是否循环",be.defaults.playingLoop,!0),new v([this,"currentTime"],"当前时间",be.defaults.currentTime,!0),new v([this,"duration"],"过渡时间",be.defaults.duration,!0),new S([this,"playing"],"是否播放",be.defaults.playing,!0),new v([this,"playingSpeed"],"播放速度",be.defaults.playingSpeed,!0)]}}};a(be,"createDefaultProps",()=>({...M.createDefaultProps(),emitter:te({type:"CircleEmitter",radius:.5}),bursts:Sr(void 0),translation:ee(void 0),image:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/smoke.png"),imageSize:ee([20,20]),minimumImageSize:ee(void 0),maximumImageSize:ee(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:4,color:ee(void 0),startColor:ee(void 0),endColor:ee(void 0),sizeInMeters:void 0,speed:void 0,minimumSpeed:void 0,maximumSpeed:void 0,lifetime:void 0,particleLife:.5,minimumParticleLife:void 0,maximumParticleLife:void 0,mass:void 0,minimumMass:void 0,maximumMass:void 0,playingLoop:!0,currentTime:0,duration:6e3,playingSpeed:1,playing:!0})),a(be,"type",be.register("ESParticleSystemPrimitive",be,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"}));let ir=be;const ct=class ct extends Ve{constructor(e){super(e);a(this,"initialStyle",this.ad(te(void 0)));a(this,"_getInitialStyleEvent",this.disposeVar(new m))}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(e=>{const t=this.d(this.initialStyle.changed.disposableOnce(e));this.getInitialStyleEvent.emit(),setTimeout(()=>{t(),e(void 0)},2e3)})])}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new j([this,"mode"],ct.modes,"模式",ct.defaults.mode),new z([this,"style"],"样式",ct.defaults.style),new S([this,"autoAnchor"],"自动锚点对齐",ct.defaults.autoAnchor)]}}};a(ct,"createDefaultProps",()=>({...Ve.createDefaultProps(),mode:"SquareH01",style:W({fontSize:16,imageSize:[60,60],textBackgroundColor:[1,1,1,0],textBackgroundSize:[120,30],textColor:[1,1,1,1],textOffset:[10,2],textBoxOffset:[40,0],textBoxAlign:"start",textBoxShow:!0,textBoxMode:"default"}),autoAnchor:!0})),a(ct,"type",ct.register("ESPoi2D",ct,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),a(ct,"modes",[["自定义","Custom"],["SquareH01","SquareH01"],["SquareH02","SquareH02"],["SquareV01","SquareV01"],["SquareV02","SquareV02"],["SquareV03","SquareV03"],["SquareV04","SquareV04"],["Flag01","Flag01"],["Flag02","Flag02"],["Linear01","Linear01"],["Linear02","Linear02"],["Linear03","Linear03"],["CircularH01","CircularH01"],["CircularH02","CircularH02"],["CircularV01","CircularV01"],["CircularV02","CircularV02"],["CircularV03","CircularV03"],["CircularV04","CircularV04"],["CircularV05","CircularV05"],["P3D01","P3D01"],["P3D02","P3D02"],["P3D03","P3D03"],["P3D04","P3D04"],["P3D05","P3D05"],["P3D06","P3D06"],["P3D07","P3D07"],["Diamond01","Diamond01"],["Diamond02","Diamond02"],["Stranger","Stranger"],["ManNormal","ManNormal"],["ManAbnormal","ManAbnormal"],["WomanNormal","WomanNormal"],["WomanAbnormal","WomanAbnormal"],["Camera","Camera"]]);let un=ct;const St=class St extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new j([this,"mode"],St.modes,"模式",St.defaults.mode),new z([this,"style"],"样式",St.defaults.style)]}}};a(St,"createDefaultProps",()=>({...M.createDefaultProps(),mode:"triangle",style:W({UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]})})),a(St,"type",St.register("ESPoi3D",St,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),a(St,"modes",[["三角形","triangle"],["菱形","diamond"],["制(存)梁场","BridgePrefabricationSite"],["汽车运输便道","ExportRoad"],["拌合站","MixingStation"],["小型预制构件厂","PrefabricatedComponentsSite"],["项目部","ProjectDepartment"],["铁路岔线","RailwayFork"],["钢筋加工厂","RebarMachining"],["临时电力干线","TempElectricMain"],["铺轨基地","TrackLayingBase"],["汽车运梁通道","TransportationBridge"]]);let zo=St;const bs=class bs extends Q{constructor(e){super(e);a(this,"_czmFlattenedPlaneId",this.dv(y("")))}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(e){this._czmFlattenedPlaneId.value=e}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"targetID"],"目标图层id","")]}}};a(bs,"createDefaultProps",()=>({...Q.createDefaultProps(),targetID:"",filled:!1})),a(bs,"type",bs.register("ESPolygonFlattenedPlane",bs,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"}));let Uo=bs;const Es=class Es extends Y{constructor(e){super(e);a(this,"_czmFlattenedPlaneId",this.dv(y("")))}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(e){this._czmFlattenedPlaneId.value=e}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"targetID"],"目标图层id","")],style:[...e.style,new S([this,"stroked"],"开启线样式",!1),new G([this,"strokeColor"],"线颜色",[1,1,1,1]),new v([this,"strokeWidth"],"线宽",1),new S([this,"filled"],"开启填充样式",!1),new G([this,"fillColor"],"填充颜色",[1,1,1,.5]),new S([this,"strokeGround"],"线贴地",!1),new S([this,"fillGround"],"填充贴地",!1)]}}};a(Es,"createDefaultProps",()=>({...Y.createDefaultProps(),targetID:"",filled:!1,stroked:!1,strokeColor:F([1,1,1,1]),strokeWidth:1,fillColor:F([1,1,1,.5]),strokeGround:!1,fillGround:!1,pointsSet:Pr([])})),a(Es,"type",Es.register("ESPolygonsFlattenedPlane",Es,{chsName:"多压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonsFlattenedPlane"}));let Wo=Es;const Jc=async(n,s,e)=>{const{viewer:t}=n;if(!t){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await t.callUeFunc({f:"AddTrees",p:{id:s,TreeParams:e}});return i.error&&console.error("AddTrees:",i.error),i},qc=async(n,s)=>{const{viewer:e}=n;if(!e){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const t=await e.callUeFunc({f:"RemoveAllTrees",p:{id:s}});return t.error&&console.error("RemoveAllTrees:",t.error),t},Xc=async(n,s,e)=>{const{viewer:t}=n;if(!t){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await t.callUeFunc({f:"UpdateTreeParams",p:{id:s,TreeParams:e}});return i.error&&console.error("UpdateTreeParams:",i.error),i},Yc=async(n,s,e,t)=>{const{viewer:i}=n;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const r=await i.callUeFunc({f:"CutDownTrees",p:{id:s,TreeIds:e,TimeLength:t}});return r.error&&console.error("CutDownTrees:",r.error),r},Kc=async(n,s,e,t,i)=>{const{viewer:r}=n;if(!r){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const o=await r.callUeFunc({f:"GrowthSimulation",p:{id:s,ToParams:e,SwitchTime:i,TimeLength:t}});return o.error&&console.error("GrowthSimulation:",o.error),o},Cs=class Cs extends Y{constructor(e){super(e);a(this,"_addTreesEvent",this.dv(new m));a(this,"_removeAllTreesEvent",this.dv(new m));a(this,"_updateTreeParamsEvent",this.dv(new m));a(this,"_cutDownTreesEvent",this.dv(new m));a(this,"_growthSimulationEvent",this.dv(new m))}async addTreesCallFunc(e,t){return await Jc(e,this.id,t)}async updateTreeParamsCallFunc(e,t){return await Xc(e,this.id,t)}async cutDownTreesCallFunc(e,t,i){return await Yc(e,this.id,t,i)}async removeAllTreesCallFunc(e){return await qc(e,this.id)}async growthSimulationCallFunc(e,t,i,r){return await Kc(e,this.id,t,i,r)}async getIdByComponentNameAndHitItem(e,t,i){return await e.getIdByComponentNameAndHitItem(this.id,t,i)}get addTreesEvent(){return this._addTreesEvent}addTrees(e){this._addTreesEvent.emit(e)}get removeAllTreesEvent(){return this._removeAllTreesEvent}removeAllTrees(){this._removeAllTreesEvent.emit()}get updateTreeParamsEvent(){return this._updateTreeParamsEvent}updateTreeParams(e){this._updateTreeParamsEvent.emit(e)}get cutDownTreesEvent(){return this._cutDownTreesEvent}cutDownTrees(e,t){this._cutDownTreesEvent.emit(e,t)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(e,t,i){this._growthSimulationEvent.emit(e,t,i)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("通用"),new re([this,"treeTypes"],"treeTypes",[],"{ name: string, meshPath: string }[]",!0),new v([this,"stumpId"],"树桩id"),new v([this,"intervalTime"],"动画间隔时间"),new v([this,"switchIntervalTime"],"切换间隔时间")]}}};a(Cs,"createDefaultProps",()=>({...Y.createDefaultProps(),treeTypes:te([]),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})),a(Cs,"type",Cs.register("ESSeparateFoliage",Cs,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"}));let Bo=Cs;function sr(n,s,e){const t="buffer"in n,i=t?n.buffer:n;t&&(s+=n.byteOffset);const r=new Array(e),o=new DataView(i);for(let h=0;h<e;++h){const c=o.getUint8(s+h);r[h]=String.fromCharCode(c)}return r.join("")}function nr(n,s){const e="buffer"in n,t=e?n.buffer:n;return e&&(s+=n.byteOffset),new DataView(t).getUint32(s,!0)}function Zc(n,s,e){const t="buffer"in n,i=t?n.buffer:n;if(t&&(s+=n.byteOffset),s+e>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,s,e)}function $p(n,s,e){const t="buffer"in n,i=t?n.buffer:n;if(t&&(s+=n.byteOffset),s+e*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,s,e)}function Gp(n,s,e){const t="buffer"in n,i=t?n.buffer:n;if(t&&(s+=n.byteOffset),s+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,s,e)}function Jp(n,s,e){const t="buffer"in n,i=t?n.buffer:n;if(t&&(s+=n.byteOffset),s+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,s,e)}function Qc(n){if(sr(n,0,4)!=="glTF"){console.error("Not a glTF file");return}const e=nr(n,4);if(e!==2){console.error("Unsupported glTF version");return}const t=nr(n,8);if(t!==n.byteLength){console.error("Invalid glTF length");return}const i=nr(n,12);if(i+12+4>t){console.error("Invalid glTF chunk length");return}if(sr(n,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const o=sr(n,20,i),h={version:e,length:t,gltfJson:o};if(20+i<n.byteLength){const c=nr(n,20+i);if(sr(n,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const u=Zc(n,20+i+8,c);h.gltfBinary=u}return h}globalThis.parseGlb=Qc;function el(n){const s=Qc(n);if(s===void 0||!s.gltfBinary)return;const e=JSON.parse(s.gltfJson);return e.nodes.map(t=>{var i=e.meshes[t.mesh],r=i.primitives[0].attributes.POSITION,o=i.primitives[0].indices,h=e.accessors[r],c=e.bufferViews[h.bufferView];if(!s.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const l=Jp(s.gltfBinary,c.byteOffset??0,c.byteLength/4);var u=e.accessors[o],p=e.bufferViews[u.bufferView];if(!s.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let g;return u.componentType===5121?g=Zc(s.gltfBinary,p.byteOffset??0,p.byteLength/1):u.componentType===5123?g=$p(s.gltfBinary,p.byteOffset??0,p.byteLength/2):u.componentType===5125&&(g=Gp(s.gltfBinary,p.byteOffset??0,p.byteLength/4)),{name:t.name,posBuffer:l,indicesBuffer:g}})}globalThis.parseWaterGlb=el;const Ce=class Ce extends M{constructor(e){super(e);a(this,"_submergingData");a(this,"_allMoments",[]);{const t=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(r=>{this._submergingData=el(r);const o=this._submergingData.map(h=>Date.parse(h.name)).sort();this._allMoments=o,this.currentTime==0&&(this.currentTime=o[0]),this.readyEvent.emit(void 0)})}).catch(i=>{console.log(i)})};t(),this.d(this.urlChanged.don(()=>{t()}))}this.ad(ue([this.waterColorChanged,this.frequencyChanged,this.amplitudeChanged,this.waveVelocityChanged,this.specularIntensityChanged,this.murkinessChanged,this.flowSpeedChanged],()=>{this.waterType="custom"}))}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"url"],"Url地址",Ce.defaults.url),new ge([this,"amplitude"],.01,[0,1],"振幅",Ce.defaults.amplitude),new v([this,"frequency"],"频率",Ce.defaults.frequency),new v([this,"currentTime"],"当前时间",Ce.defaults.currentTime),new z([this,"materialParams"],"材质参数",Ce.defaults.materialParams),new j([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型","river"),new G([this,"waterColor"],"水的底色",Ce.defaults.waterColor),new ge([this,"waveVelocity"],.01,[0,1],"波动频率",Ce.defaults.waveVelocity),new v([this,"flowSpeed"],"水流速度",Ce.defaults.flowSpeed),new ge([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Ce.defaults.specularIntensity),new ge([this,"murkiness"],.01,[0,10],"水体浑浊度",Ce.defaults.murkiness)]}}};a(Ce,"createDefaultProps",()=>({...M.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:W({}),waterColor:[.15,.16,0,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})),a(Ce,"type",Ce.register("ESSubmergingAnalysis",Ce,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"}));let Ho=Ce;const Ri=class Ri extends Q{constructor(e){super(e);a(this,"_groundHeight",this.disposeVar(y(0)));a(this,"_startEvent",this.dv(new m));a(this,"_stopEvent",this.dv(new m));this.ad(ue(this.pointsChanged,()=>{var t,i;this.groundHeight=((i=(t=this.points)==null?void 0:t[0])==null?void 0:i[2])??0},{immediate:!0}))}get groundHeight(){return this._groundHeight.value}set groundHeight(e){this._groundHeight.value=e}get groundHeightChanged(){return this._groundHeight.changed}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new G([this,"startColor"],"起始颜色"),new G([this,"endColor"],"结束颜色"),new v([this,"progress"],"计算进度(%)",0,!0),new v([this,"height"],"分析区域高度(m)"),new v([this,"groundHeight"],"地面高度(m)",0,!1,!0),new v([this,"sampleDistance"],"采样间距(m)"),new vt([this,"startTime"],"起始时间(ms)"),new vt([this,"endTime"],"结束时间(ms)"),new v([this,"spanTime"],"时间跨度(h)"),new N("开始分析",()=>this.start(),[],"start"),new N("结束分析",()=>this.stop(),[],"stop")]}}};a(Ri,"createDefaultProps",()=>({...Q.createDefaultProps(),height:30,sampleDistance:10,startColor:F([1,1,0,1]),endColor:F([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0,filled:!1,stroked:!1})),a(Ri,"type",Ri.register("ESSunshineAnalysis",Ri,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),a(Ri,"supportEditingModes",[...Q.supportEditingModes,D.HeightModify]);let $o=Ri;const Wt=class Wt extends Y{constructor(e){super(e);a(this,"_activateEvent",this.disposeVar(new m));a(this,"activate",!1)}get activateEvent(){return this._activateEvent}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new v([this,"zIndex"],"层级序号",Wt.defaults.zIndex)],dataSource:[...e.dataSource,new z([this,"url"],"地形服务地址",Wt.defaults.url),new Je([this,"rectangle"],"矩形范围",Wt.defaults.rectangle)],more:[...e.more,new v([this,"czmMinzoom"],"czmMinzoom",void 0,!0),new v([this,"czmMaxzoom"],"czmMaxzoom",void 0,!0)]}}};a(Wt,"createDefaultProps",()=>({...Y.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:F([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0})),a(Wt,"type",Wt.register("ESTerrainLayer",Wt,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"}));let Go=Wt;const lt=class lt extends Ve{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new G([this,"color"],"文本颜色",[1,1,1,1]),new v([this,"fontSize"],"文字大小",14),new Vn([this,"text"],"内容",lt.defaults.text,void 0,!0),new G([this,"backgroundColor"],"背景颜色",lt.defaults.backgroundColor),new Je([this,"padding"],"内边距",lt.defaults.padding),new G([this,"borderColor"],"边界颜色"),new Je([this,"borderRadius"],"边界圆角"),new v([this,"borderWidth"],"边界宽度"),new v([this,"rotate"],"旋转角度",lt.defaults.rotate)],more:[...s.more,new L("czm"),new S([this,"textEditingInteraction"],"文本编辑交互"),new S([this,"textEditing"],"文本编辑"),new v([this,"width"],"宽度",lt.defaults.width,!0),new v([this,"opacity"],"透明度"),new j([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置","left"),new j([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};a(lt,"createDefaultProps",()=>({...Ve.createDefaultProps(),text:"请输入文字",width:80,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:F([1,1,1,1]),backgroundColor:F([0,0,0,.8]),padding:F([5,5,5,5]),borderRadius:F([6,6,6,6]),borderWidth:0,borderColor:F([1,1,1,1]),borderStyle:"solid",rotate:0})),a(lt,"type",lt.register("ESTextLabel",lt,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"}));let as=lt;const qp=`
290
286
  #### 默认值如下
291
287
  \`\`\`js
292
288
  {
293
289
  "Title": "示例",
294
290
  "Content": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
295
291
  }
296
- \`\`\``,Hr=class Hr extends gr{constructor(t){super(t);h(this,"_callFunctionEvent",this.disposeVar(new N));h(this,"_callFunctionResultEvent",this.dv(new N))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(t,n){return new Promise(i=>{const s=new U,o=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(a=>{s.isDestroyed()||(s.destroy(),i(a),clearTimeout(o))})),this._callFunctionEvent.emit(t,n)})}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new He([this,"positionOffset"],"positionOffset",Hr.defaults.positionOffset),new He([this,"rotationOffset"],"rotationOffset",Hr.defaults.rotationOffset),new ct([this,"actorTag"],"actorTag",Hr.defaults.actorTag),new ct([this,"widgetClass"],"widgetClass",Hr.defaults.widgetClass),new ct([this,"socketName"],"socketName",Hr.defaults.socketName),new ft([this,"info"],"info",Hr.defaults.info,_b,!0)],more:[...t.more,new ut("回调函数",this.callFunction.bind(this),["",""],"callFunction")]}}};h(Hr,"createDefaultProps",()=>({...gr.createDefaultProps(),widgetClass:"",info:Kt({Title:"标题示例",Content:"内容示例"})})),h(Hr,"type",Hr.register("ESUEWidget",Hr,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"}));let $f=Hr;const bl=class bl extends it{constructor(){super(...arguments);h(this,"_callFunctionEvent",this.dv(new N));h(this,"_callFunctionResultEvent",this.dv(new N));h(this,"_actorEvent",this.dv(new N));h(this,"_lastActorStatus",this.dv(z("null")))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(t,n){return new Promise(i=>{const s=new U,o=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(a=>{s.isDestroyed()||(s.destroy(),i(a),clearTimeout(o))})),this._callFunctionEvent.emit(t,n)})}getBoundSphereWithChildren(t){return new Promise((n,i)=>{n(void 0)})}get actorEvent(){return this._actorEvent}get lastActorStatus(){return this._lastActorStatus.value}set lastActorStatus(t){this._lastActorStatus.value=t}get lastActorStatusChanged(){return this._lastActorStatus.changed}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ct([this,"actorTag"],"actorTag",""),new ct([this,"actorClass"],"actorClass",""),new X([this,"highlight"],"是否高亮",!1)],more:[...t.more,new ut("回调函数",this.callFunction.bind(this),["",""],"callFunction")]}}};h(bl,"createDefaultProps",()=>({...it.createDefaultProps(),actorTag:"",actorClass:"",highlight:!1,allowPicking:!0})),h(bl,"type",bl.register("ESUnrealActor",bl,{chsName:"UnrealActor",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"UnrealActor"}));let Kf=bl;const Pn=class Pn extends it{constructor(t){super(t);h(this,"editingBindMode","doublePoints");h(this,"_resetWithCameraInfoEvent",this.dv(new N));this.collision=!1}get resetWithCameraInfoEvent(){return this._resetWithCameraInfoEvent}resetWithCameraInfo(){this._resetWithCameraInfoEvent.emit()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new X([this,"looping"],"循环",Pn.defaults.looping),new X([this,"showFrustum"],"视椎体",Pn.defaults.showFrustum),new M([this,"aspectRatio"],"宽高比",Pn.defaults.aspectRatio),new M([this,"fov"],"横向夹角",Pn.defaults.fov),new M([this,"far"],"视野长度",Pn.defaults.far),new M([this,"near"],"近面距离",Pn.defaults.near),new ft([this,"videoStreamUrl"],"视频路径",Pn.defaults.videoStreamUrl),new M([this,"zIndex"],"显示优先级",Pn.defaults.zIndex),new st([this,"videoStreamType"],Pn.videoStreamTypes,"视频类型","video")],more:[...t.more,new ut("以当前相机状态重置",()=>this.resetWithCameraInfo(),[],"resetWithCameraInfo")]}}};h(Pn,"createDefaultProps",()=>({...it.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,videoStreamUrl:"",zIndex:1,showFrustum:!0,looping:!0,videoStreamType:"video"})),h(Pn,"type",Pn.register("ESVideoFusion",Pn,{chsName:"视频融合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视频融合"})),h(Pn,"videoStreamTypes",[["video","video"],["hls","hls"],["flv","flv"],["img","img"],["gif","gif"]]);let Zf=Pn;const qr=class qr extends it{constructor(t){super(t);h(this,"editingBindMode","doublePoints")}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new X([this,"showFrustum"],"视椎体",qr.defaults.showFrustum),new M([this,"aspectRatio"],"宽高比",qr.defaults.aspectRatio),new M([this,"fov"],"横向夹角",qr.defaults.fov),new M([this,"near"],"近面距离",qr.defaults.near),new M([this,"far"],"视野长度",qr.defaults.far),new M([this,"zIndex"],"显示优先级",qr.defaults.zIndex)]}}};h(qr,"createDefaultProps",()=>({...it.createDefaultProps(),fov:90,aspectRatio:1.77778,near:10,far:100,zIndex:1,showFrustum:!0,collision:!1})),h(qr,"type",qr.register("ESViewShed",qr,{chsName:"视域分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"信号传输器"}));let Qf=qr;const wb=`
292
+ \`\`\``,Ye=class Ye extends Ve{constructor(e){super(e);a(this,"_callFunctionEvent",this.disposeVar(new m));a(this,"_callFunctionResultEvent",this.dv(new m))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,t){return new Promise(i=>{const r=new b,o=setTimeout(()=>{r.isDestroyed()||(r.destroy(),i(void 0))},1e4);r.d(this._callFunctionResultEvent.donce(h=>{r.isDestroyed()||(r.destroy(),i(h),clearTimeout(o))})),this._callFunctionEvent.emit(e,t)})}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ve([this,"positionOffset"],"positionOffset",Ye.defaults.positionOffset),new ve([this,"rotationOffset"],"rotationOffset",Ye.defaults.rotationOffset),new A([this,"actorTag"],"actorTag",Ye.defaults.actorTag),new A([this,"widgetClass"],"widgetClass",Ye.defaults.widgetClass),new A([this,"socketName"],"socketName",Ye.defaults.socketName),new z([this,"info"],"info",Ye.defaults.info,qp,!0)],more:[...e.more,new N("回调函数",this.callFunction.bind(this),["",""],"callFunction")]}}};a(Ye,"createDefaultProps",()=>({...Ve.createDefaultProps(),widgetClass:"",info:te({Title:"标题示例",Content:"内容示例"})})),a(Ye,"type",Ye.register("ESUEWidget",Ye,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"}));let Jo=Ye;const Ss=class Ss extends M{constructor(){super(...arguments);a(this,"_callFunctionEvent",this.dv(new m));a(this,"_callFunctionResultEvent",this.dv(new m));a(this,"_actorEvent",this.dv(new m));a(this,"_lastActorStatus",this.dv(y("null")))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,t){return new Promise(i=>{const r=new b,o=setTimeout(()=>{r.isDestroyed()||(r.destroy(),i(void 0))},1e4);r.d(this._callFunctionResultEvent.donce(h=>{r.isDestroyed()||(r.destroy(),i(h),clearTimeout(o))})),this._callFunctionEvent.emit(e,t)})}getBoundSphereWithChildren(e){return new Promise((t,i)=>{t(void 0)})}get actorEvent(){return this._actorEvent}get lastActorStatus(){return this._lastActorStatus.value}set lastActorStatus(e){this._lastActorStatus.value=e}get lastActorStatusChanged(){return this._lastActorStatus.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"actorTag"],"actorTag",""),new A([this,"actorClass"],"actorClass",""),new S([this,"highlight"],"是否高亮",!1)],more:[...e.more,new N("回调函数",this.callFunction.bind(this),["",""],"callFunction")]}}};a(Ss,"createDefaultProps",()=>({...M.createDefaultProps(),actorTag:"",actorClass:"",highlight:!1,allowPicking:!0})),a(Ss,"type",Ss.register("ESUnrealActor",Ss,{chsName:"UnrealActor",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"UnrealActor"}));let qo=Ss;const Se=class Se extends M{constructor(e){super(e);a(this,"editingBindMode","doublePoints");a(this,"_resetWithCameraInfoEvent",this.dv(new m));this.collision=!1}get resetWithCameraInfoEvent(){return this._resetWithCameraInfoEvent}resetWithCameraInfo(){this._resetWithCameraInfoEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new S([this,"looping"],"循环",Se.defaults.looping),new S([this,"showFrustum"],"视椎体",Se.defaults.showFrustum),new v([this,"aspectRatio"],"宽高比",Se.defaults.aspectRatio),new v([this,"fov"],"横向夹角",Se.defaults.fov),new v([this,"far"],"视野长度",Se.defaults.far),new v([this,"near"],"近面距离",Se.defaults.near),new z([this,"videoStreamUrl"],"视频路径",Se.defaults.videoStreamUrl),new v([this,"zIndex"],"显示优先级",Se.defaults.zIndex),new j([this,"videoStreamType"],Se.videoStreamTypes,"视频类型","video")],more:[...e.more,new N("以当前相机状态重置",()=>this.resetWithCameraInfo(),[],"resetWithCameraInfo")]}}};a(Se,"createDefaultProps",()=>({...M.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,videoStreamUrl:"",zIndex:1,showFrustum:!0,looping:!0,videoStreamType:"video"})),a(Se,"type",Se.register("ESVideoFusion",Se,{chsName:"视频融合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视频融合"})),a(Se,"videoStreamTypes",[["video","video"],["hls","hls"],["flv","flv"],["img","img"],["gif","gif"]]);let Xo=Se;const Ke=class Ke extends M{constructor(e){super(e);a(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new S([this,"showFrustum"],"视椎体",Ke.defaults.showFrustum),new v([this,"aspectRatio"],"宽高比",Ke.defaults.aspectRatio),new v([this,"fov"],"横向夹角",Ke.defaults.fov),new v([this,"near"],"近面距离",Ke.defaults.near),new v([this,"far"],"视野长度",Ke.defaults.far),new v([this,"zIndex"],"显示优先级",Ke.defaults.zIndex)]}}};a(Ke,"createDefaultProps",()=>({...M.createDefaultProps(),fov:90,aspectRatio:1.77778,near:10,far:100,zIndex:1,showFrustum:!0,collision:!1})),a(Ke,"type",Ke.register("ESViewShed",Ke,{chsName:"视域分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"信号传输器"}));let Yo=Ke;const Xp=`
297
293
  #### 默认值如下
298
294
  \`\`\`js
299
295
  {
@@ -301,7 +297,7 @@ export type ESJTimeIntervalCollectionJsonType = {
301
297
  "Key":"Value",
302
298
  "内容": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
303
299
  }
304
- \`\`\``,co=class co extends gr{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ft([this,"info"],"信息",co.defaults.info,wb,!0)],more:[...e.more,new dt("ue"),new Di([this,"positionOffset"],"坐标偏移"),new Di([this,"rotationOffset"],"旋转偏移"),new ct([this,"actorTag"]),new ct([this,"widgetClass"]),new ct([this,"socketName"]),new dt("czm"),new M([this,"opacity"],"透明度",co.defaults.opacity,!0)]}}};h(co,"createDefaultProps",()=>({...gr.createDefaultProps(),info:gt({title:"标题示例",内容:"内容示例"}),widgetClass:"WidgetBlueprint'/EarthSDKForUE/Widget/WBP_ES_DefaultInfo.WBP_ES_DefaultInfo'",actorTag:"",socketName:"",positionOffset:et([0,0,0]),rotationOffset:et([0,0,0]),opacity:1})),h(co,"type",co.register("ESWidget",co,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ES组件"}));let tp=co;const oa=class oa extends Ct{constructor(t){super(t);h(this,"_direction",this.disposeVar(z(0)));h(this,"editingBindMode","doublePoints");{const n=()=>{this.direction=this.points&&this.points.length>=2?Oa(cu(this.points[0],this.points[1])):0};n(),this.ad(this.pointsChanged.don(n))}}get direction(){return this._direction.value}set direction(t){this._direction.value=t}get directionChanged(){return this._direction.changed}};h(oa,"createDefaultProps",()=>({...Ct.createDefaultProps(),stroked:!0,strokeStyle:gt({width:10,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),h(oa,"type",oa.register("ESDirectionMeasurement",oa,{chsName:"方位角测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"方位角测量"})),h(oa,"supportEditingModes",[...Ct.supportEditingModes,Z.Rotation,Z.Scale,Z.DoublePoints,Z.DoublePointsAppend,Z.DoublePointsModify]);let ep=oa;const Eb={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[116.2,39.56]},properties:{title:"swimming","marker-symbol":"swimming","marker-color":"#8F1312"}},{type:"Feature",geometry:{type:"Point",coordinates:[115.2,38.56]},properties:{title:"8","marker-symbol":"8","marker-color":"#46117E"}},{type:"Feature",geometry:{type:"Point",coordinates:[114.2,37.56]},properties:{title:"6","marker-symbol":"6","marker-color":"#713291"}}]},Cb=`properties是一个包含三个属性的对象,title表示标题,marker-symbol表示点位的文字内容,marker-color表示点位颜色,properties可以删除,然后使用场景对象属性设置。
300
+ \`\`\``,oi=class oi extends Ve{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new z([this,"info"],"信息",oi.defaults.info,Xp,!0)],more:[...s.more,new L("ue"),new _t([this,"positionOffset"],"坐标偏移"),new _t([this,"rotationOffset"],"旋转偏移"),new A([this,"actorTag"]),new A([this,"widgetClass"]),new A([this,"socketName"]),new L("czm"),new v([this,"opacity"],"透明度",oi.defaults.opacity,!0)]}}};a(oi,"createDefaultProps",()=>({...Ve.createDefaultProps(),info:W({title:"标题示例",内容:"内容示例"}),widgetClass:"WidgetBlueprint'/EarthSDKForUE/Widget/WBP_ES_DefaultInfo.WBP_ES_DefaultInfo'",actorTag:"",socketName:"",positionOffset:F([0,0,0]),rotationOffset:F([0,0,0]),opacity:1})),a(oi,"type",oi.register("ESWidget",oi,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ES组件"}));let Ko=oi;const Ai=class Ai extends ${constructor(e){super(e);a(this,"_direction",this.disposeVar(y(0)));a(this,"editingBindMode","doublePoints");{const t=()=>{this.direction=this.points&&this.points.length>=2?ns(hn(this.points[0],this.points[1])):0};t(),this.ad(this.pointsChanged.don(t))}}get direction(){return this._direction.value}set direction(e){this._direction.value=e}get directionChanged(){return this._direction.changed}};a(Ai,"createDefaultProps",()=>({...$.createDefaultProps(),stroked:!0,strokeStyle:W({width:10,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(Ai,"type",Ai.register("ESDirectionMeasurement",Ai,{chsName:"方位角测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"方位角测量"})),a(Ai,"supportEditingModes",[...$.supportEditingModes,D.Rotation,D.Scale,D.DoublePoints,D.DoublePointsAppend,D.DoublePointsModify]);let Zo=Ai;const Yp={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[116.2,39.56]},properties:{title:"swimming","marker-symbol":"swimming","marker-color":"#8F1312"}},{type:"Feature",geometry:{type:"Point",coordinates:[115.2,38.56]},properties:{title:"8","marker-symbol":"8","marker-color":"#46117E"}},{type:"Feature",geometry:{type:"Point",coordinates:[114.2,37.56]},properties:{title:"6","marker-symbol":"6","marker-color":"#713291"}}]},Kp=`properties是一个包含三个属性的对象,title表示标题,marker-symbol表示点位的文字内容,marker-color表示点位颜色,properties可以删除,然后使用场景对象属性设置。
305
301
  \`\`\`
306
302
  {
307
303
  "type": "FeatureCollection",
@@ -354,7 +350,7 @@ export type ESJTimeIntervalCollectionJsonType = {
354
350
  ]
355
351
  }
356
352
  \`\`\`
357
- `,np=`// dataSource
353
+ `,Qo=`// dataSource
358
354
  (dataSource) => {
359
355
  if (dataSource) {
360
356
  dataSource.show = true;
@@ -380,11 +376,11 @@ export type ESJTimeIntervalCollectionJsonType = {
380
376
  }
381
377
  }
382
378
  }
383
- `,i_=`示例代码
379
+ `,tl=`示例代码
384
380
  \`\`\`
385
- ${np}
381
+ ${Qo}
386
382
  \`\`\`
387
- `,Sb="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",It=class It extends jt{constructor(t){super(t);h(this,"_flyToFeatureEvent",this.dv(new N));h(this,"_flyToFeatureIndexEvent",this.dv(new N));h(this,"_setFeatureStyleEvent",this.disposeVar(new N));h(this,"_resetFeatureStyleEvent",this.disposeVar(new N));h(this,"_features",this.disposeVar(Kt(void 0)));h(this,"pickedInfoType","FeatureCollection");h(this,"abortController");this._updateUrl(),this.ad(this.urlChanged.don(()=>{this._updateUrl()})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(t,n,i){this._flyToFeatureEvent.emit(t,n,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(t,n){this._flyToFeatureIndexEvent.emit(t,n)}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(t,n=!1){this._setFeatureStyleEvent.emit(t,n)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get features(){return this._features.value}set features(t){this._features.value=t}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}getFeatureTable(){if(this.features){let t={};return wm(this.features).features.forEach(n=>{Object.assign(t,n.properties)}),Object.keys(t).forEach(n=>{t[n]=typeof t[n]}),t}else console.log("数据未加载完成,请稍后调用此方法getFeatureTable()")}_updateUrl(){var t;if(this.abortController&&this.abortController.abort(),!this.url){this.features=void 0;return}if(typeof this.url=="object")this.features=this.url;else if(Ed(this.url))this.features=JSON.parse(this.url);else{this.abortController=new AbortController;const n=this.abortController.signal;fetch(lt.context.getStrFromEnv(this.url),{signal:n}).then(i=>i.json()).then(i=>{this.features=i}).catch(i=>{i.name!="AbortError"&&console.warn("ESGeoJson数据加载失败",i)})}this.pickedInfoType=((t=this.features)==null?void 0:t.type)??"FeatureCollection"}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"style",dataSource:[...t.dataSource,new ft([this,"url"],"服务地址",It.defaults.url),new M([this,"minFeatureVisibleDistance"],"要素最小可视距离",It.defaults.minFeatureVisibleDistance),new M([this,"maxFeatureVisibleDistance"],"要素最大可视距离",It.defaults.maxFeatureVisibleDistance),new st([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考"),new st([this,"classificationType"],It.classificationTypes,"贴地附着目标",It.defaults.classificationType),new M([this,"zIndex"],"层级排序",It.defaults.zIndex)],style:[...t.style,new dt("点样式集合"),new X([this,"textShow"],"是否显示",It.defaults.textShow),new Me([this,"textAnchor"],"锚点",It.defaults.anchor),new ct([this,"textProperty"],"标注显示属性",It.defaults.textStyle.textProperty),new ct([this,"textDefaultText"],"默认文本",It.defaults.textStyle.defaultText),new Pt([this,"textColor"],"文本颜色",It.defaults.textStyle.color),new Pt([this,"textBackgroundColor"],"文本背景颜色",It.defaults.textStyle.backgroundColor),new ct([this,"textFontStyle"],"字体样式",It.defaults.textStyle.fontStyle),new ct([this,"textFontWeight"],"字体粗细",It.defaults.textStyle.fontWeight),new M([this,"textFontSize"],"字体大小",It.defaults.textStyle.fontSize),new Me([this,"textOffset"],"像素偏移",It.defaults.textStyle.offset),new dt("点图片样式集合"),new X([this,"imageShow"],"是否显示",It.defaults.imageShow),new Me([this,"imageAnchor"],"锚点",It.defaults.imageStyle.anchor),new ft([this,"imageUrl"],"图片地址",It.defaults.imageStyle.url),new Me([this,"imageSize"],"图片大小",It.defaults.imageStyle.size),new Me([this,"imageOffset"],"像素偏移",It.defaults.imageStyle.offset),new dt("线样式集合"),new X([this,"stroked"],"是否显示",It.defaults.stroked),new X([this,"strokeGround"],"贴地",It.defaults.strokeStyle.ground),new M([this,"strokeWidth"],"线宽",It.defaults.strokeStyle.width),new st([this,"strokeWidthType"],It.strokeStyleWidthTypes,"线宽类型"),new Pt([this,"strokeColor"],"线颜色",It.defaults.strokeStyle.color),new ct([this,"strokeMaterial"],"线材质",It.defaults.strokeStyle.material),new ft([this,"strokeMaterialParams"],"线材质参数",It.defaults.strokeStyle.materialParams),new dt("面样式集合"),new X([this,"filled"],"是否显示",It.defaults.filled),new X([this,"fillGround"],"贴地",It.defaults.fillStyle.ground),new Pt([this,"fillColor"],"填充颜色",It.defaults.fillStyle.color),new ct([this,"fillMaterial"],"填充材质",It.defaults.fillStyle.material),new ft([this,"fillMaterialParams"],"填充材质参数",It.defaults.fillStyle.materialParams)],more:[...t.more,new dt("标注文本样式"),new ct([this,"textFontFamily"],"字体",It.defaults.textStyle.fontFamily),new M([this,"zOrder"],"点排序优先级",It.defaults.zOrder),new dt("通用"),new ls([this,"loadFuncStr"],"loadFnStr",np,i_,!0)]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(t){this.strokeStyle={...this.strokeStyle,widthType:t}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(t){this.strokeStyle={...this.strokeStyle,color:[...t]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(t){this.strokeStyle={...this.strokeStyle,material:t}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(t){this.strokeStyle={...this.strokeStyle,materialParams:t}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(t){this.strokeStyle={...this.strokeStyle,ground:t}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(t){this.fillStyle={...this.fillStyle,color:[...t]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle,materialParams:t}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(t){this.fillStyle={...this.fillStyle,ground:t}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(t){this.textStyle={...this.textStyle,textProperty:t}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(t){this.textStyle={...this.textStyle,defaultText:t}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(t){this.textStyle={...this.textStyle,color:t}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(t){this.textStyle={...this.textStyle,backgroundColor:t}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(t){this.textStyle={...this.textStyle,fontFamily:t}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(t){this.textStyle={...this.textStyle,fontStyle:t}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(t){this.textStyle={...this.textStyle,fontWeight:t}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(t){this.textStyle={...this.textStyle,fontSize:t}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(t){this.textStyle={...this.textStyle,anchor:t}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(t){this.textStyle={...this.textStyle,offset:t}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(t){this.imageStyle={...this.imageStyle,url:t}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(t){this.imageStyle={...this.imageStyle,size:t}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(t){this.imageStyle={...this.imageStyle,anchor:t}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(t){this.imageStyle={...this.imageStyle,offset:t}}get imageOffsetChanged(){return this.imageStyleChanged}};h(It,"createDefaultProps",()=>({...jt.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:Sb,stroked:!0,strokeStyle:gt({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:gt({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:gt({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:gt({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE",classificationType:"TERRAIN",zIndex:0})),h(It,"type",It.register("ESGeoJson",It,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"})),h(It,"strokeStyleWidthTypes",[["screen","screen"],["world","world"]]),h(It,"classificationTypes",[["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]]);let Gu=It;const aa=class aa extends Ct{constructor(t){super(t);h(this,"editingBindMode","doublePoints");h(this,"_height",this.disposeVar(z(0)));{const n=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};n(),this.ad(this.pointsChanged.don(n))}}get height(){return this._height.value}set height(t){this._height.value=t}get heightChanged(){return this._height.changed}};h(aa,"createDefaultProps",()=>({...Ct.createDefaultProps(),stroked:!0,strokeStyle:gt({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),h(aa,"type",aa.register("ESHeightMeasurement",aa,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),h(aa,"supportEditingModes",[...Ct.supportEditingModes,Z.DoublePoints,Z.DoublePointsAppend,Z.DoublePointsModify]);let rp=aa;const la=class la extends Ps{constructor(t){super(t);h(this,"_area",this.dv(z(0)));h(this,"_perimeter",this.dv(z(0)));h(this,"editingBindMode","doublePoints");const n=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};n(),this.d(this.radiusChanged.don(n))}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(t=10,n){return My([...this.position],this.radius,t,n)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"style",basic:[...t.basic,new M([this,"radius"],"圆半径",1,!0),new ge([this,"instances"],"实例化矩阵",la.defaults.instances,void 0,!0)],coordinate:[...t.coordinate,new X([this,"editing"],"是否编辑"),new Di([this,"position"],"三维坐标",[0,0,0],!0),new M([this,"area"],"面积",0,!1,!0),new M([this,"perimeter"],"周长",0,!1,!0)]}}};h(la,"createDefaultProps",()=>({...Ps.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:gt({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),instances:Xt([])})),h(la,"type",la.register("ESLocalCircle",la,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let ip=la;const Pl=class Pl extends Ps{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new ge([this,"points"],"坐标",[])]}}};h(Pl,"createDefaultProps",()=>({...Ps.createDefaultProps(),points:Ef([]),filled:!0})),h(Pl,"type",Pl.register("ESLocalPolygon",Pl,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let Wu=Pl;const Il=class Il extends al{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new ge([this,"points"],"本地位置数组",[])]}}};h(Il,"createDefaultProps",()=>({...al.createDefaultProps(),points:_o(void 0),filled:!0})),h(Il,"type",Il.register("ESLocalPolygonZ",Il,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let sp=Il;const xl=class xl extends Ps{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new M([this,"width"],"宽度"),new M([this,"height"],"高度")]}}};h(xl,"createDefaultProps",()=>({...Ps.createDefaultProps(),width:5e5,height:3e5,filled:!0})),h(xl,"type",xl.register("ESLocalRectangle",xl,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let op=xl;const Ki=class Ki extends Ct{constructor(t){super(t);h(this,"editingBindMode","lineString");h(this,"_distance",this.dv(z(0)));h(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);h(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const n=()=>{if(this.points&&this.points.length>=2){const i=bs(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};n(),this.d(this.pointsChanged.don(n))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new M([this,"height"],"高度",10),new M([this,"width"],"宽度",10),new st([this,"materialMode"],Ki.materialModes,"模式",Ki.defaults.materialMode)],coordinate:[...t.coordinate,new M([this,"distance"],"距离",0,!1,!0)]}}};h(Ki,"createDefaultProps",()=>({...Ct.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:gt({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),h(Ki,"type",Ki.register("ESPipeFence",Ki,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),h(Ki,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),h(Ki,"supportEditingModes",[...Ct.supportEditingModes,Z.LineStringAppend,Z.LineStringInsert]);let wh=Ki;const Ts=class Ts extends mr{constructor(t){super(t);h(this,"_setLayerVisibleEvent",this.dv(new N));h(this,"_setLayerColorEvent",this.dv(new N))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(t,n){this._setLayerVisibleEvent.emit(t,n)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(t,n){this._setLayerColorEvent.emit(t,n)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new dt("ESPipeserTileset"),new ut("设置图层可见性",this.setLayerVisible.bind(this),["",""],"setLayerVisible"),new ut("设置图层颜色",this.setLayerColor.bind(this),["",""],"setLayerColor"),new st([this,"colorMode"],Ts.colorModes,"colorMode",Ts.defaults.colorMode,!0)]}}};h(Ts,"createDefaultProps",()=>({...mr.createDefaultProps(),colorMode:"default"})),h(Ts,"type",Ts.register("ESPipeserTileset",Ts,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),h(Ts,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let ap=Ts;const Os=class Os extends Ct{constructor(t){super(t);h(this,"editingBindMode","circular")}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",coordinate:[...t.coordinate,new M([this,"area"],"面积",0,!1,!0),new M([this,"perimeter"],"周长",0,!1,!0)],basic:[...t.basic,new M([this,"height"],"高度",10),new st([this,"materialMode"],Os.materialModes,"模式","danger")]}}};h(Os,"createDefaultProps",()=>({...Ct.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),h(Os,"type",Os.register("ESPolygonFence",Os,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),h(Os,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),h(Os,"supportEditingModes",[...Ct.supportEditingModes,Z.CircularAppend,Z.CircularInsert,Z.HeightModify]);let Eh=Os;const ho=class ho extends Ct{constructor(t){super(t);h(this,"_deprecated",["ground"]);h(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());h(this,"editingBindMode","doublePoints")}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new dt("通用"),new X([this,"ground"],"是否贴地"),new X([this,"outlineTranslucent"],"轮廓线半透明"),new M([this,"height"],"高度"),new M([this,"extrudedHeight"],"拉伸高度"),new Sr([this,"rectangle"],"范围",ho.defaults.rectangle,!0),new M([this,"stRotation"],"纹理旋转角度"),new M([this,"rotation"],"旋转角度"),new X([this,"pointEditing"],"是否单点编辑")]}}};h(ho,"createDefaultProps",()=>({...Ct.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:Xt(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),h(ho,"type",ho.register("ESRectangle",ho,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),h(ho,"supportEditingModes",[...Ct.supportEditingModes,Z.DoublePoints,Z.DoublePointsAppend,Z.DoublePointsModify]);let lp=ho;const Tl=class Tl extends Bt{getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ge([this,"innerRings"],"裁切多边形数组",[],void 0,!0),new X([this,"gradient"],"是否使用渐变填充",!1),new X([this,"light"],"是否使用光照",!1)]}}};h(Tl,"createDefaultProps",()=>({...Bt.createDefaultProps(),innerRings:ug([]),gradient:!1,light:!1})),h(Tl,"type",Tl.register("ESPolygonWithHole",Tl,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let up=Tl;const fo=class fo extends Bt{constructor(t){super(t);h(this,"_startEvent",this.disposeVar(new N));h(this,"_stopEvent",this.dv(new N));h(this,"_surfaceArea",this.disposeVar(z(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(t){this._surfaceArea.value=t}get surfaceChanged(){return this._surfaceArea.changed}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new dt("表面积测量"),new ut("开始计算",()=>this.start(),[],"start"),new ut("停止计算",()=>this.stop(),[],"stop"),new M([this,"interpolation"],"插值距离",fo.defaults.interpolation),new M([this,"offsetHeight"],"偏移高度",fo.defaults.offsetHeight)]}}};h(fo,"createDefaultProps",()=>({...Bt.createDefaultProps(),interpolation:.5,offsetHeight:0,units:et(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:gt({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),h(fo,"type",fo.register("ESSurfaceAreaMeasurement",fo,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let cp=fo;const po=class po extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new M([this,"downloadProgress"],"下载进度",po.defaults.downloadProgress,!0,!0),new ft([this,"importOptions"],"导入参数",po.defaults.importOptions,void 0,!0)],dataSource:[...e.dataSource,new ft([this,"url"],"路径")]}}};h(po,"createDefaultProps",()=>({...it.createDefaultProps(),url:"",importOptions:Kt({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),h(po,"type",po.register("ESDatasmithRuntimeModel",po,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let hp=po;const In=class In extends Wu{constructor(e){super(e),this.ad(Ne([this.waterColorChanged,this.waterImageChanged,this.frequencyChanged,this.amplitudeChanged,this.flowDirectionChanged,this.waveVelocityChanged,this.specularIntensityChanged,this.murkinessChanged,this.flowSpeedChanged],()=>{this.waterType="custom"}))}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new st([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",In.defaults.waterType),new M([this,"frequency"],"频率",In.defaults.frequency),new Re([this,"amplitude"],.01,[0,1],"振幅",In.defaults.amplitude),new Re([this,"flowDirection"],1,[0,360],"流向",In.defaults.flowDirection),new Re([this,"waveVelocity"],.01,[0,1],"波动频率",In.defaults.waveVelocity),new Re([this,"specularIntensity"],.01,[0,1],"镜面反射强度",In.defaults.specularIntensity),new Re([this,"murkiness"],.1,[0,10],"水体浑浊度",In.defaults.murkiness),new M([this,"flowSpeed"],"水流速度",In.defaults.flowSpeed),new Pt([this,"waterColor"],"水的底色",In.defaults.waterColor),new ft([this,"waterImage"],"水的图片",In.defaults.waterImage)]}}};h(In,"createDefaultProps",()=>({...Wu.createDefaultProps(),allowPicking:!0,waterImage:Kt(void 0),waterColor:[.15,.16,0,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),h(In,"type",In.register("ESDynamicWater",In,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let dp=In;const xn=class xn extends Bt{constructor(e){super(e),this.ad(Ne([this.waterColorChanged,this.waterImageChanged,this.frequencyChanged,this.amplitudeChanged,this.flowDirectionChanged,this.waveVelocityChanged,this.specularIntensityChanged,this.murkinessChanged,this.flowSpeedChanged],()=>{this.waterType="custom"}))}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new st([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",xn.defaults.waterType),new M([this,"frequency"],"频率",xn.defaults.frequency),new Re([this,"amplitude"],.01,[0,1],"振幅",xn.defaults.amplitude),new Re([this,"flowDirection"],1,[0,360],"流向",xn.defaults.flowDirection),new Re([this,"waveVelocity"],.01,[0,1],"波动频率",xn.defaults.waveVelocity),new Re([this,"specularIntensity"],.01,[0,1],"镜面反射强度",xn.defaults.specularIntensity),new Re([this,"murkiness"],.1,[0,10],"水体浑浊度",xn.defaults.murkiness),new M([this,"flowSpeed"],"水流速度",xn.defaults.flowSpeed),new Pt([this,"waterColor"],"水的底色",xn.defaults.waterColor),new ft([this,"waterImage"],"水的图片",xn.defaults.waterImage)]}}};h(xn,"createDefaultProps",()=>({...Bt.createDefaultProps(),allowPicking:!0,waterImage:Kt({}),waterColor:[.15,.16,0,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),h(xn,"type",xn.register("ESGeoWater",xn,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let fp=xn;const ua=class ua extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new M([this,"downloadProgress"],"下载进度",ua.defaults.downloadProgress,!0,!0),new ct([this,"levelName"],"levelName",""),new M([this,"levelLoadDistance"],"levelLoadDistance",1e3),new He([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...e.dataSource,new ft([this,"url"],"url","")]}}};h(ua,"createDefaultProps",()=>({...it.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:et([0,0,0]),levelLoadDistance:1e3})),h(ua,"type",ua.register("ESLevelRuntimeModel",ua,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let pp=ua;const wr=class wr extends fn{constructor(t){super(t);h(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);h(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new M([this,"radius"],"半径",wr.defaults.radius),new M([this,"sides"],"圆边数",wr.defaults.sides),new M([this,"speed"],"材质速度",wr.defaults.speed),new st([this,"materialMode"],wr.materialModes,"材质模式",wr.defaults.materialMode),new ft([this,"materialImage"],"材质图片和重复度",wr.defaults.materialImage)]}}};h(wr,"createDefaultProps",()=>({...fn.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:gt({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:gt({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),h(wr,"type",wr.register("ESPipeline",wr,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),h(wr,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let gp=wr;const Zi=class Zi extends Ct{constructor(t){super(t);h(this,"editingBindMode","visibility")}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Pt([this,"visibleColor"],"可视区域颜色",Zi.defaults.visibleColor),new Pt([this,"invisibleColor"],"遮挡区域颜色",Zi.defaults.invisibleColor),new M([this,"heightOffset"],"视点高度偏移",Zi.defaults.heightOffset)]}}};h(Zi,"createDefaultProps",()=>({...Ct.createDefaultProps(),visibleColor:et([0,1,0,1]),invisibleColor:et([1,0,0,1]),heightOffset:0})),h(Zi,"type",Zi.register("ESVisibilityAnalysis",Zi,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),h(Zi,"supportEditingModes",[...Ct.supportEditingModes,Z.VisibilityAppend,Z.VisibilityModify]);let mp=Zi;const Ol=class Ol extends Bt{constructor(t){super(t);h(this,"_startEvent",this.dv(new N));h(this,"_clearEvent",this.dv(new N));h(this,"_volume",this.disposeVar(z(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(t){this._volume.value=t}get volumeChanged(){return this._volume.changed}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new dt("通用"),new M([this,"planeHeight"],"基准面高程",void 0,!0),new M([this,"gridWidth"],"采样间距 m"),new M([this,"cutVolume"],"挖方",0,!1,!0),new M([this,"fillVolume"],"填方",0,!1,!0),new M([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new M([this,"progress"],"计算进度",0,!1,!0),new ut("开始分析",()=>this.start(),[],"start"),new ut("清空分析结果",()=>this.clear(),[],"clear"),new X([this,"depthTest"],"是否开启深度检测")]}}};h(Ol,"createDefaultProps",()=>({...Bt.createDefaultProps(),planeHeight:z(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:gt({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),h(Ol,"type",Ol.register("ESVolumeMeasurement",Ol,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let vp=Ol;const Dl=class Dl extends vr{constructor(t){super(t);h(this,"_human",this.dv(new vr));h(this,"_poi",this.dv(new Uu));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._poi));{const{_human:n,_poi:i}=this;this.d(A([n,"show"],[this,"show"])),this.d(A([i,"show"],[this,"show"])),this.d(A([n,"allowPicking"],[this,"allowPicking"])),this.d(A([i,"allowPicking"],[this,"allowPicking"])),this.d(A([n,"scale"],[this,"scale"])),this.d(A([i,"scale"],[this,"scale"])),this.d(A([n,"collision"],[this,"collision"])),this.d(A([i,"collision"],[this,"collision"])),this.d(tt([n,"flyInParam"],[this,"flyInParam"])),this.d(tt([n,"flyToParam"],[this,"flyToParam"])),this.d(A([n,"animation"],[this,"animation"])),this.d(A([n,"mode"],[this,"mode"])),this.d(A([n,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(A([n,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(A([i,"name"],[this,"name"])),this.d(A([i,"mode"],[this,"poiMode"])),this.d(A([i,"autoAnchor"],[this,"autoAnchor"])),this.d(A([i,"screenRender"],[this,"screenRender"])),this.d(A([i,"size"],[this,"size"])),this.d(A([i,"anchor"],[this,"anchor"])),this.d(A([i,"sizeByContent"],[this,"sizeByContent"])),this.d(A([i,"renderMode"],[this,"renderMode"])),this.d(A([i,"rotationType"],[this,"rotationType"])),this.d(A([i,"zOrder"],[this,"zOrder"])),this.d(A([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(A([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(tt([n,"position"],[this,"position"])),this.d(tt([n,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{n.flyIn(s)})),this.d(this.flyToEvent.don(s=>{n.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{n.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{n.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,o)=>{n.smoothMove(s,o)})),this.d(this.smoothMoveWithRotationEvent.don((s,o,a)=>{n.smoothMoveWithRotation(s,o,a)})),this.d(this.smoothMoveOnGroundEvent.don((s,o,a,l)=>{n.smoothMoveOnGround(s,o,a,l)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,l,u)=>{n.smoothMoveWithRotationOnGround(s,o,a,l,u)})),this.d(this.automaticLandingEvent.don(()=>{n.automaticLanding()})),this.d(this._human.readyEvent.don(s=>{this.readyEvent.emit(s)}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new st([this,"poiMode"],Uu.modes,"poi模式","SquareH01"),new M([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};h(Dl,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:gt({}),autoAnchor:!0,screenRender:!0,size:et([100,100]),anchor:et([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...vr.createDefaultProps()})),h(Dl,"type",Dl.register("ESHumanPoi",Dl,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let yp=Dl;const Qi=class Qi extends it{constructor(e){super(e)}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"basic",basic:[new ct([this,"image"],"图片",Qi.defaults.image),new M([this,"height"],"喷泉高度",Qi.defaults.height),new M([this,"spread"],"扩散角度",Qi.defaults.spread),new M([this,"emissionRate"],"发射率",Qi.defaults.emissionRate)]}}};h(Qi,"createDefaultProps",()=>({...it.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",height:10,spread:5,emissionRate:50})),h(Qi,"type",Qi.register("ESFountainParticleSystem",Qi,{chsName:"粒子喷泉",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子喷泉"}));let Ch=Qi;const Er=class Er extends vr{constructor(t){super(t);h(this,"_human",this.dv(new vr));h(this,"_fountain",this.dv(new Ch));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._fountain));{const{_human:n,_fountain:i}=this;this.ad(Ne([this.showChanged,this.humanShowChanged,this.fountainShowChanged],()=>{n.show=this.show&&this.humanShow,i.show=this.show&&this.fountainShow},{immediate:!0})),this.d(A([n,"allowPicking"],[this,"allowPicking"])),this.d(A([i,"allowPicking"],[this,"allowPicking"])),this.d(A([n,"scale"],[this,"scale"])),this.d(A([i,"scale"],[this,"scale"])),this.d(A([n,"collision"],[this,"collision"])),this.d(A([i,"collision"],[this,"collision"])),this.d(tt([n,"flyInParam"],[this,"flyInParam"])),this.d(tt([n,"flyToParam"],[this,"flyToParam"])),this.d(A([n,"animation"],[this,"animation"])),this.d(A([n,"mode"],[this,"mode"])),this.d(A([n,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(A([n,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.ad(Ne([this.positionOffsetChanged,this.fountainOffsetChanged],()=>{n.positionOffset=this.positionOffset,i.positionOffset=[this.positionOffset[0]+this.fountainOffset[0],this.positionOffset[1]+this.fountainOffset[1],this.positionOffset[2]+this.fountainOffset[2]]},{immediate:!0})),this.d(tt([n,"position"],[this,"position"])),this.d(tt([n,"rotation"],[this,"rotation"])),this.d(tt([i,"position"],[this,"position"])),this.ad(Ne(this.rotationChanged,()=>{i.rotation=[this.rotation[0],this.rotation[1]-30,this.rotation[2]]},{immediate:!0})),this.d(A([i,"image"],[this,"fountainImage"])),this.d(A([i,"height"],[this,"fountainHeight"])),this.d(A([i,"spread"],[this,"fountainSpread"])),this.d(A([i,"emissionRate"],[this,"fountainEmissionRate"])),this.d(this.flyInEvent.don(s=>{n.flyIn(s)})),this.d(this.flyToEvent.don(s=>{n.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{n.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{n.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,o)=>{n.smoothMove(s,o)})),this.d(this.smoothMoveWithRotationEvent.don((s,o,a)=>{n.smoothMoveWithRotation(s,o,a)})),this.d(this.smoothMoveOnGroundEvent.don((s,o,a,l)=>{n.smoothMoveOnGround(s,o,a,l)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,l,u)=>{n.smoothMoveWithRotationOnGround(s,o,a,l,u)})),this.d(this.automaticLandingEvent.don(()=>{n.automaticLanding()})),this.d(this._human.readyEvent.don(s=>{this.readyEvent.emit(s)}))}}get human(){return this._human}get fountain(){return this._fountain}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new X([this,"humanShow"],"人物显隐",Er.defaults.humanShow),new X([this,"fountainShow"],"喷泉显隐",Er.defaults.fountainShow),new ct([this,"fountainImage"],"喷泉图片",Er.defaults.fountainImage),new He([this,"fountainOffset"],"喷泉偏移",Er.defaults.fountainOffset),new M([this,"fountainHeight"],"喷泉高度",Er.defaults.fountainHeight),new M([this,"fountainSpread"],"喷泉扩散角度",Er.defaults.fountainSpread),new M([this,"fountainEmissionRate"],"喷泉发射率",Er.defaults.fountainEmissionRate)]}}};h(Er,"createDefaultProps",()=>({...vr.createDefaultProps(),humanShow:!0,fountainShow:!0,fountainImage:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",fountainOffset:et([0,0,0]),fountainHeight:10,fountainSpread:5,fountainEmissionRate:50})),h(Er,"type",Er.register("ESHumanFountain",Er,{chsName:"人员喷泉",tags:["ESObjects"],description:"ESHuman + ESFountainParticleSystem组合对象,喷泉从人物手中喷出"}));let _p=Er;const Xr=class Xr extends Bt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new M([this,"depth"],"深度",Xr.defaults.depth),new M([this,"interpolation"],"插值",Xr.defaults.interpolation),new M([this,"opacity"],"透明度",Xr.defaults.opacity),new ft([this,"sideImage"],"侧面图片",Xr.defaults.sideImage),new ft([this,"bottomImage"],"底面图片",Xr.defaults.bottomImage),new M([this,"extendBoundary"],"外扩边界采样高度",Xr.defaults.extendBoundary)]}}};h(Xr,"createDefaultProps",()=>({...Bt.createDefaultProps(),depth:100,sideImage:gt({url:lt.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:gt({url:lt.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50}),opacity:1,interpolation:50,collision:!1,allowPicking:!1,filled:!0,extendBoundary:1})),h(Xr,"type",Xr.register("ESPit",Xr,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let ul=Xr;const Nl=class Nl extends ul{constructor(t){super(t);h(this,"_excavate",this.dv(new Bu));h(this,"_pit",this.dv(new ul));this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit,!0));{const{_excavate:n,_pit:i}=this;this.d(A([n,"show"],[this,"show"])),this.d(A([i,"show"],[this,"show"])),this.d(A([n,"allowPicking"],[this,"allowPicking"])),this.d(A([i,"allowPicking"],[this,"allowPicking"])),this.d(A([n,"collision"],[this,"collision"])),this.d(A([i,"collision"],[this,"collision"])),this.d(tt([i,"points"],[this,"points"])),this.d(A([n,"points"],[this,"points"])),this.d(A([i,"pointed"],[this,"pointed"])),this.d(A([n,"pointed"],[this,"pointed"])),this.d(A([i,"pointStyle"],[this,"pointStyle"])),this.d(A([n,"pointStyle"],[this,"pointStyle"])),this.d(A([i,"stroked"],[this,"stroked"])),this.d(A([n,"stroked"],[this,"stroked"])),this.d(A([i,"strokeStyle"],[this,"strokeStyle"])),this.d(A([n,"strokeStyle"],[this,"strokeStyle"])),this.d(A([i,"filled"],[this,"filled"])),this.d(A([i,"fillStyle"],[this,"fillStyle"])),this.d(A([n,"fillStyle"],[this,"fillStyle"])),this.d(A([n,"mode"],[this,"mode"])),this.d(A([n,"targetID"],[this,"targetID"])),this.d(A([i,"depth"],[this,"depth"])),this.d(A([i,"sideImage"],[this,"sideImage"])),this.d(A([i,"bottomImage"],[this,"bottomImage"])),this.d(A([i,"opacity"],[this,"opacity"])),this.d(A([i,"interpolation"],[this,"interpolation"])),this.d(tt([i,"flyInParam"],[this,"flyInParam"])),this.d(tt([i,"flyToParam"],[this,"flyToParam"])),this.ad(tt([i,"extendBoundary"],[this,"extendBoundary"])),this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get excavate(){return this._excavate}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new st([this,"mode"],Bu.modes,"模式","in"),new ct([this,"targetID"],"目标图层id","")]}}};h(Nl,"createDefaultProps",()=>({...ul.createDefaultProps(),mode:"in",targetID:""})),h(Nl,"type",Nl.register("ESHole",Nl,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let wp=Nl;function Xo(r){return r==="CesiumlabDesktop"?"/cim":""}function s_(r){if(/\/cim\/ts\//.test(r))return"CesiumlabDesktop";if(/\/ts\/(?:info|tiles|featuretiles)\//.test(r))return"CIMRTS"}function o_(r){const e=r.match(/(?:\/cim)?\/ts\/info\/([^?/]+)/);return e==null?void 0:e[1]}function bb(r,e,t){const n=Xo(e);return`${r}${n}/ts/info/${t}`}function a_(r,e,t,n=Date.now()){const i=Xo(e);return`${r}${i}/ts/tiles/${t}/tileset.json?t=${n}`}function l_(r,e,t,n){const i=Xo(e);return`${r}${i}/ts/featuretiles/${t}/${n}/tileset.json`}const Sh={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},u_=async(r,e,t,n,i="CIMRTS")=>{try{const s=globalThis.localStorage.getItem("Authorization"),o=Xo(i);let a=r+`${o}${Sh.layerconfigfind}?tileServiceName=${e}`;t&&(a+=`&earthdstoken=${encodeURIComponent(n)}`);const l={headers:{...!t&&s?{Authorization:s}:{}},mode:"cors"},c=await(await fetch(a,l)).text();return JSON.parse(c)}catch(s){console.error(s)}},c_=async(r,e,t,n,i,s="CIMRTS")=>{try{const o=globalThis.localStorage.getItem("Authorization"),a=Xo(s);let l=r+`${a}${Sh.layerconfigsave}`;const u=i??{};t&&(l+=`?earthdstoken=${encodeURIComponent(n)}`);const c={method:"POST",headers:{"Content-Type":"application/json",...!t&&o?{Authorization:o}:{}},mode:"cors",body:JSON.stringify({tileServiceName:e,layerConfig:JSON.stringify(u)})},f=await(await fetch(l,c)).text();return JSON.parse(f)}catch(o){console.error(o)}},h_=async(r,e,t)=>{try{const n=globalThis.localStorage.getItem("Authorization");let i=r;e&&(i+=`?earthdstoken=${encodeURIComponent(t)}`);const s={headers:{...!e&&n?{Authorization:n}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),l=JSON.parse(a);if(l.status=="ok")return l.data.port;console.error(l.status);return}catch(n){console.error(n)}},d_=async(r,e,t,n,i,s="CIMRTS")=>{try{const o={tileServiceName:e,featureId:t},a=globalThis.localStorage.getItem("Authorization"),l=Xo(s);let u=r+`${l}${Sh.featureproperty}`;n&&(u+=`?earthdstoken=${encodeURIComponent(i)}`);const d=await(await fetch(u,{method:"post",headers:{"Content-Type":"application/json",...!n&&a?{Authorization:a}:{}},body:JSON.stringify(o),mode:"cors"})).text(),f=JSON.parse(d);if(f.status=="ok")return f.data;console.error(f.data.status);return}catch(o){console.error(o)}},Ml=class Ml extends mr{constructor(t){super(t);h(this,"_es3DTileset",this.dv(new mr));h(this,"_ids",this.dv(gt([])));h(this,"_platform",this.dv(z("CIMRTS")));h(this,"_visJson",this.disposeVar(z({})));h(this,"_highlightInner3DtilesetEvent",this.dv(new N));h(this,"_removeHighlightInner3DtilesetEvent",this.dv(new N));h(this,"_tilesetServePort",this.dv(z("")));this.collision=!1;{const n=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?(this.syncPlatformFromUrl(),this.refresh()):this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{n()})),this.d(this.platformChanged.don(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const n=this._es3DTileset;this.d(A([n,"allowPicking"],[this,"allowPicking"])),this.d(A([n,"collision"],[this,"collision"])),this.d(tt([n,"flyToParam"],[this,"flyToParam"])),this.d(A([n,"actorTag"],[this,"actorTag"])),this.d(A([n,"materialMode"],[this,"materialMode"])),this.d(A([n,"highlight"],[this,"highlight"])),this.d(A([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(A([n,"highlightID"],[this,"highlightID"])),this.d(A([n,"highlightColor"],[this,"highlightColor"])),this.d(tt([n,"offset"],[this,"offset"])),this.d(tt([n,"rotation"],[this,"rotation"])),this.d(A([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(A([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(A([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(A([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(A([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(A([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(A([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(A([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(A([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(A([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(A([n,"cacheBytes"],[this,"cacheBytes"])),this.d(A([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(A([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(A([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(A([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(A([n,"materialParams"],[this,"materialParams"])),this.d(tt([n,"supportEdit"],[this,"supportEdit"])),this.d(tt([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(tt([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(tt([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(tt([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(tt([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(tt([n,"excavateId"],[this,"excavateId"]))}{const n=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{n.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{n.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{n.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{n.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{n.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{n.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{n.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{n.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{n.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{n.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{n.calcFlyInParam(...i)}))}{const n=this._es3DTileset;this.d(n.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(n.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const n=()=>{this.es3DTileset.show=this.show};n(),this.d(this.showChanged.don(()=>{n()}))}}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(t){this._ids.value=t}get platform(){return this._platform.value}get platformChanged(){return this._platform.changed}set platform(t){this._platform.value=t}get visJson(){return this._visJson.value}set visJson(t){this._visJson.value=t}get visJsonChanged(){return this._visJson.changed}setFeatureVisable(t,n){var i;if((i=this.layerConfig)!=null&&i.length){const s={};s[n[0].value]=n[0].visable,this.visJson={...this.visJson,...s}}else this.setFeatureVisableEvent.emit(t,typeof n=="string"?JSON.parse(n):n,!0)}async getFeatureProperty(t){return await d_(this.baseUrl,this.tileServiceName,t,this.useEarthDSToken,this.earthdstoken,this.platform)}async getLayerConfig(){const t=await u_(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,this.platform);return!t||!Array.isArray(t)?this.layerConfig=[]:this.layerConfig=t,this.layerConfig}async saveLayerConfig(){const t=this.layerConfig;return await c_(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,t,this.platform)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(t){this._highlightInner3DtilesetEvent.emit(t)}async highlightDSFeature(t){this._highlightInner3Dtileset(t)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(t){this._removeHighlightInner3DtilesetEvent.emit(t)}async removeHighlightDSFeature(t){this._removeHighlightInner3Dtileset(t)}async pickFeature(t,n){var a,l,u;const i=await t.pick(n),s=i.sceneObject;return!s||s.id!==this.id&&s.typeName!="ESRtsFeatureEditing"?void 0:s.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(a=i==null?void 0:i.tilesetPickInfo)==null?void 0:a.id],{featureId:(l=i==null?void 0:i.tilesetPickInfo)==null?void 0:l.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(u=i==null?void 0:i.sceneObject)==null?void 0:u.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(t){this._tilesetServePort.value=t}async getport(){const t=await h_(this.url,this.useEarthDSToken,this.earthdstoken);if(t)return this.tilesetServePort=t,t;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const t=+new Date,n=(i=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:i[0];n&&(this.syncPlatformFromUrl(),this._es3DTileset.offset=[0,0,0],this._es3DTileset.rotation=[0,0,0],this._es3DTileset.url=a_(n,this.platform,this.tileServiceName,t),console.log("3dtileset url:",this._es3DTileset.url))}syncPlatformFromUrl(){if(typeof this.url!="string"||!this.url)return;const t=s_(this.url);t&&t!==this.platform&&(this._platform.value=t)}get baseUrl(){var t;if(this.url&&typeof this.url=="string"){const n=(t=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:t[1];if(!n)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return n}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){if(this.url&&typeof this.url=="string"){const t=o_(this.url);if(!t)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/cim/ts/info/ms01");return t}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/cim/ts/info/ms01")}get tileServiceIp(){var t;if(this.url&&typeof this.url=="string"){const n=(t=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:t[1];if(!n)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return n}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ge([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};h(Ml,"createDefaultProps",()=>({...mr.createDefaultProps(),layerConfig:Kt([]),isSameIP:!1,useEarthDSToken:!1,earthdstoken:""})),h(Ml,"type",Ml.register("ESRtsTileset",Ml,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Ep=Ml;function Pb(r){return typeof r=="number"&&!isNaN(r)}const Rl=class Rl extends mr{get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation,offset:this.offset}}set json(e){this._innerSetJson(e)}async init(e,t){var a;this.featureId=t;const n=await e.getFeatureProperty(t);this.uiShowprops=n.props.map(l=>({featureClassName:l.name,fields:l.props?l.props.map(u=>({key:u.name,type:u.type,value:u.type!="double"?u.value:Pb(u.value)?Number(u.value.toFixed(3)):""})):[]})),this.datasetName=n.datasetName,e.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{e.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const s=(a=(typeof e.url=="string"?e.url:"").match(/^(https?:\/\/[^\/]+)/))==null?void 0:a[0],o=e.tileServiceName;if(!s)throw new Error("ESRtsFeatureEditing: 无法解析服务地址");this.url=l_(s,e.platform,o,this.featureId),this.allowPicking=!0,this.d(this.pickedEvent.don(l=>{l.assign({sceneObject:e}),e.pickedEvent.emit(l)})),this.d(()=>{this.editing=!1,e.removeHighlightDSFeature(this)})}constructor(e){super(e)}};h(Rl,"createDefaultProps",()=>({...mr.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:gt({}),changeMaterial:Kt(void 0),uiShowprops:gt({}),props:gt({})})),h(Rl,"type",Rl.register("ESRtsFeatureEditing",Rl,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Cp=Rl;const Ib=async(r,e,t)=>{try{const n=globalThis.localStorage.getItem("Authorization");let i=r;e&&(i+=`?earthdstoken=${encodeURIComponent(t)}`);const s={headers:{...!e&&n?{Authorization:n}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),l=JSON.parse(a);if(l.status=="ok")return l.data.port;console.error(l.status);return}catch(n){console.error(n)}};function xb(r){return r==="CesiumlabDesktop"?"/osgb":""}function Tb(r){if(/\/osgb\/ts\//.test(r))return"CesiumlabDesktop";if(/\/ts\/(?:info|tiles|featuretiles)\//.test(r))return"CIMRTS"}function f_(r){const e=r.match(/(?:\/osgb)?\/ts\/info\/([^?/]+)/);return e==null?void 0:e[1]}function Ob(r,e,t,n=Date.now()){const i=xb(t);return`${r}:${e}${i}/tiles/tileset.json?t=${n}`}const Ll=class Ll extends mr{constructor(t){super(t);h(this,"_es3DTileset",this.dv(new mr));h(this,"_platform",this.dv(z("CIMRTS")));h(this,"_tilesetServePort",this.dv(z("")));this.collision=!1;{const n=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?(this.syncPlatformFromUrl(),this.refresh()):this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{n()})),this.d(this.platformChanged.don(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const n=this._es3DTileset;this.d(A([n,"allowPicking"],[this,"allowPicking"])),this.d(A([n,"collision"],[this,"collision"])),this.d(tt([n,"flyToParam"],[this,"flyToParam"])),this.d(A([n,"actorTag"],[this,"actorTag"])),this.d(A([n,"materialMode"],[this,"materialMode"])),this.d(A([n,"highlight"],[this,"highlight"])),this.d(A([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(A([n,"highlightID"],[this,"highlightID"])),this.d(A([n,"highlightColor"],[this,"highlightColor"])),this.d(tt([n,"offset"],[this,"offset"])),this.d(tt([n,"rotation"],[this,"rotation"])),this.d(A([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(A([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(A([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(A([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(A([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(A([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(A([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(A([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(A([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(A([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(A([n,"cacheBytes"],[this,"cacheBytes"])),this.d(A([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(A([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(A([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(A([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(A([n,"materialParams"],[this,"materialParams"])),this.d(tt([n,"supportEdit"],[this,"supportEdit"])),this.d(tt([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(tt([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(tt([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(tt([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(tt([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(tt([n,"excavateId"],[this,"excavateId"]))}{const n=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{n.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{n.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{n.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{n.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{n.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{n.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{n.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{n.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{n.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{n.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{n.calcFlyInParam(...i)}))}{const n=this._es3DTileset;this.d(n.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(n.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const n=()=>{this.es3DTileset.show=this.show};n(),this.d(this.showChanged.don(()=>{n()}))}}get es3DTileset(){return this._es3DTileset}get platform(){return this._platform.value}get platformChanged(){return this._platform.changed}set platform(t){this._platform.value=t}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(t){this._tilesetServePort.value=t}async getport(){const t=await Ib(this.url,this.useEarthDSToken,this.earthdstoken);if(t)return this.tilesetServePort=t,t;throw new Error("服务地址port获取失败!")}async refresh(){if(!this.url||typeof this.url!="string"||!f_(this.url))return;const n=+new Date;this.syncPlatformFromUrl();const i=await this.getport(),s=this.tileServiceIp;this._es3DTileset.offset=[0,0,0],this._es3DTileset.rotation=[0,0,0],this._es3DTileset.url=Ob(s,i,this.platform,n),console.log("3dtileset url:",this._es3DTileset.url)}syncPlatformFromUrl(){if(typeof this.url!="string"||!this.url)return;const t=Tb(this.url);t&&t!==this.platform&&(this._platform.value=t)}get baseUrl(){var t;if(this.url&&typeof this.url=="string"){const n=(t=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:t[1];if(!n)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return n}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var t;if(this.url&&typeof this.url=="string"){const n=(t=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:t[1];if(!n)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return n}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){if(this.url&&typeof this.url=="string"){const t=f_(this.url);if(!t)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/osgb/ts/info/ms01");return t}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/osgb/ts/info/ms01")}};h(Ll,"createDefaultProps",()=>({...mr.createDefaultProps(),isSameIP:!1,useEarthDSToken:!1,earthdstoken:""})),h(Ll,"type",Ll.register("ESMsTileset",Ll,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Sp=Ll;const p_={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
383
+ `,Zp=k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/misc/2.geojson"),J=class J extends Y{constructor(e){super(e);a(this,"_flyToFeatureEvent",this.dv(new m));a(this,"_flyToFeatureIndexEvent",this.dv(new m));a(this,"_setFeatureStyleEvent",this.disposeVar(new m));a(this,"_resetFeatureStyleEvent",this.disposeVar(new m));a(this,"_features",this.disposeVar(te(void 0)));a(this,"pickedInfoType","FeatureCollection");a(this,"abortController");this._updateUrl(),this.ad(this.urlChanged.don(()=>{this._updateUrl()})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,t,i){this._flyToFeatureEvent.emit(e,t,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,t){this._flyToFeatureIndexEvent.emit(e,t)}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e,t=!1){this._setFeatureStyleEvent.emit(e,t)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}getFeatureTable(){if(this.features){let e={};return vc(this.features).features.forEach(t=>{Object.assign(e,t.properties)}),Object.keys(e).forEach(t=>{e[t]=typeof e[t]}),e}else console.log("数据未加载完成,请稍后调用此方法getFeatureTable()")}_updateUrl(){var e;if(this.abortController&&this.abortController.abort(),!this.url){this.features=void 0;return}if(typeof this.url=="object")this.features=this.url;else if(ho(this.url))this.features=JSON.parse(this.url);else{this.abortController=new AbortController;const t=this.abortController.signal;fetch(k.context.getStrFromEnv(this.url),{signal:t}).then(i=>i.json()).then(i=>{this.features=i}).catch(i=>{i.name!="AbortError"&&console.warn("ESGeoJson数据加载失败",i)})}this.pickedInfoType=((e=this.features)==null?void 0:e.type)??"FeatureCollection"}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",dataSource:[...e.dataSource,new z([this,"url"],"服务地址",J.defaults.url),new v([this,"minFeatureVisibleDistance"],"要素最小可视距离",J.defaults.minFeatureVisibleDistance),new v([this,"maxFeatureVisibleDistance"],"要素最大可视距离",J.defaults.maxFeatureVisibleDistance),new j([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考"),new j([this,"classificationType"],J.classificationTypes,"贴地附着目标",J.defaults.classificationType),new v([this,"zIndex"],"层级排序",J.defaults.zIndex)],style:[...e.style,new L("点样式集合"),new S([this,"textShow"],"是否显示",J.defaults.textShow),new pe([this,"textAnchor"],"锚点",J.defaults.anchor),new A([this,"textProperty"],"标注显示属性",J.defaults.textStyle.textProperty),new A([this,"textDefaultText"],"默认文本",J.defaults.textStyle.defaultText),new G([this,"textColor"],"文本颜色",J.defaults.textStyle.color),new G([this,"textBackgroundColor"],"文本背景颜色",J.defaults.textStyle.backgroundColor),new A([this,"textFontStyle"],"字体样式",J.defaults.textStyle.fontStyle),new A([this,"textFontWeight"],"字体粗细",J.defaults.textStyle.fontWeight),new v([this,"textFontSize"],"字体大小",J.defaults.textStyle.fontSize),new pe([this,"textOffset"],"像素偏移",J.defaults.textStyle.offset),new L("点图片样式集合"),new S([this,"imageShow"],"是否显示",J.defaults.imageShow),new pe([this,"imageAnchor"],"锚点",J.defaults.imageStyle.anchor),new z([this,"imageUrl"],"图片地址",J.defaults.imageStyle.url),new pe([this,"imageSize"],"图片大小",J.defaults.imageStyle.size),new pe([this,"imageOffset"],"像素偏移",J.defaults.imageStyle.offset),new L("线样式集合"),new S([this,"stroked"],"是否显示",J.defaults.stroked),new S([this,"strokeGround"],"贴地",J.defaults.strokeStyle.ground),new v([this,"strokeWidth"],"线宽",J.defaults.strokeStyle.width),new j([this,"strokeWidthType"],J.strokeStyleWidthTypes,"线宽类型"),new G([this,"strokeColor"],"线颜色",J.defaults.strokeStyle.color),new A([this,"strokeMaterial"],"线材质",J.defaults.strokeStyle.material),new z([this,"strokeMaterialParams"],"线材质参数",J.defaults.strokeStyle.materialParams),new L("面样式集合"),new S([this,"filled"],"是否显示",J.defaults.filled),new S([this,"fillGround"],"贴地",J.defaults.fillStyle.ground),new G([this,"fillColor"],"填充颜色",J.defaults.fillStyle.color),new A([this,"fillMaterial"],"填充材质",J.defaults.fillStyle.material),new z([this,"fillMaterialParams"],"填充材质参数",J.defaults.fillStyle.materialParams)],more:[...e.more,new L("标注文本样式"),new A([this,"textFontFamily"],"字体",J.defaults.textStyle.fontFamily),new v([this,"zOrder"],"点排序优先级",J.defaults.zOrder),new L("通用"),new Vt([this,"loadFuncStr"],"loadFnStr",Qo,tl,!0)]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};a(J,"createDefaultProps",()=>({...Y.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:Zp,stroked:!0,strokeStyle:W({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:W({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:W({url:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/location.png"),size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:W({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE",classificationType:"TERRAIN",zIndex:0})),a(J,"type",J.register("ESGeoJson",J,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"})),a(J,"strokeStyleWidthTypes",[["screen","screen"],["world","world"]]),a(J,"classificationTypes",[["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]]);let pn=J;const Ni=class Ni extends ${constructor(e){super(e);a(this,"editingBindMode","doublePoints");a(this,"_height",this.disposeVar(y(0)));{const t=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};t(),this.ad(this.pointsChanged.don(t))}}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}};a(Ni,"createDefaultProps",()=>({...$.createDefaultProps(),stroked:!0,strokeStyle:W({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(Ni,"type",Ni.register("ESHeightMeasurement",Ni,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),a(Ni,"supportEditingModes",[...$.supportEditingModes,D.DoublePoints,D.DoublePointsAppend,D.DoublePointsModify]);let ea=Ni;const Vi=class Vi extends zt{constructor(e){super(e);a(this,"_area",this.dv(y(0)));a(this,"_perimeter",this.dv(y(0)));a(this,"editingBindMode","doublePoints");const t=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};t(),this.d(this.radiusChanged.don(t))}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,t){return Dc([...this.position],this.radius,e,t)[0].map(r=>[...r,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new v([this,"radius"],"圆半径",1,!0),new re([this,"instances"],"实例化矩阵",Vi.defaults.instances,void 0,!0)],coordinate:[...e.coordinate,new S([this,"editing"],"是否编辑"),new _t([this,"position"],"三维坐标",[0,0,0],!0),new v([this,"area"],"面积",0,!1,!0),new v([this,"perimeter"],"周长",0,!1,!0)]}}};a(Vi,"createDefaultProps",()=>({...zt.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:W({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),instances:ee([])})),a(Vi,"type",Vi.register("ESLocalCircle",Vi,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let ta=Vi;const Ps=class Ps extends zt{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,coordinate:[...s.coordinate,new re([this,"points"],"坐标",[])]}}};a(Ps,"createDefaultProps",()=>({...zt.createDefaultProps(),points:vo([]),filled:!0})),a(Ps,"type",Ps.register("ESLocalPolygon",Ps,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let gn=Ps;const Ts=class Ts extends os{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,coordinate:[...s.coordinate,new re([this,"points"],"本地位置数组",[])]}}};a(Ts,"createDefaultProps",()=>({...os.createDefaultProps(),points:fi(void 0),filled:!0})),a(Ts,"type",Ts.register("ESLocalPolygonZ",Ts,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let ia=Ts;const Is=class Is extends zt{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new v([this,"width"],"宽度"),new v([this,"height"],"高度")]}}};a(Is,"createDefaultProps",()=>({...zt.createDefaultProps(),width:5e5,height:3e5,filled:!0})),a(Is,"type",Is.register("ESLocalRectangle",Is,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let sa=Is;const Pt=class Pt extends ${constructor(e){super(e);a(this,"editingBindMode","lineString");a(this,"_distance",this.dv(y(0)));a(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const t=()=>{if(this.points&&this.points.length>=2){const i=Lt(this.points,"GEODESIC"),r=i[i.length-1];this._distance.value=r}else this._distance.value=0};t(),this.d(this.pointsChanged.don(t))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new v([this,"height"],"高度",10),new v([this,"width"],"宽度",10),new j([this,"materialMode"],Pt.materialModes,"模式",Pt.defaults.materialMode)],coordinate:[...e.coordinate,new v([this,"distance"],"距离",0,!1,!0)]}}};a(Pt,"createDefaultProps",()=>({...$.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:W({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),a(Pt,"type",Pt.register("ESPipeFence",Pt,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),a(Pt,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),a(Pt,"supportEditingModes",[...$.supportEditingModes,D.LineStringAppend,D.LineStringInsert]);let rr=Pt;const Bt=class Bt extends Le{constructor(e){super(e);a(this,"_setLayerVisibleEvent",this.dv(new m));a(this,"_setLayerColorEvent",this.dv(new m))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,t){this._setLayerVisibleEvent.emit(e,t)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,t){this._setLayerColorEvent.emit(e,t)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("ESPipeserTileset"),new N("设置图层可见性",this.setLayerVisible.bind(this),["",""],"setLayerVisible"),new N("设置图层颜色",this.setLayerColor.bind(this),["",""],"setLayerColor"),new j([this,"colorMode"],Bt.colorModes,"colorMode",Bt.defaults.colorMode,!0)]}}};a(Bt,"createDefaultProps",()=>({...Le.createDefaultProps(),colorMode:"default"})),a(Bt,"type",Bt.register("ESPipeserTileset",Bt,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),a(Bt,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let na=Bt;const Ht=class Ht extends ${constructor(e){super(e);a(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new v([this,"area"],"面积",0,!1,!0),new v([this,"perimeter"],"周长",0,!1,!0)],basic:[...e.basic,new v([this,"height"],"高度",10),new j([this,"materialMode"],Ht.materialModes,"模式","danger")]}}};a(Ht,"createDefaultProps",()=>({...$.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),a(Ht,"type",Ht.register("ESPolygonFence",Ht,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),a(Ht,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),a(Ht,"supportEditingModes",[...$.supportEditingModes,D.CircularAppend,D.CircularInsert,D.HeightModify]);let or=Ht;const ai=class ai extends ${constructor(e){super(e);a(this,"_deprecated",["ground"]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());a(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("通用"),new S([this,"ground"],"是否贴地"),new S([this,"outlineTranslucent"],"轮廓线半透明"),new v([this,"height"],"高度"),new v([this,"extrudedHeight"],"拉伸高度"),new Je([this,"rectangle"],"范围",ai.defaults.rectangle,!0),new v([this,"stRotation"],"纹理旋转角度"),new v([this,"rotation"],"旋转角度"),new S([this,"pointEditing"],"是否单点编辑")]}}};a(ai,"createDefaultProps",()=>({...$.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:ee(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),a(ai,"type",ai.register("ESRectangle",ai,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),a(ai,"supportEditingModes",[...$.supportEditingModes,D.DoublePoints,D.DoublePointsAppend,D.DoublePointsModify]);let ra=ai;const Os=class Os extends Q{getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new re([this,"innerRings"],"裁切多边形数组",[],void 0,!0),new S([this,"gradient"],"是否使用渐变填充",!1),new S([this,"light"],"是否使用光照",!1)]}}};a(Os,"createDefaultProps",()=>({...Q.createDefaultProps(),innerRings:Pr([]),gradient:!1,light:!1})),a(Os,"type",Os.register("ESPolygonWithHole",Os,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let oa=Os;const hi=class hi extends Q{constructor(e){super(e);a(this,"_startEvent",this.disposeVar(new m));a(this,"_stopEvent",this.dv(new m));a(this,"_surfaceArea",this.disposeVar(y(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("表面积测量"),new N("开始计算",()=>this.start(),[],"start"),new N("停止计算",()=>this.stop(),[],"stop"),new v([this,"interpolation"],"插值距离",hi.defaults.interpolation),new v([this,"offsetHeight"],"偏移高度",hi.defaults.offsetHeight)]}}};a(hi,"createDefaultProps",()=>({...Q.createDefaultProps(),interpolation:.5,offsetHeight:0,units:F(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:W({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),a(hi,"type",hi.register("ESSurfaceAreaMeasurement",hi,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let aa=hi;const ci=class ci extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new v([this,"downloadProgress"],"下载进度",ci.defaults.downloadProgress,!0,!0),new z([this,"importOptions"],"导入参数",ci.defaults.importOptions,void 0,!0)],dataSource:[...s.dataSource,new z([this,"url"],"路径")]}}};a(ci,"createDefaultProps",()=>({...M.createDefaultProps(),url:"",importOptions:te({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),a(ci,"type",ci.register("ESDatasmithRuntimeModel",ci,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let ha=ci;const Pe=class Pe extends gn{constructor(s){super(s),this.ad(ue([this.waterColorChanged,this.waterImageChanged,this.frequencyChanged,this.amplitudeChanged,this.flowDirectionChanged,this.waveVelocityChanged,this.specularIntensityChanged,this.murkinessChanged,this.flowSpeedChanged],()=>{this.waterType="custom"}))}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new j([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Pe.defaults.waterType),new v([this,"frequency"],"频率",Pe.defaults.frequency),new ge([this,"amplitude"],.01,[0,1],"振幅",Pe.defaults.amplitude),new ge([this,"flowDirection"],1,[0,360],"流向",Pe.defaults.flowDirection),new ge([this,"waveVelocity"],.01,[0,1],"波动频率",Pe.defaults.waveVelocity),new ge([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Pe.defaults.specularIntensity),new ge([this,"murkiness"],.1,[0,10],"水体浑浊度",Pe.defaults.murkiness),new v([this,"flowSpeed"],"水流速度",Pe.defaults.flowSpeed),new G([this,"waterColor"],"水的底色",Pe.defaults.waterColor),new z([this,"waterImage"],"水的图片",Pe.defaults.waterImage)]}}};a(Pe,"createDefaultProps",()=>({...gn.createDefaultProps(),allowPicking:!0,waterImage:te(void 0),waterColor:[.15,.16,0,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),a(Pe,"type",Pe.register("ESDynamicWater",Pe,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let ca=Pe;const Te=class Te extends Q{constructor(s){super(s),this.ad(ue([this.waterColorChanged,this.waterImageChanged,this.frequencyChanged,this.amplitudeChanged,this.flowDirectionChanged,this.waveVelocityChanged,this.specularIntensityChanged,this.murkinessChanged,this.flowSpeedChanged],()=>{this.waterType="custom"}))}getESProperties(){const s={...super.getESProperties()};return{...s,defaultMenu:"basic",basic:[...s.basic,new j([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Te.defaults.waterType),new v([this,"frequency"],"频率",Te.defaults.frequency),new ge([this,"amplitude"],.01,[0,1],"振幅",Te.defaults.amplitude),new ge([this,"flowDirection"],1,[0,360],"流向",Te.defaults.flowDirection),new ge([this,"waveVelocity"],.01,[0,1],"波动频率",Te.defaults.waveVelocity),new ge([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Te.defaults.specularIntensity),new ge([this,"murkiness"],.1,[0,10],"水体浑浊度",Te.defaults.murkiness),new v([this,"flowSpeed"],"水流速度",Te.defaults.flowSpeed),new G([this,"waterColor"],"水的底色",Te.defaults.waterColor),new z([this,"waterImage"],"水的图片",Te.defaults.waterImage)]}}};a(Te,"createDefaultProps",()=>({...Q.createDefaultProps(),allowPicking:!0,waterImage:te({}),waterColor:[.15,.16,0,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),a(Te,"type",Te.register("ESGeoWater",Te,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let la=Te;const Li=class Li extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new v([this,"downloadProgress"],"下载进度",Li.defaults.downloadProgress,!0,!0),new A([this,"levelName"],"levelName",""),new v([this,"levelLoadDistance"],"levelLoadDistance",1e3),new ve([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...s.dataSource,new z([this,"url"],"url","")]}}};a(Li,"createDefaultProps",()=>({...M.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:F([0,0,0]),levelLoadDistance:1e3})),a(Li,"type",Li.register("ESLevelRuntimeModel",Li,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let da=Li;const Be=class Be extends we{constructor(e){super(e);a(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new v([this,"radius"],"半径",Be.defaults.radius),new v([this,"sides"],"圆边数",Be.defaults.sides),new v([this,"speed"],"材质速度",Be.defaults.speed),new j([this,"materialMode"],Be.materialModes,"材质模式",Be.defaults.materialMode),new z([this,"materialImage"],"材质图片和重复度",Be.defaults.materialImage)]}}};a(Be,"createDefaultProps",()=>({...we.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:W({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:W({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),a(Be,"type",Be.register("ESPipeline",Be,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),a(Be,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let ua=Be;const Tt=class Tt extends ${constructor(e){super(e);a(this,"editingBindMode","visibility")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new G([this,"visibleColor"],"可视区域颜色",Tt.defaults.visibleColor),new G([this,"invisibleColor"],"遮挡区域颜色",Tt.defaults.invisibleColor),new v([this,"heightOffset"],"视点高度偏移",Tt.defaults.heightOffset)]}}};a(Tt,"createDefaultProps",()=>({...$.createDefaultProps(),visibleColor:F([0,1,0,1]),invisibleColor:F([1,0,0,1]),heightOffset:0})),a(Tt,"type",Tt.register("ESVisibilityAnalysis",Tt,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),a(Tt,"supportEditingModes",[...$.supportEditingModes,D.VisibilityAppend,D.VisibilityModify]);let pa=Tt;const Ds=class Ds extends Q{constructor(e){super(e);a(this,"_startEvent",this.dv(new m));a(this,"_clearEvent",this.dv(new m));a(this,"_volume",this.disposeVar(y(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("通用"),new v([this,"planeHeight"],"基准面高程",void 0,!0),new v([this,"gridWidth"],"采样间距 m"),new v([this,"cutVolume"],"挖方",0,!1,!0),new v([this,"fillVolume"],"填方",0,!1,!0),new v([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new v([this,"progress"],"计算进度",0,!1,!0),new N("开始分析",()=>this.start(),[],"start"),new N("清空分析结果",()=>this.clear(),[],"clear"),new S([this,"depthTest"],"是否开启深度检测")]}}};a(Ds,"createDefaultProps",()=>({...Q.createDefaultProps(),planeHeight:y(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:W({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(Ds,"type",Ds.register("ESVolumeMeasurement",Ds,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let ga=Ds;const Fs=class Fs extends ze{constructor(e){super(e);a(this,"_human",this.dv(new ze));a(this,"_poi",this.dv(new un));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._poi));{const{_human:t,_poi:i}=this;this.d(_([t,"show"],[this,"show"])),this.d(_([i,"show"],[this,"show"])),this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([i,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"scale"],[this,"scale"])),this.d(_([i,"scale"],[this,"scale"])),this.d(_([t,"collision"],[this,"collision"])),this.d(_([i,"collision"],[this,"collision"])),this.d(x([t,"flyInParam"],[this,"flyInParam"])),this.d(x([t,"flyToParam"],[this,"flyToParam"])),this.d(_([t,"animation"],[this,"animation"])),this.d(_([t,"mode"],[this,"mode"])),this.d(_([t,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(_([t,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(_([i,"name"],[this,"name"])),this.d(_([i,"mode"],[this,"poiMode"])),this.d(_([i,"autoAnchor"],[this,"autoAnchor"])),this.d(_([i,"screenRender"],[this,"screenRender"])),this.d(_([i,"size"],[this,"size"])),this.d(_([i,"anchor"],[this,"anchor"])),this.d(_([i,"sizeByContent"],[this,"sizeByContent"])),this.d(_([i,"renderMode"],[this,"renderMode"])),this.d(_([i,"rotationType"],[this,"rotationType"])),this.d(_([i,"zOrder"],[this,"zOrder"])),this.d(_([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(_([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(x([t,"position"],[this,"position"])),this.d(x([t,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(r=>{t.flyIn(r)})),this.d(this.flyToEvent.don(r=>{t.flyTo(r)})),this.d(this.calcFlyToParamEvent.don(()=>{t.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{t.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((r,o)=>{t.smoothMove(r,o)})),this.d(this.smoothMoveWithRotationEvent.don((r,o,h)=>{t.smoothMoveWithRotation(r,o,h)})),this.d(this.smoothMoveOnGroundEvent.don((r,o,h,c)=>{t.smoothMoveOnGround(r,o,h,c)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((r,o,h,c,l)=>{t.smoothMoveWithRotationOnGround(r,o,h,c,l)})),this.d(this.automaticLandingEvent.don(()=>{t.automaticLanding()})),this.d(this._human.readyEvent.don(r=>{this.readyEvent.emit(r)}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new j([this,"poiMode"],un.modes,"poi模式","SquareH01"),new v([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};a(Fs,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:W({}),autoAnchor:!0,screenRender:!0,size:F([100,100]),anchor:F([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...ze.createDefaultProps()})),a(Fs,"type",Fs.register("ESHumanPoi",Fs,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let fa=Fs;const It=class It extends M{constructor(s){super(s)}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"basic",basic:[new A([this,"image"],"图片",It.defaults.image),new v([this,"height"],"喷泉高度",It.defaults.height),new v([this,"spread"],"扩散角度",It.defaults.spread),new v([this,"emissionRate"],"发射率",It.defaults.emissionRate)]}}};a(It,"createDefaultProps",()=>({...M.createDefaultProps(),image:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/smoke.png"),height:10,spread:5,emissionRate:50})),a(It,"type",It.register("ESFountainParticleSystem",It,{chsName:"粒子喷泉",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子喷泉"}));let ar=It;const He=class He extends ze{constructor(e){super(e);a(this,"_human",this.dv(new ze));a(this,"_fountain",this.dv(new ar));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._fountain));{const{_human:t,_fountain:i}=this;this.ad(ue([this.showChanged,this.humanShowChanged,this.fountainShowChanged],()=>{t.show=this.show&&this.humanShow,i.show=this.show&&this.fountainShow},{immediate:!0})),this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([i,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"scale"],[this,"scale"])),this.d(_([i,"scale"],[this,"scale"])),this.d(_([t,"collision"],[this,"collision"])),this.d(_([i,"collision"],[this,"collision"])),this.d(x([t,"flyInParam"],[this,"flyInParam"])),this.d(x([t,"flyToParam"],[this,"flyToParam"])),this.d(_([t,"animation"],[this,"animation"])),this.d(_([t,"mode"],[this,"mode"])),this.d(_([t,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(_([t,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.ad(ue([this.positionOffsetChanged,this.fountainOffsetChanged],()=>{t.positionOffset=this.positionOffset,i.positionOffset=[this.positionOffset[0]+this.fountainOffset[0],this.positionOffset[1]+this.fountainOffset[1],this.positionOffset[2]+this.fountainOffset[2]]},{immediate:!0})),this.d(x([t,"position"],[this,"position"])),this.d(x([t,"rotation"],[this,"rotation"])),this.d(x([i,"position"],[this,"position"])),this.ad(ue(this.rotationChanged,()=>{i.rotation=[this.rotation[0],this.rotation[1]-30,this.rotation[2]]},{immediate:!0})),this.d(_([i,"image"],[this,"fountainImage"])),this.d(_([i,"height"],[this,"fountainHeight"])),this.d(_([i,"spread"],[this,"fountainSpread"])),this.d(_([i,"emissionRate"],[this,"fountainEmissionRate"])),this.d(this.flyInEvent.don(r=>{t.flyIn(r)})),this.d(this.flyToEvent.don(r=>{t.flyTo(r)})),this.d(this.calcFlyToParamEvent.don(()=>{t.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{t.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((r,o)=>{t.smoothMove(r,o)})),this.d(this.smoothMoveWithRotationEvent.don((r,o,h)=>{t.smoothMoveWithRotation(r,o,h)})),this.d(this.smoothMoveOnGroundEvent.don((r,o,h,c)=>{t.smoothMoveOnGround(r,o,h,c)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((r,o,h,c,l)=>{t.smoothMoveWithRotationOnGround(r,o,h,c,l)})),this.d(this.automaticLandingEvent.don(()=>{t.automaticLanding()})),this.d(this._human.readyEvent.don(r=>{this.readyEvent.emit(r)}))}}get human(){return this._human}get fountain(){return this._fountain}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new S([this,"humanShow"],"人物显隐",He.defaults.humanShow),new S([this,"fountainShow"],"喷泉显隐",He.defaults.fountainShow),new A([this,"fountainImage"],"喷泉图片",He.defaults.fountainImage),new ve([this,"fountainOffset"],"喷泉偏移",He.defaults.fountainOffset),new v([this,"fountainHeight"],"喷泉高度",He.defaults.fountainHeight),new v([this,"fountainSpread"],"喷泉扩散角度",He.defaults.fountainSpread),new v([this,"fountainEmissionRate"],"喷泉发射率",He.defaults.fountainEmissionRate)]}}};a(He,"createDefaultProps",()=>({...ze.createDefaultProps(),humanShow:!0,fountainShow:!0,fountainImage:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/smoke.png"),fountainOffset:F([0,0,0]),fountainHeight:10,fountainSpread:5,fountainEmissionRate:50})),a(He,"type",He.register("ESHumanFountain",He,{chsName:"人员喷泉",tags:["ESObjects"],description:"ESHuman + ESFountainParticleSystem组合对象,喷泉从人物手中喷出"}));let ma=He;const Ze=class Ze extends Q{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new v([this,"depth"],"深度",Ze.defaults.depth),new v([this,"interpolation"],"插值",Ze.defaults.interpolation),new v([this,"opacity"],"透明度",Ze.defaults.opacity),new z([this,"sideImage"],"侧面图片",Ze.defaults.sideImage),new z([this,"bottomImage"],"底面图片",Ze.defaults.bottomImage),new v([this,"extendBoundary"],"外扩边界采样高度",Ze.defaults.extendBoundary)]}}};a(Ze,"createDefaultProps",()=>({...Q.createDefaultProps(),depth:100,sideImage:W({url:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:W({url:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50}),opacity:1,interpolation:50,collision:!1,allowPicking:!1,filled:!0,extendBoundary:1})),a(Ze,"type",Ze.register("ESPit",Ze,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let hs=Ze;const xs=class xs extends hs{constructor(e){super(e);a(this,"_excavate",this.dv(new ln));a(this,"_pit",this.dv(new hs));this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit,!0));{const{_excavate:t,_pit:i}=this;this.d(_([t,"show"],[this,"show"])),this.d(_([i,"show"],[this,"show"])),this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([i,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"collision"],[this,"collision"])),this.d(_([i,"collision"],[this,"collision"])),this.d(x([i,"points"],[this,"points"])),this.d(_([t,"points"],[this,"points"])),this.d(_([i,"pointed"],[this,"pointed"])),this.d(_([t,"pointed"],[this,"pointed"])),this.d(_([i,"pointStyle"],[this,"pointStyle"])),this.d(_([t,"pointStyle"],[this,"pointStyle"])),this.d(_([i,"stroked"],[this,"stroked"])),this.d(_([t,"stroked"],[this,"stroked"])),this.d(_([i,"strokeStyle"],[this,"strokeStyle"])),this.d(_([t,"strokeStyle"],[this,"strokeStyle"])),this.d(_([i,"filled"],[this,"filled"])),this.d(_([i,"fillStyle"],[this,"fillStyle"])),this.d(_([t,"fillStyle"],[this,"fillStyle"])),this.d(_([t,"mode"],[this,"mode"])),this.d(_([t,"targetID"],[this,"targetID"])),this.d(_([i,"depth"],[this,"depth"])),this.d(_([i,"sideImage"],[this,"sideImage"])),this.d(_([i,"bottomImage"],[this,"bottomImage"])),this.d(_([i,"opacity"],[this,"opacity"])),this.d(_([i,"interpolation"],[this,"interpolation"])),this.d(x([i,"flyInParam"],[this,"flyInParam"])),this.d(x([i,"flyToParam"],[this,"flyToParam"])),this.ad(x([i,"extendBoundary"],[this,"extendBoundary"])),this.d(this.flyInEvent.don(r=>{i.flyIn(r)})),this.d(this.flyToEvent.don(r=>{i.flyTo(r)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new j([this,"mode"],ln.modes,"模式","in"),new A([this,"targetID"],"目标图层id","")]}}};a(xs,"createDefaultProps",()=>({...hs.createDefaultProps(),mode:"in",targetID:""})),a(xs,"type",xs.register("ESHole",xs,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let va=xs;function il(n){return n.startsWith("/")&&!n.startsWith("//")}function hr(n){var s;return!n||/^https?:\/\//i.test(n)?n:il(n)&&typeof globalThis<"u"&&((s=globalThis.location)!=null&&s.origin)?`${globalThis.location.origin}${n}`:n}function cr(n){var e;return(e=hr(n).match(/^(https?:\/\/[^/]+)/i))==null?void 0:e[1]}function sl(n){var e;return(e=hr(n).match(/^(https?:\/\/[^:]+)/i))==null?void 0:e[1]}function Ci(n){return n==="CesiumlabDesktop"?"/cim":""}function nl(n){if(/\/cim\/ts\//.test(n))return"CesiumlabDesktop";if(/\/ts\/(?:info|tiles|featuretiles)\//.test(n))return"CIMRTS"}function rl(n){const s=n.match(/(?:\/cim)?\/ts\/info\/([^?/]+)/);return s==null?void 0:s[1]}function Qp(n,s,e){const t=Ci(s);return`${n}${t}/ts/info/${e}`}function ol(n,s,e,t=Date.now()){const i=Ci(s);return`${n}${i}/ts/tiles/${e}/tileset.json?t=${t}`}function al(n,s,e,t){const i=Ci(s);return`${n}${i}/ts/featuretiles/${e}/${t}/tileset.json`}const lr={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},hl=async(n,s,e,t,i="CIMRTS")=>{try{const r=globalThis.localStorage.getItem("Authorization"),o=Ci(i);let h=n+`${o}${lr.layerconfigfind}?tileServiceName=${s}`;e&&(h+=`&earthdstoken=${encodeURIComponent(t)}`);const c={headers:{...!e&&r?{Authorization:r}:{}},mode:"cors"},u=await(await fetch(h,c)).text();return JSON.parse(u)}catch(r){console.error(r)}},cl=async(n,s,e,t,i,r="CIMRTS")=>{try{const o=globalThis.localStorage.getItem("Authorization"),h=Ci(r);let c=n+`${h}${lr.layerconfigsave}`;const l=i??{};e&&(c+=`?earthdstoken=${encodeURIComponent(t)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!e&&o?{Authorization:o}:{}},mode:"cors",body:JSON.stringify({tileServiceName:s,layerConfig:JSON.stringify(l)})},g=await(await fetch(c,u)).text();return JSON.parse(g)}catch(o){console.error(o)}},ll=async(n,s,e)=>{try{const t=globalThis.localStorage.getItem("Authorization");let i=n;s&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const r={headers:{...!s&&t?{Authorization:t}:{}},mode:"cors"},h=await(await fetch(i,r)).text(),c=JSON.parse(h);if(c.status=="ok")return c.data.port;console.error(c.status);return}catch(t){console.error(t)}},dl=async(n,s,e,t,i,r="CIMRTS")=>{try{const o={tileServiceName:s,featureId:e},h=globalThis.localStorage.getItem("Authorization"),c=Ci(r);let l=n+`${c}${lr.featureproperty}`;t&&(l+=`?earthdstoken=${encodeURIComponent(i)}`);const p=await(await fetch(l,{method:"post",headers:{"Content-Type":"application/json",...!t&&h?{Authorization:h}:{}},body:JSON.stringify(o),mode:"cors"})).text(),g=JSON.parse(p);if(g.status=="ok")return g.data;console.error(g.data.status);return}catch(o){console.error(o)}},ks=class ks extends Le{constructor(e){super(e);a(this,"_es3DTileset",this.dv(new Le));a(this,"_ids",this.dv(W([])));a(this,"_platform",this.dv(y("CIMRTS")));a(this,"_visJson",this.disposeVar(y({})));a(this,"_highlightInner3DtilesetEvent",this.dv(new m));a(this,"_removeHighlightInner3DtilesetEvent",this.dv(new m));a(this,"_tilesetServePort",this.dv(y("")));this.collision=!1;{const t=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01");return}this.url?(this.syncPlatformFromUrl(),this.refresh()):this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{t()})),this.d(this.platformChanged.don(()=>{t()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const t=this._es3DTileset;this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"collision"],[this,"collision"])),this.d(x([t,"flyToParam"],[this,"flyToParam"])),this.d(_([t,"actorTag"],[this,"actorTag"])),this.d(_([t,"materialMode"],[this,"materialMode"])),this.d(_([t,"highlight"],[this,"highlight"])),this.d(_([t,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(_([t,"highlightID"],[this,"highlightID"])),this.d(_([t,"highlightColor"],[this,"highlightColor"])),this.d(x([t,"offset"],[this,"offset"])),this.d(x([t,"rotation"],[this,"rotation"])),this.d(_([t,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(_([t,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(_([t,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(_([t,"czmClassificationType"],[this,"czmClassificationType"])),this.d(_([t,"czmStyleJson"],[this,"czmStyleJson"])),this.d(_([t,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(_([t,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(_([t,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(_([t,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(_([t,"colorBlendMode"],[this,"colorBlendMode"])),this.d(_([t,"cacheBytes"],[this,"cacheBytes"])),this.d(_([t,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(_([t,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(_([t,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(_([t,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(_([t,"materialParams"],[this,"materialParams"])),this.d(x([t,"supportEdit"],[this,"supportEdit"])),this.d(x([t,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(x([t,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(x([t,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(x([t,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(x([t,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(x([t,"excavateId"],[this,"excavateId"]))}{const t=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{t.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{t.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{t.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{t.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{t.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{t.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{t.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{t.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{t.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{t.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{t.calcFlyInParam(...i)}))}{const t=this._es3DTileset;this.d(t.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(t.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const t=()=>{this.es3DTileset.show=this.show};t(),this.d(this.showChanged.don(()=>{t()}))}}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}get platform(){return this._platform.value}get platformChanged(){return this._platform.changed}set platform(e){this._platform.value=e}get visJson(){return this._visJson.value}set visJson(e){this._visJson.value=e}get visJsonChanged(){return this._visJson.changed}setFeatureVisable(e,t){var i;if((i=this.layerConfig)!=null&&i.length){const r={};r[t[0].value]=t[0].visable,this.visJson={...this.visJson,...r}}else this.setFeatureVisableEvent.emit(e,typeof t=="string"?JSON.parse(t):t,!0)}async getFeatureProperty(e){return await dl(this.baseUrl,this.tileServiceName,e,this.useEarthDSToken,this.earthdstoken,this.platform)}async getLayerConfig(){const e=await hl(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,this.platform);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await cl(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,e,this.platform)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,t){var h,c,l;const i=await e.pick(t),r=i.sceneObject;return!r||r.id!==this.id&&r.typeName!="ESRtsFeatureEditing"?void 0:r.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(h=i==null?void 0:i.tilesetPickInfo)==null?void 0:h.id],{featureId:(c=i==null?void 0:i.tilesetPickInfo)==null?void 0:c.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(l=i==null?void 0:i.sceneObject)==null?void 0:l.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await ll(hr(this.url),this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){if(!this.url||typeof this.url!="string")return;const e=+new Date,t=cr(this.url);t&&(this.syncPlatformFromUrl(),this._es3DTileset.offset=[0,0,0],this._es3DTileset.rotation=[0,0,0],this._es3DTileset.url=ol(t,this.platform,this.tileServiceName,e),console.log("3dtileset url:",this._es3DTileset.url))}syncPlatformFromUrl(){if(typeof this.url!="string"||!this.url)return;const e=nl(this.url);e&&e!==this.platform&&(this._platform.value=e)}get baseUrl(){if(this.url&&typeof this.url=="string"){const e=cr(this.url);if(!e)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01");return e}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01")}get tileServiceName(){if(this.url&&typeof this.url=="string"){const e=rl(this.url);if(!e)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/cim/ts/info/ms01");return e}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/cim/ts/info/ms01")}get tileServiceIp(){if(this.url&&typeof this.url=="string"){const e=sl(this.url);if(!e)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01");return e}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new re([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};a(ks,"createDefaultProps",()=>({...Le.createDefaultProps(),layerConfig:te([]),isSameIP:!1,useEarthDSToken:!1,earthdstoken:""})),a(ks,"type",ks.register("ESRtsTileset",ks,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let _a=ks;function eg(n){return typeof n=="number"&&!isNaN(n)}const Ms=class Ms extends Le{get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation,offset:this.offset}}set json(s){this._innerSetJson(s)}async init(s,e){this.featureId=e;const t=await s.getFeatureProperty(e);this.uiShowprops=t.props.map(h=>({featureClassName:h.name,fields:h.props?h.props.map(c=>({key:c.name,type:c.type,value:c.type!="double"?c.value:eg(c.value)?Number(c.value.toFixed(3)):""})):[]})),this.datasetName=t.datasetName,s.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{s.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const i=typeof s.url=="string"?s.url:"",r=cr(i),o=s.tileServiceName;if(!r)throw new Error("ESRtsFeatureEditing: 无法解析服务地址");this.url=al(r,s.platform,o,this.featureId),this.allowPicking=!0,this.d(this.pickedEvent.don(h=>{h.assign({sceneObject:s}),s.pickedEvent.emit(h)})),this.d(()=>{this.editing=!1,s.removeHighlightDSFeature(this)})}constructor(s){super(s)}};a(Ms,"createDefaultProps",()=>({...Le.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:W({}),changeMaterial:te(void 0),uiShowprops:W({}),props:W({})})),a(Ms,"type",Ms.register("ESRtsFeatureEditing",Ms,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let wa=Ms;const tg=async(n,s,e)=>{try{const t=globalThis.localStorage.getItem("Authorization");let i=n;s&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const r={headers:{...!s&&t?{Authorization:t}:{}},mode:"cors"},h=await(await fetch(i,r)).text(),c=JSON.parse(h);if(c.status=="ok")return c.data.port;console.error(c.status);return}catch(t){console.error(t)}};function ig(n){return n==="CesiumlabDesktop"?"/osgb":""}function sg(n){if(/\/osgb\/ts\//.test(n))return"CesiumlabDesktop";if(/\/ts\/(?:info|tiles|featuretiles)\//.test(n))return"CIMRTS"}function ul(n){const s=n.match(/(?:\/osgb)?\/ts\/info\/([^?/]+)/);return s==null?void 0:s[1]}function ng(n,s,e,t=Date.now()){const i=ig(e);return`${n}:${s}${i}/tiles/tileset.json?t=${t}`}const js=class js extends Le{constructor(e){super(e);a(this,"_es3DTileset",this.dv(new Le));a(this,"_platform",this.dv(y("CIMRTS")));a(this,"_tilesetServePort",this.dv(y("")));this.collision=!1;{const t=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?(this.syncPlatformFromUrl(),this.refresh()):this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{t()})),this.d(this.platformChanged.don(()=>{t()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const t=this._es3DTileset;this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"collision"],[this,"collision"])),this.d(x([t,"flyToParam"],[this,"flyToParam"])),this.d(_([t,"actorTag"],[this,"actorTag"])),this.d(_([t,"materialMode"],[this,"materialMode"])),this.d(_([t,"highlight"],[this,"highlight"])),this.d(_([t,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(_([t,"highlightID"],[this,"highlightID"])),this.d(_([t,"highlightColor"],[this,"highlightColor"])),this.d(x([t,"offset"],[this,"offset"])),this.d(x([t,"rotation"],[this,"rotation"])),this.d(_([t,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(_([t,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(_([t,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(_([t,"czmClassificationType"],[this,"czmClassificationType"])),this.d(_([t,"czmStyleJson"],[this,"czmStyleJson"])),this.d(_([t,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(_([t,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(_([t,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(_([t,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(_([t,"colorBlendMode"],[this,"colorBlendMode"])),this.d(_([t,"cacheBytes"],[this,"cacheBytes"])),this.d(_([t,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(_([t,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(_([t,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(_([t,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(_([t,"materialParams"],[this,"materialParams"])),this.d(x([t,"supportEdit"],[this,"supportEdit"])),this.d(x([t,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(x([t,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(x([t,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(x([t,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(x([t,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(x([t,"excavateId"],[this,"excavateId"]))}{const t=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{t.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{t.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{t.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{t.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{t.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{t.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{t.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{t.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{t.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{t.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{t.calcFlyInParam(...i)}))}{const t=this._es3DTileset;this.d(t.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(t.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const t=()=>{this.es3DTileset.show=this.show};t(),this.d(this.showChanged.don(()=>{t()}))}}get es3DTileset(){return this._es3DTileset}get platform(){return this._platform.value}get platformChanged(){return this._platform.changed}set platform(e){this._platform.value=e}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await tg(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){if(!this.url||typeof this.url!="string"||!ul(this.url))return;const t=+new Date;this.syncPlatformFromUrl();const i=await this.getport(),r=this.tileServiceIp;this._es3DTileset.offset=[0,0,0],this._es3DTileset.rotation=[0,0,0],this._es3DTileset.url=ng(r,i,this.platform,t),console.log("3dtileset url:",this._es3DTileset.url)}syncPlatformFromUrl(){if(typeof this.url!="string"||!this.url)return;const e=sg(this.url);e&&e!==this.platform&&(this._platform.value=e)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const t=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!t)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return t}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const t=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!t)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return t}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){if(this.url&&typeof this.url=="string"){const e=ul(this.url);if(!e)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/osgb/ts/info/ms01");return e}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/osgb/ts/info/ms01")}};a(js,"createDefaultProps",()=>({...Le.createDefaultProps(),isSameIP:!1,useEarthDSToken:!1,earthdstoken:""})),a(js,"type",js.register("ESMsTileset",js,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let ya=js;const pl={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
388
384
  ## 参数类型为 ESPoiType[]
389
385
  \`\`\`js
390
386
  type Vector2D = [number, number]
@@ -397,7 +393,7 @@ ${np}
397
393
  hiddenDistance: number
398
394
  }
399
395
  \`\`\`
400
- `},ca=class ca extends jt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new dt("通用"),new ft([this,"url"],"路径"),new ge([this,"poiTypes"],ca.defaults.poiTypes,p_.sampleValue),new M([this,"heightOffset"])]}}};h(ca,"createDefaultProps",()=>({...jt.createDefaultProps(),url:"",poiTypes:Kt(p_.defaultValue),heightOffset:40})),h(ca,"type",ca.register("ESPoiTileset",ca,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let bp=ca;const Fl=class Fl extends lt{getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new dt("通用"),new X([this,"show"],"是否显示"),new st([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new Me([this,"cssPosition"],"位置")]}}};h(Fl,"createDefaultProps",()=>({...lt.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),h(Fl,"type",Fl.register("ESScale",Fl,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Pp=Fl;const ts=class ts extends Bt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new M([this,"height"],"高度",ts.defaults.height,!0),new M([this,"extrudedHeight"],"拉伸高度",ts.defaults.extrudedHeight,!0),new X([this,"perPositionHeight"],"应用每个位置高度",ts.defaults.perPositionHeight,!0)]}}};h(ts,"createDefaultProps",()=>({...Bt.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),h(ts,"type",ts.register("ESGeoExtrudedPolygon",ts,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),h(ts,"supportEditingModes",[...Bt.supportEditingModes,Z.HeightModify]);let Yo=ts;const ha=class ha extends Bt{constructor(t){super(t);h(this,"_classification",this.dv(new fh));h(this,"_geoExtrudedPolygon",this.dv(new Yo));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:n,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(A([n,"collision"],[this,"collision"])),this.d(A([i,"collision"],[this,"collision"])),this.d(tt([i,"flyInParam"],[this,"flyInParam"])),this.d(tt([i,"flyToParam"],[this,"flyToParam"])),this.d(tt([i,"points"],[this,"points"])),this.d(tt([i,"extrudedHeight"],[this,"height"])),this.d(tt([n,"fillColor"],[this,"overheightColor"])),this.d(tt([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:a,maxHeight:l}=this;if(!a)return;const u=a.map(c=>[c[0],c[1],o]);n.points=u,n.height=l-o,l-o<=0?n.show=!1:n.show=this.show&&this.filled};s(),this.d(Ne([this.heightChanged,this.pointsChanged,this.maxHeightChanged],s))}{const s=()=>{const{show:o,filled:a}=this;n.show=o&&a,i.show=o&&a};s(),this.d(Ne([this.showChanged,this.filledChanged],s))}this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new M([this,"height"],"高度",10),new M([this,"maxHeight"],"最高高度",200),new Pt([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new Pt([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};h(ha,"createDefaultProps",()=>({...Bt.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),h(ha,"type",ha.register("ESHeightLimitAnalysis",ha,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),h(ha,"supportEditingModes",[...Bt.supportEditingModes,Z.HeightModify]);let Ip=ha;const bi=class bi extends jt{constructor(t){super(t);h(this,"_widgetEvent",this.dv(new N));h(this,"_data",this.dv(z(void 0)));{const n=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:Ed(this.url)?this.data=JSON.parse(this.url):fetch(lt.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};n(),this.d(this.urlChanged.don(n))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(t){this._data.value=t}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ft([this,"url"],"地址",bi.defaults.url),new M([this,"pixelRange"],"集合范围",bi.defaults.pixelRange),new M([this,"minimumClusterSize"],"最小数量",bi.defaults.minimumClusterSize),new st([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","NONE")],more:[...t.more,new ft([this,"style"],"style",bi.defaults.style),new X([this,"perspective"],"透视效果",bi.defaults.perspective)]}}};h(bi,"createDefaultProps",()=>({...jt.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:Kt({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"NONE",perspective:!1})),h(bi,"type",bi.register("ESEntityCluster",bi,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let xp=bi;class Hu extends U{constructor(){super();h(this,"_player",this.disposeVar(new $r));const t=this._player;{const n=()=>{const i=(this.stopTime??0)-(this.startTime??0);t.duration=i>0?i:0};n(),this.d(this.startTimeChanged.don(n)),this.d(this.stopTimeChanged.don(n))}this.d(tt([t,"playing"],[this,"playing"])),this.d(tt([t,"loop"],[this,"loop"])),this.d(tt([t,"speed"],[this,"speed"])),this.d(t.currentTimeChanged.don(()=>{this.startTime!==void 0&&t.currentTime!==void 0&&(this.currentTime=t.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const n=this.currentTime-this.startTime;t.currentTime=uc(n,0,t.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(t){this._player.ratio=t}}(r=>{r.createDefaultProps=()=>({...lt.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(Hu||(Hu={})),Fs(Hu.prototype,Hu.createDefaultProps);const Al=class Al extends lt{constructor(t){super(t);h(this,"_absolutePlayer",this.dv(new Hu));const n=this.absolutePlayer;this.d(tt([n,"currentTime"],[this,"currentTime"])),this.d(tt([n,"startTime"],[this,"startTime"])),this.d(tt([n,"stopTime"],[this,"stopTime"])),this.d(tt([n,"playing"],[this,"playing"])),this.d(tt([n,"loop"],[this,"loop"])),this.d(tt([n,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(t){this._absolutePlayer.ratio=t}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new mc([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new Oi([this,"currentTime"],"currentTime"),new Oi([this,"startTime"]),new Oi([this,"stopTime"]),new X([this,"playing"]),new X([this,"loop"]),new M([this,"speed"])]}}};h(Al,"createDefaultProps",()=>({...lt.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),h(Al,"type",Al.register("ESPlayer",Al,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let cl=Al;function g_(r,e=!1){const t=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=t.length;if(n===0)return t;if(n===1)return(!t[0][2]===void 0||e)&&(t[0][2]=void 0),t;for(let i=1;i<n;++i){if(t[i][2]!==void 0&&!e)continue;const s=t[i-1][1],o=t[i][1],a=Kr(s),l=Kr(o),u=v.Vector.distance(a,l);if(u===0){t[i][2]=t[i-1][2];continue}const c=cu(s,o),d=o[2]-s[2],f=Math.asin(d/u)*180/Math.PI,p=Number.isFinite(c)?c:0,_=Number.isFinite(f)?f:0;t[i][2]=[p,_,0]}return(t[0][2]===void 0||e)&&(t[0][2]=n>1?t[1][2]:void 0),t}function m_(r,e=!1){const t=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=t.length;if(n===0)return t;if(n===1)return(!t[0][2]===void 0||e)&&(t[0][2]=void 0),t;for(let i=n-2;i>=0;--i){if(t[i][2]!==void 0&&!e)continue;const s=t[i][1],o=t[i+1][1],a=Kr(s),l=Kr(o),u=v.Vector.distance(a,l);if(u===0){t[i][2]=t[i+1][2];continue}const c=cu(s,o),d=o[2]-s[2],f=Math.asin(d/u)*180/Math.PI,p=Number.isFinite(c)?c:0,_=Number.isFinite(f)?f:0;t[i][2]=[p,_,0]}return(t[n-1][2]===void 0||e)&&(t[n-1][2]=n>1?t[n-2][2]:[0,0,0]),t}function Db(r,e=!1){const t=g_(r,e),n=m_(r,e);if(t.length!==n.length)throw new Error("p.length !== n.length");const i=t.length;for(let s=0;s<i;s++){const o=t[s][2],a=n[s][2];o===void 0&&a===void 0?t[s][2]=void 0:o===void 0?t[s][2]=a:a===void 0?t[s][2]=o:t[s][2]=Cd(o,a,.5)}return t}function Nb(r,e,t){let i;if(!r.timePosRots)return;const s=[],o=r.timePosRots.length;if(!(o<=2)){s.push(r.timePosRots[0]);for(let a=1;a<o-1;++a){const l=r.timePosRots[a-1][0],u=r.timePosRots[a][0],c=r.timePosRots[a+1][0],d=r.accumDistances[a-1],f=r.accumDistances[a],p=r.accumDistances[a+1],_=f-d;if(_!==0){const b=_-(i??(e.length==1?e[0]:e[a-1]||e[e.length-1])*.5);let I=(b<0?0:b)/_;Number.isNaN(I)&&(I=0);const m=(1-I)*l+I*u,w=r.getCurrent(m);w&&s.push([m,w.position,w.rotation])}t&&s.push(r.timePosRots[a]);const S=p-f;if(S!==0){let b=(e.length==1?e[0]:e[a-1]||e[e.length-1])*.5;const I=(e.length==1?e[0]:e[a]||e[e.length-1])*.5||0;b+I>S?(b=S*(b/(b+I)),i=S-b):i=void 0;let m=(b<0?0:b)/S;Number.isNaN(m)&&(m=0);const w=(1-m)*u+m*c,g=r.getCurrent(w);g&&s.push([w,g.position,g.rotation])}}s.push(r.timePosRots[o-1]),r.timePosRots=s}}function v_(r,e){if(e<0)return[void 0,0];if(e>r.length-1)return[void 0,r.length-1];const t=[...r].slice(0,e+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(t===-1)return[void 0,0];const n=e-t;return[r[n][2],n]}function y_(r,e){if(e<0)return[void 0,0];if(e>=r.length)return[void 0,r.length-1];const t=r.slice(e).findIndex(([,,i])=>i!==void 0),n=t===-1?r.length-1:e+t;return[r[n][2],n]}function Mb(r,e,t="Lerp"){let n,i,s,o;if(r.length!==0){if(e<=r[0][0])n=r[0][1],i=r[0][2],s=0,o=0;else if(e>=r[r.length-1][0]){const[l,u,c]=r[r.length-1];n=u,i=c,s=r.length-2,o=1}else{const l=r.findIndex(([u])=>e<=u);if(l===-1)throw new Error("nextIndex === -1");s=l-1;{const[u,c]=r[s],[d,f]=r[l],p=(e-u)/(d-u),_=wf(c),S=wf(f),b=v.Vector.lerp(_,S,p);n=bd(b),o=p}{let[u,c]=v_(r,s),[d,f]=y_(r,l);if(t==="Lerp")if(u&&d){if(c<0||f>=r.length)throw new Error("Invalid rotation index");const p=(e-r[c][0])/(r[f][0]-r[c][0]);i=Cd(u,d,p)}else u?i=u:d?i=d:i=void 0;else t==="Prev"?u&&(i=u):t==="Next"&&d&&(i=d)}}return{position:n,rotation:i,index:s,ratio:o}}}function Rb(r){try{const e=JSON.parse(r);if(Array.isArray(e)&&e.length>0){const t=typeof e[0][0]=="number",n=Array.isArray(e[0][1])&&e[0][1].length===3;return t&&n?e:void 0}throw new Error("解析有问题")}catch{const t=r.split(/\n|\r\n/),n=[],i=t.length;for(let s=0;s<i;++s){const o=t[s],a=o.split(/[^0-9e\.\+\-]+/).filter(l=>l!=="").map(l=>+l);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?n.push([a[0],[a[1],a[2],a[3]],void 0]):n.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return n}}function Lb(r,e,t){const{timePosRots:n}=r;if(!n)throw new Error("!timePosRots");if(n.length===0)throw new Error("timePosRots.length === 0");e=Math.max(e,n[0][0]),t=Math.min(t,n[n.length-1][0]);const i=r.getCurrent(e),s=r.getCurrent(t);if(!i||!s)return;const o=[];i.ratio<1&&o.push([e,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(n[a]);return s.ratio>0&&o.push([t,s.position,s.rotation]),o}const Fb=`
396
+ `},zi=class zi extends Y{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new L("通用"),new z([this,"url"],"路径"),new re([this,"poiTypes"],zi.defaults.poiTypes,pl.sampleValue),new v([this,"heightOffset"])]}}};a(zi,"createDefaultProps",()=>({...Y.createDefaultProps(),url:"",poiTypes:te(pl.defaultValue),heightOffset:40})),a(zi,"type",zi.register("ESPoiTileset",zi,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let ba=zi;const Rs=class Rs extends k{getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new L("通用"),new S([this,"show"],"是否显示"),new j([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new pe([this,"cssPosition"],"位置")]}}};a(Rs,"createDefaultProps",()=>({...k.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),a(Rs,"type",Rs.register("ESScale",Rs,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Ea=Rs;const Ot=class Ot extends Q{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,coordinate:[...s.coordinate,new v([this,"height"],"高度",Ot.defaults.height,!0),new v([this,"extrudedHeight"],"拉伸高度",Ot.defaults.extrudedHeight,!0),new S([this,"perPositionHeight"],"应用每个位置高度",Ot.defaults.perPositionHeight,!0)]}}};a(Ot,"createDefaultProps",()=>({...Q.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),a(Ot,"type",Ot.register("ESGeoExtrudedPolygon",Ot,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),a(Ot,"supportEditingModes",[...Q.supportEditingModes,D.HeightModify]);let Si=Ot;const Ui=class Ui extends Q{constructor(e){super(e);a(this,"_classification",this.dv(new Zn));a(this,"_geoExtrudedPolygon",this.dv(new Si));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:t,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(_([t,"collision"],[this,"collision"])),this.d(_([i,"collision"],[this,"collision"])),this.d(x([i,"flyInParam"],[this,"flyInParam"])),this.d(x([i,"flyToParam"],[this,"flyToParam"])),this.d(x([i,"points"],[this,"points"])),this.d(x([i,"extrudedHeight"],[this,"height"])),this.d(x([t,"fillColor"],[this,"overheightColor"])),this.d(x([i,"fillColor"],[this,"standardColor"]));{const r=()=>{const{height:o,points:h,maxHeight:c}=this;if(!h)return;const l=h.map(u=>[u[0],u[1],o]);t.points=l,t.height=c-o,c-o<=0?t.show=!1:t.show=this.show&&this.filled};r(),this.d(ue([this.heightChanged,this.pointsChanged,this.maxHeightChanged],r))}{const r=()=>{const{show:o,filled:h}=this;t.show=o&&h,i.show=o&&h};r(),this.d(ue([this.showChanged,this.filledChanged],r))}this.d(this.flyInEvent.don(r=>{i.flyIn(r)})),this.d(this.flyToEvent.don(r=>{i.flyTo(r)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new v([this,"height"],"高度",10),new v([this,"maxHeight"],"最高高度",200),new G([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new G([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};a(Ui,"createDefaultProps",()=>({...Q.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),a(Ui,"type",Ui.register("ESHeightLimitAnalysis",Ui,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),a(Ui,"supportEditingModes",[...Q.supportEditingModes,D.HeightModify]);let Ca=Ui;const dt=class dt extends Y{constructor(e){super(e);a(this,"_widgetEvent",this.dv(new m));a(this,"_data",this.dv(y(void 0)));{const t=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:ho(this.url)?this.data=JSON.parse(this.url):fetch(k.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};t(),this.d(this.urlChanged.don(t))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new z([this,"url"],"地址",dt.defaults.url),new v([this,"pixelRange"],"集合范围",dt.defaults.pixelRange),new v([this,"minimumClusterSize"],"最小数量",dt.defaults.minimumClusterSize),new j([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","NONE")],more:[...e.more,new z([this,"style"],"style",dt.defaults.style),new S([this,"perspective"],"透视效果",dt.defaults.perspective)]}}};a(dt,"createDefaultProps",()=>({...Y.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:te({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"NONE",perspective:!1})),a(dt,"type",dt.register("ESEntityCluster",dt,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let Sa=dt;class fn extends b{constructor(){super();a(this,"_player",this.disposeVar(new tt));const e=this._player;{const t=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};t(),this.d(this.startTimeChanged.don(t)),this.d(this.stopTimeChanged.don(t))}this.d(x([e,"playing"],[this,"playing"])),this.d(x([e,"loop"],[this,"loop"])),this.d(x([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const t=this.currentTime-this.startTime;e.currentTime=kn(t,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(n=>{n.createDefaultProps=()=>({...k.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(fn||(fn={})),Yt(fn.prototype,fn.createDefaultProps);const As=class As extends k{constructor(e){super(e);a(this,"_absolutePlayer",this.dv(new fn));const t=this.absolutePlayer;this.d(x([t,"currentTime"],[this,"currentTime"])),this.d(x([t,"startTime"],[this,"startTime"])),this.d(x([t,"stopTime"],[this,"stopTime"])),this.d(x([t,"playing"],[this,"playing"])),this.d(x([t,"loop"],[this,"loop"])),this.d(x([t,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Ln([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new vt([this,"currentTime"],"currentTime"),new vt([this,"startTime"]),new vt([this,"stopTime"]),new S([this,"playing"]),new S([this,"loop"]),new v([this,"speed"])]}}};a(As,"createDefaultProps",()=>({...k.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),a(As,"type",As.register("ESPlayer",As,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let cs=As;function gl(n,s=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),t=e.length;if(t===0)return e;if(t===1)return(!e[0][2]===void 0||s)&&(e[0][2]=void 0),e;for(let i=1;i<t;++i){if(e[i][2]!==void 0&&!s)continue;const r=e[i-1][1],o=e[i][1],h=it(r),c=it(o),l=d.Vector.distance(h,c);if(l===0){e[i][2]=e[i-1][2];continue}const u=hn(r,o),p=o[2]-r[2],g=Math.asin(p/l)*180/Math.PI,f=Number.isFinite(u)?u:0,w=Number.isFinite(g)?g:0;e[i][2]=[f,w,0]}return(e[0][2]===void 0||s)&&(e[0][2]=t>1?e[1][2]:void 0),e}function fl(n,s=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),t=e.length;if(t===0)return e;if(t===1)return(!e[0][2]===void 0||s)&&(e[0][2]=void 0),e;for(let i=t-2;i>=0;--i){if(e[i][2]!==void 0&&!s)continue;const r=e[i][1],o=e[i+1][1],h=it(r),c=it(o),l=d.Vector.distance(h,c);if(l===0){e[i][2]=e[i+1][2];continue}const u=hn(r,o),p=o[2]-r[2],g=Math.asin(p/l)*180/Math.PI,f=Number.isFinite(u)?u:0,w=Number.isFinite(g)?g:0;e[i][2]=[f,w,0]}return(e[t-1][2]===void 0||s)&&(e[t-1][2]=t>1?e[t-2][2]:[0,0,0]),e}function rg(n,s=!1){const e=gl(n,s),t=fl(n,s);if(e.length!==t.length)throw new Error("p.length !== n.length");const i=e.length;for(let r=0;r<i;r++){const o=e[r][2],h=t[r][2];o===void 0&&h===void 0?e[r][2]=void 0:o===void 0?e[r][2]=h:h===void 0?e[r][2]=o:e[r][2]=co(o,h,.5)}return e}function og(n,s,e){let i;if(!n.timePosRots)return;const r=[],o=n.timePosRots.length;if(!(o<=2)){r.push(n.timePosRots[0]);for(let h=1;h<o-1;++h){const c=n.timePosRots[h-1][0],l=n.timePosRots[h][0],u=n.timePosRots[h+1][0],p=n.accumDistances[h-1],g=n.accumDistances[h],f=n.accumDistances[h+1],w=g-p;if(w!==0){const C=w-(i??(s.length==1?s[0]:s[h-1]||s[s.length-1])*.5);let T=(C<0?0:C)/w;Number.isNaN(T)&&(T=0);const R=(1-T)*c+T*l,V=n.getCurrent(R);V&&r.push([R,V.position,V.rotation])}e&&r.push(n.timePosRots[h]);const E=f-g;if(E!==0){let C=(s.length==1?s[0]:s[h-1]||s[s.length-1])*.5;const T=(s.length==1?s[0]:s[h]||s[s.length-1])*.5||0;C+T>E?(C=E*(C/(C+T)),i=E-C):i=void 0;let R=(C<0?0:C)/E;Number.isNaN(R)&&(R=0);const V=(1-R)*l+R*u,I=n.getCurrent(V);I&&r.push([V,I.position,I.rotation])}}r.push(n.timePosRots[o-1]),n.timePosRots=r}}function ml(n,s){if(s<0)return[void 0,0];if(s>n.length-1)return[void 0,n.length-1];const e=[...n].slice(0,s+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(e===-1)return[void 0,0];const t=s-e;return[n[t][2],t]}function vl(n,s){if(s<0)return[void 0,0];if(s>=n.length)return[void 0,n.length-1];const e=n.slice(s).findIndex(([,,i])=>i!==void 0),t=e===-1?n.length-1:s+e;return[n[t][2],t]}function ag(n,s,e="Lerp"){let t,i,r,o;if(n.length!==0){if(s<=n[0][0])t=n[0][1],i=n[0][2],r=0,o=0;else if(s>=n[n.length-1][0]){const[c,l,u]=n[n.length-1];t=l,i=u,r=n.length-2,o=1}else{const c=n.findIndex(([l])=>s<=l);if(c===-1)throw new Error("nextIndex === -1");r=c-1;{const[l,u]=n[r],[p,g]=n[c],f=(s-l)/(p-l),w=mo(u),E=mo(g),C=d.Vector.lerp(w,E,f);t=uo(C),o=f}{let[l,u]=ml(n,r),[p,g]=vl(n,c);if(e==="Lerp")if(l&&p){if(u<0||g>=n.length)throw new Error("Invalid rotation index");const f=(s-n[u][0])/(n[g][0]-n[u][0]);i=co(l,p,f)}else l?i=l:p?i=p:i=void 0;else e==="Prev"?l&&(i=l):e==="Next"&&p&&(i=p)}}return{position:t,rotation:i,index:r,ratio:o}}}function hg(n){try{const s=JSON.parse(n);if(Array.isArray(s)&&s.length>0){const e=typeof s[0][0]=="number",t=Array.isArray(s[0][1])&&s[0][1].length===3;return e&&t?s:void 0}throw new Error("解析有问题")}catch{const e=n.split(/\n|\r\n/),t=[],i=e.length;for(let r=0;r<i;++r){const o=e[r],h=o.split(/[^0-9e\.\+\-]+/).filter(c=>c!=="").map(c=>+c);h.length<4?console.warn(`第${r+1}行数据无法解析成路径的数据, 原内容为: ${o}`):h.length<7?t.push([h[0],[h[1],h[2],h[3]],void 0]):t.push([h[0],[h[1],h[2],h[3]],[h[4],h[5],h[6]]])}return t}}function cg(n,s,e){const{timePosRots:t}=n;if(!t)throw new Error("!timePosRots");if(t.length===0)throw new Error("timePosRots.length === 0");s=Math.max(s,t[0][0]),e=Math.min(e,t[t.length-1][0]);const i=n.getCurrent(s),r=n.getCurrent(e);if(!i||!r)return;const o=[];i.ratio<1&&o.push([s,i.position,i.rotation]);for(let h=i.index+1;h<=r.index;++h)o.push(t[h]);return r.ratio>0&&o.push([e,r.position,r.rotation]),o}const lg=`
401
397
  timePosRots是一个内部包含三个元素的数组,第一个表示时间戳,单位毫秒,第二个表示经纬度,第三个表示姿态(偏航、俯仰、翻转)。示例代码如下:
402
398
  \`\`\`
403
399
  [
@@ -442,7 +438,7 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
442
438
  ]
443
439
  ]
444
440
  \`\`\`
445
- `,Gn=class Gn extends U{constructor(t,n){super();h(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});h(this,"_currentInfo",this.disposeVar(z(void 0,(t,n)=>!1)));h(this,"_player");h(this,"_flyToEvent",this.disposeVar(new N));h(this,"_accumDistancesChanged",this.disposeVar(new N));h(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));h(this,"_accumDistancesDirty",!1);h(this,"_accumDistances",[]);h(this,"_getCurrentFunc",this.disposeVar(z(void 0)));this._player=this.disposeVar(new $r);const i=()=>{const s=this.getCurrent(this.currentTime??0);if(s===void 0)this._currentInfo.value=void 0;else{const{index:o,position:a,rotation:l,ratio:u}=s;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=a,this._scratchCurrentInfo.rotation=l,this._scratchCurrentInfo.ratio=u,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(tt([this._player,"loop"],[this,"loop"]));{const s=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const o=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(o-this._player.currentTime)>.01)&&(this._player.currentTime=o)};s(),this.dispose(this.currentTimeChanged.disposableOn(s))}{const s=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const o=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(o-this.currentTime)>.01)&&(this.currentTime=o)};s(),this.dispose(this._player.currentTimeChanged.disposableOn(s))}this.dispose(tt([this._player,"duration"],[this,"duration"])),this.dispose(tt([this._player,"playing"],[this,"playing"])),this.dispose(tt([this._player,"speed"],[this,"speed"]));{const s=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};s();const o=this.disposeVar(Se(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(s))}{const s=()=>{const o=this.timePosRots;if(!o)return;let a=0;const l=o.length;for(let u=0;u<l;++u){const c=o[u][0];if(c<0)console.warn("地理路径的时间戳不能小于0!");else if(c<a){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${u} time: ${c}`);break}}};s(),this.dispose(this.timePosRotsChanged.disposableOn(s))}{const s=this.disposeVar(nr(async o=>{if(!this.dataUri)return;await o.promise(Zl(1e3));const a=await o.promise(fetch(this.dataUri)),l=await o.promise(a.text());this.timePosRots=Gn.parseData(l)}));this.dispose(this.dataUriChanged.disposableOn(()=>{s.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=Gn.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(t){this._flyToEvent.emit(t)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){if(!this._accumDistancesDirty)return this._accumDistances;if(!this.timePosRots||this.timePosRots.length<2)this._accumDistances=[];else{const t=this.timePosRots.length;let n=0;const i=[];let s=Kr(this.timePosRots[0][1]);i.push(n);for(let o=1;o<t;++o){const a=Kr(this.timePosRots[o][1]),l=v.Vector.distance(a,s);s=a,n+=l,i.push(n)}this._accumDistances=i}return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(t){return this.getCurrentFunc?this.getCurrentFunc(t,this):this.timePosRots&&Mb(this.timePosRots,t,this.rotLerpMode)}subPath(t,n){return this.timePosRots&&Lb(this,t,n)}computeRotIfUndefinedUsingPrevLine(t=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Gn.computeRotIfUndefinedUsingPrevLine(this.timePosRots,t)}computeRotIfUndefinedUsingNextLine(t=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Gn.computeRotIfUndefinedUsingNextLine(this.timePosRots,t)}computeRotIfUndefinedUsingLerp(t=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Gn.computeRotIfUndefinedUsingLerp(this.timePosRots,t)}computeRotIfUndefined(t=!1){this.computeRotIfUndefinedUsingPrevLine(t)}addAroundPoints(t,n){Nb(this,t,n)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(t){this._getCurrentFunc.value=t}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const t=this.timePosRots;if(!t||t.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=t[0][0],this.stopTime=t[t.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(t){this.player.ratio=t}get ratioChanged(){return this.player.ratioChanged}};h(Gn,"computeRotIfUndefinedUsingPrevLine",g_),h(Gn,"computeRotIfUndefinedUsingNextLine",m_),h(Gn,"computeRotIfUndefinedUsingLerp",Db),h(Gn,"getLeftRotation",v_),h(Gn,"getRightRotation",y_),h(Gn,"parseData",Rb),h(Gn,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),h(Gn,"timePosRotsMd",Fb);let io=Gn;(r=>{r.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:Ls(void 0,(e,t)=>e[0]===t[0]&&e[1].every((n,i)=>n===t[1][i])&&e[2]===t[2]===void 0||e[2]!==void 0&&t[2]!==void 0&&e[2].every((n,i)=>t[2][i]),e=>[e[0],[...e[1]],e[2]&&[...e[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:et([1,1,1,1]),hasDash:!1,gapColor:et([0,0,0,0]),dashLength:16,dashPattern:255,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(io||(io={})),Fs(io.prototype,io.createDefaultProps);const da=class da extends fn{constructor(t){super(t);h(this,"_path");h(this,"_currentPositionChanged",this.dv(new N));h(this,"_currentRotationChanged",this.dv(new N));h(this,"_currentChanged",this.dv(new N));h(this,"_deprecated",[]);h(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this._path=this.dv(new io),this.d(this._path.currentInfoChanged.don(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.d(this._path.currentInfoChanged.don(()=>this._currentRotationChanged.emit(this.currentRotation))),this.d(this._path.currentInfoChanged.don(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const n=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const s=this.timeStamps.length,o=this.points.length,a=Math.min(s,o),l=[];for(let u=0;u<a;++u)l.push([this.timeStamps[u],this.points[u]]);this._path.timePosRots=l,this.rotationRadius.some(u=>u>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.dv(Se(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));n(),this.d(i.don(n))}}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const t=this._path.currentRotation;if(t)return[Oa(t[0]-90),t[1],t[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new vd([this,"timeStamps"],"时间序列",[],!0,void 0,void 0,()=>{if(!(!this.points||this.points.length<2))return bs(this.points,"GEODESIC")}),new M([this,"speed"],"线条流速",1),new st([this,"materialMode"],[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]],"模式","singleArrow"),new ge([this,"rotationRadius"],"拐弯半径",da.defaults.rotationRadius)],more:[...t.more,new He([this,"currentPosition"],"当前位置",void 0,!0,!0)]}}};h(da,"createDefaultProps",()=>({...fn.createDefaultProps(),timeStamps:Xt(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:gt({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{arrowColor:[1,1,1,1]},ground:!1}),rotationRadius:[5]})),h(da,"type",da.register("ESPath",da,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"}));let hl=da;const fa=class fa extends Ct{constructor(t){super(t);h(this,"_lineString",this.dv(new fn));this.components.disposableAdd(this._lineString,!1),this.stroked=!0,this.d(Ne([this.pointsChanged,this.resolutionChanged,this.sharpnessChanged],()=>{try{if(this.points&&this.points.length>=2){const n=ol(this.points,this.resolution,this.sharpness);this._lineString.points=n}else this._lineString.points=void 0}catch(n){console.error(n),this._lineString.points=void 0}},{immediate:!0})),this.d(A([this._lineString,"show"],[this,"show"])),this.d(A([this._lineString,"allowPicking"],[this,"allowPicking"])),this.d(A([this._lineString,"collision"],[this,"collision"])),this.d(A([this._lineString,"stroked"],[this,"stroked"])),this.d(A([this._lineString,"strokeStyle"],[this,"strokeStyle"])),this.d(tt([this._lineString,"flyInParam"],[this,"flyInParam"])),this.d(tt([this._lineString,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(n=>{this._lineString.flyIn(n)})),this.d(this.flyToEvent.don(n=>{this._lineString.flyTo(n)})),this.d(this.calcFlyToParamEvent.don(()=>{this._lineString.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{this._lineString.calcFlyInParam()}))}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new M([this,"resolution"],"解析度",1e3),new M([this,"sharpness"],"锐利度",.85)]}}get lineString(){return this._lineString}};h(fa,"createDefaultProps",()=>({...Ct.createDefaultProps(),resolution:1e3,sharpness:.85})),h(fa,"type",fa.register("ESGeoBezierSpline",fa,{chsName:"贝塞尔曲线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"贝塞尔曲线"})),h(fa,"supportEditingModes",[...Ct.supportEditingModes,Z.LineStringAppend,Z.LineStringInsert]);let Tp=fa;const go=class go extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new dt,new X([this,"textEditingInteraction"],"文本编辑交互"),new X([this,"textEditing"],"文本编辑"),new M([this,"width"],"宽度",go.defaults.width,!0),new gc([this,"text"],"内容",go.defaults.text,void 0,!0),new Sr([this,"originRatioAndOffset"],"原点比例和偏移"),new M([this,"opacity"],"透明度"),new M([this,"fontSize"],"字体大小"),new Pt([this,"color"],"字体颜色"),new Pt([this,"backgroundColor"],"背景颜色"),new Sr([this,"padding"],"内边距"),new Sr([this,"borderRadius"],"边框圆角"),new Pt([this,"borderColor"],"边框颜色"),new M([this,"borderWidth"],"边框宽度"),new st([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置"),new st([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};h(go,"createDefaultProps",()=>({...it.createDefaultProps(),text:"请输入文字",width:80,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:et([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:et([1,1,1,1]),backgroundColor:et([0,0,0,.8]),padding:et([5,5,5,5]),borderRadius:et([6,6,6,6]),borderWidth:0,borderColor:et([1,1,1,1]),borderStyle:"solid"})),h(go,"type",go.register("ESGeoDivTextPoi",go,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"}));let Op=go;const kl=class kl extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Pt([this,"color"],"颜色",[1,1,0,1])]}}};h(kl,"createDefaultProps",()=>({...it.createDefaultProps(),color:et([1,1,0,1])})),h(kl,"type",kl.register("ESCityBasePoint",kl,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let Dp=kl;const __=`(dataSource) => {
441
+ `,Fe=class Fe extends b{constructor(e,t){super();a(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});a(this,"_currentInfo",this.disposeVar(y(void 0,(e,t)=>!1)));a(this,"_player");a(this,"_flyToEvent",this.disposeVar(new m));a(this,"_accumDistancesChanged",this.disposeVar(new m));a(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));a(this,"_accumDistancesDirty",!1);a(this,"_accumDistances",[]);a(this,"_getCurrentFunc",this.disposeVar(y(void 0)));this._player=this.disposeVar(new tt);const i=()=>{const r=this.getCurrent(this.currentTime??0);if(r===void 0)this._currentInfo.value=void 0;else{const{index:o,position:h,rotation:c,ratio:l}=r;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=h,this._scratchCurrentInfo.rotation=c,this._scratchCurrentInfo.ratio=l,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(x([this._player,"loop"],[this,"loop"]));{const r=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const o=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(o-this._player.currentTime)>.01)&&(this._player.currentTime=o)};r(),this.dispose(this.currentTimeChanged.disposableOn(r))}{const r=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const o=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(o-this.currentTime)>.01)&&(this.currentTime=o)};r(),this.dispose(this._player.currentTimeChanged.disposableOn(r))}this.dispose(x([this._player,"duration"],[this,"duration"])),this.dispose(x([this._player,"playing"],[this,"playing"])),this.dispose(x([this._player,"speed"],[this,"speed"]));{const r=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};r();const o=this.disposeVar(ae(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(r))}{const r=()=>{const o=this.timePosRots;if(!o)return;let h=0;const c=o.length;for(let l=0;l<c;++l){const u=o[l][0];if(u<0)console.warn("地理路径的时间戳不能小于0!");else if(u<h){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${l} time: ${u}`);break}}};r(),this.dispose(this.timePosRotsChanged.disposableOn(r))}{const r=this.disposeVar(Ne(async o=>{if(!this.dataUri)return;await o.promise(Zs(1e3));const h=await o.promise(fetch(this.dataUri)),c=await o.promise(h.text());this.timePosRots=Fe.parseData(c)}));this.dispose(this.dataUriChanged.disposableOn(()=>{r.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=Fe.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){if(!this._accumDistancesDirty)return this._accumDistances;if(!this.timePosRots||this.timePosRots.length<2)this._accumDistances=[];else{const e=this.timePosRots.length;let t=0;const i=[];let r=it(this.timePosRots[0][1]);i.push(t);for(let o=1;o<e;++o){const h=it(this.timePosRots[o][1]),c=d.Vector.distance(h,r);r=h,t+=c,i.push(t)}this._accumDistances=i}return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(e){return this.getCurrentFunc?this.getCurrentFunc(e,this):this.timePosRots&&ag(this.timePosRots,e,this.rotLerpMode)}subPath(e,t){return this.timePosRots&&cg(this,e,t)}computeRotIfUndefinedUsingPrevLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Fe.computeRotIfUndefinedUsingPrevLine(this.timePosRots,e)}computeRotIfUndefinedUsingNextLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Fe.computeRotIfUndefinedUsingNextLine(this.timePosRots,e)}computeRotIfUndefinedUsingLerp(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Fe.computeRotIfUndefinedUsingLerp(this.timePosRots,e)}computeRotIfUndefined(e=!1){this.computeRotIfUndefinedUsingPrevLine(e)}addAroundPoints(e,t){og(this,e,t)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(e){this._getCurrentFunc.value=e}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const e=this.timePosRots;if(!e||e.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=e[0][0],this.stopTime=e[e.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(e){this.player.ratio=e}get ratioChanged(){return this.player.ratioChanged}};a(Fe,"computeRotIfUndefinedUsingPrevLine",gl),a(Fe,"computeRotIfUndefinedUsingNextLine",fl),a(Fe,"computeRotIfUndefinedUsingLerp",rg),a(Fe,"getLeftRotation",ml),a(Fe,"getRightRotation",vl),a(Fe,"parseData",hg),a(Fe,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),a(Fe,"timePosRotsMd",lg);let ei=Fe;(n=>{n.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:Xt(void 0,(s,e)=>s[0]===e[0]&&s[1].every((t,i)=>t===e[1][i])&&s[2]===e[2]===void 0||s[2]!==void 0&&e[2]!==void 0&&s[2].every((t,i)=>e[2][i]),s=>[s[0],[...s[1]],s[2]&&[...s[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:F([1,1,1,1]),hasDash:!1,gapColor:F([0,0,0,0]),dashLength:16,dashPattern:255,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(ei||(ei={})),Yt(ei.prototype,ei.createDefaultProps);const Wi=class Wi extends we{constructor(e){super(e);a(this,"_path");a(this,"_currentPositionChanged",this.dv(new m));a(this,"_currentRotationChanged",this.dv(new m));a(this,"_currentChanged",this.dv(new m));a(this,"_deprecated",[]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this._path=this.dv(new ei),this.d(this._path.currentInfoChanged.don(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.d(this._path.currentInfoChanged.don(()=>this._currentRotationChanged.emit(this.currentRotation))),this.d(this._path.currentInfoChanged.don(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const t=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const r=this.timeStamps.length,o=this.points.length,h=Math.min(r,o),c=[];for(let l=0;l<h;++l)c.push([this.timeStamps[l],this.points[l]]);this._path.timePosRots=c,this.rotationRadius.some(l=>l>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.dv(ae(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));t(),this.d(i.don(t))}}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const e=this._path.currentRotation;if(e)return[ns(e[0]-90),e[1],e[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new no([this,"timeStamps"],"时间序列",[],!0,void 0,void 0,()=>{if(!(!this.points||this.points.length<2))return Lt(this.points,"GEODESIC")}),new v([this,"speed"],"线条流速",1),new j([this,"materialMode"],[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]],"模式","singleArrow"),new re([this,"rotationRadius"],"拐弯半径",Wi.defaults.rotationRadius)],more:[...e.more,new ve([this,"currentPosition"],"当前位置",void 0,!0,!0)]}}};a(Wi,"createDefaultProps",()=>({...we.createDefaultProps(),timeStamps:ee(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:W({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{arrowColor:[1,1,1,1]},ground:!1}),rotationRadius:[5]})),a(Wi,"type",Wi.register("ESPath",Wi,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"}));let ls=Wi;const Bi=class Bi extends ${constructor(e){super(e);a(this,"_lineString",this.dv(new we));this.components.disposableAdd(this._lineString,!1),this.stroked=!0,this.d(ue([this.pointsChanged,this.resolutionChanged,this.sharpnessChanged],()=>{try{if(this.points&&this.points.length>=2){const t=rs(this.points,this.resolution,this.sharpness);this._lineString.points=t}else this._lineString.points=void 0}catch(t){console.error(t),this._lineString.points=void 0}},{immediate:!0})),this.d(_([this._lineString,"show"],[this,"show"])),this.d(_([this._lineString,"allowPicking"],[this,"allowPicking"])),this.d(_([this._lineString,"collision"],[this,"collision"])),this.d(_([this._lineString,"stroked"],[this,"stroked"])),this.d(_([this._lineString,"strokeStyle"],[this,"strokeStyle"])),this.d(x([this._lineString,"flyInParam"],[this,"flyInParam"])),this.d(x([this._lineString,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(t=>{this._lineString.flyIn(t)})),this.d(this.flyToEvent.don(t=>{this._lineString.flyTo(t)})),this.d(this.calcFlyToParamEvent.don(()=>{this._lineString.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{this._lineString.calcFlyInParam()}))}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new v([this,"resolution"],"解析度",1e3),new v([this,"sharpness"],"锐利度",.85)]}}get lineString(){return this._lineString}};a(Bi,"createDefaultProps",()=>({...$.createDefaultProps(),resolution:1e3,sharpness:.85})),a(Bi,"type",Bi.register("ESGeoBezierSpline",Bi,{chsName:"贝塞尔曲线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"贝塞尔曲线"})),a(Bi,"supportEditingModes",[...$.supportEditingModes,D.LineStringAppend,D.LineStringInsert]);let Pa=Bi;const li=class li extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new L,new S([this,"textEditingInteraction"],"文本编辑交互"),new S([this,"textEditing"],"文本编辑"),new v([this,"width"],"宽度",li.defaults.width,!0),new Vn([this,"text"],"内容",li.defaults.text,void 0,!0),new Je([this,"originRatioAndOffset"],"原点比例和偏移"),new v([this,"opacity"],"透明度"),new v([this,"fontSize"],"字体大小"),new G([this,"color"],"字体颜色"),new G([this,"backgroundColor"],"背景颜色"),new Je([this,"padding"],"内边距"),new Je([this,"borderRadius"],"边框圆角"),new G([this,"borderColor"],"边框颜色"),new v([this,"borderWidth"],"边框宽度"),new j([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置"),new j([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};a(li,"createDefaultProps",()=>({...M.createDefaultProps(),text:"请输入文字",width:80,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:F([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:F([1,1,1,1]),backgroundColor:F([0,0,0,.8]),padding:F([5,5,5,5]),borderRadius:F([6,6,6,6]),borderWidth:0,borderColor:F([1,1,1,1]),borderStyle:"solid"})),a(li,"type",li.register("ESGeoDivTextPoi",li,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"}));let Ta=li;const Ns=class Ns extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new G([this,"color"],"颜色",[1,1,0,1])]}}};a(Ns,"createDefaultProps",()=>({...M.createDefaultProps(),color:F([1,1,0,1])})),a(Ns,"type",Ns.register("ESCityBasePoint",Ns,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let Ia=Ns;const _l=`(dataSource) => {
446
442
  var entities = dataSource.entities.values;
447
443
 
448
444
  for (var i = 0; i < entities.length; i++) {
@@ -457,21 +453,21 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
457
453
  }
458
454
  }
459
455
  }
460
- `,Ab=`data 路径都可以使用下面回调函数
456
+ `,dg=`data 路径都可以使用下面回调函数
461
457
  \`\`\`
462
- ${__}
458
+ ${_l}
463
459
  \`\`\`
464
460
 
465
- `,Np=Date.now(),es=class es extends lt{constructor(t){super(t);h(this,"_flyToEvent",this.disposeVar(new N));h(this,"_resetClockEvent",this.disposeVar(new N));this.ad(tt([this,"uri"],[this,"url"]))}get flyToEvent(){return this._flyToEvent}flyTo(t){this._flyToEvent.emit(t)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new ft([this,"url"],"路径","${earthsdk3-assets-script-dir}/assets/misc/simple.czml",void 0,!0),new X([this,"clockEnabled"],"启用",!1),new M([this,"multiplier"],"倍速",es.defaults.multiplier),new X([this,"autoResetClock"],"自动设置时钟",!0),new Oi([this,"startTime"],"开始时间",es.defaults.startTime,!0),new Oi([this,"stopTime"],"结束时间",es.defaults.stopTime,!0),new Oi([this,"currentTime"],"当前时间",es.defaults.currentTime,!0),new st([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep","SYSTEM_CLOCK_MULTIPLIER"),new st([this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"clockRange","UNBOUNDED"),new X([this,"shouldAnimate"],"是否启用动画",!1)],general:[...t.general,new X([this,"show"],"是否显示",!0),new X([this,"collision"],"开启碰撞",!1),new X([this,"allowPicking"],"允许拾取",!1)],more:[...t.more,new ut("飞入",n=>this.flyTo(n),[1e3],"flyTo"),new ut("重置时钟",()=>this.resetClock(),[],"resetClock"),new ls([this,"loadFuncStr"],"loadFnStr",__,Ab,!0)]}}};h(es,"createDefaultProps",()=>({show:!0,uri:void 0,url:void 0,allowPicking:!1,autoResetClock:!0,clockEnabled:!1,startTime:Np,stopTime:Np+1440*60*1e3,currentTime:Np,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...lt.createDefaultProps()})),h(es,"type",es.register("ESCzml",es,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"}));let Mp=es;const Vl=class Vl extends lt{getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new dt,new X([this,"show"],"是否显示"),new M([this,"cssSize"],"尺寸"),new Me([this,"cssPosition"],"位置"),new ct([this,"imgUrl"],"图片地址")]}}};h(Vl,"createDefaultProps",()=>({...lt.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:lt.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")})),h(Vl,"type",Vl.register("ESNavigator",Vl,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"}));let Rp=Vl;const ns=class ns extends lt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new dt("通用"),new X([this,"show"],"是否显示",ns.defaults.show),new M([this,"height"],"高度",ns.defaults.height,!0),new M([this,"fontSize"],"文字大小",ns.defaults.fontSize,!0),new Pt([this,"bgColor"],"背景颜色",ns.defaults.bgColor,!0)]}}};h(ns,"createDefaultProps",()=>({...lt.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:et([71/255,71/255,71/255,.8])})),h(ns,"type",ns.register("ESViewerStatusBar",ns,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let Lp=ns;const rs=class rs extends lt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new dt("通用"),new X([this,"show"],"是否显示",rs.defaults.show),new M([this,"height"],"高度",rs.defaults.height,!0),new M([this,"fontSize"],"文字大小",rs.defaults.fontSize,!0),new Pt([this,"bgColor"],"背景颜色",rs.defaults.bgColor,!0)]}}};h(rs,"createDefaultProps",()=>({...lt.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:et([71/255,71/255,71/255,.8])})),h(rs,"type",rs.register("ESViewerStatusBarScale",rs,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let Fp=rs;const jl=class jl extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ct([this,"url"],"路径","",!0),new M([this,"progress"],"进度",0,!1,!0)]}}};h(jl,"createDefaultProps",()=>({...it.createDefaultProps(),url:"",progress:0})),h(jl,"type",jl.register("ESGaussianSplatting",jl,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"}));let Ap=jl;class kb extends U{constructor(e,t){if(super(),!t)return;const n=this.ad(new Bt);n.stroked=!0,this.ad(e.components.disposableAdd(n)),this.ad(tt([n,"points"],[e,"areaLiftingPoints"])),this.ad(n.editingChanged.don(()=>{n.editing||!this.isDestroyed()&&this.destroy()})),n.editing=!0}}var w_=(r=>(r[r.None=0]="None",r[r.Up=1]="Up",r[r.Down=2]="Down",r))(w_||{}),E_=(r=>(r[r.CLICK=0]="CLICK",r[r.MOVE=1]="MOVE",r))(E_||{}),C_=(r=>(r[r.Smooth=0]="Smooth",r[r.Linear=1]="Linear",r[r.Spherical=2]="Spherical",r[r.Tip=3]="Tip",r[r.Hard=4]="Hard",r))(C_||{});const $e=class $e extends it{constructor(t){super(t);h(this,"_startEvent",this.disposeVar(new N));h(this,"_configs",this.disposeVar(Xt(void 0)));h(this,"_heights",this.disposeVar(z({})));h(this,"_heightsEvent",this.ad(new N));h(this,"_areaLiftingUpdateEvent",this.disposeVar(new N));const n=this.ad(Se(this.modeChanged,this.startEvent));this.ad(new Ie(n,()=>{var i;if(this.areaLiftingPoints=void 0,this.mode=="areaLifting")return new kb(this,this.activeViewer);(i=this.activeViewer)==null||i.startEditing(this,Z.BrushErase)}))}updateEditing(){var t;oh(this.position,[0,0,0])||(this.position=[0,0,0]),(t=this.activeViewer)==null||t.startEditing(this,Z.Place,{callSource:"inner"})}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get configs(){return this._configs.value}set configs(t){this._configs.value=t}get configsChanged(){return this._configs.changed}getConfig(...t){var n,i;if(typeof t[0]=="number")return(n=this.configs)==null?void 0:n.find(s=>s.x===t[0]&&s.y===t[1]);if(typeof t[0]=="string")return(i=this.configs)==null?void 0:i.find(s=>s.url===t[0])}get heights(){return this._heights.value}set heights(t){this._heights.value=t}get heightsChanged(){return this._heights.changed}get heightsEvent(){return this._heightsEvent}getHeights(){return new Promise((t,n)=>{const i=new U;i.ad(this._heightsEvent.don(o=>{o!=="start"&&(!i.isDestroyed()&&i.destroy(),t(o))})),this._heightsEvent.emit("start");const s=setTimeout(()=>{i.isDestroyed()||(i.destroy(),t(void 0))},2e3);i.ad(()=>clearTimeout(s))})}get areaLiftingUpdateEvent(){return this._areaLiftingUpdateEvent}areaLiftingUpdate(){this._areaLiftingUpdateEvent.emit()}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new ut("开始编辑",()=>{this.start()},[],"start"),new st([this,"mode"],$e.modes,"编辑模式",$e.defaults.mode)],basic:[...t.basic,new ft([this,"url"],"URL"),new ft([this,"tileInfo"],"瓦片信息配置"),new M([this,"maxHeight"],"最大高度"),new M([this,"minHeight"],"最小高度"),new M([this,"offset"],"偏移"),new X([this,"autoLoadHeights"],"自动加载高度"),new dt("刷写设置"),new M([this,"brushEraseRadius"],"编辑半径"),new Me([this,"brushEraseRadiusRange"],"编辑半径范围",void 0,!0,!0),new st([this,"brushEraseMode"],Object.entries(["CTRL","SHIFT","NONE"]),"刷写模式"),new st([this,"brushErasePickReference"],$e.brushErasePickReferences,"选择参考"),new Di([this,"brushErasePosition"],"刷写位置"),new Di([this,"brushEraseStartPosition"],"刷写起始位置"),new st([this,"brushEraseFalloff"],$e.brushEarseFalloffs,"刷写衰减函数"),new st([this,"brushEraseRayDirection"],[["Up","Up"],["Down","Down"]],"刷写射线方向"),new dt("平整设置"),new st([this,"flattenMode"],$e.flattenModes,"平整模式",0),new st([this,"flattenPick"],$e.flattenPicks,"平整选择",0),new M([this,"flattenOffset"],"平整偏移",-.01),new dt("区域升降设置"),new ge([this,"areaLiftingPoints"],"区域升降位置",[]),new M([this,"areaLiftingOffset"],"区域升降偏移",1),new ut("区域升降更新",()=>{this.areaLiftingUpdate()},[],"areaLiftingUpdate"),new dt("围栏设置"),new ge([this,"fencePoints"],"围栏位置",[])]}}};h($e,"createDefaultProps",()=>({...it.createDefaultProps(),allowPicking:!0,url:"",maxHeight:0,minHeight:0,offset:.01,tileInfo:gt({tileCountX:65,tileCountY:65,tileMaximumLevel:15,tilesPerAxis:5,format:"heights"}),mode:z("sculpt"),autoLoadHeights:!1,brushEraseRadius:100,brushEraseRadiusRange:et([0,100]),brushErasePosition:et([0,0,0]),brushEraseStartPosition:et([0,0,0]),brushEraseMode:z("NONE"),brushErasePickReference:z("NONE"),brushEraseRayDirection:z("Down"),brushEraseFalloff:z(4),flattenMode:z(0),flattenPick:z(1),flattenOffset:-.01,areaLiftingPoints:_o(void 0),areaLiftingOffset:1,fencePoints:_o(void 0),fenceMode:z("in")})),h($e,"modes",[["雕刻","sculpt"],["抹除","erase"],["平滑","smooth"],["平整","flatten"],["区域升降","areaLifting"]]),h($e,"brushErasePickReferences",[["无限制","NONE"],["地形图层","ESTerrainLayerEditing"],["3DTiles","ES3DTileset"]]),h($e,"flattenModes",[["None",0],["Up",1],["Down",2]]),h($e,"flattenPicks",[["CLICK",0],["MOVE",1]]),h($e,"brushEarseFalloffs",[["平滑",0],["线性",1],["硬边",4],["球形",2],["尖顶",3]]),h($e,"invalidValue",-1e4),h($e,"type",$e.register("ESTerrainLayerEditing",$e,{chsName:"地形图层编辑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于对地形数据进行编辑"})),h($e,"supportEditingModes",[...it.supportEditingModes,Z.Place,Z.BrushErase]);let qu=$e;const Cr=class Cr extends Ct{constructor(t){super(t);h(this,"editingBindMode","doublePoints");h(this,"_startEvent",this.disposeVar(new N));h(this,"_replayEvent",this.disposeVar(new N));this.ad(this.startEvent.don(()=>{var n;(n=this.activeViewer)==null||n.startEditing(this,Z.BrushErase)}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get replayEvent(){return this._replayEvent}replay(){this._replayEvent.emit()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ut("开始编辑",()=>this.start(),[]),new ut("重播",()=>this.replay(),[]),new X([this,"showImage"],"显示影像",Cr.defaults.showImage),new M([this,"flowSpeed"],"流动速度",Cr.defaults.flowSpeed),new M([this,"gravity"],"重力加速度",Cr.defaults.gravity),new M([this,"strength"],"泥石流强度",Cr.defaults.strength),new M([this,"resistance"],"泥石流阻力(越大越快平息)",Cr.defaults.resistance),new M([this,"terrainOffset"],"地形高度偏移",Cr.defaults.terrainOffset),new ge([this,"slidePoints"],"滑坡点数组",Ct.defaults.slidePoints,void 0),new dt("刷写设置"),new M([this,"brushEraseRadius"],"编辑半径"),new Me([this,"brushEraseRadiusRange"],"编辑半径范围",void 0,!0,!0),new st([this,"brushEraseMode"],Object.entries(["CTRL","SHIFT","NONE"]),"刷写模式"),new st([this,"brushErasePickReference"],qu.brushErasePickReferences,"选择参考"),new Di([this,"brushErasePosition"],"刷写位置"),new Di([this,"brushEraseStartPosition"],"刷写起始位置"),new st([this,"brushEraseFalloff"],qu.brushEarseFalloffs,"刷写衰减函数"),new st([this,"brushEraseRayDirection"],[["Up","Up"],["Down","Down"]],"刷写射线方向")]}}};h(Cr,"createDefaultProps",()=>({...Ct.createDefaultProps(),brushEraseRadius:100,brushEraseRadiusRange:et([0,1e3]),brushErasePosition:et([0,0,0]),brushEraseStartPosition:et([0,0,0]),brushEraseMode:z("NONE"),brushErasePickReference:z("NONE"),brushEraseRayDirection:z("Down"),terrainOffset:5,flowSpeed:1,gravity:9.8,slidePoints:et([]),strength:1,showImage:!0,resistance:.98,stroked:!0,strokeStyle:gt({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!0})})),h(Cr,"type",Cr.register("ESLandSlide",Cr,{chsName:"滑坡泥石流分析",tags:["ESObjects","_ES_Impl_Cesium"],description:"滑坡泥石流分析对象"})),h(Cr,"supportEditingModes",[...Ct.supportEditingModes,Z.DoublePoints,Z.DoublePointsAppend,Z.DoublePointsModify,Z.BrushErase]);let kp=Cr;const pa=class pa extends it{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ct([this,"mesh"],"mesh地址",pa.defaults.mesh)]}}};h(pa,"createDefaultProps",()=>({...it.createDefaultProps(),mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"})),h(pa,"type",pa.register("ESStaticMesh",pa,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"}));let Vp=pa;const Bl=class Bl extends Ct{constructor(t){super(t);h(this,"_startEvent",this.dv(new N));h(this,"_clearEvent",this.dv(new N));h(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new Yo),this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(A([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(A([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(A([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(A([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(A([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(A([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(A([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ut("开始分析",()=>this.start(),[],"start"),new ut("清除分析",()=>this.clear(),[],"clear"),new ge([this,"windowPositions"],"屏幕坐标",[],void 0,!1,!0),new ge([this,"depths"],"深度值",[],void 0,!1,!0),new M([this,"radius"],"半径",1e4,!0)]}}};h(Bl,"createDefaultProps",()=>({...Ct.createDefaultProps(),windowPositions:Ef([]),depths:Xt([]),radius:z(1e4)})),h(Bl,"type",Bl.register("ESSkylineAnalysis",Bl,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"}));let jp=Bl;const Ds=class Ds extends jt{constructor(e){super(e)}getESProperties(){const e=super.getESProperties();return{...e,basic:[...e.basic,new ge([this,"data"],"数据",[],void 0,!0),new ft([this,"gradient"],"渐变",Ds.defaults.gradient,void 0,!0),new M([this,"radius"],"半径",Ds.defaults.radius,void 0,!0),new M([this,"blur"],"模糊",Ds.defaults.blur,!0),new X([this,"is3D"],"is3D",!1,!0)]}}};h(Ds,"createDefaultProps",()=>({...jt.createDefaultProps(),is3D:z(!1),data:_o([]),gradient:Kt({".5":"green",".7":"yellow",".95":"red"}),radius:z(10),blur:z(.85)})),h(Ds,"type",Ds.register("ESHeatMap",Ds,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"}));let bh=Ds;const ga=class ga extends Ct{constructor(t){super(t);h(this,"editingBindMode","scatter")}};h(ga,"createDefaultProps",()=>({...Ct.createDefaultProps(),pointed:!0})),h(ga,"type",ga.register("ESGeoPoints",ga,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:"地图中的可视化地理点集合"})),h(ga,"supportEditingModes",[...Ct.supportEditingModes,Z.ScatterAppend,Z.ScatterModify]);let Xu=ga;const S_=async(r,e=[],t)=>{const n=[];for(const i of e){const{coordinates:s}=i.geometry;for(const o of s){const a=await Promise.all(o.map(async l=>{let u=l[2]??0;if(t)if(t.type==="absolute")u=t.height??u;else if(t.type==="relative"){const c=await r.getTerrainHeight([l[0],l[1]])??0;u=(t.height??u)+c}else t.type==="terrain"&&(u=await r.getTerrainHeight([l[0],l[1]])??0);return[l[0],l[1],u]}));n.push({...i,points:a})}}return n},b_=async(r,e=[],t)=>await Promise.all(e.map(async n=>{var l,u,c,d,f,p,_,S,b;const i=((l=n.geometry)==null?void 0:l.x)??((c=(u=n.geometry)==null?void 0:u.coordinates)==null?void 0:c[0]),s=((d=n.geometry)==null?void 0:d.y)??((p=(f=n.geometry)==null?void 0:f.coordinates)==null?void 0:p[1]);let a=((_=n.geometry)==null?void 0:_.z)??((b=(S=n.geometry)==null?void 0:S.coordinates)==null?void 0:b[2])??0;if(t)if(t.type==="absolute")a=t.height??a;else if(t.type==="relative"){const I=await r.getTerrainHeight([i,s])??0;a=(t.height??a)+I}else t.type==="terrain"&&(a=await r.getTerrainHeight([i,s])??0);return{...n,points:[i,s,a]}})),P_=async(r,e=[],t)=>{const n=[];return await Promise.all(e.map(async i=>{const{coordinates:s}=i.geometry;await Promise.all(s.map(async o=>{const a=await Promise.all(o.map(async l=>{let u=l[2]??0;if(t)if(t.type==="absolute")u=t.height??u;else if(t.type==="relative"){const c=await r.getTerrainHeight([l[0],l[1]])??0;u=(t.height??u)+c}else t.type==="terrain"&&(u=await r.getTerrainHeight([l[0],l[1]])??0);return[l[0],l[1],u]}));n.push({...i,points:a})}))})),n};function Vb(r){const e=At.lineString(r),t=At.length(e),n=At.along(e,t/2);return[n.geometry.coordinates[0],n.geometry.coordinates[1],n.geometry.coordinates[2]||0]}function jb(r,e){const t=At.lineString(r),n=At.length(t),i=Math.floor(n/e),s=[];if(s.push(r[0]),i<1)return[r[0]];for(let o=1;o<i;o+=1){const a=At.along(t,n*(o/i));s.push([a.geometry.coordinates[0],a.geometry.coordinates[1],a.geometry.coordinates[2]||0])}return s}function Bb(r){const e=[...r];JSON.stringify(r[0])!==JSON.stringify(r[r.length-1])&&e.push(r[0]);const t=At.polygon([e]),n=At.center(t);return[n.geometry.coordinates[0],n.geometry.coordinates[1],n.geometry.coordinates[2]||0]}function I_(r,e,t){const n=r.dv(new ll);for(const i in t)i!=="type"&&(n[i]=t[i]);n.position=e,r.d(r.components.disposableAdd(n))}function Bp(r,e,t,n){let i=n.textTemplate||n.symbol.text||"";const s=/{{(.*?)}}/;for(;s.test(i);){const c=i.match(s);if(c){const d=c[1].trim(),f=t[`${d}`]||"-";i=i.replace(c[0],f)}}let o=n.symbol;const{minVisibleDistance:a,maxVisibleDistance:l}=n;a&&l&&(o={...o,minVisibleDistance:a,maxVisibleDistance:l});const u={...o,text:i};I_(r,e,u)}function dl(r,e){const t={width:null,height:null,color:null,opacity:null,rotation:null};return e.forEach(n=>{n.type==="size"?n.axis==="width"?t.width=r[n.field]||null:n.axis==="height"&&(t.height=r[n.field]||null):n.type==="color"?t.color=r[n.field]||null:n.type==="opacity"?t.opacity=r[n.field]||null:n.type==="rotation"&&(t.rotation=r[n.field]||null)}),t}function zp(r,e,t){const i={...e.symbol};if(t&&t.length>0){const s=dl(r,t);for(let o in s)i[o]!==void 0&&s[o]!==null&&(i[o]=s[o])}return i}function Up(r,e,t){var u,c;const n=e,{uniqueValueInfos:i,field:s,fieldDelimiter:o,defaultSymbol:a}=n;let l={...a};if(Array.isArray(s)){const f=s.map(p=>r[p]??"").join(o);l=((u=i.find(p=>p.value==f))==null?void 0:u.symbol)||a}else l=((c=i.find(d=>d.value==r[s]))==null?void 0:c.symbol)||a;if(t&&t.length>0){const d=dl(r,t);for(let f in d)l[f]!==void 0&&d[f]!==null&&(l[f]=d[f])}return l}function Gp(r,e,t){const n=e,{classBreakInfos:i,field:s,defaultSymbol:o}=n;let a=o;const l=r[s];if(l===void 0||typeof l!="number")a=o;else{const u=i.find(c=>l<=c.maxValue&&l>=c.minValue);u?a=u.symbol:a=o}if(t&&t.length>0){const u=dl(r,t);for(let c in u)a[c]!==void 0&&u[c]!==null&&(a[c]=u[c])}return a}function zb(r,e){function t(u,c,d,f){const p=y=>y*Math.PI/180,_=y=>y*180/Math.PI,S=p(u),b=p(d),I=p(f-c),m=Math.sin(I)*Math.cos(b),w=Math.cos(S)*Math.sin(b)-Math.sin(S)*Math.cos(b)*Math.cos(I),g=Math.atan2(m,w);return(_(g)+360)%360}function n(u,c,d,f,p){const S=C=>C*Math.PI/180,b=C=>C*180/Math.PI,I=f/6371e3,m=S(p),w=S(u),g=S(c),y=Math.asin(Math.sin(w)*Math.cos(I)+Math.cos(w)*Math.sin(I)*Math.cos(m)),E=g+Math.atan2(Math.sin(m)*Math.sin(I)*Math.cos(w),Math.cos(I)-Math.sin(w)*Math.sin(y));return{lat:b(y),lng:b(E),alt:d}}function i(u){const c=[];u.length>1&&c.push(t(u[0].lat,u[0].lng,u[1].lat,u[1].lng));for(let d=1;d<u.length-1;d++){const f=t(u[d-1].lat,u[d-1].lng,u[d].lat,u[d].lng),p=t(u[d].lat,u[d].lng,u[d+1].lat,u[d+1].lng);let _=(f+p)/2;Math.abs(f-p)>180&&(_=(_+180)%360),c.push(_)}return u.length>1&&c.push(t(u[u.length-2].lat,u[u.length-2].lng,u[u.length-1].lat,u[u.length-1].lng)),u.length===1&&c.push(0),c}if(!r||r.length<2)throw new Error("至少需要两个点才能生成路径");if(e<=0)throw new Error("宽度必须大于0");const s=e/2,o=i(r),a=[],l=[];for(let u=0;u<r.length;u++){const c=(o[u]+90)%360,d=(o[u]+270)%360,f=r[u].alt!==void 0?r[u].alt:0;a.push(n(r[u].lat,r[u].lng,f,s,c)),l.push(n(r[u].lat,r[u].lng,f,s,d))}return a.concat(l.reverse())}function Ub(r,e,t,n){function i(S){return S*(Math.PI/180)}const s=6378137,o=i(r),a=i(e),l=i(t),u=i(n),c=l-o,d=u-a,f=Math.sin(c/2)**2+Math.cos(o)*Math.cos(l)*Math.sin(d/2)**2,p=2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f));return s*p}const x_=(r,e,t)=>Array.isArray(e)?e.map(s=>r[s]??"").join(t):r[e]??"";function T_(r,e){const n={...e.symbol};return{points:r.map(i=>i.points),symbol:n}}function O_(r,e){const t=e,{uniqueValueInfos:n,field:i,fieldDelimiter:s,defaultSymbol:o}=t,a=[],l=n.reduce((c,d)=>{const f=d.value.toString();return c[f]={points:[],value:d.value,symbol:d.symbol},c},{});for(let c=0;c<r.length;c++){const d=r[c],f=x_(d,i,s);if(f!==void 0&&f!==""){const p=l[f.toString()];p?p.points.push(d.points):a.push(d.points)}else a.push(d.points)}const u=[];for(let c in l){const{points:d,symbol:f}=l[c];d.length>0&&u.push({points:d,symbol:f})}return a.length>0&&u.push({points:a,symbol:o}),u}function D_(r,e){const t=e,{classBreakInfos:n,field:i,defaultSymbol:s}=t,o=[],a=n.map(u=>({...u,points:[]}));for(let u=0;u<r.length;u++){const c=r[u],d=c[i];if(d===void 0||typeof d!="number")o.push(c.points);else{const f=a.findIndex(p=>d<=p.maxValue&&d>=p.minValue);f!==-1?a[f].points.push(c.points):o.push(c.points)}}const l=[];return a.forEach(u=>{u.points.length>0&&l.push({points:u.points,symbol:u.symbol})}),o.length>0&&l.push({points:o,symbol:s}),l}function Gb(r,e,t=[]){const i={...e.symbol},s=r.map(o=>{const a=dl(o,t);return{position:o.points,rotation:a.rotation||i.rotation||[0,0,0],scale:i.scale||[1,1,1]}});return{url:i.url,locations:s}}function Wb(r,e,t=[]){const n=e,{uniqueValueInfos:i,field:s,fieldDelimiter:o}=n,a=n.defaultSymbol,l=[],u=i.reduce((d,f)=>{const p=f.value.toString();return d[p]={locations:[],value:f.value,symbol:f.symbol},d},{});for(let d=0;d<r.length;d++){const f=r[d],p=x_(f,s,o);if(p){const _=u[p.toString()];if(_){const S=dl(f,t);_.locations.push({position:f.points,rotation:S.rotation||a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}else l.push({position:f.points,rotation:a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}else l.push({position:f.points,rotation:a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}const c=[];for(let d in u){const{locations:f,symbol:p}=u[d];f.length>0&&c.push({url:p.url,locations:f})}return l.length>0&&c.push({url:a.url,locations:l}),c}function Hb(r,e,t=[]){const n=e,{classBreakInfos:i,field:s}=n,o=n.defaultSymbol,a=[],l=i.map(c=>({...c,locations:[]}));for(let c=0;c<r.length;c++){const d=r[c],f=d[s];if(f===void 0||typeof f!="number")a.push({position:d.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]});else{const p=l.findIndex(_=>f<=_.maxValue&&f>=_.minValue);if(p!==-1){const _=dl(d,t);l[p].locations.push({position:d.points,rotation:_.rotation||o.rotation||[0,0,0],scale:l[p].symbol.scale||[1,1,1]})}else a.push({position:d.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]})}}const u=[];return l.forEach(c=>{c.locations.length>0&&u.push({url:c.symbol.url,locations:c.locations})}),a.length>0&&u.push({url:o.url,locations:a}),u}class qb extends U{constructor(t,n,i,s){super();h(this,"labelingInfo");this.sceneObject=t;const o=n;if(s&&xi(o,a=>{this.renderLabel(a,s)}),i)if(i.type==="simple"){const{visualVariables:a}=i;if(i.symbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!");const l=T_(o,i);this._simplePointAllRender(l.points,l.symbol);return}if(i.symbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!");const l=T_(o,i);this._imageAllRender(l.points,l.symbol);return}if(i.symbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!");const{url:l,locations:u}=Gb(o,i,a);this._modelAllRender(l,u);return}for(let l=0;l<o.length;l++){const u=zp(o[l],i,a);this.render(o[l],u)}}else if(i.type==="unique-value"){const{visualVariables:a}=i;if(i.uniqueValueInfos.findIndex(d=>d.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!"),O_(o,i).forEach(({points:f,symbol:p})=>{this._simplePointAllRender(f,p)});return}if(i.uniqueValueInfos.findIndex(d=>d.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!"),O_(o,i).forEach(({points:f,symbol:p})=>{this._imageAllRender(f,p)});return}if(i.uniqueValueInfos.findIndex(d=>d.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),Wb(o,i,a).forEach(({url:f,locations:p})=>{this._modelAllRender(f,p)});return}for(let d=0;d<o.length;d++){const f=Up(o[d],i,a);this.render(o[d],f)}}else if(i.type==="class-breaks"){const{visualVariables:a}=i;if(i.classBreakInfos.findIndex(d=>d.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!"),D_(o,i).forEach(({points:f,symbol:p})=>{this._simplePointAllRender(f,p)});return}if(i.classBreakInfos.findIndex(d=>d.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!"),D_(o,i).forEach(({points:f,symbol:p})=>{this._imageAllRender(f,p)});return}if(i.classBreakInfos.findIndex(d=>d.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),Hb(o,i,a).forEach(({url:f,locations:p})=>{this._modelAllRender(f,p)});return}for(let d=0;d<o.length;d++){const f=Gp(o[d],i,a);this.render(o[d],f)}}else if(i.type==="heatmap"){const{field:a,fieldValueMax:l,fieldValueMin:u}=i;console.time();const c=o.map(d=>{const{points:f}=d;if(a&&typeof a=="string"){let p=d[a];typeof p=="number"&&(typeof l=="number"&&p>l&&(p=l),typeof u=="number"&&p<u&&(p=u),f[2]=p)}return f});this.renderHeatmap(c,i)}else console.error("PointLayer: renderer type is not supported")}renderLabel(t,n){const{points:i}=t;Bp(this.sceneObject,i,t,n)}renderHeatmap(t,n){const{is3D:i,radius:s,blur:o,gradient:a}=n,l=this.dv(new bh);this.d(this.sceneObject.components.disposableAdd(l)),l.is3D=i,l.radius=s,l.blur=o,a&&(l.gradient={...a}),l.data=t}render(t,n){n.type==="simple-point"?this._simplePointRender(t,n):n.type==="ESImageLabel"?this._simpleImageRender(t,n):n.type==="ESGltfModel"?this._simpleModelRender(t,n):n.type==="ESTextLabel"?I_(this.sceneObject,t.points,n):n.type==="ESParticleSystemPrimitive"?this._simpleParticleRender(t,n):console.error(" PointLayer: symbol type is not supported")}_simplePointRender(t,n){const{points:i}=t,{size:s,color:o,outlineColor:a,outlineWidth:l}=n,u=this.dv(new Xu);this.d(this.sceneObject.components.disposableAdd(u)),u.pointed=!0,u.pointOutlineColor=a,u.pointOutlineWidth=l,u.pointSize=s,u.pointColor=o,u.allowPicking=(n==null?void 0:n.allowPicking)??!0,u.extras={selected:!1},u.points=[i]}_simplePointAllRender(t,n){const{size:i,color:s,outlineColor:o,outlineWidth:a}=n,l=this.dv(new Xu);this.d(this.sceneObject.components.disposableAdd(l)),l.pointed=!0,l.pointOutlineColor=o,l.pointOutlineWidth=a,l.pointSize=i,l.pointColor=s,l.allowPicking=(n==null?void 0:n.allowPicking)??!0,l.points=[...t]}_simpleImageRender(t,n){const{points:i}=t,{rotation:s,offset:o,size:a,url:l,screenRender:u,anchor:c,renderMode:d,rotationType:f}=n,p=this.dv(new mh),_=this.dv(new ll);this.d(this.sceneObject.components.disposableAdd(p)),this.d(this.sceneObject.components.disposableAdd(_)),p.url=l,p.renderMode=d??0,s&&(p.rotation=s),o&&(p.offset=o),p.size=a||[32,32],c&&(p.anchor=c),f&&(p.rotationType=f),p.screenRender=u??!0,p.allowPicking=(n==null?void 0:n.allowPicking)??!0,p.extras={selected:!1},p.position=[...i],p.sizeByContent=!1,_.allowPicking=(n==null?void 0:n.allowPicking)??!0;const S=a?Math.max(...a)+10:Math.max(...p.size)+10;_.sizeByContent=!1,_.screenRender=!0,_.size=[S,S],_.borderRadius=[S,S,S,S],_.padding=[S/2,S/2,S/2,S/2],_.borderWidth=S/10,_.offset=[0,S/10+5],_.text="",_.backgroundColor=[0,0,0,0],_.borderColor=[0,0,0,0]}_imageAllRender(t,n){const i={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:t}}]},s=this.dv(new Gu);this.d(this.sceneObject.components.disposableAdd(s));const o=this.dv(new ll);this.d(this.sceneObject.components.disposableAdd(o)),s.textDefaultText="";const{offset:a,size:l,url:u,anchor:c}=n;s.imageUrl=u,c&&(s.imageAnchor=c),a&&(s.imageOffset=a),s.imageSize=l||[32,32],s.url=i,s.allowPicking=(n==null?void 0:n.allowPicking)??!0,s.extras={selected:!1},o.allowPicking=!0;const d=l?Math.max(...l)+10:Math.max(...s.imageSize)+10;o.sizeByContent=!1,o.size=[d,d],o.borderRadius=[d,d,d,d],o.padding=[d/2,d/2,d/2,d/2],o.borderWidth=d/10,o.offset=[0,d/10+5],o.text="",o.backgroundColor=[0,0,0,0],o.borderColor=[0,0,0,0]}_simpleModelRender(t,n){const{points:i}=t,{rotation:s,scale:o,url:a}=n,l=this.dv(new qi);this.d(this.sceneObject.components.disposableAdd(l)),l.url=a,s&&(l.rotation=s),o&&(l.scale=o),l.position=[...i]}_modelAllRender(t,n){const i=this.dv(new qi);this.d(this.sceneObject.components.disposableAdd(i)),i.url=t,i.instances=n}_simpleParticleRender(t,n){const{points:i}=t,s=this.dv(new vh);this.d(this.sceneObject.components.disposableAdd(s)),s.position=[...i],Object.keys(n).forEach(o=>{s[o]=n[o]})}}class Xb extends U{constructor(e,t,n,i){super(),this.sceneObject=e;const s=t;if(i&&xi(s,o=>{this.renderLabel(o,i)}),n)if(n.type==="simple"){const{visualVariables:o}=n;xi(s,a=>{const l=zp(a,n,o);this.render(a,l)})}else if(n.type==="unique-value"){const{visualVariables:o}=n;xi(s,a=>{const l=Up(a,n,o);this.render(a,l)})}else if(n.type==="class-breaks"){const{visualVariables:o}=n;xi(s,a=>{const l=Gp(a,n,o);this.render(a,l)})}else console.error("PolyLineLayer: renderer type is not supported")}render(e,t){console.log("PolyLineLayer: render",e,t),t.type==="simple-line"?this._simpleLineRender(e,t):t.type==="ESPolygonFence"?this._esPolygonFenceRender(e,t):t.type==="ESPipeFence"?this._esPipeFenceRender(e,t):t.type==="ESPath"?this._esPathRender(e,t):t.type==="ESlineInterpolationModel"?this._eslineInterpolationModelRender(e,t):t.type==="ESlineWall"?this._eslineWallRender(e,t):console.error("PolyLineLayer: symbol type is not supported")}_simpleLineRender(e,t){const{points:n}=e;if(n.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new fn);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...n],i.stroked=!0,i.strokeColor=t.color,i.strokeWidth=t.width||1,i.allowPicking=(t==null?void 0:t.allowPicking)??!0,i.extras={selected:!1}}_esPolygonFenceRender(e,t){const{points:n}=e;if(n.length<3){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new Eh);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...n],i.height=t.height,i.materialMode=t.materialMode}_esPipeFenceRender(e,t){const{points:n}=e;if(n.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new wh);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...n],i.height=t.height,i.width=t.width,i.materialMode=t.materialMode}_esPathRender(e,t){const{points:n}=e;if(n.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new hl),s=this.dv(new cl);if(this.d(this.sceneObject.components.disposableAdd(i)),this.d(this.sceneObject.components.disposableAdd(s)),i.points=[...n],i.speed=t.speed,i.strokeColor=t.color,i.materialMode=t.materialMode,i.strokeWidth=t.width||1,t!=null&&t.runModel){const a=t==null?void 0:t.runSpeed,l=t==null?void 0:t.modelSymbol;let u;switch(t==null?void 0:t.runModel){case"ESHuman":u=this.dv(new vr);break;case"ESCar":u=this.dv(new dh);break;case"ESGltfModel":u=this.dv(new qi)}if(this.d(this.sceneObject.components.disposableAdd(u)),l)for(let d in l)u[d]=l[d];const c=[0];for(var o=0;o<n.length-1;o+=1){const d=n[o],f=n[o+1],p=Ub(d[1],d[0],f[1],f[0]);c.push(c[o]+Math.ceil(p/a)*1e3)}i.timeStamps=c,t!=null&&t.runSpeed&&(i.currentPositionChanged.don(d=>{i.currentPosition&&(u.position=i.currentPosition,i.currentRotation&&(u.rotation=i.currentRotation))}),s.startTime=0,s.stopTime=c[c.length-1],s.playing=!0,s.loop=(t==null?void 0:t.runLoop)??!0,s.currentTimeChanged.don(d=>{i.path.currentTime=d}))}}_eslineInterpolationModelRender(e,t){const{points:n}=e;if(n.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=(t==null?void 0:t.interpolationDistance)??0;if(!i)return;const s=jb(n,i/1e3),o=this.dv(new qi);this.d(this.sceneObject.components.disposableAdd(o)),o.url=t.url,o.instances=s.map(a=>({position:a,rotation:t.rotation,scale:t.scale}))}_eslineWallRender(e,t){const{points:n}=e;if(n.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=t.height??0,s=t.width??0,o=t.extrudedHeight??0,a=n.map(c=>({lng:(c==null?void 0:c[0])??0,lat:(c==null?void 0:c[1])??0,alt:(c==null?void 0:c[2])??0})),l=zb(a,s).map(c=>[(c==null?void 0:c.lng)??0,(c==null?void 0:c.lat)??0,(c==null?void 0:c.alt)??0]),u=this.dv(new Yo);this.d(this.sceneObject.components.disposableAdd(u)),u.height=i,u.extrudedHeight=o,u.filled=t.filled??!0,u.fillColor=t.fillColor,u.allowPicking=(t==null?void 0:t.allowPicking)??!0,u.extras={selected:!1},u.points=l}renderLabel(e,t){const{points:n}=e,i=Vb(n);Bp(this.sceneObject,i,e,t)}}function N_(r,e){try{JSON.stringify(r[r.length-1])!==JSON.stringify(r[0])&&r.push(r[0]);const t=At.featureCollection(r.map(l=>At.point(l))),n=At.polygon([r]),i={gridType:"point",units:"meters"};return At.interpolate(t,e,i).features.map(l=>l.geometry.coordinates)[0][0].filter(l=>At.booleanPointInPolygon(At.point(l),n))}catch(t){return console.error(t),[]}}class Yb extends U{constructor(e,t,n,i){super(),this.sceneObject=e;const s=t;if(i&&xi(s,o=>{this.renderLabel(o,i)}),n)if(n.type==="simple"){const{visualVariables:o}=n;xi(s,a=>{const l=zp(a,n,o);this.render(a,l)})}else if(n.type==="unique-value"){const{visualVariables:o}=n;xi(s,a=>{const l=Up(a,n,o);this.render(a,l)})}else if(n.type==="class-breaks"){const{visualVariables:o}=n;xi(s,a=>{const l=Gp(a,n,o);this.render(a,l)})}else console.error("PolyLineLayer: renderer type is not supported")}renderLabel(e,t){const{points:n}=e;console.log("PolygonLayer: renderLabel",n);const i=Bb(n);Bp(this.sceneObject,i,e,t)}render(e,t){t.type==="simple-fill"?this._simplePolygonRender(e,t):t.type==="ESGeoExtrudedPolygon"?this._esGeoExtrudedPolygonRender(e,t):t.type==="PolygonInterpolateESGltfModel"?this._polygonInterpolateESGltfModelRender(e,t):t.type==="PolygonInterpolateESImageLabel"?this._polygonInterpolateESImageLabelRender(e,t):console.error("PolyLineLayer: symbol type is not supported")}_simplePolygonRender(e,t){const{points:n}=e;if(n.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{color:i,outline:s,filled:o,ground:a}=t,{width:l,color:u,stroked:c}=s,d=this.dv(new Bt);this.d(this.sceneObject.components.disposableAdd(d)),d.stroked=c??!1,d.strokeColor=u??[1,1,1,1],d.strokeWidth=l??1,d.filled=o??!0,d.fillGround=a??!1,d.fillColor=i??[1,1,1,1],d.allowPicking=(t==null?void 0:t.allowPicking)??!0,d.extras={selected:!1},d.points=[...n]}_esGeoExtrudedPolygonRender(e,t){const{points:n}=e;if(n.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,extrudedHeight:s,color:o}=t,a=this.dv(new Yo);this.d(this.sceneObject.components.disposableAdd(a)),a.height=i,a.extrudedHeight=s,a.filled=!0,a.fillColor=o,a.allowPicking=(t==null?void 0:t.allowPicking)??!0,a.extras={selected:!1},a.points=[...n]}_polygonInterpolateESGltfModelRender(e,t){const{points:n}=e;if(n.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:s,url:o,rotation:a,scale:l}=t,u=N_(n,s??10),c=this.dv(new qi);this.d(this.sceneObject.components.disposableAdd(c)),c.url=o,c.instances=u.map(d=>({position:[...d,i??0],rotation:a??[0,0,0],scale:l??[1,1,1]}))}_polygonInterpolateESImageLabelRender(e,t){const{points:n}=e;if(n.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:s,offset:o,size:a,url:l,anchor:u}=t,d={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:[...N_(n,s??10).map(p=>[...p,i??0])]}}]},f=this.dv(new Gu);this.d(this.sceneObject.components.disposableAdd(f)),f.textDefaultText="",f.imageUrl=l,u&&(f.imageAnchor=u),o&&(f.imageOffset=o),a&&(f.imageSize=a),f.url=d}}class Jb extends U{constructor(t,n){super();h(this,"_initEvent",this.dv(new N));const i=this,s=async()=>{try{const a=t.featureProps;if(!a)return;const{heightMode:l,features:u,layerType:c,url:d}=a;let f=[];if(!u&&d){let p=await fetch(d).then(_=>_.json());return p=(p==null?void 0:p.features)??p,c==="polylineVector"?f=await S_(n,p,l):c==="polygonVector"?f=await P_(n,p,l):c==="pointVector"&&(f=await b_(n,p,l)),f}else c==="polylineVector"?f=await S_(n,u,l):c==="polygonVector"?f=await P_(n,u,l):c==="pointVector"&&(f=await b_(n,u,l));return f}catch(a){console.error(a);return}},o=this.dv(Se(this._initEvent,t.featurePropsChanged));i.dv(new Ie(o,()=>{if(!t.featureProps)return;const a=t.featureProps;let l;return(async()=>{const{layerType:c,renderer:d,labelingInfo:f}=a,p=await s();!p||p.length===0||(c==="pointVector"?l=new qb(t,p,d,f):c==="polylineVector"?l=new Xb(t,p,d,f):c==="polygonVector"&&(l=new Yb(t,p,d,f)),console.log("polygonVectorLayer","createLayer",l))})().catch(console.error),{destroy:()=>{var c;(c=l==null?void 0:l.destroy)==null||c.call(l),l=void 0}}}));{const a=(l,u=1)=>{const c=Ry(l);if(!c)return;const{center:d,radius:f}=c;n.flyTo({distance:f*4,heading:0,pitch:-90,flyDuration:u??1,hDelta:0,pDelta:0},d)};i.d(t.flyToEvent.don(async l=>{const{featureProps:u}=t;if(!u)return;const c=await s();if(!c)return;let d=[];u.layerType==="polylineVector"?d=c.map(f=>f.points).flat():u.layerType==="polygonVector"?d=c.map(f=>f.points).flat():u.layerType==="pointVector"&&(d=c.map(f=>f.points)),d.length!==0&&a(d,l)}))}}init(){this._initEvent.emit()}}const zl=class zl extends jt{constructor(t){super(t);h(this,"featureLayerMap",new Map);const n=this;n.d(n.viewerAttached.don(i=>{if(console.log("ESFeatureLayer","viewerAttached",i.id),n.featureLayerMap.has(i.id))return;const s=new Jb(n,i);s.init(),n.featureLayerMap.set(i.id,s)})),n.d(n.viewerDetached.don(i=>{var s;console.log("ESFeatureLayer","viewerDetached",i.id),n.featureLayerMap.has(i.id)&&((s=n.featureLayerMap.get(i.id))==null||s.destroy(),n.featureLayerMap.delete(i.id))})),n.d(()=>{for(const i of n.featureLayerMap.values())i.destroy();n.featureLayerMap.clear()}),n.d(Ne(n.showChanged,()=>{for(const i of n.components.values())Reflect.has(i,"show")&&(i.show=n.show)},{immediate:!0}))}};h(zl,"createDefaultProps",()=>({...jt.createDefaultProps(),featureProps:Kt(void 0)})),h(zl,"type",zl.register("ESFeatureLayer",zl,{chsName:"矢量图层",tags:["ESObjects"],description:"ESFeatureLayer"}));let Wp=zl;const $b=[["256",256],["512",512],["1024",1024]],Kb=[["LEFT","LEFT"],["NONE","NONE"],["RIGHT","RIGHT"]],Qn=class Qn extends jt{constructor(t){super(t);h(this,"_pickFeaturesEvent",this.dv(new N));this.ad(tt([this,"czmSplitDirection"],[this,"splitDirection"])),this.ad(tt([this,"czmAlpha"],[this,"opacity"]))}get pickFeaturesEvent(){return this._pickFeaturesEvent}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ct([this,"accessToken"],"令牌",Qn.defaults.accessToken),new Sr([this,"rectangle"],"矩形范围",Qn.defaults.rectangle),new ft([this,"url"],"服务地址",Qn.defaults.url),new ft([this,"style"],"样式配置",Qn.defaults.style),new M([this,"zIndex"],"层级序号",Qn.defaults.zIndex),new st([this,"tileSize"],$b,"瓦片大小",256),new Re([this,"maximumLevel"],1,[1,24],"最大层级",Qn.defaults.maximumLevel),new Re([this,"minimumLevel"],1,[0,24],"最小层级",Qn.defaults.minimumLevel),new st([this,"scheme"],[["tms","tms"],["xyz","xyz"]],"影像切片规则",Qn.defaults.scheme),new st([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考"),new ct([this,"targetID"],"targetID")],more:[...t.more,new dt("通用"),new st([this,"splitDirection"],Kb,"splitDirection","NONE"),new dt("czm"),new M([this,"czmAlpha"],"透明度"),new M([this,"czmBrightness"],"亮度"),new M([this,"czmContrast"],"对比度"),new M([this,"czmHue"],"色相"),new M([this,"czmSaturation"],"饱和度"),new M([this,"czmGamma"],"伽马值")]}}};h(Qn,"createDefaultProps",()=>({...jt.createDefaultProps(),rectangle:Kt([-180,-90,180,90]),url:gt(""),zIndex:0,accessToken:"",tileSize:256,maximumLevel:18,minimumLevel:0,style:Xt([]),scheme:z("xyz"),czmSplitDirection:"NONE",heightReference:"NONE",czmAlpha:1,opacity:1,splitDirection:"NONE",targetID:"",czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1})),h(Qn,"type",Qn.register("ESMVTLayer",Qn,{chsName:"矢量瓦片图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"用于加载矢量瓦片图层。"}));let Hp=Qn;const is=class is extends it{constructor(e){super(e)}getESProperties(){return{...{...super.getESProperties()},basic:[new M([this,"radius"],"半径",is.defaults.radius),new M([this,"height"],"高度",is.defaults.height),new Pt([this,"color"],"颜色",is.defaults.color),new ft([this,"materialParams"],"材质参数",is.defaults.materialParams)]}}};h(is,"createDefaultProps",()=>({...it.createDefaultProps(),radius:2,height:10,color:et([.204,.596,.859,1]),materialParams:gt({ringSpeed:1,ringColor:[1,1,1,1],ringWidth:.03,sides:10,ringRatio:1,ringRepeat:1,ringBottomMove:!1})})),h(is,"type",is.register("ESCylinder",is,{chsName:"圆柱",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"圆柱体"}));let Jo=is;const Pi=class Pi extends zu{constructor(e){super(e)}getESProperties(){const e=super.getESProperties();return{...e,dataSource:[...e.dataSource,new st([this,"videoStreamType"],Pi.videoStreamTypes,"数据源类型",Pi.defaults.videoStreamType),new X([this,"looping"],"循环播放",Pi.defaults.looping),new X([this,"play"],"播放状态",Pi.defaults.play)]}}};h(Pi,"createDefaultProps",()=>({...zu.createDefaultProps(),videoStreamType:"video",looping:!0,play:!0})),h(Pi,"type",Pi.register("ESMediaLayer",Pi,{chsName:"媒体图层",tags:["ESObjects","_ES_Impl_Cesium"],description:"用于添加数据源为图片或者视频的图层"})),h(Pi,"videoStreamTypes",[["video","video"],["hls","hls"],["flv","flv"],["img","img"]]);let qp=Pi;const ss=class ss extends jt{constructor(t){super(t);h(this,"_getRepairPolygonEvent",this.disposeVar(new N));h(this,"_getIndicesEvent",this.disposeVar(new N));h(this,"_startEvent",this.disposeVar(new N))}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"general",basic:[new ft([this,"urls"],"URL",ss.defaults.urls),new st([this,"mode"],ss.modes,"模式",ss.defaults.mode),new ut("开始编辑",()=>this.start(),[])]}}get getRepairPolygonEvent(){return this._getRepairPolygonEvent}getRepairPolygon(){return new Promise((t,n)=>{const i=new U;i.ad(this._getRepairPolygonEvent.don(o=>{o!="get"&&t(o)})),this.getRepairPolygonEvent.emit("get");const s=setTimeout(()=>{i.isDestroyed()||(i.destroy(),t(void 0))},2e3);i.ad(()=>clearTimeout(s))})}get getIndicesEvent(){return this._getIndicesEvent}getIndices(){return new Promise((t,n)=>{const i=new U;i.ad(this._getIndicesEvent.don(o=>{o!="get"&&t(o)})),this.getIndicesEvent.emit("get");const s=setTimeout(()=>{i.isDestroyed()||(i.destroy(),t(void 0))},2e3);i.ad(()=>clearTimeout(s))})}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}};h(ss,"createDefaultProps",()=>({...jt.createDefaultProps(),urls:Xt([]),mode:"repair",allowPicking:!0})),h(ss,"type",ss.register("ESGltfModelEditing",ss,{chsName:"GLTF模型编辑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载GLTF模型的 ES 对象"})),h(ss,"modes",[["删除","delete"],["修复","repair"]]);let Xp=ss;const mo=class mo extends vr{constructor(t){super(t);h(this,"humans",[]);h(this,"humansOffset",new Map);this.ad(this.clear.bind(this)),this.updateHumans();const n=this.ad(Se(this.instancesCountChanged,this.radiusChanged));this.ad(n.don(this.updateHumans.bind(this)))}getESProperties(){const t=super.getESProperties();return{...t,basic:[...t.basic,new M([this,"instancesCount"],"实例数量",1,mo.defaults.instancesCount),new M([this,"radius"],"半径",1,mo.defaults.radius)]}}updateHumans(){for(this.clear();this.humans.length+1<this.instancesCount;){const t=new vr;this.humansOffset.set(t.id,[Math.random()*this.radius,Math.random()*this.radius,0]),this.humans.push(t),this.components.add(t),t.d(A([t,"show"],[this,"show"])),t.d(A([t,"allowPicking"],[this,"allowPicking"])),t.d(A([t,"scale"],[this,"scale"])),t.d(A([t,"collision"],[this,"collision"])),t.d(tt([t,"flyInParam"],[this,"flyInParam"])),t.d(tt([t,"flyToParam"],[this,"flyToParam"])),t.d(A([t,"animation"],[this,"animation"])),t.d(A([t,"mode"],[this,"mode"])),t.d(A([t,"minVisibleDistance"],[this,"minVisibleDistance"])),t.d(A([t,"maxVisibleDistance"],[this,"maxVisibleDistance"])),t.d(Ne([this.positionChanged],()=>{const n=Ld(this.position,this.humansOffset.get(t.id)??[0,0,0]);n&&(t.position=n)},{immediate:!0})),t.d(tt([t,"rotation"],[this,"rotation"])),t.d(this.flyInEvent.don(n=>{t.flyIn(n)})),t.d(this.flyToEvent.don(n=>{t.flyTo(n)})),t.d(this.calcFlyToParamEvent.don(()=>{t.calcFlyToParam()})),t.d(this.calcFlyInParamEvent.don(()=>{t.calcFlyInParam()})),t.d(this.smoothMoveEvent.don((n,i)=>{t.smoothMove(n,i)})),t.d(this.smoothMoveWithRotationEvent.don((n,i,s)=>{t.smoothMoveWithRotation(n,i,s)})),t.d(this.smoothMoveOnGroundEvent.don((n,i,s,o)=>{t.smoothMoveOnGround(n,i,s,o)})),t.d(this.smoothMoveWithRotationOnGroundEvent.don((n,i,s,o,a)=>{t.smoothMoveWithRotationOnGround(n,i,s,o,a)})),t.d(this.automaticLandingEvent.don(()=>{t.automaticLanding()})),t.d(t.readyEvent.don(n=>{this.readyEvent.emit(n)}))}}clear(){this.humans.forEach(t=>{this.components.delete(t)}),this.humans=[],this.humansOffset.clear()}};h(mo,"createDefaultProps",()=>({...vr.createDefaultProps(),instancesCount:1,radius:1})),h(mo,"type",mo.register("ESHumans",mo,{chsName:"人员(批量)",tags:["ESObjects"],description:"批量创建ESHumans对象"}));let Yp=mo;const ma=class ma extends fn{constructor(t){super(t);h(this,"_line",this.ad(new fn));h(this,"_arrowPolygon",this.ad(new Bt));this.ad(this.components.disposableAdd(this.line,!0)),this.line.show=!1,this.ad(this.components.disposableAdd(this.arrowPolygon));const{line:n,arrowPolygon:i}=this;this.ad(tt([n,"points"],[this,"points"])),this.ad(Ne([this.pointsChanged,this.modeChanged],()=>{this.updateArrowPolygon()},{immediate:!0})),this.ad(A([i,"show"],[this,"show"])),this.ad(A([i,"collision"],[this,"collision"])),this.ad(A([i,"allowPicking"],[this,"allowPicking"])),this.ad(A([i,"filled"],[this,"filled"])),this.ad(A([i,"fillGround"],[this,"fillGround"])),this.ad(A([i,"fillColor"],[this,"fillColor"])),this.ad(A([i,"fillMaterial"],[this,"fillMaterial"])),this.ad(A([i,"fillMaterialParams"],[this,"fillMaterialParams"])),this.ad(A([i,"stroked"],[this,"stroked"])),this.ad(A([i,"strokeGround"],[this,"strokeGround"])),this.ad(A([i,"strokeColor"],[this,"strokeColor"])),this.ad(A([i,"strokeMaterial"],[this,"strokeMaterial"])),this.ad(A([i,"strokeMaterialParams"],[this,"strokeMaterialParams"])),this.ad(A([i,"strokeWidth"],[this,"strokeWidth"])),this.ad(A([i,"strokeWidthType"],[this,"strokeWidthType"])),this.ad(A([i,"classificationType"],[this,"classificationType"]))}get line(){return this._line}get arrowPolygon(){return this._arrowPolygon}getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new st([this,"mode"],wd,"箭头模式",ma.defaults.mode)]}}updateArrowPolygon(){const t=this.points;if(!t||t.length<3){this._arrowPolygon.points=[];return}let n=bf(t,this.mode,!0);n&&n.length>=3?this._arrowPolygon.points=[...n,n[0]]:this._arrowPolygon.points=[]}};h(ma,"createDefaultProps",()=>({...fn.createDefaultProps(),mode:"straightArrow",stroked:!1,filled:!0,fillStyle:gt({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),h(ma,"type",ma.register("ESAttackArrow",ma,{chsName:"进攻箭头",tags:["ESObjects","_ES_Impl_Cesium"],description:"进攻箭头,军事标绘箭头类,支持直箭头和燕尾箭头"}));let Jp=ma;const va=class va extends qi{constructor(t){super(t);h(this,"esCylinder",this.dv(new Jo));const n=this.esCylinder;n.color=[1,1,1,0],this.ad(this.components.disposableAdd(this.esCylinder)),this.ad(A([n,"show"],[this,"show"])),this.ad(A([n,"collision"],[this,"collision"])),this.ad(A([n,"allowPicking"],[this,"allowPicking"])),this.ad(A([n,"position"],[this,"position"])),this.ad(A([n,"radius"],[this,"esCylinderRadius"])),this.ad(A([n,"height"],[this,"esCylinderHeight"])),this.ad(A([n,"materialParams"],[this,"esCylinderMaterialParams"])),this.ad(Ne(this.esCylinderRotationChanged,()=>{const i=this.esCylinderRotation;n.rotation=[i[0],i[1]-180,i[2]]},{immediate:!0}))}getESProperties(){const t=super.getESProperties();return{...t,basic:[...t.basic,new iu([this,"esCylinderRotation"],"波动方向",va.defaults.esCylinderRotation),new M([this,"esCylinderRadius"],"半径",Jo.defaults.esCylinderRadius),new M([this,"esCylinderHeight"],"高度",Jo.defaults.esCylinderHeight),new ft([this,"esCylinderMaterialParams"],"材质参数",Jo.defaults.esCylinderMaterialParams)]}}};h(va,"createDefaultProps",()=>({...qi.createDefaultProps(),url:"${earthsdk3-assets-script-dir}/assets/glb/CesiumDrone.glb",esCylinderRotation:et([0,0,0]),esCylinderRadius:2,esCylinderHeight:10,esCylinderMaterialParams:gt({ringSpeed:1,ringColor:[1,1,0,1],ringWidth:.03,sides:10,ringRatio:1,ringRepeat:10,ringBottomMove:!0})})),h(va,"type",va.register("ESSignalInterference",va,{chsName:"信号干扰",tags:["ESObjects"],description:"信号干扰"}));let $p=va;const Ns=class Ns extends U{constructor(){super();h(this,"_loading",!1);h(this,"_loadedEvent",this.disposeVar(new N));h(this,"_loaded",!1);h(this,"_loadedPromiseResolve");h(this,"_loadedPromise",new Promise(t=>{this._loadedPromiseResolve=t}));h(this,"_processing");this._processing=this.disposeVar(nr(async t=>{if(this._loading=!0,globalThis.Hls)console.info("可能系统已经加载hlsjs,此处不再加载!");else{const n=lt.context.getStrFromEnv(Ns.path);await t.promise(Xh(n))}this._loading=!1,this._loaded=!0,this._loadedEvent.emit(),this._loadedPromiseResolve()})),this._processing.start()}get loading(){return this._loading}get loadedEvent(){return this._loadedEvent}get loaded(){return this._loaded}get loadedPromise(){return this._loadedPromise}get processing(){return this._processing}static instance(){return Ns._instance=Ns._instance||new Ns,Ns._instance}};h(Ns,"path","${xr-utils-script-dir}/xr-static/xr-utils/hlsjs/1.4.12/hls.min.js"),h(Ns,"_instance");let Ph=Ns,Zb=class extends U{constructor(t,n){super();h(this,"_element");this._complexImage=t,this._videoSrc=n;var i=document.createElement("video");i.src=this._videoSrc,i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.zIndex="-100",i.style.visibility="hidden";{const s=()=>{i.crossOrigin=this._complexImage.crossOrigin};s(),this.dispose(this._complexImage.crossOriginChanged.disposableOn(s))}{const s=()=>{i.autoplay=this._complexImage.autoplay};s(),this.dispose(this._complexImage.autoplayChanged.disposableOn(s))}{const s=()=>{i.loop=this._complexImage.loop};s(),this.dispose(this._complexImage.loopChanged.disposableOn(s))}i.muted=!0,document.body.appendChild(i),this._element=i,this.dispose(()=>document.body.removeChild(i))}get element(){return this._element}};class Qb extends U{constructor(t,n){super();h(this,"_videoDom");h(this,"_processing");this._complexImage=t,this._videoSrc=n,this._videoDom=this.disposeVar(new Zb(this._complexImage,"")),this._processing=this.disposeVar(nr(async i=>{const{videoSrc:s}=this,o=Ph.instance();await i.promise(o.loadedPromise);const a=globalThis.Hls,l=new a,u=this.element;await Eo(i,()=>new Promise((c,d)=>{u.xbsjHLS=l,l.attachMedia(u),l.on(a.Events.MEDIA_ATTACHED,()=>{l.loadSource(s),l.on(a.Events.MANIFEST_PARSED,(f,p)=>{u.play(),c()})}),l.on(a.Events.ERROR,(f,p)=>{const{type:_,details:S,fatal:b}=p;b&&(l.destroy(),d(S))})}))})),this._processing.start()}get videoSrc(){return this._videoSrc}get videoDom(){return this._videoDom}get element(){return this.videoDom.element}get processing(){return this._processing}}class M_ extends U{constructor(t,n){super();h(this,"_videoDom");h(this,"_update");this._complexImage=t,this._imageUri=n,this._videoDom=this.disposeVar(new Qb(this._complexImage,this._imageUri)),this._update=this.disposeVar(Ta(()=>this.update())),this._update.start()}get videoDom(){return this._videoDom}get videoElement(){return this._videoDom.element}update(){if(this.videoElement.readyState<2)return;const t=this._complexImage,{videoWidth:n,videoHeight:i}=this.videoElement;t.size=[n,i],t.pixelFormat="RGBA",t.copyTexture({source:this.videoElement})}}const Ms=class Ms extends U{constructor(){super();h(this,"_loading",!1);h(this,"_loadedEvent",this.disposeVar(new N));h(this,"_loaded",!1);h(this,"_loadedPromiseResolve");h(this,"_loadedPromise",new Promise(t=>{this._loadedPromiseResolve=t}));h(this,"_processing");this._processing=this.disposeVar(nr(async t=>{if(this._loading=!0,globalThis.flvjs)console.info("可能系统已经加载flvjs,此处不再加载!");else{const n=lt.context.getStrFromEnv(Ms.path);await t.promise(Xh(n))}this._loading=!1,this._loaded=!0,this._loadedEvent.emit(),this._loadedPromiseResolve()})),this._processing.start()}get loading(){return this._loading}get loadedEvent(){return this._loadedEvent}get loaded(){return this._loaded}get loadedPromise(){return this._loadedPromise}get processing(){return this._processing}static instance(){return Ms._instance=Ms._instance||new Ms,Ms._instance}};h(Ms,"path","${xr-utils-script-dir}/xr-static/xr-utils/flvjs/1.6.2/flv.min.js"),h(Ms,"_instance");let Ih=Ms;class tP extends U{constructor(t,n){super();h(this,"_element");this._complexImage=t,this._videoSrc=n;var i=document.createElement("video");i.src=this._videoSrc,i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.zIndex="-100",i.style.visibility="hidden";{const s=()=>{i.crossOrigin=this._complexImage.crossOrigin};s(),this.dispose(this._complexImage.crossOriginChanged.disposableOn(s))}{const s=()=>{i.autoplay=this._complexImage.autoplay};s(),this.dispose(this._complexImage.autoplayChanged.disposableOn(s))}{const s=()=>{i.loop=this._complexImage.loop};s(),this.dispose(this._complexImage.loopChanged.disposableOn(s))}i.muted=!0,document.body.appendChild(i),this._element=i,this.dispose(()=>document.body.removeChild(i))}get element(){return this._element}}class eP extends U{constructor(t,n){super();h(this,"_videoDom");h(this,"_processing");this._complexImage=t,this._videoSrc=n,this._videoDom=this.disposeVar(new tP(this._complexImage,"")),this._processing=this.disposeVar(nr(async i=>{const{videoSrc:s}=this,o=Ih.instance();await i.promise(o.loadedPromise);const a=globalThis.flvjs,l=this.element;await Eo(i,()=>new Promise((u,c)=>{if(!a.isSupported()){c("flvjs不支持!");return}var d=a.createPlayer({type:"flv",url:s});d.attachMediaElement(l),d.load(),d.play(),l.xbsjFlvPlayer=d}))})),this._processing.start()}get videoSrc(){return this._videoSrc}get videoDom(){return this._videoDom}get element(){return this.videoDom.element}get processing(){return this._processing}}class R_ extends U{constructor(t,n){super();h(this,"_videoDom");h(this,"_update");this._complexImage=t,this._imageUri=n,this._videoDom=this.disposeVar(new eP(t,this._imageUri)),this._update=this.disposeVar(Ta(()=>this.update())),this._update.start()}get videoDom(){return this._videoDom}get videoElement(){return this._videoDom.element}update(){if(this.videoElement.readyState<2)return;const t=this._complexImage,{videoWidth:n,videoHeight:i}=this.videoElement;t.size=[n,i],t.pixelFormat="RGBA",t.copyTexture({source:this.videoElement})}}function L_(r){const e=r.substring(r.lastIndexOf(".")+1);return Yu.suffixTypes[e]}class Yu extends U{constructor(){super();h(this,"_enabled",this.disposeVar(z(!1)));h(this,"_uri",this.disposeVar(z("")));h(this,"_type",this.disposeVar(z(void 0)));h(this,"_size",this.disposeVar(Xt(void 0)));h(this,"_pixelFormat",this.disposeVar(z("RGBA")));h(this,"_flipY",this.disposeVar(z(!0)));h(this,"_crossOriginReact",this.disposeVar(z("")));h(this,"_autoplayReact",this.disposeVar(z(!0)));h(this,"_loopReact",this.disposeVar(z(!0)));h(this,"_copyTextureEvent",this.disposeVar(new N));h(this,"_imageProcessingResettingEvent",this.disposeVar(Se(this.enabledChanged,this.uriChanged,this.typeChanged)));h(this,"_imageProcessingResetting",this.disposeVar(new Ie(this._imageProcessingResettingEvent,()=>{if(!this.enabled||!this.uri)return;let{type:t}=this;if(t||(t=L_(this.uri)),!!t){if(t==="img")return new Kg(this,this.uri);if(t==="video")return new tm(this,this.uri);if(t==="gif")return new um(this,this.uri);if(t==="hls")return new M_(this,this.uri);if(t==="flv")return new R_(this,this.uri)}})));h(this,"_createNativeTextureEvent",this.disposeVar(Se(this.enabledChanged,this.sizeChanged,this.pixelFormatChanged,this.flipYChanged)))}get enabled(){return this._enabled.value}set enabled(t){this._enabled.value=t}get enabledChanged(){return this._enabled.changed}get uri(){return this._uri.value}set uri(t){this._uri.value=t}get uriChanged(){return this._uri.changed}get type(){return this._type.value}set type(t){this._type.value=t}get typeChanged(){return this._type.changed}get size(){return this._size.value}set size(t){this._size.value=t}get sizeChanged(){return this._size.changed}get pixelFormat(){return this._pixelFormat.value}set pixelFormat(t){this._pixelFormat.value=t}get pixelFormatChanged(){return this._pixelFormat.changed}get flipY(){return this._flipY.value}set flipY(t){this._flipY.value=t}get flipYChanged(){return this._flipY.changed}get crossOrigin(){return this._crossOriginReact.value}set crossOrigin(t){this._crossOriginReact.value=t}get crossOriginChanged(){return this._crossOriginReact.changed}get autoplay(){return this._autoplayReact.value}set autoplay(t){this._autoplayReact.value=t}get autoplayChanged(){return this._autoplayReact.changed}get loop(){return this._loopReact.value}set loop(t){this._loopReact.value=t}get loopChanged(){return this._loopReact.changed}get copyTextureEvent(){return this._copyTextureEvent}copyTexture(t){this._createNativeTextureEvent.flush(),this._copyTextureEvent.emit(t)}get imageProcessingResetting(){return this._imageProcessingResetting}get createNativeTextureEvent(){return this._createNativeTextureEvent}copyFromCanvas(t){if(t.width<=0||t.height<=0){console.warn("canvas.width <= 0 || canvas.height <= 0");return}this.size=[t.width,t.height],this.pixelFormat="RGBA",this.copyTexture({source:t})}}h(Yu,"types",Qg),h(Yu,"czmPixelFormats",Zg),h(Yu,"suffixTypes",{png:"img",jpg:"img",svg:"img",webp:"img",gif:"gif",mp4:"video",mov:"video",webm:"video",flv:"flv",m3u8:"hls"});const nP=[0,0,0,0];class rP{constructor(){h(this,"_value",[]);h(this,"_valueStr","[]");h(this,"_valueChanged");this.value=[{ratio:0,rgba:[0,0,1,1]},{ratio:.2,rgba:[0,1,0,1]},{ratio:.8,rgba:[1,1,0,1]},{ratio:1,rgba:[1,0,0,1]}]}get valueChanged(){return this._valueChanged||(this._valueChanged=new N),this._valueChanged}set value(e){if(e.length===0){console.error("value.length === 0");return}let t;if(this._value.length===e.length){const i=[...e].sort((s,o)=>s.ratio-o.ratio);if(t=JSON.stringify(i),this._valueStr===t)return}t=t||JSON.stringify([...e].sort((i,s)=>i.ratio-s.ratio));const n=this._value;if(this._value=JSON.parse(t),this._value.length===0)throw console.error("this._colorStops.length === 0"),new Error("this._colorStops.length === 0");this._valueChanged&&this._valueChanged.emit(this._value,n)}get value(){return JSON.parse(JSON.stringify(this._value))}get valueStr(){return this._valueStr}get minRatio(){return this._value[0].ratio}get maxRatio(){return this._value[this._value.length-1].ratio}_getRatioIndex(e){if(e<this._value[0].ratio||e>this._value[this._value.length-1].ratio)throw console.error("ratio <= this._colorStops[0].ratio || ratio >= this._colorStops[this._colorStops.length - 1].ratio"),new Error("ratio <= this._colorStops[0].ratio || ratio >= this._colorStops[this._colorStops.length - 1].ratio");let t=this._value.length;for(let n=0;n<t-1;++n)if(e>=this._value[n].ratio&&e<=this._value[n+1].ratio)return n;throw console.error("shoud not be here!"),new Error("shoud not be here!")}getRatioColor(e,t){e=uc(e,this.minRatio,this.maxRatio);const n=this._getRatioIndex(e),i=this._value[n],s=this._value[n+1],o=(e-i.ratio)/(s.ratio-i.ratio);for(let a=0;a<4;++a)t[a]=i.rgba[a]*(1-o)+s.rgba[a]*o;if(t.some(Number.isNaN)){console.error("result NaN");return}return t}getColorsInUint8(e){if(e.length%4!==0)throw console.error("result.length % 4 !== 0"),new Error("result.length % 4 !== 0");const t=e.length/4,n=1/t;for(let i=0;i<t;++i){const s=nP;this.getRatioColor((i+.5)*n,s)||s.splice(0,4,0,0,0,0);for(let o=0;o<4;++o)e[i*4+o]=255*s[o]|0}return e}}class iP extends U{constructor(){super(...arguments);h(this,"registerEngines",{})}register(t,n,i){const s=this.registerEngines[t]||new Map;return s.has(n)&&console.warn(`register warn:${t}中${n}的实现类已经被注册,再次注册会覆盖。`),s.set(n,i),this.registerEngines[t]=s,n}getEngineObjConstructor(t,n){const i=this.registerEngines[n];if(!i)return;let s=t.constructor,o=t.typeName,a=i.get(o);if(a)return a;if(t.components.main)return;const l=o;for(;o!=="ESSceneObject"&&(s=s.getParentClass(),!!s);)if(o=s.type,a=i.get(o),a)return console.warn(`未找到${l}在${n}中对应的实现类! 使用父类${o}的实现类!`),a}createEngineObject(t,n){const i=this.getEngineObjConstructor(t,n.typeName);if(i){const s=new i(t,n);return s.createdEvent.emit(),s}else{const s=new $o(t,n);return s.createdEvent.emit(),s}}}class sP extends U{constructor(){super(...arguments);h(this,"registerEngines",{})}register(t,n,i){const s=this.registerEngines[t]||new Map;s.has(n)&&console.warn(`register warn:${t}中${n}的实现类已经被注册,再次注册会覆盖。`),s.set(n,i),this.registerEngines[t]=s}getEngineObjConstructor(t,n){const s=(this.registerEngines[n]||new Map).get(t);if(s)return s;console.warn(`未找到${t}在${n}中对应的实现类!`)}createEngineObject(t,n){const i=this.getEngineObjConstructor(t.typeName,n.typeName);if(i){const s=new i(t,n);return s.createdEvent.emit(),s}else{const s=new $o(t,n);return s.createdEvent.emit(),s}}}const Yr=class Yr extends U{constructor(t,n,i=!1){super();h(this,"_createdEvent",this.dv(new N));h(this,"_id",++Yr._accumId);this._sceneObject=t,this._viewer=n;{if(i)return;const s=(o,a)=>{for(let l of o)this._viewer.delete(l);for(let l of a)l.parentID=this.sceneObject.id,this._viewer.add(l)};s([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(s)),this.d(()=>s(this._sceneObject.components.values(),[]))}}get createdEvent(){return this._createdEvent}get sceneObject(){return this._sceneObject}get viewer(){return this._viewer}get id(){return this._id}};h(Yr,"context",new iP),h(Yr,"contextEditing",new sP),h(Yr,"register",Yr.context.register.bind(Yr.context)),h(Yr,"registerEditing",Yr.contextEditing.register.bind(Yr.contextEditing)),h(Yr,"_accumId",-1);let $o=Yr;function ue(r,e,t){return{content:[{type:"text",text:JSON.stringify({toolName:r,status:"error",msg:t?"执行失败,"+t:"执行失败",data:e},null,2)}]}}function mi(r,e,t){return{content:[{type:"text",text:JSON.stringify({toolName:r,status:"success",msg:t?"执行成功,"+t:"执行成功",data:e},null,2)}]}}const F_=r=>[{name:"flyTo",params:{description:"相机飞行定位,根据对象id来改变相机视角位置或查询真实地点名称信息来改变相机视角位置",inputSchema:{option:pe.discriminatedUnion("mode",[pe.object({mode:pe.literal("SceneObject").describe("对象定位模式:分析用户提供的名称是否是场景对象的名称"),id:pe.string().describe("场景对象的唯一标识 id")}).describe("分析用户提供的名称是否是场景对象的名称,是则使用 SceneObject 模式并使用该对象属性值id作为参数"),pe.object({mode:pe.literal("RealPlace").describe("真实地点定位模式:用于定位现实世界中的城市、国家或地名"),longitude:pe.number().min(-180).max(180).describe("经度,单位:度,范围 [-180, 180]"),latitude:pe.number().min(-90).max(90).describe("纬度,单位:度,范围 [-90, 90]"),height:pe.number().optional().default(0).describe("高度,单位:米,默认值为 0")}).describe("真实地点定位模式:用于定位现实世界中的城市、国家或地名,而非场景对象的名称,并主动提供经度、纬度和高度信息")]).describe(`相机定位参数规范:
461
+ `,Oa=Date.now(),Dt=class Dt extends k{constructor(e){super(e);a(this,"_flyToEvent",this.disposeVar(new m));a(this,"_resetClockEvent",this.disposeVar(new m));this.ad(x([this,"uri"],[this,"url"]))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new z([this,"url"],"路径",k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/misc/simple.czml"),void 0,!0),new S([this,"clockEnabled"],"启用",!1),new v([this,"multiplier"],"倍速",Dt.defaults.multiplier),new S([this,"autoResetClock"],"自动设置时钟",!0),new vt([this,"startTime"],"开始时间",Dt.defaults.startTime,!0),new vt([this,"stopTime"],"结束时间",Dt.defaults.stopTime,!0),new vt([this,"currentTime"],"当前时间",Dt.defaults.currentTime,!0),new j([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep","SYSTEM_CLOCK_MULTIPLIER"),new j([this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"clockRange","UNBOUNDED"),new S([this,"shouldAnimate"],"是否启用动画",!1)],general:[...e.general,new S([this,"show"],"是否显示",!0),new S([this,"collision"],"开启碰撞",!1),new S([this,"allowPicking"],"允许拾取",!1)],more:[...e.more,new N("飞入",t=>this.flyTo(t),[1e3],"flyTo"),new N("重置时钟",()=>this.resetClock(),[],"resetClock"),new Vt([this,"loadFuncStr"],"loadFnStr",_l,dg,!0)]}}};a(Dt,"createDefaultProps",()=>({show:!0,uri:void 0,url:void 0,allowPicking:!1,autoResetClock:!0,clockEnabled:!1,startTime:Oa,stopTime:Oa+1440*60*1e3,currentTime:Oa,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...k.createDefaultProps()})),a(Dt,"type",Dt.register("ESCzml",Dt,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"}));let Da=Dt;const Vs=class Vs extends k{getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new L,new S([this,"show"],"是否显示"),new v([this,"cssSize"],"尺寸"),new pe([this,"cssPosition"],"位置"),new A([this,"imgUrl"],"图片地址")]}}};a(Vs,"createDefaultProps",()=>({...k.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")})),a(Vs,"type",Vs.register("ESNavigator",Vs,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"}));let Fa=Vs;const Ft=class Ft extends k{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new L("通用"),new S([this,"show"],"是否显示",Ft.defaults.show),new v([this,"height"],"高度",Ft.defaults.height,!0),new v([this,"fontSize"],"文字大小",Ft.defaults.fontSize,!0),new G([this,"bgColor"],"背景颜色",Ft.defaults.bgColor,!0)]}}};a(Ft,"createDefaultProps",()=>({...k.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:F([71/255,71/255,71/255,.8])})),a(Ft,"type",Ft.register("ESViewerStatusBar",Ft,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let xa=Ft;const xt=class xt extends k{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new L("通用"),new S([this,"show"],"是否显示",xt.defaults.show),new v([this,"height"],"高度",xt.defaults.height,!0),new v([this,"fontSize"],"文字大小",xt.defaults.fontSize,!0),new G([this,"bgColor"],"背景颜色",xt.defaults.bgColor,!0)]}}};a(xt,"createDefaultProps",()=>({...k.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:F([71/255,71/255,71/255,.8])})),a(xt,"type",xt.register("ESViewerStatusBarScale",xt,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let ka=xt;const Ls=class Ls extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new A([this,"url"],"路径","",!0),new v([this,"progress"],"进度",0,!1,!0)]}}};a(Ls,"createDefaultProps",()=>({...M.createDefaultProps(),url:"",progress:0})),a(Ls,"type",Ls.register("ESGaussianSplatting",Ls,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"}));let Ma=Ls;class ug extends b{constructor(s,e){if(super(),!e)return;const t=this.ad(new Q);t.stroked=!0,this.ad(s.components.disposableAdd(t)),this.ad(x([t,"points"],[s,"areaLiftingPoints"])),this.ad(t.editingChanged.don(()=>{t.editing||!this.isDestroyed()&&this.destroy()})),t.editing=!0}}var wl=(n=>(n[n.None=0]="None",n[n.Up=1]="Up",n[n.Down=2]="Down",n))(wl||{}),yl=(n=>(n[n.CLICK=0]="CLICK",n[n.MOVE=1]="MOVE",n))(yl||{}),bl=(n=>(n[n.Smooth=0]="Smooth",n[n.Linear=1]="Linear",n[n.Spherical=2]="Spherical",n[n.Tip=3]="Tip",n[n.Hard=4]="Hard",n))(bl||{});const _e=class _e extends M{constructor(e){super(e);a(this,"_startEvent",this.disposeVar(new m));a(this,"_configs",this.disposeVar(ee(void 0)));a(this,"_heights",this.disposeVar(y({})));a(this,"_heightsEvent",this.ad(new m));a(this,"_areaLiftingUpdateEvent",this.disposeVar(new m));const t=this.ad(ae(this.modeChanged,this.startEvent));this.ad(new ce(t,()=>{var i;if(this.areaLiftingPoints=void 0,this.mode=="areaLifting")return new ug(this,this.activeViewer);(i=this.activeViewer)==null||i.startEditing(this,D.BrushErase)}))}updateEditing(){var e;$n(this.position,[0,0,0])||(this.position=[0,0,0]),(e=this.activeViewer)==null||e.startEditing(this,D.Place,{callSource:"inner"})}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get configs(){return this._configs.value}set configs(e){this._configs.value=e}get configsChanged(){return this._configs.changed}getConfig(...e){var t,i;if(typeof e[0]=="number")return(t=this.configs)==null?void 0:t.find(r=>r.x===e[0]&&r.y===e[1]);if(typeof e[0]=="string")return(i=this.configs)==null?void 0:i.find(r=>r.url===e[0])}get heights(){return this._heights.value}set heights(e){this._heights.value=e}get heightsChanged(){return this._heights.changed}get heightsEvent(){return this._heightsEvent}getHeights(){return new Promise((e,t)=>{const i=new b;i.ad(this._heightsEvent.don(o=>{o!=="start"&&(!i.isDestroyed()&&i.destroy(),e(o))})),this._heightsEvent.emit("start");const r=setTimeout(()=>{i.isDestroyed()||(i.destroy(),e(void 0))},2e3);i.ad(()=>clearTimeout(r))})}get areaLiftingUpdateEvent(){return this._areaLiftingUpdateEvent}areaLiftingUpdate(){this._areaLiftingUpdateEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new N("开始编辑",()=>{this.start()},[],"start"),new j([this,"mode"],_e.modes,"编辑模式",_e.defaults.mode)],basic:[...e.basic,new z([this,"url"],"URL"),new z([this,"tileInfo"],"瓦片信息配置"),new v([this,"maxHeight"],"最大高度"),new v([this,"minHeight"],"最小高度"),new v([this,"offset"],"偏移"),new S([this,"autoLoadHeights"],"自动加载高度"),new L("刷写设置"),new v([this,"brushEraseRadius"],"编辑半径"),new pe([this,"brushEraseRadiusRange"],"编辑半径范围",void 0,!0,!0),new j([this,"brushEraseMode"],Object.entries(["CTRL","SHIFT","NONE"]),"刷写模式"),new j([this,"brushErasePickReference"],_e.brushErasePickReferences,"选择参考"),new _t([this,"brushErasePosition"],"刷写位置"),new _t([this,"brushEraseStartPosition"],"刷写起始位置"),new j([this,"brushEraseFalloff"],_e.brushEarseFalloffs,"刷写衰减函数"),new j([this,"brushEraseRayDirection"],[["Up","Up"],["Down","Down"]],"刷写射线方向"),new L("平整设置"),new j([this,"flattenMode"],_e.flattenModes,"平整模式",0),new j([this,"flattenPick"],_e.flattenPicks,"平整选择",0),new v([this,"flattenOffset"],"平整偏移",-.01),new L("区域升降设置"),new re([this,"areaLiftingPoints"],"区域升降位置",[]),new v([this,"areaLiftingOffset"],"区域升降偏移",1),new N("区域升降更新",()=>{this.areaLiftingUpdate()},[],"areaLiftingUpdate"),new L("围栏设置"),new re([this,"fencePoints"],"围栏位置",[])]}}};a(_e,"createDefaultProps",()=>({...M.createDefaultProps(),allowPicking:!0,url:"",maxHeight:0,minHeight:0,offset:.01,tileInfo:W({tileCountX:65,tileCountY:65,tileMaximumLevel:15,tilesPerAxis:5,format:"heights"}),mode:y("sculpt"),autoLoadHeights:!1,brushEraseRadius:100,brushEraseRadiusRange:F([0,100]),brushErasePosition:F([0,0,0]),brushEraseStartPosition:F([0,0,0]),brushEraseMode:y("NONE"),brushErasePickReference:y("NONE"),brushEraseRayDirection:y("Down"),brushEraseFalloff:y(4),flattenMode:y(0),flattenPick:y(1),flattenOffset:-.01,areaLiftingPoints:fi(void 0),areaLiftingOffset:1,fencePoints:fi(void 0),fenceMode:y("in")})),a(_e,"modes",[["雕刻","sculpt"],["抹除","erase"],["平滑","smooth"],["平整","flatten"],["区域升降","areaLifting"]]),a(_e,"brushErasePickReferences",[["无限制","NONE"],["地形图层","ESTerrainLayerEditing"],["3DTiles","ES3DTileset"]]),a(_e,"flattenModes",[["None",0],["Up",1],["Down",2]]),a(_e,"flattenPicks",[["CLICK",0],["MOVE",1]]),a(_e,"brushEarseFalloffs",[["平滑",0],["线性",1],["硬边",4],["球形",2],["尖顶",3]]),a(_e,"invalidValue",-1e4),a(_e,"type",_e.register("ESTerrainLayerEditing",_e,{chsName:"地形图层编辑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于对地形数据进行编辑"})),a(_e,"supportEditingModes",[...M.supportEditingModes,D.Place,D.BrushErase]);let mn=_e;const $e=class $e extends ${constructor(e){super(e);a(this,"editingBindMode","doublePoints");a(this,"_startEvent",this.disposeVar(new m));a(this,"_replayEvent",this.disposeVar(new m));this.ad(this.startEvent.don(()=>{var t;(t=this.activeViewer)==null||t.startEditing(this,D.BrushErase)}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get replayEvent(){return this._replayEvent}replay(){this._replayEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new N("开始编辑",()=>this.start(),[]),new N("重播",()=>this.replay(),[]),new S([this,"showImage"],"显示影像",$e.defaults.showImage),new v([this,"flowSpeed"],"流动速度",$e.defaults.flowSpeed),new v([this,"gravity"],"重力加速度",$e.defaults.gravity),new v([this,"strength"],"泥石流强度",$e.defaults.strength),new v([this,"resistance"],"泥石流阻力(越大越快平息)",$e.defaults.resistance),new v([this,"terrainOffset"],"地形高度偏移",$e.defaults.terrainOffset),new re([this,"slidePoints"],"滑坡点数组",$.defaults.slidePoints,void 0),new L("刷写设置"),new v([this,"brushEraseRadius"],"编辑半径"),new pe([this,"brushEraseRadiusRange"],"编辑半径范围",void 0,!0,!0),new j([this,"brushEraseMode"],Object.entries(["CTRL","SHIFT","NONE"]),"刷写模式"),new j([this,"brushErasePickReference"],mn.brushErasePickReferences,"选择参考"),new _t([this,"brushErasePosition"],"刷写位置"),new _t([this,"brushEraseStartPosition"],"刷写起始位置"),new j([this,"brushEraseFalloff"],mn.brushEarseFalloffs,"刷写衰减函数"),new j([this,"brushEraseRayDirection"],[["Up","Up"],["Down","Down"]],"刷写射线方向")]}}};a($e,"createDefaultProps",()=>({...$.createDefaultProps(),brushEraseRadius:100,brushEraseRadiusRange:F([0,1e3]),brushErasePosition:F([0,0,0]),brushEraseStartPosition:F([0,0,0]),brushEraseMode:y("NONE"),brushErasePickReference:y("NONE"),brushEraseRayDirection:y("Down"),terrainOffset:5,flowSpeed:1,gravity:9.8,slidePoints:F([]),strength:1,showImage:!0,resistance:.98,stroked:!0,strokeStyle:W({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!0})})),a($e,"type",$e.register("ESLandSlide",$e,{chsName:"滑坡泥石流分析",tags:["ESObjects","_ES_Impl_Cesium"],description:"滑坡泥石流分析对象"})),a($e,"supportEditingModes",[...$.supportEditingModes,D.DoublePoints,D.DoublePointsAppend,D.DoublePointsModify,D.BrushErase]);let ja=$e;const Hi=class Hi extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new A([this,"mesh"],"mesh地址",Hi.defaults.mesh)]}}};a(Hi,"createDefaultProps",()=>({...M.createDefaultProps(),mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"})),a(Hi,"type",Hi.register("ESStaticMesh",Hi,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"}));let Ra=Hi;const zs=class zs extends ${constructor(e){super(e);a(this,"_startEvent",this.dv(new m));a(this,"_clearEvent",this.dv(new m));a(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new Si),this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(_([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(_([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(_([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(_([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(_([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(_([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(_([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new N("开始分析",()=>this.start(),[],"start"),new N("清除分析",()=>this.clear(),[],"clear"),new re([this,"windowPositions"],"屏幕坐标",[],void 0,!1,!0),new re([this,"depths"],"深度值",[],void 0,!1,!0),new v([this,"radius"],"半径",1e4,!0)]}}};a(zs,"createDefaultProps",()=>({...$.createDefaultProps(),windowPositions:vo([]),depths:ee([]),radius:y(1e4)})),a(zs,"type",zs.register("ESSkylineAnalysis",zs,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"}));let Aa=zs;const $t=class $t extends Y{constructor(s){super(s)}getESProperties(){const s=super.getESProperties();return{...s,basic:[...s.basic,new re([this,"data"],"数据",[],void 0,!0),new z([this,"gradient"],"渐变",$t.defaults.gradient,void 0,!0),new v([this,"radius"],"半径",$t.defaults.radius,void 0,!0),new v([this,"blur"],"模糊",$t.defaults.blur,!0),new S([this,"is3D"],"is3D",!1,!0)]}}};a($t,"createDefaultProps",()=>({...Y.createDefaultProps(),is3D:y(!1),data:fi([]),gradient:te({".5":"green",".7":"yellow",".95":"red"}),radius:y(10),blur:y(.85)})),a($t,"type",$t.register("ESHeatMap",$t,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"}));let dr=$t;const $i=class $i extends ${constructor(e){super(e);a(this,"editingBindMode","scatter")}};a($i,"createDefaultProps",()=>({...$.createDefaultProps(),pointed:!0})),a($i,"type",$i.register("ESGeoPoints",$i,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:"地图中的可视化地理点集合"})),a($i,"supportEditingModes",[...$.supportEditingModes,D.ScatterAppend,D.ScatterModify]);let vn=$i;const El=async(n,s=[],e)=>{const t=[];for(const i of s){const{coordinates:r}=i.geometry;for(const o of r){const h=await Promise.all(o.map(async c=>{let l=c[2]??0;if(e)if(e.type==="absolute")l=e.height??l;else if(e.type==="relative"){const u=await n.getTerrainHeight([c[0],c[1]])??0;l=(e.height??l)+u}else e.type==="terrain"&&(l=await n.getTerrainHeight([c[0],c[1]])??0);return[c[0],c[1],l]}));t.push({...i,points:h})}}return t},Cl=async(n,s=[],e)=>await Promise.all(s.map(async t=>{var c,l,u,p,g,f,w,E,C;const i=((c=t.geometry)==null?void 0:c.x)??((u=(l=t.geometry)==null?void 0:l.coordinates)==null?void 0:u[0]),r=((p=t.geometry)==null?void 0:p.y)??((f=(g=t.geometry)==null?void 0:g.coordinates)==null?void 0:f[1]);let h=((w=t.geometry)==null?void 0:w.z)??((C=(E=t.geometry)==null?void 0:E.coordinates)==null?void 0:C[2])??0;if(e)if(e.type==="absolute")h=e.height??h;else if(e.type==="relative"){const T=await n.getTerrainHeight([i,r])??0;h=(e.height??h)+T}else e.type==="terrain"&&(h=await n.getTerrainHeight([i,r])??0);return{...t,points:[i,r,h]}})),Sl=async(n,s=[],e)=>{const t=[];return await Promise.all(s.map(async i=>{const{coordinates:r}=i.geometry;await Promise.all(r.map(async o=>{const h=await Promise.all(o.map(async c=>{let l=c[2]??0;if(e)if(e.type==="absolute")l=e.height??l;else if(e.type==="relative"){const u=await n.getTerrainHeight([c[0],c[1]])??0;l=(e.height??l)+u}else e.type==="terrain"&&(l=await n.getTerrainHeight([c[0],c[1]])??0);return[c[0],c[1],l]}));t.push({...i,points:h})}))})),t};function pg(n){const s=X.lineString(n),e=X.length(s),t=X.along(s,e/2);return[t.geometry.coordinates[0],t.geometry.coordinates[1],t.geometry.coordinates[2]||0]}function gg(n,s){const e=X.lineString(n),t=X.length(e),i=Math.floor(t/s),r=[];if(r.push(n[0]),i<1)return[n[0]];for(let o=1;o<i;o+=1){const h=X.along(e,t*(o/i));r.push([h.geometry.coordinates[0],h.geometry.coordinates[1],h.geometry.coordinates[2]||0])}return r}function fg(n){const s=[...n];JSON.stringify(n[0])!==JSON.stringify(n[n.length-1])&&s.push(n[0]);const e=X.polygon([s]),t=X.center(e);return[t.geometry.coordinates[0],t.geometry.coordinates[1],t.geometry.coordinates[2]||0]}function Pl(n,s,e){const t=n.dv(new as);for(const i in e)i!=="type"&&(t[i]=e[i]);t.position=s,n.d(n.components.disposableAdd(t))}function Na(n,s,e,t){let i=t.textTemplate||t.symbol.text||"";const r=/{{(.*?)}}/;for(;r.test(i);){const u=i.match(r);if(u){const p=u[1].trim(),g=e[`${p}`]||"-";i=i.replace(u[0],g)}}let o=t.symbol;const{minVisibleDistance:h,maxVisibleDistance:c}=t;h&&c&&(o={...o,minVisibleDistance:h,maxVisibleDistance:c});const l={...o,text:i};Pl(n,s,l)}function ds(n,s){const e={width:null,height:null,color:null,opacity:null,rotation:null};return s.forEach(t=>{t.type==="size"?t.axis==="width"?e.width=n[t.field]||null:t.axis==="height"&&(e.height=n[t.field]||null):t.type==="color"?e.color=n[t.field]||null:t.type==="opacity"?e.opacity=n[t.field]||null:t.type==="rotation"&&(e.rotation=n[t.field]||null)}),e}function Va(n,s,e){const i={...s.symbol};if(e&&e.length>0){const r=ds(n,e);for(let o in r)i[o]!==void 0&&r[o]!==null&&(i[o]=r[o])}return i}function La(n,s,e){var l,u;const t=s,{uniqueValueInfos:i,field:r,fieldDelimiter:o,defaultSymbol:h}=t;let c={...h};if(Array.isArray(r)){const g=r.map(f=>n[f]??"").join(o);c=((l=i.find(f=>f.value==g))==null?void 0:l.symbol)||h}else c=((u=i.find(p=>p.value==n[r]))==null?void 0:u.symbol)||h;if(e&&e.length>0){const p=ds(n,e);for(let g in p)c[g]!==void 0&&p[g]!==null&&(c[g]=p[g])}return c}function za(n,s,e){const t=s,{classBreakInfos:i,field:r,defaultSymbol:o}=t;let h=o;const c=n[r];if(c===void 0||typeof c!="number")h=o;else{const l=i.find(u=>c<=u.maxValue&&c>=u.minValue);l?h=l.symbol:h=o}if(e&&e.length>0){const l=ds(n,e);for(let u in l)h[u]!==void 0&&l[u]!==null&&(h[u]=l[u])}return h}function mg(n,s){function e(l,u,p,g){const f=H=>H*Math.PI/180,w=H=>H*180/Math.PI,E=f(l),C=f(p),T=f(g-u),R=Math.sin(T)*Math.cos(C),V=Math.cos(E)*Math.sin(C)-Math.sin(E)*Math.cos(C)*Math.cos(T),I=Math.atan2(R,V);return(w(I)+360)%360}function t(l,u,p,g,f){const E=Z=>Z*Math.PI/180,C=Z=>Z*180/Math.PI,T=g/6371e3,R=E(f),V=E(l),I=E(u),H=Math.asin(Math.sin(V)*Math.cos(T)+Math.cos(V)*Math.sin(T)*Math.cos(R)),q=I+Math.atan2(Math.sin(R)*Math.sin(T)*Math.cos(V),Math.cos(T)-Math.sin(V)*Math.sin(H));return{lat:C(H),lng:C(q),alt:p}}function i(l){const u=[];l.length>1&&u.push(e(l[0].lat,l[0].lng,l[1].lat,l[1].lng));for(let p=1;p<l.length-1;p++){const g=e(l[p-1].lat,l[p-1].lng,l[p].lat,l[p].lng),f=e(l[p].lat,l[p].lng,l[p+1].lat,l[p+1].lng);let w=(g+f)/2;Math.abs(g-f)>180&&(w=(w+180)%360),u.push(w)}return l.length>1&&u.push(e(l[l.length-2].lat,l[l.length-2].lng,l[l.length-1].lat,l[l.length-1].lng)),l.length===1&&u.push(0),u}if(!n||n.length<2)throw new Error("至少需要两个点才能生成路径");if(s<=0)throw new Error("宽度必须大于0");const r=s/2,o=i(n),h=[],c=[];for(let l=0;l<n.length;l++){const u=(o[l]+90)%360,p=(o[l]+270)%360,g=n[l].alt!==void 0?n[l].alt:0;h.push(t(n[l].lat,n[l].lng,g,r,u)),c.push(t(n[l].lat,n[l].lng,g,r,p))}return h.concat(c.reverse())}function vg(n,s,e,t){function i(E){return E*(Math.PI/180)}const r=6378137,o=i(n),h=i(s),c=i(e),l=i(t),u=c-o,p=l-h,g=Math.sin(u/2)**2+Math.cos(o)*Math.cos(c)*Math.sin(p/2)**2,f=2*Math.atan2(Math.sqrt(g),Math.sqrt(1-g));return r*f}const Tl=(n,s,e)=>Array.isArray(s)?s.map(r=>n[r]??"").join(e):n[s]??"";function Il(n,s){const t={...s.symbol};return{points:n.map(i=>i.points),symbol:t}}function Ol(n,s){const e=s,{uniqueValueInfos:t,field:i,fieldDelimiter:r,defaultSymbol:o}=e,h=[],c=t.reduce((u,p)=>{const g=p.value.toString();return u[g]={points:[],value:p.value,symbol:p.symbol},u},{});for(let u=0;u<n.length;u++){const p=n[u],g=Tl(p,i,r);if(g!==void 0&&g!==""){const f=c[g.toString()];f?f.points.push(p.points):h.push(p.points)}else h.push(p.points)}const l=[];for(let u in c){const{points:p,symbol:g}=c[u];p.length>0&&l.push({points:p,symbol:g})}return h.length>0&&l.push({points:h,symbol:o}),l}function Dl(n,s){const e=s,{classBreakInfos:t,field:i,defaultSymbol:r}=e,o=[],h=t.map(l=>({...l,points:[]}));for(let l=0;l<n.length;l++){const u=n[l],p=u[i];if(p===void 0||typeof p!="number")o.push(u.points);else{const g=h.findIndex(f=>p<=f.maxValue&&p>=f.minValue);g!==-1?h[g].points.push(u.points):o.push(u.points)}}const c=[];return h.forEach(l=>{l.points.length>0&&c.push({points:l.points,symbol:l.symbol})}),o.length>0&&c.push({points:o,symbol:r}),c}function _g(n,s,e=[]){const i={...s.symbol},r=n.map(o=>{const h=ds(o,e);return{position:o.points,rotation:h.rotation||i.rotation||[0,0,0],scale:i.scale||[1,1,1]}});return{url:i.url,locations:r}}function wg(n,s,e=[]){const t=s,{uniqueValueInfos:i,field:r,fieldDelimiter:o}=t,h=t.defaultSymbol,c=[],l=i.reduce((p,g)=>{const f=g.value.toString();return p[f]={locations:[],value:g.value,symbol:g.symbol},p},{});for(let p=0;p<n.length;p++){const g=n[p],f=Tl(g,r,o);if(f){const w=l[f.toString()];if(w){const E=ds(g,e);w.locations.push({position:g.points,rotation:E.rotation||h.rotation||[0,0,0],scale:h.scale||[1,1,1]})}else c.push({position:g.points,rotation:h.rotation||[0,0,0],scale:h.scale||[1,1,1]})}else c.push({position:g.points,rotation:h.rotation||[0,0,0],scale:h.scale||[1,1,1]})}const u=[];for(let p in l){const{locations:g,symbol:f}=l[p];g.length>0&&u.push({url:f.url,locations:g})}return c.length>0&&u.push({url:h.url,locations:c}),u}function yg(n,s,e=[]){const t=s,{classBreakInfos:i,field:r}=t,o=t.defaultSymbol,h=[],c=i.map(u=>({...u,locations:[]}));for(let u=0;u<n.length;u++){const p=n[u],g=p[r];if(g===void 0||typeof g!="number")h.push({position:p.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]});else{const f=c.findIndex(w=>g<=w.maxValue&&g>=w.minValue);if(f!==-1){const w=ds(p,e);c[f].locations.push({position:p.points,rotation:w.rotation||o.rotation||[0,0,0],scale:c[f].symbol.scale||[1,1,1]})}else h.push({position:p.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]})}}const l=[];return c.forEach(u=>{u.locations.length>0&&l.push({url:u.symbol.url,locations:u.locations})}),h.length>0&&l.push({url:o.url,locations:h}),l}class bg extends b{constructor(e,t,i,r){super();a(this,"labelingInfo");this.sceneObject=e;const o=t;if(r&&ft(o,h=>{this.renderLabel(h,r)}),i)if(i.type==="simple"){const{visualVariables:h}=i;if(i.symbol.type==="simple-point"&&(!h||h.length==0)){console.log("PointLayer:大批量点渲染!");const c=Il(o,i);this._simplePointAllRender(c.points,c.symbol);return}if(i.symbol.type==="ESImageLabel"&&(!h||h.length==0)){console.log("PointLayer:大批量点渲染成图标!");const c=Il(o,i);this._imageAllRender(c.points,c.symbol);return}if(i.symbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!");const{url:c,locations:l}=_g(o,i,h);this._modelAllRender(c,l);return}for(let c=0;c<o.length;c++){const l=Va(o[c],i,h);this.render(o[c],l)}}else if(i.type==="unique-value"){const{visualVariables:h}=i;if(i.uniqueValueInfos.findIndex(p=>p.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!h||h.length==0)){console.log("PointLayer:大批量点渲染!"),Ol(o,i).forEach(({points:g,symbol:f})=>{this._simplePointAllRender(g,f)});return}if(i.uniqueValueInfos.findIndex(p=>p.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!h||h.length==0)){console.log("PointLayer:大批量点渲染成图标!"),Ol(o,i).forEach(({points:g,symbol:f})=>{this._imageAllRender(g,f)});return}if(i.uniqueValueInfos.findIndex(p=>p.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),wg(o,i,h).forEach(({url:g,locations:f})=>{this._modelAllRender(g,f)});return}for(let p=0;p<o.length;p++){const g=La(o[p],i,h);this.render(o[p],g)}}else if(i.type==="class-breaks"){const{visualVariables:h}=i;if(i.classBreakInfos.findIndex(p=>p.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!h||h.length==0)){console.log("PointLayer:大批量点渲染!"),Dl(o,i).forEach(({points:g,symbol:f})=>{this._simplePointAllRender(g,f)});return}if(i.classBreakInfos.findIndex(p=>p.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!h||h.length==0)){console.log("PointLayer:大批量点渲染成图标!"),Dl(o,i).forEach(({points:g,symbol:f})=>{this._imageAllRender(g,f)});return}if(i.classBreakInfos.findIndex(p=>p.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),yg(o,i,h).forEach(({url:g,locations:f})=>{this._modelAllRender(g,f)});return}for(let p=0;p<o.length;p++){const g=za(o[p],i,h);this.render(o[p],g)}}else if(i.type==="heatmap"){const{field:h,fieldValueMax:c,fieldValueMin:l}=i;console.time();const u=o.map(p=>{const{points:g}=p;if(h&&typeof h=="string"){let f=p[h];typeof f=="number"&&(typeof c=="number"&&f>c&&(f=c),typeof l=="number"&&f<l&&(f=l),g[2]=f)}return g});this.renderHeatmap(u,i)}else console.error("PointLayer: renderer type is not supported")}renderLabel(e,t){const{points:i}=e;Na(this.sceneObject,i,e,t)}renderHeatmap(e,t){const{is3D:i,radius:r,blur:o,gradient:h}=t,c=this.dv(new dr);this.d(this.sceneObject.components.disposableAdd(c)),c.is3D=i,c.radius=r,c.blur=o,h&&(c.gradient={...h}),c.data=e}render(e,t){t.type==="simple-point"?this._simplePointRender(e,t):t.type==="ESImageLabel"?this._simpleImageRender(e,t):t.type==="ESGltfModel"?this._simpleModelRender(e,t):t.type==="ESTextLabel"?Pl(this.sceneObject,e.points,t):t.type==="ESParticleSystemPrimitive"?this._simpleParticleRender(e,t):console.error(" PointLayer: symbol type is not supported")}_simplePointRender(e,t){const{points:i}=e,{size:r,color:o,outlineColor:h,outlineWidth:c}=t,l=this.dv(new vn);this.d(this.sceneObject.components.disposableAdd(l)),l.pointed=!0,l.pointOutlineColor=h,l.pointOutlineWidth=c,l.pointSize=r,l.pointColor=o,l.allowPicking=(t==null?void 0:t.allowPicking)??!0,l.extras={selected:!1},l.points=[i]}_simplePointAllRender(e,t){const{size:i,color:r,outlineColor:o,outlineWidth:h}=t,c=this.dv(new vn);this.d(this.sceneObject.components.disposableAdd(c)),c.pointed=!0,c.pointOutlineColor=o,c.pointOutlineWidth=h,c.pointSize=i,c.pointColor=r,c.allowPicking=(t==null?void 0:t.allowPicking)??!0,c.points=[...e]}_simpleImageRender(e,t){const{points:i}=e,{rotation:r,offset:o,size:h,url:c,screenRender:l,anchor:u,renderMode:p,rotationType:g}=t,f=this.dv(new tr),w=this.dv(new as);this.d(this.sceneObject.components.disposableAdd(f)),this.d(this.sceneObject.components.disposableAdd(w)),f.url=c,f.renderMode=p??0,r&&(f.rotation=r),o&&(f.offset=o),f.size=h||[32,32],u&&(f.anchor=u),g&&(f.rotationType=g),f.screenRender=l??!0,f.allowPicking=(t==null?void 0:t.allowPicking)??!0,f.extras={selected:!1},f.position=[...i],f.sizeByContent=!1,w.allowPicking=(t==null?void 0:t.allowPicking)??!0;const E=h?Math.max(...h)+10:Math.max(...f.size)+10;w.sizeByContent=!1,w.screenRender=!0,w.size=[E,E],w.borderRadius=[E,E,E,E],w.padding=[E/2,E/2,E/2,E/2],w.borderWidth=E/10,w.offset=[0,E/10+5],w.text="",w.backgroundColor=[0,0,0,0],w.borderColor=[0,0,0,0]}_imageAllRender(e,t){const i={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:e}}]},r=this.dv(new pn);this.d(this.sceneObject.components.disposableAdd(r));const o=this.dv(new as);this.d(this.sceneObject.components.disposableAdd(o)),r.textDefaultText="";const{offset:h,size:c,url:l,anchor:u}=t;r.imageUrl=l,u&&(r.imageAnchor=u),h&&(r.imageOffset=h),r.imageSize=c||[32,32],r.url=i,r.allowPicking=(t==null?void 0:t.allowPicking)??!0,r.extras={selected:!1},o.allowPicking=!0;const p=c?Math.max(...c)+10:Math.max(...r.imageSize)+10;o.sizeByContent=!1,o.size=[p,p],o.borderRadius=[p,p,p,p],o.padding=[p/2,p/2,p/2,p/2],o.borderWidth=p/10,o.offset=[0,p/10+5],o.text="",o.backgroundColor=[0,0,0,0],o.borderColor=[0,0,0,0]}_simpleModelRender(e,t){const{points:i}=e,{rotation:r,scale:o,url:h}=t,c=this.dv(new yt);this.d(this.sceneObject.components.disposableAdd(c)),c.url=h,r&&(c.rotation=r),o&&(c.scale=o),c.position=[...i]}_modelAllRender(e,t){const i=this.dv(new yt);this.d(this.sceneObject.components.disposableAdd(i)),i.url=e,i.instances=t}_simpleParticleRender(e,t){const{points:i}=e,r=this.dv(new ir);this.d(this.sceneObject.components.disposableAdd(r)),r.position=[...i],Object.keys(t).forEach(o=>{r[o]=t[o]})}}class Eg extends b{constructor(s,e,t,i){super(),this.sceneObject=s;const r=e;if(i&&ft(r,o=>{this.renderLabel(o,i)}),t)if(t.type==="simple"){const{visualVariables:o}=t;ft(r,h=>{const c=Va(h,t,o);this.render(h,c)})}else if(t.type==="unique-value"){const{visualVariables:o}=t;ft(r,h=>{const c=La(h,t,o);this.render(h,c)})}else if(t.type==="class-breaks"){const{visualVariables:o}=t;ft(r,h=>{const c=za(h,t,o);this.render(h,c)})}else console.error("PolyLineLayer: renderer type is not supported")}render(s,e){console.log("PolyLineLayer: render",s,e),e.type==="simple-line"?this._simpleLineRender(s,e):e.type==="ESPolygonFence"?this._esPolygonFenceRender(s,e):e.type==="ESPipeFence"?this._esPipeFenceRender(s,e):e.type==="ESPath"?this._esPathRender(s,e):e.type==="ESlineInterpolationModel"?this._eslineInterpolationModelRender(s,e):e.type==="ESlineWall"?this._eslineWallRender(s,e):console.error("PolyLineLayer: symbol type is not supported")}_simpleLineRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new we);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...t],i.stroked=!0,i.strokeColor=e.color,i.strokeWidth=e.width||1,i.allowPicking=(e==null?void 0:e.allowPicking)??!0,i.extras={selected:!1}}_esPolygonFenceRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new or);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...t],i.height=e.height,i.materialMode=e.materialMode}_esPipeFenceRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new rr);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...t],i.height=e.height,i.width=e.width,i.materialMode=e.materialMode}_esPathRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new ls),r=this.dv(new cs);if(this.d(this.sceneObject.components.disposableAdd(i)),this.d(this.sceneObject.components.disposableAdd(r)),i.points=[...t],i.speed=e.speed,i.strokeColor=e.color,i.materialMode=e.materialMode,i.strokeWidth=e.width||1,e!=null&&e.runModel){const h=e==null?void 0:e.runSpeed,c=e==null?void 0:e.modelSymbol;let l;switch(e==null?void 0:e.runModel){case"ESHuman":l=this.dv(new ze);break;case"ESCar":l=this.dv(new Kn);break;case"ESGltfModel":l=this.dv(new yt)}if(this.d(this.sceneObject.components.disposableAdd(l)),c)for(let p in c)l[p]=c[p];const u=[0];for(var o=0;o<t.length-1;o+=1){const p=t[o],g=t[o+1],f=vg(p[1],p[0],g[1],g[0]);u.push(u[o]+Math.ceil(f/h)*1e3)}i.timeStamps=u,e!=null&&e.runSpeed&&(i.currentPositionChanged.don(p=>{i.currentPosition&&(l.position=i.currentPosition,i.currentRotation&&(l.rotation=i.currentRotation))}),r.startTime=0,r.stopTime=u[u.length-1],r.playing=!0,r.loop=(e==null?void 0:e.runLoop)??!0,r.currentTimeChanged.don(p=>{i.path.currentTime=p}))}}_eslineInterpolationModelRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=(e==null?void 0:e.interpolationDistance)??0;if(!i)return;const r=gg(t,i/1e3),o=this.dv(new yt);this.d(this.sceneObject.components.disposableAdd(o)),o.url=e.url,o.instances=r.map(h=>({position:h,rotation:e.rotation,scale:e.scale}))}_eslineWallRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=e.height??0,r=e.width??0,o=e.extrudedHeight??0,h=t.map(u=>({lng:(u==null?void 0:u[0])??0,lat:(u==null?void 0:u[1])??0,alt:(u==null?void 0:u[2])??0})),c=mg(h,r).map(u=>[(u==null?void 0:u.lng)??0,(u==null?void 0:u.lat)??0,(u==null?void 0:u.alt)??0]),l=this.dv(new Si);this.d(this.sceneObject.components.disposableAdd(l)),l.height=i,l.extrudedHeight=o,l.filled=e.filled??!0,l.fillColor=e.fillColor,l.allowPicking=(e==null?void 0:e.allowPicking)??!0,l.extras={selected:!1},l.points=c}renderLabel(s,e){const{points:t}=s,i=pg(t);Na(this.sceneObject,i,s,e)}}function Fl(n,s){try{JSON.stringify(n[n.length-1])!==JSON.stringify(n[0])&&n.push(n[0]);const e=X.featureCollection(n.map(c=>X.point(c))),t=X.polygon([n]),i={gridType:"point",units:"meters"};return X.interpolate(e,s,i).features.map(c=>c.geometry.coordinates)[0][0].filter(c=>X.booleanPointInPolygon(X.point(c),t))}catch(e){return console.error(e),[]}}class Cg extends b{constructor(s,e,t,i){super(),this.sceneObject=s;const r=e;if(i&&ft(r,o=>{this.renderLabel(o,i)}),t)if(t.type==="simple"){const{visualVariables:o}=t;ft(r,h=>{const c=Va(h,t,o);this.render(h,c)})}else if(t.type==="unique-value"){const{visualVariables:o}=t;ft(r,h=>{const c=La(h,t,o);this.render(h,c)})}else if(t.type==="class-breaks"){const{visualVariables:o}=t;ft(r,h=>{const c=za(h,t,o);this.render(h,c)})}else console.error("PolyLineLayer: renderer type is not supported")}renderLabel(s,e){const{points:t}=s;console.log("PolygonLayer: renderLabel",t);const i=fg(t);Na(this.sceneObject,i,s,e)}render(s,e){e.type==="simple-fill"?this._simplePolygonRender(s,e):e.type==="ESGeoExtrudedPolygon"?this._esGeoExtrudedPolygonRender(s,e):e.type==="PolygonInterpolateESGltfModel"?this._polygonInterpolateESGltfModelRender(s,e):e.type==="PolygonInterpolateESImageLabel"?this._polygonInterpolateESImageLabelRender(s,e):console.error("PolyLineLayer: symbol type is not supported")}_simplePolygonRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{color:i,outline:r,filled:o,ground:h}=e,{width:c,color:l,stroked:u}=r,p=this.dv(new Q);this.d(this.sceneObject.components.disposableAdd(p)),p.stroked=u??!1,p.strokeColor=l??[1,1,1,1],p.strokeWidth=c??1,p.filled=o??!0,p.fillGround=h??!1,p.fillColor=i??[1,1,1,1],p.allowPicking=(e==null?void 0:e.allowPicking)??!0,p.extras={selected:!1},p.points=[...t]}_esGeoExtrudedPolygonRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,extrudedHeight:r,color:o}=e,h=this.dv(new Si);this.d(this.sceneObject.components.disposableAdd(h)),h.height=i,h.extrudedHeight=r,h.filled=!0,h.fillColor=o,h.allowPicking=(e==null?void 0:e.allowPicking)??!0,h.extras={selected:!1},h.points=[...t]}_polygonInterpolateESGltfModelRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:r,url:o,rotation:h,scale:c}=e,l=Fl(t,r??10),u=this.dv(new yt);this.d(this.sceneObject.components.disposableAdd(u)),u.url=o,u.instances=l.map(p=>({position:[...p,i??0],rotation:h??[0,0,0],scale:c??[1,1,1]}))}_polygonInterpolateESImageLabelRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:r,offset:o,size:h,url:c,anchor:l}=e,p={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:[...Fl(t,r??10).map(f=>[...f,i??0])]}}]},g=this.dv(new pn);this.d(this.sceneObject.components.disposableAdd(g)),g.textDefaultText="",g.imageUrl=c,l&&(g.imageAnchor=l),o&&(g.imageOffset=o),h&&(g.imageSize=h),g.url=p}}class Sg extends b{constructor(e,t){super();a(this,"_initEvent",this.dv(new m));const i=this,r=async()=>{try{const h=e.featureProps;if(!h)return;const{heightMode:c,features:l,layerType:u,url:p}=h;let g=[];if(!l&&p){let f=await fetch(p).then(w=>w.json());return f=(f==null?void 0:f.features)??f,u==="polylineVector"?g=await El(t,f,c):u==="polygonVector"?g=await Sl(t,f,c):u==="pointVector"&&(g=await Cl(t,f,c)),g}else u==="polylineVector"?g=await El(t,l,c):u==="polygonVector"?g=await Sl(t,l,c):u==="pointVector"&&(g=await Cl(t,l,c));return g}catch(h){console.error(h);return}},o=this.dv(ae(this._initEvent,e.featurePropsChanged));i.dv(new ce(o,()=>{if(!e.featureProps)return;const h=e.featureProps;let c;return(async()=>{const{layerType:u,renderer:p,labelingInfo:g}=h,f=await r();!f||f.length===0||(u==="pointVector"?c=new bg(e,f,p,g):u==="polylineVector"?c=new Eg(e,f,p,g):u==="polygonVector"&&(c=new Cg(e,f,p,g)),console.log("polygonVectorLayer","createLayer",c))})().catch(console.error),{destroy:()=>{var u;(u=c==null?void 0:c.destroy)==null||u.call(c),c=void 0}}}));{const h=(c,l=1)=>{const u=Fc(c);if(!u)return;const{center:p,radius:g}=u;t.flyTo({distance:g*4,heading:0,pitch:-90,flyDuration:l??1,hDelta:0,pDelta:0},p)};i.d(e.flyToEvent.don(async c=>{const{featureProps:l}=e;if(!l)return;const u=await r();if(!u)return;let p=[];l.layerType==="polylineVector"?p=u.map(g=>g.points).flat():l.layerType==="polygonVector"?p=u.map(g=>g.points).flat():l.layerType==="pointVector"&&(p=u.map(g=>g.points)),p.length!==0&&h(p,c)}))}}init(){this._initEvent.emit()}}const Us=class Us extends Y{constructor(e){super(e);a(this,"featureLayerMap",new Map);const t=this;t.d(t.viewerAttached.don(i=>{if(console.log("ESFeatureLayer","viewerAttached",i.id),t.featureLayerMap.has(i.id))return;const r=new Sg(t,i);r.init(),t.featureLayerMap.set(i.id,r)})),t.d(t.viewerDetached.don(i=>{var r;console.log("ESFeatureLayer","viewerDetached",i.id),t.featureLayerMap.has(i.id)&&((r=t.featureLayerMap.get(i.id))==null||r.destroy(),t.featureLayerMap.delete(i.id))})),t.d(()=>{for(const i of t.featureLayerMap.values())i.destroy();t.featureLayerMap.clear()}),t.d(ue(t.showChanged,()=>{for(const i of t.components.values())Reflect.has(i,"show")&&(i.show=t.show)},{immediate:!0}))}};a(Us,"createDefaultProps",()=>({...Y.createDefaultProps(),featureProps:te(void 0)})),a(Us,"type",Us.register("ESFeatureLayer",Us,{chsName:"矢量图层",tags:["ESObjects"],description:"ESFeatureLayer"}));let Ua=Us;const Pg=[["256",256],["512",512],["1024",1024]],Tg=[["LEFT","LEFT"],["NONE","NONE"],["RIGHT","RIGHT"]],ke=class ke extends Y{constructor(e){super(e);a(this,"_pickFeaturesEvent",this.dv(new m));this.ad(x([this,"czmSplitDirection"],[this,"splitDirection"])),this.ad(x([this,"czmAlpha"],[this,"opacity"]))}get pickFeaturesEvent(){return this._pickFeaturesEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"accessToken"],"令牌",ke.defaults.accessToken),new Je([this,"rectangle"],"矩形范围",ke.defaults.rectangle),new z([this,"url"],"服务地址",ke.defaults.url),new z([this,"style"],"样式配置",ke.defaults.style),new v([this,"zIndex"],"层级序号",ke.defaults.zIndex),new j([this,"tileSize"],Pg,"瓦片大小",256),new ge([this,"maximumLevel"],1,[1,24],"最大层级",ke.defaults.maximumLevel),new ge([this,"minimumLevel"],1,[0,24],"最小层级",ke.defaults.minimumLevel),new j([this,"scheme"],[["tms","tms"],["xyz","xyz"]],"影像切片规则",ke.defaults.scheme),new j([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考"),new A([this,"targetID"],"targetID")],more:[...e.more,new L("通用"),new j([this,"splitDirection"],Tg,"splitDirection","NONE"),new L("czm"),new v([this,"czmAlpha"],"透明度"),new v([this,"czmBrightness"],"亮度"),new v([this,"czmContrast"],"对比度"),new v([this,"czmHue"],"色相"),new v([this,"czmSaturation"],"饱和度"),new v([this,"czmGamma"],"伽马值")]}}};a(ke,"createDefaultProps",()=>({...Y.createDefaultProps(),rectangle:te([-180,-90,180,90]),url:W(""),zIndex:0,accessToken:"",tileSize:256,maximumLevel:18,minimumLevel:0,style:ee([]),scheme:y("xyz"),czmSplitDirection:"NONE",heightReference:"NONE",czmAlpha:1,opacity:1,splitDirection:"NONE",targetID:"",czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1})),a(ke,"type",ke.register("ESMVTLayer",ke,{chsName:"矢量瓦片图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"用于加载矢量瓦片图层。"}));let Wa=ke;const kt=class kt extends M{constructor(s){super(s)}getESProperties(){return{...{...super.getESProperties()},basic:[new v([this,"radius"],"半径",kt.defaults.radius),new v([this,"height"],"高度",kt.defaults.height),new G([this,"color"],"颜色",kt.defaults.color),new z([this,"materialParams"],"材质参数",kt.defaults.materialParams)]}}};a(kt,"createDefaultProps",()=>({...M.createDefaultProps(),radius:2,height:10,color:F([.204,.596,.859,1]),materialParams:W({ringSpeed:1,ringColor:[1,1,1,1],ringWidth:.03,sides:10,ringRatio:1,ringRepeat:1,ringBottomMove:!1})})),a(kt,"type",kt.register("ESCylinder",kt,{chsName:"圆柱",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"圆柱体"}));let Pi=kt;const ut=class ut extends dn{constructor(s){super(s)}getESProperties(){const s=super.getESProperties();return{...s,dataSource:[...s.dataSource,new j([this,"videoStreamType"],ut.videoStreamTypes,"数据源类型",ut.defaults.videoStreamType),new S([this,"looping"],"循环播放",ut.defaults.looping),new S([this,"play"],"播放状态",ut.defaults.play)]}}};a(ut,"createDefaultProps",()=>({...dn.createDefaultProps(),videoStreamType:"video",looping:!0,play:!0})),a(ut,"type",ut.register("ESMediaLayer",ut,{chsName:"媒体图层",tags:["ESObjects","_ES_Impl_Cesium"],description:"用于添加数据源为图片或者视频的图层"})),a(ut,"videoStreamTypes",[["video","video"],["hls","hls"],["flv","flv"],["img","img"]]);let Ba=ut;const Mt=class Mt extends Y{constructor(e){super(e);a(this,"_getRepairPolygonEvent",this.disposeVar(new m));a(this,"_getIndicesEvent",this.disposeVar(new m));a(this,"_startEvent",this.disposeVar(new m))}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"general",basic:[new z([this,"urls"],"URL",Mt.defaults.urls),new j([this,"mode"],Mt.modes,"模式",Mt.defaults.mode),new N("开始编辑",()=>this.start(),[])]}}get getRepairPolygonEvent(){return this._getRepairPolygonEvent}getRepairPolygon(){return new Promise((e,t)=>{const i=new b;i.ad(this._getRepairPolygonEvent.don(o=>{o!="get"&&e(o)})),this.getRepairPolygonEvent.emit("get");const r=setTimeout(()=>{i.isDestroyed()||(i.destroy(),e(void 0))},2e3);i.ad(()=>clearTimeout(r))})}get getIndicesEvent(){return this._getIndicesEvent}getIndices(){return new Promise((e,t)=>{const i=new b;i.ad(this._getIndicesEvent.don(o=>{o!="get"&&e(o)})),this.getIndicesEvent.emit("get");const r=setTimeout(()=>{i.isDestroyed()||(i.destroy(),e(void 0))},2e3);i.ad(()=>clearTimeout(r))})}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}};a(Mt,"createDefaultProps",()=>({...Y.createDefaultProps(),urls:ee([]),mode:"repair",allowPicking:!0})),a(Mt,"type",Mt.register("ESGltfModelEditing",Mt,{chsName:"GLTF模型编辑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载GLTF模型的 ES 对象"})),a(Mt,"modes",[["删除","delete"],["修复","repair"]]);let Ha=Mt;const di=class di extends ze{constructor(e){super(e);a(this,"humans",[]);a(this,"humansOffset",new Map);this.ad(this.clear.bind(this)),this.updateHumans();const t=this.ad(ae(this.instancesCountChanged,this.radiusChanged));this.ad(t.don(this.updateHumans.bind(this)))}getESProperties(){const e=super.getESProperties();return{...e,basic:[...e.basic,new v([this,"instancesCount"],"实例数量",1,di.defaults.instancesCount),new v([this,"radius"],"半径",1,di.defaults.radius)]}}updateHumans(){for(this.clear();this.humans.length+1<this.instancesCount;){const e=new ze;this.humansOffset.set(e.id,[Math.random()*this.radius,Math.random()*this.radius,0]),this.humans.push(e),this.components.add(e),e.d(_([e,"show"],[this,"show"])),e.d(_([e,"allowPicking"],[this,"allowPicking"])),e.d(_([e,"scale"],[this,"scale"])),e.d(_([e,"collision"],[this,"collision"])),e.d(x([e,"flyInParam"],[this,"flyInParam"])),e.d(x([e,"flyToParam"],[this,"flyToParam"])),e.d(_([e,"animation"],[this,"animation"])),e.d(_([e,"mode"],[this,"mode"])),e.d(_([e,"minVisibleDistance"],[this,"minVisibleDistance"])),e.d(_([e,"maxVisibleDistance"],[this,"maxVisibleDistance"])),e.d(ue([this.positionChanged],()=>{const t=go(this.position,this.humansOffset.get(e.id)??[0,0,0]);t&&(e.position=t)},{immediate:!0})),e.d(x([e,"rotation"],[this,"rotation"])),e.d(this.flyInEvent.don(t=>{e.flyIn(t)})),e.d(this.flyToEvent.don(t=>{e.flyTo(t)})),e.d(this.calcFlyToParamEvent.don(()=>{e.calcFlyToParam()})),e.d(this.calcFlyInParamEvent.don(()=>{e.calcFlyInParam()})),e.d(this.smoothMoveEvent.don((t,i)=>{e.smoothMove(t,i)})),e.d(this.smoothMoveWithRotationEvent.don((t,i,r)=>{e.smoothMoveWithRotation(t,i,r)})),e.d(this.smoothMoveOnGroundEvent.don((t,i,r,o)=>{e.smoothMoveOnGround(t,i,r,o)})),e.d(this.smoothMoveWithRotationOnGroundEvent.don((t,i,r,o,h)=>{e.smoothMoveWithRotationOnGround(t,i,r,o,h)})),e.d(this.automaticLandingEvent.don(()=>{e.automaticLanding()})),e.d(e.readyEvent.don(t=>{this.readyEvent.emit(t)}))}}clear(){this.humans.forEach(e=>{this.components.delete(e)}),this.humans=[],this.humansOffset.clear()}};a(di,"createDefaultProps",()=>({...ze.createDefaultProps(),instancesCount:1,radius:1})),a(di,"type",di.register("ESHumans",di,{chsName:"人员(批量)",tags:["ESObjects"],description:"批量创建ESHumans对象"}));let $a=di;const Gi=class Gi extends we{constructor(e){super(e);a(this,"_line",this.ad(new we));a(this,"_arrowPolygon",this.ad(new Q));this.ad(this.components.disposableAdd(this.line,!0)),this.line.show=!1,this.ad(this.components.disposableAdd(this.arrowPolygon));const{line:t,arrowPolygon:i}=this;this.ad(x([t,"points"],[this,"points"])),this.ad(ue([this.pointsChanged,this.modeChanged],()=>{this.updateArrowPolygon()},{immediate:!0})),this.ad(_([i,"show"],[this,"show"])),this.ad(_([i,"collision"],[this,"collision"])),this.ad(_([i,"allowPicking"],[this,"allowPicking"])),this.ad(_([i,"filled"],[this,"filled"])),this.ad(_([i,"fillGround"],[this,"fillGround"])),this.ad(_([i,"fillColor"],[this,"fillColor"])),this.ad(_([i,"fillMaterial"],[this,"fillMaterial"])),this.ad(_([i,"fillMaterialParams"],[this,"fillMaterialParams"])),this.ad(_([i,"stroked"],[this,"stroked"])),this.ad(_([i,"strokeGround"],[this,"strokeGround"])),this.ad(_([i,"strokeColor"],[this,"strokeColor"])),this.ad(_([i,"strokeMaterial"],[this,"strokeMaterial"])),this.ad(_([i,"strokeMaterialParams"],[this,"strokeMaterialParams"])),this.ad(_([i,"strokeWidth"],[this,"strokeWidth"])),this.ad(_([i,"strokeWidthType"],[this,"strokeWidthType"])),this.ad(_([i,"classificationType"],[this,"classificationType"]))}get line(){return this._line}get arrowPolygon(){return this._arrowPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new j([this,"mode"],ao,"箭头模式",Gi.defaults.mode)]}}updateArrowPolygon(){const e=this.points;if(!e||e.length<3){this._arrowPolygon.points=[];return}let t=yo(e,this.mode,!0);t&&t.length>=3?this._arrowPolygon.points=[...t,t[0]]:this._arrowPolygon.points=[]}};a(Gi,"createDefaultProps",()=>({...we.createDefaultProps(),mode:"straightArrow",stroked:!1,filled:!0,fillStyle:W({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),a(Gi,"type",Gi.register("ESAttackArrow",Gi,{chsName:"进攻箭头",tags:["ESObjects","_ES_Impl_Cesium"],description:"进攻箭头,军事标绘箭头类,支持直箭头和燕尾箭头"}));let Ga=Gi;const Ji=class Ji extends yt{constructor(e){super(e);a(this,"esCylinder",this.dv(new Pi));const t=this.esCylinder;t.color=[1,1,1,0],this.ad(this.components.disposableAdd(this.esCylinder)),this.ad(_([t,"show"],[this,"show"])),this.ad(_([t,"collision"],[this,"collision"])),this.ad(_([t,"allowPicking"],[this,"allowPicking"])),this.ad(_([t,"position"],[this,"position"])),this.ad(_([t,"radius"],[this,"esCylinderRadius"])),this.ad(_([t,"height"],[this,"esCylinderHeight"])),this.ad(_([t,"materialParams"],[this,"esCylinderMaterialParams"])),this.ad(ue(this.esCylinderRotationChanged,()=>{const i=this.esCylinderRotation;t.rotation=[i[0],i[1]-180,i[2]]},{immediate:!0}))}getESProperties(){const e=super.getESProperties();return{...e,basic:[...e.basic,new rn([this,"esCylinderRotation"],"波动方向",Ji.defaults.esCylinderRotation),new v([this,"esCylinderRadius"],"半径",Pi.defaults.esCylinderRadius),new v([this,"esCylinderHeight"],"高度",Pi.defaults.esCylinderHeight),new z([this,"esCylinderMaterialParams"],"材质参数",Pi.defaults.esCylinderMaterialParams)]}}};a(Ji,"createDefaultProps",()=>({...yt.createDefaultProps(),url:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/CesiumDrone.glb"),esCylinderRotation:F([0,0,0]),esCylinderRadius:2,esCylinderHeight:10,esCylinderMaterialParams:W({ringSpeed:1,ringColor:[1,1,0,1],ringWidth:.03,sides:10,ringRatio:1,ringRepeat:10,ringBottomMove:!0})})),a(Ji,"type",Ji.register("ESSignalInterference",Ji,{chsName:"信号干扰",tags:["ESObjects"],description:"信号干扰"}));let Ja=Ji;const Gt=class Gt extends b{constructor(){super();a(this,"_loading",!1);a(this,"_loadedEvent",this.disposeVar(new m));a(this,"_loaded",!1);a(this,"_loadedPromiseResolve");a(this,"_loadedPromise",new Promise(e=>{this._loadedPromiseResolve=e}));a(this,"_processing");this._processing=this.disposeVar(Ne(async e=>{if(this._loading=!0,globalThis.Hls)console.info("可能系统已经加载hlsjs,此处不再加载!");else{const t=k.context.getStrFromEnv(Gt.path);await e.promise(Rr(t))}this._loading=!1,this._loaded=!0,this._loadedEvent.emit(),this._loadedPromiseResolve()})),this._processing.start()}get loading(){return this._loading}get loadedEvent(){return this._loadedEvent}get loaded(){return this._loaded}get loadedPromise(){return this._loadedPromise}get processing(){return this._processing}static instance(){return Gt._instance=Gt._instance||new Gt,Gt._instance}};a(Gt,"path","${xr-utils-script-dir}/xr-static/xr-utils/hlsjs/1.4.12/hls.min.js"),a(Gt,"_instance");let ur=Gt,Ig=class extends b{constructor(e,t){super();a(this,"_element");this._complexImage=e,this._videoSrc=t;var i=document.createElement("video");i.src=this._videoSrc,i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.zIndex="-100",i.style.visibility="hidden";{const r=()=>{i.crossOrigin=this._complexImage.crossOrigin};r(),this.dispose(this._complexImage.crossOriginChanged.disposableOn(r))}{const r=()=>{i.autoplay=this._complexImage.autoplay};r(),this.dispose(this._complexImage.autoplayChanged.disposableOn(r))}{const r=()=>{i.loop=this._complexImage.loop};r(),this.dispose(this._complexImage.loopChanged.disposableOn(r))}i.muted=!0,document.body.appendChild(i),this._element=i,this.dispose(()=>document.body.removeChild(i))}get element(){return this._element}};class Og extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_processing");this._complexImage=e,this._videoSrc=t,this._videoDom=this.disposeVar(new Ig(this._complexImage,"")),this._processing=this.disposeVar(Ne(async i=>{const{videoSrc:r}=this,o=ur.instance();await i.promise(o.loadedPromise);const h=globalThis.Hls,c=new h,l=this.element;await vi(i,()=>new Promise((u,p)=>{l.xbsjHLS=c,c.attachMedia(l),c.on(h.Events.MEDIA_ATTACHED,()=>{c.loadSource(r),c.on(h.Events.MANIFEST_PARSED,(g,f)=>{l.play(),u()})}),c.on(h.Events.ERROR,(g,f)=>{const{type:w,details:E,fatal:C}=f;C&&(c.destroy(),p(E))})}))})),this._processing.start()}get videoSrc(){return this._videoSrc}get videoDom(){return this._videoDom}get element(){return this.videoDom.element}get processing(){return this._processing}}class xl extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_update");this._complexImage=e,this._imageUri=t,this._videoDom=this.disposeVar(new Og(this._complexImage,this._imageUri)),this._update=this.disposeVar(ss(()=>this.update())),this._update.start()}get videoDom(){return this._videoDom}get videoElement(){return this._videoDom.element}update(){if(this.videoElement.readyState<2)return;const e=this._complexImage,{videoWidth:t,videoHeight:i}=this.videoElement;e.size=[t,i],e.pixelFormat="RGBA",e.copyTexture({source:this.videoElement})}}const Jt=class Jt extends b{constructor(){super();a(this,"_loading",!1);a(this,"_loadedEvent",this.disposeVar(new m));a(this,"_loaded",!1);a(this,"_loadedPromiseResolve");a(this,"_loadedPromise",new Promise(e=>{this._loadedPromiseResolve=e}));a(this,"_processing");this._processing=this.disposeVar(Ne(async e=>{if(this._loading=!0,globalThis.flvjs)console.info("可能系统已经加载flvjs,此处不再加载!");else{const t=k.context.getStrFromEnv(Jt.path);await e.promise(Rr(t))}this._loading=!1,this._loaded=!0,this._loadedEvent.emit(),this._loadedPromiseResolve()})),this._processing.start()}get loading(){return this._loading}get loadedEvent(){return this._loadedEvent}get loaded(){return this._loaded}get loadedPromise(){return this._loadedPromise}get processing(){return this._processing}static instance(){return Jt._instance=Jt._instance||new Jt,Jt._instance}};a(Jt,"path","${xr-utils-script-dir}/xr-static/xr-utils/flvjs/1.6.2/flv.min.js"),a(Jt,"_instance");let pr=Jt;class Dg extends b{constructor(e,t){super();a(this,"_element");this._complexImage=e,this._videoSrc=t;var i=document.createElement("video");i.src=this._videoSrc,i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.zIndex="-100",i.style.visibility="hidden";{const r=()=>{i.crossOrigin=this._complexImage.crossOrigin};r(),this.dispose(this._complexImage.crossOriginChanged.disposableOn(r))}{const r=()=>{i.autoplay=this._complexImage.autoplay};r(),this.dispose(this._complexImage.autoplayChanged.disposableOn(r))}{const r=()=>{i.loop=this._complexImage.loop};r(),this.dispose(this._complexImage.loopChanged.disposableOn(r))}i.muted=!0,document.body.appendChild(i),this._element=i,this.dispose(()=>document.body.removeChild(i))}get element(){return this._element}}class Fg extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_processing");this._complexImage=e,this._videoSrc=t,this._videoDom=this.disposeVar(new Dg(this._complexImage,"")),this._processing=this.disposeVar(Ne(async i=>{const{videoSrc:r}=this,o=pr.instance();await i.promise(o.loadedPromise);const h=globalThis.flvjs,c=this.element;await vi(i,()=>new Promise((l,u)=>{if(!h.isSupported()){u("flvjs不支持!");return}var p=h.createPlayer({type:"flv",url:r});p.attachMediaElement(c),p.load(),p.play(),c.xbsjFlvPlayer=p}))})),this._processing.start()}get videoSrc(){return this._videoSrc}get videoDom(){return this._videoDom}get element(){return this.videoDom.element}get processing(){return this._processing}}class kl extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_update");this._complexImage=e,this._imageUri=t,this._videoDom=this.disposeVar(new Fg(e,this._imageUri)),this._update=this.disposeVar(ss(()=>this.update())),this._update.start()}get videoDom(){return this._videoDom}get videoElement(){return this._videoDom.element}update(){if(this.videoElement.readyState<2)return;const e=this._complexImage,{videoWidth:t,videoHeight:i}=this.videoElement;e.size=[t,i],e.pixelFormat="RGBA",e.copyTexture({source:this.videoElement})}}function Ml(n){const s=n.substring(n.lastIndexOf(".")+1);return _n.suffixTypes[s]}class _n extends b{constructor(){super();a(this,"_enabled",this.disposeVar(y(!1)));a(this,"_uri",this.disposeVar(y("")));a(this,"_type",this.disposeVar(y(void 0)));a(this,"_size",this.disposeVar(ee(void 0)));a(this,"_pixelFormat",this.disposeVar(y("RGBA")));a(this,"_flipY",this.disposeVar(y(!0)));a(this,"_crossOriginReact",this.disposeVar(y("")));a(this,"_autoplayReact",this.disposeVar(y(!0)));a(this,"_loopReact",this.disposeVar(y(!0)));a(this,"_copyTextureEvent",this.disposeVar(new m));a(this,"_imageProcessingResettingEvent",this.disposeVar(ae(this.enabledChanged,this.uriChanged,this.typeChanged)));a(this,"_imageProcessingResetting",this.disposeVar(new ce(this._imageProcessingResettingEvent,()=>{if(!this.enabled||!this.uri)return;let{type:e}=this;if(e||(e=Ml(this.uri)),!!e){if(e==="img")return new qh(this,this.uri);if(e==="video")return new Kh(this,this.uri);if(e==="gif")return new oc(this,this.uri);if(e==="hls")return new xl(this,this.uri);if(e==="flv")return new kl(this,this.uri)}})));a(this,"_createNativeTextureEvent",this.disposeVar(ae(this.enabledChanged,this.sizeChanged,this.pixelFormatChanged,this.flipYChanged)))}get enabled(){return this._enabled.value}set enabled(e){this._enabled.value=e}get enabledChanged(){return this._enabled.changed}get uri(){return this._uri.value}set uri(e){this._uri.value=e}get uriChanged(){return this._uri.changed}get type(){return this._type.value}set type(e){this._type.value=e}get typeChanged(){return this._type.changed}get size(){return this._size.value}set size(e){this._size.value=e}get sizeChanged(){return this._size.changed}get pixelFormat(){return this._pixelFormat.value}set pixelFormat(e){this._pixelFormat.value=e}get pixelFormatChanged(){return this._pixelFormat.changed}get flipY(){return this._flipY.value}set flipY(e){this._flipY.value=e}get flipYChanged(){return this._flipY.changed}get crossOrigin(){return this._crossOriginReact.value}set crossOrigin(e){this._crossOriginReact.value=e}get crossOriginChanged(){return this._crossOriginReact.changed}get autoplay(){return this._autoplayReact.value}set autoplay(e){this._autoplayReact.value=e}get autoplayChanged(){return this._autoplayReact.changed}get loop(){return this._loopReact.value}set loop(e){this._loopReact.value=e}get loopChanged(){return this._loopReact.changed}get copyTextureEvent(){return this._copyTextureEvent}copyTexture(e){this._createNativeTextureEvent.flush(),this._copyTextureEvent.emit(e)}get imageProcessingResetting(){return this._imageProcessingResetting}get createNativeTextureEvent(){return this._createNativeTextureEvent}copyFromCanvas(e){if(e.width<=0||e.height<=0){console.warn("canvas.width <= 0 || canvas.height <= 0");return}this.size=[e.width,e.height],this.pixelFormat="RGBA",this.copyTexture({source:e})}}a(_n,"types",Yh),a(_n,"czmPixelFormats",Xh),a(_n,"suffixTypes",{png:"img",jpg:"img",svg:"img",webp:"img",gif:"gif",mp4:"video",mov:"video",webm:"video",flv:"flv",m3u8:"hls"});const xg=[0,0,0,0];class kg{constructor(){a(this,"_value",[]);a(this,"_valueStr","[]");a(this,"_valueChanged");this.value=[{ratio:0,rgba:[0,0,1,1]},{ratio:.2,rgba:[0,1,0,1]},{ratio:.8,rgba:[1,1,0,1]},{ratio:1,rgba:[1,0,0,1]}]}get valueChanged(){return this._valueChanged||(this._valueChanged=new m),this._valueChanged}set value(s){if(s.length===0){console.error("value.length === 0");return}let e;if(this._value.length===s.length){const i=[...s].sort((r,o)=>r.ratio-o.ratio);if(e=JSON.stringify(i),this._valueStr===e)return}e=e||JSON.stringify([...s].sort((i,r)=>i.ratio-r.ratio));const t=this._value;if(this._value=JSON.parse(e),this._value.length===0)throw console.error("this._colorStops.length === 0"),new Error("this._colorStops.length === 0");this._valueChanged&&this._valueChanged.emit(this._value,t)}get value(){return JSON.parse(JSON.stringify(this._value))}get valueStr(){return this._valueStr}get minRatio(){return this._value[0].ratio}get maxRatio(){return this._value[this._value.length-1].ratio}_getRatioIndex(s){if(s<this._value[0].ratio||s>this._value[this._value.length-1].ratio)throw console.error("ratio <= this._colorStops[0].ratio || ratio >= this._colorStops[this._colorStops.length - 1].ratio"),new Error("ratio <= this._colorStops[0].ratio || ratio >= this._colorStops[this._colorStops.length - 1].ratio");let e=this._value.length;for(let t=0;t<e-1;++t)if(s>=this._value[t].ratio&&s<=this._value[t+1].ratio)return t;throw console.error("shoud not be here!"),new Error("shoud not be here!")}getRatioColor(s,e){s=kn(s,this.minRatio,this.maxRatio);const t=this._getRatioIndex(s),i=this._value[t],r=this._value[t+1],o=(s-i.ratio)/(r.ratio-i.ratio);for(let h=0;h<4;++h)e[h]=i.rgba[h]*(1-o)+r.rgba[h]*o;if(e.some(Number.isNaN)){console.error("result NaN");return}return e}getColorsInUint8(s){if(s.length%4!==0)throw console.error("result.length % 4 !== 0"),new Error("result.length % 4 !== 0");const e=s.length/4,t=1/e;for(let i=0;i<e;++i){const r=xg;this.getRatioColor((i+.5)*t,r)||r.splice(0,4,0,0,0,0);for(let o=0;o<4;++o)s[i*4+o]=255*r[o]|0}return s}}class Mg extends b{constructor(){super(...arguments);a(this,"registerEngines",{})}register(e,t,i){const r=this.registerEngines[e]||new Map;return r.has(t)&&console.warn(`register warn:${e}中${t}的实现类已经被注册,再次注册会覆盖。`),r.set(t,i),this.registerEngines[e]=r,t}getEngineObjConstructor(e,t){const i=this.registerEngines[t];if(!i)return;let r=e.constructor,o=e.typeName,h=i.get(o);if(h)return h;if(e.components.main)return;const c=o;for(;o!=="ESSceneObject"&&(r=r.getParentClass(),!!r);)if(o=r.type,h=i.get(o),h)return console.warn(`未找到${c}在${t}中对应的实现类! 使用父类${o}的实现类!`),h}createEngineObject(e,t){const i=this.getEngineObjConstructor(e,t.typeName);if(i){const r=new i(e,t);return r.createdEvent.emit(),r}else{const r=new Ti(e,t);return r.createdEvent.emit(),r}}}class jg extends b{constructor(){super(...arguments);a(this,"registerEngines",{})}register(e,t,i){const r=this.registerEngines[e]||new Map;r.has(t)&&console.warn(`register warn:${e}中${t}的实现类已经被注册,再次注册会覆盖。`),r.set(t,i),this.registerEngines[e]=r}getEngineObjConstructor(e,t){const r=(this.registerEngines[t]||new Map).get(e);if(r)return r;console.warn(`未找到${e}在${t}中对应的实现类!`)}createEngineObject(e,t){const i=this.getEngineObjConstructor(e.typeName,t.typeName);if(i){const r=new i(e,t);return r.createdEvent.emit(),r}else{const r=new Ti(e,t);return r.createdEvent.emit(),r}}}const Qe=class Qe extends b{constructor(e,t,i=!1){super();a(this,"_createdEvent",this.dv(new m));a(this,"_id",++Qe._accumId);this._sceneObject=e,this._viewer=t;{if(i)return;const r=(o,h)=>{for(let c of o)this._viewer.delete(c);for(let c of h)c.parentID=this.sceneObject.id,this._viewer.add(c)};r([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(r)),this.d(()=>r(this._sceneObject.components.values(),[]))}}get createdEvent(){return this._createdEvent}get sceneObject(){return this._sceneObject}get viewer(){return this._viewer}get id(){return this._id}};a(Qe,"context",new Mg),a(Qe,"contextEditing",new jg),a(Qe,"register",Qe.context.register.bind(Qe.context)),a(Qe,"registerEditing",Qe.contextEditing.register.bind(Qe.contextEditing)),a(Qe,"_accumId",-1);let Ti=Qe;function ie(n,s,e){return{content:[{type:"text",text:JSON.stringify({toolName:n,status:"error",msg:e?"执行失败,"+e:"执行失败",data:s},null,2)}]}}function st(n,s,e){return{content:[{type:"text",text:JSON.stringify({toolName:n,status:"success",msg:e?"执行成功,"+e:"执行成功",data:s},null,2)}]}}const jl=n=>[{name:"flyTo",params:{description:"相机飞行定位,根据对象id来改变相机视角位置或查询真实地点名称信息来改变相机视角位置",inputSchema:{option:ne.discriminatedUnion("mode",[ne.object({mode:ne.literal("SceneObject").describe("对象定位模式:分析用户提供的名称是否是场景对象的名称"),id:ne.string().describe("场景对象的唯一标识 id")}).describe("分析用户提供的名称是否是场景对象的名称,是则使用 SceneObject 模式并使用该对象属性值id作为参数"),ne.object({mode:ne.literal("RealPlace").describe("真实地点定位模式:用于定位现实世界中的城市、国家或地名"),longitude:ne.number().min(-180).max(180).describe("经度,单位:度,范围 [-180, 180]"),latitude:ne.number().min(-90).max(90).describe("纬度,单位:度,范围 [-90, 90]"),height:ne.number().optional().default(0).describe("高度,单位:米,默认值为 0")}).describe("真实地点定位模式:用于定位现实世界中的城市、国家或地名,而非场景对象的名称,并主动提供经度、纬度和高度信息")]).describe(`相机定位参数规范:
466
462
  1. 分析用户提供的名称是否是场景对象的名称(通过名称对比所有对象的name属性,确定用户所指的是场景对象);
467
463
  2. 若找到对象,则使用 SceneObject 模式并使用该对象属性值id作为参数;
468
464
  3. 若未找到对象,则使用 RealPlace 模式,提供目标地点的经度、纬度和高度信息;
469
- 4. 当用户输入包含“定位 / 飞到 / 去 / 看看 / 在哪”等目的地指向性语义时,可以调用这个工具。`)}},func:async({option:e})=>{var t;try{if(console.log("flyTo________________________",e),Reflect.has(e,"id")){const n=e.id,i=r.getSceneObjectById(n);return i?(console.log("flyToSceneObjectById",i),Reflect.has(i,"flyTo")?(await i.flyTo(),mi("flyToSceneObjectById",null,"对象定位成功")):ue("flyToSceneObjectById",null,"对象不存在 flyTo 方法")):ue("flyToSceneObjectById",null,"未查询到对象")}else if(Reflect.has(e,"longitude")&&Reflect.has(e,"latitude")){const{longitude:n,latitude:i,height:s}=e,o=[Number(n),Number(i),Number(s??0)+2e3];return console.log("flyToDestination",o),(t=r.activeViewer)==null||t.flyIn(o),mi("flyToDestination",{position:o})}else return ue("flyToSceneObjectById",null,"未提供有效的参数")}catch(n){return ue("flyToSceneObjectById",n)}}},{name:"getCurrentCameraInfo",params:{description:`
465
+ 4. 当用户输入包含“定位 / 飞到 / 去 / 看看 / 在哪”等目的地指向性语义时,可以调用这个工具。`)}},func:async({option:s})=>{var e;try{if(console.log("flyTo________________________",s),Reflect.has(s,"id")){const t=s.id,i=n.getSceneObjectById(t);return i?(console.log("flyToSceneObjectById",i),Reflect.has(i,"flyTo")?(await i.flyTo(),st("flyToSceneObjectById",null,"对象定位成功")):ie("flyToSceneObjectById",null,"对象不存在 flyTo 方法")):ie("flyToSceneObjectById",null,"未查询到对象")}else if(Reflect.has(s,"longitude")&&Reflect.has(s,"latitude")){const{longitude:t,latitude:i,height:r}=s,o=[Number(t),Number(i),Number(r??0)+2e3];return console.log("flyToDestination",o),(e=n.activeViewer)==null||e.flyIn(o),st("flyToDestination",{position:o})}else return ie("flyToSceneObjectById",null,"未提供有效的参数")}catch(t){return ie("flyToSceneObjectById",t)}}},{name:"getCurrentCameraInfo",params:{description:`
470
466
  "名称": "获取当前相机视角信息",
471
467
  "说明": "用于获取当前三维场景中相机的实时视角状态信息,反映用户此刻所看到画面的空间位置与朝向。该功能常作为其他相机控制操作的基础数据来源。",
472
468
  "示例": "当输入类似“获取当前视角位置”/“获取当前相机位置”/“获取当前相机视角”/“获取视角信息”等类似关键词时,直接调用此工具。",
473
469
  "注意": "返回值一般包含位置信息(经度、纬度、高度)和姿态信息(航向角、俯仰角、翻滚角)"
474
- `,inputSchema:{}},func:async({})=>{var e;try{const t=(e=r.activeViewer)==null?void 0:e.getCurrentCameraInfo();return t?(console.log("getCurrentCameraInfo",t),mi("getCurrentCameraInfo",t)):ue("getCurrentCameraInfo",null,"未查询到当前相机信息")}catch(t){return ue("getCurrentCameraInfo",t)}}},{name:"cameraHeading",params:{description:`
470
+ `,inputSchema:{}},func:async({})=>{var s;try{const e=(s=n.activeViewer)==null?void 0:s.getCurrentCameraInfo();return e?(console.log("getCurrentCameraInfo",e),st("getCurrentCameraInfo",e)):ie("getCurrentCameraInfo",null,"未查询到当前相机信息")}catch(e){return ie("getCurrentCameraInfo",e)}}},{name:"cameraHeading",params:{description:`
475
471
  "名称": "设置相机旋转朝向(航向角 heading)姿态",
476
472
  "说明": "用于调整相机的航向角(heading),控制相机在水平面的朝向。航向角以正北为基准进行旋转,当 heading 为 0 时,相机正对地理正北方向;数值增大表示顺时针旋转(朝向东方、南方等),数值减小表示逆时针旋转。",
477
473
  "步骤": [
@@ -481,7 +477,7 @@ ${__}
481
477
  ],
482
478
  "示例": "heading = 0时相机指向正北;heading = 90时相机指向正东;heading = 180时相机指向正南",
483
479
  "注意": "仅影响相机的水平旋转方向,不会改变俯仰角(pitch)和翻滚角(roll)"
484
- `,inputSchema:{heading:pe.number().describe("航向角(°),0度时指向正北, 必须参数,一般取值范围 0~360").min(0).max(360)}},func:async({heading:e})=>{var t,n;try{const i=(t=r.activeViewer)==null?void 0:t.getCurrentCameraInfo();if(!i)return ue("cameraHeading",null,"未查询到当前相机信息");const s=[e,i.rotation[1],i.rotation[2]];return(n=r.activeViewer)==null||n.flyIn(i.position,s),mi("cameraHeading",{newRotation:s})}catch(i){return ue("cameraHeading",i)}}},{name:"cameraPitch",params:{description:`
480
+ `,inputSchema:{heading:ne.number().describe("航向角(°),0度时指向正北, 必须参数,一般取值范围 0~360").min(0).max(360)}},func:async({heading:s})=>{var e,t;try{const i=(e=n.activeViewer)==null?void 0:e.getCurrentCameraInfo();if(!i)return ie("cameraHeading",null,"未查询到当前相机信息");const r=[s,i.rotation[1],i.rotation[2]];return(t=n.activeViewer)==null||t.flyIn(i.position,r),st("cameraHeading",{newRotation:r})}catch(i){return ie("cameraHeading",i)}}},{name:"cameraPitch",params:{description:`
485
481
  "名称": "设置相机俯仰角(pitch)姿态",
486
482
  "说明": "用于控制相机在垂直方向上的俯仰角度(pitch),决定相机是向上仰视还是向下俯视。角度以水平视线为参考,数值越小相机越向下倾斜。其中 -90° 表示相机垂直向下,正对地面进行俯视。",
487
483
  "步骤": [
@@ -490,7 +486,7 @@ ${__}
490
486
  ],
491
487
  "示例": "pitch = 0时相机水平观察;pitch = -45时相机向下倾斜观察;pitch = -90时相机垂直向下俯视地面",
492
488
  "注意": "pitch 仅影响相机的上下俯仰,不会改变航向角(heading)和翻滚角(roll)"
493
- `,inputSchema:{pitch:pe.number().describe("俯仰角(°),-90度时垂直向下俯视,必须参数,一般取值范围 -90~90").min(-90).max(90)}},func:async({pitch:e})=>{var t,n;try{const i=(t=r.activeViewer)==null?void 0:t.getCurrentCameraInfo();if(!i)return ue("cameraPitch",null,"未查询到当前相机信息");const s=[i.rotation[0],e,i.rotation[2]];return(n=r.activeViewer)==null||n.flyIn(i.position,s),mi("cameraPitch",{newRotation:s})}catch(i){return ue("cameraPitch",i)}}},{name:"cameraRoll",params:{description:`
489
+ `,inputSchema:{pitch:ne.number().describe("俯仰角(°),-90度时垂直向下俯视,必须参数,一般取值范围 -90~90").min(-90).max(90)}},func:async({pitch:s})=>{var e,t;try{const i=(e=n.activeViewer)==null?void 0:e.getCurrentCameraInfo();if(!i)return ie("cameraPitch",null,"未查询到当前相机信息");const r=[i.rotation[0],s,i.rotation[2]];return(t=n.activeViewer)==null||t.flyIn(i.position,r),st("cameraPitch",{newRotation:r})}catch(i){return ie("cameraPitch",i)}}},{name:"cameraRoll",params:{description:`
494
490
  "名称": "设置相机翻滚角(roll)姿态",
495
491
  "说明": "用于控制相机绕自身视轴的翻滚旋转(roll),决定画面是否发生左右倾斜。该参数不会改变相机的朝向位置,只影响画面的水平倾斜状态,常用于模拟倾斜视角或恢复画面水平。",
496
492
  "步骤": [
@@ -499,7 +495,7 @@ ${__}
499
495
  ],
500
496
  "示例": "roll = 0时画面保持水平;roll = 30时画面向右倾斜;roll = -30时画面向左倾斜",
501
497
  "注意": "roll 仅影响画面倾斜,不会改变相机的航向角(heading)和俯仰角(pitch)"
502
- `,inputSchema:{roll:pe.number().describe("翻滚角(°),0度时画面保持水平,必须参数,取值范围 -180~180").min(-180).max(180)}},func:async({roll:e})=>{var t,n;try{const i=(t=r.activeViewer)==null?void 0:t.getCurrentCameraInfo();if(!i)return ue("cameraRoll",null,"未查询到当前相机信息");const s=[i.rotation[0],i.rotation[1],e];return(n=r.activeViewer)==null||n.flyIn(i.position,s),mi("cameraRoll",{newRotation:s})}catch(i){return ue("cameraRoll",i)}}},{name:"cameraDistance",params:{description:"控制相机与当前目标或视点之间的距离变化,实现相机画面的拉近或拉远。通过 mode 参数指定缩放方向(near 表示拉近,far 表示拉远)",inputSchema:{mode:pe.enum(["near","far"]).describe("缩放模式,near表示相机画面拉近,far表示相机画面拉远")}},func:async({mode:e})=>{var t,n,i,s,o;try{console.log("cameraDistance",e);const a=(t=r.activeViewer)==null?void 0:t.getCurrentCameraInfo();if(!a)return ue("cameraDistance",null,"未查询到当前相机信息");const l=(i=(n=r.activeViewer)==null?void 0:n.container)==null?void 0:i.getBoundingClientRect();if(!l)return ue("cameraDistance",null,"未查询到当前相机容器信息");const u=[l.width/2,l.height/2],c=await((s=r.activeViewer)==null?void 0:s.pickPosition(u));if(!c)return ue("cameraDistance",null,"未查询到视点位置");const d=e==="near"?.2:-.2,f=[a.position[0]+(c[0]-a.position[0])*d,a.position[1]+(c[1]-a.position[1])*d,a.position[2]+(c[2]-a.position[2])*d];return(o=r.activeViewer)==null||o.flyIn(f,a.rotation),mi("cameraDistance",{mode:e,newPosition:f})}catch(a){return ue("cameraDistance",a)}}}],A_=r=>[{name:"deleteSceneObject",params:{description:"提供对象id来删除单个或多个场景对象,把对象从场景中移除",inputSchema:{ids:pe.array(pe.string().describe("场景对象 id")).describe("需要删除的场景对象 id 列表").default([])}},func:async({ids:e})=>{var t;try{if(e.length===0)return ue("deleteSceneObject",null,"未指定对象id");const n=[];for(const i of e){const s=r.sceneTree.getTreeItemFromSceneObjId(i);if(!s){n.push(`删除失败,未查询到ID为 ${i} 的对象`);continue}r.sceneTree.destroySceneObjectTreeItem(s),n.push(`成功删除对象 ${(t=s==null?void 0:s.sceneObject)==null?void 0:t.id}`)}return mi("deleteSceneObject",n)}catch(n){return ue("deleteSceneObject",n)}}},{name:"createSceneObjectFromJson",params:{description:"根据对象JSON来创建场景对象,必须符合格式 { type: string,id: string, ...} ",inputSchema:{json:pe.object({id:pe.string().describe("对象id"),type:pe.string().describe("对象类型,例如:ESImageLayer")}).passthrough().describe("场景对象JSON,必须保证 id 和 type 存在,严格使用用户提供的JSON,不允许添加额外属性")}},func:async({json:e})=>{var t;try{if(![...lt.context.typeNames].includes(e.type))return ue("createSceneObjectFromJson",null,`未查询到类型为 ${e.type} 的对象类型`);const i=r.sceneTree.createSceneObjectTreeItemFromJson(e);return i?mi("createSceneObjectFromJson",(t=i==null?void 0:i.sceneObject)==null?void 0:t.completeJson):ue("createSceneObjectFromJson",null,`创建 ${e.type} 对象失败`)}catch(n){return ue("createSceneObjectFromJson",n)}}},{name:"setSceneObjectProperty",params:{description:"设置对象的属性值,更改指定对象的某个属性值,参数从场景JSON中查询",inputSchema:{id:pe.string().describe("对象id"),property:pe.string().describe("对象属性名,例如:show"),value:pe.any().describe("对象属性值,例如: true")}},func:async({id:e,property:t,value:n})=>{try{const i=r.getSceneObjectById(e);return i?Reflect.has(i,t)?(i[t]=n,mi("setSceneObjectProperty",`对象 ${i.name} 的 ${t} 属性为 ${JSON.stringify(n)}`)):ue("setSceneObjectProperty",null,`对象 ${i.name} 没有属性 ${t}`):ue("setSceneObjectProperty",null,`未查询到ID为 ${e} 的对象`)}catch(i){return ue("setSceneObjectProperty",i)}}}],k_=r=>[...F_(r),...A_(r)],oP=J_;function V_(r){return oP(r)}class aP extends U{constructor(t){super();h(this,"_tools",new Map);t&&k_(t).forEach(i=>{this.registerTool(i)})}toolTransformParams(t){const{description:n,inputSchema:i,outputSchema:s}=t.params,o=pe.z.object(i||{}),a=pe.z.object(s||{}),l=V_(o),u=V_(a);return{name:t.name,description:n,inputSchema:l,outputSchema:u}}async listTools(){return Promise.resolve(Array.from(this._tools.values()).map(this.toolTransformParams))}registerTool(t){this._tools.set(t.name,t)}async callTool(t){const{name:n,arguments:i}=t,s=this._tools.get(n);if(!s||!s.func)throw new Error(`ESTool "${n}" does not exist.`);return await s.func(i)}getTools(){return Array.from(this._tools.values())}}function j_(r){return typeof r=="string"?document.getElementById(r):r}function Kp(r){if(!r)throw new Error("container is not defined");r.innerHTML="";const e=document.createElement("div");return e.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",r.appendChild(e),e}class B_ extends U{constructor(t,n){super();h(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=t,this._createSceneObjectListeningFunc=n;const i=this._listeningSceneObjects,s=(o,a)=>{if(o)for(let l of o){const u=i.get(l);u&&(u.destroy(),i.delete(l))}if(a)for(let l of a){if(i.get(l)){console.warn(`listeningSceneObjects已存在某对象:${l.name}`,l);debugger}const c=this.createSceneObjectListeningFunc(l);c&&i.set(l,c)}};s(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(s)),this.dispose(()=>{for(let o of this._listeningSceneObjects.values())o.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class lP extends U{constructor(e){super(),this._esObjectsManager=e;{const t=this._esObjectsManager;class n extends U{constructor(s){super(),this._esPath=s,this.dv(new Ie(t.activeViewerChanged,()=>{const o=t.activeViewer;if(!o)return;class a extends U{constructor(u){if(super(),this._esPath=u,!o)throw new Error("!viewer");const c=()=>{const d=t.activeViewer;d&&(this._esPath.path.currentTime=d.simulationTime)};c(),this.d(o.simulationTimeChanged.don(c))}}return new a(this._esPath)}))}}this.dv(new B_(t.sceneObjectsManager,i=>{if(i instanceof hl)return new n(i)}))}{const t=this._esObjectsManager;class n extends U{constructor(s){super();const o=()=>{const a=t.activeViewer;a&&(a.simulationTime=s.currentTime??0)};o(),this.d(s.currentTimeChanged.don(o))}}this.dv(new B_(t.sceneObjectsManager,i=>{if(i instanceof cl)return new n(i)}))}}}class uP extends U{constructor(e){super(),e.forEach(t=>{this.d(t.path.currentPositionChanged.don(n=>{n&&t.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...n])})})),this.d(t.path.currentRotationChanged.don(n=>{n&&t.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...n])})}))})}}class cP extends U{constructor(t){super();h(this,"_player");h(this,"_channels",this.dv(et([])));this._objectManager=t,this._player=this._objectManager.player,this.dv(new Ie(this.channelsChanged,()=>{if(this.channels.length===0)return;const n=[];for(let i=0;i<this.channels.length;i++){const s=this.channels[i],o=lt.getSceneObjById(s.pathId);if(!o||!(o instanceof hl))continue;const l=s.sceneObjectIds.map(u=>lt.getSceneObjById(u)).filter(u=>u!==void 0);l.length!==0&&n.push({path:o,sceneObjects:l})}if(n.length!==0)return new uP(n)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(t){this._channels.value=t}}function z_(r,e,t,n){if(t)n.currentActiveEditing=[r,e];else if(n.currentActiveEditing){const[i,s]=n.currentActiveEditing;i===r&&s===e&&(t||(n.currentActiveEditing=void 0))}}const hP=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class dP extends U{constructor(e,t){super(),this._sceneObject=e;const n=this._sceneObject;for(let i of hP){const s=i+"Changed",o=n[s];if(o){{const a=n[i];z_(n,i,a,t)}this.dispose(o.disposableOn((a=>z_(n,i,a,t))))}}}get sceneObject(){return this._sceneObject}}class fP extends U{constructor(){super();h(this,"_currentActiveEditing",this.disposeVar(Xt(void 0)));h(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((t,n)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),n){const[i,s]=n;i[s]===!0&&(i[s]=!1)}if(t){const[i,s]=t;i[s]=!0}})),lt.context.sceneObjCreatedEvent.don(t=>{t.dv(new dP(t,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(t){this._currentActiveEditing.value=t}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class pP extends U{constructor(){super();h(this,"_sceneObjects",new Set);h(this,"_sceneObjectsToChange",this.dv(new N));this.d(()=>{const t=Wh(this._sceneObjects);t!==0&&console.warn(`场景对象管理器销毁时仍然管理着${t}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(t){return this._sceneObjects.has(t)?(console.warn(`创建失败:对象${t.typeName+":"+t.id}已经存在于场景对象管理器中!}`),!1):(this._sceneObjectsToChange.emit([],[t]),this._sceneObjects.add(t),!0)}deleteSceneObject(t){return this._sceneObjects.has(t)?(this._sceneObjectsToChange.emit([t],[]),this._sceneObjects.delete(t),!0):(console.warn(`删除失败:对象${t.typeName+":"+t.id}不存在于场景对象管理器中!}`),!1)}createSceneObject(t,n){const i=lt.context.createSceneObject(t,n);return i&&this.addSceneObject(i),i}createSceneObjectFromUrl(t,n){const i=lt.context.createSceneObjectFromUrl(t,n);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(t,n){const i=lt.context.createSceneObjectFromClass(t,n);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(t){const n=lt.context.createSceneObjectFromJson(t);return n&&this.addSceneObject(n),n}}class gP extends U{constructor(t){super();h(this,"_enabled",this.dv(z(!1)));h(this,"_cursorPosition",z(void 0));h(this,"quickPickPosition",!0);let n=new U;const i=()=>{n&&(n.destroy(),n=void 0)};this.d(i);const s=()=>{if(i(),!t||!this._enabled.value)return;n=new U;const o=n.dv(z(void 0)),a=n.dv(Se(o.changed));n.d(t.pointerMoveEvent.don(u=>{u.pointerEvent&&(o.value=mn(u.pointerEvent))}));const l=n.dv(nr(async u=>{if(o.value)if(this.quickPickPosition){const c=await u.promise(xa(t.quickPickPosition(o.value)));this._cursorPosition.value=c}else{const c=await u.promise(xa(t.pickPosition(o.value)));this._cursorPosition.value=c}}));n.d(a.don(()=>{l.restart()}))};s(),this.d(this._enabled.changed.don(s))}get enabled(){return this._enabled.value}set enabled(t){this._enabled.value=t}get enabledChanged(){return this._enabled.changed}get cursorPosition(){return this._cursorPosition.value}get cursorPositionChanged(){return this._cursorPosition.changed}}class mP extends U{constructor(t){super();h(this,"cursorPositionInfo");this.viewer=t,this.cursorPositionInfo=this.dv(new gP(this.viewer))}}class vP extends U{constructor(t){super();h(this,"viewer");const n=this.viewer=t;this.ad(new Ie(n.rollerShutterChanged,()=>{const i=n.container;if(!i||!n.rollerShutter)return;const s=new U;this.viewer.splitPosition=.5;let o=this.getRollerShutterDIV();return i.appendChild(o),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(o)}),s}))}getRollerShutterDIV(){let t=document.createElement("div");t.style.position="absolute",t.style.left="50%",t.style.top="0",t.style.backgroundColor="#d3d3d3",t.style.width="5px",t.style.height="100%",t.style.zIndex="9999";const n=i=>{if(!t.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const o=i.x/t.parentElement.offsetWidth;t.style.left=`${100*o}%`,this.viewer.splitPosition=o};return t.addEventListener("mouseenter",i=>{t.style.cursor="ew-resize"}),t.addEventListener("mouseleave",i=>{t.style.cursor="default"}),t.addEventListener("mousedown",i=>{t.style.cursor="ew-resize",document.addEventListener("mousemove",n)}),document.addEventListener("mouseup",i=>{t.style.cursor="default",document.removeEventListener("mousemove",n)}),t}}class yP extends U{constructor(t){super();h(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new vP(t))}}function U_(r,e){return r.length===e.length&&r.every((t,n)=>t===e[n])}class _P extends U{constructor(e){super(),this._viewer=e,this.d(A([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class wP extends U{constructor(e,t){super(),this._viewer=e,this._activeViewer=t;const n=vi.createCommonProps(),i=[];Object.keys(n).forEach(l=>{const u=this._activeViewer[l+"Changed"];i.push(u)});const s=this.dv(Se(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(n).forEach(l=>{this._viewer[l]=this._activeViewer[l]})};this.d(s.don(o));const a=this.dv(Kl());a.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const l=this._activeViewer.getCurrentCameraInfo(),u=this._viewer.getCurrentCameraInfo();if(!l)return;const{position:c,rotation:d}=l;u&&U_(c,u.position)&&U_(d,u.rotation)||this._viewer.flyIn(c,d,0)}),this.d(()=>a.cancel())}}const EP=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
498
+ `,inputSchema:{roll:ne.number().describe("翻滚角(°),0度时画面保持水平,必须参数,取值范围 -180~180").min(-180).max(180)}},func:async({roll:s})=>{var e,t;try{const i=(e=n.activeViewer)==null?void 0:e.getCurrentCameraInfo();if(!i)return ie("cameraRoll",null,"未查询到当前相机信息");const r=[i.rotation[0],i.rotation[1],s];return(t=n.activeViewer)==null||t.flyIn(i.position,r),st("cameraRoll",{newRotation:r})}catch(i){return ie("cameraRoll",i)}}},{name:"cameraDistance",params:{description:"控制相机与当前目标或视点之间的距离变化,实现相机画面的拉近或拉远。通过 mode 参数指定缩放方向(near 表示拉近,far 表示拉远)",inputSchema:{mode:ne.enum(["near","far"]).describe("缩放模式,near表示相机画面拉近,far表示相机画面拉远")}},func:async({mode:s})=>{var e,t,i,r,o;try{console.log("cameraDistance",s);const h=(e=n.activeViewer)==null?void 0:e.getCurrentCameraInfo();if(!h)return ie("cameraDistance",null,"未查询到当前相机信息");const c=(i=(t=n.activeViewer)==null?void 0:t.container)==null?void 0:i.getBoundingClientRect();if(!c)return ie("cameraDistance",null,"未查询到当前相机容器信息");const l=[c.width/2,c.height/2],u=await((r=n.activeViewer)==null?void 0:r.pickPosition(l));if(!u)return ie("cameraDistance",null,"未查询到视点位置");const p=s==="near"?.2:-.2,g=[h.position[0]+(u[0]-h.position[0])*p,h.position[1]+(u[1]-h.position[1])*p,h.position[2]+(u[2]-h.position[2])*p];return(o=n.activeViewer)==null||o.flyIn(g,h.rotation),st("cameraDistance",{mode:s,newPosition:g})}catch(h){return ie("cameraDistance",h)}}}],Rl=n=>[{name:"deleteSceneObject",params:{description:"提供对象id来删除单个或多个场景对象,把对象从场景中移除",inputSchema:{ids:ne.array(ne.string().describe("场景对象 id")).describe("需要删除的场景对象 id 列表").default([])}},func:async({ids:s})=>{var e;try{if(s.length===0)return ie("deleteSceneObject",null,"未指定对象id");const t=[];for(const i of s){const r=n.sceneTree.getTreeItemFromSceneObjId(i);if(!r){t.push(`删除失败,未查询到ID为 ${i} 的对象`);continue}n.sceneTree.destroySceneObjectTreeItem(r),t.push(`成功删除对象 ${(e=r==null?void 0:r.sceneObject)==null?void 0:e.id}`)}return st("deleteSceneObject",t)}catch(t){return ie("deleteSceneObject",t)}}},{name:"createSceneObjectFromJson",params:{description:"根据对象JSON来创建场景对象,必须符合格式 { type: string,id: string, ...} ",inputSchema:{json:ne.object({id:ne.string().describe("对象id"),type:ne.string().describe("对象类型,例如:ESImageLayer")}).passthrough().describe("场景对象JSON,必须保证 id 和 type 存在,严格使用用户提供的JSON,不允许添加额外属性")}},func:async({json:s})=>{var e;try{if(![...k.context.typeNames].includes(s.type))return ie("createSceneObjectFromJson",null,`未查询到类型为 ${s.type} 的对象类型`);const i=n.sceneTree.createSceneObjectTreeItemFromJson(s);return i?st("createSceneObjectFromJson",(e=i==null?void 0:i.sceneObject)==null?void 0:e.completeJson):ie("createSceneObjectFromJson",null,`创建 ${s.type} 对象失败`)}catch(t){return ie("createSceneObjectFromJson",t)}}},{name:"setSceneObjectProperty",params:{description:"设置对象的属性值,更改指定对象的某个属性值,参数从场景JSON中查询",inputSchema:{id:ne.string().describe("对象id"),property:ne.string().describe("对象属性名,例如:show"),value:ne.any().describe("对象属性值,例如: true")}},func:async({id:s,property:e,value:t})=>{try{const i=n.getSceneObjectById(s);return i?Reflect.has(i,e)?(i[e]=t,st("setSceneObjectProperty",`对象 ${i.name} 的 ${e} 属性为 ${JSON.stringify(t)}`)):ie("setSceneObjectProperty",null,`对象 ${i.name} 没有属性 ${e}`):ie("setSceneObjectProperty",null,`未查询到ID为 ${s} 的对象`)}catch(i){return ie("setSceneObjectProperty",i)}}}],Al=n=>[...jl(n),...Rl(n)],Rg=Gl;function Nl(n){return Rg(n)}class Ag extends b{constructor(e){super();a(this,"_tools",new Map);e&&Al(e).forEach(i=>{this.registerTool(i)})}toolTransformParams(e){const{description:t,inputSchema:i,outputSchema:r}=e.params,o=ne.z.object(i||{}),h=ne.z.object(r||{}),c=Nl(o),l=Nl(h);return{name:e.name,description:t,inputSchema:c,outputSchema:l}}async listTools(){return Promise.resolve(Array.from(this._tools.values()).map(this.toolTransformParams))}registerTool(e){this._tools.set(e.name,e)}async callTool(e){const{name:t,arguments:i}=e,r=this._tools.get(t);if(!r||!r.func)throw new Error(`ESTool "${t}" does not exist.`);return await r.func(i)}getTools(){return Array.from(this._tools.values())}}function Vl(n){return typeof n=="string"?document.getElementById(n):n}function qa(n){if(!n)throw new Error("container is not defined");n.innerHTML="";const s=document.createElement("div");return s.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",n.appendChild(s),s}class Ll extends b{constructor(e,t){super();a(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=t;const i=this._listeningSceneObjects,r=(o,h)=>{if(o)for(let c of o){const l=i.get(c);l&&(l.destroy(),i.delete(c))}if(h)for(let c of h){if(i.get(c)){console.warn(`listeningSceneObjects已存在某对象:${c.name}`,c);debugger}const u=this.createSceneObjectListeningFunc(c);u&&i.set(c,u)}};r(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(r)),this.dispose(()=>{for(let o of this._listeningSceneObjects.values())o.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class Ng extends b{constructor(s){super(),this._esObjectsManager=s;{const e=this._esObjectsManager;class t extends b{constructor(r){super(),this._esPath=r,this.dv(new ce(e.activeViewerChanged,()=>{const o=e.activeViewer;if(!o)return;class h extends b{constructor(l){if(super(),this._esPath=l,!o)throw new Error("!viewer");const u=()=>{const p=e.activeViewer;p&&(this._esPath.path.currentTime=p.simulationTime)};u(),this.d(o.simulationTimeChanged.don(u))}}return new h(this._esPath)}))}}this.dv(new Ll(e.sceneObjectsManager,i=>{if(i instanceof ls)return new t(i)}))}{const e=this._esObjectsManager;class t extends b{constructor(r){super();const o=()=>{const h=e.activeViewer;h&&(h.simulationTime=r.currentTime??0)};o(),this.d(r.currentTimeChanged.don(o))}}this.dv(new Ll(e.sceneObjectsManager,i=>{if(i instanceof cs)return new t(i)}))}}}class Vg extends b{constructor(s){super(),s.forEach(e=>{this.d(e.path.currentPositionChanged.don(t=>{t&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...t])})})),this.d(e.path.currentRotationChanged.don(t=>{t&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...t])})}))})}}class Lg extends b{constructor(e){super();a(this,"_player");a(this,"_channels",this.dv(F([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new ce(this.channelsChanged,()=>{if(this.channels.length===0)return;const t=[];for(let i=0;i<this.channels.length;i++){const r=this.channels[i],o=k.getSceneObjById(r.pathId);if(!o||!(o instanceof ls))continue;const c=r.sceneObjectIds.map(l=>k.getSceneObjById(l)).filter(l=>l!==void 0);c.length!==0&&t.push({path:o,sceneObjects:c})}if(t.length!==0)return new Vg(t)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(e){this._channels.value=e}}function zl(n,s,e,t){if(e)t.currentActiveEditing=[n,s];else if(t.currentActiveEditing){const[i,r]=t.currentActiveEditing;i===n&&r===s&&(e||(t.currentActiveEditing=void 0))}}const zg=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class Ug extends b{constructor(s,e){super(),this._sceneObject=s;const t=this._sceneObject;for(let i of zg){const r=i+"Changed",o=t[r];if(o){{const h=t[i];zl(t,i,h,e)}this.dispose(o.disposableOn((h=>zl(t,i,h,e))))}}}get sceneObject(){return this._sceneObject}}class Wg extends b{constructor(){super();a(this,"_currentActiveEditing",this.disposeVar(ee(void 0)));a(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,t)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),t){const[i,r]=t;i[r]===!0&&(i[r]=!1)}if(e){const[i,r]=e;i[r]=!0}})),k.context.sceneObjCreatedEvent.don(e=>{e.dv(new Ug(e,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(e){this._currentActiveEditing.value=e}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class Bg extends b{constructor(){super();a(this,"_sceneObjects",new Set);a(this,"_sceneObjectsToChange",this.dv(new m));this.d(()=>{const e=kr(this._sceneObjects);e!==0&&console.warn(`场景对象管理器销毁时仍然管理着${e}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(e){return this._sceneObjects.has(e)?(console.warn(`创建失败:对象${e.typeName+":"+e.id}已经存在于场景对象管理器中!}`),!1):(this._sceneObjectsToChange.emit([],[e]),this._sceneObjects.add(e),!0)}deleteSceneObject(e){return this._sceneObjects.has(e)?(this._sceneObjectsToChange.emit([e],[]),this._sceneObjects.delete(e),!0):(console.warn(`删除失败:对象${e.typeName+":"+e.id}不存在于场景对象管理器中!}`),!1)}createSceneObject(e,t){const i=k.context.createSceneObject(e,t);return i&&this.addSceneObject(i),i}createSceneObjectFromUrl(e,t){const i=k.context.createSceneObjectFromUrl(e,t);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,t){const i=k.context.createSceneObjectFromClass(e,t);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const t=k.context.createSceneObjectFromJson(e);return t&&this.addSceneObject(t),t}}class Hg extends b{constructor(e){super();a(this,"_enabled",this.dv(y(!1)));a(this,"_cursorPosition",y(void 0));a(this,"quickPickPosition",!0);let t=new b;const i=()=>{t&&(t.destroy(),t=void 0)};this.d(i);const r=()=>{if(i(),!e||!this._enabled.value)return;t=new b;const o=t.dv(y(void 0)),h=t.dv(ae(o.changed));t.d(e.pointerMoveEvent.don(l=>{l.pointerEvent&&(o.value=Ee(l.pointerEvent))}));const c=t.dv(Ne(async l=>{if(o.value)if(this.quickPickPosition){const u=await l.promise(is(e.quickPickPosition(o.value)));this._cursorPosition.value=u}else{const u=await l.promise(is(e.pickPosition(o.value)));this._cursorPosition.value=u}}));t.d(h.don(()=>{c.restart()}))};r(),this.d(this._enabled.changed.don(r))}get enabled(){return this._enabled.value}set enabled(e){this._enabled.value=e}get enabledChanged(){return this._enabled.changed}get cursorPosition(){return this._cursorPosition.value}get cursorPositionChanged(){return this._cursorPosition.changed}}class $g extends b{constructor(e){super();a(this,"cursorPositionInfo");this.viewer=e,this.cursorPositionInfo=this.dv(new Hg(this.viewer))}}class Gg extends b{constructor(e){super();a(this,"viewer");const t=this.viewer=e;this.ad(new ce(t.rollerShutterChanged,()=>{const i=t.container;if(!i||!t.rollerShutter)return;const r=new b;this.viewer.splitPosition=.5;let o=this.getRollerShutterDIV();return i.appendChild(o),r.d(()=>{this.viewer.splitPosition=0,i.removeChild(o)}),r}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const t=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const o=i.x/e.parentElement.offsetWidth;e.style.left=`${100*o}%`,this.viewer.splitPosition=o};return e.addEventListener("mouseenter",i=>{e.style.cursor="ew-resize"}),e.addEventListener("mouseleave",i=>{e.style.cursor="default"}),e.addEventListener("mousedown",i=>{e.style.cursor="ew-resize",document.addEventListener("mousemove",t)}),document.addEventListener("mouseup",i=>{e.style.cursor="default",document.removeEventListener("mousemove",t)}),e}}class Jg extends b{constructor(e){super();a(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new Gg(e))}}function Ul(n,s){return n.length===s.length&&n.every((e,t)=>e===s[t])}class qg extends b{constructor(s){super(),this._viewer=s,this.d(_([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class Xg extends b{constructor(s,e){super(),this._viewer=s,this._activeViewer=e;const t=nt.createCommonProps(),i=[];Object.keys(t).forEach(c=>{const l=this._activeViewer[c+"Changed"];i.push(l)});const r=this.dv(ae(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(t).forEach(c=>{this._viewer[c]=this._activeViewer[c]})};this.d(r.don(o));const h=this.dv(Ks());h.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const c=this._activeViewer.getCurrentCameraInfo(),l=this._viewer.getCurrentCameraInfo();if(!c)return;const{position:u,rotation:p}=c;l&&Ul(u,l.position)&&Ul(p,l.rotation)||this._viewer.flyIn(u,p,0)}),this.d(()=>h.cancel())}}const Yg=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
503
499
  <animateTransform values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" repeatCount="indefinite" type="rotate" attributeName="transform"></animateTransform>
504
500
  </circle><g></g></g></svg>
505
- `,CP='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',SP='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',ya=class ya extends U{constructor(e){super();const t=()=>{const n=this.dv(new ph);this.d(A([n,"show"],[e,"useDefaultStatusDiv"]));{const i=()=>{n.show=(e.useDefaultStatusDiv??!0)&&e.status!=="Created"};i(),this.d(e.useDefaultStatusDivChanged.don(i)),this.d(e.statusChanged.don(i)),n.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}e.add(n),this.d(()=>e.delete(n)),n.instanceClass=class extends U{constructor(o,a,l){super();h(this,"_div",document.createElement("div"));if(this._subContainer=o,!l)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const _=()=>{a.show?this._div.style.opacity="1":this._div.style.opacity="0"};_(),this.d(a.showChanged.don(_))}let u,c,d,f,p;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",u=document.createElement("div"),this._div.appendChild(u),u.style.width="auto",u.style.position="absolute",u.style.left="50%",u.style.top="50%",u.style.transform="translate(-50%,-50%)",u.style.background="rgba(120, 120, 0, 0.7)",u.style.color="white",u.style.fontSize="10px",u.style.background="none",u.style.display="flex",u.style.justifyContent="center",u.style.alignItems="center",c=document.createElement("div"),u.appendChild(c),c.style.pointerEvents="none",c.style.display="block",c.style.width="40px",c.innerHTML=ya.defaultsSvg.loadingSvg,c.style.filter="drop-shadow(0px 0px 1px black)",d=document.createElement("div"),u.appendChild(d),d.style.pointerEvents="none",d.style.marginLeft="10px",d.style.display="flex",d.style.flexFlow="column",d.style.maxWidth="300px",f=document.createElement("div"),d.appendChild(f),f.style.fontSize="14px",f.style.fontWeight="800",f.style.marginBottom="5px",f.style.textShadow="0 0 2px black",p=document.createElement("div"),d.appendChild(p),p.style.fontWeight="400",p.style.textShadow="0 0 2px black";{const _=()=>{let b="Raw";l.status==="Raw"?b="初始状态":l.status==="Creating"?b="正在创建":l.status==="Created"?b="创建完成":l.status==="Error"?b="创建失败":l.status==="Reconnecting"&&(b="重新连接"),f.innerText=`${b}(${l.status})`,p.innerText=`${l.statusLog}`,(l.status==="Creating"||l.status==="Reconnecting")&&(c.innerHTML=ya.defaultsSvg.loadingSvg),l.status==="Created"&&(c.innerHTML=ya.defaultsSvg.successSvg),l.status==="Error"&&(c.innerHTML=ya.defaultsSvg.warnSvg)};_();const S=this.dv(Se(l.statusLogChanged,l.statusChanged));this.d(S.don(_))}}update(){const o=255*Math.random()|0,a=255*Math.random()|0,l=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${a}, ${l}, 0.8)`}}};this.d(e.containerChanged.don(()=>{t()}))}};h(ya,"defaultsSvg",{loadingSvg:EP,successSvg:CP,warnSvg:SP});let Zp=ya;class bP extends U{constructor(e,t,n){super(),this._subContainer=e,this._overlayContainer=t,this._viewer=n;const i=this._subContainer,s=this._overlayContainer,o=this._viewer,a=()=>{const c=o.zIndex??"";i.style.zIndex=c,s.style.zIndex=c};a(),this.d(o.zIndexChanged.don(a));const l=()=>{i.style.display=o.show??!0?"block":"none"};l(),this.d(o.showChanged.don(l));const u=()=>{i.style.opacity=`${o.opacity??1}`};u(),this.d(o.opacityChanged.don(u))}}function xh(r){let e=er(r,"_relativeContainer");return e||(e=document.createElement("div"),e.style.position="relative",e.style.width="100%",e.style.height="100%",e.style.padding="0",e.style.margin="0",r.appendChild(e),Ii(r,"_relativeContainer",e)),e}class PP extends U{constructor(t,n){super();h(this,"_subContainer",document.createElement("div"));h(this,"_overlayContainer",document.createElement("div"));h(this,"_containerStyleController");this._container=t,this._viewer=n,this._containerStyleController=this.dv(new bP(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:s}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),s.style.position="relative",s.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),xh(this._container).appendChild(i),this.d(()=>xh(this._container).removeChild(i)),xh(this._container).appendChild(s),this.d(()=>xh(this._container).removeChild(s))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class IP extends U{constructor(){super(...arguments);h(this,"registerObjsMap",new Map)}register(t,n){return this.registerObjsMap.has(t)&&console.warn(`register warn:${t}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(t,n),t}getViewerConstructor(t){const n=this.registerObjsMap.get(t);if(!n){console.warn(`未找到${t}类!`);return}return n}createViewer(t){const n=t.type;console.log(t);const i=this.getViewerConstructor(n);if(!i)throw new Error(`没有找到类型为${n}的Viewer构造器!`);return new i(t)}}class G_ extends U{constructor(e,t,n=!1,i=!1){if(super(),this._viewer=e,!t)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(ce.create(t,"pointerdown")),o=this.dv(ce.create(t,"pointermove")),a=this.dv(ce.create(t,"pointerup")),l=this.dv(ce.create(t,"pointerout")),u=this.dv(ce.create(t,"pointerover")),c=this.dv(new sd),d=this.dv(new Pg),f=()=>{const g=this._viewer.hoverTime*1e3;d.delayTime=g};this.d(this._viewer.hoverTimeChanged.don(()=>{f()})),this.d(s.don(g=>c.pointerDown(g))),this.d(o.don(g=>c.pointerMove(g))),this.d(a.don(g=>c.pointerUp(g))),this.d(l.don(g=>c.pointerOut(g))),this.d(s.don(g=>d.pointerDown(g))),this.d(o.don(g=>d.pointerMove(g))),this.d(a.don(g=>d.pointerUp(g))),this.d(l.don(g=>d.pointerOut(g)));const{x:p,y:_}=t.getBoundingClientRect(),S=i?p:0,b=i?_:0;this.d(d.hoverEvent.don(g=>{const[y,E]=ba(g,n);this._viewer.hoverEvent.emit({screenPosition:[y+S,E+b],pointerEvent:g})})),this.d(c.clickEvent.don(g=>{const[y,E]=ba(g,n);this._viewer.clickEvent.emit({screenPosition:[y+S,E+b],pointerEvent:g})})),this.d(c.dbclickEvent.don(g=>{const[y,E]=ba(g,n);g.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[y+S,E+b],pointerEvent:g})})),this.d(s.don(g=>{const[y,E]=ba(g,n);g.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[y+S,E+b],pointerEvent:g})})),this.d(a.don(g=>{const[y,E]=ba(g,n);g.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[y+S,E+b],pointerEvent:g})})),this.d(o.don(g=>{const[y,E]=mn(g,n);this._viewer.pointerMoveEvent.emit({screenPosition:[y+S,E+b],pointerEvent:g})})),this.d(u.don(g=>{const[y,E]=mn(g,n);this._viewer.pointerOverEvent.emit({screenPosition:[y+S,E+b],pointerEvent:g})})),this.d(l.don(g=>{const[y,E]=mn(g,n);this._viewer.pointerOutEvent.emit({screenPosition:[y+S,E+b],pointerEvent:g})}));const I=this.dv(ce.create(t,"keydown"));this.d(I.don(g=>this._viewer.keyDownEvent.emit(g)));const m=this.dv(ce.create(t,"keyup"));this.d(m.don(g=>this._viewer.keyUpEvent.emit(g)));const w=this.dv(ce.create(t,"wheel"));this.d(w.don(g=>this._viewer.wheelEvent.emit(g)))}}const Rs=class Rs extends U{constructor(t){super();h(this,"_forceRecreateEvent",this.dv(new N));h(this,"_container",this.dv(z(void 0)));h(this,"_containerSize",this.dv(z(void 0)));h(this,"_editingEvent",this.disposeVar(new N));h(this,"_esViewerExtensions",this.dv(new mP(this)));h(this,"_status",this.dv(z("Raw")));h(this,"_statusLog",this.dv(z("")));h(this,"_statusContainer",this.dv(new Zp(this)));h(this,"_useCustomInteraction",this.dv(z(!0)));h(this,"_resetInteractionEvent",this.dv(Se(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));h(this,"_interactionResetting",this.dv(new Ie(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new G_(this,this.container)})));h(this,"_viewerChanged",this.dv(new N));h(this,"_cameraChanged",this.dv(new N));h(this,"_containerResetEvent",this.dv(Se(this.containerChanged,this._forceRecreateEvent)));h(this,"_containerResetting",this.dv(new Ie(this._containerResetEvent,()=>{if(this.container)return new PP(this.container,this)})));h(this,"_sceneObjectsMap",new Map);h(this,"_id");h(this,"_typeName");h(this,"_updateFuncReact",this.dv(z(void 0)));h(this,"_toDestroyFuncReact",this.dv(z(void 0)));h(this,"_statusInfo",Rs.defaults.statusInfo);h(this,"_navigationMode",this.dv(z("Map")));h(this,"_navigationEvent",this.disposeVar(new N));h(this,"_syncViewer",this.dv(z(void 0)));h(this,"_syncEventDon",this.dv(new Ie(this.syncViewerChanged,()=>{const t=this.syncViewer;if(t)return new wP(this,t)})));h(this,"_timeSyncdon",this.dv(new Ie(this.timeSyncChanged,()=>{if(this.timeSync)return new _P(this)})));h(this,"_hoverEvent",this.dv(new N));h(this,"_pointerOverEvent",this.dv(new N));h(this,"_pointerMoveEvent",this.dv(new N));h(this,"_pointerDownEvent",this.dv(new N));h(this,"_pointerUpEvent",this.dv(new N));h(this,"_pointerOutEvent",this.dv(new N));h(this,"_clickEvent",this.dv(new N));h(this,"_dblclickEvent",this.dv(new N));h(this,"_keyDownEvent",this.dv(new N));h(this,"_keyUpEvent",this.dv(new N));h(this,"_wheelEvent",this.dv(new N));h(this,"_actived",this.dv(z(!1)));this._id=t.id??Ca();const n=j_(t.container);if(n)this._container.value=Kp(n),this._typeName=t.type,this._initName();else throw new Error("container is not defined");{const i=()=>{n&&(this.show??!0?n.style.display="block":n.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[a,l]of i.entries())if(!l&&a){const u=$o.context.createEngineObject(a,this);u&&i.set(a,u)}},o=()=>{for(let[a,l]of i.entries())l&&!l.isDestroyed()&&l.destroy(),i.set(a,void 0)};this.d(o),this.d(this.viewerChanged.don(a=>{o(),a&&s()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(s){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(o){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let s;this.d(()=>s&&s.destroy()),this.d(this.updateFuncChanged.don(()=>{s&&s.cancel(),this.updateFunc&&(s=s||Kl(),s.restart(void 0,o=>{this.updateFunc&&this.updateFunc(this,o)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(s){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new yP(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(t){this._container.value=t}set containerOrId(t){if(typeof t=="string"){const n=document.getElementById(t);n&&n instanceof HTMLDivElement?this._container.value=Kp(n):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else t instanceof HTMLDivElement?this._container.value=Kp(t):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(t){this._containerSize.value=t}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get esViewerExtensions(){return this._esViewerExtensions}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(t){this._status.value=t}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(t){this._statusLog.value=t}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(t){this._useCustomInteraction.value=t}get viewerChanged(){return this._viewerChanged}get cameraChanged(){return this._cameraChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var t;return(t=this._containerResetting.obj)==null?void 0:t.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var t;return(t=this._containerResetting.obj)==null?void 0:t.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(t){return this.sceneObjectsMap.get(t)}add(...t){for(let n of t)if(!this.has(n)){lt.context.addSceneObject(n);const i=$o.context.createEngineObject(n,this);i&&this._sceneObjectsMap.set(n,i),n.viewerAttached.emit(this)}}delete(...t){for(let n of t)if(this.has(n)){const i=this._sceneObjectsMap.get(n);i&&i.destroy(),lt.context.deleteSceneObject(n),this._sceneObjectsMap.delete(n),n.viewerDetached.emit(this)}}disposableAdd(...t){return this.add(...t),()=>this.delete(...t)}disAdd(...t){return this.disposableAdd(...t)}has(t){return this._sceneObjectsMap.has(t)}clearAllSceneObjects(){for(let t of this.sceneObjects)this.delete(t)}get id(){return this._id}set id(t){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return Rs.createDefaultProps()}get completeJson(){return this._getJson(!1)}_getJson(t=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(t){let s,o=this.defaultProps[i];o instanceof Ge?s=o.equals(this[i]):s=o===this[i],s||(n[i]=this[i])}else n[i]=this[i];return n}_setJson(t,n,i){if(!(t instanceof Object)||t.type&&t.type!==this.typeName){console.error(`value.type && value.type${t.type} !== this.typeName${this.typeName}`);return}t.id&&t.id!==this.id&&console.warn(`value.id === undefined || value.id${t.id} !== this.id(${this.id})`);const s=n||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in t)this[a]=t[a]===null?void 0:t[a];else if(!(i??!1)){let l=this.defaultProps[a];l instanceof Ge&&(l=l.value),this[a]=l}}get json(){return this._getJson()}set json(t){this._setJson(t,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(t){this._updateFuncReact.value=t}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(t){this._toDestroyFuncReact.value=t}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}get navigationEvent(){return this._navigationEvent}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(t){this._syncViewer.value=t}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(t){t&&t.syncViewer&&(t.syncViewer=void 0),t===this?this._syncViewer.value=void 0:this._syncViewer.value=t}setCurrentTime(t){try{this.currentTime=typeof t=="string"?Date.parse(t):t}catch(n){console.warn(`时间格式不正确! value: ${t} error: ${n}`)}}async getVersion(){return globalThis.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}get actived(){return this._actived.value}set actived(t){this._actived.value=t}get activedChanged(){return this._actived.changed}getESProperties(){return{defaultMenu:"general",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[],more:[]}}async getCurrentRectangle(){var t;try{const n=(t=this.container)==null?void 0:t.getBoundingClientRect();if(!n)return;const{width:i,height:s}=n,o=await this.quickPickPosition([0,0]),a=await this.quickPickPosition([i,s]);return!o||!a?void 0:[o[0],a[1],a[0],o[1]]}catch(n){console.error(n);return}}};h(Rs,"context",new IP),h(Rs,"register",Rs.context.register.bind(Rs.context)),h(Rs,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0,cameraMovableRegion:[0,0,0,0,0,0],depthTestAgainstTerrain:!0,terrainOpacity:1});let vi=Rs;(r=>{r.createBaseProps=()=>({name:"未命名场景对象",extras:gt(void 0),devTags:Xt(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),r.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:1024,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:Xt(void 0),editingAuxiliaryPointColor:Xt(void 0),editingLineWidth:void 0,editingLineColor:Xt(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:r.defaults.terrainShader,splitPosition:z(void 0),rollerShutter:!1,cameraMovableRegion:Xt(void 0),depthTestAgainstTerrain:!0,terrainOpacity:1,sceneGlobeBaseColor:et([1,1,1,1]),sceneBackgroundColor:et([0,0,0,0])}),r.createDefaultProps=()=>({...(0,r.createBaseProps)(),...(0,r.createCommonProps)()})})(vi||(vi={})),Fs(vi.prototype,vi.createDefaultProps);function W_(r,e){const t=r._lastCameraInfo;if(t){const n=e.viewerChanged.don(i=>{if(!i||!t)return;const{position:s,rotation:o}=t;e.flyIn(s,o,0),r._lastCameraInfo=void 0,n()})}}const xP=r=>{const e=vi.createCommonProps(),t={};try{Object.keys(e).forEach(n=>{t[n]=r[n]})}catch(n){console.warn(n)}return t},H_=(r,e)=>{const t=vi.createCommonProps();try{Object.keys(t).forEach(n=>{r[n]=e[n]})}catch(n){console.warn(n)}};class TP extends U{constructor(t){super();h(this,"_viewersChanged",this.disposeVar(new N));h(this,"_viewers",new Set);h(this,"_viewersToChange",this.dv(new N));this._sceneObjectsManager=t,(async()=>{for(let n of this.viewers){const i=this._sceneObjectsManager.sceneObjects;for(const s of i)await this.addSceneObject(s,n)}this.d(()=>{const n=this._sceneObjectsManager.sceneObjects;for(const i of this.viewers)i.delete(...n),this.destroyViewer(i);this._viewers.clear()}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don(async(n,i)=>{for(let s of this.viewers){n.forEach(o=>{this.deleteSceneObject(o,s)});for(let o of i)await this.addSceneObject(o,s)}if(i.length>0)for(let s of i)s.d(s.devTagsChanged.don(async()=>{for(let o of this.viewers){if(o.has(s)&&!su(o.devTags,s.devTags)){o.delete(s);continue}await this.addSceneObject(s,o)}})),s.ad(s.reloadEvent.don(async()=>{for(let o of this.viewers)o.has(s)&&(o.delete(s),await this.addSceneObject(s,o))}))})),this.d(this.viewersChanged.don(async(n,i)=>{const s=this._sceneObjectsManager.sceneObjects;n.forEach(o=>{for(let a of s)this.deleteSceneObject(a,o)});for(let o of i)for(let a of s)await this.addSceneObject(a,o);i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(async()=>{o.clearAllSceneObjects();const a=this._sceneObjectsManager.sceneObjects;for(let l of a)console.log("viewersChanged",o.devTags,l.devTags,su(o.devTags,l.devTags)),await this.addSceneObject(l,o)}))})}))})()}get viewersChanged(){return this._viewersChanged}get viewers(){return[...this._viewers]}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(t){const n=vi.context.createViewer(t);return this._viewers.add(n),this._viewersChanged.emit([],[n]),n}destroyViewer(t){return t.isDestroyed()?!0:this._viewers.has(t)?(this._viewers.delete(t),this._viewersChanged.emit([t],[]),t.destroy(),t.isDestroyed()):!1}async addSceneObject(t,n){su(n.devTags,t.devTags)&&(n.has(t)?console.warn(`${n.typeName}中已存${t.typeName},检查逻辑是否有问题!`):n.add(t))}deleteSceneObject(t,n){su(n.devTags,t.devTags)&&(n.has(t)?n.delete(t):console.warn(`${n.typeName}中不存在${t.typeName},检查逻辑是否有问题!`))}}class Th extends U{constructor(...t){super();h(this,"_drgm",this.dv(new gm));h(this,"_sobjm",this.dv(new pP));h(this,"_vrm",this.dv(new TP(this._sobjm)));h(this,"_sceneObjectEditingManager",this.disposeVar(new fP));h(this,"_activeViewer",this.dv(z(void 0)));h(this,"_syncOtherViewersToActived",this.dv(z(!1)));h(this,"_cmrvm",this.createSceneObjectFromClass(hh));h(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));h(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});h(this,"_sceneTree",this.dv(new ju("default",this.dragstartDataMananger,24,this)));h(this,"_sceneTreeMap",new Map);h(this,"_viewerCreatedEvent",this.dv(new N));h(this,"_lastCameraInfo");h(this,"_lastActiveViewerJson");h(this,"_syncEventDonFunc",this.d(Ne([this.activeViewerChanged,this.syncOtherViewersToActivedChanged],()=>{const t=this.syncOtherViewersToActived;this.viewers.forEach(n=>{t?n.syncOtherViewer(this.activeViewer):n.syncOtherViewer(void 0)})})));h(this,"_player",this.createSceneObjectFromClass(cl));h(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));h(this,"_esPlyarAndPathTime",this.dv(new lP(this)));h(this,"_pathAnimationManager",this.dv(new cP(this)))}getBrowserEnv(){return globalThis.ue&&globalThis.ue.es&&globalThis.ue.esinput?"ESWebView":"Browser"}static get envs(){return lt.context.environmentVariables}getSceneObjectById(t){return lt.getSceneObjectById(t)}getSceneObject(t){return lt.getSceneObject(t)}get $refs(){return lt.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(t){this._activeViewer.value=t,this.viewers.forEach(n=>n.actived=n===t)}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(t){this._syncOtherViewersToActived.value=t}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get completeJson(){var d;const t=this._asset.createdTime||new Date().toISOString(),n=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:t,modifiedTime:n,name:i},a=this.sceneTree.completeJson,l=this._cmrvm.views,u=[...this.viewers].map(f=>f.completeJson),c=(d=this.activeViewer)==null?void 0:d.getCurrentCameraInfo();return{asset:o,viewers:u,sceneTree:a,viewCollection:l,lastView:c}}get json(){var d;const t=this._asset.createdTime||new Date().toISOString(),n=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:t,modifiedTime:n,name:i},a=this.sceneTree.json,l=this._cmrvm.views,u=[...this.viewers].map(f=>f.json),c=(d=this.activeViewer)==null?void 0:d.getCurrentCameraInfo();return{asset:o,viewers:u,sceneTree:a,viewCollection:l,lastView:c}}set json(t){try{if(!t.asset)return;if(!t.asset.type||t.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=t.asset&&t.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=t.asset&&t.asset.modifiedTime||"",this._asset.name=t.asset&&t.asset.name||"未命名项目",this._asset.version=t.asset&&t.asset.version||"0.1.0",t.sceneTree&&(this.sceneTree.json=t.sceneTree),t.viewCollection&&(this._cmrvm.views=t.viewCollection),!t.viewers||!Array.isArray(t.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this.viewers.length===0||t.viewers.length===0){console.warn("viewers is empty !");return}this.viewers.forEach(n=>{const i=t.viewers.find(s=>s.id===n.id);i&&(n.json=i)})}catch(n){console.error(`ESObjectsManager解析json数据时发生错误! error: ${n}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(t="default"){if(t==="default")return this._sceneTree;if(!this._sceneTreeMap.has(t)){console.warn(`id为${t}的SceneTree不存在!`);return}return this._sceneTreeMap.get(t)}createSceneTree(t,n=24){if(this._sceneTreeMap.has(t)||t==="default")console.warn(`id为${t}的SceneTree已存在!`);else{const i=this.dv(new ju(t,this.dragstartDataMananger,n,this));this._sceneTreeMap.set(t,i)}return this.getSceneTree(t)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(t){const n=this._vrm.createViewer(t);this.activeViewer||(this.activeViewer=n);const i=this.d(n.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(n),i())}));return n}destroyViewer(t){return this._activeViewer.value===t&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(t)}switchViewer(t,n=!0,i=!0,s=!0){var u,c;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&n&&(this._lastCameraInfo=(u=this.activeViewer)==null?void 0:u.getCurrentCameraInfo(),((c=this.activeViewer)==null?void 0:c.typeName)=="ESOlViewer"&&this._lastCameraInfo&&(this._lastCameraInfo.rotation[1]=-90)),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?xP(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=t.id,a=o?[...this.getViewers()].find(d=>d.id===o):[...this.getViewers()].find(d=>d.typeName===t.type&&!d.container);if(a)if(o&&a.typeName!==t.type)console.warn(`id为${o}的viewer的typeName和option.type${t.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(a);else return console.log("ESViewer exists, will be used"),n&&W_(this,a),i&&this._lastActiveViewerJson&&(H_(a,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),a.container===j_(t.container)?(a.containerOrId=t.container,a.forceRecreate()):a.containerOrId=t.container,this.activeViewer=a,a;console.log("No ESViewer exists, will be created");const l=this.createViewer(t);return console.log(t),console.log(this),n&&W_(this,l),i&&this._lastActiveViewerJson&&(H_(l,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=l,l}switchToCesiumViewer(...t){if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)){const{container:n,viewSync:i,attributeSync:s,destroy:o,id:a}=t[0];return this.switchViewer({type:"ESCesiumViewer",container:n,id:a},i??!0,s??!0,o??!0)}else if(typeof t[0]=="string"||t[0]instanceof HTMLDivElement){const n={container:t[0],viewSync:t[1]??!0,attributeSync:t[2]??!0,destroy:t[3]??!0,id:t[4]},{container:i,viewSync:s,attributeSync:o,destroy:a,id:l}=n;return this.switchViewer({type:"ESCesiumViewer",container:i,id:l},s,o,a)}}switchToUEViewer(...t){let n,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)&&t[0].hasOwnProperty("uri")){const{container:l,uri:u,app:c,token:d,viewSync:f,attributeSync:p,destroy:_,id:S,silentTime:b}=t[0];n={type:"ESUeViewer",container:l,id:S,options:{uri:u,app:c,token:d,silentTime:b}},i={viewSync:f??!0,attributeSync:p??!0,destroy:_??!0}}else if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)&&t[0].hasOwnProperty("ws")){const{container:l,ws:u,esmsg:c,viewSync:d,attributeSync:f,id:p,destroy:_,silentTime:S}=t[0];n={type:"ESUeViewer",container:l,id:p,options:{ws:u,esmsg:c,silentTime:S}},i={viewSync:d??!0,attributeSync:f??!0,destroy:_??!0}}else if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)&&t[0].hasOwnProperty("project")){const{container:l,project:u,baseUrl:c,viewSync:d,attributeSync:f,id:p,destroy:_}=t[0];n={type:"ESUeViewer",container:l,id:p,options:{project:u,baseUrl:c}},i={viewSync:d??!0,attributeSync:f??!0,destroy:_??!0}}else(typeof t[0]=="string"||t[0]instanceof HTMLDivElement)&&(typeof t[1]=="string"&&t[1].startsWith("ws")?(n={type:"ESUeViewer",container:t[0],id:t[6],options:{ws:t[1],esmsg:t[2]??void 0,silentTime:t[7]??void 0}},i={viewSync:t[3]??!0,attributeSync:t[4]??!0,destroy:t[5]??!0}):typeof t[1]=="string"&&t[1].startsWith("http")?(n={type:"ESUeViewer",container:t[0],id:t[7],options:{uri:t[1],app:t[2],token:t[3]??void 0,silentTime:t[8]??void 0}},i={viewSync:t[4]??!0,attributeSync:t[5]??!0,destroy:t[6]??!0}):(n={type:"ESUeViewer",container:t[0],id:t[6],options:{project:t[1],baseUrl:t[2]??void 0}},i={viewSync:t[3]??!0,attributeSync:t[4]??!0,destroy:t[5]??!0}));if(!n)throw new Error("参数错误");const{viewSync:s,attributeSync:o,destroy:a}=i;return this.switchViewer(n,s,o,a)}createCesiumViewer(...t){let n;if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)?n={...t[0],type:"ESCesiumViewer"}:(typeof t[0]=="string"||t[0]instanceof HTMLDivElement)&&(n={container:t[0],options:t[1]??void 0,id:t[2]??void 0,type:"ESCesiumViewer"}),!n)throw new Error("参数错误");return this.createViewer(n)}createOpenLayersViewer(...t){let n;if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)?n={...t[0],type:"ESOlViewer"}:(typeof t[0]=="string"||t[0]instanceof HTMLDivElement)&&(n={container:t[0],options:t[1]??void 0,id:t[2]??void 0,type:"ESOlViewer"}),!n)throw new Error("参数错误");return this.createViewer(n)}createUeViewer(...t){let n;if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)?n={...t[0],type:"ESUeViewer"}:(typeof t[0]=="string"||t[0]instanceof HTMLDivElement)&&(typeof t[1]=="string"&&t[1].startsWith("ws")?n={type:"ESUeViewer",container:t[0],id:t[3]??void 0,options:{ws:t[1],esmsg:t[2]??void 0,silentTime:t[4]??void 0}}:typeof t[1]=="string"&&t[1].startsWith("http")?n={type:"ESUeViewer",container:t[0],id:t[4]??void 0,options:{uri:t[1],app:t[2],token:t[3]??void 0,silentTime:t[5]??void 0}}:n={type:"ESUeViewer",container:t[0],id:t[3]??void 0,options:{project:t[1],baseUrl:t[2]??void 0}}),!n)throw new Error("参数错误");return this.createViewer(n)}createSceneObject(t,n){return this._sobjm.createSceneObject(t,n)}createSceneObjectFromUrl(t,n){return this._sobjm.createSceneObjectFromUrl(t,n)}createSceneObjectFromClass(t,n){return this._sobjm.createSceneObjectFromClass(t,n)}createSceneObjectFromJson(t){return this._sobjm.createSceneObjectFromJson(t)}destroySceneObject(t){const n=this._sobjm.deleteSceneObject(t);return t.destroy(),n}destroyAllSceneObjects(){const t=[...this._sobjm.sceneObjects];for(let n of t)n!=this._player&&n!=this._cmrvm&&this.destroySceneObject(n)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}h(Th,"getSceneObjById",lt.context.getSceneObjectById.bind(lt.context)),h(Th,"getEnv",lt.context.getEnv.bind(lt.context)),h(Th,"setEnv",lt.context.setEnv.bind(lt.context)),v.BooleanProperty=X,v.BorderedPosFloatDiv=Bg,v.BoxPicker=Zh,v.CancelError=Jr,v.CancelsManager=ed,v.CanvasImagePoi=hw,v.CanvasPoi=od,v.CanvasPointPoi=dw,v.CanvasPrimitive=Ig,v.CanvasPrimitivesContext=fw,v.ColorProperty=Pt,v.ColorStops=rP,v.ComplexImage=Yu,v.CursorFloatDiv=yw,v.CursorInfo=_w,v.DashPatternProperty=dm,v.DateProperty=Oi,v.DatesProperty=vd,v.Debouncing=z0,v.DebouncingDeprecated=Jh,v.DebouncingWithStartValues=U0,v.Destroyable=U,v.DivBoxPicker=V0,v.DivPoi=kg,v.DivPointerClick=lw,v.DivideProperty=dt,v.DomElementEvent=ce,v.DoublyLinkedList=lg,v.DragStartDataManager=gm,v.ES3DTileset=mr,v.ESAlarm=If,v.ESApertureEffect=xf,v.ESAreaMeasurement=Tf,v.ESAttackArrow=Jp,v.ESBlastParticleSystem=Of,v.ESBoxClipping=Df,v.ESCameraView=uh,v.ESCameraViewCollection=hh,v.ESCameraVisibleRange=Nf,v.ESCar=dh,v.ESCityBasePoint=Dp,v.ESClassification=fh,v.ESClippingPlane=Mf,v.ESCustomDiv=ph,v.ESCylinder=Jo,v.ESCzml=Mp,v.ESDataMesh=Rf,v.ESDatasmithRuntimeModel=hp,v.ESDirectionMeasurement=ep,v.ESDistanceMeasurement=Lf,v.ESDynamicWater=dp,v.ESEntityCluster=xp,v.ESExcavate=Bu,v.ESFeatureLayer=Wp,v.ESFireParticleSystem=gh,v.ESFireWall=jf,v.ESForestTileset=Ff,v.ESFountainParticleSystem=Ch,v.ESGaussianSplatting=Ap,v.ESGeoBezierSpline=Tp,v.ESGeoDiv=Af,v.ESGeoDivTextPoi=Op,v.ESGeoExtrudedPolygon=Yo,v.ESGeoJson=Gu,v.ESGeoLineString=fn,v.ESGeoPoints=Xu,v.ESGeoPolygon=Bt,v.ESGeoPolygonWithFire=Vf,v.ESGeoRectangle=Bf,v.ESGeoVector=Ct,v.ESGeoWater=fp,v.ESGltfModel=qi,v.ESGltfModelEditing=Xp,v.ESHeatMap=bh,v.ESHeightLimitAnalysis=Ip,v.ESHeightMeasurement=rp,v.ESHole=wp,v.ESHuman=vr,v.ESHumanFountain=_p,v.ESHumanPoi=yp,v.ESHumans=Yp,v.ESImageLabel=mh,v.ESImageryLayer=zu,v.ESJArrowModeArray=wd,v.ESJClassificationTypeArray=_d,v.ESJEditingMode=Z,v.ESJLonLatFormat=pm,v.ESJPickedResult=Uw,v.ESLabel=gr,v.ESLandSlide=kp,v.ESLevelRuntimeModel=pp,v.ESLocalCircle=ip,v.ESLocalPolygon=Wu,v.ESLocalPolygonZ=sp,v.ESLocalRectangle=op,v.ESLocalSkyBox=Uf,v.ESLocalVector=al,v.ESLocalVector2D=Ps,v.ESLocationMeasurement=Gf,v.ESMCPClient=aP,v.ESMVTLayer=Hp,v.ESMediaLayer=qp,v.ESMsTileset=Sp,v.ESNavigator=Rp,v.ESObjectWithLocation=it,v.ESObjectsManager=Th,v.ESParticleSystemPrimitive=vh,v.ESPath=hl,v.ESPathImpl=io,v.ESPipeFence=wh,v.ESPipeline=gp,v.ESPipeserTileset=ap,v.ESPit=ul,v.ESPlayer=cl,v.ESPoi2D=Uu,v.ESPoi3D=Wf,v.ESPoiTileset=bp,v.ESPolygonFence=Eh,v.ESPolygonFlattenedPlane=Hf,v.ESPolygonWithHole=up,v.ESRectangle=lp,v.ESRtsFeatureEditing=Cp,v.ESRtsTileset=Ep,v.ESScale=Pp,v.ESSceneObject=lt,v.ESSceneObjectWithId=Sm,v.ESSeparateFoliage=qf,v.ESSignalInterference=$p,v.ESSkylineAnalysis=jp,v.ESSquadCombatArrow=kf,v.ESStaticMesh=Vp,v.ESSubmergingAnalysis=Xf,v.ESSunshineAnalysis=Yf,v.ESSurfaceAreaMeasurement=cp,v.ESTerrainLayer=Jf,v.ESTerrainLayerEditing=qu,v.ESTerrainLayerEditingBrushEarseFalloff=C_,v.ESTerrainLayerEditingFlattenMode=w_,v.ESTerrainLayerEditingFlattenPick=E_,v.ESTestObject=Pf,v.ESTextLabel=ll,v.ESUEWidget=$f,v.ESUnrealActor=Kf,v.ESVideoFusion=Zf,v.ESViewShed=Qf,v.ESViewer=vi,v.ESViewerStatusBar=Lp,v.ESViewerStatusBarScale=Fp,v.ESVisibilityAnalysis=mp,v.ESVisualObject=jt,v.ESVolumeMeasurement=vp,v.ESWidget=tp,v.EngineObject=$o,v.EnumProperty=st,v.EvalStringProperty=ls,v.Event=N,v.EventFromArrayUpdating=x0,v.EventListenerHandler=Ah,v.Fetching=R0,v.FloatDiv=ud,v.FlvJsLoading=Ih,v.FlvProcessing=R_,v.GetSetProperty=yd,v.Gif=lm,v.GifPlayer=am,v.GifProcessing=um,v.HasOwner=b0,v.HlsJsLoading=Ph,v.HlsProcessing=M_,v.IFrameBorderedPosFloatDiv=mw,v.ImageProcessing=Kg,v.IntervalDeprecated=Kh,v.JsonArrayProperty=ge,v.JsonProperty=ft,v.ListenerPipe=Fh,v.LocalFileServer=Jg,v.LocalRootDir=Yg,v.LongStringProperty=gc,v.MethodProperty=ut,v.NextAnimateFrameEvent=sc,v.NextAnimateFrameWeakEvent=cg,v.NextMicroTaskEvent=zh,v.NextMicroTaskWeakEvent=g0,v.Number2Property=Me,v.Number3Property=He,v.Number4Property=Sr,v.NumberProperty=M,v.NumberSliderProperty=Re,v.ObjPool=Qu,v.ObjResetting=Cw,v.ObjResettingWithEvent=Ie,v.ObservableArray=Jl,v.ObservableSet=pc,v.PickColorMananger=Fg,v.PickedInfo=zw,v.Player=$r,v.PlayerProperty=mc,v.PointerClick=sd,v.PointerClickDeprecated=wg,v.PointerHover=Pg,v.PointerHoverDeprecated=uw,v.PosFloatDiv=dd,v.PositionProperty=Di,v.Processing=We,v.Property=Vs,v.ReactVarProperty=Dn,v.ReactiveVariable=Ge,v.RotationProperty=iu,v.SceneObjectFromId=Sd,v.SceneTree=ju,v.SceneTreeContextMenu=By,v.SceneTreeItem=zn,v.SceneTreeItemDragDrop=jy,v.SmartListenerHandler=Gl,v.SmartListenerPipe=s0,v.SmoothMoveController=QS,v.StringProperty=ct,v.Throttling=ow,v.ThrottlingWithStartValues=aw,v.TimingDeprecated=yg,v.ToolTipDiv=vw,v.Transition=Ql,v.TransitionDeprecated=A0,v.Tree=Po,v.TreeItem=ru,v.TreeItemDragDrop=mm,v.UiTree=Wg,v.UiTreeObject=Gg,v.VideoProcessing=tm,v.ViewPlayerProperty=fm,v.ViewerCustomInteraction=G_,v.Watcher=ou,v.WatcherTools=bm,v.WithUndefinedProperty=md,v.XrPlayer=dc,v.Xyzw2Ns=lc,v._getFeatureProperty=d_,v._getLayerConfig=u_,v._getport=h_,v._saveLayerConfig=c_,v.addTreesCallFunc=$y,v.animateFrame=rc,v.apis=Sh,v.ary2Ns=M0,v.asyncFuncToCancelablePromise=q0,v.bind=tt,v.bindCustomEditing=_m,v.bindu=f0,v.booleanPointInPolygon=aE,v.buildFeatureTilesetUrl=l_,v.buildInfoUrl=bb,v.buildTilesetUrl=a_,v.calcArrowPoints=bf,v.canMoveToTreeItem=nu,v.canMoveToTreeItems=zg,v.cancelFuncToCancelablePromise=H0,v.cancelPromise=Qh,v.cancelableFetch=rd,v.cancelableFetchDeprecated=vg,v.cancelableFetchWithProgress=Y0,v.cartesianDistance=Ly,v.clamp=uc,v.clamp0_360=Oa,v.clampN180_180=ym,v.complexImageTypes=Qg,v.createAnimateFrame=Kl,v.createAnimateFrameWithStartValues=Ta,v.createBottomTriangleElement=jg,v.createCancelablePromise=xa,v.createCloseDiv=Vg,v.createEventsCallFunc=Ne,v.createFetching=J0,v.createFetchingWithStartValues=$0,v.createGuid=Ca,v.createInterval=ew,v.createIntervalWithStartValues=nw,v.createNextAnimateFrame=K0,v.createNextAnimateFrameEvent=Se,v.createNextAnimateFrameEventCallFunc=v0,v.createNextAnimateFrameWeakEvent=y0,v.createNextAnimateFrameWithStartValues=Z0,v.createNextMicroTask=Q0,v.createNextMicroTaskEvent=p0,v.createNextMicroTaskWeakEvent=m0,v.createNextMicroTaskWithStartValues=tw,v.createNumbers=ac,v.createProcessingFromAsyncFunc=nr,v.createProcessingFromAsyncFuncWithStartValues=X0,v.createProcessingFromPromiseCreateFunc=hc,v.createProcessingFromPromiseCreateFuncWithStartValues=nd,v.createSleeping=rw,v.createSleepingWithStartValues=iw,v.createStartFuncFromAsyncFunc=$l,v.createTimeout=Cg,v.createTimeoutWithStartValues=Sg,v.cutDownTreesCallFunc=Qy,v.czmPixelFormats=Zg,v.data=Eb,v.dataMd=Cb,v.debounce=nc,v.defaultGetLocalFilePath=Sw,v.defaultInitSceneObjectOnCreatingFunc=Ww,v.defaultLight122FromEnvironmentMapManager=Sf,v.defaultLoadFuncDocStr=i_,v.defaultLoadFuncStr=np,v.defaultLocalFileServer=$g,v.defaultStartUpdateFunc=oc,v.defaultUpdateSceneObjectOnPickingFunc=Gw,v.defineReactiveProp=$h,v.destroyObject=ig,v.diffGeoJson=Zw,v.downloadLink=C0,v.drawBubble=So,v.drawPoint=cw,v.drawRoundRectPath=xg,v.drawText=Tg,v.drawTextBlock=ad,v.engineObjectCreatedUpdate=Ay,v.equalsN3=oh,v.every=Gh,v.extendClassProps=Fs,v.fetchArrayBuffer=I0,v.fetchImage=pg,v.forEach=xi,v.forEachWithBreak=Uh,v.geoAlong=hE,v.geoArea=Nd,v.geoBuffer=Dy,v.geoCenterOfMass=OE,v.geoDestination=Ld,v.geoDifference=Ny,v.geoDistance=Pc,v.geoHeading=cu,v.geoIntersect=Ty,v.geoLineIntersect=BE,v.geoNearestPointOnLine=WE,v.geoPointToLineDistance=YE,v.geoPolygonFromCircle=My,v.geoPolygonOverlap=_f,v.geoPolylineToBezierSpline=ol,v.geoRhumbDestination=KE,v.geoRhumbDistance=tv,v.geoRhumbHeading=QE,v.geoUnion=Oy,v.getCameraTools=F_,v.getColorHexStr=eu,v.getCompleteReactParams=ec,v.getDefaultValue=Yw,v.getDistancesFromPositions=bs,v.getDomEventCurrentTargetPos=mn,v.getDrawRect=Co,v.getESMCPTools=k_,v.getElementBounds=Kw,v.getErrorResult=ue,v.getEventFromPromise=B0,v.getEventPosInCurrentTarget=ba,v.getExtProp=er,v.getFileArrayBuffer=Xg,v.getFileJson=qg,v.getFileText=fd,v.getFloatDivPool=hd,v.getGeoBoundingSphereFromPositions=Ry,v.getIterator=Hl,v.getMidpoint=UE,v.getMinMaxCorner=sh,v.getMinMaxPosition=P0,v.getPromiseCancel=Pa,v.getPromiseFromEvent=j0,v.getPromiseFromProcessing=id,v.getReactFuncs=Ul,v.getRtsServicePrefix=Xo,v.getSceneObjectTools=A_,v.getSceneObjectTreeItem=Hw,v.getSubEntriesFromDir=Hg,v.getSuccessResult=mi,v.getTypeFromImageUri=L_,v.getValueFromProps=hg,v.getXyzFromPostion=wf,v.growthSimulationCallFunc=t_,v.hasSameTags=vm,v.hasSameViewerTags=su,v.imageToCanvas=Og,v.inOrderRunning=Jw,v.interval=jh,v.isFeatureEqual=Em,v.isGeometryEqual=Cm,v.isJSON=Ed,v.isPromiseCancelable=Ia,v.isXML=Xw,v.lbhToWebMerc=sE,v.lbhToXyz=Kr,v.length=Wh,v.lerpAngle=yc,v.lerpRotation=Cd,v.loadGifFrames=sm,v.loadJs=Xh,v.map=Fy,v.max=os,v.min=As,v.moveToTreeItem=fc,v.moveToTreeItems=Ug,v.nextAnimateFrame=Sa,v.nextMicroTask=Wl,v.objsIterator=wo,v.oneTimeWarning=wa,v.optionsStr=gb,v.pairToPromise=td,v.parsePlatformFromUrl=s_,v.parseTileServiceName=o_,v.pluckProperty=Hh,v.react=z,v.reactArray=et,v.reactArrayCollection=l0,v.reactArrayCollectionWithUndefined=kh,v.reactArrayWithUndefined=Xt,v.reactDeepArray=tc,v.reactDeepArrayWithUndefined=Ls,v.reactJson=gt,v.reactJsonCollection=u0,v.reactJsonCollectionWithUndefined=c0,v.reactJsonWithUndefined=Kt,v.reactPlainObject=o0,v.reactPlainObjectWithUndefined=a0,v.reactPosition2Ds=Ef,v.reactPosition2DsSet=h0,v.reactPositions=_o,v.reactPositionsSet=ug,v.reduce=Yl,v.registerEventCtor=sg,v.registerEventUpdate=US,v.removeAllTreesCallFunc=Ky,v.requestAnimationFrameTimeStampTest=S0,v.rpToap=qw,v.saveOnBrowser=E0,v.setCanvasUniformColor=Dg,v.setExtProp=Ii,v.setPromiseCancel=ks,v.setSceneObjectTreeItem=vc,v.setValueFromProps=w0,v.sleep=Zl,v.sleepDeprecated=L0,v.step=Eo,v.stepProcessing=sw,v.throttle=qh,v.timeout=Bh,v.toGeoJson=wm,v.track=A,v.uint32ToUint8s=Rg,v.uint8ToHexStr=tu,v.uint8sToUint32=Lg,v.updateTreeParamsCallFunc=Zy,v.webMercToLbh=oE,v.xyz2N2=T0,v.xyz2N3=O0,v.xyzToLbh=bd,v.xyzw2N4=D0,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})}));
501
+ `,Kg='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',Zg='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',qi=class qi extends b{constructor(s){super();const e=()=>{const t=this.dv(new Qn);this.d(_([t,"show"],[s,"useDefaultStatusDiv"]));{const i=()=>{t.show=(s.useDefaultStatusDiv??!0)&&s.status!=="Created"};i(),this.d(s.useDefaultStatusDivChanged.don(i)),this.d(s.statusChanged.don(i)),t.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}s.add(t),this.d(()=>s.delete(t)),t.instanceClass=class extends b{constructor(o,h,c){super();a(this,"_div",document.createElement("div"));if(this._subContainer=o,!c)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const w=()=>{h.show?this._div.style.opacity="1":this._div.style.opacity="0"};w(),this.d(h.showChanged.don(w))}let l,u,p,g,f;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",l=document.createElement("div"),this._div.appendChild(l),l.style.width="auto",l.style.position="absolute",l.style.left="50%",l.style.top="50%",l.style.transform="translate(-50%,-50%)",l.style.background="rgba(120, 120, 0, 0.7)",l.style.color="white",l.style.fontSize="10px",l.style.background="none",l.style.display="flex",l.style.justifyContent="center",l.style.alignItems="center",u=document.createElement("div"),l.appendChild(u),u.style.pointerEvents="none",u.style.display="block",u.style.width="40px",u.innerHTML=qi.defaultsSvg.loadingSvg,u.style.filter="drop-shadow(0px 0px 1px black)",p=document.createElement("div"),l.appendChild(p),p.style.pointerEvents="none",p.style.marginLeft="10px",p.style.display="flex",p.style.flexFlow="column",p.style.maxWidth="300px",g=document.createElement("div"),p.appendChild(g),g.style.fontSize="14px",g.style.fontWeight="800",g.style.marginBottom="5px",g.style.textShadow="0 0 2px black",f=document.createElement("div"),p.appendChild(f),f.style.fontWeight="400",f.style.textShadow="0 0 2px black";{const w=()=>{let C="Raw";c.status==="Raw"?C="初始状态":c.status==="Creating"?C="正在创建":c.status==="Created"?C="创建完成":c.status==="Error"?C="创建失败":c.status==="Reconnecting"&&(C="重新连接"),g.innerText=`${C}(${c.status})`,f.innerText=`${c.statusLog}`,(c.status==="Creating"||c.status==="Reconnecting")&&(u.innerHTML=qi.defaultsSvg.loadingSvg),c.status==="Created"&&(u.innerHTML=qi.defaultsSvg.successSvg),c.status==="Error"&&(u.innerHTML=qi.defaultsSvg.warnSvg)};w();const E=this.dv(ae(c.statusLogChanged,c.statusChanged));this.d(E.don(w))}}update(){const o=255*Math.random()|0,h=255*Math.random()|0,c=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${h}, ${c}, 0.8)`}}};this.d(s.containerChanged.don(()=>{e()}))}};a(qi,"defaultsSvg",{loadingSvg:Yg,successSvg:Kg,warnSvg:Zg});let Xa=qi;class Qg extends b{constructor(s,e,t){super(),this._subContainer=s,this._overlayContainer=e,this._viewer=t;const i=this._subContainer,r=this._overlayContainer,o=this._viewer,h=()=>{const u=o.zIndex??"";i.style.zIndex=u,r.style.zIndex=u};h(),this.d(o.zIndexChanged.don(h));const c=()=>{i.style.display=o.show??!0?"block":"none"};c(),this.d(o.showChanged.don(c));const l=()=>{i.style.opacity=`${o.opacity??1}`};l(),this.d(o.opacityChanged.don(l))}}function gr(n){let s=Ae(n,"_relativeContainer");return s||(s=document.createElement("div"),s.style.position="relative",s.style.width="100%",s.style.height="100%",s.style.padding="0",s.style.margin="0",n.appendChild(s),gt(n,"_relativeContainer",s)),s}class ef extends b{constructor(e,t){super();a(this,"_subContainer",document.createElement("div"));a(this,"_overlayContainer",document.createElement("div"));a(this,"_containerStyleController");this._container=e,this._viewer=t,this._containerStyleController=this.dv(new Qg(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:r}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),r.style.position="relative",r.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),gr(this._container).appendChild(i),this.d(()=>gr(this._container).removeChild(i)),gr(this._container).appendChild(r),this.d(()=>gr(this._container).removeChild(r))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class tf extends b{constructor(){super(...arguments);a(this,"registerObjsMap",new Map)}register(e,t){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,t),e}getViewerConstructor(e){const t=this.registerObjsMap.get(e);if(!t){console.warn(`未找到${e}类!`);return}return t}createViewer(e){const t=e.type;console.log(e);const i=this.getViewerConstructor(t);if(!i)throw new Error(`没有找到类型为${t}的Viewer构造器!`);return new i(e)}}class Wl extends b{constructor(s,e,t=!1,i=!1){if(super(),this._viewer=s,!e)throw new Error("ViewerCustomInteraction: container is null");const r=this.dv(se.create(e,"pointerdown")),o=this.dv(se.create(e,"pointermove")),h=this.dv(se.create(e,"pointerup")),c=this.dv(se.create(e,"pointerout")),l=this.dv(se.create(e,"pointerover")),u=this.dv(new Jr),p=this.dv(new Eh),g=()=>{const I=this._viewer.hoverTime*1e3;p.delayTime=I};this.d(this._viewer.hoverTimeChanged.don(()=>{g()})),this.d(r.don(I=>u.pointerDown(I))),this.d(o.don(I=>u.pointerMove(I))),this.d(h.don(I=>u.pointerUp(I))),this.d(c.don(I=>u.pointerOut(I))),this.d(r.don(I=>p.pointerDown(I))),this.d(o.don(I=>p.pointerMove(I))),this.d(h.don(I=>p.pointerUp(I))),this.d(c.don(I=>p.pointerOut(I)));const{x:f,y:w}=e.getBoundingClientRect(),E=i?f:0,C=i?w:0;this.d(p.hoverEvent.don(I=>{const[H,q]=Qi(I,t);this._viewer.hoverEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(u.clickEvent.don(I=>{const[H,q]=Qi(I,t);this._viewer.clickEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(u.dbclickEvent.don(I=>{const[H,q]=Qi(I,t);I.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(r.don(I=>{const[H,q]=Qi(I,t);I.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(h.don(I=>{const[H,q]=Qi(I,t);I.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(o.don(I=>{const[H,q]=Ee(I,t);this._viewer.pointerMoveEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(l.don(I=>{const[H,q]=Ee(I,t);this._viewer.pointerOverEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(c.don(I=>{const[H,q]=Ee(I,t);this._viewer.pointerOutEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})}));const T=this.dv(se.create(e,"keydown"));this.d(T.don(I=>this._viewer.keyDownEvent.emit(I)));const R=this.dv(se.create(e,"keyup"));this.d(R.don(I=>this._viewer.keyUpEvent.emit(I)));const V=this.dv(se.create(e,"wheel"));this.d(V.don(I=>this._viewer.wheelEvent.emit(I)))}}const qt=class qt extends b{constructor(e){super();a(this,"_forceRecreateEvent",this.dv(new m));a(this,"_container",this.dv(y(void 0)));a(this,"_containerSize",this.dv(y(void 0)));a(this,"_editingEvent",this.disposeVar(new m));a(this,"_esViewerExtensions",this.dv(new $g(this)));a(this,"_status",this.dv(y("Raw")));a(this,"_statusLog",this.dv(y("")));a(this,"_statusContainer",this.dv(new Xa(this)));a(this,"_useCustomInteraction",this.dv(y(!0)));a(this,"_resetInteractionEvent",this.dv(ae(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));a(this,"_interactionResetting",this.dv(new ce(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new Wl(this,this.container)})));a(this,"_viewerChanged",this.dv(new m));a(this,"_cameraChanged",this.dv(new m));a(this,"_containerResetEvent",this.dv(ae(this.containerChanged,this._forceRecreateEvent)));a(this,"_containerResetting",this.dv(new ce(this._containerResetEvent,()=>{if(this.container)return new ef(this.container,this)})));a(this,"_sceneObjectsMap",new Map);a(this,"_id");a(this,"_typeName");a(this,"_updateFuncReact",this.dv(y(void 0)));a(this,"_toDestroyFuncReact",this.dv(y(void 0)));a(this,"_statusInfo",qt.defaults.statusInfo);a(this,"_navigationMode",this.dv(y("Map")));a(this,"_navigationEvent",this.disposeVar(new m));a(this,"_syncViewer",this.dv(y(void 0)));a(this,"_syncEventDon",this.dv(new ce(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new Xg(this,e)})));a(this,"_timeSyncdon",this.dv(new ce(this.timeSyncChanged,()=>{if(this.timeSync)return new qg(this)})));a(this,"_hoverEvent",this.dv(new m));a(this,"_pointerOverEvent",this.dv(new m));a(this,"_pointerMoveEvent",this.dv(new m));a(this,"_pointerDownEvent",this.dv(new m));a(this,"_pointerUpEvent",this.dv(new m));a(this,"_pointerOutEvent",this.dv(new m));a(this,"_clickEvent",this.dv(new m));a(this,"_dblclickEvent",this.dv(new m));a(this,"_keyDownEvent",this.dv(new m));a(this,"_keyUpEvent",this.dv(new m));a(this,"_wheelEvent",this.dv(new m));a(this,"_actived",this.dv(y(!1)));this._id=e.id??Ki();const t=Vl(e.container);if(t)this._container.value=qa(t),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{t&&(this.show??!0?t.style.display="block":t.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,r=()=>{for(let[h,c]of i.entries())if(!c&&h){const l=Ti.context.createEngineObject(h,this);l&&i.set(h,l)}},o=()=>{for(let[h,c]of i.entries())c&&!c.isDestroyed()&&c.destroy(),i.set(h,void 0)};this.d(o),this.d(this.viewerChanged.don(h=>{o(),h&&r()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(r){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${r}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(o){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let r;this.d(()=>r&&r.destroy()),this.d(this.updateFuncChanged.don(()=>{r&&r.cancel(),this.updateFunc&&(r=r||Ks(),r.restart(void 0,o=>{this.updateFunc&&this.updateFunc(this,o)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(r){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${r}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new Jg(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const t=document.getElementById(e);t&&t instanceof HTMLDivElement?this._container.value=qa(t):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=qa(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get esViewerExtensions(){return this._esViewerExtensions}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get cameraChanged(){return this._cameraChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let t of e)if(!this.has(t)){k.context.addSceneObject(t);const i=Ti.context.createEngineObject(t,this);i&&this._sceneObjectsMap.set(t,i),t.viewerAttached.emit(this)}}delete(...e){for(let t of e)if(this.has(t)){const i=this._sceneObjectsMap.get(t);i&&i.destroy(),k.context.deleteSceneObject(t),this._sceneObjectsMap.delete(t),t.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return qt.createDefaultProps()}get completeJson(){return this._getJson(!1)}_getJson(e=!0){const t={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let r,o=this.defaultProps[i];o instanceof fe?r=o.equals(this[i]):r=o===this[i],r||(t[i]=this[i])}else t[i]=this[i];return t}_setJson(e,t,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const r=t||[];r.push("id","type");const o=Object.keys(this.defaultProps).filter(h=>!r.includes(h));for(let h of o)if(h in e)this[h]=e[h]===null?void 0:e[h];else if(!(i??!1)){let c=this.defaultProps[h];c instanceof fe&&(c=c.value),this[h]=c}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}get navigationEvent(){return this._navigationEvent}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(t){console.warn(`时间格式不正确! value: ${e} error: ${t}`)}}async getVersion(){return globalThis.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}getESProperties(){return{defaultMenu:"general",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[],more:[]}}async getCurrentRectangle(){var e;try{const t=(e=this.container)==null?void 0:e.getBoundingClientRect();if(!t)return;const{width:i,height:r}=t,o=await this.quickPickPosition([0,0]),h=await this.quickPickPosition([i,r]);return!o||!h?void 0:[o[0],h[1],h[0],o[1]]}catch(t){console.error(t);return}}};a(qt,"context",new tf),a(qt,"register",qt.context.register.bind(qt.context)),a(qt,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0,cameraMovableRegion:[0,0,0,0,0,0],depthTestAgainstTerrain:!0,terrainOpacity:1});let nt=qt;(n=>{n.createBaseProps=()=>({name:"未命名场景对象",extras:W(void 0),devTags:ee(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),n.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:1024,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:ee(void 0),editingAuxiliaryPointColor:ee(void 0),editingLineWidth:void 0,editingLineColor:ee(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:n.defaults.terrainShader,splitPosition:y(void 0),rollerShutter:!1,cameraMovableRegion:ee(void 0),depthTestAgainstTerrain:!0,terrainOpacity:1,sceneGlobeBaseColor:F([1,1,1,1]),sceneBackgroundColor:F([0,0,0,0])}),n.createDefaultProps=()=>({...(0,n.createBaseProps)(),...(0,n.createCommonProps)()})})(nt||(nt={})),Yt(nt.prototype,nt.createDefaultProps);function Bl(n,s){const e=n._lastCameraInfo;if(e){const t=s.viewerChanged.don(i=>{if(!i||!e)return;const{position:r,rotation:o}=e;s.flyIn(r,o,0),n._lastCameraInfo=void 0,t()})}}const sf=n=>{const s=nt.createCommonProps(),e={};try{Object.keys(s).forEach(t=>{e[t]=n[t]})}catch(t){console.warn(t)}return e},Hl=(n,s)=>{const e=nt.createCommonProps();try{Object.keys(e).forEach(t=>{n[t]=s[t]})}catch(t){console.warn(t)}};class nf extends b{constructor(e){super();a(this,"_viewersChanged",this.disposeVar(new m));a(this,"_viewers",new Set);a(this,"_viewersToChange",this.dv(new m));this._sceneObjectsManager=e,(async()=>{for(let t of this.viewers){const i=this._sceneObjectsManager.sceneObjects;for(const r of i)await this.addSceneObject(r,t)}this.d(()=>{const t=this._sceneObjectsManager.sceneObjects;for(const i of this.viewers)i.delete(...t),this.destroyViewer(i);this._viewers.clear()}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don(async(t,i)=>{for(let r of this.viewers){t.forEach(o=>{this.deleteSceneObject(o,r)});for(let o of i)await this.addSceneObject(o,r)}if(i.length>0)for(let r of i)r.d(r.devTagsChanged.don(async()=>{for(let o of this.viewers){if(o.has(r)&&!on(o.devTags,r.devTags)){o.delete(r);continue}await this.addSceneObject(r,o)}})),r.ad(r.reloadEvent.don(async()=>{for(let o of this.viewers)o.has(r)&&(o.delete(r),await this.addSceneObject(r,o))}))})),this.d(this.viewersChanged.don(async(t,i)=>{const r=this._sceneObjectsManager.sceneObjects;t.forEach(o=>{for(let h of r)this.deleteSceneObject(h,o)});for(let o of i)for(let h of r)await this.addSceneObject(h,o);i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(async()=>{o.clearAllSceneObjects();const h=this._sceneObjectsManager.sceneObjects;for(let c of h)console.log("viewersChanged",o.devTags,c.devTags,on(o.devTags,c.devTags)),await this.addSceneObject(c,o)}))})}))})()}get viewersChanged(){return this._viewersChanged}get viewers(){return[...this._viewers]}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const t=nt.context.createViewer(e);return this._viewers.add(t),this._viewersChanged.emit([],[t]),t}destroyViewer(e){return e.isDestroyed()?!0:this._viewers.has(e)?(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed()):!1}async addSceneObject(e,t){on(t.devTags,e.devTags)&&(t.has(e)?console.warn(`${t.typeName}中已存${e.typeName},检查逻辑是否有问题!`):t.add(e))}deleteSceneObject(e,t){on(t.devTags,e.devTags)&&(t.has(e)?t.delete(e):console.warn(`${t.typeName}中不存在${e.typeName},检查逻辑是否有问题!`))}}class fr extends b{constructor(...e){super();a(this,"_drgm",this.dv(new uc));a(this,"_sobjm",this.dv(new Bg));a(this,"_vrm",this.dv(new nf(this._sobjm)));a(this,"_sceneObjectEditingManager",this.disposeVar(new Wg));a(this,"_activeViewer",this.dv(y(void 0)));a(this,"_syncOtherViewersToActived",this.dv(y(!1)));a(this,"_cmrvm",this.createSceneObjectFromClass(Yn));a(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));a(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});a(this,"_sceneTree",this.dv(new cn("default",this.dragstartDataMananger,24,this)));a(this,"_sceneTreeMap",new Map);a(this,"_viewerCreatedEvent",this.dv(new m));a(this,"_lastCameraInfo");a(this,"_lastActiveViewerJson");a(this,"_syncEventDonFunc",this.d(ue([this.activeViewerChanged,this.syncOtherViewersToActivedChanged],()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(t=>{e?t.syncOtherViewer(this.activeViewer):t.syncOtherViewer(void 0)})})));a(this,"_player",this.createSceneObjectFromClass(cs));a(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));a(this,"_esPlyarAndPathTime",this.dv(new Ng(this)));a(this,"_pathAnimationManager",this.dv(new Lg(this)))}getBrowserEnv(){return globalThis.ue&&globalThis.ue.es&&globalThis.ue.esinput?"ESWebView":"Browser"}static get envs(){return k.context.environmentVariables}getSceneObjectById(e){return k.getSceneObjectById(e)}getSceneObject(e){return k.getSceneObject(e)}get $refs(){return k.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e,this.viewers.forEach(t=>t.actived=t===e)}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get completeJson(){var p;const e=this._asset.createdTime||new Date().toISOString(),t=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:t,name:i},h=this.sceneTree.completeJson,c=this._cmrvm.views,l=[...this.viewers].map(g=>g.completeJson),u=(p=this.activeViewer)==null?void 0:p.getCurrentCameraInfo();return{asset:o,viewers:l,sceneTree:h,viewCollection:c,lastView:u}}get json(){var p;const e=this._asset.createdTime||new Date().toISOString(),t=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:t,name:i},h=this.sceneTree.json,c=this._cmrvm.views,l=[...this.viewers].map(g=>g.json),u=(p=this.activeViewer)==null?void 0:p.getCurrentCameraInfo();return{asset:o,viewers:l,sceneTree:h,viewCollection:c,lastView:u}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this.viewers.length===0||e.viewers.length===0){console.warn("viewers is empty !");return}this.viewers.forEach(t=>{const i=e.viewers.find(r=>r.id===t.id);i&&(t.json=i)})}catch(t){console.error(`ESObjectsManager解析json数据时发生错误! error: ${t}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,t=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new cn(e,this.dragstartDataMananger,t,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const t=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=t);const i=this.d(t.viewerChanged.don(r=>{r&&(this._viewerCreatedEvent.emit(t),i())}));return t}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,t=!0,i=!0,r=!0){var l,u;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&t&&(this._lastCameraInfo=(l=this.activeViewer)==null?void 0:l.getCurrentCameraInfo(),((u=this.activeViewer)==null?void 0:u.typeName)=="ESOlViewer"&&this._lastCameraInfo&&(this._lastCameraInfo.rotation[1]=-90)),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?sf(this.activeViewer):void 0),r&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=e.id,h=o?[...this.getViewers()].find(p=>p.id===o):[...this.getViewers()].find(p=>p.typeName===e.type&&!p.container);if(h)if(o&&h.typeName!==e.type)console.warn(`id为${o}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(h);else return console.log("ESViewer exists, will be used"),t&&Bl(this,h),i&&this._lastActiveViewerJson&&(Hl(h,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),h.container===Vl(e.container)?(h.containerOrId=e.container,h.forceRecreate()):h.containerOrId=e.container,this.activeViewer=h,h;console.log("No ESViewer exists, will be created");const c=this.createViewer(e);return console.log(e),console.log(this),t&&Bl(this,c),i&&this._lastActiveViewerJson&&(Hl(c,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=c,c}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:t,viewSync:i,attributeSync:r,destroy:o,id:h}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:t,id:h},i??!0,r??!0,o??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const t={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:r,attributeSync:o,destroy:h,id:c}=t;return this.switchViewer({type:"ESCesiumViewer",container:i,id:c},r,o,h)}}switchToUEViewer(...e){let t,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:c,uri:l,app:u,token:p,viewSync:g,attributeSync:f,destroy:w,id:E,silentTime:C}=e[0];t={type:"ESUeViewer",container:c,id:E,options:{uri:l,app:u,token:p,silentTime:C}},i={viewSync:g??!0,attributeSync:f??!0,destroy:w??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:c,ws:l,esmsg:u,viewSync:p,attributeSync:g,id:f,destroy:w,silentTime:E}=e[0];t={type:"ESUeViewer",container:c,id:f,options:{ws:l,esmsg:u,silentTime:E}},i={viewSync:p??!0,attributeSync:g??!0,destroy:w??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:c,project:l,baseUrl:u,viewSync:p,attributeSync:g,id:f,destroy:w}=e[0];t={type:"ESUeViewer",container:c,id:f,options:{project:l,baseUrl:u}},i={viewSync:p??!0,attributeSync:g??!0,destroy:w??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(t={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0,silentTime:e[7]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(t={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0,silentTime:e[8]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(t={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!t)throw new Error("参数错误");const{viewSync:r,attributeSync:o,destroy:h}=i;return this.switchViewer(t,r,o,h)}createCesiumViewer(...e){let t;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?t={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(t={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!t)throw new Error("参数错误");return this.createViewer(t)}createOpenLayersViewer(...e){let t;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?t={...e[0],type:"ESOlViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(t={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESOlViewer"}),!t)throw new Error("参数错误");return this.createViewer(t)}createUeViewer(...e){let t;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?t={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?t={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0,silentTime:e[4]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?t={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0,silentTime:e[5]??void 0}}:t={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!t)throw new Error("参数错误");return this.createViewer(t)}createSceneObject(e,t){return this._sobjm.createSceneObject(e,t)}createSceneObjectFromUrl(e,t){return this._sobjm.createSceneObjectFromUrl(e,t)}createSceneObjectFromClass(e,t){return this._sobjm.createSceneObjectFromClass(e,t)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const t=this._sobjm.deleteSceneObject(e);return e.destroy(),t}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let t of e)t!=this._player&&t!=this._cmrvm&&this.destroySceneObject(t)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}a(fr,"getSceneObjById",k.context.getSceneObjectById.bind(k.context)),a(fr,"getEnv",k.context.getEnv.bind(k.context)),a(fr,"setEnv",k.context.setEnv.bind(k.context)),d.BooleanProperty=S,d.BorderedPosFloatDiv=Nh,d.BoxPicker=zr,d.CancelError=et,d.CancelsManager=Br,d.CanvasImagePoi=hu,d.CanvasPoi=qr,d.CanvasPointPoi=cu,d.CanvasPrimitive=Ch,d.CanvasPrimitivesContext=lu,d.ColorProperty=G,d.ColorStops=kg,d.ComplexImage=_n,d.CursorFloatDiv=fu,d.CursorInfo=mu,d.DashPatternProperty=cc,d.DateProperty=vt,d.DatesProperty=no,d.Debouncing=Vd,d.DebouncingDeprecated=Nr,d.DebouncingWithStartValues=Ld,d.Destroyable=b,d.DivBoxPicker=Rd,d.DivPoi=jh,d.DivPointerClick=ru,d.DivideProperty=L,d.DomElementEvent=se,d.DoublyLinkedList=oh,d.DragStartDataManager=uc,d.ES3DTileset=Le,d.ESAlarm=Eo,d.ESApertureEffect=Co,d.ESAreaMeasurement=So,d.ESAttackArrow=Ga,d.ESBlastParticleSystem=Po,d.ESBoxClipping=To,d.ESCameraView=qn,d.ESCameraViewCollection=Yn,d.ESCameraVisibleRange=Io,d.ESCar=Kn,d.ESCityBasePoint=Ia,d.ESClassification=Zn,d.ESClippingPlane=Oo,d.ESCustomDiv=Qn,d.ESCylinder=Pi,d.ESCzml=Da,d.ESDataMesh=Do,d.ESDatasmithRuntimeModel=ha,d.ESDirectionMeasurement=Zo,d.ESDistanceMeasurement=Fo,d.ESDynamicWater=ca,d.ESEntityCluster=Sa,d.ESExcavate=ln,d.ESFeatureLayer=Ua,d.ESFireParticleSystem=er,d.ESFireWall=Ro,d.ESForestTileset=xo,d.ESFountainParticleSystem=ar,d.ESGaussianSplatting=Ma,d.ESGeoBezierSpline=Pa,d.ESGeoDiv=ko,d.ESGeoDivTextPoi=Ta,d.ESGeoExtrudedPolygon=Si,d.ESGeoJson=pn,d.ESGeoLineString=we,d.ESGeoPoints=vn,d.ESGeoPolygon=Q,d.ESGeoPolygonWithFire=jo,d.ESGeoRectangle=Ao,d.ESGeoVector=$,d.ESGeoWater=la,d.ESGltfModel=yt,d.ESGltfModelEditing=Ha,d.ESHeatMap=dr,d.ESHeightLimitAnalysis=Ca,d.ESHeightMeasurement=ea,d.ESHole=va,d.ESHuman=ze,d.ESHumanFountain=ma,d.ESHumanPoi=fa,d.ESHumans=$a,d.ESImageLabel=tr,d.ESImageryLayer=dn,d.ESJArrowModeArray=ao,d.ESJClassificationTypeArray=oo,d.ESJEditingMode=D,d.ESJLonLatFormat=dc,d.ESJPickedResult=Lu,d.ESLabel=Ve,d.ESLandSlide=ja,d.ESLevelRuntimeModel=da,d.ESLocalCircle=ta,d.ESLocalPolygon=gn,d.ESLocalPolygonZ=ia,d.ESLocalRectangle=sa,d.ESLocalSkyBox=Vo,d.ESLocalVector=os,d.ESLocalVector2D=zt,d.ESLocationMeasurement=Lo,d.ESMCPClient=Ag,d.ESMVTLayer=Wa,d.ESMediaLayer=Ba,d.ESMsTileset=ya,d.ESNavigator=Fa,d.ESObjectWithLocation=M,d.ESObjectsManager=fr,d.ESParticleSystemPrimitive=ir,d.ESPath=ls,d.ESPathImpl=ei,d.ESPipeFence=rr,d.ESPipeline=ua,d.ESPipeserTileset=na,d.ESPit=hs,d.ESPlayer=cs,d.ESPoi2D=un,d.ESPoi3D=zo,d.ESPoiTileset=ba,d.ESPolygonFence=or,d.ESPolygonFlattenedPlane=Uo,d.ESPolygonWithHole=oa,d.ESPolygonsFlattenedPlane=Wo,d.ESRectangle=ra,d.ESRtsFeatureEditing=wa,d.ESRtsTileset=_a,d.ESScale=Ea,d.ESSceneObject=k,d.ESSceneObjectWithId=yc,d.ESSeparateFoliage=Bo,d.ESSignalInterference=Ja,d.ESSkylineAnalysis=Aa,d.ESSquadCombatArrow=Mo,d.ESStaticMesh=Ra,d.ESSubmergingAnalysis=Ho,d.ESSunshineAnalysis=$o,d.ESSurfaceAreaMeasurement=aa,d.ESTerrainLayer=Go,d.ESTerrainLayerEditing=mn,d.ESTerrainLayerEditingBrushEarseFalloff=bl,d.ESTerrainLayerEditingFlattenMode=wl,d.ESTerrainLayerEditingFlattenPick=yl,d.ESTestObject=bo,d.ESTextLabel=as,d.ESUEWidget=Jo,d.ESUnrealActor=qo,d.ESVideoFusion=Xo,d.ESViewShed=Yo,d.ESViewer=nt,d.ESViewerStatusBar=xa,d.ESViewerStatusBarScale=ka,d.ESVisibilityAnalysis=pa,d.ESVisualObject=Y,d.ESVolumeMeasurement=ga,d.ESWidget=Ko,d.EngineObject=Ti,d.EnumProperty=j,d.EvalStringProperty=Vt,d.Event=m,d.EventFromArrayUpdating=Sd,d.EventListenerHandler=Cr,d.Fetching=Fd,d.FloatDiv=Kr,d.FlvJsLoading=pr,d.FlvProcessing=kl,d.GetSetProperty=ro,d.Gif=rc,d.GifPlayer=nc,d.GifProcessing=oc,d.HasOwner=bd,d.HlsJsLoading=ur,d.HlsProcessing=xl,d.IFrameBorderedPosFloatDiv=pu,d.ImageProcessing=qh,d.IntervalDeprecated=Lr,d.JsonArrayProperty=re,d.JsonProperty=z,d.ListenerPipe=Er,d.LocalFileServer=Gh,d.LocalRootDir=$h,d.LongStringProperty=Vn,d.MethodProperty=N,d.NextAnimateFrameEvent=On,d.NextAnimateFrameWeakEvent=ah,d.NextMicroTaskEvent=Dr,d.NextMicroTaskWeakEvent=ud,d.Number2Property=pe,d.Number3Property=ve,d.Number4Property=Je,d.NumberProperty=v,d.NumberSliderProperty=ge,d.ObjPool=En,d.ObjResetting=wu,d.ObjResettingWithEvent=ce,d.ObservableArray=Xs,d.ObservableSet=Nn,d.PickColorMananger=kh,d.PickedInfo=Vu,d.Player=tt,d.PlayerProperty=Ln,d.PointerClick=Jr,d.PointerClickDeprecated=vh,d.PointerHover=Eh,d.PointerHoverDeprecated=ou,d.PosFloatDiv=eo,d.PositionProperty=_t,d.Processing=me,d.Property=Qt,d.ReactVarProperty=Ie,d.ReactiveVariable=fe,d.RotationProperty=rn,d.SceneObjectFromId=lo,d.SceneTree=cn,d.SceneTreeContextMenu=Nc,d.SceneTreeItem=Oe,d.SceneTreeItemDragDrop=Ac,d.SmartListenerHandler=Bs,d.SmartListenerPipe=id,d.SmoothMoveController=Op,d.StringProperty=A,d.Throttling=su,d.ThrottlingWithStartValues=nu,d.TimingDeprecated=fh,d.ToolTipDiv=gu,d.Transition=Qs,d.TransitionDeprecated=Md,d.Tree=bi,d.TreeItem=nn,d.TreeItemDragDrop=pc,d.UiTree=Uh,d.UiTreeObject=zh,d.VideoProcessing=Kh,d.ViewPlayerProperty=lc,d.ViewerCustomInteraction=Wl,d.Watcher=an,d.WatcherTools=bc,d.WithUndefinedProperty=so,d.XrPlayer=Rn,d.Xyzw2Ns=xn,d._getFeatureProperty=dl,d._getLayerConfig=hl,d._getport=ll,d._saveLayerConfig=cl,d.addTreesCallFunc=Jc,d.animateFrame=Tn,d.apis=lr,d.ary2Ns=Dd,d.asyncFuncToCancelablePromise=Bd,d.bind=x,d.bindCustomEditing=mc,d.bindu=ld,d.booleanPointInPolygon=np,d.buildFeatureTilesetUrl=al,d.buildInfoUrl=Qp,d.buildTilesetUrl=ol,d.calcArrowPoints=yo,d.canMoveToTreeItem=sn,d.canMoveToTreeItems=Vh,d.cancelFuncToCancelablePromise=Wd,d.cancelPromise=Ur,d.cancelableFetch=$r,d.cancelableFetchDeprecated=gh,d.cancelableFetchWithProgress=$d,d.cartesianDistance=xc,d.clamp=kn,d.clamp0_360=ns,d.clampN180_180=fc,d.complexImageTypes=Yh,d.createAnimateFrame=Ks,d.createAnimateFrameWithStartValues=ss,d.createBottomTriangleElement=Ah,d.createCancelablePromise=is,d.createCloseDiv=Rh,d.createEventsCallFunc=ue,d.createFetching=Gd,d.createFetchingWithStartValues=Jd,d.createGuid=Ki,d.createInterval=Zd,d.createIntervalWithStartValues=Qd,d.createNextAnimateFrame=qd,d.createNextAnimateFrameEvent=ae,d.createNextAnimateFrameEventCallFunc=gd,d.createNextAnimateFrameWeakEvent=fd,d.createNextAnimateFrameWithStartValues=Xd,d.createNextMicroTask=Yd,d.createNextMicroTaskEvent=dd,d.createNextMicroTaskWeakEvent=pd,d.createNextMicroTaskWithStartValues=Kd,d.createNumbers=Fn,d.createProcessingFromAsyncFunc=Ne,d.createProcessingFromAsyncFuncWithStartValues=Hd,d.createProcessingFromPromiseCreateFunc=jn,d.createProcessingFromPromiseCreateFuncWithStartValues=Hr,d.createSleeping=eu,d.createSleepingWithStartValues=tu,d.createStartFuncFromAsyncFunc=Ys,d.createTimeout=wh,d.createTimeoutWithStartValues=yh,d.cutDownTreesCallFunc=Yc,d.czmPixelFormats=Xh,d.data=Yp,d.dataMd=Kp,d.debounce=Pn,d.defaultGetLocalFilePath=yu,d.defaultInitSceneObjectOnCreatingFunc=Uu,d.defaultLight122FromEnvironmentMapManager=wo,d.defaultLoadFuncDocStr=tl,d.defaultLoadFuncStr=Qo,d.defaultLocalFileServer=Jh,d.defaultStartUpdateFunc=Dn,d.defaultUpdateSceneObjectOnPickingFunc=zu,d.defineReactiveProp=Vr,d.destroyObject=ih,d.diffGeoJson=Xu,d.downloadLink=wd,d.drawBubble=wi,d.drawPoint=au,d.drawRoundRectPath=Sh,d.drawText=Ph,d.drawTextBlock=Xr,d.engineObjectCreatedUpdate=Mc,d.equalsN3=$n,d.every=xr,d.extendClassProps=Yt,d.fetchArrayBuffer=Cd,d.fetchImage=dh,d.forEach=ft,d.forEachWithBreak=Fr,d.geoAlong=rp,d.geoArea=po,d.geoBuffer=Ic,d.geoCenterOfMass=op,d.geoDestination=go,d.geoDifference=Oc,d.geoDistance=Bn,d.geoHeading=hn,d.geoIntersect=Pc,d.geoLineIntersect=ap,d.geoNearestPointOnLine=cp,d.geoPointToLineDistance=lp,d.geoPolygonFromCircle=Dc,d.geoPolygonOverlap=fo,d.geoPolylineToBezierSpline=rs,d.geoRhumbDestination=dp,d.geoRhumbDistance=Sc,d.geoRhumbHeading=up,d.geoUnion=Tc,d.getCameraTools=jl,d.getColorHexStr=tn,d.getCompleteReactParams=Sn,d.getDefaultValue=$u,d.getDistancesFromPositions=Lt,d.getDomEventCurrentTargetPos=Ee,d.getDrawRect=_i,d.getESMCPTools=Al,d.getElementBounds=qu,d.getErrorResult=ie,d.getEventFromPromise=Nd,d.getEventPosInCurrentTarget=Qi,d.getExtProp=Ae,d.getFileArrayBuffer=Hh,d.getFileJson=Bh,d.getFileText=to,d.getFloatDivPool=Qr,d.getGeoBoundingSphereFromPositions=Fc,d.getIterator=$s,d.getMidpoint=hp,d.getMinMaxCorner=Hn,d.getMinMaxPosition=Ed,d.getPromiseCancel=es,d.getPromiseFromEvent=Ad,d.getPromiseFromProcessing=Gr,d.getReactFuncs=Ws,d.getRtsServicePrefix=Ci,d.getSceneObjectTools=Rl,d.getSceneObjectTreeItem=Wu,d.getSubEntriesFromDir=Wh,d.getSuccessResult=st,d.getTypeFromImageUri=Ml,d.getValueFromProps=hh,d.getXyzFromPostion=mo,d.growthSimulationCallFunc=Kc,d.hasSameTags=gc,d.hasSameViewerTags=on,d.imageToCanvas=Th,d.inOrderRunning=Gu,d.interval=Ir,d.isFeatureEqual=_c,d.isGeometryEqual=wc,d.isJSON=ho,d.isPromiseCancelable=ts,d.isRelativeRtsInfoUrl=il,d.isXML=Hu,d.lbhToWebMerc=ip,d.lbhToXyz=it,d.length=kr,d.lerpAngle=Un,d.lerpRotation=co,d.loadGifFrames=ic,d.loadJs=Rr,d.map=kc,d.max=At,d.min=Kt,d.moveToTreeItem=An,d.moveToTreeItems=Lh,d.nextAnimateFrame=Zi,d.nextMicroTask=Hs,d.objsIterator=mi,d.oneTimeWarning=Xi,d.optionsStr=Hp,d.pairToPromise=Wr,d.parsePlatformFromUrl=nl,d.parseRtsHost=sl,d.parseRtsOrigin=cr,d.parseTileServiceName=rl,d.pluckProperty=Mr,d.react=y,d.reactArray=F,d.reactArrayCollection=rd,d.reactArrayCollectionWithUndefined=Sr,d.reactArrayWithUndefined=ee,d.reactDeepArray=Cn,d.reactDeepArrayWithUndefined=Xt,d.reactJson=W,d.reactJsonCollection=od,d.reactJsonCollectionWithUndefined=ad,d.reactJsonWithUndefined=te,d.reactPlainObject=sd,d.reactPlainObjectWithUndefined=nd,d.reactPosition2Ds=vo,d.reactPosition2DsSet=hd,d.reactPositions=fi,d.reactPositionsSet=Pr,d.reduce=qs,d.registerEventCtor=sh,d.registerEventUpdate=vp,d.removeAllTreesCallFunc=qc,d.requestAnimationFrameTimeStampTest=yd,d.resolveRtsInfoUrl=hr,d.rpToap=Bu,d.saveOnBrowser=_d,d.setCanvasUniformColor=Ih,d.setExtProp=gt,d.setPromiseCancel=Zt,d.setSceneObjectTreeItem=zn,d.setValueFromProps=vd,d.sleep=Zs,d.sleepDeprecated=xd,d.step=vi,d.stepProcessing=iu,d.throttle=jr,d.timeout=Or,d.toGeoJson=vc,d.track=_,d.uint32ToUint8s=Fh,d.uint8ToHexStr=en,d.uint8sToUint32=xh,d.updateTreeParamsCallFunc=Xc,d.webMercToLbh=sp,d.xyz2N2=Pd,d.xyz2N3=Td,d.xyzToLbh=uo,d.xyzw2N4=Id,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));