earthsdk3 3.4.1 → 3.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/earthsdk3.iife.js +42 -42
- package/dist/earthsdk3.js +22034 -16375
- package/dist/earthsdk3.umd.cjs +43 -43
- package/dist/types/ESJTypes/properties/FillStyleType.d.ts +1 -1
- package/dist/types/ESJTypes/properties/FillStyleType.d.ts.map +1 -1
- package/dist/types/ESJTypes/properties/PointStyleType.d.ts +1 -1
- package/dist/types/ESJTypes/properties/PointStyleType.d.ts.map +1 -1
- package/dist/types/ESJTypes/properties/StrokeStyleType.d.ts +1 -1
- package/dist/types/ESJTypes/properties/StrokeStyleType.d.ts.map +1 -1
- package/dist/types/ESJTypes/properties/index.d.ts +1 -1
- package/dist/types/ESJTypes/properties/index.d.ts.map +1 -1
- package/dist/types/ESJTypes/props/EnumProperty.d.ts +1 -1
- package/dist/types/ESJTypes/props/EnumProperty.d.ts.map +1 -1
- package/dist/types/ESJTypes/props/EnumStringsProperty.d.ts +1 -1
- package/dist/types/ESJTypes/props/EnumStringsProperty.d.ts.map +1 -1
- package/dist/types/ESJTypes/props/EvalStringProperty.d.ts +1 -1
- package/dist/types/ESJTypes/props/EvalStringProperty.d.ts.map +1 -1
- package/dist/types/ESJTypes/props/JsonProperty.d.ts +2 -1
- package/dist/types/ESJTypes/props/JsonProperty.d.ts.map +1 -1
- package/dist/types/ESJTypes/props/LongStringProperty.d.ts +1 -1
- package/dist/types/ESJTypes/props/LongStringProperty.d.ts.map +1 -1
- package/dist/types/ESJTypes/props/NumberSliderProperty.d.ts +1 -1
- package/dist/types/ESJTypes/props/NumberSliderProperty.d.ts.map +1 -1
- package/dist/types/ESJTypes/props/ParamsProperty.d.ts +1 -1
- package/dist/types/ESJTypes/props/ParamsProperty.d.ts.map +1 -1
- package/dist/types/ESJTypes/props/PlayerProperty.d.ts +2 -2
- package/dist/types/ESJTypes/props/PlayerProperty.d.ts.map +1 -1
- package/dist/types/ESJTypes/props/ReactVarProperty.d.ts +1 -1
- package/dist/types/ESJTypes/props/ReactVarProperty.d.ts.map +1 -1
- package/dist/types/ESJTypes/props/ViewPlayerProperty.d.ts +1 -1
- package/dist/types/ESJTypes/props/ViewPlayerProperty.d.ts.map +1 -1
- package/dist/types/ESObjectManager/ESPlyarAndPathTime.d.ts +1 -1
- package/dist/types/ESObjectManager/ESPlyarAndPathTime.d.ts.map +1 -1
- package/dist/types/ESObjectManager/PathAnimationManager.d.ts +1 -1
- package/dist/types/ESObjectManager/PathAnimationManager.d.ts.map +1 -1
- package/dist/types/ESObjectManager/SceneObjectEditingManager.d.ts +1 -1
- package/dist/types/ESObjectManager/SceneObjectEditingManager.d.ts.map +1 -1
- package/dist/types/ESObjectManager/SceneObjectsManager.d.ts +1 -2
- package/dist/types/ESObjectManager/SceneObjectsManager.d.ts.map +1 -1
- package/dist/types/ESObjectManager/ViewersManager.d.ts +1 -2
- package/dist/types/ESObjectManager/ViewersManager.d.ts.map +1 -1
- package/dist/types/ESObjectManager/index.d.ts +4 -20
- package/dist/types/ESObjectManager/index.d.ts.map +1 -1
- package/dist/types/ESObjectManager/utils.d.ts +1 -1
- package/dist/types/ESObjectManager/utils.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESGeoVector.d.ts +31 -30
- package/dist/types/ESObjects/base/ESGeoVector.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESLabel.d.ts +16 -16
- package/dist/types/ESObjects/base/ESLabel.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESLocalVector.d.ts +24 -23
- package/dist/types/ESObjects/base/ESLocalVector.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESLocalVector2D.d.ts +1 -1
- package/dist/types/ESObjects/base/ESLocalVector2D.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESObjectWithLocation.d.ts +12 -12
- package/dist/types/ESObjects/base/ESObjectWithLocation.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESSceneObject/ESObjectsContext.d.ts +3 -4
- package/dist/types/ESObjects/base/ESSceneObject/ESObjectsContext.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESSceneObject/RefsManager.d.ts +1 -2
- package/dist/types/ESObjects/base/ESSceneObject/RefsManager.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESSceneObject/funcs/createEnvEvalStrReact.d.ts +2 -2
- package/dist/types/ESObjects/base/ESSceneObject/funcs/createEnvEvalStrReact.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESSceneObject/index.d.ts +5 -5
- package/dist/types/ESObjects/base/ESSceneObject/index.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESTestObject.d.ts +4 -4
- package/dist/types/ESObjects/base/ESTestObject.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESVisualObject.d.ts +5 -5
- package/dist/types/ESObjects/base/ESVisualObject.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ES3DTileset/index.d.ts +21 -21
- package/dist/types/ESObjects/general/ES3DTileset/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESAlarm.d.ts +12 -13
- package/dist/types/ESObjects/general/ESAlarm.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESApertureEffect.d.ts +11 -11
- package/dist/types/ESObjects/general/ESApertureEffect.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESAreaMeasurement.d.ts +11 -11
- package/dist/types/ESObjects/general/ESAreaMeasurement.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESBlastParticleSystem.d.ts +12 -12
- package/dist/types/ESObjects/general/ESBlastParticleSystem.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESBoxClipping.d.ts +13 -13
- package/dist/types/ESObjects/general/ESBoxClipping.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESCameraView.d.ts +3 -4
- package/dist/types/ESObjects/general/ESCameraView.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESCameraViewCollection/index.d.ts +6 -6
- package/dist/types/ESObjects/general/ESCameraViewCollection/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESCameraVisibleRange.d.ts +11 -11
- package/dist/types/ESObjects/general/ESCameraVisibleRange.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESCar.d.ts +11 -11
- package/dist/types/ESObjects/general/ESCar.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESCityBasePoint.d.ts +12 -12
- package/dist/types/ESObjects/general/ESCityBasePoint.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESClassification.d.ts +9 -9
- package/dist/types/ESObjects/general/ESClassification.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESClippingPlane.d.ts +12 -12
- package/dist/types/ESObjects/general/ESClippingPlane.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESCustomDiv/index.d.ts +3 -3
- package/dist/types/ESObjects/general/ESCustomDiv/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESCzml.d.ts +12 -13
- package/dist/types/ESObjects/general/ESCzml.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESDataMesh.d.ts +13 -13
- package/dist/types/ESObjects/general/ESDataMesh.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESDatasmithRuntimeModel.d.ts +13 -12
- package/dist/types/ESObjects/general/ESDatasmithRuntimeModel.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESDirectionMeasurement.d.ts +10 -10
- package/dist/types/ESObjects/general/ESDirectionMeasurement.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESDistanceMeasurement.d.ts +9 -9
- package/dist/types/ESObjects/general/ESDistanceMeasurement.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESDynamicWater.d.ts +15 -15
- package/dist/types/ESObjects/general/ESDynamicWater.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESEntityCluster.d.ts +8 -8
- package/dist/types/ESObjects/general/ESEntityCluster.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESExcavate.d.ts +9 -9
- package/dist/types/ESObjects/general/ESExcavate.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESFeatureLayer/PointLayer/utils.d.ts +1 -1
- package/dist/types/ESObjects/general/ESFeatureLayer/index.d.ts +6 -6
- package/dist/types/ESObjects/general/ESFeatureLayer/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESFeatureLayer/types.d.ts +1 -1
- package/dist/types/ESObjects/general/ESFeatureLayer/types.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESFeatureLayer/utils.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESFireParticleSystem.d.ts +12 -12
- package/dist/types/ESObjects/general/ESFireParticleSystem.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESForestTileset.d.ts +7 -7
- package/dist/types/ESObjects/general/ESForestTileset.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESGaussianSplatting.d.ts +11 -11
- package/dist/types/ESObjects/general/ESGaussianSplatting.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESGeoDiv/index.d.ts +14 -14
- package/dist/types/ESObjects/general/ESGeoDiv/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESGeoDivTextPoi.d.ts +17 -17
- package/dist/types/ESObjects/general/ESGeoDivTextPoi.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESGeoExtrudedPolygon.d.ts +9 -9
- package/dist/types/ESObjects/general/ESGeoExtrudedPolygon.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESGeoJson/index.d.ts +10 -9
- package/dist/types/ESObjects/general/ESGeoJson/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESGeoLineString.d.ts +10 -10
- package/dist/types/ESObjects/general/ESGeoLineString.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESGeoPoints/index.d.ts +9 -9
- package/dist/types/ESObjects/general/ESGeoPoints/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESGeoPolygon.d.ts +9 -9
- package/dist/types/ESObjects/general/ESGeoPolygon.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESGeoRectangle.d.ts +9 -9
- package/dist/types/ESObjects/general/ESGeoRectangle.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESGeoWater.d.ts +10 -10
- package/dist/types/ESObjects/general/ESGeoWater.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESGltfModel.d.ts +24 -24
- package/dist/types/ESObjects/general/ESGltfModel.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESHeatMap/index.d.ts +10 -10
- package/dist/types/ESObjects/general/ESHeatMap/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESHeightLimitAnalysis.d.ts +9 -9
- package/dist/types/ESObjects/general/ESHeightLimitAnalysis.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESHeightMeasurement.d.ts +10 -10
- package/dist/types/ESObjects/general/ESHeightMeasurement.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESHole.d.ts +11 -11
- package/dist/types/ESObjects/general/ESHole.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESHuman.d.ts +11 -11
- package/dist/types/ESObjects/general/ESHuman.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESHumanPoi.d.ts +14 -14
- package/dist/types/ESObjects/general/ESHumanPoi.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESImageLabel.d.ts +16 -16
- package/dist/types/ESObjects/general/ESImageLabel.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESImageryLayer/index.d.ts +7 -7
- package/dist/types/ESObjects/general/ESImageryLayer/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESImageryLayer/types.d.ts +1 -1
- package/dist/types/ESObjects/general/ESImageryLayer/types.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESLevelRuntimeModel.d.ts +12 -12
- package/dist/types/ESObjects/general/ESLevelRuntimeModel.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESLocalCircle.d.ts +15 -15
- package/dist/types/ESObjects/general/ESLocalCircle.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESLocalPolygon.d.ts +14 -14
- package/dist/types/ESObjects/general/ESLocalPolygon.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESLocalPolygonZ.d.ts +14 -14
- package/dist/types/ESObjects/general/ESLocalPolygonZ.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESLocalRectangle.d.ts +13 -13
- package/dist/types/ESObjects/general/ESLocalRectangle.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESLocalSkyBox.d.ts +11 -11
- package/dist/types/ESObjects/general/ESLocalSkyBox.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESLocationMeasurement.d.ts +2 -2
- package/dist/types/ESObjects/general/ESLocationMeasurement.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESMsTileset/index.d.ts +4 -4
- package/dist/types/ESObjects/general/ESMsTileset/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESNavigator.d.ts +3 -3
- package/dist/types/ESObjects/general/ESNavigator.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESParticleSystemPrimitive.d.ts +21 -21
- package/dist/types/ESObjects/general/ESParticleSystemPrimitive.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/index.d.ts +4 -4
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPath/index.d.ts +21 -26
- package/dist/types/ESObjects/general/ESPath/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPipeFence.d.ts +10 -10
- package/dist/types/ESObjects/general/ESPipeFence.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPipeline.d.ts +10 -10
- package/dist/types/ESObjects/general/ESPipeline.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPipeserTileset.d.ts +13 -13
- package/dist/types/ESObjects/general/ESPipeserTileset.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPit.d.ts +11 -11
- package/dist/types/ESObjects/general/ESPit.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPlayer/AbsolutePlayer.d.ts +4 -4
- package/dist/types/ESObjects/general/ESPlayer/AbsolutePlayer.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPlayer/index.d.ts +4 -4
- package/dist/types/ESObjects/general/ESPlayer/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPoi2D.d.ts +18 -18
- package/dist/types/ESObjects/general/ESPoi2D.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPoi3D.d.ts +12 -12
- package/dist/types/ESObjects/general/ESPoi3D.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPoiTileset.d.ts +6 -6
- package/dist/types/ESObjects/general/ESPoiTileset.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPolygonFence.d.ts +9 -9
- package/dist/types/ESObjects/general/ESPolygonFence.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPolygonFlattenedPlane.d.ts +10 -10
- package/dist/types/ESObjects/general/ESPolygonFlattenedPlane.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESPolygonWithHole.d.ts +10 -10
- package/dist/types/ESObjects/general/ESPolygonWithHole.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESRectangle.d.ts +10 -10
- package/dist/types/ESObjects/general/ESRectangle.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESRtsFeatureEditing/index.d.ts +18 -18
- package/dist/types/ESObjects/general/ESRtsFeatureEditing/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESRtsTileset/index.d.ts +19 -19
- package/dist/types/ESObjects/general/ESRtsTileset/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESScale.d.ts +3 -3
- package/dist/types/ESObjects/general/ESScale.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESSeparateFoliage/index.d.ts +6 -6
- package/dist/types/ESObjects/general/ESSeparateFoliage/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESSkylineAnalysis/index.d.ts +12 -12
- package/dist/types/ESObjects/general/ESSkylineAnalysis/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESStaticMesh.d.ts +12 -11
- package/dist/types/ESObjects/general/ESStaticMesh.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESSubmergingAnalysis/index.d.ts +12 -12
- package/dist/types/ESObjects/general/ESSubmergingAnalysis/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESSunshineAnalysis/index.d.ts +11 -11
- package/dist/types/ESObjects/general/ESSunshineAnalysis/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESSurfaceAreaMeasurement.d.ts +11 -11
- package/dist/types/ESObjects/general/ESSurfaceAreaMeasurement.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESTerrainLayer.d.ts +6 -19
- package/dist/types/ESObjects/general/ESTerrainLayer.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESTextLabel.d.ts +21 -21
- package/dist/types/ESObjects/general/ESTextLabel.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESUEWidget.d.ts +17 -17
- package/dist/types/ESObjects/general/ESUEWidget.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESUnrealActor.d.ts +12 -12
- package/dist/types/ESObjects/general/ESUnrealActor.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESVideoFusion.d.ts +11 -11
- package/dist/types/ESObjects/general/ESVideoFusion.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESViewShed.d.ts +11 -11
- package/dist/types/ESObjects/general/ESViewShed.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESViewerStatusBar.d.ts +4 -4
- package/dist/types/ESObjects/general/ESViewerStatusBar.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESViewerStatusBarScale.d.ts +4 -4
- package/dist/types/ESObjects/general/ESViewerStatusBarScale.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESVisibilityAnalysis.d.ts +11 -11
- package/dist/types/ESObjects/general/ESVisibilityAnalysis.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESVolumeMeasurement.d.ts +11 -11
- package/dist/types/ESObjects/general/ESVolumeMeasurement.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESWidget.d.ts +17 -17
- package/dist/types/ESObjects/general/ESWidget.d.ts.map +1 -1
- package/dist/types/ESObjects/index.d.ts +3 -0
- package/dist/types/ESObjects/index.d.ts.map +1 -1
- package/dist/types/ESViewer/ESViewer.d.ts +48 -14
- package/dist/types/ESViewer/ESViewer.d.ts.map +1 -1
- package/dist/types/ESViewer/ESViewerExtensions/CursorPositionInfo.d.ts +15 -0
- package/dist/types/ESViewer/ESViewerExtensions/CursorPositionInfo.d.ts.map +1 -0
- package/dist/types/ESViewer/ESViewerExtensions/index.d.ts +13 -0
- package/dist/types/ESViewer/ESViewerExtensions/index.d.ts.map +1 -0
- package/dist/types/ESViewer/GeneralAnalysis/RollerShutterAnalysis.d.ts +1 -1
- package/dist/types/ESViewer/GeneralAnalysis/RollerShutterAnalysis.d.ts.map +1 -1
- package/dist/types/ESViewer/GeneralAnalysis/index.d.ts +3 -0
- package/dist/types/ESViewer/GeneralAnalysis/index.d.ts.map +1 -1
- package/dist/types/ESViewer/Resetting/index.d.ts +1 -1
- package/dist/types/ESViewer/Resetting/index.d.ts.map +1 -1
- package/dist/types/ESViewer/StatusContainer.d.ts +1 -1
- package/dist/types/ESViewer/StatusContainer.d.ts.map +1 -1
- package/dist/types/ESViewer/ViewerContainer.d.ts +1 -1
- package/dist/types/ESViewer/ViewerContainer.d.ts.map +1 -1
- package/dist/types/ESViewer/ViewerCustomInteraction.d.ts +1 -1
- package/dist/types/ESViewer/ViewerCustomInteraction.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils/PropTrees/PropTree.d.ts +1 -1
- package/dist/types/utils/PropTrees/PropTree.d.ts.map +1 -1
- package/dist/types/utils/PropTrees/PropTreeItem.d.ts +1 -1
- package/dist/types/utils/PropTrees/PropTreeItem.d.ts.map +1 -1
- package/dist/types/utils/PropTrees/PropUiTreeManager.d.ts +2 -3
- package/dist/types/utils/PropTrees/PropUiTreeManager.d.ts.map +1 -1
- package/dist/types/utils/SceneTrees/SceneTree.d.ts +3 -3
- package/dist/types/utils/SceneTrees/SceneTree.d.ts.map +1 -1
- package/dist/types/utils/SceneTrees/SceneTreeItem.d.ts +4 -4
- package/dist/types/utils/SceneTrees/SceneTreeItem.d.ts.map +1 -1
- package/dist/types/utils/SceneTrees/SceneTreeJsonLoading.d.ts +1 -1
- package/dist/types/utils/SceneTrees/SceneTreeJsonLoading.d.ts.map +1 -1
- package/dist/types/utils/SceneTrees/defaultCreateSceneObject.d.ts +1 -1
- package/dist/types/utils/SceneTrees/defaultCreateSceneObject.d.ts.map +1 -1
- package/dist/types/utils/SceneTrees/defaultCreateTreeItemDragDrop.d.ts +1 -1
- package/dist/types/utils/SceneTrees/defaultCreateTreeItemDragDrop.d.ts.map +1 -1
- package/dist/types/utils/SmoothMoveController.d.ts +6 -6
- package/dist/types/utils/SmoothMoveController.d.ts.map +1 -1
- package/dist/types/utils/base/DragStartDataManager.d.ts +2 -3
- package/dist/types/utils/base/DragStartDataManager.d.ts.map +1 -1
- package/dist/types/utils/base/bindCustomEditing.d.ts +2 -1
- package/dist/types/utils/base/bindCustomEditing.d.ts.map +1 -1
- package/dist/types/utils/components/ESSceneObjectWithId.d.ts +5 -6
- package/dist/types/utils/components/ESSceneObjectWithId.d.ts.map +1 -1
- package/dist/types/utils/components/Player.d.ts +3 -4
- package/dist/types/utils/components/Player.d.ts.map +1 -1
- package/dist/types/utils/components/Watcher.d.ts +4 -5
- package/dist/types/utils/components/Watcher.d.ts.map +1 -1
- package/dist/types/utils/components/WatcherTools/toolsForWatcher.d.ts +1 -2
- package/dist/types/utils/components/WatcherTools/toolsForWatcher.d.ts.map +1 -1
- package/dist/types/utils/react.d.ts +1 -1
- package/dist/types/utils/react.d.ts.map +1 -1
- package/dist/types/utils/registerEventUpdate.d.ts +1 -2
- package/dist/types/utils/registerEventUpdate.d.ts.map +1 -1
- package/dist/types/xbsj-base/index.d.ts +1 -0
- package/dist/types/xbsj-base/index.d.ts.map +1 -1
- package/dist/types/xbsj-base/xr-base-utils/ExtProp.d.ts +21 -0
- package/dist/types/xbsj-base/xr-base-utils/ExtProp.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/HasOwner.d.ts +7 -0
- package/dist/types/xbsj-base/xr-base-utils/HasOwner.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/JsonValue.d.ts +4 -0
- package/dist/types/xbsj-base/xr-base-utils/JsonValue.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/ObservableArray.d.ts +53 -0
- package/dist/types/xbsj-base/xr-base-utils/ObservableArray.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/ReactiveVariable.d.ts +162 -0
- package/dist/types/xbsj-base/xr-base-utils/ReactiveVariable.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/StartUpdateFunc.d.ts +25 -0
- package/dist/types/xbsj-base/xr-base-utils/StartUpdateFunc.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/bindAndTrack.d.ts +32 -0
- package/dist/types/xbsj-base/xr-base-utils/bindAndTrack.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/createGuid.d.ts +2 -0
- package/dist/types/xbsj-base/xr-base-utils/createGuid.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/debounce.d.ts +2 -0
- package/dist/types/xbsj-base/xr-base-utils/debounce.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/events.d.ts +14 -0
- package/dist/types/xbsj-base/xr-base-utils/events.d.ts.map +1 -1
- package/dist/types/xbsj-base/xr-base-utils/every.d.ts +2 -0
- package/dist/types/xbsj-base/xr-base-utils/every.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/extendClassProps.d.ts +56 -0
- package/dist/types/xbsj-base/xr-base-utils/extendClassProps.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/fetchArrayBuffer.d.ts +2 -0
- package/dist/types/xbsj-base/xr-base-utils/fetchArrayBuffer.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/fetchImage.d.ts +2 -0
- package/dist/types/xbsj-base/xr-base-utils/fetchImage.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/forEachWithBreak.d.ts +8 -0
- package/dist/types/xbsj-base/xr-base-utils/forEachWithBreak.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/getIterator.d.ts +2 -0
- package/dist/types/xbsj-base/xr-base-utils/getIterator.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/getMinMaxPosition.d.ts +8 -0
- package/dist/types/xbsj-base/xr-base-utils/getMinMaxPosition.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/getReactFuncs.d.ts +5 -0
- package/dist/types/xbsj-base/xr-base-utils/getReactFuncs.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/index.d.ts +26 -0
- package/dist/types/xbsj-base/xr-base-utils/index.d.ts.map +1 -1
- package/dist/types/xbsj-base/xr-base-utils/iteratorForEach.d.ts +9 -0
- package/dist/types/xbsj-base/xr-base-utils/iteratorForEach.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/length.d.ts +2 -0
- package/dist/types/xbsj-base/xr-base-utils/length.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/loadJs.d.ts +8 -0
- package/dist/types/xbsj-base/xr-base-utils/loadJs.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/minmax.d.ts +33 -0
- package/dist/types/xbsj-base/xr-base-utils/minmax.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/objsIterator.d.ts +40 -0
- package/dist/types/xbsj-base/xr-base-utils/objsIterator.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/pluckProperty.d.ts +3 -0
- package/dist/types/xbsj-base/xr-base-utils/pluckProperty.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/propsValue.d.ts +18 -0
- package/dist/types/xbsj-base/xr-base-utils/propsValue.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/reduce.d.ts +8 -0
- package/dist/types/xbsj-base/xr-base-utils/reduce.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-base-utils/throttle.d.ts +10 -0
- package/dist/types/xbsj-base/xr-base-utils/throttle.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-math/Numbers.d.ts +288 -0
- package/dist/types/xbsj-base/xr-math/Numbers.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-math/Vector.d.ts +29 -0
- package/dist/types/xbsj-base/xr-math/Vector.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-math/clamp.d.ts +2 -0
- package/dist/types/xbsj-base/xr-math/clamp.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-math/index.d.ts +4 -0
- package/dist/types/xbsj-base/xr-math/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ColorStops.d.ts +44 -0
- package/dist/types/xbsj-base/xr-utils/ColorStops.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/ComplexImage.d.ts +68 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/ComplexImage.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/ComplexImageType.d.ts +3 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/ComplexImageType.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/CzmPixelFormatType.d.ts +3 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/CzmPixelFormatType.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/CzmTextureCopyParams.d.ts +11 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/CzmTextureCopyParams.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/FlvProcessing.d.ts +50 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/FlvProcessing.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/GifProcessing.d.ts +14 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/GifProcessing.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/HlsProcessing.d.ts +51 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/HlsProcessing.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/ImageProcessing.d.ts +14 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/ImageProcessing.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/VideoProcessing.d.ts +22 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/VideoProcessing.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/index.d.ts +10 -0
- package/dist/types/xbsj-base/xr-utils/ComplexImage/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/LocalFileServer.d.ts +41 -0
- package/dist/types/xbsj-base/xr-utils/LocalFileServer.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/BoxPicker.d.ts +52 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/BoxPicker.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/DivPointerClick.d.ts +12 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/DivPointerClick.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/DomElementEvent.d.ts +57 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/DomElementEvent.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/PointerClick.d.ts +32 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/PointerClick.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/PointerClickDeprecated.d.ts +17 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/PointerClickDeprecated.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/PointerDragDrop.d.ts +29 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/PointerDragDrop.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/PointerHover.d.ts +18 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/PointerHover.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/PointerHoverDeprecated.d.ts +9 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/PointerHoverDeprecated.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/getDomEventCurrentTargetPos.d.ts +15 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/getDomEventCurrentTargetPos.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/index.d.ts +9 -0
- package/dist/types/xbsj-base/xr-utils/PointerActions/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Debouncing.d.ts +12 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Debouncing.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Fetching.d.ts +15 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Fetching.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Sleeping.d.ts +4 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Sleeping.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Throttling.d.ts +12 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Throttling.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Transition.d.ts +20 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/Transition.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/getPromiseFromProcessing.d.ts +3 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/getPromiseFromProcessing.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/index.d.ts +10 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/misc.d.ts +12 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/misc.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/step.d.ts +29 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/step.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/stepProcessing.d.ts +10 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingDerives/stepProcessing.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Debouncing.d.ts +24 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Debouncing.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Fetching.d.ts +41 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Fetching.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Interval.d.ts +19 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Interval.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Throttling.d.ts +14 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Throttling.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Timing.d.ts +34 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Timing.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Transition.d.ts +20 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/Transition.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/cancelableFetch.d.ts +34 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/cancelableFetch.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/index.d.ts +8 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/sleep.d.ts +10 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingObjsDeprecated/sleep.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/Processings/CancelsManager.d.ts +20 -0
- package/dist/types/xbsj-base/xr-utils/Processings/CancelsManager.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/Processings/Processing.d.ts +100 -0
- package/dist/types/xbsj-base/xr-utils/Processings/Processing.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/Processings/createProcessingFuncs.d.ts +14 -0
- package/dist/types/xbsj-base/xr-utils/Processings/createProcessingFuncs.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/Processings/index.d.ts +6 -0
- package/dist/types/xbsj-base/xr-utils/Processings/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/Processings/promiseFuncs.d.ts +11 -0
- package/dist/types/xbsj-base/xr-utils/Processings/promiseFuncs.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/Processings/types.d.ts +4 -0
- package/dist/types/xbsj-base/xr-utils/Processings/types.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/Processing.d.ts +139 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/Processing.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/ProcessingStarter.d.ts +85 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/ProcessingStarter.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/cancelablePromise.d.ts +88 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/cancelablePromise.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/createProcessing.d.ts +9 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/createProcessing.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/index.d.ts +7 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/types.d.ts +19 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/types.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/utils.d.ts +19 -0
- package/dist/types/xbsj-base/xr-utils/ProcessingsDeprecated/utils.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/XrPlayer.d.ts +41 -0
- package/dist/types/xbsj-base/xr-utils/XrPlayer.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/baseExt/ObjResettingWithEvent.d.ts +29 -0
- package/dist/types/xbsj-base/xr-utils/baseExt/ObjResettingWithEvent.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/{ObservableSet.d.ts → baseExt/ObservableSet.d.ts} +1 -1
- package/dist/types/xbsj-base/xr-utils/baseExt/ObservableSet.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/baseExt/index.d.ts +3 -0
- package/dist/types/xbsj-base/xr-utils/baseExt/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/deprecated/defineReactiveProp.d.ts +35 -0
- package/dist/types/xbsj-base/xr-utils/deprecated/defineReactiveProp.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/deprecated/index.d.ts +2 -0
- package/dist/types/xbsj-base/xr-utils/deprecated/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/gif/Gif.d.ts +17 -0
- package/dist/types/xbsj-base/xr-utils/gif/Gif.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/gif/GifPlayer.d.ts +25 -0
- package/dist/types/xbsj-base/xr-utils/gif/GifPlayer.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/gif/gifuct-js/index.d.ts +101 -0
- package/dist/types/xbsj-base/xr-utils/gif/index.d.ts +4 -0
- package/dist/types/xbsj-base/xr-utils/gif/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/gif/loadGifFrames.d.ts +6 -0
- package/dist/types/xbsj-base/xr-utils/gif/loadGifFrames.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/index.d.ts +14 -1
- package/dist/types/xbsj-base/xr-utils/index.d.ts.map +1 -1
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/CanvasImagePoi.d.ts +39 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/CanvasImagePoi.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/CanvasPoi.d.ts +33 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/CanvasPoi.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/CanvasPointPoi.d.ts +66 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/CanvasPointPoi.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/CanvasPrimitive.d.ts +105 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/CanvasPrimitive.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/CanvasPrimitivesContext.d.ts +38 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/CanvasPrimitivesContext.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/PickColorMananger.d.ts +23 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/PickColorMananger.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/drawUtils.d.ts +24 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/drawUtils.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/index.d.ts +8 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/CanvasPois/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/BorderedPosFloatDiv.d.ts +33 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/BorderedPosFloatDiv.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/CursorInfo-deprecated.d.ts +9 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/CursorInfo-deprecated.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/CursorInfo.d.ts +46 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/CursorInfo.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/DivPoi.d.ts +16 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/DivPoi.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/FloatDiv.d.ts +27 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/FloatDiv.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/IFrameBorderedPosFloatDiv.d.ts +16 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/IFrameBorderedPosFloatDiv.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/PosFloatDiv.d.ts +41 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/PosFloatDiv.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/TooltipDiv-deprecated.d.ts +12 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/TooltipDiv-deprecated.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/index.d.ts +8 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/DivPois/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/index.d.ts +3 -0
- package/dist/types/xbsj-base/xr-utils/massivePois/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/tree/CheckedStatus.d.ts +2 -0
- package/dist/types/xbsj-base/xr-utils/tree/CheckedStatus.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/tree/RedrawInfo.d.ts +9 -0
- package/dist/types/xbsj-base/xr-utils/tree/RedrawInfo.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/tree/Tree.d.ts +45 -0
- package/dist/types/xbsj-base/xr-utils/tree/Tree.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/tree/TreeItem.d.ts +50 -0
- package/dist/types/xbsj-base/xr-utils/tree/TreeItem.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/tree/UiTree.d.ts +32 -0
- package/dist/types/xbsj-base/xr-utils/tree/UiTree.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/tree/UiTreeObject.d.ts +28 -0
- package/dist/types/xbsj-base/xr-utils/tree/UiTreeObject.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/tree/index.d.ts +8 -0
- package/dist/types/xbsj-base/xr-utils/tree/index.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/tree/move.d.ts +7 -0
- package/dist/types/xbsj-base/xr-utils/tree/move.d.ts.map +1 -0
- package/package.json +7 -11
- package/dist/types/xbsj-base/xr-utils/ObservableSet.d.ts.map +0 -1
package/dist/earthsdk3.umd.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(g,Ln){typeof exports=="object"&&typeof module<"u"?Ln(exports,require("js-binary-schema-parser"),require("proj4"),require("@turf/turf")):typeof define=="function"&&define.amd?define(["exports","js-binary-schema-parser","proj4","@turf/turf"],Ln):(g=typeof globalThis<"u"?globalThis:g||self,Ln(g.EarthSDK3={},g.jsBinarySchemaParser,g.proj4,g.turf))})(this,(function(g,Ln,Bs,Xy){"use strict";var Ub=Object.defineProperty;var Gb=(g,Ln,Bs)=>Ln in g?Ub(g,Ln,{enumerable:!0,configurable:!0,writable:!0,value:Bs}):g[Ln]=Bs;var d=(g,Ln,Bs)=>Gb(g,typeof Ln!="symbol"?Ln+"":Ln,Bs);var Xr;function Hy(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 Ue=Hy(Xy);function Yy(){const r=navigator.userAgent;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 Jy=Date.now();function fp(r){const{os:e,arch:t}=Yy(),n={version:r.version,commitdate:r.date,commitId:r.commitId,runningTime:(Date.now()-Jy)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:e,arch:t},s={method:"GET",headers:new Headers,redirect:"follow"},o=window.encodeURIComponent(JSON.stringify(n));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(a=>a.text()).then(a=>console.log(a)).catch(a=>console.log("error",a))}g.copyright=void 0;try{const r="earthsdk3",e="3.4.2",t="2025-09-25T08:14:26.000Z",n="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="14d9ef745ec05bc8de989df76200d0a0ef6a3e02",a=((Date.now()-1758788066e3)/36e5).toFixed(1),u=`%c🌏 ${r}%c ${e}.${s.slice(0,8)}.${t} (距今${a}个小时)
|
|
2
2
|
%c${i?i+`
|
|
3
|
-
`:""}当前网站正在使用${
|
|
4
|
-
`;
|
|
3
|
+
`:""}当前网站正在使用${r},此软件版权归${n}所有
|
|
4
|
+
`;g.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","14d9ef745ec05bc8de989df76200d0a0ef6a3e02")},get info(){return u},get date(){return"2025-09-25T08:14:26.000Z"},get author(){return"suplyang"},get version(){return"3.4.2"},get name(){return"earthsdk3"},get commitId(){return"14d9ef745ec05bc8de989df76200d0a0ef6a3e02"},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
|
-
`)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[n]=w.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>nf(w.copyright),1e3*60),setInterval(()=>nf(w.copyright),1440*60*1e3)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&w.copyright.print()}catch{console.warn("版本信息有误!")}function Ug(){return!0}function Gg(){throw new Error("throwOnDestroyed")}function sf(n){for(var t in n)typeof n[t]=="function"&&(n[t]=Gg);n.isDestroyed=Ug}const vl=class vl{constructor(){f(this,"_memId",++vl._lastMemId);f(this,"_disposers")}get __v_skip(){return!0}get memId(){return this._memId}get disposers(){return this._disposers||(this._disposers=[]),this._disposers}dispose(t){return this.disposers.push(t),t}d(t){return this.dispose(t)}disposeVar(t){return this.disposers.push(()=>t.destroy()),t}dv(t){return this.disposeVar(t)}tryDisposeVar(t){return this.disposers.push(()=>t.tryDestroy()),t}tdv(t){return this.tryDisposeVar(t)}autoDispose(t){return typeof t=="function"?this.dispose(t):this.disposeVar(t)}ad(t){return typeof t=="function"?this.dispose(t):this.disposeVar(t)}isDestroyed(){return!1}destroyImp(){}destroy(){if(this._toDestroyEvent&&this._toDestroyEvent.emit(),this.destroyImp(),this._disposers)try{const t=this._disposers,e=t.length;for(let r=e-1;r>=0;--r)t[r]();t.length=0,this._disposers=void 0}catch(t){console.error(`destroy get error! ${t}`)}return sf(this)}tryDestory(){if(!this.isDestroyed())return this.destroy()}};f(vl,"_lastMemId",-1);let q=vl,El;function of(n){El=n}Object.defineProperties(q.prototype,{toDestroyEvent:{get(){if(this._toDestroyEvent===void 0){if(!El)throw new Error("Destroyable EventCtor not registered yet!");this._toDestroyEvent=this.disposeVar(new El)}return this._toDestroyEvent}}});class Sl{constructor(t,e,r=!1){f(this,"_freeElements");f(this,"_usedElementsCount");f(this,"_usedElements");f(this,"_nextCreateID");f(this,"_scratchObjs");this._createDefaultFunc=t,this._destroyFunc=e,this._freeElements=[],this._usedElementsCount=0,this._nextCreateID=1,this._scratchObjs=[],r&&(this._usedElements=[])}get usedElementsCount(){return this._usedElementsCount}get freeElementsCount(){return this._freeElements.length}_getCreateID(){return this._nextCreateID++}_create(){let t;return this._freeElements.length>0?t=this._freeElements.pop():t=this._createDefaultFunc&&this._createDefaultFunc()||{},t._cid=this._getCreateID(),t}create(){return this._create()}multiCreate(t){this._scratchObjs.length=0;for(let e=0;e<t;++e)this._scratchObjs.push(this._create());return this._scratchObjs}_destroy(t){this._destroyFunc&&this._destroyFunc(t),t._cid=void 0}destroy(...t){const e=t.length;for(let r=0;r<e;++r)this._destroy(t[r])}}function Wg(){return{item:void 0,previous:void 0,next:void 0}}function qg(n){n.item=void 0,n.previous=void 0,n.next=void 0}const af=new Sl(Wg,qg,!0);function Cl(n,t,e){const r=af.create();return r.item=n,r.previous=t,r.next=e,r}function uf(n){if(!n)throw new Error("node is undefined!");af.destroy(n)}function Il(n,t){t.previous&&t.next?(t.previous.next=t.next,t.next.previous=t.previous):t.previous?(t.previous.next=void 0,n.tail=t.previous):t.next?(t.next.previous=void 0,n.head=t.next):(n.head=void 0,n.tail=void 0),t.next=void 0,t.previous=void 0}class lf{constructor(t){f(this,"head");f(this,"tail");f(this,"_length");const{needLength:e}=t||{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(t){typeof this._length=="number"&&(this._length=t)}get length(){return this._length}get empty(){return!this.head}*[Symbol.iterator](){let t=this.head;for(;t;)yield t,t=t.next}remove(t){if(!t)throw new Error("node is undefined!");Il(this,t),this._decrementLength(),uf(t)}getNode(t){let e=this.head;for(;e!==null;){if(!e)throw new Error("current is undefined!");if(e.item===t)return e;e=e.next}}moveAfter(t,e){if(t!==e){Il(this,e);var r=t.next;t.next=e,this.tail===t?this.tail=e:r&&(r.previous=e),e.next=r,e.previous=t}}moveBefore(t,e){if(t!==e){Il(this,e);var r=t.previous;t.previous=e,this.head===t?this.head=e:r&&(r.next=e),e.previous=r,e.next=t}}insertBefore(t,e){const r=Cl(e,t.previous,t);return t.previous&&(t.previous.next=r),t.previous=r,this.head===t&&(this.head=r),this._incrementLength(),r}insertAfter(t,e){const r=Cl(e,t,t.next);return t.next&&(t.next.previous=r),t.next=r,this.tail===t&&(this.tail=r),this._incrementLength(),r}_setFirstNode(t){if(this.head||this.tail)throw new Error("_setFirstNode error!");const e=Cl(t,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(t){return this.tail?this.insertAfter(this.tail,t):this._setFirstNode(t)}pop(){if(!this.tail)throw new Error("DoublyLinkedList is empty!");const t=this.tail.item;return this.remove(this.tail),t}shift(){if(!this.head)throw new Error("DoublyLinkedList is empty!");const t=this.head.item;return this.remove(this.head),t}unshift(t){return this.head?this.insertBefore(this.head,t):this._setFirstNode(t)}removeAll(){let t=this.head;for(;t;){const e=t.next;uf(t),t=e}this.head=void 0,this.tail=void 0,this._setLength(0)}}const cf=new Set;function hf(n,t=n){cf.has(t)||(cf.add(t),console.warn(n))}function Xg(){return{func:void 0,scope:void 0,_hasRemoved:!1,_once:!1}}function Yg(n){n.func=void 0,n.scope=void 0,n._hasRemoved=!1,n._once=!1}const ns=new Sl(Xg,Yg,!0);class Pl{constructor(){f(this,"__dll");f(this,"__currentListenerStack")}get _dll(){return this.__dll=this.__dll??new lf({needLength:!0}),this.__dll}_pushCurrentListener(t){this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.push(t):this.__currentListenerStack=[this.__currentListenerStack,t]:this.__currentListenerStack=t}_popCurrentListener(){if(this.__currentListenerStack)Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.pop():this.__currentListenerStack=void 0;else throw new Error("cannot pop!")}_hasCurrentListener(t){return this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.indexOf(t)!==-1:this.__currentListenerStack===t:!1}do(...t){if(this.__dll&&!this._dll.empty){let e=this._dll.head;for(;e;){const r=e.item;r._hasRemoved||(this._pushCurrentListener(r),r.func.call(r.scope,...t),this._popCurrentListener());const i=e.next;r._once&&!r._hasRemoved&&(this.remove(e),e=void 0),e&&this._clearHasRemoved(e),e=i}}}get empty(){if(!this.__dll||this._dll.empty)return!0;let t=!0,e=this._dll.head;for(;e;){if(!e.item._hasRemoved){t=!1;break}e=e.next}return t}isHandlerValid(t){return!t.item._hasRemoved}nextHandler(t){if(!t.item._hasRemoved)throw new Error("handler has removed!");let e=t.next;for(;e&&e.item._hasRemoved;)e=e.next;return e}prevHandler(t){if(!t.item._hasRemoved)throw new Error("handler has removed!");let e=t.previous;for(;e&&e.item._hasRemoved;)e=e.previous;return e}moveAfter(t,e){if(t.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or nextHandler has removed!");return this._dll.moveAfter(t,e)}moveBefore(t,e){if(t.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or prevHandler has removed!");return this._dll.moveBefore(t,e)}insertBefore(t,e,r,i=!1){if(t.item._hasRemoved)throw new Error("handler has removed!");const s=ns.create();return s.func=e,s.scope=r,s._once=i,this._dll.insertBefore(t,s)}insertAfter(t,e,r,i=!1){if(t.item._hasRemoved)throw new Error("handler has removed!");const s=ns.create();return s.func=e,s.scope=r,s._once=i,this._dll.insertAfter(t,s)}_clearHasRemoved(t){t.item._hasRemoved&&!this._hasCurrentListener(t.item)&&(ns.destroy(t.item),this._dll.remove(t))}remove(t){if(!t.item||t.item._hasRemoved)throw new Error("handler has removed!");this._hasCurrentListener(t.item)?t.item._hasRemoved=!0:(ns.destroy(t.item),this._dll.remove(t))}removeAll(){if(this.__dll&&!this._dll.empty){let t=this._dll.head;for(;t;){const e=t.next;t.item._hasRemoved||this.remove(t),t=e}}}destroy(){if(!this.__dll)return;let t=this._dll.head;for(;t;){const e=t.next,r=t;this._hasCurrentListener(r.item)||(console.warn("Event has remove item that on current stack!"),console.warn(`${r.item.func.toString()}`)),ns.destroy(r.item),this._dll.remove(r),t=e}this.__dll=void 0,this.__currentListenerStack=void 0}push(t,e,r=!1){const i=ns.create();return i.func=t,i.scope=e,i._once=r,this._dll.push(i)}pop(){const t=this.tail;if(!t)throw new Error("pop error!");this.remove(t)}shift(){const t=this.head;if(!t)throw new Error("shift error!");this.remove(t)}unshift(t,e,r=!1){const i=ns.create();return i.func=t,i.scope=e,i._once=r,this._dll.unshift(i)}get tail(){let t=this._dll.tail;for(;t&&t.item._hasRemoved;)t=t.previous;return t}get head(){let t=this._dll.head;for(;t&&t.item._hasRemoved;)t=t.previous;return t}}class ga{constructor(){f(this,"_listenerHandler");f(this,"_cid")}_reset(t,e){this._listenerHandler=t,this._cid=e}clone(t){return t=t??new ga,t._reset(this._listenerHandler,this._cid),t}get valid(){if(typeof this._listenerHandler<"u"&&typeof this._cid=="number"){const t=this._listenerHandler._cid;if(typeof t<"u"&&this._cid===t)return!0}return!1}}class bl extends ga{}let V=class extends q{constructor(){super(...arguments);f(this,"__pipe");f(this,"beforeCallback");f(this,"afterCallback")}get _pipe(){return this.__pipe=this.__pipe??new Pl,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,r,i=!1,s){const o=i?this._pipe.unshift(e,r,!1):this._pipe.push(e,r,!1);return s=s??new bl,s._reset(o,o._cid),s}disposableOn(e,r,i=!1,s){const o=this.on(e,r,i,s);return()=>{o.valid&&this.off(o)}}don(e,r,i=!1,s){return this.disposableOn(e,r,i,s)}disposableWeakOn(e,r,i=!1,s){const o=new q,a=()=>{!o.isDestroyed()&&o.destroy()};return o.dispose(this.disposableOn(e,r,i,s)),o.dispose(this.toDestroyEvent.disposableOn(a)),a}dwon(e,r,i=!1,s){return this.disposableWeakOn(e,r,i,s)}once(e,r,i=!1,s){const o=i?this._pipe.unshift(e,r,!0):this._pipe.push(e,r,!0);return s=s??new bl,s._reset(o,o._cid),s}disposableOnce(e,r,i=!1,s){const o=this.once(e,r,i,s);return()=>o.valid&&this.off(o)}donce(e,r,i=!1,s){const o=this.once(e,r,i,s);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||(hf("The event is destroying with listeners!"),this._pipe.removeAll())}};of(V);function Ys(n,t){return t=t??new ga,t._reset(n,n._cid),t}class Hg{constructor(){f(this,"__pipe")}get _pipe(){return this.__pipe=this.__pipe??new Pl,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}do(...t){return this._pipe.do(...t)}isHandlerValid(t){return t.valid?this._pipe.isHandlerValid(t._listenerHandler):!1}moveAfter(t,e){if(!t.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(t._listenerHandler,e._listenerHandler)}moveBefore(t,e){if(!t.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(t._listenerHandler,e._listenerHandler)}insertBefore(t,e,r,i=!1,s){if(!t.valid)throw new Error("handler is not valid!");const o=this._pipe.insertBefore(t._listenerHandler,e,r,i);return Ys(o,s)}insertAfter(t,e,r,i=!1,s){if(!t.valid)throw new Error("handler is not valid!");const o=this._pipe.insertAfter(t._listenerHandler,e,r,i);return Ys(o,s)}remove(t){if(!t.valid)throw new Error("handler is not valid!");return this._pipe.remove(t._listenerHandler)}removeAll(){return this._pipe.removeAll()}push(t,e,r=!1,i){const s=this._pipe.push(t,e,r);return Ys(s,i)}pop(){return this._pipe.pop()}shift(){return this._pipe.shift()}unshift(t,e,r=!1,i){const s=this._pipe.unshift(t,e,r);return Ys(s,i)}getTail(t){const e=this._pipe.tail;if(e)return Ys(e,t)}getHead(t){const e=this._pipe.head;if(e)return Ys(e,t)}}function Bg(n,t,...e){const r=setInterval(n,t,...e);return()=>clearInterval(r)}function Jg(n,t,...e){const r=setTimeout(n,t,...e);return()=>clearTimeout(r)}function jg(n,...t){let e;const r=()=>{const i=performance.now();n(i,...t),e=requestAnimationFrame(r)};return r(),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function ff(n,...t){let e;return e=requestAnimationFrame(()=>{const i=performance.now();n(i,...t)}),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function Zg(n,...t){let e=!1,r;return new Promise((i,s)=>{r=s,i()}).then(()=>{!e&&n(...t)}).catch(i=>{console.error(i)}),()=>(e=!0)&&r&&(r("nextMicroTask cancelled!"),r=void 0)}class Kg extends V{constructor(e,r,...i){super();f(this,"_cancellFunc");this._nextFunc=e,this.dispose(()=>{this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0)}),i.forEach(s=>this.dispose(s[r?"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 df extends Kg{constructor(...t){super(ff,!1,...t)}}function Hs(n,t,e={time:"don",immediate:!1}){const r=new df(...Array.isArray(n)?n:[n]),i=r[e.time??"don"](t);return(e.immediate??!1)&&t(),()=>{i(),r.destroy()}}function Qg(n,t,e){typeof e>"u"&&(t.endsWith(".gltf")?e="model/gltf+json":t.endsWith(".bin")?e="application/octet-stream":t.endsWith(".glb")?e="model/gltf-binary":t.endsWith(".jpg")||t.endsWith(".jpeg")?e="image/jpeg":t.endsWith(".png")?e="image/png":t.endsWith(".glsl")?e="text/plain":t.endsWith(".json")?e="application/json":t.endsWith(".b3dm")||t.endsWith(".i3dm")||t.endsWith("pnts")||t.endsWith("cmpt")?e="application/octet-stream":console.warn(`save ${t}: MimeType无法确定!`));const r=new Blob([n],{type:e||""});let i=URL.createObjectURL(r);var s=document.createElement("a"),o=new MouseEvent("click");s.download=t,s.href=i,s.dispatchEvent(o),URL.revokeObjectURL(i)}function $g(n,t){const e=document.createElement("a"),r=new MouseEvent("click");e.download=t||"下载",e.href=n,e.dispatchEvent(r)}const yl=class yl extends q{constructor(){super();f(this,"_set",new Set);f(this,"_toChangeEvent",this.disposeVar(new V));f(this,"_changedEvent",this.disposeVar(new V));f(this,"main");this.dispose(()=>{this._set.size!==0&&(yl.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 r of e)this._toChangeEvent.emit([],[r]),this._set.add(r),this._changedEvent.emit([],[r])}delete(...e){for(let r of e)this.main&&this.main==r&&(this.main=void 0),this._toChangeEvent.emit([r],[]),this._set.delete(r),this._changedEvent.emit([r],[])}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)}values(){return this._set.values()}};f(yl,"warnOnDestroying",!0);let cu=yl;class tm extends q{constructor(){super(...arguments);f(this,"registerEngines",{})}register(e,r,i){const s=this.registerEngines[e]||new Map;return s.has(r)&&console.warn(`register warn:${e}中${r}的实现类已经被注册,再次注册会覆盖。`),s.set(r,i),this.registerEngines[e]=s,r}getEngineObjConstructor(e,r){const i=this.registerEngines[r];if(!i)return;let s=e.constructor,o=e.typeName,a=i.get(o);if(a)return a;if(e.components.main)return;const u=o;for(;o!=="ESSceneObject"&&(s=s.getParentClass(),!!s);)if(o=s.type,a=i.get(o),a)return console.warn(`未找到${u}在${r}中对应的实现类! 使用父类${o}的实现类!`),a}createEngineObject(e,r){const i=this.getEngineObjConstructor(e,r.typeName);if(i){const s=new i(e,r);return s.createdEvent.emit(),s}else{const s=new is(e,r);return s.createdEvent.emit(),s}}}class em extends q{constructor(){super(...arguments);f(this,"registerEngines",{})}register(e,r,i){const s=this.registerEngines[e]||new Map;s.has(r)&&console.warn(`register warn:${e}中${r}的实现类已经被注册,再次注册会覆盖。`),s.set(r,i),this.registerEngines[e]=s}getEngineObjConstructor(e,r){const s=(this.registerEngines[r]||new Map).get(e);if(s)return s;console.warn(`未找到${e}在${r}中对应的实现类!`)}createEngineObject(e,r){const i=this.getEngineObjConstructor(e.typeName,r.typeName);if(i){const s=new i(e,r);return s.createdEvent.emit(),s}else{const s=new is(e,r);return s.createdEvent.emit(),s}}}const jr=class jr extends q{constructor(e,r,i=!1){super();f(this,"_createdEvent",this.dv(new V));f(this,"_id",++jr._accumId);this._sceneObject=e,this._viewer=r;{if(i)return;const s=(o,a)=>{for(let u of o)this._viewer.delete(u);for(let u of a)u.parentID=this.sceneObject.id,this._viewer.add(u)};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}};f(jr,"context",new tm),f(jr,"contextEditing",new em),f(jr,"register",jr.context.register.bind(jr.context)),f(jr,"registerEditing",jr.contextEditing.register.bind(jr.contextEditing)),f(jr,"_accumId",-1);let is=jr;const _l=class _l extends q{constructor(e,r){super();f(this,"_id",++_l._accumId);this._name=e,this._description=r}get id(){return this._id}get name(){return this._name}get description(){return this._description}};f(_l,"_accumId",-1);let Pi=_l;class Nl extends Pi{constructor(t,e,r,i,s){super(t,e),this._withUndefined=r,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 ht extends Nl{constructor(t,e,r,i,s,o){const a=t instanceof p.ReactiveVariable?"未获取到属性名":t[1].toString();super(e??a,o??a,i??!1,s??!1,r),this._reactVar=t}get reactVar(){return this._reactVar}}class W extends ht{get type(){return"BooleanProperty"}}class nt extends ht{get type(){return"StringProperty"}}class T extends ht{get type(){return"NumberProperty"}}class rm extends ht{get type(){return"MaximumScreenSpaceErrorProperty"}}class pf extends ht{get type(){return"StringsProperty"}}class nm extends ht{get type(){return"NumbersProperty"}}class im extends ht{get type(){return"BooleansProperty"}}class sm extends ht{get type(){return"String2Property"}}class om extends ht{get type(){return"String3Property"}}class am extends ht{get type(){return"String4Property"}}class gf extends ht{get type(){return"String2sProperty"}}class um extends ht{get type(){return"String3sProperty"}}class lm extends ht{get type(){return"String4sProperty"}}class ce extends ht{get type(){return"Number2Property"}}class Re extends ht{get type(){return"Number3Property"}}class rn extends ht{get type(){return"Number4Property"}}class cm extends ht{get type(){return"Number4WithUndefinedProperty"}}class mf extends ht{get type(){return"Number2sProperty"}}class Tl extends ht{get type(){return"Number3sProperty"}}class hm extends ht{get type(){return"Number4sProperty"}}class fm extends ht{get type(){return"Boolean2Property"}}class dm extends ht{get type(){return"Boolean3Property"}}class pm extends ht{get type(){return"Boolean4Property"}}class gm extends ht{get type(){return"Boolean2sProperty"}}class mm extends ht{get type(){return"Boolean3sProperty"}}class vm extends ht{get type(){return"Boolean4sProperty"}}class ym extends ht{get type(){return"StringNumberProperty"}}class _m extends ht{get type(){return"StringNumbersProperty"}}class gt extends rn{get type(){return"ColorProperty"}}class wm extends Re{get type(){return"ColorRgbProperty"}}class Em extends T{get type(){return"DashPatternProperty"}}class lt extends ht{constructor(t,e,r,i,s,o,a){super(t,r,i,s,o,a),this._enums=e}get type(){return"EnumProperty"}get enums(){return this._enums}}class Sm extends ht{constructor(t,e,r,i,s,o,a){super(t,r,i,s,o,a),this._enums=e}get type(){return"EnumStringsProperty"}get enums(){return this._enums}}class bi extends ht{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class vf extends ht{constructor(t,e,r,i,s){super(t,e,i,!1,!1,s),this._paramTypes=r}get type(){return"ParamsProperty"}get paramTypes(){return this._paramTypes}}class tt extends Pi{constructor(e,r,i,s,o){const a=s??"Unnamed Function";super(a,o??a);f(this,"_paramsProperty");f(this,"_getValueFunc");this._func=r;const u=this.disposeVar(p.reactJson(i));this._paramsProperty=this.disposeVar(new vf(u,a+"_params",e,i));const[l]=p.getReactFuncs(this._paramsProperty.reactVar);this._getValueFunc=l}get paramsProperty(){return this._paramsProperty}exec(){this._func(...this._getValueFunc())}get type(){return"FunctionProperty"}}class $ extends Pi{constructor(t,e,r){const i=e??"分组";super(i,r??i),this._children=t}get type(){return"GroupProperty"}get children(){return this._children}}class H extends ht{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class xl extends ht{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class Cm extends ce{get type(){return"MinmaxProperty"}}class Im extends rn{get type(){return"NearFarScalerProperty"}}class yf extends Nl{constructor(t,e,r,i,s,o,a){const u=r??"非响应式Json";super(u,a??u,s??!1,o??!1,i),this._getJsonStringFunc=t,this._setJsonStringFunc=e}get type(){return"NonreactiveJsonStringProperty"}get getJsonStringFunc(){return this._getJsonStringFunc}get setJsonStringFunc(){return this._setJsonStringFunc}}class Pm extends ce{get type(){return"NumberRangeProperty"}}class ge extends ht{constructor(t,e,r,i,s,o,a,u){super(t,i,s,o,a,u),this._step=e,this._minMax=r}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}function bm(n,t){const[e,r,i]=p.getReactFuncs(n),[s,o,a]=p.getReactFuncs(t),u=p.react((e()??0)/(s()??3e3)),l=()=>{const c=u.value,h=s()??3e3,d=e()??0;if(!Number.isFinite(h)||!Number.isFinite(d)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${d}`);return}Math.abs(c*h-d)<.001||(h<=0?u.value=0:u.value=d/h)};return u.dispose(i.disposableOn(l)),u.dispose(a.disposableOn(l)),u.dispose(u.changed.disposableOn(()=>{const c=u.value,h=s()??3e3,d=e()??0;if(!Number.isFinite(h)||!Number.isFinite(d)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${d}`);return}Math.abs(c*h-d)<.001||r(c*h)})),u}class hu extends Pi{constructor(e,r,i,s,o,a){super(s??"播放器",a??"播放器");f(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=e,this._ratioReact=r,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}}f(hu,"createPlayingRatio",bm);class Bs extends Re{get type(){return"PositionProperty"}}class _f extends ht{get type(){return"PositionsProperty"}}class Nm extends ht{get type(){return"PositionsSetPropety"}}class Ol extends Re{get type(){return"RotationProperty"}}class ma extends nt{get type(){return"UriProperty"}}class wf extends Pi{constructor(e,r,i,s,o,a){const u=s??"视角播放器";super(u,a??u);f(this,"_defaults",{playing:!1,loop:!1});this._playingReact=e,this._stopFn=r,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 Ef extends ht{get type(){return"DatesProperty"}}class ss extends ht{get type(){return"DateProperty"}}var B=(n=>(n.Place="place",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))(B||{}),Sf=(n=>(n.DECIMAL_DEGREE="DECIMAL_DEGREE",n.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",n.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",n))(Sf||{});class Tm{constructor(t){this.childPickedInfo=t}}class xm{constructor(t,e,r,i,s,o){this.pickResult=t,this.sceneObject=e,this.tilesetPickInfo=r,this.geojsonPickInfo=i,this.attachedInfo=s,this.screenPosition=o}assign(t){t!=null&&t.pickedResult&&(this.pickResult=t.pickedResult),t!=null&&t.sceneObject&&(this.sceneObject=t.sceneObject),t!=null&&t.tilesetPickInfo&&(this.tilesetPickInfo=t.tilesetPickInfo),t!=null&&t.geojsonPickInfo&&(this.geojsonPickInfo=t.geojsonPickInfo),t!=null&&t.attachedInfo&&(this.attachedInfo=t.attachedInfo),t!=null&&t.screenPosition&&(this.screenPosition=t.screenPosition)}}class Om extends q{constructor(e){super();f(this,"_sceneObjRefs",new Map);f(this,"_refs",{});f(this,"_refsChanged",this.dv(new V));const r=(i,s,o)=>{if(o){const a=this.getLastSceneObject(o),u=this._sceneObjRefs.get(o);if(!u)console.warn(`this._sceneObjRefs中不存在ref(${o}), 可能系统存在逻辑问题`);else{const c=u.indexOf(i);c===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(u.splice(c,1),u.length===0&&this._sceneObjRefs.delete(o))}const l=this.getLastSceneObject(o);this._refs[o]=l,this._refsChanged.emit(l,a)}if(s){const a=this.getLastSceneObject(s),u=this._sceneObjRefs.get(s);u?(u.push(i),u.length>0&&console.warn(`同时存在多个ref${s}相同的场景对象!
|
|
21
|
+
`)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[r]=g.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>fp(g.copyright),1e3*60),setInterval(()=>fp(g.copyright),1440*60*1e3)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&g.copyright.print()}catch{console.warn("版本信息有误!")}const pp=new Set;function Ao(r,e=r){pp.has(e)||(pp.add(e),console.warn(r))}function Ni(r){const e=Pl(r),t=()=>e[0][e[1]],n=s=>{try{e[0][e[1]]=s}catch(o){Ao(`setValue error, obj(${e[0].constructor.name}) prop(${e[1]}) error(${o})`)}},i=e[0][e[2]];return[t,n,i]}function Zy(){return!0}function Ky(){throw new Error("throwOnDestroyed")}function gp(r){for(var e in r)typeof r[e]=="function"&&(r[e]=Ky);r.isDestroyed=Zy}const Yc=class Yc{constructor(){d(this,"_memId",++Yc._lastMemId);d(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 gp(this)}tryDestory(){if(!this.isDestroyed())return this.destroy()}};d(Yc,"_lastMemId",-1);let V=Yc,Kc;function mp(r){Kc=r}Object.defineProperties(V.prototype,{toDestroyEvent:{get(){if(this._toDestroyEvent===void 0){if(!Kc)throw new Error("Destroyable EventCtor not registered yet!");this._toDestroyEvent=this.disposeVar(new Kc)}return this._toDestroyEvent}}});class Cl{constructor(e,t,n=!1){d(this,"_freeElements");d(this,"_usedElementsCount");d(this,"_usedElements");d(this,"_nextCreateID");d(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 Qy(){return{item:void 0,previous:void 0,next:void 0}}function $y(r){r.item=void 0,r.previous=void 0,r.next=void 0}const vp=new Cl(Qy,$y,!0);function Qc(r,e,t){const n=vp.create();return n.item=r,n.previous=e,n.next=t,n}function yp(r){if(!r)throw new Error("node is undefined!");vp.destroy(r)}function $c(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 _p{constructor(e){d(this,"head");d(this,"tail");d(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!");$c(this,e),this._decrementLength(),yp(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){$c(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){$c(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=Qc(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=Qc(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=Qc(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;yp(e),e=t}this.head=void 0,this.tail=void 0,this._setLength(0)}}function t_(){return{func:void 0,scope:void 0,_hasRemoved:!1,_once:!1}}function e_(r){r.func=void 0,r.scope=void 0,r._hasRemoved=!1,r._once=!1}const js=new Cl(t_,e_,!0);class th{constructor(){d(this,"__dll");d(this,"__currentListenerStack")}get _dll(){return this.__dll=this.__dll??new _p({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=js.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=js.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)&&(js.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:(js.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()}`)),js.destroy(n.item),this._dll.remove(n),e=t}this.__dll=void 0,this.__currentListenerStack=void 0}push(e,t,n=!1){const i=js.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=js.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 fu{constructor(){d(this,"_listenerHandler");d(this,"_cid")}_reset(e,t){this._listenerHandler=e,this._cid=t}clone(e){return e=e??new fu,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 eh extends fu{}let I=class extends V{constructor(){super(...arguments);d(this,"__pipe");d(this,"beforeCallback");d(this,"afterCallback")}get _pipe(){return this.__pipe=this.__pipe??new th,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 eh,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 V,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 eh,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||(Ao("The event is destroying with listeners!"),this._pipe.removeAll())}};mp(I);function Fo(r,e){return e=e??new fu,e._reset(r,r._cid),e}class n_{constructor(){d(this,"__pipe")}get _pipe(){return this.__pipe=this.__pipe??new th,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 Fo(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 Fo(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 Fo(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 Fo(s,i)}getTail(e){const t=this._pipe.tail;if(t)return Fo(t,e)}getHead(e){const t=this._pipe.head;if(t)return Fo(t,e)}}class De extends V{constructor(t,n,i){super();d(this,"_changed");d(this,"_value");d(this,"_oldValue");d(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 I)),this._changed}forceChange(){this._changed&&this._changed.emit(this._value,this._value)}}function B(r,e,t){return new De(r,e,t)}function at(r){return new De(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 Ht(r){return B(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 Sl(r,e,t){return B(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 ss(r,e,t){return B(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 dt(r){return new De(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 jt(r){return new De(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 r_(r){return new De(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 i_(r){return new De(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 s_(r){return Sl(r,(e,t)=>e.every((n,i)=>n===t[i]),e=>[...e])}function nh(r){return ss(r,(e,t)=>e.every((n,i)=>n===t[i]),e=>[...e])}function o_(r){return Sl(r,(e,t)=>JSON.stringify(e)===JSON.stringify(t),e=>JSON.parse(JSON.stringify(e)))}function a_(r){return ss(r,(e,t)=>JSON.stringify(e)===JSON.stringify(t),e=>JSON.parse(JSON.stringify(e)))}function bl(r){return nh(r)}function wp(r){return ss(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 u_(r){return ss(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 Pl(r){const e=r instanceof De?[r,"value","changed"]:[...r];return e[2]=e[2]||e[1]+"Changed",e}function rh(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 l_(r,e,t,n,i=!1){const s=rh(r,e,t,i),o=rh(e,r,n,i);return()=>(s(),o())}function j(r,e,t,n=!1){const i=r instanceof De?[r,"value","changed"]:r,s=e instanceof De?[e,"value","changed"]:e;return rh(i,s,t,n)}function $(r,e,t,n,i=!1){const s=Pl(r),o=Pl(e);return l_(s,o,t,n,i)}function c_(r,e,t,n=!1){const[i]=Ni(e);return $(r,e,s=>s??t,s=>{if(!(s===t&&i()===void 0))return s},n)}function ko(){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 Il(r,e){if(!window||!window.setTimeout||!window.clearTimeout)throw new Error("目前只适合在浏览器中使用!");let t=0;function n(){t>0&&(window.clearTimeout(t),t=0)}function i(...s){n(),t=window.setTimeout(r,e,...s)}return[i,n]}function ih(r,e,...t){const n=setInterval(r,e,...t);return()=>clearInterval(n)}function sh(r,e,...t){const n=setTimeout(r,e,...t);return()=>clearTimeout(n)}function xl(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 Vo(r,...e){let t;return t=requestAnimationFrame(()=>{const i=performance.now();r(i,...e)}),()=>typeof t<"u"&&(cancelAnimationFrame(t),t=void 0)}function pu(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 Tl extends I{constructor(t,n,...i){super();d(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 oh extends Tl{constructor(...e){super(pu,!1,...e)}}function h_(...r){return new oh(...r)}class d_ extends Tl{constructor(...e){super(pu,!0,...e)}}function f_(...r){return new oh(...r)}class Nl extends Tl{constructor(...e){super(Vo,!1,...e)}}function ge(...r){return new Nl(...r)}function p_(r,e){return new Nl(...r).don(e())}class Ep extends Tl{constructor(...e){super(Vo,!0,...e)}}function g_(...r){return new Ep(...r)}function zs(r,e,t={time:"don",immediate:!1}){const n=new Nl(...Array.isArray(r)?r:[r]),i=n[t.time??"don"](e);return(t.immediate??!1)&&e(),()=>{i(),n.destroy()}}function gu(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 ah(r,e){let t=!1;const n=gu(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 uh(r,e){return!ah(r,(n,i)=>!e(n,i))}function mu(r,e,t,n){const i=r;if(!i[e]){const s=n(),o=Object.fromEntries(Object.entries(s).filter(([a,u])=>{const l=Object.getPrototypeOf(t),c=a in l;if(c){const h=u instanceof De?u.value:u;r[a]=h}return!c}).map(([a,u])=>u instanceof De?[a,u]:[a,Array.isArray(u)?Ht(u):B(u)]));i[e]=o}return i[e]}function Oi(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,h;if(a[t])return;const u=[];let l=Object.getPrototypeOf(a);for(;l;)u.push(l),l=Object.getPrototypeOf(l);u.reverse();for(let f of u){const p=(c=f.constructor)==null?void 0:c.__xbsj_dpSymbol;if(!p)continue;const m=(h=f.constructor)==null?void 0:h.__xbsj_createDefaultProps;m&&mu(a,p,f,m)}};Object.defineProperties(r,{[i]:{get(){return o(this),mu(this,t,r,e)[i].value},set(a){o(this);const u=mu(this,t,r,e)[i];if(!u){console.error("!propObj");debugger}u.value=a}},[`${i}Changed`]:{get(){return o(this),mu(this,t,r,e)[i].changed}},[`${i}React`]:{get(){return o(this),mu(this,t,r,e)[i]}}})}}const vu=new WeakMap;function ti(r,e,t){vu.has(r)||vu.set(r,{});const n=vu.get(r);n[e]=t}function An(r,e){return vu.has(r)?vu.get(r)[e]:void 0}function ei(r,e){const t=gu(r);let n=0;for(;;){const{done:i,value:s}=t.next();if(i)break;e(s,n++)}}function yu(r,e,t){const n=gu(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 m_=r=>++r;function lh(r){return yu(r,m_,0)}function Di(r){return yu(r,(e,t)=>e>t?e:t,Number.NEGATIVE_INFINITY)}function os(r){return yu(r,(e,t)=>e<t?e:t,Number.POSITIVE_INFINITY)}function Cp(r,e){let t=r;for(let n of e)t=t[n];return t}function v_(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*Us(r,e){const t=gu(r);for(;;){const{done:n,value:i}=t.next();if(n)break;yield Cp(i,e)}}class _u extends V{constructor(){super();d(this,"_innerObj");d(this,"_toChangeEvent");d(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 I),this._toChangeEvent}get changedEvent(){return this._changedEvent||(this._changedEvent=new I),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 ch(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 y_(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 __(r,e){const t=document.createElement("a"),n=new MouseEvent("click");t.download=e||"下载",t.href=r,t.dispatchEvent(n)}function w_(){return new Promise((r,e)=>{const t=performance.now();requestAnimationFrame(n=>r(n>t))})}const Ol=r=>{let e,t;return t=n=>{n=performance.now(),e=requestAnimationFrame(t),r(n)},e=requestAnimationFrame(t),()=>{cancelAnimationFrame(e)}};function hh(r,e,t=Ol){let n=Number.NEGATIVE_INFINITY,i;function s(u){u-n>e&&i&&(r(...i),i=void 0,n=u)}const o=t&&t(s)||void 0;function a(...u){i=u}return[a,o]}const Sp=[];function bp(r,e,t){if(Sp.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"||(Sp.push(r),e&&e(),i.onload=i.onreadystatechange=null)},i.onerror=(s,o,a,u,l)=>{t(l)},n.appendChild(i)}function dh(r,e=!0){if(e){const t=window.L;window.L&&(window.L=void 0);const n=window.define;return window.define&&(window.define=void 0),new Promise((i,s)=>{bp(r,i,s)}).then(()=>(window.define=n,window.L=t,Promise.resolve()))}else return new Promise((t,n)=>{bp(r,t,n)})}async function Pp(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 E_ extends V{constructor(e){super(),this._owner=e}get owner(){return this._owner}}function C_(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]=os(n(0))??NaN,i[1]=os(n(1))??NaN,i[2]=os(n(2))??NaN,s[0]=Di(n(0))??NaN,s[1]=Di(n(1))??NaN,s[2]=Di(n(2))??NaN,{min:i,max:s}}async function S_(r,e=fetch){const t=await e(r);return t.ok?await t.arrayBuffer():void 0}function Dl(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 Ml{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 b_(r){return new Ml(r,2)}function P_(r){return new Ml(r,3)}function I_(r){return new Ml(r,4)}class x_{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 T_(r,e,t=0,n=1){return new x_(r,e,t,n)}g.Vector=void 0,(r=>{function e(U,...q){if(U=U||Dl(q.length),q.length>U.length)throw new Error("args.length > target.length");return U instanceof Float64Array?U.set(q):N(q,U),U}r.set=e;function t(U,q){const xt=U.length;for(let pe=0;pe<xt;++pe)if(!q(U[pe],pe))return!1;return!0}r.every=t;function n(U,q,xt){const pe=U.length;let Rn=xt;for(let Ti=0;Ti<pe;++Ti)Rn=q(Rn,U[Ti],Ti);return Rn}r.reduce=n;function*i(U){for(let q=0;q<U.length;++q)yield U[q]}r.itr=i;const s=(U,q)=>U+=q*q;function o(U){return n(U,s,0)}r.magnitudeSquared=o;function a(U){const q=o(U);return Math.sqrt(q)}r.magnitude=a;function u(U,q=1e-5){const xt=o(U);return Math.abs(xt-1)<q}r.isNormalized=u;let l;const c=(U,q,xt)=>U+q*l[xt];function h(U,q){return P(U,q),l=q,n(U,c,0)}r.dot=h;let f;const p=(U,q,xt)=>U+=(q-f[xt])*(q-f[xt]);function m(U,q){return P(U,q),f=q,n(U,p,0)}r.distanceSquared=m;function w(U,q){return Math.sqrt(m(U,q))}r.distance=w;let E;const b=(U,q)=>U===E[q];function v(U,q){return P(U,q),E=q,t(U,b)}r.equals=v;let y,_;const C=(U,q)=>Math.abs(U-y[q])<_;function S(U,q,xt=0){return P(U,q),y=q,_=xt,t(U,C)}r.equalsEpsilon=S;function P(U,q){if(U.length!==q.length)throw new Error("left.length !== right.length")}function T(U,q,xt){const pe=U.length;xt=xt||Dl(pe),P(U,xt);for(let Rn=0;Rn<pe;++Rn)xt[Rn]=q(U[Rn],Rn);return xt}r.op1=T;function R(U,q,xt,pe){P(U,q),pe&&P(U,pe);const Rn=U.length;pe=pe||Dl(Rn);for(let Ti=0;Ti<Rn;++Ti)pe[Ti]=xt(U[Ti],q[Ti]);return pe}r.op2=R;const F=U=>U;function N(U,q){return T(U,F,q)}r.clone=N;let L=0;const M=(U,q)=>U*L;function k(U,q,xt){return L=q,T(U,M,xt)}r.multiplyByScalar=k;function J(U,q,xt=0){const pe=o(U);if(pe<=xt)return;const Rn=Math.sqrt(pe);return k(U,1/Rn,q)}r.normalize=J;function st(U,q){return k(U,-1,q)}r.negate=st;const gt=U=>Math.abs(U);function Ft(U,q){return T(U,gt,q)}r.abs=Ft;const ne=U=>U-Math.floor(U);function dn(U,q){return T(U,ne,q)}r.fract=dn;const Bt=(U,q)=>U-q;function kt(U,q,xt){return R(U,q,Bt,xt)}r.subtract=kt;const be=(U,q)=>U+q;function du(U,q,xt){return R(U,q,be,xt)}r.add=du;const Vs=(U,q)=>U*q;function kb(U,q,xt){return R(U,q,Vs,xt)}r.multiply=kb;const Vb=(U,q)=>U/q;function Bb(U,q,xt){return R(U,q,Vb,xt)}r.divide=Bb;let dp;const jb=(U,q)=>U*(1-dp)+q*dp;function zb(U,q,xt,pe){return dp=xt,R(U,q,jb,pe)}r.lerp=zb})(g.Vector||(g.Vector={}));function Rl(r,e=0,t=1){return r<e?e:r>t?t:r}class Ll extends V{constructor(t,n,i,s,o,a,u,l){super();d(this,"__status");d(this,"_statusChangedEvent");d(this,"_forceCancelFunc");d(this,"_startEvent");d(this,"_progressEvent");d(this,"_completeEvent");d(this,"_cancelEvent");d(this,"_cancelledEvent");d(this,"_errorEvent");d(this,"_finishedEvent");d(this,"_processingID",-1);this._startProcessingFunc=t,this.startFunc=n,this.progressFunc=i,this.completeFunc=s,this.cancelFunc=o,this.cancelledFunc=a,this.errorFunc=u,this.finishedFunc=l,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 I,this._startEvent}get progressEvent(){return this._progressEvent=this._progressEvent||new I,this._progressEvent}get completeEvent(){return this._completeEvent=this._completeEvent||new I,this._completeEvent}get cancelEvent(){return this._cancelEvent=this._cancelEvent||new I,this._cancelEvent}get cancelledEvent(){return this._cancelledEvent=this._cancelledEvent||new I,this._cancelledEvent}get errorEvent(){return this._errorEvent=this._errorEvent||new I,this._errorEvent}get finishedEvent(){return this._finishedEvent=this._finishedEvent||new I,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 I),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 fh=class extends Error{};function Ip(r,e){typeof r=="function"?r(e):r.cancelFunc=e}class ph extends Ll{constructor(t=300){super(({progressFunc:n,completeFunc:i,errorFunc:s})=>{const[o,a]=Il(()=>{if(!this._lastDebounceValue)throw new Error("!this._lastDebounceValue");n([this._lastDebounceValue,this._debouncTimes]),this._debouncTimes=0},this._delayTime);return this._d=o,()=>{a()}});d(this,"_lastDebounceValue");d(this,"_debouncTimes",0);d(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 xp(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;Ip(r,()=>{a=!0,n.abort()});let u=fetch(s,o);return e&&(u=u.then(l=>{if(!l.ok)return l;if(!l.body)throw Error("ReadableStream not yet supported in this browser.");const c=l.headers.get("content-length"),h=c?parseInt(c,10):0;let f=0;return new Response(new ReadableStream({start(p){if(!l.body)throw new Error("!response.body");const m=l.body.getReader();w();function w(){m.read().then(({done:E,value:b})=>{if(E){p.close();return}if(!b)throw new Error("!value");if(!e)throw new Error("!progressFunc");f+=b.byteLength,e(f,h),p.enqueue(b),w()}).catch(E=>{p.error(E)})}}}),{status:l.status,statusText:l.statusText,headers:l.headers})}).catch(l=>{throw a?(l instanceof Error&&l.code!==20&&console.error("error.code !== 20"),console.log("fetching cancelled!"),new fh("fetching cancelled!")):(l instanceof Error&&l.code===20&&console.error("error.code === 20"),l)})),u}function Tp(...r){if(r.length>=1)if(typeof r[0]=="function"||typeof r[0]>"u"){const e={};let t=xp(e,...r);const{cancelFunc:n}=e;if(!n)throw new Error("!cancelResult.cancelFunc");return[n,t]}else return xp(...r);throw new Error("cancelableFetch args error!")}class N_ extends Ll{constructor(t,...n){super(({progressFunc:i,completeFunc:s,errorFunc:o},...a)=>{const u={};let l={loaded:0,total:0};const c=(p,m)=>{l.loaded=p,l.total=m,i(l)},h=this._fetchArgs||a;if(h.length===0)throw new Error("fetchArgs.length === 0");if(Tp(u,c,...h).then(t).then(s).catch(p=>{p instanceof fh||o(p)}),!u.cancelFunc)throw new Error("!cancelResult.cancelFunc");return u.cancelFunc});d(this,"_fetchArgs");n.length>0&&(this._fetchArgs=n)}get fetchArgs(){return this._fetchArgs}}function gh(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 u=this[i];this[i]=a,this[s]&&this[s].emit(a,u)}}},[o]:{get(){return typeof this[s]>"u"&&(this[s]=new I,typeof this.dispose<"u"&&this.dispose(()=>this[s].destroy())),this[s]}}})}class mh extends Ll{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}));d(this,"_intervalID");d(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))}))}}gh(mh,"leading",!0),gh(mh,"intervalTime",500);function O_(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 fh("sleep cancel error!"))};if(typeof e=="boolean"&&e)return[s,i];if(e)return Ip(e,s),i}class D_{constructor(e=0,t=0,n=0,i,s){d(this,"_processData");d(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 Np extends Ll{constructor(t=1e3,n=0,i=Ol){let s;function o(){s&&s()}super(({progressFunc:u,completeFunc:l,errorFunc:c})=>{const h=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=u,this._base.completeFunc=()=>{h&&h(),l()},this._base.start(),s=h,o});d(this,"_base");d(this,"duration");d(this,"delay");d(this,"startUpdateFunc");this._base=new D_,this.duration=t,this.delay=n,this.startUpdateFunc=i}get startTime(){return this._base.startTime}}class M_ extends V{constructor(t){super();d(this,"_target",0);d(this,"_current",0);d(this,"_start",0);d(this,"_timing",new Np(Number.POSITIVE_INFINITY));d(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 I),this._currentChanged}}function Op(r,e){e=e||[];const t=r.parentNode;return t?Op(t,e.concat(t)):e}function R_(r){const e=r.composedPath&&r.composedPath()||r.path,t=r.target;if(e!=null)return e.indexOf(window)<0?e.concat(window):e;if(t===window)return[window];if(t===null)throw new Error("target === null");return[t].concat(Op(t),window)}function Ke(r,e=!1){const{offsetX:t,offsetY:n}=r;let i=t,s=n;{const o=R_(r);for(let a=0;a<o.length;++a){const u=o[a];if(u!==r.currentTarget&&u instanceof HTMLElement)i+=u.clientLeft,s+=u.clientTop,i+=u.offsetLeft,s+=u.offsetTop;else break}}return e?[i*window.devicePixelRatio,s*window.devicePixelRatio]:[i,s]}function Bo(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,u=o-s.left,l=a-s.top;return e?[u*window.devicePixelRatio,l*window.devicePixelRatio]:[u,l]}class Dp extends V{constructor(t){super();d(this,"_clickEvent",new I);d(this,"_dbclickEvent",new I);d(this,"_downEvent",new I);d(this,"_upEvent",new I);d(this,"_moveEvent",new I);d(this,"_debouncing",new ph(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,h,f],p])=>{p===1?this._clickEvent.emit(c,h,f):p>=2?this._dbclickEvent.emit(c,h,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[h,f]=Ke(c);i[0]=h,i[1]=f,this._downEvent.emit(h,f,c)},a=c=>{const[h,f]=Ke(c);n&&!s&&this._debouncing.debounce(h,f,c),n=!1,s=!1,this._upEvent.emit(h,f,c)},u=c=>{const[h,f]=Ke(c);if(n&&!s){const[p,m]=i;(Math.abs(h-p)>3||Math.abs(f-m)>3)&&(s=!0)}this._moveEvent.emit(h,f,c)},l=()=>{n=!1,s=!1};t.addEventListener("pointerdown",o),t.addEventListener("pointerup",a),t.addEventListener("pointermove",u),t.addEventListener("pointerout",l),this.dispose(()=>{t.removeEventListener("pointerdown",o),t.removeEventListener("pointerup",a),t.removeEventListener("pointermove",u),t.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 vh extends V{constructor(){super();d(this,"_pickRectEvent",this.disposeVar(new I));d(this,"_updateRectEvent",this.disposeVar(new I));d(this,"_pointerActionEvent",this.disposeVar(new I));d(this,"_active",this.disposeVar(B(!1)));d(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:u})=>{o==="PointerDown"?(this._active.value=!0,t=a,n=u,i=a,s=u,this._setPickRect({left0:t,top0:n,left1:i,top1:s}),this._updateRectEvent.emit(this._pickRect)):o==="PointerMove"?this._active.value&&(i=a,s=u,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=u,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:u}=i;return t>s&&t<=s+a&&n>=o&&n<=o+u}}class L_ extends vh{constructor(e){super();const t=this.disposeVar(new Dp(e));this.dispose(t.downEvent.disposableOn((o,a,u)=>u.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(vh.getLeftTopAndSize(o,s)){const{left:a,top:u,width:l,height:c}=s;n.style.height=`${c|0}px`,n.style.width=`${l|0}px`,n.style.left=`${a|0}px`,n.style.top=`${u|0}px`}}))}}class Sr extends Error{}function as(r,e){An(r,"_promise_cancel")&&console.warn("setPromiseCancel warn: promise has cancelFunc!"),ti(r,"_promise_cancel",e)}function jo(r){return An(r,"_promise_cancel")}function zo(r){return!!jo(r)}function yh(r,e){const t=jo(r);return t?(t(e),!0):!1}function _h(r){const[e,t]=r;return as(t,e),t}function Uo(r){let e;const t=new Promise((n,i)=>{e=i,r.then(n).catch(i)});return as(t,e),t}function A_(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 F_(r){const e=new I,t=new I;return r.then(n=>{e.isDestroyed()||e.emit(n)}).catch(n=>{t.isDestroyed()||t.emit(n)}),[e,t]}class wh extends V{constructor(){super();d(this,"_cancelled",!1);d(this,"_cancelError");d(this,"_promiseSet",new Set);d(this,"_disposer")}get disposer(){return this._disposer=this._disposer||new V,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)yh(i);this._promiseSet.clear()}}get cancelFuncsNum(){return yu(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 Sr("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),zo(s)&&n.push(jo(s)),s.finally(()=>this._promiseSet.delete(s))));return Promise.any(i).finally(()=>(n.forEach((s=>s(new Sr("cancel from promiseAny!")))),n.length=0))}promiseAll(t){const n=[],i=t.map(s=>(this._promiseSet.add(s),zo(s)&&n.push(jo(s)),s.finally(()=>this._promiseSet.delete(s))));return Promise.all(i).finally(()=>(n.forEach((s=>s(new Sr("cancel from promiseAll!")))),n.length=0))}promiseRace(t){const n=[],i=t.map(s=>(this._promiseSet.add(s),zo(s)&&n.push(jo(s)),s.finally(()=>this._promiseSet.delete(s))));return Promise.race(i).finally(()=>(n.forEach((s=>s(new Sr("cancel from promiseRace!")))),n.length=0))}}class Pe extends V{constructor(t){super();d(this,"_status","Initial");d(this,"_completeEvent");d(this,"_errorEvent");d(this,"_completeFunc");d(this,"_errorFunc");d(this,"_cancelFunc");d(this,"_runningId",-1);this._startFunc=t,this.dispose(()=>this.isRunning&&this.cancel())}get errorEvent(){return this._errorEvent||(this._errorEvent=new I),this._errorEvent}get completeEvent(){return this._completeEvent||(this._completeEvent=new I),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 Sr("")){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 Sr(""),...n){this.isRunning&&this.cancel(t),this.reset(),this.start(...n)}restartIfNotRunning(...t){this.isRunning||(this.reset(),this.start(...t))}}function wu(r){return(e,...t)=>{const n=new wh,{completeFunc:i,errorFunc:s}=e,o=r(n,...t).then(i).catch(s).finally(()=>n.destroy());return as(o,n.cancel.bind(n)),a=>yh(o,a)}}class k_ extends Pe{constructor(){super(({errorFunc:t},n,i)=>{try{const[s,o]=Il(n,i);return this._doFunc=s,o}catch(s){return t(s),()=>{}}});d(this,"_doFunc")}do(...t){this._doFunc&&this._doFunc(...t)}}class V_ extends Pe{constructor(t,n){super(({errorFunc:i})=>{try{const[s,o]=Il(t,n);return this._doFunc=s,o}catch(s){return i(s),()=>{}}});d(this,"_doFunc")}do(...t){this._doFunc&&this._doFunc(...t)}}function B_(r){return new Pe(wu((e,...t)=>e.promise(r(...t))))}function j_(r,...e){return new Pe(wu(t=>t.promise(r(...e))))}function Al(r){return B_((...e)=>{const t=r(...e);return zo(t)?t:Uo(t)})}function Eh(r,...e){return j_(()=>{const t=r(...e);return zo(t)?t:Uo(t)})}function z_(r){let e;const t=new Promise((n,i)=>{e=()=>{r(),i()}});return as(t,e),t}function U_(r,...e){const t=new wh,n=r(t,...e).finally(()=>t.destroy());return as(n,t.cancel.bind(t)),n}function Fn(r){return new Pe(wu(r))}function G_(r,...e){return new Pe(wu(t=>r(t,...e)))}function Mp(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 u=fetch(i,s);return r&&(u=u.then(l=>{if(!l.ok)return l;if(!l.body)throw Error("ReadableStream not yet supported in this browser.");const c=l.headers.get("content-length");c||console.warn("response.headers.get('content-length') is undefined... cannot get contentLength!");const h=c?parseInt(c,10):0;let f=0;return new Response(new ReadableStream({start(p){if(!l.body)throw new Error("!response.body");const m=l.body.getReader();w();function w(){m.read().then(({done:E,value:b})=>{if(E){p.close();return}if(!b)throw new Error("!value");if(!r)throw new Error("!progressFunc");f+=b.byteLength,r(f,h),p.enqueue(b),w()}).catch(E=>{p.error(E)})}}}),{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 Sr(`fetching cancelled! error: ${l}`)):(l instanceof Error&&l.code===20&&console.error("error.code === 20"),l)})),as(u,a),u}function W_(r,...e){return Mp(r,...e)}function Ch(...r){return Mp(void 0,...r)}function q_(){return Al(Ch)}function X_(...r){return Eh(Ch,...r)}function Sh(r,...e){let t=-1;var n=new Promise((i,s)=>{r.isRunning&&r.cancel(),r.reset();const o=new V;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 ni(r,e,...t){try{return e(...t)}catch(n){r(n)}}function H_(){return new Pe(({completeFunc:r,errorFunc:e},t)=>Vo(()=>ni(e,()=>{t&&t(),r()})))}function Y_(r){return new Pe(({completeFunc:e,errorFunc:t})=>Vo(()=>ni(t,()=>{r&&r(),e()})))}function J_(){return new Pe(({completeFunc:r,errorFunc:e},t)=>pu(()=>{ni(e,()=>{t&&t(),r()})}))}function Z_(r){return new Pe(({completeFunc:e,errorFunc:t})=>pu(()=>{ni(t,()=>{r&&r(),e()})}))}function Rp(){return new Pe(({completeFunc:r,errorFunc:e},t,n)=>sh(()=>{ni(e,()=>{t&&t(),r()})},n??1e3))}function Lp(r,e){return new Pe(({completeFunc:t,errorFunc:n})=>sh(()=>{ni(n,()=>{r&&r(),t()})},e??1e3))}function K_(){return new Pe(({errorFunc:r},e,t=1e3)=>ih(()=>ni(r,e),t))}function Q_(r,e=1e3){return new Pe(({errorFunc:t})=>ih(()=>ni(t,r),e))}function Eu(){return new Pe(({errorFunc:r},e)=>xl(t=>ni(r,e,t)))}function Go(r){return new Pe(({errorFunc:e})=>xl(t=>ni(e,r,t)))}function Cu(r,...e){let t,n;const i=new Promise((o,a)=>{n=a,t=globalThis.setTimeout(()=>{t=void 0,o(e)},r)});return as(i,o=>{t&&(clearTimeout(t),t=void 0),n&&n(o??new Sr("sleep cancel error!"))}),i}function $_(){return Al(Cu)}function t0(r,...e){return Eh(Cu,r,...e)}function Gs(r,e,...t){return r.promise(_h(Sh(Fn(async(n,...i)=>(r.disposer.dispose(()=>{n.isDestroyed()||n.cancel()}),await e(n,...i))),...t)))}function e0(r,e,...t){return r.promise(_h(Sh(e,...t)))}class n0 extends Pe{constructor(){super(({errorFunc:t},n,i)=>{try{const[s,o]=hh(n,i);return this._doFunc=s,o}catch(s){return t(s),()=>{}}});d(this,"_doFunc")}do(...t){this._doFunc&&this._doFunc(...t)}}class r0 extends Pe{constructor(t,n){super(({errorFunc:i})=>{try{const[s,o]=hh(t,n);return this._doFunc=s,o}catch(s){return i(s),()=>{}}});d(this,"_doFunc")}do(...t){this._doFunc&&this._doFunc(...t)}}class Fl extends V{constructor(t=1e3,n=Ol){super();d(this,"_speed");d(this,"_speedChangedEvent");d(this,"_duration");d(this,"_durationChangedEvent");d(this,"_loop");d(this,"startUpdateFunc");d(this,"_updateBindThis");d(this,"_cancelStartUpdateFunc");d(this,"_startTimeStamp");d(this,"_playingChangedEvent");d(this,"_startPlayingEvent");d(this,"_stopPlayingEvent");d(this,"_loopChangedEvent");d(this,"_currentTime",this.disposeVar(B(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 I,this._startPlayingEvent}get stopPlayingEvent(){return this._stopPlayingEvent=this._stopPlayingEvent||new I,this._stopPlayingEvent}get currentTimeChangedEvent(){return this._currentTime.changed}get loopChangedEvent(){return this._loopChangedEvent=this._loopChangedEvent||new I,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 I),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 I),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 I),this._playingChangedEvent}get playing(){return!!this._cancelStartUpdateFunc}set playing(t){!!this._cancelStartUpdateFunc!==t&&(t?this._startPlaying():this._stopPlaying())}}class Su extends V{constructor(t){super();d(this,"_stop",this.disposeVar(B(0)));d(this,"_current",this.disposeVar(B(0)));d(this,"_start",this.disposeVar(B(0)));d(this,"_player",this.disposeVar(new Fl(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 Ap=-1;class Qt extends I{constructor(e,t,n,i){super(),this._domElement=e,this._type=t,this.callback=i;const s=o=>(o.__xbsj_listenerNo__=++Ap,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 Ap}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=Qt.getLastLisenNo();return e.disposableOn(i=>{const s=Qt.getListenerNo(i);(s===void 0||s>n)&&t(i)})}get element(){return this._domElement}static create(e,t,n){return new Qt(e,t,n)}}class bh extends V{constructor(){super();d(this,"_clickEvent",this.disposeVar(new I));d(this,"_dbclickEvent",this.disposeVar(new I));d(this,"_pointerdownEvent",this.disposeVar(new I));d(this,"_pointerupEvent",this.disposeVar(new I));d(this,"_pointermoveEvent",this.disposeVar(new I));d(this,"_pointeroutEvent",this.disposeVar(new I));d(this,"dbClickDelayTime",300);d(this,"nativeClickDelayTime",500);d(this,"clickMovementTolerantPixelSize",3);d(this,"debugging",!1);d(this,"_enabled",this.disposeVar(B(!0)));const t=this.disposeVar(Fn(async i=>{do{const s=await Gs(i,u=>new Promise((l,c)=>{u.disposer.dispose(c),u.disposer.dispose(Qt.on(this._pointerdownEvent,l))})),o=Ke(s);if(this.debugging&&console.log(`鼠标按下 ${o.toString()}`),!await Gs(i,u=>new Promise((l,c)=>{u.disposer.dispose(c);const h=setTimeout(()=>l(!0),this.nativeClickDelayTime);u.disposer.dispose(()=>clearTimeout(h)),u.disposer.dispose(Qt.on(this._pointermoveEvent,f=>{const[p,m]=Ke(f),[w,E]=o;(Math.abs(p-w)>3||Math.abs(m-E)>3)&&l(!1)})),u.disposer.dispose(Qt.on(this._pointeroutEvent,()=>l(!1))),u.disposer.dispose(Qt.on(this._pointerupEvent,()=>l(!0)))}))){this.debugging&&console.log("取消1");continue}const a=await Gs(i,u=>new Promise((l,c)=>{u.disposer.dispose(c);const h=setTimeout(()=>l("timeout"),this.dbClickDelayTime);u.disposer.dispose(()=>clearTimeout(h)),u.disposer.dispose(Qt.on(this._pointermoveEvent,f=>{const[p,m]=Ke(f),[w,E]=o;(Math.abs(p-w)>3||Math.abs(m-E)>3)&&l("moved")})),u.disposer.dispose(Qt.on(this._pointerdownEvent,l)),u.disposer.dispose(Qt.on(this._pointeroutEvent,()=>l("pointouted"))),u.disposer.dispose(Qt.on(this._pointerupEvent,()=>l("pointuped")))}));if(typeof a=="string"){this.debugging&&console.log(`触发单击事件!取消双击监听!error: ${a}`),this._clickEvent.emit(s);continue}if(!await Gs(i,u=>new Promise((l,c)=>{u.disposer.dispose(c);const h=setTimeout(()=>l(!1),this.nativeClickDelayTime);u.disposer.dispose(()=>clearTimeout(h)),u.disposer.dispose(Qt.on(this._pointermoveEvent,f=>{const[p,m]=Ke(f),[w,E]=o;(Math.abs(p-w)>3||Math.abs(m-E)>3)&&l(!1)})),u.disposer.dispose(Qt.on(this._pointeroutEvent,()=>l(!1))),u.disposer.dispose(Qt.on(this._pointerupEvent,()=>l(!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 i0 extends V{constructor(t,n){super();d(this,"_pointerClick",this.disposeVar(new bh));this._div=t;const{div:i,pointerClick:s}=this,o=c=>s.pointerDown(c),a=c=>s.pointerMove(c),u=c=>s.pointerOut(c),l=c=>s.pointerUp(c);i.addEventListener("pointerdown",o,n),i.addEventListener("pointermove",a,n),i.addEventListener("pointerout",u,n),i.addEventListener("pointerup",l,n),this.dispose(()=>{i.removeEventListener("pointerdown",o,n),i.removeEventListener("pointermove",a,n),i.removeEventListener("pointerout",u,n),i.removeEventListener("pointerup",l,n)})}get div(){return this._div}get pointerClick(){return this._pointerClick}get clickEvent(){return this.pointerClick.clickEvent}get dbclickEvent(){return this.pointerClick.dbclickEvent}}class Fp extends V{constructor(){super();d(this,"_hoverEvent",this.disposeVar(new I));d(this,"_hoverOutEvent",this.disposeVar(new I));d(this,"_pointerdownEvent",this.disposeVar(new I));d(this,"_pointerupEvent",this.disposeVar(new I));d(this,"_pointermoveEvent",this.disposeVar(new I));d(this,"_pointeroutEvent",this.disposeVar(new I));d(this,"delayTime",800);const t=this.disposeVar(Rp()),n=l=>{this._hoverOutEvent.emit()},i=l=>{this._hoverOutEvent.emit()};let s;const o=()=>{if(!s){console.warn("!lastPointerEvent");return}this._hoverEvent.emit(s)},a=l=>{s=l,t.restart(void 0,o,this.delayTime),this._hoverOutEvent.emit()},u=l=>{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(u))}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 s0 extends V{constructor(t,n=1500){super();d(this,"_hoverEvent",new I);d(this,"_hoverOutEvent",new I);const i=new ph(n);this.dispose(()=>i.destroy());let s=0,o=0,a;i.progressFunc=()=>this._hoverEvent.emit(s,o,a);const u=f=>{!i.isRunning&&i.restart(),a=f,[s,o]=Ke(f),i.debounce(),this._hoverOutEvent.emit()},l=f=>{!i.isRunning&&i.restart(),a=f,[s,o]=Ke(a),i.debounce(),this._hoverOutEvent.emit()},c=f=>{!i.isRunning&&i.restart(),a=f,[s,o]=Ke(a),i.debounce(),this._hoverOutEvent.emit()},h=f=>{i.isRunning&&i.cancel(),this._hoverOutEvent.emit()};t.addEventListener("pointerdown",u),t.addEventListener("pointerup",l),t.addEventListener("pointermove",c),t.addEventListener("pointerout",h),this.dispose(()=>{t.removeEventListener("pointerdown",u),t.removeEventListener("pointerup",l),t.removeEventListener("pointermove",c),t.removeEventListener("pointerout",h)})}get hoverEvent(){return this._hoverEvent}get hoverOutEvent(){return this._hoverOutEvent}}class kp extends V{constructor(t,n={}){super();d(this,"_needRedrawEvent");d(this,"_needPickRedrawEvent");d(this,"_id",ko());d(this,"_clickEvent");d(this,"_clickOutEvent");d(this,"_dbclickEvent");d(this,"_dbclickOutEvent");d(this,"_actived",!1);d(this,"_activedChanged");d(this,"_hovered",!1);d(this,"_hoveredChanged");d(this,"_selected",!1);d(this,"_selectedChanged");d(this,"_opacity",1);d(this,"_opacityChanged");d(this,"_show",!0);d(this,"_showChanged");this._canvasPrimitivesContext=t;const{needRedraw:i=!0,needPickRedraw:s=!0}=n;i&&(this._needRedrawEvent=new I),s&&(this._needPickRedrawEvent=new I),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}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 I,this._clickEvent}hasClickOutEvent(){return!!this._clickOutEvent}get clickOutEvent(){return this._clickOutEvent=this._clickOutEvent||new I,this._clickOutEvent}hasDbclickEvent(){return!!this._dbclickEvent}get dbclickEvent(){return this._dbclickEvent=this._dbclickEvent||new I,this._dbclickEvent}hasDbclickOutEvent(){return!!this._dbclickOutEvent}get dbclickOutEvent(){return this._dbclickOutEvent=this._dbclickOutEvent||new I,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 I,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 I,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 I,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 I,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 I,this._showChanged}}class Ph extends kp{constructor(t,n=[0,0],i=0){super(t);d(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 I),this._winPosAndDepthChanged}}function Ws(r,e,t,n){const[i,s]=r,[o,a,u,l]=n,c=e[0]*t[0],h=e[1]*t[1],f=i-(c*o+u),p=s-(h*a+l);return{left:f,top:p,right:f+c,bottom:p+h}}function qs(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 Vp(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 Bp(r,e,t,n,i,s){r.font=i;const o=r.measureText(n),a=o.actualBoundingBoxLeft+o.actualBoundingBoxRight,u=Number.isFinite(o.fontBoundingBoxAscent)?o.fontBoundingBoxAscent:o.actualBoundingBoxAscent,l=Number.isFinite(o.fontBoundingBoxDescent)?o.fontBoundingBoxDescent:o.actualBoundingBoxDescent;let c=u+l;r.fillStyle=s,r.fillText(n,e-a*.5,t+c*.5-l)}function jp(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 zp(r,e){const{width:t,height:n}=r,i=r.getContext("2d");if(!i)throw new Error("!cavnasCtx");const[s,o,a]=e.map(h=>h*255|0),u=i.getImageData(0,0,t,n),l=u.data;for(var c=0;c<l.length;c+=4)l[c]=s,l[c+1]=o,l[c+2]=a;i.putImageData(u,0,0)}function Ih(r,e,t,n=[.5,1,0,0],i,s="12px Arial",o=2,a="#FFF",u="#000A"){r.font=s;const l=r.measureText(i),c=l.actualBoundingBoxLeft+l.actualBoundingBoxRight,h=l.fontBoundingBoxAscent+l.fontBoundingBoxDescent,f=e,p=t,m=c+o*2,w=h+o*2,{left:E,top:b,bottom:v}=Ws([f,p],[m,w],[1,1],n);r.fillStyle=u,Vp(r,E,b,m,w,o),r.fill(),r.fillStyle=a,r.fillText(i,E+o,v-o-l.fontBoundingBoxDescent)}function bu(r){return("00"+r.toString(16).toUpperCase()).substr(-2)}function Pu(r){const[e,t,n,i]=r.map(s=>s*255|0);return`#${bu(e)}${bu(t)}${bu(n)}${bu(i)}`}function xh(r,e){const[t,n,i]=e,s=`${t}-${n}-${i}`;let o=An(r,s);return o||(o=jp(r),zp(o,e),ti(r,s,o)),o}class o0 extends Ph{constructor(t,n,i=[32,32],s=[.5,1,0,0],o="#F00F"){super(t);d(this,"_tooltip","");d(this,"_title","");d(this,"__scale",[1,1]);d(this,"_tooltipAlpha",0);d(this,"_bgColor",[.3,.3,.3,.8]);d(this,"_bgColorHexStr",Pu(this._bgColor));d(this,"_fgColor",[1,1,1,1]);d(this,"_fgColorHexStr",Pu(this._fgColor));this._image=n,this._size=i,this._originRatioAndOffset=s,this._defaultColorStr=o;const a=new Su(100),u=new Su(100);this.dispose(()=>{a.destroy(),u.destroy()});const l=()=>{if(this._clickEvent&&!this._clickEvent.empty){const c=(1+.08*u.current)*(1+.08*a.current);this._scale=[c,c],this._tooltipAlpha=a.current}};this.dispose(this.activedChanged.disposableOn(c=>{u.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(u.currentChanged.disposableOn(l)),this.dispose(a.currentChanged.disposableOn(l))}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=Pu(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=Pu(this._bgColor),this.needRedraw()}}get bgColor(){return this._bgColor}set originRatioAndOffset(t){const[n,i,s,o]=this._originRatioAndOffset,[a,u,l,c]=t;(n!==a||i!==u||s!==l||o!==c)&&(this._originRatioAndOffset.splice(0,4,a,u,l,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:u}=Ws([n,i],this._size,this.__scale,this._originRatioAndOffset),l=t.globalAlpha;if(t.globalAlpha=this.opacity,this._image){if(this.selected){const c=xh(this._image,[1,0,0]),{left:h,top:f}=Ws([n,i+3],[s+6,o+6],[1,1],this._originRatioAndOffset);t.drawImage(c,h,f,s+6,o+6)}if(this.actived){const[c,h,f,p]=this._fgColor,m=xh(this._image,[c,h,f]),{left:w,top:E}=Ws([n,i+4],[s+8,o+8],[1,1],this._originRatioAndOffset);t.drawImage(m,w,E,s+8,o+8)}if(this.hovered){const[c,h,f,p]=this._bgColor,m=xh(this._image,[c,h,f]),{left:w,top:E}=Ws([n,i+2],[s+4,o+4],[1,1],this._originRatioAndOffset);t.drawImage(m,w,E,s+4,o+4)}t.drawImage(this._image,a,u,s,o)}else t.fillStyle=this._fgColorHexStr,t.fillRect(a,u,s,o);if(this._title!==""&&Ih(t,n+20,i-16,[0,.5,0,0],this._title,"14px Arial",4,this._fgColorHexStr,this._bgColorHexStr),t.globalAlpha=l,this._hovered&&this._tooltip!==""){const c=t.globalAlpha;t.globalAlpha=this._tooltipAlpha,Ih(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],u=this._size[1]*this.__scale[1],{left:l,top:c}=Ws([i,s],this._size,this.__scale,this._originRatioAndOffset);t.fillStyle=o,t.fillRect(l,c,a,u)}}class a0 extends Ph{constructor(t){super(t);d(this,"_width",16);d(this,"_text","");d(this,"_fillStyle","#0F0");d(this,"_scale",1);d(this,"_scaleChanged");this.dispose(this.scaleChanged.disposableOn(o=>{this.needRedraw(),this.needPickRedraw()}));const n=this.disposeVar(new Su(100)),i=this.disposeVar(new Su(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 I),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&&qs(t,n,i+3,o+3,"#F00"),this.actived&&this._clickEvent&&!this._clickEvent.empty&&qs(t,n,i+5,o+5,"#FFF"),this.hovered?qs(t,n,i+3,o+3,"#000A"):qs(t,n,i+1,o+1,"#000A"),qs(t,n,i,o,this._fillStyle);const a=this._scale>1.2?"bold 14px Arial":"bold 10px Arial";Bp(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");qs(t,i,s,o,a)}}const Up=new ArrayBuffer(4),Gp=new Uint32Array(Up),Xs=new Uint8Array(Up);function Wp(r){if(r>=16777215)throw new Error("uint32 > 0xFFFFFF");return Gp[0]=r,[Xs[0],Xs[1],Xs[2]]}function qp(r,e,t){return Xs[0]=r,Xs[1]=e,Xs[2]=t,Xs[3]=0,Gp[0]}class Xp extends V{constructor(){super(...arguments);d(this,"_pickColors",new Array(16777215));d(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,u]=Wp(i);return[o,a,u]}getPickInfoFromColor(t,n,i){const s=qp(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 Hp=(r,e)=>e.depth-r.depth;class u0 extends V{constructor(){super();d(this,"_pois",[]);d(this,"_canvasElement");d(this,"_ctx");d(this,"_offscreenCanvasElement");d(this,"_offscreenCanvasElement2");d(this,"_offscreenCtx");d(this,"_offscreenCtx2");d(this,"_size",[0,0]);d(this,"_needRedraw",!1);d(this,"_needPickRedraw",!1);d(this,"_pickColorManager",new Xp);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(Go(()=>{const[s,o]=this._size,{clientWidth:a,clientHeight:u}=this._canvasElement;(s!==a||o!==u)&&(this._size[0]=a,this._size[1]=u,this._canvasElement.width=a,this._canvasElement.height=u,this._offscreenCanvasElement.width=a,this._offscreenCanvasElement.height=u,this._offscreenCanvasElement2.width=a,this._offscreenCanvasElement2.height=u,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 An(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});ti(t,"needRedrawEventHandler",s)}const i=t._needPickRedrawEvent;if(i){const s=i.on(()=>{this._needPickRedraw=!0});ti(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=An(t,"needRedrawEventHandler");o?i.off(o):console.error("poi没有listenHandler!")}const s=t._needPickRedrawEvent;if(s){const o=An(t,"needPickRedrawEventHandler");o?s.off(o):console.error("poi没有listenHandler!")}}_draw(){this._pois.sort(Hp);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(Hp);const[t,n]=this._size;this._offscreenCtx.clearRect(0,0,t,n),this._pois.forEach(i=>{const s=o=>{const[a,u,l]=this._pickColorManager.createPickColor(i,o);return`rgb(${a}, ${u}, ${l})`};i.drawForPick(this._offscreenCtx,s)})}_getPickInfo(t,n,i,s){const o=this._offscreenCtx.getImageData(t,n,i,s),a=[],u=o.data.length/4;for(let l=0;l<u;++l){const c=o.data[l*4+0],h=o.data[l*4+1],f=o.data[l*4+2];if(o.data[l*4+3]===255){const m=this._pickColorManager.getPickInfoFromColor(c,h,f);if(m&&m.poi&&!a.includes(m)){let w=!0;{const[E,b]=this._size;this._offscreenCtx2.clearRect(0,0,E,b);const v=P=>"rgb(255, 255, 255)";m.poi.drawForPick(this._offscreenCtx2,v);const y=this._offscreenCtx2.getImageData(t,n,i,s),_=y.data[l*4+0],C=y.data[l*4+1],S=y.data[l*4+2];y.data[l*4+3],_===255&&C===255&&S===255||(w=!1)}w&&a.push(m)}}}return a}}class Th extends V{constructor(){super(...arguments);d(this,"_closeEvent");d(this,"_show",!0);d(this,"_showChanged");d(this,"_opacity",1);d(this,"_opacityChanged");d(this,"_winPos",[0,0]);d(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 I,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 I,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 I,this._showChanged}get closeEvent(){return this._closeEvent||(this._closeEvent=new I),this._closeEvent}}const Nh=new WeakMap;function Oh(r){if(!Nh.has(r)){const e=new Cl(()=>new r,t=>t.reset());Nh.set(r,e)}return Nh.get(r)}class Dh extends Th{constructor(){super();d(this,"_div");d(this,"_contentDiv");d(this,"_originOffsetX",0);d(this,"_originOffsetY",0);d(this,"_originRatioX",.5);d(this,"_originRatioY",1);d(this,"_divChanged",new I);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 Yp extends V{constructor(t,n){super();d(this,"_floatDiv");d(this,"_show",!1);d(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=Oh(this._customDivClass).create();this.dispose(()=>{Oh(this._customDivClass).destroy(t)}),this._floatDiv=t}return this._floatDiv}get showChanged(){return this._showChanged||(this._showChanged=new I),this._showChanged}}const l0=["top","bottom","left","right"];function c0(r){return Object.entries(r).map(([e,t])=>l0.includes(e)?`${e}: ${t}px; `:"").join("")}function Jp(r,e,t){const n=document.createElement("div");n.style.cssText=`position: absolute; ${c0(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 Zp(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 Kp extends Dh{constructor(){super();d(this,"_borderDiv");d(this,"_closeDiv");d(this,"_innerContentDiv");d(this,"_colorStr","rgba(0, 0, 0, 0.7)");d(this,"_divColorChanged",new I);d(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=Jp(this._colorStr,10,{top:3,right:3}),[i,s]=Zp(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=u=>{u.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 h0 extends Kp{constructor(){super();d(this,"_iframe");d(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}`))};window.addEventListener("message",n),this.dispose(()=>{window.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 I,this._iframeMessageEvent}}class d0 extends Th{constructor(){super();d(this,"_div");d(this,"_contentContainer");d(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 f0 extends Dh{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 p0 extends V{constructor(t,n){super();d(this,"_cursorDiv");d(this,"_pointerOut",this.disposeVar(B(!1)));d(this,"_show",this.disposeVar(B(!0)));this._cursorDiv=new Yp(n,t),this.dispose(()=>this._cursorDiv.destroy());const i=o=>{const[a,u]=Ke(o);this._cursorDiv.floatDiv.winPos=[a,u]};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 Iu(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 kl(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 Qp(r,e,t){return uh(r,n=>Iu(n,e,t))}function $p(r,e,t){for(let n of r)Iu(n,e,t)?kl(n,e,t):console.warn(`treeItem(id: ${n.id}) cannot move...`)}const g0={checked:1,unchecked:2,indeterminate:3},m0=["checked","unchecked","indeterminate"];class tg extends V{constructor(t){super();d(this,"_collapsed",this.disposeVar(B(!1)));d(this,"_checkedStatus",this.disposeVar(B("unchecked")));d(this,"_selected",this.disposeVar(B(!1)));d(this,"_moveToPositionMode",this.disposeVar(B("none")));d(this,"_updateCheckedStatusFromChildrenEvent",this.disposeVar(new I));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(ge(this._updateCheckedStatusFromChildrenEvent));this.dispose(i.disposableOn(()=>{if(!this._treeItem.children)return;let s=0;ah(this._treeItem.children,o=>(s|=g0[o.uiTreeObject.checkedStatus],s===3)),s>0&&(this._checkedStatus.value=m0[s-1])})),this.dispose(this._treeItem.childrenResetedEvent.disposableOn(s=>{!s&&this.checkedStatus==="indeterminate"&&(this._checkedStatus.value="unchecked")}));{const s=(o,a,u=!0)=>{if(a)o.selectedItems.push(this._treeItem);else{const l=o.selectedItems.indexOf(this._treeItem);l===-1?u&&console.error("selectedItems index -1"):o.selectedItems.splice(l,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 qr=class qr extends V{constructor(t,n=!1,i){super();d(this,"_children");d(this,"_childrenResetedEvent");d(this,"_childrenToChangeEvent");d(this,"_childrenChangedEvent");d(this,"_parent",this.disposeVar(B(void 0)));d(this,"_level",this.disposeVar(B(0)));d(this,"_id");d(this,"_uiTreeObject",this.disposeVar(new tg(this)));this._tree=t,this._hasChildren=n,this._id=i??ko(),this._id!=="_ROOT"&&qr.wm.has(this._id)&&console.warn(`创建了id(${this._id})相同的树节点,会导致之前的树节点无法索引!`),qr.wm.set(this._id,this),this.dispose(()=>{if(this._id!=="_ROOT"&&!qr.wm.has(this._id)){console.warn(`树节点(${this._id})不在wm树上!`);return}qr.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()})),qr.allTreeItems.set(this._id,this),this.dispose(()=>{qr.allTreeItems.delete(this._id)})}static getFromId(t){return qr.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 _u);this._children=t,this.dispose(t.toChangeEvent.disposableOn((s,o)=>{for(let a of s){const{start:u,deleteCount:l,items:c}=a;for(let h=u;h<u+l;++h)o.get(h)._parent.value=void 0;for(let h of c){if(h.parent)throw console.error("请检查新增的treeItem是否正在使用!"),new Error("item.parent should not exist!");h._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 u of s){const{start:l,deleteCount:c,items:h}=u;for(let f=l;f<l+c;++f)n.add(o.get(f));for(let f of h)i.add(f)}for(let u of n)i.has(u)&&(n.delete(u),i.delete(u));(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 I),this._childrenResetedEvent}get childrenToChangeEvent(){return this._childrenToChangeEvent||(this._childrenToChangeEvent=new I),this._childrenToChangeEvent}get childrenChangedEvent(){return this._childrenChangedEvent||(this._childrenChangedEvent=new I),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],u=a.get(o);yield u,o<a.length-1?++i[i.length-1]:(s.pop(),i.pop()),u.children&&u.children.length>0&&(!t||t(u))&&(i.push(0),s.push(u.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 Iu(this,t,n)}moveTo(t,n){kl(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}};d(qr,"wm",new Map),d(qr,"allTreeItems",new Map);let Wo=qr;class eg extends V{constructor(t){super();d(this,"_redrawEvent",this.disposeVar(new I));d(this,"_containerScrollTop",this.disposeVar(B(0)));d(this,"_containerClientHeight",this.disposeVar(B(-1)));d(this,"_container",this.disposeVar(B(void 0)));d(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(ge(this._tree.itemDivHeightChanged,this._tree.itemChildrenChanged,this._tree.itemsChanged,n.changed,i.changed,s)),{redrawInfo:a}=this,u=c=>{const h=c.uiTreeObject;return!!c.children&&(!h||!h.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=lh(this._tree.getDescendants(u)),h=this._tree.itemDivHeight,f=h*c,p=Di([os([Di([f-n.value,0]),i.value]),0]),m=p/h|0,w=Math.ceil((p-m*h+n.value)/h)|0;m>0&&(a.topUnvisibleItemNum=m,a.topFreeSpaceHeight=m*this._tree.itemDivHeight);const E=m+w;let b=0;for(let y of this._tree.getDescendants(u)){if(b>=E)break;b>=m&&a.middleTreeItems.push(y),++b}const v=c-m-w;v>0&&(a.bottomUnvisibleItemNum=v,a.bottomFreeSpaceHeight=v*this._tree.itemDivHeight)}else for(let c of this._tree.getDescendants(u))a.middleTreeItems.push(c);this._redrawEvent.emit(a)}));let l;this.dispose(()=>l&&(l.destroy(),l=void 0)),this.dispose(this.containerChanged.disposableOn(c=>{l&&(l.destroy(),l=void 0),c&&(l=Eu(),l.start(()=>{const{scrollTop:h,clientHeight:f}=c;typeof h>"u"||typeof f>"u"?Ao("createUiTreeWithContainer error: conainter has no scrollTop or clientHeight property!"):(this.containerScrollTop=h,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}}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)}getAllCheckedLeafItems(){return this.getAllItems(t=>!t.children&&t.uiTreeObject.checkedStatus==="checked")}clearAllSelectedItems(t){for(let n of this.getAllSelectedItems())(!t||!t.includes(n))&&(n.uiTreeObject.selected=!1)}}let qo=(Xr=class extends V{constructor(t){super();d(this,"_root",this.disposeVar(new Wo(this,!0,"_ROOT")));d(this,"_itemChildrenChanged",this.disposeVar(new I));d(this,"_itemChildrenToChange",this.disposeVar(new I));d(this,"_itemsAdded",this.disposeVar(new I));d(this,"_itemsDeleted",this.disposeVar(new I));d(this,"_itemsChanged",this.disposeVar(new I));d(this,"_transactionStack",0);d(this,"_addedItems",new Set);d(this,"_deletedItems",new Set);d(this,"_selectedItems",this.disposeVar(new _u));d(this,"_itemDivHeight",this.disposeVar(B(Xr.defaultItemDivHeight)));d(this,"_forceRedrawEvent",this.disposeVar(new I));d(this,"_uiTree",this.disposeVar(new eg(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:u}=s;for(let l=o;l<o+a;++l){const c=n.children.get(l);this._deletedItems.has(c)?console.error(`this._deletedItems.has(currentItem(${c.id}))`):this._deletedItems.add(c)}for(let l of u)this._deletedItems.has(l)?this._deletedItems.delete(l):this._addedItems.add(l)}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}},d(Xr,"defaultItemDivHeight",24),d(Xr,"canMoveToTreeItem",Iu),d(Xr,"moveToTreeItem",kl),d(Xr,"canMoveToTreeItems",Qp),d(Xr,"moveToTreeItems",$p),Xr);class le extends V{constructor(t,n,i=!0,s){super();d(this,"_obj",this.disposeVar(B(void 0)));this._resetEvent=t,this._createFunc=n;const o=this._resetEvent,a=this._createFunc,u=()=>{this._obj.value&&(this._obj.value.destroy(),this._obj.value=void 0)};this.dispose(u);const l=(...c)=>{u(),this._obj.value=a(...c)};i&&(s?this._obj.value=a(...s):this._obj.value=a()),this.dispose(o.disposableOn(l))}get obj(){return this._obj.value}get objChanged(){return this._obj.changed}}class v0 extends V{constructor(t,n=!0,i){super();d(this,"_event",this.disposeVar(new I));d(this,"_objResettingWithEvent");this._createFunc=t,this._execOnInit=n,this._initParams=i,this._objResettingWithEvent=this.disposeVar(new le(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 Jc=class Jc extends V{constructor(){super();d(this,"_set",new Set);d(this,"_toChangeEvent",this.dv(new I));d(this,"_changedEvent",this.dv(new I));d(this,"main");this.dispose(()=>{this._set.size!==0&&(Jc.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()}};d(Jc,"warnOnDestroying",!0);let Vl=Jc;async function ng(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 Mh(r){return await(await r.getFile()).text()}async function rg(r){const e=await Mh(r);try{return JSON.parse(e)}catch{return}}async function ig(r){return await(await r.getFile()).arrayBuffer()}class sg extends V{constructor(e){super(),this._rootDirHandle=e}get rootDirHandle(){return this._rootDirHandle}async getSubFilesAndDirs(){return await ng(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 og extends V{constructor(t){super();d(this,"_startRootDirId",0);d(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 window.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 sg(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],u=await s.getFile(o,a);if(!u){console.warn(`LocalFileServer getFile failed: ${t}`);return}return u}async getText(t){const n=await this.getFile(t);if(n)return await Mh(n)}async getArrayBuffer(t){const n=await this.getFile(t);if(n)return await ig(n)}async getJson(t){const n=await this.getFile(t);if(n)return await rg(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 u=t?a.files.filter(l=>t.some(c=>l.endsWith(c))):a.files;if(u.length===0){console.warn("找不到符合要求的文件!");return}return`https://${s}/${u[0]}`}}const ag=new og("xe2_local");async function y0(r,e,t){return await ag.getLocalFilePath(r,e,t)}class ug extends V{constructor(t,n){super();d(this,"_processing",this.disposeVar(Fn(async t=>{const n=this._complexImage,i=await t.promise(Pp(this._imageUri,this._complexImage.crossOrigin));i&&i instanceof HTMLImageElement&&(n.size=[i.naturalWidth,i.naturalHeight],n.pixelFormat="RGBA",n.copyTexture({source:i}))})));this._complexImage=t,this._imageUri=n,this._processing.start()}get processing(){return this._processing}}const lg=["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"],cg=["img","gif","video","flv","hls"];let _0=class extends V{constructor(t,n){super();d(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 hg extends V{constructor(t,n){super();d(this,"_videoDom");d(this,"_update",this.disposeVar(Go(()=>this.update())));d(this,"_updateStart",this._update.start());this._complexImage=t,this._imageUri=n,this._videoDom=this.disposeVar(new _0(this._complexImage,this._imageUri))}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 Rh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Lh={},Mi={},dg;function w0(){if(dg)return Mi;dg=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.loop=Mi.conditional=Mi.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(l){return n(i,l,o,a)});else if(typeof s=="function")s(i,o,a,n);else{var u=Object.keys(s)[0];Array.isArray(s[u])?(a[u]={},n(i,s[u],o,a[u])):a[u]=s[u](i,o,a,n)}return o};Mi.parse=r;var e=function(i,s){return function(o,a,u,l){s(o,a,u)&&l(o,i,a,u)}};Mi.conditional=e;var t=function(i,s){return function(o,a,u,l){for(var c=[],h=o.pos;s(o,a,u);){var f={};if(l(o,i,a,f),o.pos===h)break;h=o.pos,c.push(f)}return c}};return Mi.loop=t,Mi}var ce={},fg;function pg(){if(fg)return ce;fg=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.readBits=ce.readArray=ce.readUnsigned=ce.readString=ce.peekBytes=ce.readBytes=ce.peekByte=ce.readByte=ce.buildStream=void 0;var r=function(h){return{data:h,pos:0}};ce.buildStream=r;var e=function(){return function(h){return h.data[h.pos++]}};ce.readByte=e;var t=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(f){return f.data[f.pos+h]}};ce.peekByte=t;var n=function(h){return function(f){return f.data.subarray(f.pos,f.pos+=h)}};ce.readBytes=n;var i=function(h){return function(f){return f.data.subarray(f.pos,f.pos+h)}};ce.peekBytes=i;var s=function(h){return function(f){return Array.from(n(h)(f)).map(function(p){return String.fromCharCode(p)}).join("")}};ce.readString=s;var o=function(h){return function(f){var p=n(2)(f);return h?(p[1]<<8)+p[0]:(p[0]<<8)+p[1]}};ce.readUnsigned=o;var a=function(h,f){return function(p,m,w){for(var E=typeof f=="function"?f(p,m,w):f,b=n(h),v=new Array(E),y=0;y<E;y++)v[y]=b(p);return v}};ce.readArray=a;var u=function(h,f,p){for(var m=0,w=0;w<p;w++)m+=h[f+w]&&Math.pow(2,p-w-1);return m},l=function(h){return function(f){for(var p=e()(f),m=new Array(8),w=0;w<8;w++)m[7-w]=!!(p&1<<w);return Object.keys(h).reduce(function(E,b){var v=h[b];return v.length?E[b]=u(m,v.index,v.length):E[b]=m[v.index],E},{})}};return ce.readBits=l,ce}var gg;function E0(){return gg||(gg=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=w0(),t=pg(),n={blocks:function(f){for(var p=0,m=[],w=f.data.length,E=0,b=(0,t.readByte)()(f);b!==p&&b;b=(0,t.readByte)()(f)){if(f.pos+b>=w){var v=w-f.pos;m.push((0,t.readBytes)(v)(f)),E+=v;break}m.push((0,t.readBytes)(b)(f)),E+=b}for(var y=new Uint8Array(E),_=0,C=0;C<m.length;C++)y.set(m[C],_),_+=m[C].length;return y}},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(h){var f=(0,t.peekBytes)(2)(h);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(h,f,p){return Math.pow(2,p.descriptor.lct.size+1)})},function(h,f,p){return p.descriptor.lct.exists}),{data:[{minCodeSize:(0,t.readByte)()},n]}]},function(h){return(0,t.peekByte)()(h)===44}),o=(0,e.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(f,p,m){return(0,t.readBytes)(m.text.blockSize)(f)}},n]},function(h){var f=(0,t.peekBytes)(2)(h);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,m){return(0,t.readString)(m.blockSize)(f)}},n]},function(h){var f=(0,t.peekBytes)(2)(h);return f[0]===33&&f[1]===255}),u=(0,e.conditional)({comment:[{codes:(0,t.readBytes)(2)},n]},function(h){var f=(0,t.peekBytes)(2)(h);return f[0]===33&&f[1]===254}),l=[{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(h,f){return Math.pow(2,f.lsd.gct.size+1)})},function(h,f){return f.lsd.gct.exists}),{frames:(0,e.loop)([i,a,u,s,o],function(h){var f=(0,t.peekByte)()(h);return f===33||f===44})}],c=l;r.default=c})(Lh)),Lh}var C0=E0();const S0=Rh(C0);var b0=pg();const P0=(r,e)=>{const t=new Array(r.length),n=r.length/e,i=function(c,h){const f=r.slice(h*e,(h+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,u=0;u<4;u++)for(var l=s[u];l<n;l+=o[u])i(l,a),a++;return t},I0=(r,e,t)=>{const s=t;var o,a,u,l,c,h,f,C,p,m,_,w,S,P,R,T;const E=new Array(t),b=new Array(4096),v=new Array(4096),y=new Array(4097);for(w=r,a=1<<w,c=a+1,o=a+2,f=-1,l=w+1,u=(1<<l)-1,p=0;p<a;p++)b[p]=0,v[p]=p;var _,C,S,P,T,R;for(_=C=S=P=T=R=0,m=0;m<s;){if(P===0){if(C<l){_+=e[R]<<C,C+=8,R++;continue}if(p=_&u,_>>=l,C-=l,p>o||p==c)break;if(p==a){l=w+1,u=(1<<l)-1,o=a+2,f=-1;continue}if(f==-1){y[P++]=v[p],f=p,S=p;continue}for(h=p,p==o&&(y[P++]=S,p=f);p>a;)y[P++]=v[p],p=b[p];S=v[p]&255,y[P++]=S,o<4096&&(b[o]=f,v[o]=S,o++,(o&u)===0&&o<4096&&(l++,u+=o)),f=h}P--,E[T++]=y[P],m++}for(m=T;m<s;m++)E[m]=0;return E},x0=r=>{const e=new Uint8Array(r);return Ln.parse(b0.buildStream(e),S0)},T0=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},N0=(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=I0(n.data.minCodeSize,n.data.blocks,i);n.descriptor.lct.interlaced&&(s=P0(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=T0(o),o},O0=(r,e)=>r.frames.filter(t=>t.image).map(t=>N0(t,r.gct));async function mg(r){const t=await(await fetch(r)).arrayBuffer(),n=x0(t),i=O0(n);return{gif:n,gifFrames:i,arrayBuffer:t}}function vg(r,e,t){return r<e?e:r>t?t:r}class yg extends Fl{constructor(t,n=!0,i){super();d(this,"_gifFrames",this.disposeVar(B(void 0)));d(this,"_gifDurations",[]);d(this,"_gifDuration",this.disposeVar(B(0)));d(this,"_gifSize",this.disposeVar(B([0,0],(t,n)=>t.every((i,s)=>i===n[s]),t=>[...t])));d(this,"_autoPlayOnLoad",this.disposeVar(B(!0)));d(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(l=>{if(!l||l.length===0){s.width=0,s.height=0;return}const{width:c,height:h}=l[0].dims;this._gifSize.value=[c,h];const f=l.length;let p=0;this._gifDurations.length=0;for(let m=0;m<f;++m)p+=l[m].delay,this._gifDurations.push(p);this._gifDuration.value=this._gifDurations[this._gifDurations.length-1],s.width=c,s.height=h,a=o.createImageData(c,h),this.currentTimeChangedEvent.emit(this.currentTime,this.currentTime),this._autoPlayOnLoad.value&&(this.currentTime=0,this.playing=!0)}));let u=-1;this.dispose(this.currentTimeChangedEvent.disposableOn(l=>{const c=vg(l/this.duration,0,1),h=this.gifDuration*c,f=this._gifFrames.value;if(f&&f.length>0){const p=this._getFrame(h);if(p===u)return;u=p;const m=f[p];if(m.disposalType!==0&&m.disposalType!==1&&m.disposalType!==2&&Ao(`gif parsed get disposalType ${m.disposalType}... frame: ${p} size: ${JSON.stringify(m.dims)}`,`gif parsed get disposalType ${m.disposalType}...`),a&&(p===0||m.disposalType===2)&&a.data.fill(0),a){const[w,E]=this._gifSize.value,{width:b,height:v,left:y,top:_}=m.dims;if(v>E)throw new Error("height > canvasHeight");for(let C=0;C<v;++C)for(let S=0;S<b;++S){const P=C*b+S,T=_+C,R=y+S,F=T*w+R,N=a.data,L=m.patch,M=L[P*4+3]/255;N[F*4+0]=N[F*4+0]*(1-M)+L[P*4+0]*M|0,N[F*4+1]=N[F*4+1]*(1-M)+L[P*4+1]*M|0,N[F*4+2]=N[F*4+2]*(1-M)+L[P*4+2]*M|0,N[F*4+3]=vg(N[F*4+3]+L[P*4+3],0,255)|0}o.putImageData(a,0,0)}}else Ao("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 _g extends V{constructor(t){super();d(this,"_player");d(this,"_url",this.disposeVar(B("")));d(this,"_loadGifFramesProcessing",this.disposeVar(Al(t=>Uo(mg(t)))));this._player=this.disposeVar(new yg(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 Sr(`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 wg extends V{constructor(t,n){super();d(this,"_gif",this.disposeVar(new _g));d(this,"_update",this.disposeVar(Go(()=>this.update())));d(this,"_updateStart",this._update.start());this._complexImage=t,this._imageUri=n,this._gif.url=this._imageUri}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 Eg(r,e){const[t,n,i]=Ni(r),s=B(void 0),o=()=>{const a=t()??e;s.value=a&&Z.context.getStrFromEnv(a)};return o(),i&&s.d(i.don(o)),s.d(Z.context.environmentVariablesChanged.don(o)),s}function Cg(r){const e=/\${(.*?)\}/g;if(!e.test(r))return r;const t=r.replace(e,(n,i)=>{const s=Z.context.getEnv(i);return s===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):s});return Cg(t)}class D0 extends V{constructor(t){super();d(this,"_sceneObjRefs",new Map);d(this,"_refs",{});d(this,"_refsChanged",this.dv(new I));const n=(i,s,o)=>{if(o){const a=this.getLastSceneObject(o),u=this._sceneObjRefs.get(o);if(!u)console.warn(`this._sceneObjRefs中不存在ref(${o}), 可能系统存在逻辑问题`);else{const c=u.indexOf(i);c===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(u.splice(c,1),u.length===0&&this._sceneObjRefs.delete(o))}const l=this.getLastSceneObject(o);this._refs[o]=l,this._refsChanged.emit(l,a)}if(s){const a=this.getLastSceneObject(s),u=this._sceneObjRefs.get(s);u?(u.push(i),u.length>0&&console.warn(`同时存在多个ref${s}相同的场景对象!
|
|
22
22
|
${u.map(c=>`${c.id} ${c.typeName}
|
|
23
|
-
`).join(" ")}`)):this._sceneObjRefs.set(s,[i]);const l=this.getLastSceneObject(s);this._refs[s]=l,this._refsChanged.emit(l,a)}};this.d(e.sceneObjCreatedEvent.don(i=>{const s=(o,a)=>r(i,o,a);i.ref&&s(i.ref,void 0),i.refChanged.don(s)})),this.d(e.sceneObjToDestroyEvent.don(i=>{i.ref&&r(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(e){const r=this.getSceneObjects(e);if(r)return r[r.length-1]}getSceneObjects(e){const r=this._sceneObjRefs.get(e);if(!(!r||r.length===0))return r}}function Cf(n,t){const[e,r,i]=p.getReactFuncs(n),s=p.react(void 0),o=()=>{const a=e()??t;s.value=a&&j.context.getStrFromEnv(a)};return o(),i&&s.d(i.don(o)),s.d(j.context.environmentVariablesChanged.don(o)),s}function If(n){const t=/\${(.*?)\}/g;if(!t.test(n))return n;const e=n.replace(t,(r,i)=>{const s=j.context.getEnv(i);return s===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):s});return If(e)}class Mm extends q{constructor(){super();f(this,"_esObjConstructors",new Map);f(this,"_sceneObjs",new Map);f(this,"_sceneObjCreatedEvent",new V);f(this,"_sceneObjToDestroyEvent",new V);f(this,"_refsManager",this.dv(new Om(this)));f(this,"_environmentVariables",window.ESSDK_ENV||{});f(this,"_environmentVariablesChanged",this.dv(new V))}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,r,i){return this._esObjConstructors.has(e)&&console.warn(`register warn: ${e} has registered ! will be override!`),this._esObjConstructors.set(e,r),i&&p.setExtProp(r,"__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,r){if(!r||this._sceneObjs.has(r)){const s=p.createGuid();r&&console.warn(`已存在相同id的对象!id自动变更!${r} -> ${s} 请注意:id变更可能导致引用失效!`),r=s}if(!r)throw new Error("id不能为空!");const i=new e(r);return i.id!==r&&(console.warn(`sceneObj.id(${i.id}) !== id(${r}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(e,r){if(typeof e=="string"){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`Cannot find SceneObjectType: ${e}`);return}return this.createSceneObjectFromClass(i,r)}else return this.createSceneObjectFromClass(e,r)}createSceneObjectFromUrl(e,r){let i;const s=e.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:r,url:e})}createSceneObjectFromJson(e){const r=this.createSceneObject(e.type,e.id);return r&&(r.json=e),r}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(e.startsWith("ES")){const r=[];for(const i of this._sceneObjs.values())i.typeName===e&&r.push(i);return r}else return this._sceneObjs.get(e)}_getSceneObjConstructor(e){const r=this._esObjConstructors.get(e);if(r)return r}getProps(e){const r=this._getSceneObjConstructor(e);if(!r){console.warn(`cannot get constructor from type: ${e}`);return}return p.getExtProp(r,"__sceneObjExtraInfo")}setProps(e,r){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`cannot get constructor from type: ${e}`);return}let s=p.getExtProp(i,"__sceneObjExtraInfo");s||(s={},p.setExtProp(i,"__sceneObjExtraInfo",s)),Object.assign(s,r)}getProp(e,r){const i=this.getProps(e);return i&&i[r]}setProp(e,r,i){this.setProps(e,{[r]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(e){for(let[r,i]of Object.entries(e))this.setEnv(r,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(e,r){if(this._environmentVariables[e]!==r){const i=this._environmentVariables[e];this._environmentVariables[e]=r,this._environmentVariablesChanged.emit(e,r,i)}window.ESSDK_ENV={...this._environmentVariables}}getEnv(e){return this._environmentVariables[e]}getStrFromEnv(e){return If(e)}createEnvStrReact(e,r){return Cf(e,r)}createEvnStrReact(e,r){return Cf(e,r)}}const ot=class ot extends q{constructor(e){super();f(this,"_components",this.dv(new cu));f(this,"_viewerAttached",this.dv(new V));f(this,"_viewerDetached",this.dv(new V));f(this,"_attachedViewers",(()=>{const e=new Set;return this.d(this._viewerAttached.don(r=>{r.actived&&(this.activeViewer=r),r.ad(r.activedChanged.don(i=>{i&&e.has(r)&&(this.activeViewer=r)})),e.add(r)})),this.d(this._viewerDetached.don(r=>{e.delete(r),this.activeViewer==r&&(this.activeViewer=void 0)})),e})());f(this,"_activeViewer",this.disposeVar(p.react(void 0)));f(this,"_createdEvent",this.dv(new V));f(this,"_flushEvent",this.dv(new V));f(this,"_id");f(this,"_updateFuncReact",this.dv(p.react(void 0)));f(this,"_toDestroyFuncReact",this.dv(p.react(void 0)));f(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??p.createGuid(),this._initName();{const r=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};r(),this.d(this.execOnceFuncStrChanged.don(r))}{const r=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(s){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};r(),this.d(this.updateFuncStrChanged.don(r));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||p.createAnimateFrame(),i.restart(void 0,s=>{this.updateFunc&&this.updateFunc(this,s)}))}))}{const r=()=>{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}};r(),this.d(this.toDestroyFuncStrChanged.don(r)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static getParentClass(){return Object.getPrototypeOf(this)}static register(e,r,i){p.extendClassProps(r.prototype,r.createDefaultProps);const s=r.createDefaultProps();r.defaults&&(r.defaults={});for(const o of Object.keys(s))r.defaults[o]=s[o]instanceof p.ReactiveVariable?s[o].value:s[o];return this.innerRegister(e,r,i),e}static get envs(){return ot.context.environmentVariables}static get $refs(){return ot.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)}addToViewer(e){this.attachedViewers.has(e)||e.add(this)}registerAttachedObject(e){const r=new Map;this.d(()=>{r.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const s=e(i);s&&r.set(i,s)})),this.d(this._viewerDetached.don(i=>{if(!r.has(i))return;const s=r.get(i);s&&(s.destroy(),r.delete(i))}))}createAttachedObject(e){const r=new Map,i=(()=>{for(let[u,l]of r.entries())l.destroy();r.clear()}),s=u=>{const l=e(u);l&&r.set(u,l)};for(let u of this.attachedViewers)s(u);const o=this._viewerAttached.don(s),a=this._viewerDetached.don(u=>{if(!r.has(u))return;const l=r.get(u);l&&(l.destroy(),r.delete(u))});return()=>{a(),o(),i()}}registerAttachedObjectForContainer(e){this.registerAttachedObject(r=>new Dm(r,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 r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof p.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_innerSetJson(e,r,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 s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof p.ReactiveVariable&&(u=u.value),this[a]=u}}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}getProperties(e){const r={...this.getESProperties()},i=[];return r.general.length>0&&i.push(new $(r.general,"general")),Object.keys(r).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&r[s].length>0&&i.push(new $(r[s],s))}),i}getESProperties(){return{defaultMenu:"general",basic:[],general:[new nt([this,"typeName"],"类型",void 0,!1,!0),new nt([this,"id"],"唯一标识",void 0,!1,!0),new nt([this,"name"],"名称")],dataSource:[],location:[],coordinate:[],style:[],more:[new nt([this,"ref"],"ref",void 0,!0),new H([this,"extras"],"extras",void 0,void 0,!0),new yf(()=>this._jsonStr,e=>e&&(this._jsonStr=e),"JSON")]}}};f(ot,"context",new Mm),f(ot,"innerRegister",ot.context.register.bind(ot.context)),f(ot,"defaults",{}),f(ot,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:p.reactJson(void 0),devTags:p.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})),f(ot,"type",ot.register("ESSceneObject",ot,{chsName:"场景类",tags:["ESObjects"],description:""})),f(ot,"create",ot.context.createSceneObject.bind(ot.context)),f(ot,"createFromUrl",ot.context.createSceneObjectFromUrl.bind(ot.context)),f(ot,"createFromClass",ot.context.createSceneObjectFromClass.bind(ot.context)),f(ot,"createFromJson",ot.context.createSceneObjectFromJson.bind(ot.context)),f(ot,"destroySceneObject",ot.context.destroySceneObject.bind(ot.context)),f(ot,"getSceneObjById",ot.context.getSceneObjectById.bind(ot.context)),f(ot,"getSceneObj",ot.context.getSceneObject.bind(ot.context)),f(ot,"getEnv",ot.context.getEnv.bind(ot.context)),f(ot,"setEnv",ot.context.setEnv.bind(ot.context)),f(ot,"getStrFromEnv",ot.context.getStrFromEnv.bind(ot.context)),f(ot,"getSceneObjectById",ot.context.getSceneObjectById.bind(ot.context)),f(ot,"getSceneObject",ot.context.getSceneObject.bind(ot.context));let j=ot;class Dm extends q{constructor(t,e){super(),this.dv(new p.ObjResettingWithEvent(t.subContainerChanged,()=>{if(t.subContainer)return e(t,t.subContainer)}))}}const Kt=class Kt extends j{constructor(e){super(e);f(this,"_editing",this.dv(p.react(!1)));f(this,"editingID");f(this,"editingBindMode","singlePoint");f(this,"_deprecated",[]);f(this,"_flyInEvent",this.dv(new V));f(this,"_flyToEvent",this.dv(new V));f(this,"_flyOverEvent",this.disposeVar(new V));f(this,"_pickedEvent",this.dv(new V));f(this,"_calcFlyToParamEvent",this.dv(new V));f(this,"_calcFlyInParamEvent",this.dv(new V));f(this,"useCalcFlyToParamInESObjectWithLocation",!1);xf(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 r=0;r<e.length;r++){const i=e[r];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 u=i[s];typeof u=="string"?console.warn(`注意:${this.typeName} 的 ${s} 属性下版本将会被移除!`):Object.keys(u).forEach((l=>{a===l&&console.warn(`注意:${this.typeName} 的 ${s} 属性值 ${l} 下版本将会被移除,推荐使用属性值 ${u[l]}`)}))}))})}}get flyInEvent(){return this._flyInEvent}flyIn(e=1){this._flyInEvent.emit(e,Kt._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(e=1){this._flyToEvent.emit(e,Kt._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 W([this,"show"],"是否显示",Kt.defaults.show),new W([this,"collision"],"开启碰撞",Kt.defaults.collision),new W([this,"allowPicking"],"允许拾取",Kt.defaults.allowPicking),new tt([],()=>this.calcFlyToParam(),[],"保存观察视角","保存当前flyToParam"),new tt([],()=>this.emptyFlyToParam(),[],"清空飞向参数","清空飞向参数"),new tt([],()=>this.emptyFlyInParam(),[],"清空飞入参数","清空飞入参数"),new tt([],()=>this.calcFlyInParam(),[],"保存飞入参数","保存飞入参数flyInParam")],more:[...e.more,new $([],"飞行定位","飞向参数"),new tt(["number"],r=>this.flyTo(r),[1],"飞向"),new H([this,"flyToParam"],"flyToParam",void 0,void 0,!0),new T([this,"flyToDistance"],"flyToDistance",void 0,!0),new T([this,"flyToHeading"],"flyToHeading",void 0,!0),new T([this,"flyToPitch"],"flyToPitch",void 0,!0),new T([this,"flyToFlyDuration"],"flyToFlyDuration",void 0,!0),new T([this,"flyToHDelta"],"flyToHDelta",void 0,!0),new T([this,"flyToPDelta"],"flyToPDelta",void 0,!0),new $([],"飞入参数"),new tt(["number"],r=>this.flyIn(r),[1],"飞入"),new H([this,"flyInParam"],"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??Kt.defaultFlyToParam,distance:e}:void 0}set flyToHeading(e){this.flyToParam=e!==void 0?{...this.flyToParam??Kt.defaultFlyToParam,heading:e}:void 0}set flyToPitch(e){this.flyToParam=e!==void 0?{...this.flyToParam??Kt.defaultFlyToParam,pitch:e}:void 0}set flyToFlyDuration(e){this.flyToParam=e!==void 0?{...this.flyToParam??Kt.defaultFlyToParam,flyDuration:e}:void 0}set flyToHDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??Kt.defaultFlyToParam,hDelta:e}:void 0}set flyToPDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??Kt.defaultFlyToParam,pDelta:e}:void 0}};f(Kt,"createDefaultProps",()=>({...j.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:p.reactJsonWithUndefined(void 0),flyInParam:p.reactJsonWithUndefined(void 0)})),f(Kt,"type",Kt.register("ESVisualObject",Kt,{chsName:"可视化对象",tags:["ESObjects"],description:"可视化对象"})),f(Kt,"supportEditingModes",[]),f(Kt,"defaultFlyToParam",{distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0}),f(Kt,"defaultFlyInParam",{position:[0,0,0],rotation:[0,0,0],flyDuration:1}),f(Kt,"_lastFlyInId",0),f(Kt,"_lastFlyToId",0);let bt=Kt;class Pf extends q{constructor(){super();f(this,"_data",this.dv(p.react(void 0)))}set data(e){this._data.value=e}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class bf extends q{constructor(){super(...arguments);f(this,"_dragStartEvent",this.dv(new V));f(this,"_dragOverEvent",this.dv(new V));f(this,"_dragLeaveEvent",this.dv(new V));f(this,"_dropEvent",this.dv(new V))}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 Lm(n,t){t&&(Reflect.has(t,"editing")?t.editing=!0:Reflect.has(t,"positionEditing")&&(t.positionEditing=!0))}function Am(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 fu(n,t){p.getExtProp(n,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),p.setExtProp(n,"__treeItem",t)}function Rm(n){return p.getExtProp(n,"__treeItem")}function Fm(n){if(!(n.startsWith("./")||n.startsWith("../")||n.startsWith("/")))return n;const t=document.createElement("a");t.href=n;const e=t.href;return t.remove(),e}function Ml(n){if(typeof n!="string")return!1;try{const t=JSON.parse(n);return typeof t=="object"&&t!==null}catch{return!1}}function km(n){try{return new DOMParser().parseFromString(n,"application/xml").getElementsByTagName("parsererror").length===0}catch{return!1}}function Vm(n){return n instanceof Function?n():n}function Nf(n,t){for(let e of n)if(t.includes(e))return!0;return!1}function ei(n,t){const e=n,r=t;return e===void 0||e.length===0||r===void 0||r.length===0?!0:Nf(e,r)}function zm(n){const t=setTimeout(()=>{n(),clearTimeout(t)})}function Js(n){let t=n%360;return t=t<0?360+t:t,t}function Tf(n){return Js(n+180)-180}function du(n,t,e){let r=Js(n),i=Js(t);Math.abs(r-i)>180&&(r<i?r+=360:i+=360);const s=r*(1-e)+i*e;return Tf(s)}function Dl(n,t,e,r){return r=r||[0,0,0],r[0]=du(n[0],t[0],e),r[1]=du(n[1],t[1],e),r[2]=du(n[2],t[2],e),r}function xf(n,t,e="editing"){const r=new q;n.ad(r);const i=t.bind(n);return r.ad(new p.ObjResettingWithEvent(n.activeViewerChanged,()=>{const s=new q;let o=n.activeViewer;return o?(s.ad(n[`${e}Changed`].don(()=>{var a;n[`${e}`]?i():(a=(n.components.main??n).editingID)!=null&&a.includes("inner")&&n.activeViewer&&n.activeViewer.stopEditing()})),s.ad(o.editingEvent.don(a=>{if(a.objectIDs.includes(n.id)&&a.type==="end"){const u=n.components.main??n;u.editingID&&a.editingID.includes(u.editingID)?n[`${e}`]=!1:n[`${e}`]=!u.editingID.includes("outer")}}))):s.ad(n[`${e}Changed`].don(()=>{n[`${e}`]=!1})),s})),n[`${e}`]&&i(),r}class Um extends q{constructor(e,r,i,s){super();f(this,"_sceneObjectId",this.dv(new p.SceneObjectWithId));this._id=e,this._startTimeStamp=r,this._duration=i,this._parent=s,this._sceneObjectId.id=this._id;const o=()=>{if(!this.player)return;const{currentTime:a=0}=this._parent,u=a-this._startTimeStamp;this.player.currentTime=p.clamp(u,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 nn?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const Gm=`
|
|
23
|
+
`).join(" ")}`)):this._sceneObjRefs.set(s,[i]);const l=this.getLastSceneObject(s);this._refs[s]=l,this._refsChanged.emit(l,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 M0 extends V{constructor(){super();d(this,"_esObjConstructors",new Map);d(this,"_sceneObjs",new Map);d(this,"_sceneObjCreatedEvent",new I);d(this,"_sceneObjToDestroyEvent",new I);d(this,"_refsManager",this.dv(new D0(this)));d(this,"_environmentVariables",window.ESSDK_ENV||{});d(this,"_environmentVariablesChanged",this.dv(new I))}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&&ti(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=ko();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(t.startsWith("ES")){const n=[];for(const i of this._sceneObjs.values())i.typeName===t&&n.push(i);return n}else 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 An(n,"__sceneObjExtraInfo")}setProps(t,n){const i=this._getSceneObjConstructor(t);if(!i){console.warn(`cannot get constructor from type: ${t}`);return}let s=An(i,"__sceneObjExtraInfo");s||(s={},ti(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)}window.ESSDK_ENV={...this._environmentVariables}}getEnv(t){return this._environmentVariables[t]}getStrFromEnv(t){return Cg(t)}createEnvStrReact(t,n){return Eg(t,n)}createEvnStrReact(t,n){return Eg(t,n)}}const ht=class ht extends V{constructor(t){super();d(this,"_components",this.dv(new Vl));d(this,"_viewerAttached",this.dv(new I));d(this,"_viewerDetached",this.dv(new I));d(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})());d(this,"_activeViewer",this.disposeVar(B(void 0)));d(this,"_createdEvent",this.dv(new I));d(this,"_flushEvent",this.dv(new I));d(this,"_id");d(this,"_updateFuncReact",this.dv(B(void 0)));d(this,"_toDestroyFuncReact",this.dv(B(void 0)));d(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??ko(),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||Eu(),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){Oi(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 De?s[o].value:s[o];return this.innerRegister(t,n,i),t}static get envs(){return ht.context.environmentVariables}static get $refs(){return ht.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)}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[u,l]of n.entries())l.destroy();n.clear()}),s=u=>{const l=t(u);l&&n.set(u,l)};for(let u of this.attachedViewers)s(u);const o=this._viewerAttached.don(s),a=this._viewerDetached.don(u=>{if(!n.has(u))return;const l=n.get(u);l&&(l.destroy(),n.delete(u))});return()=>{a(),o(),i()}}registerAttachedObjectForContainer(t){this.registerAttachedObject(n=>new R0(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 De?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 u=this.defaultProps[a];u instanceof De&&(u=u.value),this[a]=u}}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}getProperties(t){const n={...this.getESProperties()},i=[];return n.general.length>0&&i.push(new rt(n.general,"general")),Object.keys(n).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&n[s].length>0&&i.push(new rt(n[s],s))}),i}getESProperties(){return{defaultMenu:"general",basic:[],general:[new ut([this,"typeName"],"类型",void 0,!1,!0),new ut([this,"id"],"唯一标识",void 0,!1,!0),new ut([this,"name"],"名称")],dataSource:[],location:[],coordinate:[],style:[],more:[new ut([this,"ref"],"ref",void 0,!0),new K([this,"extras"],"extras",void 0,void 0,!0),new xg(()=>this._jsonStr,t=>t&&(this._jsonStr=t),"JSON")]}}};d(ht,"context",new M0),d(ht,"innerRegister",ht.context.register.bind(ht.context)),d(ht,"defaults",{}),d(ht,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:dt(void 0),devTags:Ht(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})),d(ht,"type",ht.register("ESSceneObject",ht,{chsName:"场景类",tags:["ESObjects"],description:""})),d(ht,"create",ht.context.createSceneObject.bind(ht.context)),d(ht,"createFromUrl",ht.context.createSceneObjectFromUrl.bind(ht.context)),d(ht,"createFromClass",ht.context.createSceneObjectFromClass.bind(ht.context)),d(ht,"createFromJson",ht.context.createSceneObjectFromJson.bind(ht.context)),d(ht,"destroySceneObject",ht.context.destroySceneObject.bind(ht.context)),d(ht,"getSceneObjById",ht.context.getSceneObjectById.bind(ht.context)),d(ht,"getSceneObj",ht.context.getSceneObject.bind(ht.context)),d(ht,"getEnv",ht.context.getEnv.bind(ht.context)),d(ht,"setEnv",ht.context.setEnv.bind(ht.context)),d(ht,"getStrFromEnv",ht.context.getStrFromEnv.bind(ht.context)),d(ht,"getSceneObjectById",ht.context.getSceneObjectById.bind(ht.context)),d(ht,"getSceneObject",ht.context.getSceneObject.bind(ht.context));let Z=ht;class R0 extends V{constructor(e,t){super(),this.dv(new le(e.subContainerChanged,()=>{if(e.subContainer)return t(e,e.subContainer)}))}}const Zc=class Zc extends V{constructor(t,n){super();d(this,"_id",++Zc._accumId);this._name=t,this._description=n}get id(){return this._id}get name(){return this._name}get description(){return this._description}};d(Zc,"_accumId",-1);let us=Zc;class Ah extends us{constructor(e,t,n,i,s){super(e,t),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 yt extends Ah{constructor(e,t,n,i,s,o){const a=e instanceof De?"未获取到属性名":e[1].toString();super(t??a,o??a,i??!1,s??!1,n),this._reactVar=e}get reactVar(){return this._reactVar}}class X extends yt{get type(){return"BooleanProperty"}}class ut extends yt{get type(){return"StringProperty"}}class O extends yt{get type(){return"NumberProperty"}}class L0 extends yt{get type(){return"MaximumScreenSpaceErrorProperty"}}class Sg extends yt{get type(){return"StringsProperty"}}class A0 extends yt{get type(){return"NumbersProperty"}}class F0 extends yt{get type(){return"BooleansProperty"}}class k0 extends yt{get type(){return"String2Property"}}class V0 extends yt{get type(){return"String3Property"}}class B0 extends yt{get type(){return"String4Property"}}class bg extends yt{get type(){return"String2sProperty"}}class j0 extends yt{get type(){return"String3sProperty"}}class z0 extends yt{get type(){return"String4sProperty"}}class Ie extends yt{get type(){return"Number2Property"}}class Qe extends yt{get type(){return"Number3Property"}}class br extends yt{get type(){return"Number4Property"}}class U0 extends yt{get type(){return"Number4WithUndefinedProperty"}}class Pg extends yt{get type(){return"Number2sProperty"}}class Fh extends yt{get type(){return"Number3sProperty"}}class G0 extends yt{get type(){return"Number4sProperty"}}class W0 extends yt{get type(){return"Boolean2Property"}}class q0 extends yt{get type(){return"Boolean3Property"}}class X0 extends yt{get type(){return"Boolean4Property"}}class H0 extends yt{get type(){return"Boolean2sProperty"}}class Y0 extends yt{get type(){return"Boolean3sProperty"}}class J0 extends yt{get type(){return"Boolean4sProperty"}}class Z0 extends yt{get type(){return"StringNumberProperty"}}class K0 extends yt{get type(){return"StringNumbersProperty"}}class Et extends br{get type(){return"ColorProperty"}}class Q0 extends Qe{get type(){return"ColorRgbProperty"}}class $0 extends O{get type(){return"DashPatternProperty"}}class mt extends yt{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 tw extends yt{constructor(e,t,n,i,s,o,a){super(e,n,i,s,o,a),this._enums=t}get type(){return"EnumStringsProperty"}get enums(){return this._enums}}class ls extends yt{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 Ig extends yt{constructor(e,t,n,i,s){super(e,t,i,!1,!1,s),this._paramTypes=n}get type(){return"ParamsProperty"}get paramTypes(){return this._paramTypes}}class it extends us{constructor(t,n,i,s,o){const a=s??"Unnamed Function";super(a,o??a);d(this,"_paramsProperty");d(this,"_getValueFunc");this._func=n;const u=this.disposeVar(dt(i));this._paramsProperty=this.disposeVar(new Ig(u,a+"_params",t,i));const[l]=Ni(this._paramsProperty.reactVar);this._getValueFunc=l}get paramsProperty(){return this._paramsProperty}exec(){this._func(...this._getValueFunc())}get type(){return"FunctionProperty"}}class rt extends us{constructor(e,t,n){const i=t??"分组";super(i,n??i),this._children=e}get type(){return"GroupProperty"}get children(){return this._children}}class K extends yt{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 kh extends yt{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 ew extends Ie{get type(){return"MinmaxProperty"}}class nw extends br{get type(){return"NearFarScalerProperty"}}class xg extends Ah{constructor(e,t,n,i,s,o,a){const u=n??"非响应式Json";super(u,a??u,s??!1,o??!1,i),this._getJsonStringFunc=e,this._setJsonStringFunc=t}get type(){return"NonreactiveJsonStringProperty"}get getJsonStringFunc(){return this._getJsonStringFunc}get setJsonStringFunc(){return this._setJsonStringFunc}}class rw extends Ie{get type(){return"NumberRangeProperty"}}class Me extends yt{constructor(e,t,n,i,s,o,a,u){super(e,i,s,o,a,u),this._step=t,this._minMax=n}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}function iw(r,e){const[t,n,i]=Ni(r),[s,o,a]=Ni(e),u=B((t()??0)/(s()??3e3)),l=()=>{const c=u.value,h=s()??3e3,f=t()??0;if(!Number.isFinite(h)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${f}`);return}Math.abs(c*h-f)<.001||(h<=0?u.value=0:u.value=f/h)};return u.dispose(i.disposableOn(l)),u.dispose(a.disposableOn(l)),u.dispose(u.changed.disposableOn(()=>{const c=u.value,h=s()??3e3,f=t()??0;if(!Number.isFinite(h)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${f}`);return}Math.abs(c*h-f)<.001||n(c*h)})),u}class Bl extends us{constructor(t,n,i,s,o,a){super(s??"播放器",a??"播放器");d(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}}d(Bl,"createPlayingRatio",iw);class Xo extends Qe{get type(){return"PositionProperty"}}class Tg extends yt{get type(){return"PositionsProperty"}}class sw extends yt{get type(){return"PositionsSetPropety"}}class Vh extends Qe{get type(){return"RotationProperty"}}class xu extends ut{get type(){return"UriProperty"}}class Ng extends us{constructor(t,n,i,s,o,a){const u=s??"视角播放器";super(u,a??u);d(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 Og extends yt{get type(){return"DatesProperty"}}class Hs extends yt{get type(){return"DateProperty"}}var Q=(r=>(r.Place="place",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))(Q||{}),Dg=(r=>(r.DECIMAL_DEGREE="DECIMAL_DEGREE",r.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",r.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",r))(Dg||{});class ow{constructor(e){this.childPickedInfo=e}}class aw{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 ue=class ue extends Z{constructor(t){super(t);d(this,"_editing",this.dv(B(!1)));d(this,"editingID");d(this,"editingBindMode","singlePoint");d(this,"_deprecated",[]);d(this,"_flyInEvent",this.dv(new I));d(this,"_flyToEvent",this.dv(new I));d(this,"_flyOverEvent",this.disposeVar(new I));d(this,"_pickedEvent",this.dv(new I));d(this,"_calcFlyToParamEvent",this.dv(new I));d(this,"_calcFlyInParamEvent",this.dv(new I));d(this,"useCalcFlyToParamInESObjectWithLocation",!1);Fg(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 u=i[s];typeof u=="string"?console.warn(`注意:${this.typeName} 的 ${s} 属性下版本将会被移除!`):Object.keys(u).forEach((l=>{a===l&&console.warn(`注意:${this.typeName} 的 ${s} 属性值 ${l} 下版本将会被移除,推荐使用属性值 ${u[l]}`)}))}))})}}get flyInEvent(){return this._flyInEvent}flyIn(t=1){this._flyInEvent.emit(t,ue._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(t=1){this._flyToEvent.emit(t,ue._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"],"是否显示",ue.defaults.show),new X([this,"collision"],"开启碰撞",ue.defaults.collision),new X([this,"allowPicking"],"允许拾取",ue.defaults.allowPicking),new it([],()=>this.calcFlyToParam(),[],"保存观察视角","保存当前flyToParam"),new it([],()=>this.emptyFlyToParam(),[],"清空飞向参数","清空飞向参数"),new it([],()=>this.emptyFlyInParam(),[],"清空飞入参数","清空飞入参数"),new it([],()=>this.calcFlyInParam(),[],"保存飞入参数","保存飞入参数flyInParam")],more:[...t.more,new rt([],"飞行定位","飞向参数"),new it(["number"],n=>this.flyTo(n),[1],"飞向"),new K([this,"flyToParam"],"flyToParam",void 0,void 0,!0),new O([this,"flyToDistance"],"flyToDistance",void 0,!0),new O([this,"flyToHeading"],"flyToHeading",void 0,!0),new O([this,"flyToPitch"],"flyToPitch",void 0,!0),new O([this,"flyToFlyDuration"],"flyToFlyDuration",void 0,!0),new O([this,"flyToHDelta"],"flyToHDelta",void 0,!0),new O([this,"flyToPDelta"],"flyToPDelta",void 0,!0),new rt([],"飞入参数"),new it(["number"],n=>this.flyIn(n),[1],"飞入"),new K([this,"flyInParam"],"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??ue.defaultFlyToParam,distance:t}:void 0}set flyToHeading(t){this.flyToParam=t!==void 0?{...this.flyToParam??ue.defaultFlyToParam,heading:t}:void 0}set flyToPitch(t){this.flyToParam=t!==void 0?{...this.flyToParam??ue.defaultFlyToParam,pitch:t}:void 0}set flyToFlyDuration(t){this.flyToParam=t!==void 0?{...this.flyToParam??ue.defaultFlyToParam,flyDuration:t}:void 0}set flyToHDelta(t){this.flyToParam=t!==void 0?{...this.flyToParam??ue.defaultFlyToParam,hDelta:t}:void 0}set flyToPDelta(t){this.flyToParam=t!==void 0?{...this.flyToParam??ue.defaultFlyToParam,pDelta:t}:void 0}};d(ue,"createDefaultProps",()=>({...Z.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:jt(void 0),flyInParam:jt(void 0)})),d(ue,"type",ue.register("ESVisualObject",ue,{chsName:"可视化对象",tags:["ESObjects"],description:"可视化对象"})),d(ue,"supportEditingModes",[]),d(ue,"defaultFlyToParam",{distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0}),d(ue,"defaultFlyInParam",{position:[0,0,0],rotation:[0,0,0],flyDuration:1}),d(ue,"_lastFlyInId",0),d(ue,"_lastFlyToId",0);let Rt=ue;class Mg extends V{constructor(){super();d(this,"_data",this.dv(B(void 0)))}set data(t){this._data.value=t}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class Rg extends V{constructor(){super(...arguments);d(this,"_dragStartEvent",this.dv(new I));d(this,"_dragOverEvent",this.dv(new I));d(this,"_dragLeaveEvent",this.dv(new I));d(this,"_dropEvent",this.dv(new I))}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 uw(r,e){e&&(Reflect.has(e,"editing")?e.editing=!0:Reflect.has(e,"positionEditing")&&(e.positionEditing=!0))}function lw(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 jl(r,e){An(r,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),ti(r,"__treeItem",e)}function cw(r){return An(r,"__treeItem")}function hw(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 Bh(r){if(typeof r!="string")return!1;try{const e=JSON.parse(r);return typeof e=="object"&&e!==null}catch{return!1}}function dw(r){try{return new DOMParser().parseFromString(r,"application/xml").getElementsByTagName("parsererror").length===0}catch{return!1}}function fw(r){return r instanceof Function?r():r}function Lg(r,e){for(let t of r)if(e.includes(t))return!0;return!1}function Ri(r,e){const t=r,n=e;return t===void 0||t.length===0||n===void 0||n.length===0?!0:Lg(t,n)}function pw(r){const e=setTimeout(()=>{r(),clearTimeout(e)})}function Ho(r){let e=r%360;return e=e<0?360+e:e,e}function Ag(r){return Ho(r+180)-180}function zl(r,e,t){let n=Ho(r),i=Ho(e);Math.abs(n-i)>180&&(n<i?n+=360:i+=360);const s=n*(1-t)+i*t;return Ag(s)}function jh(r,e,t,n){return n=n||[0,0,0],n[0]=zl(r[0],e[0],t),n[1]=zl(r[1],e[1],t),n[2]=zl(r[2],e[2],t),n}function Fg(r,e,t="editing"){const n=new V;r.ad(n);const i=e.bind(r);return n.ad(new le(r.activeViewerChanged,()=>{const s=new V;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 u=r.components.main??r;u.editingID&&a.editingID.includes(u.editingID)?r[`${t}`]=!1:r[`${t}`]=!u.editingID.includes("outer")}}))):s.ad(r[`${t}Changed`].don(()=>{r[`${t}`]=!1})),s})),r[`${t}`]&&i(),n}class zh extends V{constructor(t){super();d(this,"_sceneObject",this.dv(B(void 0)));this._id=t,this.d(()=>{this._sceneObject.value=void 0});const n=Z.getSceneObjById(this._id);n&&(this._sceneObject.value=n),this.d(Z.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(Z.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 gw extends V{constructor(t,n){super();d(this,"_sofi");this._id=t,this._sofi=this.dv(new zh(this._id));{const i=()=>{n.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class kg extends V{constructor(){super();d(this,"_id",this.dv(B(void 0)));d(this,"_sceneObject",this.dv(B(void 0)));d(this,"_resetting",this.dv(new le(this.idChanged,()=>{const{id:t}=this;if(t===void 0||t===""){this.sceneObject=void 0;return}return new gw(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 mw extends V{constructor(t,n,i,s){super();d(this,"_sceneObjectId",this.dv(new kg));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,u=a-this._startTimeStamp;this.player.currentTime=Rl(u,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 Pr?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const vw=`
|
|
24
24
|
用来配置子播放器,它是一个数组形式,数组的每个元素仍然是一个数组,形式是[子播放器的ID, 起始时间, 持续时间]。
|
|
25
25
|
注意时间的单位是毫秒。
|
|
26
26
|
示例如下:
|
|
@@ -38,10 +38,10 @@ ${u.map(c=>`${c.id} ${c.typeName}
|
|
|
38
38
|
]
|
|
39
39
|
]
|
|
40
40
|
\`\`\`
|
|
41
|
-
`,Le=class Le extends q{constructor(){super();f(this,"_ratio",this.dv(p.react(0)));f(this,"_subPlayers",this.dv(new p.ObservableArray));const e=this.dv(new p.Player);{const o=()=>{e.loop=this.loop??Le.defaults.loop};o(),this.d(this.loopChanged.don(o))}{const o=()=>{(this.loop??Le.defaults.loop)!==e.loop&&(this.loop=e.loop)};o(),this.d(e.loopChangedEvent.don(o))}{const o=()=>{e.currentTime=this.currentTime??Le.defaults.currentTime};o(),this.d(this.currentTimeChanged.don(o))}{const o=()=>{(this.currentTime??Le.defaults.currentTime)!==e.currentTime&&(this.currentTime=e.currentTime)};o(),this.d(e.currentTimeChangedEvent.don(o))}{const o=()=>{e.duration=this.duration??Le.defaults.duration};o(),this.d(this.durationChanged.don(o))}{const o=()=>{(this.duration??Le.defaults.duration)!==e.duration&&(this.duration=e.duration)};o(),this.d(e.durationChangedEvent.don(o))}{const o=()=>{e.speed=this.speed??Le.defaults.speed};o(),this.d(this.speedChanged.don(o))}{const o=()=>{(this.speed??Le.defaults.speed)!==e.speed&&(this.speed=e.speed)};o(),this.d(e.speedChangedEvent.don(o))}{const o=()=>{e.playing=this.playing??Le.defaults.playing};o(),this.d(this.playingChanged.don(o))}{const o=()=>{(this.playing??Le.defaults.playing)!==e.playing&&(this.playing=e.playing)};o(),this.d(e.playingChangedEvent.don(o))}const r=()=>{const o=this.duration??Le.defaults.duration;o>0&&(this._ratio.value=(this.currentTime??Le.defaults.currentTime)/o)};r();const i=this.dv(p.createNextAnimateFrameEvent(this.currentTimeChanged,this.durationChanged));this.d(i.don(r)),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[u,l,c]=a;return new Um(u,l,c,this)});this._subPlayers.splice(0,0,...o)};s(),this.d(this.channelsChanged.don(s))}get ratio(){return this._ratio.value}set ratio(e){Math.abs(this._ratio.value-e)<.001||(this.currentTime=(this.duration??Le.defaults.duration)*e)}get ratioChanged(){return this._ratio.changed}};f(Le,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),f(Le,"channelsReadMe",Gm);let nn=Le;(n=>{n.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:p.reactDeepArrayWithUndefined(void 0,(t,e)=>t==null?void 0:t.every((r,i)=>r===e[i]),t=>[...t])})})(nn||(nn={})),p.extendClassProps(nn.prototype,nn.createDefaultProps);class Ll extends q{constructor(e){super();f(this,"_sceneObject",this.dv(p.react(void 0)));this._id=e,this.d(()=>{this._sceneObject.value=void 0});const r=j.getSceneObjById(this._id);r&&(this._sceneObject.value=r),this.d(j.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(j.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 Wm extends q{constructor(e,r){super();f(this,"_sofi");this._id=e,this._sofi=this.dv(new Ll(this._id));{const i=()=>{r.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class qm extends q{constructor(){super();f(this,"_id",this.dv(p.react(void 0)));f(this,"_sceneObject",this.dv(p.react(void 0)));f(this,"_resetting",this.dv(new p.ObjResettingWithEvent(this.idChanged,()=>{const{id:e}=this;if(e===void 0||e===""){this.sceneObject=void 0;return}return new Wm(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 Xm extends q{constructor(t,e,r,i){super(),this.disposeVar(new p.ObjResettingWithEvent(t.sceneObjectChanged,()=>{let s;i.debug&&console.log("正在获取Event事件...");const o=t.sceneObject;if(o&&e){const a=e.split(".");if(a.length===0)i.debug&&console.warn("propNames.length === 0");else{let u=p.pluckProperty(o,!1,...a);(!u||!(u instanceof V))&&(a[a.length-1]=a[a.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${a[a.length-1]})再试试!`),u=p.pluckProperty(o,!1,...a),i.debug&&u&&console.warn("event仍然获取不到!")),u?u instanceof V?(s=u,i.debug&&console.log(`Event获取成功 propChangedName: ${e}`,s)):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(s){const a=new q;return a.d(s.dwon(()=>r.emit())),a}else{i.debug&&console.log(`未获取到Event!propChangedName: ${e}`);return}}))}}const Of=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:class extends q{constructor(e,r,i){super();f(this,"_doEvalEvent",this.dv(new V));const s=this._doEvalEvent,o=this.disposeVar(p.createNextAnimateFrameEvent(s)),a=e.map(([u,l])=>{const c=new Ll(u),h=l&&new Xm(c,l,s,r)||void 0;return[c,h]});this.d(()=>{a.forEach(([u,l])=>{l==null||l.destroy(),u.destroy()}),a.length=0}),this.d(s.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=r;if(u==="Immediate"){const c=a.map(([h])=>h.sceneObject);(!l||c.every(h=>h!==void 0))&&i(c)}})),this.d(o.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=r;if(u==="NextAnimateFrame"){const c=a.map(([h])=>h.sceneObject);(!l||c.every(h=>h!==void 0))&&i(c)}}))}forceExecute(){this._doEvalEvent.emit()}}},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:Ym}=Of;class va extends q{constructor(){super();f(this,"_evalFunc");f(this,"_forceExecute",new V);const e=this.dv(p.react(void 0)),r=()=>{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}};r(),this.dispose(this.evalFuncStrChanged.disposableOn(r));const i=o=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(o),e.value&&e.value(o))},s=this.disposeVar(new p.ObjResettingWithEvent(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new Ym(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var o;(o=s.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:p.reactDeepArray([],(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[t[0],t[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:p.reactJson(void 0),devTags:p.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(va||(va={})),p.extendClassProps(va.prototype,va.createDefaultProps);const Mf=rs("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function Mn(n){return Mf.forward(n)}function Df(n){return Mf.inverse(n)}const Lf=rs("+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 Hm(n){const t=Lf.forward([n[0],n[1]]);return[t[0],t[1],n[2]]}function Bm(n){const t=Lf.inverse([n[0],n[1]]);return[t[0],t[1],n[2]]}function Jm(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1])&&n.push(n[0]);const e=be.point(t),r=be.polygon([n]);return be.booleanPointInPolygon(e,r)}var Ne=63710088e-1,Af={centimeters:Ne*100,centimetres:Ne*100,degrees:Ne/111325,feet:Ne*3.28084,inches:Ne*39.37,kilometers:Ne/1e3,kilometres:Ne/1e3,meters:Ne,metres:Ne,miles:Ne/1609.344,millimeters:Ne*1e3,millimetres:Ne*1e3,nauticalmiles:Ne/1852,radians:1,yards:Ne*1.0936};function sn(n,t,e){e===void 0&&(e={});var r={type:"Feature"};return(e.id===0||e.id)&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.properties=t||{},r.geometry=n,r}function Ot(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("coordinates is required");if(!Array.isArray(n))throw new Error("coordinates must be an Array");if(n.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Rf(n[0])||!Rf(n[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:n};return sn(r,t,e)}function Je(n,t,e){e===void 0&&(e={});for(var r=0,i=n;r<i.length;r++){var s=i[r];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:n};return sn(a,t,e)}function on(n,t,e){if(e===void 0&&(e={}),n.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:n};return sn(r,t,e)}function js(n,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=n,e}function Al(n,t,e){e===void 0&&(e={});var r={type:"MultiPolygon",coordinates:n};return sn(r,t,e)}function Rl(n,t){t===void 0&&(t="kilometers");var e=Af[t];if(!e)throw new Error(t+" units is invalid");return n*e}function Fl(n,t){t===void 0&&(t="kilometers");var e=Af[t];if(!e)throw new Error(t+" units is invalid");return n/e}function pu(n){var t=n%(2*Math.PI);return t*180/Math.PI}function Fe(n){var t=n%360;return t*Math.PI/180}function kl(n,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(n>=0))throw new Error("length must be a positive number");return Rl(Fl(n,t),e)}function Rf(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}function je(n){if(!n)throw new Error("coord is required");if(!Array.isArray(n)){if(n.type==="Feature"&&n.geometry!==null&&n.geometry.type==="Point")return n.geometry.coordinates;if(n.type==="Point")return n.coordinates}if(Array.isArray(n)&&n.length>=2&&!Array.isArray(n[0])&&!Array.isArray(n[1]))return n;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function os(n){if(Array.isArray(n))return n;if(n.type==="Feature"){if(n.geometry!==null)return n.geometry.coordinates}else if(n.coordinates)return n.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Ff(n,t,e){if(!n)throw new Error("No feature passed");if(!e)throw new Error(".featureOf() requires a name");if(!n||n.type!=="Feature"||!n.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!n.geometry||n.geometry.type!==t)throw new Error("Invalid input to "+e+": must be a "+t+", given "+n.geometry.type)}function gr(n){return n.type==="Feature"?n.geometry:n}function jm(n,t){return n.type==="FeatureCollection"?"FeatureCollection":n.type==="GeometryCollection"?"GeometryCollection":n.type==="Feature"&&n.geometry!==null?n.geometry.type:n.type}function ya(n,t,e){if(e===void 0&&(e={}),e.final===!0)return Zm(n,t);var r=je(n),i=je(t),s=Fe(r[0]),o=Fe(i[0]),a=Fe(r[1]),u=Fe(i[1]),l=Math.sin(o-s)*Math.cos(u),c=Math.cos(a)*Math.sin(u)-Math.sin(a)*Math.cos(u)*Math.cos(o-s);return pu(Math.atan2(l,c))}function Zm(n,t){var e=ya(t,n);return e=(e+180)%360,e}function Zs(n,t,e,r){r===void 0&&(r={});var i=je(n),s=Fe(i[0]),o=Fe(i[1]),a=Fe(e),u=Fl(t,r.units),l=Math.asin(Math.sin(o)*Math.cos(u)+Math.cos(o)*Math.sin(u)*Math.cos(a)),c=s+Math.atan2(Math.sin(a)*Math.sin(u)*Math.cos(o),Math.cos(u)-Math.sin(o)*Math.sin(l)),h=pu(c),d=pu(l);return Ot([h,d],r.properties)}function ri(n,t,e){e===void 0&&(e={});var r=je(n),i=je(t),s=Fe(i[1]-r[1]),o=Fe(i[0]-r[0]),a=Fe(r[1]),u=Fe(i[1]),l=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(a)*Math.cos(u);return Rl(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),e.units)}function Km(n,t,e){e===void 0&&(e={});for(var r=gr(n),i=r.coordinates,s=0,o=0;o<i.length&&!(t>=s&&o===i.length-1);o++)if(s>=t){var a=t-s;if(a){var u=ya(i[o],i[o-1])-180,l=Zs(i[o],a,u,e);return l}else return Ot(i[o])}else s+=ri(i[o],i[o+1],e);return Ot(i[i.length-1])}function Qm(n,t){const e=on(n);return Km(e,t,{units:"meters"}).geometry.coordinates}function Ks(n,t,e){if(n!==null)for(var r,i,s,o,a,u,l,c=0,h=0,d,g=n.type,v=g==="FeatureCollection",E=g==="Feature",C=v?n.features.length:1,b=0;b<C;b++){l=v?n.features[b].geometry:E?n.geometry:n,d=l?l.type==="GeometryCollection":!1,a=d?l.geometries.length:1;for(var m=0;m<a;m++){var y=0,_=0;if(o=d?l.geometries[m]:l,o!==null){u=o.coordinates;var S=o.type;switch(c=e&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(t(u,h,b,y,_)===!1)return!1;h++,y++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(t(u[r],h,b,y,_)===!1)return!1;h++,S==="MultiPoint"&&y++}S==="LineString"&&y++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-c;i++){if(t(u[r][i],h,b,y,_)===!1)return!1;h++}S==="MultiLineString"&&y++,S==="Polygon"&&_++}S==="Polygon"&&y++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(_=0,i=0;i<u[r].length;i++){for(s=0;s<u[r][i].length-c;s++){if(t(u[r][i][s],h,b,y,_)===!1)return!1;h++}_++}y++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(Ks(o.geometries[r],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function gu(n,t){if(n.type==="Feature")t(n,0);else if(n.type==="FeatureCollection")for(var e=0;e<n.features.length&&t(n.features[e],e)!==!1;e++);}function mu(n,t){var e,r,i,s,o,a,u,l,c,h,d=0,g=n.type==="FeatureCollection",v=n.type==="Feature",E=g?n.features.length:1;for(e=0;e<E;e++){for(a=g?n.features[e].geometry:v?n.geometry:n,l=g?n.features[e].properties:v?n.properties:{},c=g?n.features[e].bbox:v?n.bbox:void 0,h=g?n.features[e].id:v?n.id:void 0,u=a?a.type==="GeometryCollection":!1,o=u?a.geometries.length:1,i=0;i<o;i++){if(s=u?a.geometries[i]:a,s===null){if(t(null,d,l,c,h)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(s,d,l,c,h)===!1)return!1;break}case"GeometryCollection":{for(r=0;r<s.geometries.length;r++)if(t(s.geometries[r],d,l,c,h)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}d++}}function $m(n,t,e){var r=e;return mu(n,function(i,s,o,a,u){r=t(r,i,s,o,a,u)}),r}function Vl(n,t){mu(n,function(e,r,i,s,o){var a=e===null?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return t(sn(e,i,{bbox:s,id:o}),r,0)===!1?!1:void 0}var u;switch(a){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var l=0;l<e.coordinates.length;l++){var c=e.coordinates[l],h={type:u,coordinates:c};if(t(sn(h,i),r,l)===!1)return!1}})}function tv(n,t){Vl(n,function(e,r,i){var s=0;if(e.geometry){var o=e.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var a,u=0,l=0,c=0;if(Ks(e,function(h,d,g,v,E){if(a===void 0||r>u||v>l||E>c){a=h,u=r,l=v,c=E,s=0;return}var C=on([a,h],e.properties);if(t(C,r,i,E,s)===!1)return!1;s++,a=h})===!1)return!1}}})}var kf=6378137;function ev(n){return $m(n,function(t,e){return t+rv(e)},0)}function rv(n){var t=0,e;switch(n.type){case"Polygon":return Vf(n.coordinates);case"MultiPolygon":for(e=0;e<n.coordinates.length;e++)t+=Vf(n.coordinates[e]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function Vf(n){var t=0;if(n&&n.length>0){t+=Math.abs(zf(n[0]));for(var e=1;e<n.length;e++)t-=Math.abs(zf(n[e]))}return t}function zf(n){var t,e,r,i,s,o,a,u=0,l=n.length;if(l>2){for(a=0;a<l;a++)a===l-2?(i=l-2,s=l-1,o=0):a===l-1?(i=l-1,s=0,o=1):(i=a,s=a+1,o=a+2),t=n[i],e=n[s],r=n[o],u+=(zl(r[0])-zl(t[0]))*Math.sin(zl(e[1]));u=u*kf*kf/2}return u}function zl(n){return n*Math.PI/180}function Ul(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 t=Je([n]);return ev(t)}function Uf(n,t,e=0,r=n.length-1,i=nv){for(;r>e;){if(r-e>600){const u=r-e+1,l=t-e+1,c=Math.log(u),h=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*h*(u-h)/u)*(l-u/2<0?-1:1),g=Math.max(e,Math.floor(t-l*h/u+d)),v=Math.min(r,Math.floor(t+(u-l)*h/u+d));Uf(n,t,g,v,i)}const s=n[t];let o=e,a=r;for(_a(n,e,t),i(n[r],s)>0&&_a(n,e,r);o<a;){for(_a(n,o,a),o++,a--;i(n[o],s)<0;)o++;for(;i(n[a],s)>0;)a--}i(n[e],s)===0?_a(n,e,a):(a++,_a(n,a,r)),a<=t&&(e=a+1),t<=a&&(r=a-1)}}function _a(n,t,e){const r=n[t];n[t]=n[e],n[e]=r}function nv(n,t){return n<t?-1:n>t?1:0}class Gf{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const r=[];if(!yu(t,e))return r;const i=this.toBBox,s=[];for(;e;){for(let o=0;o<e.children.length;o++){const a=e.children[o],u=e.leaf?i(a):a;yu(t,u)&&(e.leaf?r.push(a):Wl(t,u)?this._all(a,r):s.push(a))}e=s.pop()}return r}collides(t){let e=this.data;if(!yu(t,e))return!1;const r=[];for(;e;){for(let i=0;i<e.children.length;i++){const s=e.children[i],o=e.leaf?this.toBBox(s):s;if(yu(t,o)){if(e.leaf||Wl(t,o))return!0;r.push(s)}}e=r.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let r=0;r<t.length;r++)this.insert(t[r]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=e;else if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const r=this.data;this.data=e,e=r}this._insert(e,this.data.height-e.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=$s([]),this}remove(t,e){if(!t)return this;let r=this.data;const i=this.toBBox(t),s=[],o=[];let a,u,l;for(;r||s.length;){if(r||(r=s.pop(),u=s[s.length-1],a=o.pop(),l=!0),r.leaf){const c=iv(t,r.children,e);if(c!==-1)return r.children.splice(c,1),s.push(r),this._condense(s),this}!l&&!r.leaf&&Wl(r,i)?(s.push(r),o.push(a),a=0,u=r,r=r.children[0]):u?(a++,r=u.children[a],l=!1):r=null}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const r=[];for(;t;)t.leaf?e.push(...t.children):r.push(...t.children),t=r.pop();return e}_build(t,e,r,i){const s=r-e+1;let o=this._maxEntries,a;if(s<=o)return a=$s(t.slice(e,r+1)),Qs(a,this.toBBox),a;i||(i=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/Math.pow(o,i-1))),a=$s([]),a.leaf=!1,a.height=i;const u=Math.ceil(s/o),l=u*Math.ceil(Math.sqrt(o));Wf(t,e,r,l,this.compareMinX);for(let c=e;c<=r;c+=l){const h=Math.min(c+l-1,r);Wf(t,c,h,u,this.compareMinY);for(let d=c;d<=h;d+=u){const g=Math.min(d+u-1,h);a.children.push(this._build(t,d,g,i-1))}}return Qs(a,this.toBBox),a}_chooseSubtree(t,e,r,i){for(;i.push(e),!(e.leaf||i.length-1===r);){let s=1/0,o=1/0,a;for(let u=0;u<e.children.length;u++){const l=e.children[u],c=Gl(l),h=av(t,l)-c;h<o?(o=h,s=c<s?c:s,a=l):h===o&&c<s&&(s=c,a=l)}e=a||e.children[0]}return e}_insert(t,e,r){const i=r?t:this.toBBox(t),s=[],o=this._chooseSubtree(i,this.data,e,s);for(o.children.push(t),Ea(o,i);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(i,s,e)}_split(t,e){const r=t[e],i=r.children.length,s=this._minEntries;this._chooseSplitAxis(r,s,i);const o=this._chooseSplitIndex(r,s,i),a=$s(r.children.splice(o,r.children.length-o));a.height=r.height,a.leaf=r.leaf,Qs(r,this.toBBox),Qs(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(r,a)}_splitRoot(t,e){this.data=$s([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Qs(this.data,this.toBBox)}_chooseSplitIndex(t,e,r){let i,s=1/0,o=1/0;for(let a=e;a<=r-e;a++){const u=wa(t,0,a,this.toBBox),l=wa(t,a,r,this.toBBox),c=uv(u,l),h=Gl(u)+Gl(l);c<s?(s=c,i=a,o=h<o?h:o):c===s&&h<o&&(o=h,i=a)}return i||r-e}_chooseSplitAxis(t,e,r){const i=t.leaf?this.compareMinX:sv,s=t.leaf?this.compareMinY:ov,o=this._allDistMargin(t,e,r,i),a=this._allDistMargin(t,e,r,s);o<a&&t.children.sort(i)}_allDistMargin(t,e,r,i){t.children.sort(i);const s=this.toBBox,o=wa(t,0,e,s),a=wa(t,r-e,r,s);let u=vu(o)+vu(a);for(let l=e;l<r-e;l++){const c=t.children[l];Ea(o,t.leaf?s(c):c),u+=vu(o)}for(let l=r-e-1;l>=e;l--){const c=t.children[l];Ea(a,t.leaf?s(c):c),u+=vu(a)}return u}_adjustParentBBoxes(t,e,r){for(let i=r;i>=0;i--)Ea(e[i],t)}_condense(t){for(let e=t.length-1,r;e>=0;e--)t[e].children.length===0?e>0?(r=t[e-1].children,r.splice(r.indexOf(t[e]),1)):this.clear():Qs(t[e],this.toBBox)}}function iv(n,t,e){if(!e)return t.indexOf(n);for(let r=0;r<t.length;r++)if(e(n,t[r]))return r;return-1}function Qs(n,t){wa(n,0,n.children.length,t,n)}function wa(n,t,e,r,i){i||(i=$s(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s=t;s<e;s++){const o=n.children[s];Ea(i,n.leaf?r(o):o)}return i}function Ea(n,t){return n.minX=Math.min(n.minX,t.minX),n.minY=Math.min(n.minY,t.minY),n.maxX=Math.max(n.maxX,t.maxX),n.maxY=Math.max(n.maxY,t.maxY),n}function sv(n,t){return n.minX-t.minX}function ov(n,t){return n.minY-t.minY}function Gl(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function vu(n){return n.maxX-n.minX+(n.maxY-n.minY)}function av(n,t){return(Math.max(t.maxX,n.maxX)-Math.min(t.minX,n.minX))*(Math.max(t.maxY,n.maxY)-Math.min(t.minY,n.minY))}function uv(n,t){const e=Math.max(n.minX,t.minX),r=Math.max(n.minY,t.minY),i=Math.min(n.maxX,t.maxX),s=Math.min(n.maxY,t.maxY);return Math.max(0,i-e)*Math.max(0,s-r)}function Wl(n,t){return n.minX<=t.minX&&n.minY<=t.minY&&t.maxX<=n.maxX&&t.maxY<=n.maxY}function yu(n,t){return t.minX<=n.maxX&&t.minY<=n.maxY&&t.maxX>=n.minX&&t.maxY>=n.minY}function $s(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Wf(n,t,e,r,i){const s=[t,e];for(;s.length;){if(e=s.pop(),t=s.pop(),e-t<=r)continue;const o=t+Math.ceil((e-t)/r/2)*r;Uf(n,o,t,e,i),s.push(t,o,o,e)}}class lv{constructor(t=[],e=(r,i)=>r<i?-1:r>i?1:0){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;const t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:r}=this,i=e[t];for(;t>0;){const s=t-1>>1,o=e[s];if(r(i,o)>=0)break;e[t]=o,t=s}e[t]=i}_down(t){const{data:e,compare:r}=this,i=this.length>>1,s=e[t];for(;t<i;){let o=(t<<1)+1;const a=o+1;if(a<this.length&&r(e[a],e[o])<0&&(o=a),r(e[o],s)>=0)break;e[t]=e[o],t=o}e[t]=s}}function qf(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Sa={exports:{}},ql,Xf;function cv(){return Xf||(Xf=1,ql=function(t,e,r,i){var s=t[0],o=t[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=e.length);for(var u=(i-r)/2,l=0,c=u-1;l<u;c=l++){var h=e[r+l*2+0],d=e[r+l*2+1],g=e[r+c*2+0],v=e[r+c*2+1],E=d>o!=v>o&&s<(g-h)*(o-d)/(v-d)+h;E&&(a=!a)}return a}),ql}var Xl,Yf;function hv(){return Yf||(Yf=1,Xl=function(t,e,r,i){var s=t[0],o=t[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=e.length);for(var u=i-r,l=0,c=u-1;l<u;c=l++){var h=e[l+r][0],d=e[l+r][1],g=e[c+r][0],v=e[c+r][1],E=d>o!=v>o&&s<(g-h)*(o-d)/(v-d)+h;E&&(a=!a)}return a}),Xl}var Hf;function fv(){if(Hf)return Sa.exports;Hf=1;var n=cv(),t=hv();return Sa.exports=function(r,i,s,o){return i.length>0&&Array.isArray(i[0])?t(r,i,s,o):n(r,i,s,o)},Sa.exports.nested=t,Sa.exports.flat=n,Sa.exports}var dv=fv();const pv=qf(dv),ni=11102230246251565e-32,ke=134217729,gv=(3+8*ni)*ni;function Yl(n,t,e,r,i){let s,o,a,u,l=t[0],c=r[0],h=0,d=0;c>l==c>-l?(s=l,l=t[++h]):(s=c,c=r[++d]);let g=0;if(h<n&&d<e)for(c>l==c>-l?(o=l+s,a=s-(o-l),l=t[++h]):(o=c+s,a=s-(o-c),c=r[++d]),s=o,a!==0&&(i[g++]=a);h<n&&d<e;)c>l==c>-l?(o=s+l,u=o-s,a=s-(o-u)+(l-u),l=t[++h]):(o=s+c,u=o-s,a=s-(o-u)+(c-u),c=r[++d]),s=o,a!==0&&(i[g++]=a);for(;h<n;)o=s+l,u=o-s,a=s-(o-u)+(l-u),l=t[++h],s=o,a!==0&&(i[g++]=a);for(;d<e;)o=s+c,u=o-s,a=s-(o-u)+(c-u),c=r[++d],s=o,a!==0&&(i[g++]=a);return(s!==0||g===0)&&(i[g++]=s),g}function mv(n,t){let e=t[0];for(let r=1;r<n;r++)e+=t[r];return e}function Ca(n){return new Float64Array(n)}const vv=(3+16*ni)*ni,yv=(2+12*ni)*ni,_v=(9+64*ni)*ni*ni,to=Ca(4),Bf=Ca(8),Jf=Ca(12),jf=Ca(16),Ze=Ca(4);function wv(n,t,e,r,i,s,o){let a,u,l,c,h,d,g,v,E,C,b,m,y,_,S,I,P,M;const R=n-i,k=e-i,x=t-s,A=r-s;_=R*A,d=ke*R,g=d-(d-R),v=R-g,d=ke*A,E=d-(d-A),C=A-E,S=v*C-(_-g*E-v*E-g*C),I=x*k,d=ke*x,g=d-(d-x),v=x-g,d=ke*k,E=d-(d-k),C=k-E,P=v*C-(I-g*E-v*E-g*C),b=S-P,h=S-b,to[0]=S-(b+h)+(h-P),m=_+b,h=m-_,y=_-(m-h)+(b-h),b=y-I,h=y-b,to[1]=y-(b+h)+(h-I),M=m+b,h=M-m,to[2]=m-(M-h)+(b-h),to[3]=M;let L=mv(4,to),F=yv*o;if(L>=F||-L>=F||(h=n-R,a=n-(R+h)+(h-i),h=e-k,l=e-(k+h)+(h-i),h=t-x,u=t-(x+h)+(h-s),h=r-A,c=r-(A+h)+(h-s),a===0&&u===0&&l===0&&c===0)||(F=_v*o+gv*Math.abs(L),L+=R*c+A*a-(x*l+k*u),L>=F||-L>=F))return L;_=a*A,d=ke*a,g=d-(d-a),v=a-g,d=ke*A,E=d-(d-A),C=A-E,S=v*C-(_-g*E-v*E-g*C),I=u*k,d=ke*u,g=d-(d-u),v=u-g,d=ke*k,E=d-(d-k),C=k-E,P=v*C-(I-g*E-v*E-g*C),b=S-P,h=S-b,Ze[0]=S-(b+h)+(h-P),m=_+b,h=m-_,y=_-(m-h)+(b-h),b=y-I,h=y-b,Ze[1]=y-(b+h)+(h-I),M=m+b,h=M-m,Ze[2]=m-(M-h)+(b-h),Ze[3]=M;const J=Yl(4,to,4,Ze,Bf);_=R*c,d=ke*R,g=d-(d-R),v=R-g,d=ke*c,E=d-(d-c),C=c-E,S=v*C-(_-g*E-v*E-g*C),I=x*l,d=ke*x,g=d-(d-x),v=x-g,d=ke*l,E=d-(d-l),C=l-E,P=v*C-(I-g*E-v*E-g*C),b=S-P,h=S-b,Ze[0]=S-(b+h)+(h-P),m=_+b,h=m-_,y=_-(m-h)+(b-h),b=y-I,h=y-b,Ze[1]=y-(b+h)+(h-I),M=m+b,h=M-m,Ze[2]=m-(M-h)+(b-h),Ze[3]=M;const et=Yl(J,Bf,4,Ze,Jf);_=a*c,d=ke*a,g=d-(d-a),v=a-g,d=ke*c,E=d-(d-c),C=c-E,S=v*C-(_-g*E-v*E-g*C),I=u*l,d=ke*u,g=d-(d-u),v=u-g,d=ke*l,E=d-(d-l),C=l-E,P=v*C-(I-g*E-v*E-g*C),b=S-P,h=S-b,Ze[0]=S-(b+h)+(h-P),m=_+b,h=m-_,y=_-(m-h)+(b-h),b=y-I,h=y-b,Ze[1]=y-(b+h)+(h-I),M=m+b,h=M-m,Ze[2]=m-(M-h)+(b-h),Ze[3]=M;const dt=Yl(et,Jf,4,Ze,jf);return jf[dt-1]}function Zf(n,t,e,r,i,s){const o=(t-s)*(e-i),a=(n-i)*(r-s),u=o-a,l=Math.abs(o+a);return Math.abs(u)>=vv*l?u:-wv(n,t,e,r,i,s,l)}function Ev(n,t,e){t=Math.max(0,t===void 0?2:t),e=e||0;const r=bv(n),i=new Gf(16);i.toBBox=function(d){return{minX:d[0],minY:d[1],maxX:d[0],maxY:d[1]}},i.compareMinX=function(d,g){return d[0]-g[0]},i.compareMinY=function(d,g){return d[1]-g[1]},i.load(n);const s=[];let o;for(let d=0;d<r.length;d++){const g=r[d];i.remove(g),o=$f(g,o),s.push(o)}const a=new Gf(16);for(let d=0;d<s.length;d++)a.insert(Hl(s[d]));const u=t*t,l=e*e;for(;s.length;){const d=s.shift(),g=d.p,v=d.next.p,E=Bl(g,v);if(E<l)continue;const C=E/u,b=Sv(i,d.prev.p,g,v,d.next.next.p,C,a);b&&Math.min(Bl(b,g),Bl(b,v))<=C&&(s.push(d),s.push($f(b,d)),i.remove(b),a.remove(d),a.insert(Hl(d)),a.insert(Hl(d.next)))}let c=o;const h=[];do h.push(c.p),c=c.next;while(c!==o);return h.push(c.p),h}function Sv(n,t,e,r,i,s,o){const a=new lv([],Cv);let u=n.data;for(;u;){for(let l=0;l<u.children.length;l++){const c=u.children[l],h=u.leaf?Jl(c,e,r):Iv(e,r,c);h>s||a.push({node:c,dist:h})}for(;a.length&&!a.peek().node.children;){const l=a.pop(),c=l.node,h=Jl(c,t,e),d=Jl(c,r,i);if(l.dist<h&&l.dist<d&&Qf(e,c,o)&&Qf(r,c,o))return c}u=a.pop(),u&&(u=u.node)}return null}function Cv(n,t){return n.dist-t.dist}function Iv(n,t,e){if(Kf(n,e)||Kf(t,e))return 0;const r=_u(n[0],n[1],t[0],t[1],e.minX,e.minY,e.maxX,e.minY);if(r===0)return 0;const i=_u(n[0],n[1],t[0],t[1],e.minX,e.minY,e.minX,e.maxY);if(i===0)return 0;const s=_u(n[0],n[1],t[0],t[1],e.maxX,e.minY,e.maxX,e.maxY);if(s===0)return 0;const o=_u(n[0],n[1],t[0],t[1],e.minX,e.maxY,e.maxX,e.maxY);return o===0?0:Math.min(r,i,s,o)}function Kf(n,t){return n[0]>=t.minX&&n[0]<=t.maxX&&n[1]>=t.minY&&n[1]<=t.maxY}function Qf(n,t,e){const r=Math.min(n[0],t[0]),i=Math.min(n[1],t[1]),s=Math.max(n[0],t[0]),o=Math.max(n[1],t[1]),a=e.search({minX:r,minY:i,maxX:s,maxY:o});for(let u=0;u<a.length;u++)if(Pv(a[u].p,a[u].next.p,n,t))return!1;return!0}function eo(n,t,e){return Zf(n[0],n[1],t[0],t[1],e[0],e[1])}function Pv(n,t,e,r){return n!==r&&t!==e&&eo(n,t,e)>0!=eo(n,t,r)>0&&eo(e,r,n)>0!=eo(e,r,t)>0}function Hl(n){const t=n.p,e=n.next.p;return n.minX=Math.min(t[0],e[0]),n.minY=Math.min(t[1],e[1]),n.maxX=Math.max(t[0],e[0]),n.maxY=Math.max(t[1],e[1]),n}function bv(n){let t=n[0],e=n[0],r=n[0],i=n[0];for(let a=0;a<n.length;a++){const u=n[a];u[0]<t[0]&&(t=u),u[0]>r[0]&&(r=u),u[1]<e[1]&&(e=u),u[1]>i[1]&&(i=u)}const s=[t,e,r,i],o=s.slice();for(let a=0;a<n.length;a++)pv(n[a],s)||o.push(n[a]);return Tv(o)}function $f(n,t){const e={p:n,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return t?(e.next=t.next,e.prev=t,t.next.prev=e,t.next=e):(e.prev=e,e.next=e),e}function Bl(n,t){const e=n[0]-t[0],r=n[1]-t[1];return e*e+r*r}function Jl(n,t,e){let r=t[0],i=t[1],s=e[0]-r,o=e[1]-i;if(s!==0||o!==0){const a=((n[0]-r)*s+(n[1]-i)*o)/(s*s+o*o);a>1?(r=e[0],i=e[1]):a>0&&(r+=s*a,i+=o*a)}return s=n[0]-r,o=n[1]-i,s*s+o*o}function _u(n,t,e,r,i,s,o,a){const u=e-n,l=r-t,c=o-i,h=a-s,d=n-i,g=t-s,v=u*u+l*l,E=u*c+l*h,C=c*c+h*h,b=u*d+l*g,m=c*d+h*g,y=v*C-E*E;let _,S,I=y,P=y;y===0?(_=0,I=1,S=m,P=C):(_=E*m-C*b,S=v*m-E*b,_<0?(_=0,S=m,P=C):_>I&&(_=I,S=m+E,P=C)),S<0?(S=0,-b<0?_=0:-b>v?_=I:(_=-b,I=v)):S>P&&(S=P,-b+E<0?_=0:-b+E>v?_=I:(_=-b+E,I=v));const M=_===0?0:_/I,R=S===0?0:S/P,k=(1-M)*n+M*e,x=(1-M)*t+M*r,A=(1-R)*i+R*o,L=(1-R)*s+R*a,F=A-k,J=L-x;return F*F+J*J}function Nv(n,t){return n[0]===t[0]?n[1]-t[1]:n[0]-t[0]}function Tv(n){n.sort(Nv);const t=[];for(let r=0;r<n.length;r++){for(;t.length>=2&&eo(t[t.length-2],t[t.length-1],n[r])<=0;)t.pop();t.push(n[r])}const e=[];for(let r=n.length-1;r>=0;r--){for(;e.length>=2&&eo(e[e.length-2],e[e.length-1],n[r])<=0;)e.pop();e.push(n[r])}return e.pop(),t.pop(),t.concat(e)}function xv(n,t){t===void 0&&(t={}),t.concavity=t.concavity||1/0;var e=[];if(Ks(n,function(i){e.push([i[0],i[1]])}),!e.length)return null;var r=Ev(e,t.concavity);return r.length>3?Je([r]):null}function td(n,t){t===void 0&&(t={});var e=0,r=0,i=0;return Ks(n,function(s){e+=s[0],r+=s[1],i++},!0),Ot([e/i,r/i],t.properties)}function ed(n,t){switch(t===void 0&&(t={}),jm(n)){case"Point":return Ot(je(n),t.properties);case"Polygon":var e=[];Ks(n,function(_){e.push(_)});var r=td(n,{properties:t.properties}),i=r.geometry.coordinates,s=0,o=0,a=0,u,l,c,h,d,g,v,E,C=e.map(function(_){return[_[0]-i[0],_[1]-i[1]]});for(u=0;u<e.length-1;u++)l=C[u],h=l[0],g=l[1],c=C[u+1],d=c[0],v=c[1],E=h*v-d*g,a+=E,s+=(h+d)*E,o+=(g+v)*E;if(a===0)return r;var b=a*.5,m=1/(6*b);return Ot([i[0]+m*s,i[1]+m*o],t.properties);default:var y=xv(n);return y?ed(y,{properties:t.properties}):td(n,{properties:t.properties})}}function Ov(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 t=Je([n]),r=ed(t).geometry.coordinates;return[r[0],r[1],r[2]??n[0][2]??0]}function rd(n,t,e,r){const[i,s,o]=n,a=Zs(Ot([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function wu(n,t){return ri(Ot(n),Ot(t),{units:"meters"})}function Ia(n,t){return ya(Ot(n),Ot(t))}function nd(n){if(!n)throw new Error("geojson is required");var t=[];return Vl(n,function(e){Mv(e,t)}),js(t)}function Mv(n,t){var e=[],r=n.geometry;if(r!==null){switch(r.type){case"Polygon":e=os(r);break;case"LineString":e=[os(r)]}e.forEach(function(i){var s=Dv(i,n.properties);s.forEach(function(o){o.id=t.length,t.push(o)})})}}function Dv(n,t){var e=[];return n.reduce(function(r,i){var s=on([r,i],t);return s.bbox=Lv(r,i),e.push(s),i}),e}function Lv(n,t){var e=n[0],r=n[1],i=t[0],s=t[1],o=e<i?e:i,a=r<s?r:s,u=e>i?e:i,l=r>s?r:s;return[o,a,u,l]}var Eu={exports:{}},Su={exports:{}},Av=Su.exports,id;function Rv(){return id||(id=1,(function(n,t){(function(e,r){n.exports=r()})(Av,function(){function e(m,y,_,S,I){(function P(M,R,k,x,A){for(;x>k;){if(x-k>600){var L=x-k+1,F=R-k+1,J=Math.log(L),et=.5*Math.exp(2*J/3),dt=.5*Math.sqrt(J*et*(L-et)/L)*(F-L/2<0?-1:1),Lt=Math.max(k,Math.floor(R-F*et/L+dt)),Qt=Math.min(x,Math.floor(R+(L-F)*et/L+dt));P(M,R,Lt,Qt,A)}var pr=M[R],Vt=k,At=x;for(r(M,k,R),A(M[x],pr)>0&&r(M,k,x);Vt<At;){for(r(M,Vt,At),Vt++,At--;A(M[Vt],pr)<0;)Vt++;for(;A(M[At],pr)>0;)At--}A(M[k],pr)===0?r(M,k,At):r(M,++At,x),At<=R&&(k=At+1),R<=At&&(x=At-1)}})(m,y,_||0,S||m.length-1,I||i)}function r(m,y,_){var S=m[y];m[y]=m[_],m[_]=S}function i(m,y){return m<y?-1:m>y?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,y,_){if(!_)return y.indexOf(m);for(var S=0;S<y.length;S++)if(_(m,y[S]))return S;return-1}function a(m,y){u(m,0,m.children.length,y,m)}function u(m,y,_,S,I){I||(I=C(null)),I.minX=1/0,I.minY=1/0,I.maxX=-1/0,I.maxY=-1/0;for(var P=y;P<_;P++){var M=m.children[P];l(I,m.leaf?S(M):M)}return I}function l(m,y){return m.minX=Math.min(m.minX,y.minX),m.minY=Math.min(m.minY,y.minY),m.maxX=Math.max(m.maxX,y.maxX),m.maxY=Math.max(m.maxY,y.maxY),m}function c(m,y){return m.minX-y.minX}function h(m,y){return m.minY-y.minY}function d(m){return(m.maxX-m.minX)*(m.maxY-m.minY)}function g(m){return m.maxX-m.minX+(m.maxY-m.minY)}function v(m,y){return m.minX<=y.minX&&m.minY<=y.minY&&y.maxX<=m.maxX&&y.maxY<=m.maxY}function E(m,y){return y.minX<=m.maxX&&y.minY<=m.maxY&&y.maxX>=m.minX&&y.maxY>=m.minY}function C(m){return{children:m,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(m,y,_,S,I){for(var P=[y,_];P.length;)if(!((_=P.pop())-(y=P.pop())<=S)){var M=y+Math.ceil((_-y)/S/2)*S;e(m,M,y,_,I),P.push(y,M,M,_)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(m){var y=this.data,_=[];if(!E(m,y))return _;for(var S=this.toBBox,I=[];y;){for(var P=0;P<y.children.length;P++){var M=y.children[P],R=y.leaf?S(M):M;E(m,R)&&(y.leaf?_.push(M):v(m,R)?this._all(M,_):I.push(M))}y=I.pop()}return _},s.prototype.collides=function(m){var y=this.data;if(!E(m,y))return!1;for(var _=[];y;){for(var S=0;S<y.children.length;S++){var I=y.children[S],P=y.leaf?this.toBBox(I):I;if(E(m,P)){if(y.leaf||v(m,P))return!0;_.push(I)}}y=_.pop()}return!1},s.prototype.load=function(m){if(!m||!m.length)return this;if(m.length<this._minEntries){for(var y=0;y<m.length;y++)this.insert(m[y]);return this}var _=this._build(m.slice(),0,m.length-1,0);if(this.data.children.length)if(this.data.height===_.height)this._splitRoot(this.data,_);else{if(this.data.height<_.height){var S=this.data;this.data=_,_=S}this._insert(_,this.data.height-_.height-1,!0)}else this.data=_;return this},s.prototype.insert=function(m){return m&&this._insert(m,this.data.height-1),this},s.prototype.clear=function(){return this.data=C([]),this},s.prototype.remove=function(m,y){if(!m)return this;for(var _,S,I,P=this.data,M=this.toBBox(m),R=[],k=[];P||R.length;){if(P||(P=R.pop(),S=R[R.length-1],_=k.pop(),I=!0),P.leaf){var x=o(m,P.children,y);if(x!==-1)return P.children.splice(x,1),R.push(P),this._condense(R),this}I||P.leaf||!v(P,M)?S?(_++,P=S.children[_],I=!1):P=null:(R.push(P),k.push(_),_=0,S=P,P=P.children[0])}return this},s.prototype.toBBox=function(m){return m},s.prototype.compareMinX=function(m,y){return m.minX-y.minX},s.prototype.compareMinY=function(m,y){return m.minY-y.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(m){return this.data=m,this},s.prototype._all=function(m,y){for(var _=[];m;)m.leaf?y.push.apply(y,m.children):_.push.apply(_,m.children),m=_.pop();return y},s.prototype._build=function(m,y,_,S){var I,P=_-y+1,M=this._maxEntries;if(P<=M)return a(I=C(m.slice(y,_+1)),this.toBBox),I;S||(S=Math.ceil(Math.log(P)/Math.log(M)),M=Math.ceil(P/Math.pow(M,S-1))),(I=C([])).leaf=!1,I.height=S;var R=Math.ceil(P/M),k=R*Math.ceil(Math.sqrt(M));b(m,y,_,k,this.compareMinX);for(var x=y;x<=_;x+=k){var A=Math.min(x+k-1,_);b(m,x,A,R,this.compareMinY);for(var L=x;L<=A;L+=R){var F=Math.min(L+R-1,A);I.children.push(this._build(m,L,F,S-1))}}return a(I,this.toBBox),I},s.prototype._chooseSubtree=function(m,y,_,S){for(;S.push(y),!y.leaf&&S.length-1!==_;){for(var I=1/0,P=1/0,M=void 0,R=0;R<y.children.length;R++){var k=y.children[R],x=d(k),A=(L=m,F=k,(Math.max(F.maxX,L.maxX)-Math.min(F.minX,L.minX))*(Math.max(F.maxY,L.maxY)-Math.min(F.minY,L.minY))-x);A<P?(P=A,I=x<I?x:I,M=k):A===P&&x<I&&(I=x,M=k)}y=M||y.children[0]}var L,F;return y},s.prototype._insert=function(m,y,_){var S=_?m:this.toBBox(m),I=[],P=this._chooseSubtree(S,this.data,y,I);for(P.children.push(m),l(P,S);y>=0&&I[y].children.length>this._maxEntries;)this._split(I,y),y--;this._adjustParentBBoxes(S,I,y)},s.prototype._split=function(m,y){var _=m[y],S=_.children.length,I=this._minEntries;this._chooseSplitAxis(_,I,S);var P=this._chooseSplitIndex(_,I,S),M=C(_.children.splice(P,_.children.length-P));M.height=_.height,M.leaf=_.leaf,a(_,this.toBBox),a(M,this.toBBox),y?m[y-1].children.push(M):this._splitRoot(_,M)},s.prototype._splitRoot=function(m,y){this.data=C([m,y]),this.data.height=m.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(m,y,_){for(var S,I,P,M,R,k,x,A=1/0,L=1/0,F=y;F<=_-y;F++){var J=u(m,0,F,this.toBBox),et=u(m,F,_,this.toBBox),dt=(I=J,P=et,M=void 0,R=void 0,k=void 0,x=void 0,M=Math.max(I.minX,P.minX),R=Math.max(I.minY,P.minY),k=Math.min(I.maxX,P.maxX),x=Math.min(I.maxY,P.maxY),Math.max(0,k-M)*Math.max(0,x-R)),Lt=d(J)+d(et);dt<A?(A=dt,S=F,L=Lt<L?Lt:L):dt===A&&Lt<L&&(L=Lt,S=F)}return S||_-y},s.prototype._chooseSplitAxis=function(m,y,_){var S=m.leaf?this.compareMinX:c,I=m.leaf?this.compareMinY:h;this._allDistMargin(m,y,_,S)<this._allDistMargin(m,y,_,I)&&m.children.sort(S)},s.prototype._allDistMargin=function(m,y,_,S){m.children.sort(S);for(var I=this.toBBox,P=u(m,0,y,I),M=u(m,_-y,_,I),R=g(P)+g(M),k=y;k<_-y;k++){var x=m.children[k];l(P,m.leaf?I(x):x),R+=g(P)}for(var A=_-y-1;A>=y;A--){var L=m.children[A];l(M,m.leaf?I(L):L),R+=g(M)}return R},s.prototype._adjustParentBBoxes=function(m,y,_){for(var S=_;S>=0;S--)l(y[S],m)},s.prototype._condense=function(m){for(var y=m.length-1,_=void 0;y>=0;y--)m[y].children.length===0?y>0?(_=m[y-1].children).splice(_.indexOf(m[y]),1):this.clear():a(m[y],this.toBBox)},s})})(Su)),Su.exports}var jl={},sd;function od(){return sd||(sd=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.earthRadius=63710088e-1,n.factors={centimeters:n.earthRadius*100,centimetres:n.earthRadius*100,degrees:n.earthRadius/111325,feet:n.earthRadius*3.28084,inches:n.earthRadius*39.37,kilometers:n.earthRadius/1e3,kilometres:n.earthRadius/1e3,meters:n.earthRadius,metres:n.earthRadius,miles:n.earthRadius/1609.344,millimeters:n.earthRadius*1e3,millimetres:n.earthRadius*1e3,nauticalmiles:n.earthRadius/1852,radians:1,yards:n.earthRadius*1.0936},n.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/n.earthRadius,yards:1.0936133},n.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 t(x,A,L){L===void 0&&(L={});var F={type:"Feature"};return(L.id===0||L.id)&&(F.id=L.id),L.bbox&&(F.bbox=L.bbox),F.properties=A||{},F.geometry=x,F}n.feature=t;function e(x,A,L){switch(x){case"Point":return r(A).geometry;case"LineString":return a(A).geometry;case"Polygon":return s(A).geometry;case"MultiPoint":return h(A).geometry;case"MultiLineString":return c(A).geometry;case"MultiPolygon":return d(A).geometry;default:throw new Error(x+" is invalid")}}n.geometry=e;function r(x,A,L){if(L===void 0&&(L={}),!x)throw new Error("coordinates is required");if(!Array.isArray(x))throw new Error("coordinates must be an Array");if(x.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!P(x[0])||!P(x[1]))throw new Error("coordinates must contain numbers");var F={type:"Point",coordinates:x};return t(F,A,L)}n.point=r;function i(x,A,L){return L===void 0&&(L={}),l(x.map(function(F){return r(F,A)}),L)}n.points=i;function s(x,A,L){L===void 0&&(L={});for(var F=0,J=x;F<J.length;F++){var et=J[F];if(et.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var dt=0;dt<et[et.length-1].length;dt++)if(et[et.length-1][dt]!==et[0][dt])throw new Error("First and last Position are not equivalent.")}var Lt={type:"Polygon",coordinates:x};return t(Lt,A,L)}n.polygon=s;function o(x,A,L){return L===void 0&&(L={}),l(x.map(function(F){return s(F,A)}),L)}n.polygons=o;function a(x,A,L){if(L===void 0&&(L={}),x.length<2)throw new Error("coordinates must be an array of two or more positions");var F={type:"LineString",coordinates:x};return t(F,A,L)}n.lineString=a;function u(x,A,L){return L===void 0&&(L={}),l(x.map(function(F){return a(F,A)}),L)}n.lineStrings=u;function l(x,A){A===void 0&&(A={});var L={type:"FeatureCollection"};return A.id&&(L.id=A.id),A.bbox&&(L.bbox=A.bbox),L.features=x,L}n.featureCollection=l;function c(x,A,L){L===void 0&&(L={});var F={type:"MultiLineString",coordinates:x};return t(F,A,L)}n.multiLineString=c;function h(x,A,L){L===void 0&&(L={});var F={type:"MultiPoint",coordinates:x};return t(F,A,L)}n.multiPoint=h;function d(x,A,L){L===void 0&&(L={});var F={type:"MultiPolygon",coordinates:x};return t(F,A,L)}n.multiPolygon=d;function g(x,A,L){L===void 0&&(L={});var F={type:"GeometryCollection",geometries:x};return t(F,A,L)}n.geometryCollection=g;function v(x,A){if(A===void 0&&(A=0),A&&!(A>=0))throw new Error("precision must be a positive number");var L=Math.pow(10,A||0);return Math.round(x*L)/L}n.round=v;function E(x,A){A===void 0&&(A="kilometers");var L=n.factors[A];if(!L)throw new Error(A+" units is invalid");return x*L}n.radiansToLength=E;function C(x,A){A===void 0&&(A="kilometers");var L=n.factors[A];if(!L)throw new Error(A+" units is invalid");return x/L}n.lengthToRadians=C;function b(x,A){return y(C(x,A))}n.lengthToDegrees=b;function m(x){var A=x%360;return A<0&&(A+=360),A}n.bearingToAzimuth=m;function y(x){var A=x%(2*Math.PI);return A*180/Math.PI}n.radiansToDegrees=y;function _(x){var A=x%360;return A*Math.PI/180}n.degreesToRadians=_;function S(x,A,L){if(A===void 0&&(A="kilometers"),L===void 0&&(L="kilometers"),!(x>=0))throw new Error("length must be a positive number");return E(C(x,A),L)}n.convertLength=S;function I(x,A,L){if(A===void 0&&(A="meters"),L===void 0&&(L="kilometers"),!(x>=0))throw new Error("area must be a positive number");var F=n.areaFactors[A];if(!F)throw new Error("invalid original units");var J=n.areaFactors[L];if(!J)throw new Error("invalid final units");return x/F*J}n.convertArea=I;function P(x){return!isNaN(x)&&x!==null&&!Array.isArray(x)}n.isNumber=P;function M(x){return!!x&&x.constructor===Object}n.isObject=M;function R(x){if(!x)throw new Error("bbox is required");if(!Array.isArray(x))throw new Error("bbox must be an Array");if(x.length!==4&&x.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");x.forEach(function(A){if(!P(A))throw new Error("bbox must only contain numbers")})}n.validateBBox=R;function k(x){if(!x)throw new Error("id is required");if(["string","number"].indexOf(typeof x)===-1)throw new Error("id must be a number or a string")}n.validateId=k})(jl)),jl}var re={},ad;function ud(){if(ad)return re;ad=1,Object.defineProperty(re,"__esModule",{value:!0});var n=od();function t(m,y,_){if(m!==null)for(var S,I,P,M,R,k,x,A=0,L=0,F,J=m.type,et=J==="FeatureCollection",dt=J==="Feature",Lt=et?m.features.length:1,Qt=0;Qt<Lt;Qt++){x=et?m.features[Qt].geometry:dt?m.geometry:m,F=x?x.type==="GeometryCollection":!1,R=F?x.geometries.length:1;for(var pr=0;pr<R;pr++){var Vt=0,At=0;if(M=F?x.geometries[pr]:x,M!==null){k=M.coordinates;var Pe=M.type;switch(A=_&&(Pe==="Polygon"||Pe==="MultiPolygon")?1:0,Pe){case null:break;case"Point":if(y(k,L,Qt,Vt,At)===!1)return!1;L++,Vt++;break;case"LineString":case"MultiPoint":for(S=0;S<k.length;S++){if(y(k[S],L,Qt,Vt,At)===!1)return!1;L++,Pe==="MultiPoint"&&Vt++}Pe==="LineString"&&Vt++;break;case"Polygon":case"MultiLineString":for(S=0;S<k.length;S++){for(I=0;I<k[S].length-A;I++){if(y(k[S][I],L,Qt,Vt,At)===!1)return!1;L++}Pe==="MultiLineString"&&Vt++,Pe==="Polygon"&&At++}Pe==="Polygon"&&Vt++;break;case"MultiPolygon":for(S=0;S<k.length;S++){for(At=0,I=0;I<k[S].length;I++){for(P=0;P<k[S][I].length-A;P++){if(y(k[S][I][P],L,Qt,Vt,At)===!1)return!1;L++}At++}Vt++}break;case"GeometryCollection":for(S=0;S<M.geometries.length;S++)if(t(M.geometries[S],y,_)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function e(m,y,_,S){var I=_;return t(m,function(P,M,R,k,x){M===0&&_===void 0?I=P:I=y(I,P,M,R,k,x)},S),I}function r(m,y){var _;switch(m.type){case"FeatureCollection":for(_=0;_<m.features.length&&y(m.features[_].properties,_)!==!1;_++);break;case"Feature":y(m.properties,0);break}}function i(m,y,_){var S=_;return r(m,function(I,P){P===0&&_===void 0?S=I:S=y(S,I,P)}),S}function s(m,y){if(m.type==="Feature")y(m,0);else if(m.type==="FeatureCollection")for(var _=0;_<m.features.length&&y(m.features[_],_)!==!1;_++);}function o(m,y,_){var S=_;return s(m,function(I,P){P===0&&_===void 0?S=I:S=y(S,I,P)}),S}function a(m){var y=[];return t(m,function(_){y.push(_)}),y}function u(m,y){var _,S,I,P,M,R,k,x,A,L,F=0,J=m.type==="FeatureCollection",et=m.type==="Feature",dt=J?m.features.length:1;for(_=0;_<dt;_++){for(R=J?m.features[_].geometry:et?m.geometry:m,x=J?m.features[_].properties:et?m.properties:{},A=J?m.features[_].bbox:et?m.bbox:void 0,L=J?m.features[_].id:et?m.id:void 0,k=R?R.type==="GeometryCollection":!1,M=k?R.geometries.length:1,I=0;I<M;I++){if(P=k?R.geometries[I]:R,P===null){if(y(null,F,x,A,L)===!1)return!1;continue}switch(P.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(y(P,F,x,A,L)===!1)return!1;break}case"GeometryCollection":{for(S=0;S<P.geometries.length;S++)if(y(P.geometries[S],F,x,A,L)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}F++}}function l(m,y,_){var S=_;return u(m,function(I,P,M,R,k){P===0&&_===void 0?S=I:S=y(S,I,P,M,R,k)}),S}function c(m,y){u(m,function(_,S,I,P,M){var R=_===null?null:_.type;switch(R){case null:case"Point":case"LineString":case"Polygon":return y(n.feature(_,I,{bbox:P,id:M}),S,0)===!1?!1:void 0}var k;switch(R){case"MultiPoint":k="Point";break;case"MultiLineString":k="LineString";break;case"MultiPolygon":k="Polygon";break}for(var x=0;x<_.coordinates.length;x++){var A=_.coordinates[x],L={type:k,coordinates:A};if(y(n.feature(L,I),S,x)===!1)return!1}})}function h(m,y,_){var S=_;return c(m,function(I,P,M){P===0&&M===0&&_===void 0?S=I:S=y(S,I,P,M)}),S}function d(m,y){c(m,function(_,S,I){var P=0;if(_.geometry){var M=_.geometry.type;if(!(M==="Point"||M==="MultiPoint")){var R,k=0,x=0,A=0;if(t(_,function(L,F,J,et,dt){if(R===void 0||S>k||et>x||dt>A){R=L,k=S,x=et,A=dt,P=0;return}var Lt=n.lineString([R,L],_.properties);if(y(Lt,S,I,dt,P)===!1)return!1;P++,R=L})===!1)return!1}}})}function g(m,y,_){var S=_,I=!1;return d(m,function(P,M,R,k,x){I===!1&&_===void 0?S=P:S=y(S,P,M,R,k,x),I=!0}),S}function v(m,y){if(!m)throw new Error("geojson is required");c(m,function(_,S,I){if(_.geometry!==null){var P=_.geometry.type,M=_.geometry.coordinates;switch(P){case"LineString":if(y(_,S,I,0,0)===!1)return!1;break;case"Polygon":for(var R=0;R<M.length;R++)if(y(n.lineString(M[R],_.properties),S,I,R)===!1)return!1;break}}})}function E(m,y,_){var S=_;return v(m,function(I,P,M,R){P===0&&_===void 0?S=I:S=y(S,I,P,M,R)}),S}function C(m,y){if(y=y||{},!n.isObject(y))throw new Error("options is invalid");var _=y.featureIndex||0,S=y.multiFeatureIndex||0,I=y.geometryIndex||0,P=y.segmentIndex||0,M=y.properties,R;switch(m.type){case"FeatureCollection":_<0&&(_=m.features.length+_),M=M||m.features[_].properties,R=m.features[_].geometry;break;case"Feature":M=M||m.properties,R=m.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":R=m;break;default:throw new Error("geojson is invalid")}if(R===null)return null;var k=R.coordinates;switch(R.type){case"Point":case"MultiPoint":return null;case"LineString":return P<0&&(P=k.length+P-1),n.lineString([k[P],k[P+1]],M,y);case"Polygon":return I<0&&(I=k.length+I),P<0&&(P=k[I].length+P-1),n.lineString([k[I][P],k[I][P+1]],M,y);case"MultiLineString":return S<0&&(S=k.length+S),P<0&&(P=k[S].length+P-1),n.lineString([k[S][P],k[S][P+1]],M,y);case"MultiPolygon":return S<0&&(S=k.length+S),I<0&&(I=k[S].length+I),P<0&&(P=k[S][I].length-P-1),n.lineString([k[S][I][P],k[S][I][P+1]],M,y)}throw new Error("geojson is invalid")}function b(m,y){if(y=y||{},!n.isObject(y))throw new Error("options is invalid");var _=y.featureIndex||0,S=y.multiFeatureIndex||0,I=y.geometryIndex||0,P=y.coordIndex||0,M=y.properties,R;switch(m.type){case"FeatureCollection":_<0&&(_=m.features.length+_),M=M||m.features[_].properties,R=m.features[_].geometry;break;case"Feature":M=M||m.properties,R=m.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":R=m;break;default:throw new Error("geojson is invalid")}if(R===null)return null;var k=R.coordinates;switch(R.type){case"Point":return n.point(k,M,y);case"MultiPoint":return S<0&&(S=k.length+S),n.point(k[S],M,y);case"LineString":return P<0&&(P=k.length+P),n.point(k[P],M,y);case"Polygon":return I<0&&(I=k.length+I),P<0&&(P=k[I].length+P),n.point(k[I][P],M,y);case"MultiLineString":return S<0&&(S=k.length+S),P<0&&(P=k[S].length+P),n.point(k[S][P],M,y);case"MultiPolygon":return S<0&&(S=k.length+S),I<0&&(I=k[S].length+I),P<0&&(P=k[S][I].length-P),n.point(k[S][I][P],M,y)}throw new Error("geojson is invalid")}return re.coordAll=a,re.coordEach=t,re.coordReduce=e,re.featureEach=s,re.featureReduce=o,re.findPoint=b,re.findSegment=C,re.flattenEach=c,re.flattenReduce=h,re.geomEach=u,re.geomReduce=l,re.lineEach=v,re.lineReduce=E,re.propEach=r,re.propReduce=i,re.segmentEach=d,re.segmentReduce=g,re}var Cu={},ld;function Fv(){if(ld)return Cu;ld=1,Object.defineProperty(Cu,"__esModule",{value:!0});var n=ud();function t(e){var r=[1/0,1/0,-1/0,-1/0];return n.coordEach(e,function(i){r[0]>i[0]&&(r[0]=i[0]),r[1]>i[1]&&(r[1]=i[1]),r[2]<i[0]&&(r[2]=i[0]),r[3]<i[1]&&(r[3]=i[1])}),r}return t.default=t,Cu.default=t,Cu}var cd;function kv(){if(cd)return Eu.exports;cd=1;var n=Rv(),t=od(),e=ud(),r=Fv().default,i=e.featureEach;e.coordEach,t.polygon;var s=t.featureCollection;function o(a){var u=new n(a);return u.insert=function(l){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:r(l),n.prototype.insert.call(this,l)},u.load=function(l){var c=[];return Array.isArray(l)?l.forEach(function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:r(h),c.push(h)}):i(l,function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:r(h),c.push(h)}),n.prototype.load.call(this,c)},u.remove=function(l,c){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:r(l),n.prototype.remove.call(this,l,c)},u.clear=function(){return n.prototype.clear.call(this)},u.search=function(l){var c=n.prototype.search.call(this,this.toBBox(l));return s(c)},u.collides=function(l){return n.prototype.collides.call(this,this.toBBox(l))},u.all=function(){var l=n.prototype.all.call(this);return s(l)},u.toJSON=function(){return n.prototype.toJSON.call(this)},u.fromJSON=function(l){return n.prototype.fromJSON.call(this,l)},u.toBBox=function(l){var c;if(l.bbox)c=l.bbox;else if(Array.isArray(l)&&l.length===4)c=l;else if(Array.isArray(l)&&l.length===6)c=[l[0],l[1],l[3],l[4]];else if(l.type==="Feature")c=r(l);else if(l.type==="FeatureCollection")c=r(l);else throw new Error("invalid geojson");return{minX:c[0],minY:c[1],maxX:c[2],maxY:c[3]}},u}return Eu.exports=o,Eu.exports.default=o,Eu.exports}var Vv=kv();const zv=qf(Vv);function hd(n,t){var e={},r=[];if(n.type==="LineString"&&(n=sn(n)),t.type==="LineString"&&(t=sn(t)),n.type==="Feature"&&t.type==="Feature"&&n.geometry!==null&&t.geometry!==null&&n.geometry.type==="LineString"&&t.geometry.type==="LineString"&&n.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=fd(n,t);return i&&r.push(i),js(r)}var s=zv();return s.load(nd(t)),gu(nd(n),function(o){gu(s.search(o),function(a){var u=fd(o,a);if(u){var l=os(u).join(",");e[l]||(e[l]=!0,r.push(u))}})}),js(r)}function fd(n,t){var e=os(n),r=os(t);if(e.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(r.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=e[0][0],s=e[0][1],o=e[1][0],a=e[1][1],u=r[0][0],l=r[0][1],c=r[1][0],h=r[1][1],d=(h-l)*(o-i)-(c-u)*(a-s),g=(c-u)*(s-l)-(h-l)*(i-u),v=(o-i)*(s-l)-(a-s)*(i-u);if(d===0)return null;var E=g/d,C=v/d;if(E>=0&&E<=1&&C>=0&&C<=1){var b=i+E*(o-i),m=s+E*(a-s);return Ot([b,m])}return null}function Uv(n,t){return hd(on(n),on(t))}function Gv(n,t){var e=ri(n,t),r=ya(n,t),i=Zs(n,e/2,r);return i}function Wv(n,t){const e=Ot(n),r=Ot(t),i=Gv(e,r),s=(n[2]+t[2])/2;return[...i.geometry.coordinates,s]}function qv(n,t,e){e===void 0&&(e={});var r=Ot([1/0,1/0],{dist:1/0}),i=0;return Vl(n,function(s){for(var o=os(s),a=0;a<o.length-1;a++){var u=Ot(o[a]);u.properties.dist=ri(t,u,e);var l=Ot(o[a+1]);l.properties.dist=ri(t,l,e);var c=ri(u,l,e),h=Math.max(u.properties.dist,l.properties.dist),d=ya(u,l),g=Zs(t,h,d+90,e),v=Zs(t,h,d-90,e),E=hd(on([g.geometry.coordinates,v.geometry.coordinates]),on([u.geometry.coordinates,l.geometry.coordinates])),C=null;E.features.length>0&&(C=E.features[0],C.properties.dist=ri(t,C,e),C.properties.location=i+ri(u,C,e)),u.properties.dist<r.properties.dist&&(r=u,r.properties.index=a,r.properties.location=i),l.properties.dist<r.properties.dist&&(r=l,r.properties.index=a+1,r.properties.location=i+c),C&&C.properties.dist<r.properties.dist&&(r=C,r.properties.index=a),i+=c}}),r}function Xv(n,t){const e=Ot(t),r=on(n);return qv(r,e,{units:"meters"})}function dd(n,t,e){e===void 0&&(e={});var r=je(n),i=je(t);i[0]+=i[0]-r[0]>180?-360:r[0]-i[0]>180?360:0;var s=Yv(r,i),o=kl(s,"meters",e.units);return o}function Yv(n,t,e){e=e===void 0?Ne:Number(e);var r=e,i=n[1]*Math.PI/180,s=t[1]*Math.PI/180,o=s-i,a=Math.abs(t[0]-n[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var u=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),l=Math.abs(u)>1e-11?o/u:Math.cos(i),c=Math.sqrt(o*o+l*l*a*a),h=c*r;return h}function Hv(n,t,e){if(e===void 0&&(e={}),e.method||(e.method="geodesic"),e.units||(e.units="kilometers"),!n)throw new Error("pt is required");if(Array.isArray(n)?n=Ot(n):n.type==="Point"?n=sn(n):Ff(n,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=on(t):t.type==="LineString"?t=sn(t):Ff(t,"LineString","line");var r=1/0,i=n.geometry.coordinates;return tv(t,function(s){var o=s.geometry.coordinates[0],a=s.geometry.coordinates[1],u=Bv(i,o,a,e);u<r&&(r=u)}),kl(r,"degrees",e.units)}function Bv(n,t,e,r){var i=[e[0]-t[0],e[1]-t[1]],s=[n[0]-t[0],n[1]-t[1]],o=pd(s,i);if(o<=0)return Zl(n,t,{method:r.method,units:"degrees"});var a=pd(i,i);if(a<=o)return Zl(n,e,{method:r.method,units:"degrees"});var u=o/a,l=[t[0]+u*i[0],t[1]+u*i[1]];return Zl(n,l,{method:r.method,units:"degrees"})}function pd(n,t){return n[0]*t[0]+n[1]*t[1]}function Zl(n,t,e){return e.method==="planar"?dd(n,t,e):ri(n,t,e)}function Jv(n,t){const e=Ot(n),r=on(t);return Hv(e,r,{units:"meters"})}function jv(n,t,e,r){r===void 0&&(r={});var i=t<0,s=kl(Math.abs(t),r.units,"meters");i&&(s=-Math.abs(s));var o=je(n),a=Zv(o,s,e);return a[0]+=a[0]-o[0]>180?-360:o[0]-a[0]>180?360:0,Ot(a,r.properties)}function Zv(n,t,e,r){r=r===void 0?Ne:Number(r);var i=t/r,s=n[0]*Math.PI/180,o=Fe(n[1]),a=Fe(e),u=i*Math.cos(a),l=o+u;Math.abs(l)>Math.PI/2&&(l=l>0?Math.PI-l:-Math.PI-l);var c=Math.log(Math.tan(l/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),h=Math.abs(c)>1e-11?u/c:Math.cos(o),d=i*Math.sin(a)/h,g=s+d;return[(g*180/Math.PI+540)%360-180,l*180/Math.PI]}function Kv(n,t,e,r){const[i,s,o]=n,a=jv(Ot([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function gd(n,t){return dd(Ot(n),Ot(t),{units:"meters"})}function Qv(n,t,e){e===void 0&&(e={});var r;e.final?r=md(je(t),je(n)):r=md(je(n),je(t));var i=r>180?-(360-r):r;return i}function md(n,t){var e=Fe(n[1]),r=Fe(t[1]),i=Fe(t[0]-n[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var s=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(e/2+Math.PI/4)),o=Math.atan2(i,s);return(pu(o)+360)%360}function $v(n,t){return Qv(Ot(n),Ot(t))}function an(n){var t=[1/0,1/0,-1/0,-1/0];return Ks(n,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}an.default=an;function un(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("point is required");if(!t)throw new Error("polygon is required");var r=je(n),i=gr(t),s=i.type,o=t.bbox,a=i.coordinates;if(o&&ty(r,o)===!1)return!1;s==="Polygon"&&(a=[a]);for(var u=!1,l=0;l<a.length&&!u;l++)if(vd(r,a[l][0],e.ignoreBoundary)){for(var c=!1,h=1;h<a[l].length&&!c;)vd(r,a[l][h],!e.ignoreBoundary)&&(c=!0),h++;c||(u=!0)}return u}function vd(n,t,e){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,s=t.length-1;i<t.length;s=i++){var o=t[i][0],a=t[i][1],u=t[s][0],l=t[s][1],c=n[1]*(o-u)+a*(u-n[0])+l*(n[0]-o)===0&&(o-n[0])*(u-n[0])<=0&&(a-n[1])*(l-n[1])<=0;if(c)return!e;var h=a>n[1]!=l>n[1]&&n[0]<(u-o)*(n[1]-a)/(l-a)+o;h&&(r=!r)}return r}function ty(n,t){return t[0]<=n[0]&&t[1]<=n[1]&&t[2]>=n[0]&&t[3]>=n[1]}function ii(n,t,e){e===void 0&&(e={});for(var r=je(n),i=os(t),s=0;s<i.length-1;s++){var o=!1;if(e.ignoreEndVertices&&(s===0&&(o="start"),s===i.length-2&&(o="end"),s===0&&s+1===i.length-1&&(o="both")),ey(i[s],i[s+1],r,o,typeof e.epsilon>"u"?null:e.epsilon))return!0}return!1}function ey(n,t,e,r,i){var s=e[0],o=e[1],a=n[0],u=n[1],l=t[0],c=t[1],h=e[0]-a,d=e[1]-u,g=l-a,v=c-u,E=h*v-d*g;if(i!==null){if(Math.abs(E)>i)return!1}else if(E!==0)return!1;if(r){if(r==="start")return Math.abs(g)>=Math.abs(v)?g>0?a<s&&s<=l:l<=s&&s<a:v>0?u<o&&o<=c:c<=o&&o<u;if(r==="end")return Math.abs(g)>=Math.abs(v)?g>0?a<=s&&s<l:l<s&&s<=a:v>0?u<=o&&o<c:c<o&&o<=u;if(r==="both")return Math.abs(g)>=Math.abs(v)?g>0?a<s&&s<l:l<s&&s<a:v>0?u<o&&o<c:c<o&&o<u}else return Math.abs(g)>=Math.abs(v)?g>0?a<=s&&s<=l:l<=s&&s<=a:v>0?u<=o&&o<=c:c<=o&&o<=u;return!1}function ry(n,t){var e=gr(n),r=gr(t),i=e.type,s=r.type,o=e.coordinates,a=r.coordinates;switch(i){case"Point":switch(s){case"Point":return Kl(o,a);default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"Point":return ny(e,r);case"MultiPoint":return iy(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"Point":return ii(r,e,{ignoreEndVertices:!0});case"LineString":return ay(e,r);case"MultiPoint":return sy(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Point":return un(r,e,{ignoreBoundary:!0});case"LineString":return uy(e,r);case"Polygon":return ly(e,r);case"MultiPoint":return oy(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function ny(n,t){var e,r=!1;for(e=0;e<n.coordinates.length;e++)if(Kl(n.coordinates[e],t.coordinates)){r=!0;break}return r}function iy(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){for(var i=r[e],s=!1,o=0,a=n.coordinates;o<a.length;o++){var u=a[o];if(Kl(i,u)){s=!0;break}}if(!s)return!1}return!0}function sy(n,t){for(var e=!1,r=0,i=t.coordinates;r<i.length;r++){var s=i[r];if(ii(s,n,{ignoreEndVertices:!0})&&(e=!0),!ii(s,n))return!1}return!!e}function oy(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){var i=r[e];if(!un(i,n,{ignoreBoundary:!0}))return!1}return!0}function ay(n,t){for(var e=!1,r=0,i=t.coordinates;r<i.length;r++){var s=i[r];if(ii({type:"Point",coordinates:s},n,{ignoreEndVertices:!0})&&(e=!0),!ii({type:"Point",coordinates:s},n,{ignoreEndVertices:!1}))return!1}return e}function uy(n,t){var e=!1,r=0,i=an(n),s=an(t);if(!yd(i,s))return!1;for(r;r<t.coordinates.length-1;r++){var o=cy(t.coordinates[r],t.coordinates[r+1]);if(un({type:"Point",coordinates:o},n,{ignoreBoundary:!0})){e=!0;break}}return e}function ly(n,t){if(n.type==="Feature"&&n.geometry===null||t.type==="Feature"&&t.geometry===null)return!1;var e=an(n),r=an(t);if(!yd(e,r))return!1;for(var i=gr(t).coordinates,s=0,o=i;s<o.length;s++)for(var a=o[s],u=0,l=a;u<l.length;u++){var c=l[u];if(!un(c,n))return!1}return!0}function yd(n,t){return!(n[0]>t[0]||n[2]<t[2]||n[1]>t[1]||n[3]<t[3])}function Kl(n,t){return n[0]===t[0]&&n[1]===t[1]}function cy(n,t){return[(n[0]+t[0])/2,(n[1]+t[1])/2]}function hy(n,t){var e=gr(n),r=gr(t),i=e.type,s=r.type;switch(i){case"Point":switch(s){case"MultiPoint":return fy(e,r);case"LineString":return ii(e,r,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return un(e,r,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return dy(e,r);case"LineString":return py(e,r);case"Polygon":case"MultiPolygon":return gy(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return my(e,r);case"Polygon":case"MultiPolygon":return vy(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return yy(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function fy(n,t){var e,r=!1;for(e=0;e<t.coordinates.length;e++)if(wd(t.coordinates[e],n.coordinates)){r=!0;break}return r}function dy(n,t){for(var e=0;e<n.coordinates.length;e++){for(var r=!1,i=0;i<t.coordinates.length;i++)wd(n.coordinates[e],t.coordinates[i])&&(r=!0);if(!r)return!1}return!0}function py(n,t){for(var e=!1,r=0;r<n.coordinates.length;r++){if(!ii(n.coordinates[r],t))return!1;e||(e=ii(n.coordinates[r],t,{ignoreEndVertices:!0}))}return e}function gy(n,t){for(var e=!0,r=!1,i=0;i<n.coordinates.length;i++){if(r=un(n.coordinates[1],t),!r){e=!1;break}r=un(n.coordinates[1],t,{ignoreBoundary:!0})}return e&&r}function my(n,t){for(var e=0;e<n.coordinates.length;e++)if(!ii(n.coordinates[e],t))return!1;return!0}function vy(n,t){var e=an(t),r=an(n);if(!_d(e,r))return!1;for(var i=!1,s=0;s<n.coordinates.length-1;s++){if(!un(n.coordinates[s],t))return!1;if(i||(i=un(n.coordinates[s],t,{ignoreBoundary:!0})),!i){var o=_y(n.coordinates[s],n.coordinates[s+1]);i=un(o,t,{ignoreBoundary:!0})}}return i}function yy(n,t){var e=an(n),r=an(t);if(!_d(r,e))return!1;for(var i=0;i<n.coordinates[0].length;i++)if(!un(n.coordinates[0][i],t))return!1;return!0}function _d(n,t){return!(n[0]>t[0]||n[2]<t[2]||n[1]>t[1]||n[3]<t[3])}function wd(n,t){return n[0]===t[0]&&n[1]===t[1]}function _y(n,t){return[(n[0]+t[0])/2,(n[1]+t[1])/2]}function wy(n,t){t===void 0&&(t={});var e=an(n),r=(e[0]+e[2])/2,i=(e[1]+e[3])/2;return Ot([r,i],t.properties,t)}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var e=Object(this),r=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(r+i,0):Math.min(i,r);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:r;for(s=s<0?Math.max(r+arguments[2],0):Math.min(s,r);i<s;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(n){return typeof n=="number"&&isFinite(n)},Number.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(n){return n!==n},Math.trunc=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};var as=function(){};as.prototype.interfaces_=function(){return[]},as.prototype.getClass=function(){return as},as.prototype.equalsWithTolerance=function(t,e,r){return Math.abs(t-e)<=r};var xt=(function(n){function t(e){n.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=new n().stack}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t})(Error),rt=function(){},Ed={MAX_VALUE:{configurable:!0}};rt.isNaN=function(t){return Number.isNaN(t)},rt.doubleToLongBits=function(t){return t},rt.longBitsToDouble=function(t){return t},rt.isInfinite=function(t){return!Number.isFinite(t)},Ed.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(rt,Ed);var sr=function(){},Iu=function(){},ro=function(){};function or(){}var N=function n(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=n.NULL_ORDINATE;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=n.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},us={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};N.prototype.setOrdinate=function(t,e){switch(t){case N.X:this.x=e;break;case N.Y:this.y=e;break;case N.Z:this.z=e;break;default:throw new xt("Invalid ordinate index: "+t)}},N.prototype.equals2D=function(){if(arguments.length===1){var t=arguments[0];return!(this.x!==t.x||this.y!==t.y)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return!(!as.equalsWithTolerance(this.x,e.x,r)||!as.equalsWithTolerance(this.y,e.y,r))}},N.prototype.getOrdinate=function(t){switch(t){case N.X:return this.x;case N.Y:return this.y;case N.Z:return this.z}throw new xt("Invalid ordinate index: "+t)},N.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||rt.isNaN(this.z))&&rt.isNaN(t.z)},N.prototype.equals=function(t){return t instanceof N?this.equals2D(t):!1},N.prototype.equalInZ=function(t,e){return as.equalsWithTolerance(this.z,t.z,e)},N.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},N.prototype.clone=function(){},N.prototype.copy=function(){return new N(this)},N.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},N.prototype.distance3D=function(t){var e=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+r*r+i*i)},N.prototype.distance=function(t){var e=this.x-t.x,r=this.y-t.y;return Math.sqrt(e*e+r*r)},N.prototype.hashCode=function(){var t=17;return t=37*t+N.hashCode(this.x),t=37*t+N.hashCode(this.y),t},N.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},N.prototype.interfaces_=function(){return[sr,Iu,or]},N.prototype.getClass=function(){return N},N.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=rt.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},us.DimensionalComparator.get=function(){return si},us.serialVersionUID.get=function(){return 6683108902428367e3},us.NULL_ORDINATE.get=function(){return rt.NaN},us.X.get=function(){return 0},us.Y.get=function(){return 1},us.Z.get=function(){return 2},Object.defineProperties(N,us);var si=function(t){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new xt("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}};si.prototype.compare=function(t,e){var r=t,i=e,s=si.compare(r.x,i.x);if(s!==0)return s;var o=si.compare(r.y,i.y);if(o!==0)return o;if(this._dimensionsToTest<=2)return 0;var a=si.compare(r.z,i.z);return a},si.prototype.interfaces_=function(){return[ro]},si.prototype.getClass=function(){return si},si.compare=function(t,e){return t<e?-1:t>e?1:rt.isNaN(t)?rt.isNaN(e)?0:-1:rt.isNaN(e)?1:0};var no=function(){};no.prototype.create=function(){},no.prototype.interfaces_=function(){return[]},no.prototype.getClass=function(){return no};var O=function(){},Pa={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};O.prototype.interfaces_=function(){return[]},O.prototype.getClass=function(){return O},O.toLocationSymbol=function(t){switch(t){case O.EXTERIOR:return"e";case O.BOUNDARY:return"b";case O.INTERIOR:return"i";case O.NONE:return"-"}throw new xt("Unknown location value: "+t)},Pa.INTERIOR.get=function(){return 0},Pa.BOUNDARY.get=function(){return 1},Pa.EXTERIOR.get=function(){return 2},Pa.NONE.get=function(){return-1},Object.defineProperties(O,Pa);var Q=function(n,t){return n.interfaces_&&n.interfaces_().indexOf(t)>-1},Ke=function(){},Sd={LOG_10:{configurable:!0}};Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke},Ke.log10=function(t){var e=Math.log(t);return rt.isInfinite(e)||rt.isNaN(e)?e:e/Ke.LOG_10},Ke.min=function(t,e,r,i){var s=t;return e<s&&(s=e),r<s&&(s=r),i<s&&(s=i),s},Ke.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1],r=arguments[2];return t<e?e:t>r?r:t}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}},Ke.wrap=function(t,e){return t<0?e- -t%e:t%e},Ke.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],r=arguments[2],i=t;return e>i&&(i=e),r>i&&(i=r),i}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],l=s;return o>l&&(l=o),a>l&&(l=a),u>l&&(l=u),l}},Ke.average=function(t,e){return(t+e)/2},Sd.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(Ke,Sd);var xr=function(t){this.str=t};xr.prototype.append=function(t){this.str+=t},xr.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},xr.prototype.toString=function(t){return this.str};var Or=function(t){this.value=t};Or.prototype.intValue=function(){return this.value},Or.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},Or.isNaN=function(t){return Number.isNaN(t)};var ba=function(){};ba.isWhitespace=function(t){return t<=32&&t>=0||t===127},ba.toUpperCase=function(t){return t.toUpperCase()};var D=function n(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof n){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var r=arguments[0];n.call(this,n.parse(r))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},mr={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}};D.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},D.prototype.extractSignificantDigits=function(t,e){var r=this.abs(),i=D.magnitude(r._hi),s=D.TEN.pow(i);r=r.divide(s),r.gt(D.TEN)?(r=r.divide(D.TEN),i+=1):r.lt(D.ONE)&&(r=r.multiply(D.TEN),i-=1);for(var o=i+1,a=new xr,u=D.MAX_PRINT_DIGITS-1,l=0;l<=u;l++){t&&l===o&&a.append(".");var c=Math.trunc(r._hi);if(c<0)break;var h=!1,d=0;c>9?(h=!0,d="9"):d="0"+c,a.append(d),r=r.subtract(D.valueOf(c)).multiply(D.TEN),h&&r.selfAdd(D.TEN);var g=!0,v=D.magnitude(r._hi);if(v<0&&Math.abs(v)>=u-l&&(g=!1),!g)break}return e[0]=i,a.toString()},D.prototype.sqr=function(){return this.multiply(this)},D.prototype.doubleValue=function(){return this._hi+this._lo},D.prototype.subtract=function(){if(arguments[0]instanceof D){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},D.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},D.prototype.isZero=function(){return this._hi===0&&this._lo===0},D.prototype.selfSubtract=function(){if(arguments[0]instanceof D){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},D.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},D.prototype.min=function(t){return this.le(t)?this:t},D.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,l=null,c=null,h=null,d=null;return l=this._hi/r,c=D.SPLIT*l,s=c-l,d=D.SPLIT*r,s=c-s,o=l-s,a=d-r,h=l*r,a=d-a,u=r-a,d=s*a-h+s*u+o*a+o*u,c=(this._hi-h-d+this._lo-l*i)/r,d=l+c,this._hi=d,this._lo=l-d+c,this}},D.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},D.prototype.divide=function(){if(arguments[0]instanceof D){var t=arguments[0],e=null,r=null,i=null,s=null,o=null,a=null,u=null,l=null;o=this._hi/t._hi,a=D.SPLIT*o,e=a-o,l=D.SPLIT*t._hi,e=a-e,r=o-e,i=l-t._hi,u=o*t._hi,i=l-i,s=t._hi-i,l=e*i-u+e*s+r*i+r*s,a=(this._hi-u-l+this._lo-o*t._lo)/t._hi,l=o+a;var c=l,h=o-l+a;return new D(c,h)}else if(typeof arguments[0]=="number"){var d=arguments[0];return rt.isNaN(d)?D.createNaN():D.copy(this).selfDivide(d,0)}},D.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},D.prototype.pow=function(t){if(t===0)return D.valueOf(1);var e=new D(this),r=D.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2===1&&r.selfMultiply(e),i/=2,i>0&&(e=e.sqr());else r=e;return t<0?r.reciprocal():r},D.prototype.ceil=function(){if(this.isNaN())return D.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new D(t,e)},D.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},D.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},D.prototype.setValue=function(){if(arguments[0]instanceof D){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},D.prototype.max=function(t){return this.ge(t)?this:t},D.prototype.sqrt=function(){if(this.isZero())return D.valueOf(0);if(this.isNegative())return D.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,r=D.valueOf(e),i=this.subtract(r.sqr()),s=i._hi*(t*.5);return r.add(s)},D.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],r=null,i=null,s=null,o=null,a=null,u=null;return s=this._hi+e,a=s-this._hi,o=s-a,o=e-a+(this._hi-o),u=o+this._lo,r=s+u,i=u+(s-r),this._hi=r+i,this._lo=i+(r-this._hi),this}}else if(arguments.length===2){var l=arguments[0],c=arguments[1],h=null,d=null,g=null,v=null,E=null,C=null,b=null,m=null;E=this._hi+l,g=this._lo+c,b=E-this._hi,m=g-this._lo,C=E-b,v=g-m,C=l-b+(this._hi-C),v=c-m+(this._lo-v),b=C+g,h=E+b,d=b+(E-h),b=v+d;var y=h+b,_=b+(h-y);return this._hi=y,this._lo=_,this}},D.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,l=null,c=null;l=D.SPLIT*this._hi,s=l-this._hi,c=D.SPLIT*r,s=l-s,o=this._hi-s,a=c-r,l=this._hi*r,a=c-a,u=r-a,c=s*a-l+s*u+o*a+o*u+(this._hi*i+this._lo*r);var h=l+c;s=l-h;var d=c+s;return this._hi=h,this._lo=d,this}},D.prototype.selfSqr=function(){return this.selfMultiply(this)},D.prototype.floor=function(){if(this.isNaN())return D.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new D(t,e)},D.prototype.negate=function(){return this.isNaN()?this:new D(-this._hi,-this._lo)},D.prototype.clone=function(){},D.prototype.multiply=function(){if(arguments[0]instanceof D){var t=arguments[0];return t.isNaN()?D.createNaN():D.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return rt.isNaN(e)?D.createNaN():D.copy(this).selfMultiply(e,0)}},D.prototype.isNaN=function(){return rt.isNaN(this._hi)},D.prototype.intValue=function(){return Math.trunc(this._hi)},D.prototype.toString=function(){var t=D.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},D.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),r=this.extractSignificantDigits(!0,e),i=e[0]+1,s=r;if(r.charAt(0)===".")s="0"+r;else if(i<0)s="0."+D.stringOfChar("0",-i)+r;else if(r.indexOf(".")===-1){var o=i-r.length,a=D.stringOfChar("0",o);s=r+a+".0"}return this.isNegative()?"-"+s:s},D.prototype.reciprocal=function(){var t=null,e=null,r=null,i=null,s=null,o=null,a=null,u=null;s=1/this._hi,o=D.SPLIT*s,t=o-s,u=D.SPLIT*this._hi,t=o-t,e=s-t,r=u-this._hi,a=s*this._hi,r=u-r,i=this._hi-r,u=t*r-a+t*i+e*r+e*i,o=(1-a-u-s*this._lo)/this._hi;var l=s+o,c=s-l+o;return new D(l,c)},D.prototype.toSciNotation=function(){if(this.isZero())return D.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),r=this.extractSignificantDigits(!1,e),i=D.SCI_NOT_EXPONENT_CHAR+e[0];if(r.charAt(0)==="0")throw new Error("Found leading zero: "+r);var s="";r.length>1&&(s=r.substring(1));var o=r.charAt(0)+"."+s;return this.isNegative()?"-"+o+i:o+i},D.prototype.abs=function(){return this.isNaN()?D.NaN:this.isNegative()?this.negate():new D(this)},D.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},D.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},D.prototype.add=function(){if(arguments[0]instanceof D){var t=arguments[0];return D.copy(this).selfAdd(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return D.copy(this).selfAdd(e)}},D.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof D){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._hi=r,this._lo=i}},D.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},D.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},D.prototype.trunc=function(){return this.isNaN()?D.NaN:this.isPositive()?this.floor():this.ceil()},D.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},D.prototype.interfaces_=function(){return[or,sr,Iu]},D.prototype.getClass=function(){return D},D.sqr=function(t){return D.valueOf(t).selfMultiply(t)},D.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return D.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new D(e)}},D.sqrt=function(t){return D.valueOf(t).sqrt()},D.parse=function(t){for(var e=0,r=t.length;ba.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<r){var s=t.charAt(e);(s==="-"||s==="+")&&(e++,s==="-"&&(i=!0))}for(var o=new D,a=0,u=0,l=0;!(e>=r);){var c=t.charAt(e);if(e++,ba.isDigit(c)){var h=c-"0";o.selfMultiply(D.TEN),o.selfAdd(h),a++;continue}if(c==="."){u=a;continue}if(c==="e"||c==="E"){var d=t.substring(e);try{l=Or.parseInt(d)}catch(b){throw b instanceof Error?new Error("Invalid exponent "+d+" in string "+t):b}finally{}break}throw new Error("Unexpected character '"+c+"' at position "+e+" in string "+t)}var g=o,v=a-u-l;if(v===0)g=o;else if(v>0){var E=D.TEN.pow(v);g=o.divide(E)}else if(v<0){var C=D.TEN.pow(-v);g=o.multiply(C)}return i?g.negate():g},D.createNaN=function(){return new D(rt.NaN,rt.NaN)},D.copy=function(t){return new D(t)},D.magnitude=function(t){var e=Math.abs(t),r=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(r)),s=Math.pow(10,i);return s*10<=e&&(i+=1),i},D.stringOfChar=function(t,e){for(var r=new xr,i=0;i<e;i++)r.append(t);return r.toString()},mr.PI.get=function(){return new D(3.141592653589793,12246467991473532e-32)},mr.TWO_PI.get=function(){return new D(6.283185307179586,24492935982947064e-32)},mr.PI_2.get=function(){return new D(1.5707963267948966,6123233995736766e-32)},mr.E.get=function(){return new D(2.718281828459045,14456468917292502e-32)},mr.NaN.get=function(){return new D(rt.NaN,rt.NaN)},mr.EPS.get=function(){return 123259516440783e-46},mr.SPLIT.get=function(){return 134217729},mr.MAX_PRINT_DIGITS.get=function(){return 32},mr.TEN.get=function(){return D.valueOf(10)},mr.ONE.get=function(){return D.valueOf(1)},mr.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},mr.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(D,mr);var Te=function(){},Cd={DP_SAFE_EPSILON:{configurable:!0}};Te.prototype.interfaces_=function(){return[]},Te.prototype.getClass=function(){return Te},Te.orientationIndex=function(t,e,r){var i=Te.orientationIndexFilter(t,e,r);if(i<=1)return i;var s=D.valueOf(e.x).selfAdd(-t.x),o=D.valueOf(e.y).selfAdd(-t.y),a=D.valueOf(r.x).selfAdd(-e.x),u=D.valueOf(r.y).selfAdd(-e.y);return s.selfMultiply(u).selfSubtract(o.selfMultiply(a)).signum()},Te.signOfDet2x2=function(t,e,r,i){var s=t.multiply(i).selfSubtract(e.multiply(r));return s.signum()},Te.intersection=function(t,e,r,i){var s=D.valueOf(i.y).selfSubtract(r.y).selfMultiply(D.valueOf(e.x).selfSubtract(t.x)),o=D.valueOf(i.x).selfSubtract(r.x).selfMultiply(D.valueOf(e.y).selfSubtract(t.y)),a=s.subtract(o),u=D.valueOf(i.x).selfSubtract(r.x).selfMultiply(D.valueOf(t.y).selfSubtract(r.y)),l=D.valueOf(i.y).selfSubtract(r.y).selfMultiply(D.valueOf(t.x).selfSubtract(r.x)),c=u.subtract(l),h=c.selfDivide(a).doubleValue(),d=D.valueOf(t.x).selfAdd(D.valueOf(e.x).selfSubtract(t.x).selfMultiply(h)).doubleValue(),g=D.valueOf(e.x).selfSubtract(t.x).selfMultiply(D.valueOf(t.y).selfSubtract(r.y)),v=D.valueOf(e.y).selfSubtract(t.y).selfMultiply(D.valueOf(t.x).selfSubtract(r.x)),E=g.subtract(v),C=E.selfDivide(a).doubleValue(),b=D.valueOf(r.y).selfAdd(D.valueOf(i.y).selfSubtract(r.y).selfMultiply(C)).doubleValue();return new N(d,b)},Te.orientationIndexFilter=function(t,e,r){var i=null,s=(t.x-r.x)*(e.y-r.y),o=(t.y-r.y)*(e.x-r.x),a=s-o;if(s>0){if(o<=0)return Te.signum(a);i=s+o}else if(s<0){if(o>=0)return Te.signum(a);i=-s-o}else return Te.signum(a);var u=Te.DP_SAFE_EPSILON*i;return a>=u||-a>=u?Te.signum(a):2},Te.signum=function(t){return t>0?1:t<0?-1:0},Cd.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(Te,Cd);var ft=function(){},Na={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Na.X.get=function(){return 0},Na.Y.get=function(){return 1},Na.Z.get=function(){return 2},Na.M.get=function(){return 3},ft.prototype.setOrdinate=function(t,e,r){},ft.prototype.size=function(){},ft.prototype.getOrdinate=function(t,e){},ft.prototype.getCoordinate=function(){},ft.prototype.getCoordinateCopy=function(t){},ft.prototype.getDimension=function(){},ft.prototype.getX=function(t){},ft.prototype.clone=function(){},ft.prototype.expandEnvelope=function(t){},ft.prototype.copy=function(){},ft.prototype.getY=function(t){},ft.prototype.toCoordinateArray=function(){},ft.prototype.interfaces_=function(){return[Iu]},ft.prototype.getClass=function(){return ft},Object.defineProperties(ft,Na);var Id=function(){},io=(function(n){function t(){n.call(this,"Projective point not representable on the Cartesian plane.")}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(Id),ne=function(){};ne.arraycopy=function(t,e,r,i,s){for(var o=0,a=e;a<e+s;a++)r[i+o]=t[a],o++},ne.getProperty=function(t){return{"line.separator":`
|
|
42
|
-
`}[t]};var vr=function n(){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 t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],r=arguments[1];this.x=e,this.y=r,this.w=1}else if(arguments[0]instanceof n&&arguments[1]instanceof n){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 N&&arguments[1]instanceof N){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 u=arguments[0],l=arguments[1],c=arguments[2];this.x=u,this.y=l,this.w=c}else if(arguments.length===4){var h=arguments[0],d=arguments[1],g=arguments[2],v=arguments[3],E=h.y-d.y,C=d.x-h.x,b=h.x*d.y-d.x*h.y,m=g.y-v.y,y=v.x-g.x,_=g.x*v.y-v.x*g.y;this.x=C*_-y*b,this.y=m*b-E*_,this.w=E*y-m*C}};vr.prototype.getY=function(){var t=this.y/this.w;if(rt.isNaN(t)||rt.isInfinite(t))throw new io;return t},vr.prototype.getX=function(){var t=this.x/this.w;if(rt.isNaN(t)||rt.isInfinite(t))throw new io;return t},vr.prototype.getCoordinate=function(){var t=new N;return t.x=this.getX(),t.y=this.getY(),t},vr.prototype.interfaces_=function(){return[]},vr.prototype.getClass=function(){return vr},vr.intersection=function(t,e,r,i){var s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,u=r.y-i.y,l=i.x-r.x,c=r.x*i.y-i.x*r.y,h=o*c-l*a,d=u*a-s*c,g=s*l-u*o,v=h/g,E=d/g;if(rt.isNaN(v)||rt.isInfinite(v)||rt.isNaN(E)||rt.isInfinite(E))throw new io;return new N(v,E)};var X=function n(){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 N){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof n){var e=arguments[0];this.init(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];this.init(s,o,a,u)}},Pd={serialVersionUID:{configurable:!0}};X.prototype.getArea=function(){return this.getWidth()*this.getHeight()},X.prototype.equals=function(t){if(!(t instanceof X))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},X.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new X;var e=this._minx>t._minx?this._minx:t._minx,r=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,s=this._maxy<t._maxy?this._maxy:t._maxy;return new X(e,i,r,s)},X.prototype.isNull=function(){return this._maxx<this._minx},X.prototype.getMaxX=function(){return this._maxx},X.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof N){var t=arguments[0];return this.covers(t.x,t.y)}else if(arguments[0]instanceof X){var e=arguments[0];return this.isNull()||e.isNull()?!1:e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:r>=this._minx&&r<=this._maxx&&i>=this._miny&&i<=this._maxy}},X.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof X){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}else if(arguments[0]instanceof N){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:!(r>this._maxx||r<this._minx||i>this._maxy||i<this._miny)}},X.prototype.getMinY=function(){return this._miny},X.prototype.getMinX=function(){return this._minx},X.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof N){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof X){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.isNull()?(this._minx=r,this._maxx=r,this._miny=i,this._maxy=i):(r<this._minx&&(this._minx=r),r>this._maxx&&(this._maxx=r),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},X.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},X.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},X.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},X.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},X.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},X.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},X.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},X.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},X.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=r,this._maxy+=r,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},X.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof X){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof N){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.covers(r,i)}},X.prototype.centre=function(){return this.isNull()?null:new N((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},X.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof N){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof X){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];s<o?(this._minx=s,this._maxx=o):(this._minx=o,this._maxx=s),a<u?(this._miny=a,this._maxy=u):(this._miny=u,this._maxy=a)}},X.prototype.getMaxY=function(){return this._maxy},X.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var r=0;return this._maxy<t._miny?r=t._miny-this._maxy:this._miny>t._maxy&&(r=this._miny-t._maxy),e===0?r:r===0?e:Math.sqrt(e*e+r*r)},X.prototype.hashCode=function(){var t=17;return t=37*t+N.hashCode(this._minx),t=37*t+N.hashCode(this._maxx),t=37*t+N.hashCode(this._miny),t=37*t+N.hashCode(this._maxy),t},X.prototype.interfaces_=function(){return[sr,or]},X.prototype.getClass=function(){return X},X.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],r=arguments[2];return r.x>=(t.x<e.x?t.x:e.x)&&r.x<=(t.x>e.x?t.x:e.x)&&r.y>=(t.y<e.y?t.y:e.y)&&r.y<=(t.y>e.y?t.y:e.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=Math.min(o.x,a.x),l=Math.max(o.x,a.x),c=Math.min(i.x,s.x),h=Math.max(i.x,s.x);return!(c>l||h<u||(u=Math.min(o.y,a.y),l=Math.max(o.y,a.y),c=Math.min(i.y,s.y),h=Math.max(i.y,s.y),c>l)||h<u)}},Pd.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(X,Pd);var Mr={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*$/},Pu=function(t){this.geometryFactory=t||new ut};Pu.prototype.read=function(t){var e,r,i;t=t.replace(/[\n\r]/g," ");var s=Mr.typeStr.exec(t);if(t.search("EMPTY")!==-1&&(s=Mr.emptyTypeStr.exec(t),s[2]=void 0),s&&(r=s[1].toLowerCase(),i=s[2],so[r]&&(e=so[r].apply(this,[i]))),e===void 0)throw new Error("Could not parse WKT "+t);return e},Pu.prototype.write=function(t){return this.extractGeometry(t)},Pu.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!Dn[e])return null;var r=e.toUpperCase(),i;return t.isEmpty()?i=r+" EMPTY":i=r+"("+Dn[e].apply(this,[t])+")",i};var Dn={coordinate:function(t){return t.x+" "+t.y},point:function(t){return Dn.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Dn.point.apply(e,[t._geometries[i]])+")");return r.join(",")},linestring:function(t){for(var e=this,r=[],i=0,s=t._points._coordinates.length;i<s;++i)r.push(Dn.coordinate.apply(e,[t._points._coordinates[i]]));return r.join(",")},linearring:function(t){for(var e=this,r=[],i=0,s=t._points._coordinates.length;i<s;++i)r.push(Dn.coordinate.apply(e,[t._points._coordinates[i]]));return r.join(",")},multilinestring:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Dn.linestring.apply(e,[t._geometries[i]])+")");return r.join(",")},polygon:function(t){var e=this,r=[];r.push("("+Dn.linestring.apply(this,[t._shell])+")");for(var i=0,s=t._holes.length;i<s;++i)r.push("("+Dn.linestring.apply(e,[t._holes[i]])+")");return r.join(",")},multipolygon:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Dn.polygon.apply(e,[t._geometries[i]])+")");return r.join(",")},geometrycollection:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push(e.extractGeometry(t._geometries[i]));return r.join(",")}},so={point:function(t){if(t===void 0)return this.geometryFactory.createPoint();var e=t.trim().split(Mr.spaces);return this.geometryFactory.createPoint(new N(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPoint();for(var r,i=t.trim().split(","),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(Mr.trimParens,"$1"),s.push(so.point.apply(e,[r]));return this.geometryFactory.createMultiPoint(s)},linestring:function(t){if(t===void 0)return this.geometryFactory.createLineString();for(var e=t.trim().split(","),r=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(Mr.spaces),r.push(new N(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(r)},linearring:function(t){if(t===void 0)return this.geometryFactory.createLinearRing();for(var e=t.trim().split(","),r=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(Mr.spaces),r.push(new N(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(r)},multilinestring:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiLineString();for(var r,i=t.trim().split(Mr.parenComma),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(Mr.trimParens,"$1"),s.push(so.linestring.apply(e,[r]));return this.geometryFactory.createMultiLineString(s)},polygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createPolygon();for(var r,i,s,o=t.trim().split(Mr.parenComma),a,u=[],l=0,c=o.length;l<c;++l)r=o[l].replace(Mr.trimParens,"$1"),i=so.linestring.apply(e,[r]),s=e.geometryFactory.createLinearRing(i._points),l===0?a=s:u.push(s);return this.geometryFactory.createPolygon(a,u)},multipolygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPolygon();for(var r,i=t.trim().split(Mr.doubleParenComma),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(Mr.trimParens,"$1"),s.push(so.polygon.apply(e,[r]));return this.geometryFactory.createMultiPolygon(s)},geometrycollection:function(t){var e=this;if(t===void 0)return this.geometryFactory.createGeometryCollection();t=t.replace(/,\s*([A-Za-z])/g,"|$1");for(var r=t.trim().split("|"),i=[],s=0,o=r.length;s<o;++s)i.push(e.read(r[s]));return this.geometryFactory.createGeometryCollection(i)}},yr=function(t){this.parser=new Pu(t)};yr.prototype.write=function(t){return this.parser.write(t)},yr.toLineString=function(t,e){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var Ln=(function(n){function t(e){n.call(this,e),this.name="RuntimeException",this.message=e,this.stack=new n().stack}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t})(Error),bu=(function(n){function t(){if(n.call(this),arguments.length===0)n.call(this);else if(arguments.length===1){var e=arguments[0];n.call(this,e)}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(Ln),st=function(){};st.prototype.interfaces_=function(){return[]},st.prototype.getClass=function(){return st},st.shouldNeverReachHere=function(){if(arguments.length===0)st.shouldNeverReachHere(null);else if(arguments.length===1){var t=arguments[0];throw new bu("Should never reach here"+(t!==null?": "+t:""))}},st.isTrue=function(){var t,e;if(arguments.length===1)t=arguments[0],st.isTrue(t,null);else if(arguments.length===2&&(t=arguments[0],e=arguments[1],!t))throw e===null?new bu:new bu(e)},st.equals=function(){var t,e,r;if(arguments.length===2)t=arguments[0],e=arguments[1],st.equals(t,e,null);else if(arguments.length===3&&(t=arguments[0],e=arguments[1],r=arguments[2],!e.equals(t)))throw new bu("Expected "+t+" but encountered "+e+(r!==null?": "+r:""))};var Mt=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 N,this._intPt[1]=new N,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},ls={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};Mt.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},Mt.prototype.getTopologySummary=function(){var t=new xr;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},Mt.prototype.computeIntersection=function(t,e,r,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=r,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,r,i)},Mt.prototype.getIntersectionNum=function(){return this._result},Mt.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 t=arguments[0],e=this.getEdgeDistance(t,0),r=this.getEdgeDistance(t,1);e>r?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},Mt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},Mt.prototype.setPrecisionModel=function(t){this._precisionModel=t},Mt.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],r=0;r<this._result;r++)if(!(t._intPt[r].equals2D(t._inputLines[e][0])||t._intPt[r].equals2D(t._inputLines[e][1])))return!0;return!1}},Mt.prototype.getIntersection=function(t){return this._intPt[t]},Mt.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},Mt.prototype.hasIntersection=function(){return this._result!==Mt.NO_INTERSECTION},Mt.prototype.getEdgeDistance=function(t,e){var r=Mt.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1]);return r},Mt.prototype.isCollinear=function(){return this._result===Mt.COLLINEAR_INTERSECTION},Mt.prototype.toString=function(){return yr.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+yr.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},Mt.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},Mt.prototype.isIntersection=function(t){for(var e=this,r=0;r<this._result;r++)if(e._intPt[r].equals2D(t))return!0;return!1},Mt.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},Mt.prototype.interfaces_=function(){return[]},Mt.prototype.getClass=function(){return Mt},Mt.computeEdgeDistance=function(t,e,r){var i=Math.abs(r.x-e.x),s=Math.abs(r.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(r))i>s?o=i:o=s;else{var a=Math.abs(t.x-e.x),u=Math.abs(t.y-e.y);i>s?o=a:o=u,o===0&&!t.equals(e)&&(o=Math.max(a,u))}return st.isTrue(!(o===0&&!t.equals(e)),"Bad distance calculation"),o},Mt.nonRobustComputeEdgeDistance=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s);return st.isTrue(!(o===0&&!t.equals(e)),"Invalid distance calculation"),o},ls.DONT_INTERSECT.get=function(){return 0},ls.DO_INTERSECT.get=function(){return 1},ls.COLLINEAR.get=function(){return 2},ls.NO_INTERSECTION.get=function(){return 0},ls.POINT_INTERSECTION.get=function(){return 1},ls.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(Mt,ls);var Ni=(function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(r){var i=new X(this._inputLines[0][0],this._inputLines[0][1]),s=new X(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(r)&&s.contains(r)},t.prototype.computeIntersection=function(){if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];if(this._isProper=!1,X.intersects(i,s,r)&&G.orientationIndex(i,s,r)===0&&G.orientationIndex(s,i,r)===0)return this._isProper=!0,(r.equals(i)||r.equals(s))&&(this._isProper=!1),this._result=n.POINT_INTERSECTION,null;this._result=n.NO_INTERSECTION}else return n.prototype.computeIntersection.apply(this,arguments)},t.prototype.normalizeToMinimum=function(r,i,s,o,a){a.x=this.smallestInAbsValue(r.x,i.x,s.x,o.x),a.y=this.smallestInAbsValue(r.y,i.y,s.y,o.y),r.x-=a.x,r.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},t.prototype.safeHCoordinateIntersection=function(r,i,s,o){var a=null;try{a=vr.intersection(r,i,s,o)}catch(u){if(u instanceof io)a=t.nearestEndpoint(r,i,s,o);else throw u}finally{}return a},t.prototype.intersection=function(r,i,s,o){var a=this.intersectionWithNormalization(r,i,s,o);return this.isInSegmentEnvelopes(a)||(a=new N(t.nearestEndpoint(r,i,s,o))),this._precisionModel!==null&&this._precisionModel.makePrecise(a),a},t.prototype.smallestInAbsValue=function(r,i,s,o){var a=r,u=Math.abs(a);return Math.abs(i)<u&&(a=i,u=Math.abs(i)),Math.abs(s)<u&&(a=s,u=Math.abs(s)),Math.abs(o)<u&&(a=o),a},t.prototype.checkDD=function(r,i,s,o,a){var u=Te.intersection(r,i,s,o),l=this.isInSegmentEnvelopes(u);ne.out.println("DD in env = "+l+" --------------------- "+u),a.distance(u)>1e-4&&ne.out.println("Distance = "+a.distance(u))},t.prototype.intersectionWithNormalization=function(r,i,s,o){var a=new N(r),u=new N(i),l=new N(s),c=new N(o),h=new N;this.normalizeToEnvCentre(a,u,l,c,h);var d=this.safeHCoordinateIntersection(a,u,l,c);return d.x+=h.x,d.y+=h.y,d},t.prototype.computeCollinearIntersection=function(r,i,s,o){var a=X.intersects(r,i,s),u=X.intersects(r,i,o),l=X.intersects(s,o,r),c=X.intersects(s,o,i);return a&&u?(this._intPt[0]=s,this._intPt[1]=o,n.COLLINEAR_INTERSECTION):l&&c?(this._intPt[0]=r,this._intPt[1]=i,n.COLLINEAR_INTERSECTION):a&&l?(this._intPt[0]=s,this._intPt[1]=r,s.equals(r)&&!u&&!c?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):a&&c?(this._intPt[0]=s,this._intPt[1]=i,s.equals(i)&&!u&&!l?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):u&&l?(this._intPt[0]=o,this._intPt[1]=r,o.equals(r)&&!a&&!c?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):u&&c?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!a&&!l?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):n.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(r,i,s,o,a){var u=r.x<i.x?r.x:i.x,l=r.y<i.y?r.y:i.y,c=r.x>i.x?r.x:i.x,h=r.y>i.y?r.y:i.y,d=s.x<o.x?s.x:o.x,g=s.y<o.y?s.y:o.y,v=s.x>o.x?s.x:o.x,E=s.y>o.y?s.y:o.y,C=u>d?u:d,b=c<v?c:v,m=l>g?l:g,y=h<E?h:E,_=(C+b)/2,S=(m+y)/2;a.x=_,a.y=S,r.x-=a.x,r.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},t.prototype.computeIntersect=function(r,i,s,o){if(this._isProper=!1,!X.intersects(r,i,s,o))return n.NO_INTERSECTION;var a=G.orientationIndex(r,i,s),u=G.orientationIndex(r,i,o);if(a>0&&u>0||a<0&&u<0)return n.NO_INTERSECTION;var l=G.orientationIndex(s,o,r),c=G.orientationIndex(s,o,i);if(l>0&&c>0||l<0&&c<0)return n.NO_INTERSECTION;var h=a===0&&u===0&&l===0&&c===0;return h?this.computeCollinearIntersection(r,i,s,o):(a===0||u===0||l===0||c===0?(this._isProper=!1,r.equals2D(s)||r.equals2D(o)?this._intPt[0]=r:i.equals2D(s)||i.equals2D(o)?this._intPt[0]=i:a===0?this._intPt[0]=new N(s):u===0?this._intPt[0]=new N(o):l===0?this._intPt[0]=new N(r):c===0&&(this._intPt[0]=new N(i))):(this._isProper=!0,this._intPt[0]=this.intersection(r,i,s,o)),n.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(r,i,s,o){var a=r,u=G.distancePointLine(r,s,o),l=G.distancePointLine(i,s,o);return l<u&&(u=l,a=i),l=G.distancePointLine(s,r,i),l<u&&(u=l,a=s),l=G.distancePointLine(o,r,i),l<u&&(u=l,a=o),a},t})(Mt),cs=function(){};cs.prototype.interfaces_=function(){return[]},cs.prototype.getClass=function(){return cs},cs.orientationIndex=function(t,e,r){var i=e.x-t.x,s=e.y-t.y,o=r.x-e.x,a=r.y-e.y;return cs.signOfDet2x2(i,s,o,a)},cs.signOfDet2x2=function(t,e,r,i){var s=null,o=null,a=null;if(s=1,t===0||i===0)return e===0||r===0?0:e>0?r>0?-s:s:r>0?s:-s;if(e===0||r===0)return i>0?t>0?s:-s:t>0?-s:s;if(e>0?i>0?e<=i||(s=-s,o=t,t=r,r=o,o=e,e=i,i=o):e<=-i?(s=-s,r=-r,i=-i):(o=t,t=-r,r=o,o=e,e=-i,i=o):i>0?-e<=i?(s=-s,t=-t,e=-e):(o=-t,t=r,r=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,r=-r,i=-i):(s=-s,o=-t,t=-r,r=o,o=-e,e=-i,i=o),t>0)if(r>0){if(!(t<=r))return s}else return s;else{if(r>0)return-s;if(t>=r)s=-s,t=-t,r=-r;else return-s}for(;;){if(a=Math.floor(r/t),r=r-a*t,i=i-a*e,i<0)return-s;if(i>e)return s;if(t>r+r){if(e<i+i)return s}else{if(e>i+i)return-s;r=t-r,i=e-i,s=-s}if(i===0)return r===0?0:-s;if(r===0||(a=Math.floor(t/r),t=t-a*r,e=e-a*i,e<0))return s;if(e>i)return-s;if(r>t+t){if(i<e+e)return-s}else{if(i>e+e)return s;t=r-t,e=i-e,s=-s}if(e===0)return t===0?0:s;if(t===0)return-s}};var Dr=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};Dr.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var r=t.x,i=e.x;return r>i&&(r=e.x,i=t.x),this._p.x>=r&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var s=t.x-this._p.x,o=t.y-this._p.y,a=e.x-this._p.x,u=e.y-this._p.y,l=cs.signOfDet2x2(s,o,a,u);if(l===0)return this._isPointOnSegment=!0,null;u<o&&(l=-l),l>0&&this._crossingCount++}},Dr.prototype.isPointInPolygon=function(){return this.getLocation()!==O.EXTERIOR},Dr.prototype.getLocation=function(){return this._isPointOnSegment?O.BOUNDARY:this._crossingCount%2===1?O.INTERIOR:O.EXTERIOR},Dr.prototype.isOnSegment=function(){return this._isPointOnSegment},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr},Dr.locatePointInRing=function(){if(arguments[0]instanceof N&&Q(arguments[1],ft)){for(var t=arguments[0],e=arguments[1],r=new Dr(t),i=new N,s=new N,o=1;o<e.size();o++)if(e.getCoordinate(o,i),e.getCoordinate(o-1,s),r.countSegment(i,s),r.isOnSegment())return r.getLocation();return r.getLocation()}else if(arguments[0]instanceof N&&arguments[1]instanceof Array){for(var a=arguments[0],u=arguments[1],l=new Dr(a),c=1;c<u.length;c++){var h=u[c],d=u[c-1];if(l.countSegment(h,d),l.isOnSegment())return l.getLocation()}return l.getLocation()}};var G=function(){},hs={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};G.prototype.interfaces_=function(){return[]},G.prototype.getClass=function(){return G},G.orientationIndex=function(t,e,r){return Te.orientationIndex(t,e,r)},G.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,r=t[0].x,i=1;i<t.length-1;i++){var s=t[i].x-r,o=t[i+1].y,a=t[i-1].y;e+=s*(a-o)}return e/2}else if(Q(arguments[0],ft)){var u=arguments[0],l=u.size();if(l<3)return 0;var c=new N,h=new N,d=new N;u.getCoordinate(0,h),u.getCoordinate(1,d);var g=h.x;d.x-=g;for(var v=0,E=1;E<l-1;E++)c.y=h.y,h.x=d.x,h.y=d.y,u.getCoordinate(E+1,d),d.x-=g,v+=h.x*(c.y-d.y);return v/2}},G.distanceLineLine=function(t,e,r,i){if(t.equals(e))return G.distancePointLine(t,r,i);if(r.equals(i))return G.distancePointLine(i,t,e);var s=!1;if(!X.intersects(t,e,r,i))s=!0;else{var o=(e.x-t.x)*(i.y-r.y)-(e.y-t.y)*(i.x-r.x);if(o===0)s=!0;else{var a=(t.y-r.y)*(i.x-r.x)-(t.x-r.x)*(i.y-r.y),u=(t.y-r.y)*(e.x-t.x)-(t.x-r.x)*(e.y-t.y),l=u/o,c=a/o;(c<0||c>1||l<0||l>1)&&(s=!0)}}return s?Ke.min(G.distancePointLine(t,r,i),G.distancePointLine(e,r,i),G.distancePointLine(r,t,e),G.distancePointLine(i,t,e)):0},G.isPointInRing=function(t,e){return G.locatePointInRing(t,e)!==O.EXTERIOR},G.computeLength=function(t){var e=t.size();if(e<=1)return 0;var r=0,i=new N;t.getCoordinate(0,i);for(var s=i.x,o=i.y,a=1;a<e;a++){t.getCoordinate(a,i);var u=i.x,l=i.y,c=u-s,h=l-o;r+=Math.sqrt(c*c+h*h),s=u,o=l}return r},G.isCCW=function(t){var e=t.length-1;if(e<3)throw new xt("Ring has fewer than 4 points, so orientation cannot be determined");for(var r=t[0],i=0,s=1;s<=e;s++){var o=t[s];o.y>r.y&&(r=o,i=s)}var a=i;do a=a-1,a<0&&(a=e);while(t[a].equals2D(r)&&a!==i);var u=i;do u=(u+1)%e;while(t[u].equals2D(r)&&u!==i);var l=t[a],c=t[u];if(l.equals2D(r)||c.equals2D(r)||l.equals2D(c))return!1;var h=G.computeOrientation(l,r,c),d=!1;return h===0?d=l.x>c.x:d=h>0,d},G.locatePointInRing=function(t,e){return Dr.locatePointInRing(t,e)},G.distancePointLinePerpendicular=function(t,e,r){var i=(r.x-e.x)*(r.x-e.x)+(r.y-e.y)*(r.y-e.y),s=((e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y))/i;return Math.abs(s)*Math.sqrt(i)},G.computeOrientation=function(t,e,r){return G.orientationIndex(t,e,r)},G.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new xt("Line array must contain at least one vertex");for(var r=t.distance(e[0]),i=0;i<e.length-1;i++){var s=G.distancePointLine(t,e[i],e[i+1]);s<r&&(r=s)}return r}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];if(a.x===u.x&&a.y===u.y)return o.distance(a);var l=(u.x-a.x)*(u.x-a.x)+(u.y-a.y)*(u.y-a.y),c=((o.x-a.x)*(u.x-a.x)+(o.y-a.y)*(u.y-a.y))/l;if(c<=0)return o.distance(a);if(c>=1)return o.distance(u);var h=((a.y-o.y)*(u.x-a.x)-(a.x-o.x)*(u.y-a.y))/l;return Math.abs(h)*Math.sqrt(l)}},G.isOnLine=function(t,e){for(var r=new Ni,i=1;i<e.length;i++){var s=e[i-1],o=e[i];if(r.computeIntersection(t,s,o),r.hasIntersection())return!0}return!1},hs.CLOCKWISE.get=function(){return-1},hs.RIGHT.get=function(){return G.CLOCKWISE},hs.COUNTERCLOCKWISE.get=function(){return 1},hs.LEFT.get=function(){return G.COUNTERCLOCKWISE},hs.COLLINEAR.get=function(){return 0},hs.STRAIGHT.get=function(){return G.COLLINEAR},Object.defineProperties(G,hs);var An=function(){};An.prototype.filter=function(t){},An.prototype.interfaces_=function(){return[]},An.prototype.getClass=function(){return An};var K=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},ln={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}};K.prototype.isGeometryCollection=function(){return this.getSortIndex()===K.SORTINDEX_GEOMETRYCOLLECTION},K.prototype.getFactory=function(){return this._factory},K.prototype.getGeometryN=function(t){return this},K.prototype.getArea=function(){return 0},K.prototype.isRectangle=function(){return!1},K.prototype.equals=function(){if(arguments[0]instanceof K){var t=arguments[0];return t===null?!1:this.equalsTopo(t)}else if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof K))return!1;var r=e;return this.equalsExact(r)}},K.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},K.prototype.geometryChanged=function(){this.apply(K.geometryChangedFilter)},K.prototype.geometryChangedAction=function(){this._envelope=null},K.prototype.equalsNorm=function(t){return t===null?!1:this.norm().equalsExact(t.norm())},K.prototype.getLength=function(){return 0},K.prototype.getNumGeometries=function(){return 1},K.prototype.compareTo=function(){if(arguments.length===1){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.getSortIndex()!==r.getSortIndex()?this.getSortIndex()-r.getSortIndex():this.isEmpty()&&r.isEmpty()?0:this.isEmpty()?-1:r.isEmpty()?1:this.compareToSameClass(r,i)}},K.prototype.getUserData=function(){return this._userData},K.prototype.getSRID=function(){return this._SRID},K.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},K.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===K.SORTINDEX_GEOMETRYCOLLECTION)throw new xt("This method does not support GeometryCollection arguments")},K.prototype.equal=function(t,e,r){return r===0?t.equals(e):t.distance(e)<=r},K.prototype.norm=function(){var t=this.copy();return t.normalize(),t},K.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},K.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new X(this._envelope)},K.prototype.setSRID=function(t){this._SRID=t},K.prototype.setUserData=function(t){this._userData=t},K.prototype.compare=function(t,e){for(var r=t.iterator(),i=e.iterator();r.hasNext()&&i.hasNext();){var s=r.next(),o=i.next(),a=s.compareTo(o);if(a!==0)return a}return r.hasNext()?1:i.hasNext()?-1:0},K.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},K.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===K.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===K.SORTINDEX_MULTIPOINT||this.getSortIndex()===K.SORTINDEX_MULTILINESTRING||this.getSortIndex()===K.SORTINDEX_MULTIPOLYGON},K.prototype.interfaces_=function(){return[Iu,sr,or]},K.prototype.getClass=function(){return K},K.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},K.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(t[e]===null)return!0;return!1},ln.serialVersionUID.get=function(){return 8763622679187377e3},ln.SORTINDEX_POINT.get=function(){return 0},ln.SORTINDEX_MULTIPOINT.get=function(){return 1},ln.SORTINDEX_LINESTRING.get=function(){return 2},ln.SORTINDEX_LINEARRING.get=function(){return 3},ln.SORTINDEX_MULTILINESTRING.get=function(){return 4},ln.SORTINDEX_POLYGON.get=function(){return 5},ln.SORTINDEX_MULTIPOLYGON.get=function(){return 6},ln.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},ln.geometryChangedFilter.get=function(){return Ql},Object.defineProperties(K,ln);var Ql=function(){};Ql.interfaces_=function(){return[An]},Ql.filter=function(t){t.geometryChangedAction()};var cn=function(){};cn.prototype.filter=function(t){},cn.prototype.interfaces_=function(){return[]},cn.prototype.getClass=function(){return cn};var ar=function(){},Rn={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}};ar.prototype.isInBoundary=function(t){},ar.prototype.interfaces_=function(){return[]},ar.prototype.getClass=function(){return ar},Rn.Mod2BoundaryNodeRule.get=function(){return oo},Rn.EndPointBoundaryNodeRule.get=function(){return ao},Rn.MultiValentEndPointBoundaryNodeRule.get=function(){return uo},Rn.MonoValentEndPointBoundaryNodeRule.get=function(){return lo},Rn.MOD2_BOUNDARY_RULE.get=function(){return new oo},Rn.ENDPOINT_BOUNDARY_RULE.get=function(){return new ao},Rn.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new uo},Rn.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new lo},Rn.OGC_SFS_BOUNDARY_RULE.get=function(){return ar.MOD2_BOUNDARY_RULE},Object.defineProperties(ar,Rn);var oo=function(){};oo.prototype.isInBoundary=function(t){return t%2===1},oo.prototype.interfaces_=function(){return[ar]},oo.prototype.getClass=function(){return oo};var ao=function(){};ao.prototype.isInBoundary=function(t){return t>0},ao.prototype.interfaces_=function(){return[ar]},ao.prototype.getClass=function(){return ao};var uo=function(){};uo.prototype.isInBoundary=function(t){return t>1},uo.prototype.interfaces_=function(){return[ar]},uo.prototype.getClass=function(){return uo};var lo=function(){};lo.prototype.isInBoundary=function(t){return t===1},lo.prototype.interfaces_=function(){return[ar]},lo.prototype.getClass=function(){return lo};var Ht=function(){};Ht.prototype.add=function(){},Ht.prototype.addAll=function(){},Ht.prototype.isEmpty=function(){},Ht.prototype.iterator=function(){},Ht.prototype.size=function(){},Ht.prototype.toArray=function(){},Ht.prototype.remove=function(){};function $l(n){this.message=n||""}$l.prototype=new Error,$l.prototype.name="IndexOutOfBoundsException";var co=function(){};co.prototype.hasNext=function(){},co.prototype.next=function(){},co.prototype.remove=function(){};var _r=(function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t})(Ht);function ho(n){this.message=n||""}ho.prototype=new Error,ho.prototype.name="NoSuchElementException";var U=(function(n){function t(){n.call(this),this.array_=[],arguments[0]instanceof Ht&&this.addAll(arguments[0])}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[n,Ht]},t.prototype.add=function(r){return arguments.length===1?this.array_.push(r):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(r){for(var i=this,s=r.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.set=function(r,i){var s=this.array_[r];return this.array_[r]=i,s},t.prototype.iterator=function(){return new Ey(this)},t.prototype.get=function(r){if(r<0||r>=this.size())throw new $l;return this.array_[r]},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var r=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(r.array_[s]);return i},t.prototype.remove=function(r){for(var i=this,s=!1,o=0,a=this.array_.length;o<a;o++)if(i.array_[o]===r){i.array_.splice(o,1),s=!0;break}return s},t})(_r),Ey=(function(n){function t(e){n.call(this),this.arrayList_=e,this.position_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new ho;return this.arrayList_.get(this.position_++)},t.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},t.prototype.set=function(r){return this.arrayList_.set(this.position_-1,r)},t.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},t})(co),Ta=(function(n){function t(){if(n.call(this),arguments.length!==0){if(arguments.length===1){var r=arguments[0];this.ensureCapacity(r.length),this.add(r,!0)}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.ensureCapacity(i.length),this.add(i,s)}}}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={coordArrayType:{configurable:!0}};return e.coordArrayType.get=function(){return new Array(0).fill(null)},t.prototype.getCoordinate=function(i){return this.get(i)},t.prototype.addAll=function(){var i=this;if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=!1,u=s.iterator();u.hasNext();)i.add(u.next(),o),a=!0;return a}else return n.prototype.addAll.apply(this,arguments)},t.prototype.clone=function(){for(var i=this,s=n.prototype.clone.call(this),o=0;o<this.size();o++)s.add(o,i.get(o).copy());return s},t.prototype.toCoordinateArray=function(){return this.toArray(t.coordArrayType)},t.prototype.add=function(){var i=this;if(arguments.length===1){var s=arguments[0];n.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 N&&typeof arguments[1]=="boolean"){var u=arguments[0],l=arguments[1];if(!l&&this.size()>=1){var c=this.get(this.size()-1);if(c.equals2D(u))return null}n.prototype.add.call(this,u)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var h=arguments[0],d=arguments[1];return this.add(h,d),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var g=arguments[0],v=arguments[1],E=arguments[2];if(E)for(var C=0;C<g.length;C++)i.add(g[C],v);else for(var b=g.length-1;b>=0;b--)i.add(g[b],v);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof N){var m=arguments[0],y=arguments[1],_=arguments[2];if(!_){var S=this.size();if(S>0){if(m>0){var I=this.get(m-1);if(I.equals2D(y))return null}if(m<S){var P=this.get(m);if(P.equals2D(y))return null}}}n.prototype.add.call(this,m,y)}}else if(arguments.length===4){var M=arguments[0],R=arguments[1],k=arguments[2],x=arguments[3],A=1;k>x&&(A=-1);for(var L=k;L!==x;L+=A)i.add(M[L],R);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new N(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,e),t})(U),at=function(){},Nu={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};Nu.ForwardComparator.get=function(){return xa},Nu.BidirectionalComparator.get=function(){return fo},Nu.coordArrayType.get=function(){return new Array(0).fill(null)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))},at.ptNotInList=function(t,e){for(var r=0;r<t.length;r++){var i=t[r];if(at.indexOf(i,e)<0)return i}return null},at.scroll=function(t,e){var r=at.indexOf(e,t);if(r<0)return null;var i=new Array(t.length).fill(null);ne.arraycopy(t,r,i,0,t.length-r),ne.arraycopy(t,0,i,t.length-r,r),ne.arraycopy(i,0,t,0,t.length)},at.equals=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!t[r].equals(e[r]))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}},at.intersection=function(t,e){for(var r=new Ta,i=0;i<t.length;i++)e.intersects(t[i])&&r.add(t[i],!0);return r.toCoordinateArray()},at.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},at.removeRepeatedPoints=function(t){if(!at.hasRepeatedPoints(t))return t;var e=new Ta(t,!1);return e.toCoordinateArray()},at.reverse=function(t){for(var e=t.length-1,r=Math.trunc(e/2),i=0;i<=r;i++){var s=t[i];t[i]=t[e-i],t[e-i]=s}},at.removeNull=function(t){for(var e=0,r=0;r<t.length;r++)t[r]!==null&&e++;var i=new Array(e).fill(null);if(e===0)return i;for(var s=0,o=0;o<t.length;o++)t[o]!==null&&(i[s++]=t[o]);return i},at.copyDeep=function(){if(arguments.length===1){for(var t=arguments[0],e=new Array(t.length).fill(null),r=0;r<t.length;r++)e[r]=new N(t[r]);return e}else if(arguments.length===5)for(var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=arguments[4],l=0;l<u;l++)o[a+l]=new N(i[s+l])},at.isEqualReversed=function(t,e){for(var r=0;r<t.length;r++){var i=t[r],s=e[t.length-r-1];if(i.compareTo(s)!==0)return!1}return!0},at.envelope=function(t){for(var e=new X,r=0;r<t.length;r++)e.expandToInclude(t[r]);return e},at.toCoordinateArray=function(t){return t.toArray(at.coordArrayType)},at.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},at.indexOf=function(t,e){for(var r=0;r<e.length;r++)if(t.equals(e[r]))return r;return-1},at.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var r=t.length-1-e,i=t[e].compareTo(t[r]);if(i!==0)return i}return 1},at.compare=function(t,e){for(var r=0;r<t.length&&r<e.length;){var i=t[r].compareTo(e[r]);if(i!==0)return i;r++}return r<e.length?-1:r<t.length?1:0},at.minCoordinate=function(t){for(var e=null,r=0;r<t.length;r++)(e===null||e.compareTo(t[r])>0)&&(e=t[r]);return e},at.extract=function(t,e,r){e=Ke.clamp(e,0,t.length),r=Ke.clamp(r,-1,t.length);var i=r-e+1;r<0&&(i=0),e>=t.length&&(i=0),r<e&&(i=0);var s=new Array(i).fill(null);if(i===0)return s;for(var o=0,a=e;a<=r;a++)s[o++]=t[a];return s},Object.defineProperties(at,Nu);var xa=function(){};xa.prototype.compare=function(t,e){var r=t,i=e;return at.compare(r,i)},xa.prototype.interfaces_=function(){return[ro]},xa.prototype.getClass=function(){return xa};var fo=function(){};fo.prototype.compare=function(t,e){var r=t,i=e;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;var s=at.compare(r,i),o=at.isEqualReversed(r,i);return o?0:s},fo.prototype.OLDcompare=function(t,e){var r=t,i=e;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;for(var s=at.increasingDirection(r),o=at.increasingDirection(i),a=s>0?0:r.length-1,u=o>0?0:r.length-1,l=0;l<r.length;l++){var c=r[a].compareTo(i[u]);if(c!==0)return c;a+=s,u+=o}return 0},fo.prototype.interfaces_=function(){return[ro]},fo.prototype.getClass=function(){return fo};var fs=function(){};fs.prototype.get=function(){},fs.prototype.put=function(){},fs.prototype.size=function(){},fs.prototype.values=function(){},fs.prototype.entrySet=function(){};var Sy=(function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t})(fs);function Oa(n){this.message=n||""}Oa.prototype=new Error,Oa.prototype.name="OperationNotSupported";function Tu(){}Tu.prototype=new Ht,Tu.prototype.contains=function(){};var tc=(function(n){function t(){n.call(this),this.array_=[],arguments[0]instanceof Ht&&this.addAll(arguments[0])}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.contains=function(r){for(var i=this,s=0,o=this.array_.length;s<o;s++){var a=i.array_[s];if(a===r)return!0}return!1},t.prototype.add=function(r){return this.contains(r)?!1:(this.array_.push(r),!0)},t.prototype.addAll=function(r){for(var i=this,s=r.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.remove=function(r){throw new Error},t.prototype.size=function(){return this.array_.length},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.toArray=function(){for(var r=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(r.array_[s]);return i},t.prototype.iterator=function(){return new Cy(this)},t})(Tu),Cy=(function(n){function t(e){n.call(this),this.hashSet_=e,this.position_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new ho;return this.hashSet_.array_[this.position_++]},t.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},t.prototype.remove=function(){throw new Oa},t})(co),Fn=0,Ti=1;function bd(n){return n===null?Fn:n.color}function It(n){return n===null?null:n.parent}function kn(n,t){n!==null&&(n.color=t)}function ec(n){return n===null?null:n.left}function Nd(n){return n===null?null:n.right}function he(){this.root_=null,this.size_=0}he.prototype=new Sy,he.prototype.get=function(n){for(var t=this.root_;t!==null;){var e=n.compareTo(t.key);if(e<0)t=t.left;else if(e>0)t=t.right;else return t.value}return null},he.prototype.put=function(n,t){if(this.root_===null)return this.root_={key:n,value:t,left:null,right:null,parent:null,color:Fn,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var e=this.root_,r,i;do if(r=e,i=n.compareTo(e.key),i<0)e=e.left;else if(i>0)e=e.right;else{var s=e.value;return e.value=t,s}while(e!==null);var o={key:n,left:null,right:null,value:t,parent:r,color:Fn,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?r.left=o:r.right=o,this.fixAfterInsertion(o),this.size_++,null},he.prototype.fixAfterInsertion=function(n){var t=this;for(n.color=Ti;n!=null&&n!==this.root_&&n.parent.color===Ti;)if(It(n)===ec(It(It(n)))){var e=Nd(It(It(n)));bd(e)===Ti?(kn(It(n),Fn),kn(e,Fn),kn(It(It(n)),Ti),n=It(It(n))):(n===Nd(It(n))&&(n=It(n),t.rotateLeft(n)),kn(It(n),Fn),kn(It(It(n)),Ti),t.rotateRight(It(It(n))))}else{var r=ec(It(It(n)));bd(r)===Ti?(kn(It(n),Fn),kn(r,Fn),kn(It(It(n)),Ti),n=It(It(n))):(n===ec(It(n))&&(n=It(n),t.rotateRight(n)),kn(It(n),Fn),kn(It(It(n)),Ti),t.rotateLeft(It(It(n))))}this.root_.color=Fn},he.prototype.values=function(){var n=new U,t=this.getFirstEntry();if(t!==null)for(n.add(t.value);(t=he.successor(t))!==null;)n.add(t.value);return n},he.prototype.entrySet=function(){var n=new tc,t=this.getFirstEntry();if(t!==null)for(n.add(t);(t=he.successor(t))!==null;)n.add(t);return n},he.prototype.rotateLeft=function(n){if(n!=null){var t=n.right;n.right=t.left,t.left!=null&&(t.left.parent=n),t.parent=n.parent,n.parent===null?this.root_=t:n.parent.left===n?n.parent.left=t:n.parent.right=t,t.left=n,n.parent=t}},he.prototype.rotateRight=function(n){if(n!=null){var t=n.left;n.left=t.right,t.right!=null&&(t.right.parent=n),t.parent=n.parent,n.parent===null?this.root_=t:n.parent.right===n?n.parent.right=t:n.parent.left=t,t.right=n,n.parent=t}},he.prototype.getFirstEntry=function(){var n=this.root_;if(n!=null)for(;n.left!=null;)n=n.left;return n},he.successor=function(n){if(n===null)return null;if(n.right!==null){for(var t=n.right;t.left!==null;)t=t.left;return t}else{for(var e=n.parent,r=n;e!==null&&r===e.right;)r=e,e=e.parent;return e}},he.prototype.size=function(){return this.size_};var Ma=function(){};Ma.prototype.interfaces_=function(){return[]},Ma.prototype.getClass=function(){return Ma};function Td(){}Td.prototype=new Tu;function Lr(){this.array_=[],arguments[0]instanceof Ht&&this.addAll(arguments[0])}Lr.prototype=new Td,Lr.prototype.contains=function(n){for(var t=this,e=0,r=this.array_.length;e<r;e++){var i=t.array_[e];if(i.compareTo(n)===0)return!0}return!1},Lr.prototype.add=function(n){var t=this;if(this.contains(n))return!1;for(var e=0,r=this.array_.length;e<r;e++){var i=t.array_[e];if(i.compareTo(n)===1)return t.array_.splice(e,0,n),!0}return this.array_.push(n),!0},Lr.prototype.addAll=function(n){for(var t=this,e=n.iterator();e.hasNext();)t.add(e.next());return!0},Lr.prototype.remove=function(n){throw new Oa},Lr.prototype.size=function(){return this.array_.length},Lr.prototype.isEmpty=function(){return this.array_.length===0},Lr.prototype.toArray=function(){for(var n=this,t=[],e=0,r=this.array_.length;e<r;e++)t.push(n.array_[e]);return t},Lr.prototype.iterator=function(){return new xu(this)};var xu=function(n){this.treeSet_=n,this.position_=0};xu.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new ho;return this.treeSet_.array_[this.position_++]},xu.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},xu.prototype.remove=function(){throw new Oa};var xi=function(){};xi.sort=function(){var t=arguments[0],e,r,i,s;if(arguments.length===1)s=function(a,u){return a.compareTo(u)},t.sort(s);else if(arguments.length===2)i=arguments[1],s=function(a,u){return i.compare(a,u)},t.sort(s);else if(arguments.length===3){r=t.slice(arguments[1],arguments[2]),r.sort();var o=t.slice(0,arguments[1]).concat(r,t.slice(arguments[2],t.length));for(t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])}else if(arguments.length===4)for(r=t.slice(arguments[1],arguments[2]),i=arguments[3],s=function(a,u){return i.compare(a,u)},r.sort(s),o=t.slice(0,arguments[1]).concat(r,t.slice(arguments[2],t.length)),t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])},xi.asList=function(t){for(var e=new U,r=0,i=t.length;r<i;r++)e.add(t[r]);return e};var vt=function(){},wr={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}};wr.P.get=function(){return 0},wr.L.get=function(){return 1},wr.A.get=function(){return 2},wr.FALSE.get=function(){return-1},wr.TRUE.get=function(){return-2},wr.DONTCARE.get=function(){return-3},wr.SYM_FALSE.get=function(){return"F"},wr.SYM_TRUE.get=function(){return"T"},wr.SYM_DONTCARE.get=function(){return"*"},wr.SYM_P.get=function(){return"0"},wr.SYM_L.get=function(){return"1"},wr.SYM_A.get=function(){return"2"},vt.prototype.interfaces_=function(){return[]},vt.prototype.getClass=function(){return vt},vt.toDimensionSymbol=function(t){switch(t){case vt.FALSE:return vt.SYM_FALSE;case vt.TRUE:return vt.SYM_TRUE;case vt.DONTCARE:return vt.SYM_DONTCARE;case vt.P:return vt.SYM_P;case vt.L:return vt.SYM_L;case vt.A:return vt.SYM_A}throw new xt("Unknown dimension value: "+t)},vt.toDimensionValue=function(t){switch(ba.toUpperCase(t)){case vt.SYM_FALSE:return vt.FALSE;case vt.SYM_TRUE:return vt.TRUE;case vt.SYM_DONTCARE:return vt.DONTCARE;case vt.SYM_P:return vt.P;case vt.SYM_L:return vt.L;case vt.SYM_A:return vt.A}throw new xt("Unknown dimension symbol: "+t)},Object.defineProperties(vt,wr);var Ar=function(){};Ar.prototype.filter=function(t){},Ar.prototype.interfaces_=function(){return[]},Ar.prototype.getClass=function(){return Ar};var Er=function(){};Er.prototype.filter=function(t,e){},Er.prototype.isDone=function(){},Er.prototype.isGeometryChanged=function(){},Er.prototype.interfaces_=function(){return[]},Er.prototype.getClass=function(){return Er};var me=(function(n){function t(r,i){if(n.call(this,i),this._geometries=r||[],n.hasNullElements(this._geometries))throw new xt("geometries must not contain null elements")}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){for(var i=this,s=new X,o=0;o<this._geometries.length;o++)s.expandToInclude(i._geometries[o].getEnvelopeInternal());return s},t.prototype.getGeometryN=function(i){return this._geometries[i]},t.prototype.getSortIndex=function(){return n.SORTINDEX_GEOMETRYCOLLECTION},t.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 u=i._geometries[a].getCoordinates(),l=0;l<u.length;l++)o++,s[o]=u[l];return s},t.prototype.getArea=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getArea();return s},t.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 u=0;u<this._geometries.length;u++)if(!i._geometries[u].equalsExact(a._geometries[u],o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<this._geometries.length;s++)i._geometries[s].normalize();xi.sort(this._geometries)},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},t.prototype.getBoundaryDimension=function(){for(var i=this,s=vt.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getBoundaryDimension());return s},t.prototype.getDimension=function(){for(var i=this,s=vt.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getDimension());return s},t.prototype.getLength=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getNumPoints();return s},t.prototype.getNumGeometries=function(){return this._geometries.length},t.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)},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=new Lr(xi.asList(this._geometries)),a=new Lr(xi.asList(s._geometries));return this.compare(o,a)}else if(arguments.length===2){for(var u=arguments[0],l=arguments[1],c=u,h=this.getNumGeometries(),d=c.getNumGeometries(),g=0;g<h&&g<d;){var v=i.getGeometryN(g),E=c.getGeometryN(g),C=v.compareToSameClass(E,l);if(C!==0)return C;g++}return g<h?1:g<d?-1:0}},t.prototype.apply=function(){var i=this;if(Q(arguments[0],cn))for(var s=arguments[0],o=0;o<this._geometries.length;o++)i._geometries[o].apply(s);else if(Q(arguments[0],Er)){var a=arguments[0];if(this._geometries.length===0)return null;for(var u=0;u<this._geometries.length&&(i._geometries[u].apply(a),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(Q(arguments[0],Ar)){var l=arguments[0];l.filter(this);for(var c=0;c<this._geometries.length;c++)i._geometries[c].apply(l)}else if(Q(arguments[0],An)){var h=arguments[0];h.filter(this);for(var d=0;d<this._geometries.length;d++)i._geometries[d].apply(h)}},t.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),st.shouldNeverReachHere(),null},t.prototype.clone=function(){var i=this,s=n.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},t.prototype.getGeometryType=function(){return"GeometryCollection"},t.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 t(s,this._factory)},t.prototype.isEmpty=function(){for(var i=this,s=0;s<this._geometries.length;s++)if(!i._geometries[s].isEmpty())return!1;return!0},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(t,e),t})(K),Oi=(function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return K.SORTINDEX_MULTILINESTRING},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?vt.FALSE:0},t.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},t.prototype.getDimension=function(){return 1},t.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)},t.prototype.getBoundary=function(){return new ur(this).getBoundary()},t.prototype.getGeometryType=function(){return"MultiLineString"},t.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 t(s,this._factory)},t.prototype.interfaces_=function(){return[Ma]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(t,e),t})(me),ur=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var t=arguments[0],e=ar.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._geom=r,this._geomFact=r.getFactory(),this._bnRule=i}};ur.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return e.length===1?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},ur.prototype.getBoundary=function(){return this._geom instanceof Rt?this.boundaryLineString(this._geom):this._geom instanceof Oi?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},ur.prototype.boundaryLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){var e=this._bnRule.isInBoundary(2);return e?t.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},ur.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},ur.prototype.computeBoundaryCoordinates=function(t){var e=this,r=new U;this._endpointMap=new he;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);s.getNumPoints()!==0&&(e.addEndpoint(s.getCoordinateN(0)),e.addEndpoint(s.getCoordinateN(s.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var a=o.next(),u=a.getValue(),l=u.count;e._bnRule.isInBoundary(l)&&r.add(a.getKey())}return at.toCoordinateArray(r)},ur.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);e===null&&(e=new Ou,this._endpointMap.put(t,e)),e.count++},ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur},ur.getBoundary=function(){if(arguments.length===1){var t=arguments[0],e=new ur(t);return e.getBoundary()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=new ur(r,i);return s.getBoundary()}};var Ou=function(){this.count=null};Ou.prototype.interfaces_=function(){return[]},Ou.prototype.getClass=function(){return Ou};function Iy(){}function Py(){}var by=function(){};function Ny(){}function Ty(){}function xy(){}var lr=function(){},rc={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};lr.prototype.interfaces_=function(){return[]},lr.prototype.getClass=function(){return lr},lr.chars=function(t,e){for(var r=new Array(e).fill(null),i=0;i<e;i++)r[i]=t;return String(r)},lr.getStackTrace=function(){if(arguments.length===1){var t=arguments[0],e=new Ny,r=new Iy;return t.printStackTrace(r),e.toString()}else if(arguments.length===2){var i=arguments[0],s=arguments[1],o="";new Py(lr.getStackTrace(i));for(var a=new xy,u=0;u<s;u++)try{o+=a.readLine()+lr.NEWLINE}catch(l){if(l instanceof Ty)st.shouldNeverReachHere();else throw l}finally{}return o}},lr.split=function(t,e){for(var r=e.length,i=new U,s=""+t,o=s.indexOf(e);o>=0;){var a=s.substring(0,o);i.add(a),s=s.substring(o+r),o=s.indexOf(e)}s.length>0&&i.add(s);for(var u=new Array(i.size()).fill(null),l=0;l<u.length;l++)u[l]=i.get(l);return u},lr.toString=function(){if(arguments.length===1){var t=arguments[0];return lr.SIMPLE_ORDINATE_FORMAT.format(t)}},lr.spaces=function(t){return lr.chars(" ",t)},rc.NEWLINE.get=function(){return ne.getProperty("line.separator")},rc.SIMPLE_ORDINATE_FORMAT.get=function(){return new by},Object.defineProperties(lr,rc);var zt=function(){};zt.prototype.interfaces_=function(){return[]},zt.prototype.getClass=function(){return zt},zt.copyCoord=function(t,e,r,i){for(var s=Math.min(t.getDimension(),r.getDimension()),o=0;o<s;o++)r.setOrdinate(i,o,t.getOrdinate(e,o))},zt.isRing=function(t){var e=t.size();return e===0?!0:e<=3?!1:t.getOrdinate(0,ft.X)===t.getOrdinate(e-1,ft.X)&&t.getOrdinate(0,ft.Y)===t.getOrdinate(e-1,ft.Y)},zt.isEqual=function(t,e){var r=t.size(),i=e.size();if(r!==i)return!1;for(var s=Math.min(t.getDimension(),e.getDimension()),o=0;o<r;o++)for(var a=0;a<s;a++){var u=t.getOrdinate(o,a),l=e.getOrdinate(o,a);if(t.getOrdinate(o,a)!==e.getOrdinate(o,a)&&!(rt.isNaN(u)&&rt.isNaN(l)))return!1}return!0},zt.extend=function(t,e,r){var i=t.create(r,e.getDimension()),s=e.size();if(zt.copy(e,0,i,0,s),s>0)for(var o=s;o<r;o++)zt.copy(e,s-1,i,o,1);return i},zt.reverse=function(t){for(var e=t.size()-1,r=Math.trunc(e/2),i=0;i<=r;i++)zt.swap(t,i,e-i)},zt.swap=function(t,e,r){if(e===r)return null;for(var i=0;i<t.getDimension();i++){var s=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(r,i)),t.setOrdinate(r,i,s)}},zt.copy=function(t,e,r,i,s){for(var o=0;o<s;o++)zt.copyCoord(t,e+o,r,i+o)},zt.toString=function(){if(arguments.length===1){var t=arguments[0],e=t.size();if(e===0)return"()";var r=t.getDimension(),i=new xr;i.append("(");for(var s=0;s<e;s++){s>0&&i.append(" ");for(var o=0;o<r;o++)o>0&&i.append(","),i.append(lr.toString(t.getOrdinate(s,o)))}return i.append(")"),i.toString()}},zt.ensureValidRing=function(t,e){var r=e.size();if(r===0)return e;if(r<=3)return zt.createClosedRing(t,e,4);var i=e.getOrdinate(0,ft.X)===e.getOrdinate(r-1,ft.X)&&e.getOrdinate(0,ft.Y)===e.getOrdinate(r-1,ft.Y);return i?e:zt.createClosedRing(t,e,r+1)},zt.createClosedRing=function(t,e,r){var i=t.create(r,e.getDimension()),s=e.size();zt.copy(e,0,i,0,s);for(var o=s;o<r;o++)zt.copy(e,0,i,o,1);return i};var Rt=(function(n){function t(r,i){n.call(this,i),this._points=null,this.init(r)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new X:this._points.expandEnvelope(new X)},t.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},t.prototype.getSortIndex=function(){return n.SORTINDEX_LINESTRING},t.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},t.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 u=0;u<this._points.size();u++)if(!i.equal(i._points.getCoordinate(u),a._points.getCoordinate(u),o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.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&&zt.reverse(i._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?vt.FALSE:0},t.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return G.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var i=this._points.copy();zt.reverse(i);var s=this.getFactory().createLineString(i);return s},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var s=arguments[0],o=s,a=0,u=0;a<this._points.size()&&u<o._points.size();){var l=i._points.getCoordinate(a).compareTo(o._points.getCoordinate(u));if(l!==0)return l;a++,u++}return a<this._points.size()?1:u<o._points.size()?-1:0}else if(arguments.length===2){var c=arguments[0],h=arguments[1],d=c;return h.compare(this._points,d._points)}},t.prototype.apply=function(){var i=this;if(Q(arguments[0],cn))for(var s=arguments[0],o=0;o<this._points.size();o++)s.filter(i._points.getCoordinate(o));else if(Q(arguments[0],Er)){var a=arguments[0];if(this._points.size()===0)return null;for(var u=0;u<this._points.size()&&(a.filter(i._points,u),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(Q(arguments[0],Ar)){var l=arguments[0];l.filter(this)}else if(Q(arguments[0],An)){var c=arguments[0];c.filter(this)}},t.prototype.getBoundary=function(){return new ur(this).getBoundary()},t.prototype.isEquivalentClass=function(i){return i instanceof t},t.prototype.clone=function(){var i=n.prototype.clone.call(this);return i._points=this._points.clone(),i},t.prototype.getCoordinateN=function(i){return this._points.getCoordinate(i)},t.prototype.getGeometryType=function(){return"LineString"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._points},t.prototype.isEmpty=function(){return this._points.size()===0},t.prototype.init=function(i){if(i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),i.size()===1)throw new xt("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},t.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},t.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},t.prototype.getPointN=function(i){return this.getFactory().createPoint(this._points.getCoordinate(i))},t.prototype.interfaces_=function(){return[Ma]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(t,e),t})(K),Da=function(){};Da.prototype.interfaces_=function(){return[]},Da.prototype.getClass=function(){return Da};var Ve=(function(n){function t(r,i){n.call(this,i),this._coordinates=r||null,this.init(this._coordinates)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new X;var i=new X;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},t.prototype.getSortIndex=function(){return n.SORTINDEX_POINT},t.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},t.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 n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){},t.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},t.prototype.getBoundaryDimension=function(){return vt.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getNumPoints=function(){return this.isEmpty()?0:1},t.prototype.reverse=function(){return this.copy()},t.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},t.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],u=o;return a.compare(this._coordinates,u._coordinates)}},t.prototype.apply=function(){if(Q(arguments[0],cn)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(Q(arguments[0],Er)){var s=arguments[0];if(this.isEmpty())return null;s.filter(this._coordinates,0),s.isGeometryChanged()&&this.geometryChanged()}else if(Q(arguments[0],Ar)){var o=arguments[0];o.filter(this)}else if(Q(arguments[0],An)){var a=arguments[0];a.filter(this)}},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.clone=function(){var i=n.prototype.clone.call(this);return i._coordinates=this._coordinates.clone(),i},t.prototype.getGeometryType=function(){return"Point"},t.prototype.copy=function(){return new t(this._coordinates.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._coordinates},t.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},t.prototype.isEmpty=function(){return this._coordinates.size()===0},t.prototype.init=function(i){i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),st.isTrue(i.size()<=1),this._coordinates=i},t.prototype.isSimple=function(){return!0},t.prototype.interfaces_=function(){return[Da]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(t,e),t})(K),oi=function(){};oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi};var Bt=(function(n){function t(r,i,s){if(n.call(this,s),this._shell=null,this._holes=null,r===null&&(r=this.getFactory().createLinearRing()),i===null&&(i=[]),n.hasNullElements(i))throw new xt("holes must not contain null elements");if(r.isEmpty()&&n.hasNonEmptyElements(i))throw new xt("shell is empty but holes are not");this._shell=r,this._holes=i}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},t.prototype.getSortIndex=function(){return n.SORTINDEX_POLYGON},t.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(),u=0;u<a.length;u++)o++,s[o]=a[u];for(var l=0;l<this._holes.length;l++)for(var c=i._holes[l].getCoordinates(),h=0;h<c.length;h++)o++,s[o]=c[h];return s},t.prototype.getArea=function(){var i=this,s=0;s+=Math.abs(G.signedArea(this._shell.getCoordinateSequence()));for(var o=0;o<this._holes.length;o++)s-=Math.abs(G.signedArea(i._holes[o].getCoordinateSequence()));return s},t.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 u=i.getY(o);if(!(u===s.getMinY()||u===s.getMaxY()))return!1}for(var l=i.getX(0),c=i.getY(0),h=1;h<=4;h++){var d=i.getX(h),g=i.getY(h),v=d!==l,E=g!==c;if(v===E)return!1;l=d,c=g}return!0},t.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,u=this._shell,l=a._shell;if(!u.equalsExact(l,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 n.prototype.equalsExact.apply(this,arguments)},t.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);xi.sort(this._holes)}else if(arguments.length===2){var o=arguments[0],a=arguments[1];if(o.isEmpty())return null;var u=new Array(o.getCoordinates().length-1).fill(null);ne.arraycopy(o.getCoordinates(),0,u,0,u.length);var l=at.minCoordinate(o.getCoordinates());at.scroll(u,l),ne.arraycopy(u,0,o.getCoordinates(),0,u.length),o.getCoordinates()[u.length]=u[0],G.isCCW(o.getCoordinates())===a&&at.reverse(o.getCoordinates())}},t.prototype.getCoordinate=function(){return this._shell.getCoordinate()},t.prototype.getNumInteriorRing=function(){return this._holes.length},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.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},t.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},t.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},t.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},t.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 u=arguments[0],l=arguments[1],c=u,h=this._shell,d=c._shell,g=h.compareToSameClass(d,l);if(g!==0)return g;for(var v=this.getNumInteriorRing(),E=c.getNumInteriorRing(),C=0;C<v&&C<E;){var b=i.getInteriorRingN(C),m=c.getInteriorRingN(C),y=b.compareToSameClass(m,l);if(y!==0)return y;C++}return C<v?1:C<E?-1:0}},t.prototype.apply=function(i){var s=this;if(Q(i,cn)){this._shell.apply(i);for(var o=0;o<this._holes.length;o++)s._holes[o].apply(i)}else if(Q(i,Er)){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(Q(i,Ar))i.filter(this);else if(Q(i,An)){i.filter(this),this._shell.apply(i);for(var u=0;u<this._holes.length;u++)s._holes[u].apply(i)}},t.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)},t.prototype.clone=function(){var i=this,s=n.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},t.prototype.getGeometryType=function(){return"Polygon"},t.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 t(s,o,this._factory)},t.prototype.getExteriorRing=function(){return this._shell},t.prototype.isEmpty=function(){return this._shell.isEmpty()},t.prototype.getInteriorRingN=function(i){return this._holes[i]},t.prototype.interfaces_=function(){return[oi]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(t,e),t})(K),po=(function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return K.SORTINDEX_MULTIPOINT},t.prototype.isValid=function(){return!0},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return n.prototype.getCoordinate.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return vt.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.getGeometryType=function(){return"MultiPoint"},t.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 t(s,this._factory)},t.prototype.interfaces_=function(){return[Da]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(t,e),t})(me),hn=(function(n){function t(r,i){r instanceof N&&i instanceof ut&&(r=i.getCoordinateSequenceFactory().create(r)),n.call(this,r,i),this.validateConstruction()}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return K.SORTINDEX_LINEARRING},t.prototype.getBoundaryDimension=function(){return vt.FALSE},t.prototype.isClosed=function(){return this.isEmpty()?!0:n.prototype.isClosed.call(this)},t.prototype.reverse=function(){var i=this._points.copy();zt.reverse(i);var s=this.getFactory().createLinearRing(i);return s},t.prototype.validateConstruction=function(){if(!this.isEmpty()&&!n.prototype.isClosed.call(this))throw new xt("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<t.MINIMUM_VALID_SIZE)throw new xt("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.MINIMUM_VALID_SIZE.get=function(){return 4},e.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,e),t})(Rt),fn=(function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return K.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.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)},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var s=new U,o=0;o<this._geometries.length;o++)for(var a=i._geometries[o],u=a.getBoundary(),l=0;l<u.getNumGeometries();l++)s.add(u.getGeometryN(l));var c=new Array(s.size()).fill(null);return this.getFactory().createMultiLineString(s.toArray(c))},t.prototype.getGeometryType=function(){return"MultiPolygon"},t.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 t(s,this._factory)},t.prototype.interfaces_=function(){return[oi]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(t,e),t})(me),cr=function(t){this._factory=t||null,this._isUserDataCopied=!1},Mu={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};cr.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},cr.prototype.edit=function(t,e){if(t===null)return null;var r=this.editInternal(t,e);return this._isUserDataCopied&&r.setUserData(t.getUserData()),r},cr.prototype.editInternal=function(t,e){return this._factory===null&&(this._factory=t.getFactory()),t instanceof me?this.editGeometryCollection(t,e):t instanceof Bt?this.editPolygon(t,e):t instanceof Ve?e.edit(t,this._factory):t instanceof Rt?e.edit(t,this._factory):(st.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},cr.prototype.editGeometryCollection=function(t,e){for(var r=this,i=e.edit(t,this._factory),s=new U,o=0;o<i.getNumGeometries();o++){var a=r.edit(i.getGeometryN(o),e);a===null||a.isEmpty()||s.add(a)}return i.getClass()===po?this._factory.createMultiPoint(s.toArray([])):i.getClass()===Oi?this._factory.createMultiLineString(s.toArray([])):i.getClass()===fn?this._factory.createMultiPolygon(s.toArray([])):this._factory.createGeometryCollection(s.toArray([]))},cr.prototype.editPolygon=function(t,e){var r=this,i=e.edit(t,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var s=this.edit(i.getExteriorRing(),e);if(s===null||s.isEmpty())return this._factory.createPolygon();for(var o=new U,a=0;a<i.getNumInteriorRing();a++){var u=r.edit(i.getInteriorRingN(a),e);u===null||u.isEmpty()||o.add(u)}return this._factory.createPolygon(s,o.toArray([]))},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},cr.GeometryEditorOperation=function(){},Mu.NoOpGeometryOperation.get=function(){return La},Mu.CoordinateOperation.get=function(){return Aa},Mu.CoordinateSequenceOperation.get=function(){return Ra},Object.defineProperties(cr,Mu);var La=function(){};La.prototype.edit=function(t,e){return t},La.prototype.interfaces_=function(){return[cr.GeometryEditorOperation]},La.prototype.getClass=function(){return La};var Aa=function(){};Aa.prototype.edit=function(t,e){var r=this.editCoordinates(t.getCoordinates(),t);return r===null?t:t instanceof hn?e.createLinearRing(r):t instanceof Rt?e.createLineString(r):t instanceof Ve?r.length>0?e.createPoint(r[0]):e.createPoint():t},Aa.prototype.interfaces_=function(){return[cr.GeometryEditorOperation]},Aa.prototype.getClass=function(){return Aa};var Ra=function(){};Ra.prototype.edit=function(t,e){return t instanceof hn?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Rt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Ve?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},Ra.prototype.interfaces_=function(){return[cr.GeometryEditorOperation]},Ra.prototype.getClass=function(){return Ra};var Ut=function(){var t=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 e=arguments[0];this._coordinates=new Array(e).fill(null);for(var r=0;r<e;r++)t._coordinates[r]=new N}else if(Q(arguments[0],ft)){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++)t._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 u=arguments[0],l=arguments[1];this._coordinates=new Array(u).fill(null),this._dimension=l;for(var c=0;c<u;c++)t._coordinates[c]=new N}}},xd={serialVersionUID:{configurable:!0}};Ut.prototype.setOrdinate=function(t,e,r){switch(e){case ft.X:this._coordinates[t].x=r;break;case ft.Y:this._coordinates[t].y=r;break;case ft.Z:this._coordinates[t].z=r;break;default:throw new xt("invalid ordinateIndex")}},Ut.prototype.size=function(){return this._coordinates.length},Ut.prototype.getOrdinate=function(t,e){switch(e){case ft.X:return this._coordinates[t].x;case ft.Y:return this._coordinates[t].y;case ft.Z:return this._coordinates[t].z}return rt.NaN},Ut.prototype.getCoordinate=function(){if(arguments.length===1){var t=arguments[0];return this._coordinates[t]}else if(arguments.length===2){var e=arguments[0],r=arguments[1];r.x=this._coordinates[e].x,r.y=this._coordinates[e].y,r.z=this._coordinates[e].z}},Ut.prototype.getCoordinateCopy=function(t){return new N(this._coordinates[t])},Ut.prototype.getDimension=function(){return this._dimension},Ut.prototype.getX=function(t){return this._coordinates[t].x},Ut.prototype.clone=function(){for(var t=this,e=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)e[r]=t._coordinates[r].clone();return new Ut(e,this._dimension)},Ut.prototype.expandEnvelope=function(t){for(var e=this,r=0;r<this._coordinates.length;r++)t.expandToInclude(e._coordinates[r]);return t},Ut.prototype.copy=function(){for(var t=this,e=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)e[r]=t._coordinates[r].copy();return new Ut(e,this._dimension)},Ut.prototype.toString=function(){var t=this;if(this._coordinates.length>0){var e=new xr(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var r=1;r<this._coordinates.length;r++)e.append(", "),e.append(t._coordinates[r]);return e.append(")"),e.toString()}else return"()"},Ut.prototype.getY=function(t){return this._coordinates[t].y},Ut.prototype.toCoordinateArray=function(){return this._coordinates},Ut.prototype.interfaces_=function(){return[ft,or]},Ut.prototype.getClass=function(){return Ut},xd.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(Ut,xd);var dn=function(){},nc={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};dn.prototype.readResolve=function(){return dn.instance()},dn.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new Ut(t)}else if(Q(arguments[0],ft)){var e=arguments[0];return new Ut(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new Ut(r):new Ut(r,i)}},dn.prototype.interfaces_=function(){return[no,or]},dn.prototype.getClass=function(){return dn},dn.instance=function(){return dn.instanceObject},nc.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},nc.instanceObject.get=function(){return new dn},Object.defineProperties(dn,nc);var Od=(function(n){function t(){n.call(this),this.map_=new Map}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(r){return this.map_.get(r)||null},t.prototype.put=function(r,i){return this.map_.set(r,i),i},t.prototype.values=function(){for(var r=new U,i=this.map_.values(),s=i.next();!s.done;)r.add(s.value),s=i.next();return r},t.prototype.entrySet=function(){var r=new tc;return this.map_.entries().forEach(function(i){return r.add(i)}),r},t.prototype.size=function(){return this.map_.size()},t})(fs),yt=function n(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=n.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof Rr){var t=arguments[0];this._modelType=t,t===n.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var e=arguments[0];this._modelType=n.FIXED,this.setScale(e)}else if(arguments[0]instanceof n){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}}},ic={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};yt.prototype.equals=function(t){if(!(t instanceof yt))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},yt.prototype.compareTo=function(t){var e=t,r=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new Or(r).compareTo(new Or(i))},yt.prototype.getScale=function(){return this._scale},yt.prototype.isFloating=function(){return this._modelType===yt.FLOATING||this._modelType===yt.FLOATING_SINGLE},yt.prototype.getType=function(){return this._modelType},yt.prototype.toString=function(){var t="UNKNOWN";return this._modelType===yt.FLOATING?t="Floating":this._modelType===yt.FLOATING_SINGLE?t="Floating-Single":this._modelType===yt.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},yt.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(rt.isNaN(t))return t;if(this._modelType===yt.FLOATING_SINGLE){var e=t;return e}return this._modelType===yt.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof N){var r=arguments[0];if(this._modelType===yt.FLOATING)return null;r.x=this.makePrecise(r.x),r.y=this.makePrecise(r.y)}},yt.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===yt.FLOATING?t=16:this._modelType===yt.FLOATING_SINGLE?t=6:this._modelType===yt.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},yt.prototype.setScale=function(t){this._scale=Math.abs(t)},yt.prototype.interfaces_=function(){return[or,sr]},yt.prototype.getClass=function(){return yt},yt.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},ic.serialVersionUID.get=function(){return 7777263578777804e3},ic.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(yt,ic);var Rr=function n(t){this._name=t||null,n.nameToTypeMap.put(t,this)},sc={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};Rr.prototype.readResolve=function(){return Rr.nameToTypeMap.get(this._name)},Rr.prototype.toString=function(){return this._name},Rr.prototype.interfaces_=function(){return[or]},Rr.prototype.getClass=function(){return Rr},sc.serialVersionUID.get=function(){return-552860263173159e4},sc.nameToTypeMap.get=function(){return new Od},Object.defineProperties(Rr,sc),yt.Type=Rr,yt.FIXED=new Rr("FIXED"),yt.FLOATING=new Rr("FLOATING"),yt.FLOATING_SINGLE=new Rr("FLOATING SINGLE");var ut=function n(){this._precisionModel=new yt,this._SRID=0,this._coordinateSequenceFactory=n.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?Q(arguments[0],no)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof yt&&(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]))},Md={serialVersionUID:{configurable:!0}};ut.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new N(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new N(t.getMinX(),t.getMinY()),new N(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new N(t.getMinX(),t.getMinY()),new N(t.getMinX(),t.getMaxY()),new N(t.getMaxX(),t.getMaxY()),new N(t.getMaxX(),t.getMinY()),new N(t.getMinX(),t.getMinY())]),null)},ut.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new Rt(this.getCoordinateSequenceFactory().create(t),this);if(Q(t,ft))return new Rt(t,this)}else return new Rt(this.getCoordinateSequenceFactory().create([]),this)},ut.prototype.createMultiLineString=function(){if(arguments.length===0)return new Oi(null,this);if(arguments.length===1){var t=arguments[0];return new Oi(t,this)}},ut.prototype.buildGeometry=function(t){for(var e=null,r=!1,i=!1,s=t.iterator();s.hasNext();){var o=s.next(),a=o.getClass();e===null&&(e=a),a!==e&&(r=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(e===null)return this.createGeometryCollection();if(r||i)return this.createGeometryCollection(ut.toGeometryArray(t));var u=t.iterator().next(),l=t.size()>1;if(l){if(u instanceof Bt)return this.createMultiPolygon(ut.toPolygonArray(t));if(u instanceof Rt)return this.createMultiLineString(ut.toLineStringArray(t));if(u instanceof Ve)return this.createMultiPoint(ut.toPointArray(t));st.shouldNeverReachHere("Unhandled class: "+u.getClass().getName())}return u},ut.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)},ut.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof N){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(Q(arguments[0],ft)){var e=arguments[0];return new Ve(e,this)}}},ut.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},ut.prototype.createPolygon=function(){if(arguments.length===0)return new Bt(null,null,this);if(arguments.length===1){if(Q(arguments[0],ft)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof hn){var r=arguments[0];return this.createPolygon(r,null)}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return new Bt(i,s,this)}},ut.prototype.getSRID=function(){return this._SRID},ut.prototype.createGeometryCollection=function(){if(arguments.length===0)return new me(null,this);if(arguments.length===1){var t=arguments[0];return new me(t,this)}},ut.prototype.createGeometry=function(t){var e=new cr(this);return e.edit(t,{edit:function(){if(arguments.length===2){var r=arguments[0];return this._coordinateSequenceFactory.create(r)}}})},ut.prototype.getPrecisionModel=function(){return this._precisionModel},ut.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(Q(arguments[0],ft)){var e=arguments[0];return new hn(e,this)}}},ut.prototype.createMultiPolygon=function(){if(arguments.length===0)return new fn(null,this);if(arguments.length===1){var t=arguments[0];return new fn(t,this)}},ut.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new po(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new po(e,this)}else if(arguments[0]instanceof Array){var r=arguments[0];return this.createMultiPoint(r!==null?this.getCoordinateSequenceFactory().create(r):null)}else if(Q(arguments[0],ft)){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=t.getCoordinateSequenceFactory().create(1,i.getDimension());zt.copy(i,o,a,0,1),s[o]=t.createPoint(a)}return this.createMultiPoint(s)}}},ut.prototype.interfaces_=function(){return[or]},ut.prototype.getClass=function(){return ut},ut.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ut.toGeometryArray=function(t){if(t===null)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},ut.getDefaultCoordinateSequenceFactory=function(){return dn.instance()},ut.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ut.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ut.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ut.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ut.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ut.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},ut.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},Md.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties(ut,Md);var Oy=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],Du=function(t){this.geometryFactory=t||new ut};Du.prototype.read=function(t){var e;typeof t=="string"?e=JSON.parse(t):e=t;var r=e.type;if(!Fr[r])throw new Error("Unknown GeoJSON type: "+e.type);return Oy.indexOf(r)!==-1?Fr[r].apply(this,[e.coordinates]):r==="GeometryCollection"?Fr[r].apply(this,[e.geometries]):Fr[r].apply(this,[e])},Du.prototype.write=function(t){var e=t.getGeometryType();if(!Vn[e])throw new Error("Geometry is not supported");return Vn[e].apply(this,[t])};var Fr={Feature:function(n){var t={};for(var e in n)t[e]=n[e];if(n.geometry){var r=n.geometry.type;if(!Fr[r])throw new Error("Unknown GeoJSON type: "+n.type);t.geometry=this.read(n.geometry)}return n.bbox&&(t.bbox=Fr.bbox.apply(this,[n.bbox])),t},FeatureCollection:function(n){var t=this,e={};if(n.features){e.features=[];for(var r=0;r<n.features.length;++r)e.features.push(t.read(n.features[r]))}return n.bbox&&(e.bbox=this.parse.bbox.apply(this,[n.bbox])),e},coordinates:function(n){for(var t=[],e=0;e<n.length;++e){var r=n[e];t.push(new N(r[0],r[1]))}return t},bbox:function(n){return this.geometryFactory.createLinearRing([new N(n[0],n[1]),new N(n[2],n[1]),new N(n[2],n[3]),new N(n[0],n[3]),new N(n[0],n[1])])},Point:function(n){var t=new N(n[0],n[1]);return this.geometryFactory.createPoint(t)},MultiPoint:function(n){for(var t=this,e=[],r=0;r<n.length;++r)e.push(Fr.Point.apply(t,[n[r]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(n){var t=Fr.coordinates.apply(this,[n]);return this.geometryFactory.createLineString(t)},MultiLineString:function(n){for(var t=this,e=[],r=0;r<n.length;++r)e.push(Fr.LineString.apply(t,[n[r]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(n){for(var t=this,e=Fr.coordinates.apply(this,[n[0]]),r=this.geometryFactory.createLinearRing(e),i=[],s=1;s<n.length;++s){var o=n[s],a=Fr.coordinates.apply(t,[o]),u=t.geometryFactory.createLinearRing(a);i.push(u)}return this.geometryFactory.createPolygon(r,i)},MultiPolygon:function(n){for(var t=this,e=[],r=0;r<n.length;++r){var i=n[r];e.push(Fr.Polygon.apply(t,[i]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(n){for(var t=this,e=[],r=0;r<n.length;++r){var i=n[r];e.push(t.read(i))}return this.geometryFactory.createGeometryCollection(e)}},Vn={coordinate:function(n){return[n.x,n.y]},Point:function(n){var t=Vn.coordinate.apply(this,[n.getCoordinate()]);return{type:"Point",coordinates:t}},MultiPoint:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Vn.Point.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(n){for(var t=this,e=[],r=n.getCoordinates(),i=0;i<r.length;++i){var s=r[i];e.push(Vn.coordinate.apply(t,[s]))}return{type:"LineString",coordinates:e}},MultiLineString:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Vn.LineString.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(n){var t=this,e=[],r=Vn.LineString.apply(this,[n._shell]);e.push(r.coordinates);for(var i=0;i<n._holes.length;++i){var s=n._holes[i],o=Vn.LineString.apply(t,[s]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Vn.Polygon.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=i.getGeometryType();e.push(Vn[s].apply(t,[i]))}return{type:"GeometryCollection",geometries:e}}},oc=function(t){this.geometryFactory=t||new ut,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Du(this.geometryFactory)};oc.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===yt.FIXED&&this.reducePrecision(e),e},oc.prototype.reducePrecision=function(t){var e=this,r,i;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(r=0,i=t.points.length;r<i;r++)e.precisionModel.makePrecise(t.points[r]);else if(t.geometries)for(r=0,i=t.geometries.length;r<i;r++)e.reducePrecision(t.geometries[r])};var Dd=function(){this.parser=new Du(this.geometryFactory)};Dd.prototype.write=function(t){return this.parser.write(t)};var z=function(){},Lu={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};z.prototype.interfaces_=function(){return[]},z.prototype.getClass=function(){return z},z.opposite=function(t){return t===z.LEFT?z.RIGHT:t===z.RIGHT?z.LEFT:t},Lu.ON.get=function(){return 0},Lu.LEFT.get=function(){return 1},Lu.RIGHT.get=function(){return 2},Object.defineProperties(z,Lu);function Au(n){this.message=n||""}Au.prototype=new Error,Au.prototype.name="EmptyStackException";function kr(){this.array_=[]}kr.prototype=new _r,kr.prototype.add=function(n){return this.array_.push(n),!0},kr.prototype.get=function(n){if(n<0||n>=this.size())throw new Error;return this.array_[n]},kr.prototype.push=function(n){return this.array_.push(n),n},kr.prototype.pop=function(n){if(this.array_.length===0)throw new Au;return this.array_.pop()},kr.prototype.peek=function(){if(this.array_.length===0)throw new Au;return this.array_[this.array_.length-1]},kr.prototype.empty=function(){return this.array_.length===0},kr.prototype.isEmpty=function(){return this.empty()},kr.prototype.search=function(n){return this.array_.indexOf(n)},kr.prototype.size=function(){return this.array_.length},kr.prototype.toArray=function(){for(var n=this,t=[],e=0,r=this.array_.length;e<r;e++)t.push(n.array_[e]);return t};var Vr=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Vr.prototype.getCoordinate=function(){return this._minCoord},Vr.prototype.getRightmostSide=function(t,e){var r=this.getRightmostSideOfSegment(t,e);return r<0&&(r=this.getRightmostSideOfSegment(t,e-1)),r<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),r},Vr.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();st.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],r=t[this._minIndex+1],i=G.computeOrientation(this._minCoord,r,e),s=!1;(e.y<this._minCoord.y&&r.y<this._minCoord.y&&i===G.COUNTERCLOCKWISE||e.y>this._minCoord.y&&r.y>this._minCoord.y&&i===G.CLOCKWISE)&&(s=!0),s&&(this._minIndex=this._minIndex-1)},Vr.prototype.getRightmostSideOfSegment=function(t,e){var r=t.getEdge(),i=r.getCoordinates();if(e<0||e+1>=i.length||i[e].y===i[e+1].y)return-1;var s=z.LEFT;return i[e].y<i[e+1].y&&(s=z.RIGHT),s},Vr.prototype.getEdge=function(){return this._orientedDe},Vr.prototype.checkForRightmostCoordinate=function(t){for(var e=this,r=t.getEdge().getCoordinates(),i=0;i<r.length-1;i++)(e._minCoord===null||r[i].x>e._minCoord.x)&&(e._minDe=t,e._minIndex=i,e._minCoord=r[i])},Vr.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Vr.prototype.findEdge=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next();i.isForward()&&e.checkForRightmostCoordinate(i)}st.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===z.LEFT&&(this._orientedDe=this._minDe.getSym())},Vr.prototype.interfaces_=function(){return[]},Vr.prototype.getClass=function(){return Vr};var zn=(function(n){function t(e,r){n.call(this,t.msgWithCoord(e,r)),this.pt=r?new N(r):null,this.name="TopologyException"}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(r,i){return i?r:r+" [ "+i+" ]"},t})(Ln),Ru=function(){this.array_=[]};Ru.prototype.addLast=function(t){this.array_.push(t)},Ru.prototype.removeFirst=function(){return this.array_.shift()},Ru.prototype.isEmpty=function(){return this.array_.length===0};var ve=function(){this._finder=null,this._dirEdgeList=new U,this._nodes=new U,this._rightMostCoord=null,this._env=null,this._finder=new Vr};ve.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}},ve.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},ve.prototype.computeNodeDepth=function(t){for(var e=this,r=null,i=t.getEdges().iterator();i.hasNext();){var s=i.next();if(s.isVisited()||s.getSym().isVisited()){r=s;break}}if(r===null)throw new zn("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(r);for(var o=t.getEdges().iterator();o.hasNext();){var a=o.next();a.setVisited(!0),e.copySymDepths(a)}},ve.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(z.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},ve.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},ve.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(z.RIGHT)>=1&&e.getDepth(z.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},ve.prototype.computeDepths=function(t){var e=this,r=new tc,i=new Ru,s=t.getNode();for(i.addLast(s),r.add(s),t.setVisited(!0);!i.isEmpty();){var o=i.removeFirst();r.add(o),e.computeNodeDepth(o);for(var a=o.getEdges().iterator();a.hasNext();){var u=a.next(),l=u.getSym();if(!l.isVisited()){var c=l.getNode();r.contains(c)||(i.addLast(c),r.add(c))}}}},ve.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},ve.prototype.getEnvelope=function(){if(this._env===null){for(var t=new X,e=this._dirEdgeList.iterator();e.hasNext();)for(var r=e.next(),i=r.getEdge().getCoordinates(),s=0;s<i.length-1;s++)t.expandToInclude(i[s]);this._env=t}return this._env},ve.prototype.addReachable=function(t){var e=this,r=new kr;for(r.add(t);!r.empty();){var i=r.pop();e.add(i,r)}},ve.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(z.LEFT,t.getDepth(z.RIGHT)),e.setDepth(z.RIGHT,t.getDepth(z.LEFT))},ve.prototype.add=function(t,e){var r=this;t.setVisited(!0),this._nodes.add(t);for(var i=t.getEdges().iterator();i.hasNext();){var s=i.next();r._dirEdgeList.add(s);var o=s.getSym(),a=o.getNode();a.isVisited()||e.push(a)}},ve.prototype.getNodes=function(){return this._nodes},ve.prototype.getDirectedEdges=function(){return this._dirEdgeList},ve.prototype.interfaces_=function(){return[sr]},ve.prototype.getClass=function(){return ve};var Pt=function n(){var t=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var r=arguments[0];this.init(1),this.location[z.ON]=r}else if(arguments[0]instanceof n){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var s=0;s<this.location.length;s++)t.location[s]=i.location[s]}}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];this.init(3),this.location[z.ON]=o,this.location[z.LEFT]=a,this.location[z.RIGHT]=u}};Pt.prototype.setAllLocations=function(t){for(var e=this,r=0;r<this.location.length;r++)e.location[r]=t},Pt.prototype.isNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]!==O.NONE)return!1;return!0},Pt.prototype.setAllLocationsIfNull=function(t){for(var e=this,r=0;r<this.location.length;r++)e.location[r]===O.NONE&&(e.location[r]=t)},Pt.prototype.isLine=function(){return this.location.length===1},Pt.prototype.merge=function(t){var e=this;if(t.location.length>this.location.length){var r=new Array(3).fill(null);r[z.ON]=this.location[z.ON],r[z.LEFT]=O.NONE,r[z.RIGHT]=O.NONE,this.location=r}for(var i=0;i<this.location.length;i++)e.location[i]===O.NONE&&i<t.location.length&&(e.location[i]=t.location[i])},Pt.prototype.getLocations=function(){return this.location},Pt.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[z.LEFT];this.location[z.LEFT]=this.location[z.RIGHT],this.location[z.RIGHT]=t},Pt.prototype.toString=function(){var t=new xr;return this.location.length>1&&t.append(O.toLocationSymbol(this.location[z.LEFT])),t.append(O.toLocationSymbol(this.location[z.ON])),this.location.length>1&&t.append(O.toLocationSymbol(this.location[z.RIGHT])),t.toString()},Pt.prototype.setLocations=function(t,e,r){this.location[z.ON]=t,this.location[z.LEFT]=e,this.location[z.RIGHT]=r},Pt.prototype.get=function(t){return t<this.location.length?this.location[t]:O.NONE},Pt.prototype.isArea=function(){return this.location.length>1},Pt.prototype.isAnyNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]===O.NONE)return!0;return!1},Pt.prototype.setLocation=function(){if(arguments.length===1){var t=arguments[0];this.setLocation(z.ON,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.location[e]=r}},Pt.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(O.NONE)},Pt.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},Pt.prototype.allPositionsEqual=function(t){for(var e=this,r=0;r<this.location.length;r++)if(e.location[r]!==t)return!1;return!0},Pt.prototype.interfaces_=function(){return[]},Pt.prototype.getClass=function(){return Pt};var Et=function n(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new Pt(t),this.elt[1]=new Pt(t)}else if(arguments[0]instanceof n){var e=arguments[0];this.elt[0]=new Pt(e.elt[0]),this.elt[1]=new Pt(e.elt[1])}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.elt[0]=new Pt(O.NONE),this.elt[1]=new Pt(O.NONE),this.elt[r].setLocation(i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this.elt[0]=new Pt(s,o,a),this.elt[1]=new Pt(s,o,a)}else if(arguments.length===4){var u=arguments[0],l=arguments[1],c=arguments[2],h=arguments[3];this.elt[0]=new Pt(O.NONE,O.NONE,O.NONE),this.elt[1]=new Pt(O.NONE,O.NONE,O.NONE),this.elt[u].setLocations(l,c,h)}};Et.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Et.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Et.prototype.isNull=function(t){return this.elt[t].isNull()},Et.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.elt[e].setAllLocationsIfNull(r)}},Et.prototype.isLine=function(t){return this.elt[t].isLine()},Et.prototype.merge=function(t){for(var e=this,r=0;r<2;r++)e.elt[r]===null&&t.elt[r]!==null?e.elt[r]=new Pt(t.elt[r]):e.elt[r].merge(t.elt[r])},Et.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Et.prototype.getLocation=function(){if(arguments.length===1){var t=arguments[0];return this.elt[t].get(z.ON)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return this.elt[e].get(r)}},Et.prototype.toString=function(){var t=new xr;return this.elt[0]!==null&&(t.append("A:"),t.append(this.elt[0].toString())),this.elt[1]!==null&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Et.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var t=arguments[0];return this.elt[t].isArea()}},Et.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Et.prototype.setLocation=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(z.ON,e)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this.elt[r].setLocation(i,s)}},Et.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Et.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Et.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new Pt(this.elt[t].location[0]))},Et.prototype.interfaces_=function(){return[]},Et.prototype.getClass=function(){return Et},Et.toLineLabel=function(t){for(var e=new Et(O.NONE),r=0;r<2;r++)e.setLocation(r,t.getLocation(r));return e};var qt=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new U,this._pts=new U,this._label=new Et(O.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new U,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};qt.prototype.computeRing=function(){var t=this;if(this._ring!==null)return null;for(var e=new Array(this._pts.size()).fill(null),r=0;r<this._pts.size();r++)e[r]=t._pts.get(r);this._ring=this._geometryFactory.createLinearRing(e),this._isHole=G.isCCW(this._ring.getCoordinates())},qt.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},qt.prototype.computePoints=function(t){var e=this;this._startDe=t;var r=t,i=!0;do{if(r===null)throw new zn("Found null DirectedEdge");if(r.getEdgeRing()===e)throw new zn("Directed Edge visited twice during ring-building at "+r.getCoordinate());e._edges.add(r);var s=r.getLabel();st.isTrue(s.isArea()),e.mergeLabel(s),e.addPoints(r.getEdge(),r.isForward(),i),i=!1,e.setEdgeRing(r,e),r=e.getNext(r)}while(r!==this._startDe)},qt.prototype.getLinearRing=function(){return this._ring},qt.prototype.getCoordinate=function(t){return this._pts.get(t)},qt.prototype.computeMaxNodeDegree=function(){var t=this;this._maxNodeDegree=0;var e=this._startDe;do{var r=e.getNode(),i=r.getEdges().getOutgoingDegree(t);i>t._maxNodeDegree&&(t._maxNodeDegree=i),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},qt.prototype.addPoints=function(t,e,r){var i=this,s=t.getCoordinates();if(e){var o=1;r&&(o=0);for(var a=o;a<s.length;a++)i._pts.add(s[a])}else{var u=s.length-2;r&&(u=s.length-1);for(var l=u;l>=0;l--)i._pts.add(s[l])}},qt.prototype.isHole=function(){return this._isHole},qt.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)},qt.prototype.containsPoint=function(t){var e=this.getLinearRing(),r=e.getEnvelopeInternal();if(!r.contains(t)||!G.isPointInRing(t,e.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var s=i.next();if(s.containsPoint(t))return!1}return!0},qt.prototype.addHole=function(t){this._holes.add(t)},qt.prototype.isShell=function(){return this._shell===null},qt.prototype.getLabel=function(){return this._label},qt.prototype.getEdges=function(){return this._edges},qt.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},qt.prototype.getShell=function(){return this._shell},qt.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=e.getLocation(r,z.RIGHT);if(i===O.NONE)return null;if(this._label.getLocation(r)===O.NONE)return this._label.setLocation(r,i),null}},qt.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)},qt.prototype.toPolygon=function(t){for(var e=this,r=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)r[i]=e._holes.get(i).getLinearRing();var s=t.createPolygon(this.getLinearRing(),r);return s},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt};var My=(function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.setEdgeRing=function(r,i){r.setMinEdgeRing(i)},t.prototype.getNext=function(r){return r.getNextMin()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(qt),Dy=(function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.buildMinimalRings=function(){var r=this,i=new U,s=this._startDe;do{if(s.getMinEdgeRing()===null){var o=new My(s,r._geometryFactory);i.add(o)}s=s.getNext()}while(s!==this._startDe);return i},t.prototype.setEdgeRing=function(r,i){r.setEdgeRing(i)},t.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var r=this,i=this._startDe;do{var s=i.getNode();s.getEdges().linkMinimalDirectedEdges(r),i=i.getNext()}while(i!==this._startDe)},t.prototype.getNext=function(r){return r.getNext()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(qt),Qe=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 t=arguments[0];this._label=t}}};Qe.prototype.setVisited=function(t){this._isVisited=t},Qe.prototype.setInResult=function(t){this._isInResult=t},Qe.prototype.isCovered=function(){return this._isCovered},Qe.prototype.isCoveredSet=function(){return this._isCoveredSet},Qe.prototype.setLabel=function(t){this._label=t},Qe.prototype.getLabel=function(){return this._label},Qe.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},Qe.prototype.updateIM=function(t){st.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},Qe.prototype.isInResult=function(){return this._isInResult},Qe.prototype.isVisited=function(){return this._isVisited},Qe.prototype.interfaces_=function(){return[]},Qe.prototype.getClass=function(){return Qe};var Fu=(function(n){function t(){n.call(this),this._coord=null,this._edges=null;var e=arguments[0],r=arguments[1];this._coord=e,this._edges=r,this._label=new Et(0,O.NONE)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var r=this.getEdges().getEdges().iterator();r.hasNext();){var i=r.next();if(i.getEdge().isInResult())return!0}return!1},t.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(r){r.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(r){},t.prototype.computeMergedLocation=function(r,i){var s=O.NONE;if(s=this._label.getLocation(i),!r.isNull(i)){var o=r.getLocation(i);s!==O.BOUNDARY&&(s=o)}return s},t.prototype.setLabel=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];this._label===null?this._label=new Et(r,i):this._label.setLocation(r,i)}else return n.prototype.setLabel.apply(this,arguments)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){var r=this;if(arguments[0]instanceof t){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof Et)for(var s=arguments[0],o=0;o<2;o++){var a=r.computeMergedLocation(s,o),u=r._label.getLocation(o);u===O.NONE&&r._label.setLocation(o,a)}},t.prototype.add=function(r){this._edges.insert(r),r.setNode(this)},t.prototype.setLabelBoundary=function(r){if(this._label===null)return null;var i=O.NONE;this._label!==null&&(i=this._label.getLocation(r));var s=null;switch(i){case O.BOUNDARY:s=O.INTERIOR;break;case O.INTERIOR:s=O.BOUNDARY;break;default:s=O.BOUNDARY;break}this._label.setLocation(r,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(Qe),zr=function(){this.nodeMap=new he,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};zr.prototype.find=function(t){return this.nodeMap.get(t)},zr.prototype.addNode=function(){if(arguments[0]instanceof N){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof Fu){var r=arguments[0],i=this.nodeMap.get(r.getCoordinate());return i===null?(this.nodeMap.put(r.getCoordinate(),r),r):(i.mergeLabel(r),i)}},zr.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},zr.prototype.iterator=function(){return this.nodeMap.values().iterator()},zr.prototype.values=function(){return this.nodeMap.values()},zr.prototype.getBoundaryNodes=function(t){for(var e=new U,r=this.iterator();r.hasNext();){var i=r.next();i.getLabel().getLocation(t)===O.BOUNDARY&&e.add(i)}return e},zr.prototype.add=function(t){var e=t.getCoordinate(),r=this.addNode(e);r.add(t)},zr.prototype.interfaces_=function(){return[]},zr.prototype.getClass=function(){return zr};var St=function(){},Fa={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};St.prototype.interfaces_=function(){return[]},St.prototype.getClass=function(){return St},St.isNorthern=function(t){return t===St.NE||t===St.NW},St.isOpposite=function(t,e){if(t===e)return!1;var r=(t-e+4)%4;return r===2},St.commonHalfPlane=function(t,e){if(t===e)return t;var r=(t-e+4)%4;if(r===2)return-1;var i=t<e?t:e,s=t>e?t:e;return i===0&&s===3?3:i},St.isInHalfPlane=function(t,e){return e===St.SE?t===St.SE||t===St.SW:t===e||t===e+1},St.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new xt("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?St.NE:St.SE:e>=0?St.NW:St.SW}else if(arguments[0]instanceof N&&arguments[1]instanceof N){var r=arguments[0],i=arguments[1];if(i.x===r.x&&i.y===r.y)throw new xt("Cannot compute the quadrant for two identical points "+r);return i.x>=r.x?i.y>=r.y?St.NE:St.SE:i.y>=r.y?St.NW:St.SW}},Fa.NE.get=function(){return 0},Fa.NW.get=function(){return 1},Fa.SW.get=function(){return 2},Fa.SE.get=function(){return 3},Object.defineProperties(St,Fa);var fe=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 t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2],s=null;this._edge=e,this.init(r,i),this._label=s}else if(arguments.length===4){var o=arguments[0],a=arguments[1],u=arguments[2],l=arguments[3];this._edge=o,this.init(a,u),this._label=l}};fe.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:G.computeOrientation(t._p0,t._p1,this._p1)},fe.prototype.getDy=function(){return this._dy},fe.prototype.getCoordinate=function(){return this._p0},fe.prototype.setNode=function(t){this._node=t},fe.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),r=this.getClass().getName(),i=r.lastIndexOf("."),s=r.substring(i+1);t.print(" "+s+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)},fe.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},fe.prototype.getDirectedCoordinate=function(){return this._p1},fe.prototype.getDx=function(){return this._dx},fe.prototype.getLabel=function(){return this._label},fe.prototype.getEdge=function(){return this._edge},fe.prototype.getQuadrant=function(){return this._quadrant},fe.prototype.getNode=function(){return this._node},fe.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),r=e.lastIndexOf("."),i=e.substring(r+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label},fe.prototype.computeLabel=function(t){},fe.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=St.quadrant(this._dx,this._dy),st.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},fe.prototype.interfaces_=function(){return[sr]},fe.prototype.getClass=function(){return fe};var ac=(function(n){function t(){var e=arguments[0],r=arguments[1];if(n.call(this,e),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=r,r)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var i=e.getNumPoints()-1;this.init(e.getCoordinate(i),e.getCoordinate(i-1))}this.computeDirectedLabel()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getNextMin=function(){return this._nextMin},t.prototype.getDepth=function(r){return this._depth[r]},t.prototype.setVisited=function(r){this._isVisited=r},t.prototype.computeDirectedLabel=function(){this._label=new Et(this._edge.getLabel()),this._isForward||this._label.flip()},t.prototype.getNext=function(){return this._next},t.prototype.setDepth=function(r,i){if(this._depth[r]!==-999&&this._depth[r]!==i)throw new zn("assigned depths do not match",this.getCoordinate());this._depth[r]=i},t.prototype.isInteriorAreaEdge=function(){for(var r=this,i=!0,s=0;s<2;s++)r._label.isArea(s)&&r._label.getLocation(s,z.LEFT)===O.INTERIOR&&r._label.getLocation(s,z.RIGHT)===O.INTERIOR||(i=!1);return i},t.prototype.setNextMin=function(r){this._nextMin=r},t.prototype.print=function(r){n.prototype.print.call(this,r),r.print(" "+this._depth[z.LEFT]+"/"+this._depth[z.RIGHT]),r.print(" ("+this.getDepthDelta()+")"),this._isInResult&&r.print(" inResult")},t.prototype.setMinEdgeRing=function(r){this._minEdgeRing=r},t.prototype.isLineEdge=function(){var r=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,O.EXTERIOR),s=!this._label.isArea(1)||this._label.allPositionsEqual(1,O.EXTERIOR);return r&&i&&s},t.prototype.setEdgeRing=function(r){this._edgeRing=r},t.prototype.getMinEdgeRing=function(){return this._minEdgeRing},t.prototype.getDepthDelta=function(){var r=this._edge.getDepthDelta();return this._isForward||(r=-r),r},t.prototype.setInResult=function(r){this._isInResult=r},t.prototype.getSym=function(){return this._sym},t.prototype.isForward=function(){return this._isForward},t.prototype.getEdge=function(){return this._edge},t.prototype.printEdge=function(r){this.print(r),r.print(" "),this._isForward?this._edge.print(r):this._edge.printReverse(r)},t.prototype.setSym=function(r){this._sym=r},t.prototype.setVisitedEdge=function(r){this.setVisited(r),this._sym.setVisited(r)},t.prototype.setEdgeDepths=function(r,i){var s=this.getEdge().getDepthDelta();this._isForward||(s=-s);var o=1;r===z.LEFT&&(o=-1);var a=z.opposite(r),u=s*o,l=i+u;this.setDepth(r,i),this.setDepth(a,l)},t.prototype.getEdgeRing=function(){return this._edgeRing},t.prototype.isInResult=function(){return this._isInResult},t.prototype.setNext=function(r){this._next=r},t.prototype.isVisited=function(){return this._isVisited},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.depthFactor=function(r,i){return r===O.EXTERIOR&&i===O.INTERIOR?1:r===O.INTERIOR&&i===O.EXTERIOR?-1:0},t})(fe),go=function(){};go.prototype.createNode=function(t){return new Fu(t,null)},go.prototype.interfaces_=function(){return[]},go.prototype.getClass=function(){return go};var Dt=function(){if(this._edges=new U,this._nodes=null,this._edgeEndList=new U,arguments.length===0)this._nodes=new zr(new go);else if(arguments.length===1){var t=arguments[0];this._nodes=new zr(t)}};Dt.prototype.printEdges=function(t){var e=this;t.println("Edges:");for(var r=0;r<this._edges.size();r++){t.println("edge "+r+":");var i=e._edges.get(r);i.print(t),i.eiList.print(t)}},Dt.prototype.find=function(t){return this._nodes.find(t)},Dt.prototype.addNode=function(){if(arguments[0]instanceof Fu){var t=arguments[0];return this._nodes.addNode(t)}else if(arguments[0]instanceof N){var e=arguments[0];return this._nodes.addNode(e)}},Dt.prototype.getNodeIterator=function(){return this._nodes.iterator()},Dt.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkResultDirectedEdges()}},Dt.prototype.debugPrintln=function(t){ne.out.println(t)},Dt.prototype.isBoundaryNode=function(t,e){var r=this._nodes.find(e);if(r===null)return!1;var i=r.getLabel();return i!==null&&i.getLocation(t)===O.BOUNDARY},Dt.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkAllDirectedEdges()}},Dt.prototype.matchInSameDirection=function(t,e,r,i){return t.equals(r)?G.computeOrientation(t,e,i)===G.COLLINEAR&&St.quadrant(t,e)===St.quadrant(r,i):!1},Dt.prototype.getEdgeEnds=function(){return this._edgeEndList},Dt.prototype.debugPrint=function(t){ne.out.print(t)},Dt.prototype.getEdgeIterator=function(){return this._edges.iterator()},Dt.prototype.findEdgeInSameDirection=function(t,e){for(var r=this,i=0;i<this._edges.size();i++){var s=r._edges.get(i),o=s.getCoordinates();if(r.matchInSameDirection(t,e,o[0],o[1])||r.matchInSameDirection(t,e,o[o.length-1],o[o.length-2]))return s}return null},Dt.prototype.insertEdge=function(t){this._edges.add(t)},Dt.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var r=e.next();if(r.getEdge()===t)return r}return null},Dt.prototype.addEdges=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next();e._edges.add(i);var s=new ac(i,!0),o=new ac(i,!1);s.setSym(o),o.setSym(s),e.add(s),e.add(o)}},Dt.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},Dt.prototype.getNodes=function(){return this._nodes.values()},Dt.prototype.findEdge=function(t,e){for(var r=this,i=0;i<this._edges.size();i++){var s=r._edges.get(i),o=s.getCoordinates();if(t.equals(o[0])&&e.equals(o[1]))return s}return null},Dt.prototype.interfaces_=function(){return[]},Dt.prototype.getClass=function(){return Dt},Dt.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){var r=e.next();r.getEdges().linkResultDirectedEdges()}};var ze=function(){this._geometryFactory=null,this._shellList=new U;var t=arguments[0];this._geometryFactory=t};ze.prototype.sortShellsAndHoles=function(t,e,r){for(var i=t.iterator();i.hasNext();){var s=i.next();s.isHole()?r.add(s):e.add(s)}},ze.prototype.computePolygons=function(t){for(var e=this,r=new U,i=t.iterator();i.hasNext();){var s=i.next(),o=s.toPolygon(e._geometryFactory);r.add(o)}return r},ze.prototype.placeFreeHoles=function(t,e){for(var r=this,i=e.iterator();i.hasNext();){var s=i.next();if(s.getShell()===null){var o=r.findEdgeRingContaining(s,t);if(o===null)throw new zn("unable to assign hole to a shell",s.getCoordinate(0));s.setShell(o)}}},ze.prototype.buildMinimalEdgeRings=function(t,e,r){for(var i=this,s=new U,o=t.iterator();o.hasNext();){var a=o.next();if(a.getMaxNodeDegree()>2){a.linkDirectedEdgesForMinimalEdgeRings();var u=a.buildMinimalRings(),l=i.findShell(u);l!==null?(i.placePolygonHoles(l,u),e.add(l)):r.addAll(u)}else s.add(a)}return s},ze.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var r=e.next();if(r.containsPoint(t))return!0}return!1},ze.prototype.buildMaximalEdgeRings=function(t){for(var e=this,r=new U,i=t.iterator();i.hasNext();){var s=i.next();if(s.isInResult()&&s.getLabel().isArea()&&s.getEdgeRing()===null){var o=new Dy(s,e._geometryFactory);r.add(o),o.setInResult()}}return r},ze.prototype.placePolygonHoles=function(t,e){for(var r=e.iterator();r.hasNext();){var i=r.next();i.isHole()&&i.setShell(t)}},ze.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t},ze.prototype.findEdgeRingContaining=function(t,e){for(var r=t.getLinearRing(),i=r.getEnvelopeInternal(),s=r.getCoordinateN(0),o=null,a=null,u=e.iterator();u.hasNext();){var l=u.next(),c=l.getLinearRing(),h=c.getEnvelopeInternal();o!==null&&(a=o.getLinearRing().getEnvelopeInternal());var d=!1;h.contains(i)&&G.isPointInRing(s,c.getCoordinates())&&(d=!0),d&&(o===null||a.contains(h))&&(o=l)}return o},ze.prototype.findShell=function(t){for(var e=0,r=null,i=t.iterator();i.hasNext();){var s=i.next();s.isHole()||(r=s,e++)}return st.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),r},ze.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],r=arguments[1];Dt.linkResultDirectedEdges(r);var i=this.buildMaximalEdgeRings(e),s=new U,o=this.buildMinimalEdgeRings(i,this._shellList,s);this.sortShellsAndHoles(o,this._shellList,s),this.placeFreeHoles(this._shellList,s)}},ze.prototype.interfaces_=function(){return[]},ze.prototype.getClass=function(){return ze};var mo=function(){};mo.prototype.getBounds=function(){},mo.prototype.interfaces_=function(){return[]},mo.prototype.getClass=function(){return mo};var Sr=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};Sr.prototype.getItem=function(){return this._item},Sr.prototype.getBounds=function(){return this._bounds},Sr.prototype.interfaces_=function(){return[mo,or]},Sr.prototype.getClass=function(){return Sr};var Un=function(){this._size=null,this._items=null,this._size=0,this._items=new U,this._items.add(null)};Un.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Un.prototype.size=function(){return this._size},Un.prototype.reorder=function(t){for(var e=this,r=null,i=this._items.get(t);t*2<=this._size&&(r=t*2,r!==e._size&&e._items.get(r+1).compareTo(e._items.get(r))<0&&r++,e._items.get(r).compareTo(i)<0);t=r)e._items.set(t,e._items.get(r));this._items.set(t,i)},Un.prototype.clear=function(){this._size=0,this._items.clear()},Un.prototype.isEmpty=function(){return this._size===0},Un.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var r=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(r/2)))<0;r/=2)e._items.set(r,e._items.get(Math.trunc(r/2)));this._items.set(r,t)},Un.prototype.interfaces_=function(){return[]},Un.prototype.getClass=function(){return Un};var ai=function(){};ai.prototype.visitItem=function(t){},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai};var ds=function(){};ds.prototype.insert=function(t,e){},ds.prototype.remove=function(t,e){},ds.prototype.query=function(){},ds.prototype.interfaces_=function(){return[]},ds.prototype.getClass=function(){return ds};var Jt=function(){if(this._childBoundables=new U,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._level=t}}},Ld={serialVersionUID:{configurable:!0}};Jt.prototype.getLevel=function(){return this._level},Jt.prototype.size=function(){return this._childBoundables.size()},Jt.prototype.getChildBoundables=function(){return this._childBoundables},Jt.prototype.addChildBoundable=function(t){st.isTrue(this._bounds===null),this._childBoundables.add(t)},Jt.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Jt.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},Jt.prototype.interfaces_=function(){return[mo,or]},Jt.prototype.getClass=function(){return Jt},Ld.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(Jt,Ld);var Cr=function(){};Cr.reverseOrder=function(){return{compare:function(e,r){return r.compareTo(e)}}},Cr.min=function(t){return Cr.sort(t),t.get(0)},Cr.sort=function(t,e){var r=t.toArray();e?xi.sort(r,e):xi.sort(r);for(var i=t.iterator(),s=0,o=r.length;s<o;s++)i.next(),i.set(r[s])},Cr.singletonList=function(t){var e=new U;return e.add(t),e};var Xt=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],r=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=r,this._distance=this.distance()};Xt.prototype.expandToQueue=function(t,e){var r=Xt.isComposite(this._boundable1),i=Xt.isComposite(this._boundable2);if(r&&i)return Xt.area(this._boundable1)>Xt.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(r)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new xt("neither boundable is composite")},Xt.prototype.isLeaves=function(){return!(Xt.isComposite(this._boundable1)||Xt.isComposite(this._boundable2))},Xt.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},Xt.prototype.expand=function(t,e,r,i){for(var s=this,o=t.getChildBoundables(),a=o.iterator();a.hasNext();){var u=a.next(),l=new Xt(u,e,s._itemDistance);l.getDistance()<i&&r.add(l)}},Xt.prototype.getBoundable=function(t){return t===0?this._boundable1:this._boundable2},Xt.prototype.getDistance=function(){return this._distance},Xt.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},Xt.prototype.interfaces_=function(){return[sr]},Xt.prototype.getClass=function(){return Xt},Xt.area=function(t){return t.getBounds().getArea()},Xt.isComposite=function(t){return t instanceof Jt};var $t=function n(){if(this._root=null,this._built=!1,this._itemBoundables=new U,this._nodeCapacity=null,arguments.length===0){var t=n.DEFAULT_NODE_CAPACITY;this._nodeCapacity=t}else if(arguments.length===1){var e=arguments[0];st.isTrue(e>1,"Node capacity must be greater than 1"),this._nodeCapacity=e}},ku={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};$t.prototype.getNodeCapacity=function(){return this._nodeCapacity},$t.prototype.lastNode=function(t){return t.get(t.size()-1)},$t.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],r=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof Jt?r+=t.size(s):s instanceof Sr&&(r+=1)}return r}},$t.prototype.removeItem=function(t,e){for(var r=null,i=t.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof Sr&&s.getItem()===e&&(r=s)}return r!==null?(t.getChildBoundables().remove(r),!0):!1},$t.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new U:e}else if(arguments.length===1){for(var r=arguments[0],i=new U,s=r.getChildBoundables().iterator();s.hasNext();){var o=s.next();if(o instanceof Jt){var a=t.itemsTree(o);a!==null&&i.add(a)}else o instanceof Sr?i.add(o.getItem()):st.shouldNeverReachHere()}return i.size()<=0?null:i}},$t.prototype.insert=function(t,e){st.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Sr(t,e))},$t.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],r=new U;return this.boundablesAtLevel(e,this._root,r),r}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(st.isTrue(i>-2),s.getLevel()===i)return o.add(s),null;for(var a=s.getChildBoundables().iterator();a.hasNext();){var u=a.next();u instanceof Jt?t.boundablesAtLevel(i,u,o):(st.isTrue(u instanceof Sr),i===-1&&o.add(u))}return null}},$t.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var r=new U;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,r),r}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(Q(arguments[2],ai)&&arguments[0]instanceof Object&&arguments[1]instanceof Jt)for(var o=arguments[0],a=arguments[1],u=arguments[2],l=a.getChildBoundables(),c=0;c<l.size();c++){var h=l.get(c);t.getIntersectsOp().intersects(h.getBounds(),o)&&(h instanceof Jt?t.query(o,h,u):h instanceof Sr?u.visitItem(h.getItem()):st.shouldNeverReachHere())}else if(Q(arguments[2],_r)&&arguments[0]instanceof Object&&arguments[1]instanceof Jt)for(var d=arguments[0],g=arguments[1],v=arguments[2],E=g.getChildBoundables(),C=0;C<E.size();C++){var b=E.get(C);t.getIntersectsOp().intersects(b.getBounds(),d)&&(b instanceof Jt?t.query(d,b,v):b instanceof Sr?v.add(b.getItem()):st.shouldNeverReachHere())}}},$t.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},$t.prototype.getRoot=function(){return this.build(),this._root},$t.prototype.remove=function(){var t=this;if(arguments.length===2){var e=arguments[0],r=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),e)?this.remove(e,this._root,r):!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 u=null,l=s.getChildBoundables().iterator();l.hasNext();){var c=l.next();if(t.getIntersectsOp().intersects(c.getBounds(),i)&&c instanceof Jt&&(a=t.remove(i,c,o),a)){u=c;break}}return u!==null&&u.getChildBoundables().isEmpty()&&s.getChildBoundables().remove(u),a}},$t.prototype.createHigherLevels=function(t,e){st.isTrue(!t.isEmpty());var r=this.createParentBoundables(t,e+1);return r.size()===1?r.get(0):this.createHigherLevels(r,e+1)},$t.prototype.depth=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var e=arguments[0],r=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof Jt){var o=t.depth(s);o>r&&(r=o)}}return r+1}},$t.prototype.createParentBoundables=function(t,e){var r=this;st.isTrue(!t.isEmpty());var i=new U;i.add(this.createNode(e));var s=new U(t);Cr.sort(s,this.getComparator());for(var o=s.iterator();o.hasNext();){var a=o.next();r.lastNode(i).getChildBoundables().size()===r.getNodeCapacity()&&i.add(r.createNode(e)),r.lastNode(i).addChildBoundable(a)}return i},$t.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},$t.prototype.interfaces_=function(){return[or]},$t.prototype.getClass=function(){return $t},$t.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},ku.IntersectsOp.get=function(){return Ly},ku.serialVersionUID.get=function(){return-3886435814360241e3},ku.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties($t,ku);var Ly=function(){},vo=function(){};vo.prototype.distance=function(t,e){},vo.prototype.interfaces_=function(){return[]},vo.prototype.getClass=function(){return vo};var Ad=(function(n){function t(r){r=r||t.DEFAULT_NODE_CAPACITY,n.call(this,r)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return t.prototype.createParentBoundablesFromVerticalSlices=function(i,s){var o=this;st.isTrue(i.length>0);for(var a=new U,u=0;u<i.length;u++)a.addAll(o.createParentBoundablesFromVerticalSlice(i[u],s));return a},t.prototype.createNode=function(i){return new Rd(i)},t.prototype.size=function(){return arguments.length===0?n.prototype.size.call(this):n.prototype.size.apply(this,arguments)},t.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];if(i.isNull())return null;n.prototype.insert.call(this,i,s)}else return n.prototype.insert.apply(this,arguments)},t.prototype.getIntersectsOp=function(){return t.intersectsOp},t.prototype.verticalSlices=function(i,s){for(var o=Math.trunc(Math.ceil(i.size()/s)),a=new Array(s).fill(null),u=i.iterator(),l=0;l<s;l++){a[l]=new U;for(var c=0;u.hasNext()&&c<o;){var h=u.next();a[l].add(h),c++}}return a},t.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return n.prototype.query.call(this,i)}else if(arguments.length===2){var s=arguments[0],o=arguments[1];n.prototype.query.call(this,s,o)}else if(arguments.length===3){if(Q(arguments[2],ai)&&arguments[0]instanceof Object&&arguments[1]instanceof Jt){var a=arguments[0],u=arguments[1],l=arguments[2];n.prototype.query.call(this,a,u,l)}else if(Q(arguments[2],_r)&&arguments[0]instanceof Object&&arguments[1]instanceof Jt){var c=arguments[0],h=arguments[1],d=arguments[2];n.prototype.query.call(this,c,h,d)}}},t.prototype.getComparator=function(){return t.yComparator},t.prototype.createParentBoundablesFromVerticalSlice=function(i,s){return n.prototype.createParentBoundables.call(this,i,s)},t.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return n.prototype.remove.call(this,i,s)}else return n.prototype.remove.apply(this,arguments)},t.prototype.depth=function(){return arguments.length===0?n.prototype.depth.call(this):n.prototype.depth.apply(this,arguments)},t.prototype.createParentBoundables=function(i,s){st.isTrue(!i.isEmpty());var o=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),a=new U(i);Cr.sort(a,t.xComparator);var u=this.verticalSlices(a,Math.trunc(Math.ceil(Math.sqrt(o))));return this.createParentBoundablesFromVerticalSlices(u,s)},t.prototype.nearestNeighbour=function(){if(arguments.length===1){if(Q(arguments[0],vo)){var i=arguments[0],s=new Xt(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(s)}else if(arguments[0]instanceof Xt){var o=arguments[0];return this.nearestNeighbour(o,rt.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof t&&Q(arguments[1],vo)){var a=arguments[0],u=arguments[1],l=new Xt(this.getRoot(),a.getRoot(),u);return this.nearestNeighbour(l)}else if(arguments[0]instanceof Xt&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],d=h,g=null,v=new Un;for(v.add(c);!v.isEmpty()&&d>0;){var E=v.poll(),C=E.getDistance();if(C>=d)break;E.isLeaves()?(d=C,g=E):E.expandToQueue(v,d)}return[g.getBoundable(0).getItem(),g.getBoundable(1).getItem()]}}else if(arguments.length===3){var b=arguments[0],m=arguments[1],y=arguments[2],_=new Sr(b,m),S=new Xt(this.getRoot(),_,y);return this.nearestNeighbour(S)[0]}},t.prototype.interfaces_=function(){return[ds,or]},t.prototype.getClass=function(){return t},t.centreX=function(i){return t.avg(i.getMinX(),i.getMaxX())},t.avg=function(i,s){return(i+s)/2},t.centreY=function(i){return t.avg(i.getMinY(),i.getMaxY())},e.STRtreeNode.get=function(){return Rd},e.serialVersionUID.get=function(){return 0x39920f7d5f261e0},e.xComparator.get=function(){return{interfaces_:function(){return[ro]},compare:function(r,i){return n.compareDoubles(t.centreX(r.getBounds()),t.centreX(i.getBounds()))}}},e.yComparator.get=function(){return{interfaces_:function(){return[ro]},compare:function(r,i){return n.compareDoubles(t.centreY(r.getBounds()),t.centreY(i.getBounds()))}}},e.intersectsOp.get=function(){return{interfaces_:function(){return[n.IntersectsOp]},intersects:function(r,i){return r.intersects(i)}}},e.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(t,e),t})($t),Rd=(function(n){function t(){var e=arguments[0];n.call(this,e)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var r=null,i=this.getChildBoundables().iterator();i.hasNext();){var s=i.next();r===null?r=new X(s.getBounds()):r.expandToInclude(s.getBounds())}return r},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(Jt),xe=function(){};xe.prototype.interfaces_=function(){return[]},xe.prototype.getClass=function(){return xe},xe.relativeSign=function(t,e){return t<e?-1:t>e?1:0},xe.compare=function(t,e,r){if(e.equals2D(r))return 0;var i=xe.relativeSign(e.x,r.x),s=xe.relativeSign(e.y,r.y);switch(t){case 0:return xe.compareValue(i,s);case 1:return xe.compareValue(s,i);case 2:return xe.compareValue(s,-i);case 3:return xe.compareValue(-i,s);case 4:return xe.compareValue(-i,-s);case 5:return xe.compareValue(-s,-i);case 6:return xe.compareValue(-s,i);case 7:return xe.compareValue(i,-s)}return st.shouldNeverReachHere("invalid octant value"),0},xe.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var ui=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this._segString=t,this.coord=new N(e),this.segmentIndex=r,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(r))};ui.prototype.getCoordinate=function(){return this.coord},ui.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},ui.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:xe.compare(this._segmentOctant,this.coord,e.coord)},ui.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t},ui.prototype.isInterior=function(){return this._isInterior},ui.prototype.interfaces_=function(){return[sr]},ui.prototype.getClass=function(){return ui};var ye=function(){this._nodeMap=new he,this._edge=null;var t=arguments[0];this._edge=t};ye.prototype.getSplitCoordinates=function(){var t=this,e=new Ta;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next();t.addEdgeCoordinates(i,s,e),i=s}return e.toCoordinateArray()},ye.prototype.addCollapsedNodes=function(){var t=this,e=new U;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var r=e.iterator();r.hasNext();){var i=r.next().intValue();t.add(t._edge.getCoordinate(i),i)}},ye.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},ye.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,r=0;r<this._edge.size()-2;r++){var i=e._edge.getCoordinate(r),s=e._edge.getCoordinate(r+2);i.equals2D(s)&&t.add(new Or(r+1))}},ye.prototype.addEdgeCoordinates=function(t,e,r){var i=this,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);r.add(new N(t.coord),!1);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)r.add(i._edge.getCoordinate(a));o&&r.add(new N(e.coord))},ye.prototype.iterator=function(){return this._nodeMap.values().iterator()},ye.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints(),this.addCollapsedNodes();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},ye.prototype.findCollapseIndex=function(t,e,r){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,i===1?(r[0]=t.segmentIndex+1,!0):!1},ye.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=this,r=new Array(1).fill(null),i=this.iterator(),s=i.next();i.hasNext();){var o=i.next(),a=e.findCollapseIndex(s,o,r);a&&t.add(new Or(r[0])),s=o}},ye.prototype.getEdge=function(){return this._edge},ye.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},ye.prototype.createSplitEdge=function(t,e){var r=this,i=e.segmentIndex-t.segmentIndex+2,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new N(t.coord);for(var l=t.segmentIndex+1;l<=e.segmentIndex;l++)a[u++]=r._edge.getCoordinate(l);return o&&(a[u]=new N(e.coord)),new Gt(a,this._edge.getData())},ye.prototype.add=function(t,e){var r=new ui(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(r);return i!==null?(st.isTrue(i.coord.equals2D(t),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(r,r),r)},ye.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),r=t.get(0),i=r.getCoordinate(0);if(!i.equals2D(e[0]))throw new Ln("bad split edge start point at "+i);var s=t.get(t.size()-1),o=s.getCoordinates(),a=o[o.length-1];if(!a.equals2D(e[e.length-1]))throw new Ln("bad split edge end point at "+a)},ye.prototype.interfaces_=function(){return[]},ye.prototype.getClass=function(){return ye};var ps=function(){};ps.prototype.interfaces_=function(){return[]},ps.prototype.getClass=function(){return ps},ps.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new xt("Cannot compute the octant for point ( "+t+", "+e+" )");var r=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?r>=i?0:1:r>=i?7:6:e>=0?r>=i?3:2:r>=i?4:5}else if(arguments[0]instanceof N&&arguments[1]instanceof N){var s=arguments[0],o=arguments[1],a=o.x-s.x,u=o.y-s.y;if(a===0&&u===0)throw new xt("Cannot compute the octant for two identical points "+s);return ps.octant(a,u)}};var pn=function(){};pn.prototype.getCoordinates=function(){},pn.prototype.size=function(){},pn.prototype.getCoordinate=function(t){},pn.prototype.isClosed=function(){},pn.prototype.setData=function(t){},pn.prototype.getData=function(){},pn.prototype.interfaces_=function(){return[]},pn.prototype.getClass=function(){return pn};var ka=function(){};ka.prototype.addIntersection=function(t,e){},ka.prototype.interfaces_=function(){return[pn]},ka.prototype.getClass=function(){return ka};var Gt=function(){this._nodeList=new ye(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Gt.prototype.getCoordinates=function(){return this._pts},Gt.prototype.size=function(){return this._pts.length},Gt.prototype.getCoordinate=function(t){return this._pts[t]},Gt.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Gt.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},Gt.prototype.setData=function(t){this._data=t},Gt.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:ps.octant(t,e)},Gt.prototype.getData=function(){return this._data},Gt.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[3],o=new N(r.getIntersection(s));this.addIntersection(o,i)}},Gt.prototype.toString=function(){return yr.toLineString(new Ut(this._pts))},Gt.prototype.getNodeList=function(){return this._nodeList},Gt.prototype.addIntersectionNode=function(t,e){var r=e,i=r+1;if(i<this._pts.length){var s=this._pts[i];t.equals2D(s)&&(r=i)}var o=this._nodeList.add(t,r);return o},Gt.prototype.addIntersections=function(t,e,r){for(var i=this,s=0;s<t.getIntersectionNum();s++)i.addIntersection(t,e,r,s)},Gt.prototype.interfaces_=function(){return[ka]},Gt.prototype.getClass=function(){return Gt},Gt.getNodedSubstrings=function(){if(arguments.length===1){var t=arguments[0],e=new U;return Gt.getNodedSubstrings(t,e),e}else if(arguments.length===2)for(var r=arguments[0],i=arguments[1],s=r.iterator();s.hasNext();){var o=s.next();o.getNodeList().addSplitEdges(i)}};var Y=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new N,this.p1=new N;else if(arguments.length===1){var t=arguments[0];this.p0=new N(t.p0),this.p1=new N(t.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var e=arguments[0],r=arguments[1],i=arguments[2],s=arguments[3];this.p0=new N(e,r),this.p1=new N(i,s)}},Fd={serialVersionUID:{configurable:!0}};Y.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},Y.prototype.orientationIndex=function(){if(arguments[0]instanceof Y){var t=arguments[0],e=G.orientationIndex(this.p0,this.p1,t.p0),r=G.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&r>=0||e<=0&&r<=0?Math.max(e,r):0}else if(arguments[0]instanceof N){var i=arguments[0];return G.orientationIndex(this.p0,this.p1,i)}},Y.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},Y.prototype.isVertical=function(){return this.p0.x===this.p1.x},Y.prototype.equals=function(t){if(!(t instanceof Y))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},Y.prototype.intersection=function(t){var e=new Ni;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},Y.prototype.project=function(){if(arguments[0]instanceof N){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new N(t);var e=this.projectionFactor(t),r=new N;return r.x=this.p0.x+e*(this.p1.x-this.p0.x),r.y=this.p0.y+e*(this.p1.y-this.p0.y),r}else if(arguments[0]instanceof Y){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 u=this.project(i.p1);return o<0&&(u=this.p0),o>1&&(u=this.p1),new Y(a,u)}},Y.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},Y.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},Y.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1},Y.prototype.distancePerpendicular=function(t){return G.distancePointLinePerpendicular(t,this.p0,this.p1)},Y.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},Y.prototype.midPoint=function(){return Y.midPoint(this.p0,this.p1)},Y.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,r=this.p1.y-this.p0.y,i=e*e+r*r;if(i<=0)return rt.NaN;var s=((t.x-this.p0.x)*e+(t.y-this.p0.y)*r)/i;return s},Y.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var r=new Array(2).fill(null),i=rt.MAX_VALUE,s=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),r[0]=o,r[1]=t.p0;var a=this.closestPoint(t.p1);s=a.distance(t.p1),s<i&&(i=s,r[0]=a,r[1]=t.p1);var u=t.closestPoint(this.p0);s=u.distance(this.p0),s<i&&(i=s,r[0]=this.p0,r[1]=u);var l=t.closestPoint(this.p1);return s=l.distance(this.p1),s<i&&(i=s,r[0]=this.p1,r[1]=l),r},Y.prototype.closestPoint=function(t){var e=this.projectionFactor(t);if(e>0&&e<1)return this.project(t);var r=this.p0.distance(t),i=this.p1.distance(t);return r<i?this.p0:this.p1},Y.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},Y.prototype.getLength=function(){return this.p0.distance(this.p1)},Y.prototype.compareTo=function(t){var e=t,r=this.p0.compareTo(e.p0);return r!==0?r:this.p1.compareTo(e.p1)},Y.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},Y.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},Y.prototype.lineIntersection=function(t){try{var e=vr.intersection(this.p0,this.p1,t.p0,t.p1);return e}catch(r){if(!(r instanceof io))throw r}finally{}return null},Y.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},Y.prototype.pointAlongOffset=function(t,e){var r=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(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),u=0,l=0;if(e!==0){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");u=e*s/a,l=e*o/a}var c=r-l,h=i+u,d=new N(c,h);return d},Y.prototype.setCoordinates=function(){if(arguments.length===1){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=r.x,this.p1.y=r.y}},Y.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||rt.isNaN(e))&&(e=1),e},Y.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},Y.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},Y.prototype.distance=function(){if(arguments[0]instanceof Y){var t=arguments[0];return G.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof N){var e=arguments[0];return G.distancePointLine(e,this.p0,this.p1)}},Y.prototype.pointAlong=function(t){var e=new N;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},Y.prototype.hashCode=function(){var t=rt.doubleToLongBits(this.p0.x);t^=rt.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),r=rt.doubleToLongBits(this.p1.x);r^=rt.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(r)^Math.trunc(r>>32);return e^i},Y.prototype.interfaces_=function(){return[sr,or]},Y.prototype.getClass=function(){return Y},Y.midPoint=function(t,e){return new N((t.x+e.x)/2,(t.y+e.y)/2)},Fd.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(Y,Fd);var Va=function(){this.tempEnv1=new X,this.tempEnv2=new X,this._overlapSeg1=new Y,this._overlapSeg2=new Y};Va.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),r.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},Va.prototype.interfaces_=function(){return[]},Va.prototype.getClass=function(){return Va};var Ue=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=r,this._context=i};Ue.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},Ue.prototype.computeSelect=function(t,e,r,i){var s=this._pts[e],o=this._pts[r];if(i.tempEnv1.init(s,o),r-e===1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var a=Math.trunc((e+r)/2);e<a&&this.computeSelect(t,e,a,i),a<r&&this.computeSelect(t,a,r,i)},Ue.prototype.getCoordinates=function(){for(var t=this,e=new Array(this._end-this._start+1).fill(null),r=0,i=this._start;i<=this._end;i++)e[r++]=t._pts[i];return e},Ue.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},Ue.prototype.setId=function(t){this._id=t},Ue.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},Ue.prototype.getEnvelope=function(){if(this._env===null){var t=this._pts[this._start],e=this._pts[this._end];this._env=new X(t,e)}return this._env},Ue.prototype.getEndIndex=function(){return this._end},Ue.prototype.getStartIndex=function(){return this._start},Ue.prototype.getContext=function(){return this._context},Ue.prototype.getId=function(){return this._id},Ue.prototype.computeOverlapsInternal=function(t,e,r,i,s,o){var a=this._pts[t],u=this._pts[e],l=r._pts[i],c=r._pts[s];if(e-t===1&&s-i===1)return o.overlap(this,t,r,i),null;if(o.tempEnv1.init(a,u),o.tempEnv2.init(l,c),!o.tempEnv1.intersects(o.tempEnv2))return null;var h=Math.trunc((t+e)/2),d=Math.trunc((i+s)/2);t<h&&(i<d&&this.computeOverlapsInternal(t,h,r,i,d,o),d<s&&this.computeOverlapsInternal(t,h,r,d,s,o)),h<e&&(i<d&&this.computeOverlapsInternal(h,e,r,i,d,o),d<s&&this.computeOverlapsInternal(h,e,r,d,s,o))},Ue.prototype.interfaces_=function(){return[]},Ue.prototype.getClass=function(){return Ue};var Ur=function(){};Ur.prototype.interfaces_=function(){return[]},Ur.prototype.getClass=function(){return Ur},Ur.getChainStartIndices=function(t){var e=0,r=new U;r.add(new Or(e));do{var i=Ur.findChainEnd(t,e);r.add(new Or(i)),e=i}while(e<t.length-1);var s=Ur.toIntArray(r);return s},Ur.findChainEnd=function(t,e){for(var r=e;r<t.length-1&&t[r].equals2D(t[r+1]);)r++;if(r>=t.length-1)return t.length-1;for(var i=St.quadrant(t[r],t[r+1]),s=e+1;s<t.length;){if(!t[s-1].equals2D(t[s])){var o=St.quadrant(t[s-1],t[s]);if(o!==i)break}s++}return s-1},Ur.getChains=function(){if(arguments.length===1){var t=arguments[0];return Ur.getChains(t,null)}else if(arguments.length===2){for(var e=arguments[0],r=arguments[1],i=new U,s=Ur.getChainStartIndices(e),o=0;o<s.length-1;o++){var a=new Ue(e,s[o],s[o+1],r);i.add(a)}return i}},Ur.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),r=0;r<e.length;r++)e[r]=t.get(r).intValue();return e};var Mi=function(){};Mi.prototype.computeNodes=function(t){},Mi.prototype.getNodedSubstrings=function(){},Mi.prototype.interfaces_=function(){return[]},Mi.prototype.getClass=function(){return Mi};var za=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}};za.prototype.setSegmentIntersector=function(t){this._segInt=t},za.prototype.interfaces_=function(){return[Mi]},za.prototype.getClass=function(){return za};var uc=(function(n){function t(r){r?n.call(this,r):n.call(this),this._monoChains=new U,this._index=new Ad,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={SegmentOverlapAction:{configurable:!0}};return t.prototype.getMonotoneChains=function(){return this._monoChains},t.prototype.getNodedSubstrings=function(){return Gt.getNodedSubstrings(this._nodedSegStrings)},t.prototype.getIndex=function(){return this._index},t.prototype.add=function(i){for(var s=this,o=Ur.getChains(i.getCoordinates(),i),a=o.iterator();a.hasNext();){var u=a.next();u.setId(s._idCounter++),s._index.insert(u.getEnvelope(),u),s._monoChains.add(u)}},t.prototype.computeNodes=function(i){var s=this;this._nodedSegStrings=i;for(var o=i.iterator();o.hasNext();)s.add(o.next());this.intersectChains()},t.prototype.intersectChains=function(){for(var i=this,s=new kd(this._segInt),o=this._monoChains.iterator();o.hasNext();)for(var a=o.next(),u=i._index.query(a.getEnvelope()),l=u.iterator();l.hasNext();){var c=l.next();if(c.getId()>a.getId()&&(a.computeOverlaps(c,s),i._nOverlaps++),i._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.SegmentOverlapAction.get=function(){return kd},Object.defineProperties(t,e),t})(za),kd=(function(n){function t(){n.call(this),this._si=null;var e=arguments[0];this._si=e}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3],a=r.getContext(),u=s.getContext();this._si.processIntersections(a,i,u,o)}else return n.prototype.overlap.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(Va),_t=function n(){if(this._quadrantSegments=n.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=n.CAP_ROUND,this._joinStyle=n.JOIN_ROUND,this._mitreLimit=n.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=n.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(r)}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)}}},Gn={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}};_t.prototype.getEndCapStyle=function(){return this._endCapStyle},_t.prototype.isSingleSided=function(){return this._isSingleSided},_t.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=_t.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=_t.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==_t.JOIN_ROUND&&(this._quadrantSegments=_t.DEFAULT_QUADRANT_SEGMENTS)},_t.prototype.getJoinStyle=function(){return this._joinStyle},_t.prototype.setJoinStyle=function(t){this._joinStyle=t},_t.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},_t.prototype.getSimplifyFactor=function(){return this._simplifyFactor},_t.prototype.getQuadrantSegments=function(){return this._quadrantSegments},_t.prototype.setEndCapStyle=function(t){this._endCapStyle=t},_t.prototype.getMitreLimit=function(){return this._mitreLimit},_t.prototype.setMitreLimit=function(t){this._mitreLimit=t},_t.prototype.setSingleSided=function(t){this._isSingleSided=t},_t.prototype.interfaces_=function(){return[]},_t.prototype.getClass=function(){return _t},_t.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Gn.CAP_ROUND.get=function(){return 1},Gn.CAP_FLAT.get=function(){return 2},Gn.CAP_SQUARE.get=function(){return 3},Gn.JOIN_ROUND.get=function(){return 1},Gn.JOIN_MITRE.get=function(){return 2},Gn.JOIN_BEVEL.get=function(){return 3},Gn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Gn.DEFAULT_MITRE_LIMIT.get=function(){return 5},Gn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(_t,Gn);var Ft=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=G.COUNTERCLOCKWISE,this._inputLine=t||null},Ua={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Ft.prototype.isDeletable=function(t,e,r,i){var s=this._inputLine[t],o=this._inputLine[e],a=this._inputLine[r];return!this.isConcave(s,o,a)||!this.isShallow(s,o,a,i)?!1:this.isShallowSampled(s,o,t,r,i)},Ft.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,r=this.findNextNonDeletedIndex(e),i=this.findNextNonDeletedIndex(r),s=!1;i<this._inputLine.length;){var o=!1;t.isDeletable(e,r,i,t._distanceTol)&&(t._isDeleted[r]=Ft.DELETE,o=!0,s=!0),o?e=i:e=r,r=t.findNextNonDeletedIndex(e),i=t.findNextNonDeletedIndex(r)}return s},Ft.prototype.isShallowConcavity=function(t,e,r,i){var s=G.computeOrientation(t,e,r),o=s===this._angleOrientation;if(!o)return!1;var a=G.distancePointLine(e,t,r);return a<i},Ft.prototype.isShallowSampled=function(t,e,r,i,s){var o=this,a=Math.trunc((i-r)/Ft.NUM_PTS_TO_CHECK);a<=0&&(a=1);for(var u=r;u<i;u+=a)if(!o.isShallow(t,e,o._inputLine[u],s))return!1;return!0},Ft.prototype.isConcave=function(t,e,r){var i=G.computeOrientation(t,e,r),s=i===this._angleOrientation;return s},Ft.prototype.simplify=function(t){var e=this;this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=G.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var r=!1;do r=e.deleteShallowConcavities();while(r);return this.collapseLine()},Ft.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===Ft.DELETE;)e++;return e},Ft.prototype.isShallow=function(t,e,r,i){var s=G.distancePointLine(e,t,r);return s<i},Ft.prototype.collapseLine=function(){for(var t=this,e=new Ta,r=0;r<this._inputLine.length;r++)t._isDeleted[r]!==Ft.DELETE&&e.add(t._inputLine[r]);return e.toCoordinateArray()},Ft.prototype.interfaces_=function(){return[]},Ft.prototype.getClass=function(){return Ft},Ft.simplify=function(t,e){var r=new Ft(t);return r.simplify(e)},Ua.INIT.get=function(){return 0},Ua.DELETE.get=function(){return 1},Ua.KEEP.get=function(){return 1},Ua.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Ft,Ua);var $e=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new U},Vd={COORDINATE_ARRAY_TYPE:{configurable:!0}};$e.prototype.getCoordinates=function(){var t=this._ptList.toArray($e.COORDINATE_ARRAY_TYPE);return t},$e.prototype.setPrecisionModel=function(t){this._precisionModel=t},$e.prototype.addPt=function(t){var e=new N(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},$e.prototype.revere=function(){},$e.prototype.addPts=function(t,e){var r=this;if(e)for(var i=0;i<t.length;i++)r.addPt(t[i]);else for(var s=t.length-1;s>=0;s--)r.addPt(t[s])},$e.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),r=t.distance(e);return r<this._minimimVertexDistance},$e.prototype.toString=function(){var t=new ut,e=t.createLineString(this.getCoordinates());return e.toString()},$e.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new N(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},$e.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},$e.prototype.interfaces_=function(){return[]},$e.prototype.getClass=function(){return $e},Vd.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties($e,Vd);var ct=function(){},gs={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};ct.prototype.interfaces_=function(){return[]},ct.prototype.getClass=function(){return ct},ct.toDegrees=function(t){return t*180/Math.PI},ct.normalize=function(t){for(;t>Math.PI;)t-=ct.PI_TIMES_2;for(;t<=-Math.PI;)t+=ct.PI_TIMES_2;return t},ct.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=r.x-e.x,s=r.y-e.y;return Math.atan2(s,i)}},ct.isAcute=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=r.x-e.x,a=r.y-e.y,u=i*o+s*a;return u>0},ct.isObtuse=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=r.x-e.x,a=r.y-e.y,u=i*o+s*a;return u<0},ct.interiorAngle=function(t,e,r){var i=ct.angle(e,t),s=ct.angle(e,r);return Math.abs(s-i)},ct.normalizePositive=function(t){if(t<0){for(;t<0;)t+=ct.PI_TIMES_2;t>=ct.PI_TIMES_2&&(t=0)}else{for(;t>=ct.PI_TIMES_2;)t-=ct.PI_TIMES_2;t<0&&(t=0)}return t},ct.angleBetween=function(t,e,r){var i=ct.angle(e,t),s=ct.angle(e,r);return ct.diff(i,s)},ct.diff=function(t,e){var r=null;return t<e?r=e-t:r=t-e,r>Math.PI&&(r=2*Math.PI-r),r},ct.toRadians=function(t){return t*Math.PI/180},ct.getTurn=function(t,e){var r=Math.sin(e-t);return r>0?ct.COUNTERCLOCKWISE:r<0?ct.CLOCKWISE:ct.NONE},ct.angleBetweenOriented=function(t,e,r){var i=ct.angle(e,t),s=ct.angle(e,r),o=s-i;return o<=-Math.PI?o+ct.PI_TIMES_2:o>Math.PI?o-ct.PI_TIMES_2:o},gs.PI_TIMES_2.get=function(){return 2*Math.PI},gs.PI_OVER_2.get=function(){return Math.PI/2},gs.PI_OVER_4.get=function(){return Math.PI/4},gs.COUNTERCLOCKWISE.get=function(){return G.COUNTERCLOCKWISE},gs.CLOCKWISE.get=function(){return G.CLOCKWISE},gs.NONE.get=function(){return G.COLLINEAR},Object.defineProperties(ct,gs);var Nt=function n(){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 Y,this._seg1=new Y,this._offset0=new Y,this._offset1=new Y,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],r=arguments[2];this._precisionModel=t,this._bufParams=e,this._li=new Ni,this._filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===_t.JOIN_ROUND&&(this._closingSegLengthFactor=n.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Ga={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}};Nt.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,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 r=G.computeOrientation(this._s0,this._s1,this._s2),i=r===G.CLOCKWISE&&this._side===z.LEFT||r===G.COUNTERCLOCKWISE&&this._side===z.RIGHT;r===0?this.addCollinear(e):i?this.addOutsideTurn(r,e):this.addInsideTurn(r,e)},Nt.prototype.addLineEndCap=function(t,e){var r=new Y(t,e),i=new Y;this.computeOffsetSegment(r,z.LEFT,this._distance,i);var s=new Y;this.computeOffsetSegment(r,z.RIGHT,this._distance,s);var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case _t.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,u+Math.PI/2,u-Math.PI/2,G.CLOCKWISE,this._distance),this._segList.addPt(s.p1);break;case _t.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(s.p1);break;case _t.CAP_SQUARE:var l=new N;l.x=Math.abs(this._distance)*Math.cos(u),l.y=Math.abs(this._distance)*Math.sin(u);var c=new N(i.p1.x+l.x,i.p1.y+l.y),h=new N(s.p1.x+l.x,s.p1.y+l.y);this._segList.addPt(c),this._segList.addPt(h);break}},Nt.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t},Nt.prototype.addMitreJoin=function(t,e,r,i){var s=!0,o=null;try{o=vr.intersection(e.p0,e.p1,r.p0,r.p1);var a=i<=0?1:o.distance(t)/Math.abs(i);a>this._bufParams.getMitreLimit()&&(s=!1)}catch(u){if(u instanceof io)o=new N(0,0),s=!1;else throw u}finally{}s?this._segList.addPt(o):this.addLimitedMitreJoin(e,r,i,this._bufParams.getMitreLimit())},Nt.prototype.addFilletCorner=function(t,e,r,i,s){var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o),l=r.x-t.x,c=r.y-t.y,h=Math.atan2(c,l);i===G.CLOCKWISE?u<=h&&(u+=2*Math.PI):u>=h&&(u-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,u,h,i,s),this._segList.addPt(r)},Nt.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Nt.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===_t.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===_t.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},Nt.prototype.createSquare=function(t){this._segList.addPt(new N(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new N(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new N(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new N(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},Nt.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},Nt.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Nt.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Nt.prototype.initSideSegments=function(t,e,r){this._s1=t,this._s2=e,this._side=r,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,r,this._distance,this._offset1)},Nt.prototype.addLimitedMitreJoin=function(t,e,r,i){var s=this._seg0.p1,o=ct.angle(s,this._seg0.p0),a=ct.angleBetweenOriented(this._seg0.p0,s,this._seg1.p1),u=a/2,l=ct.normalize(o+u),c=ct.normalize(l+Math.PI),h=i*r,d=h*Math.abs(Math.sin(u)),g=r-d,v=s.x+h*Math.cos(c),E=s.y+h*Math.sin(c),C=new N(v,E),b=new Y(s,C),m=b.pointAlongOffset(1,g),y=b.pointAlongOffset(1,-g);this._side===z.LEFT?(this._segList.addPt(m),this._segList.addPt(y)):(this._segList.addPt(y),this._segList.addPt(m))},Nt.prototype.computeOffsetSegment=function(t,e,r,i){var s=e===z.LEFT?1:-1,o=t.p1.x-t.p0.x,a=t.p1.y-t.p0.y,u=Math.sqrt(o*o+a*a),l=s*r*o/u,c=s*r*a/u;i.p0.x=t.p0.x-c,i.p0.y=t.p0.y+l,i.p1.x=t.p1.x-c,i.p1.y=t.p1.y+l},Nt.prototype.addFilletArc=function(t,e,r,i,s){var o=this,a=i===G.CLOCKWISE?-1:1,u=Math.abs(e-r),l=Math.trunc(u/this._filletAngleQuantum+.5);if(l<1)return null;for(var c=0,h=u/l,d=c,g=new N;d<u;){var v=e+a*d;g.x=t.x+s*Math.cos(v),g.y=t.y+s*Math.sin(v),o._segList.addPt(g),d+=h}},Nt.prototype.addInsideTurn=function(t,e){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*Nt.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var r=new N((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(r);var i=new N((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)}},Nt.prototype.createCircle=function(t){var e=new N(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Nt.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Nt.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new $e,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Nt.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Nt.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===_t.JOIN_BEVEL||this._bufParams.getJoinStyle()===_t.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,G.CLOCKWISE,this._distance))},Nt.prototype.closeRing=function(){this._segList.closeRing()},Nt.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt},Ga.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},Ga.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},Ga.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Ga.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Nt,Ga);var Oe=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Oe.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var r=e<0,i=Math.abs(e),s=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],s):this.computeOffsetCurve(t,r,s);var o=s.getCoordinates();return r&&at.reverse(o),o},Oe.prototype.computeSingleSidedBufferCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);if(e){r.addSegments(t,!0);var s=Ft.simplify(t,-i),o=s.length-1;r.initSideSegments(s[o],s[o-1],z.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(s[a],!0)}else{r.addSegments(t,!1);var u=Ft.simplify(t,i),l=u.length-1;r.initSideSegments(u[0],u[1],z.LEFT),r.addFirstSegment();for(var c=2;c<=l;c++)r.addNextSegment(u[c],!0)}r.addLastSegment(),r.closeRing()},Oe.prototype.computeRingBufferCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);e===z.RIGHT&&(i=-i);var s=Ft.simplify(t,i),o=s.length-1;r.initSideSegments(s[o-1],s[0],e);for(var a=1;a<=o;a++){var u=a!==1;r.addNextSegment(s[a],u)}r.closeRing()},Oe.prototype.computeLineBufferCurve=function(t,e){var r=this.simplifyTolerance(this._distance),i=Ft.simplify(t,r),s=i.length-1;e.initSideSegments(i[0],i[1],z.LEFT);for(var o=2;o<=s;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[s-1],i[s]);var a=Ft.simplify(t,-r),u=a.length-1;e.initSideSegments(a[u],a[u-1],z.LEFT);for(var l=u-2;l>=0;l--)e.addNextSegment(a[l],!0);e.addLastSegment(),e.addLineEndCap(a[1],a[0]),e.closeRing()},Oe.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case _t.CAP_ROUND:e.createCircle(t);break;case _t.CAP_SQUARE:e.createSquare(t);break}},Oe.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var r=Math.abs(e),i=this.getSegGen(r);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var s=e<0;this.computeSingleSidedBufferCurve(t,s,i)}else this.computeLineBufferCurve(t,i);var o=i.getCoordinates();return o},Oe.prototype.getBufferParameters=function(){return this._bufParams},Oe.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Oe.prototype.getRingCurve=function(t,e,r){if(this._distance=r,t.length<=2)return this.getLineCurve(t,r);if(r===0)return Oe.copyCoordinates(t);var i=this.getSegGen(r);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},Oe.prototype.computeOffsetCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);if(e){var s=Ft.simplify(t,-i),o=s.length-1;r.initSideSegments(s[o],s[o-1],z.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(s[a],!0)}else{var u=Ft.simplify(t,i),l=u.length-1;r.initSideSegments(u[0],u[1],z.LEFT),r.addFirstSegment();for(var c=2;c<=l;c++)r.addNextSegment(u[c],!0)}r.addLastSegment()},Oe.prototype.getSegGen=function(t){return new Nt(this._precisionModel,this._bufParams,t)},Oe.prototype.interfaces_=function(){return[]},Oe.prototype.getClass=function(){return Oe},Oe.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),r=0;r<e.length;r++)e[r]=new N(t[r]);return e};var ms=function(){this._subgraphs=null,this._seg=new Y,this._cga=new G;var t=arguments[0];this._subgraphs=t},zd={DepthSegment:{configurable:!0}};ms.prototype.findStabbedSegments=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],r=new U,i=this._subgraphs.iterator();i.hasNext();){var s=i.next(),o=s.getEnvelope();e.y<o.getMinY()||e.y>o.getMaxY()||t.findStabbedSegments(e,s.getDirectedEdges(),r)}return r}else if(arguments.length===3){if(Q(arguments[2],_r)&&arguments[0]instanceof N&&arguments[1]instanceof ac)for(var a=arguments[0],u=arguments[1],l=arguments[2],c=u.getEdge().getCoordinates(),h=0;h<c.length-1;h++){t._seg.p0=c[h],t._seg.p1=c[h+1],t._seg.p0.y>t._seg.p1.y&&t._seg.reverse();var d=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(d<a.x)&&!t._seg.isHorizontal()&&!(a.y<t._seg.p0.y||a.y>t._seg.p1.y)&&G.computeOrientation(t._seg.p0,t._seg.p1,a)!==G.RIGHT){var g=u.getDepth(z.LEFT);t._seg.p0.equals(c[h])||(g=u.getDepth(z.RIGHT));var v=new Di(t._seg,g);l.add(v)}}else if(Q(arguments[2],_r)&&arguments[0]instanceof N&&Q(arguments[1],_r))for(var E=arguments[0],C=arguments[1],b=arguments[2],m=C.iterator();m.hasNext();){var y=m.next();y.isForward()&&t.findStabbedSegments(E,y,b)}}},ms.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var r=Cr.min(e);return r._leftDepth},ms.prototype.interfaces_=function(){return[]},ms.prototype.getClass=function(){return ms},zd.DepthSegment.get=function(){return Di},Object.defineProperties(ms,zd);var Di=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new Y(t),this._leftDepth=e};Di.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var r=this._upwardSeg.orientationIndex(e._upwardSeg);return r!==0||(r=-1*e._upwardSeg.orientationIndex(this._upwardSeg),r!==0)?r:this._upwardSeg.compareTo(e._upwardSeg)},Di.prototype.compareX=function(t,e){var r=t.p0.compareTo(e.p0);return r!==0?r:t.p1.compareTo(e.p1)},Di.prototype.toString=function(){return this._upwardSeg.toString()},Di.prototype.interfaces_=function(){return[sr]},Di.prototype.getClass=function(){return Di};var wt=function(t,e,r){this.p0=t||null,this.p1=e||null,this.p2=r||null};wt.prototype.area=function(){return wt.area(this.p0,this.p1,this.p2)},wt.prototype.signedArea=function(){return wt.signedArea(this.p0,this.p1,this.p2)},wt.prototype.interpolateZ=function(t){if(t===null)throw new xt("Supplied point is null.");return wt.interpolateZ(t,this.p0,this.p1,this.p2)},wt.prototype.longestSideLength=function(){return wt.longestSideLength(this.p0,this.p1,this.p2)},wt.prototype.isAcute=function(){return wt.isAcute(this.p0,this.p1,this.p2)},wt.prototype.circumcentre=function(){return wt.circumcentre(this.p0,this.p1,this.p2)},wt.prototype.area3D=function(){return wt.area3D(this.p0,this.p1,this.p2)},wt.prototype.centroid=function(){return wt.centroid(this.p0,this.p1,this.p2)},wt.prototype.inCentre=function(){return wt.inCentre(this.p0,this.p1,this.p2)},wt.prototype.interfaces_=function(){return[]},wt.prototype.getClass=function(){return wt},wt.area=function(t,e,r){return Math.abs(((r.x-t.x)*(e.y-t.y)-(e.x-t.x)*(r.y-t.y))/2)},wt.signedArea=function(t,e,r){return((r.x-t.x)*(e.y-t.y)-(e.x-t.x)*(r.y-t.y))/2},wt.det=function(t,e,r,i){return t*i-e*r},wt.interpolateZ=function(t,e,r,i){var s=e.x,o=e.y,a=r.x-s,u=i.x-s,l=r.y-o,c=i.y-o,h=a*c-u*l,d=t.x-s,g=t.y-o,v=(c*d-u*g)/h,E=(-l*d+a*g)/h,C=e.z+v*(r.z-e.z)+E*(i.z-e.z);return C},wt.longestSideLength=function(t,e,r){var i=t.distance(e),s=e.distance(r),o=r.distance(t),a=i;return s>a&&(a=s),o>a&&(a=o),a},wt.isAcute=function(t,e,r){return!(!ct.isAcute(t,e,r)||!ct.isAcute(e,r,t)||!ct.isAcute(r,t,e))},wt.circumcentre=function(t,e,r){var i=r.x,s=r.y,o=t.x-i,a=t.y-s,u=e.x-i,l=e.y-s,c=2*wt.det(o,a,u,l),h=wt.det(a,o*o+a*a,l,u*u+l*l),d=wt.det(o,o*o+a*a,u,u*u+l*l),g=i-h/c,v=s+d/c;return new N(g,v)},wt.perpendicularBisector=function(t,e){var r=e.x-t.x,i=e.y-t.y,s=new vr(t.x+r/2,t.y+i/2,1),o=new vr(t.x-i+r/2,t.y+r+i/2,1);return new vr(s,o)},wt.angleBisector=function(t,e,r){var i=e.distance(t),s=e.distance(r),o=i/(i+s),a=r.x-t.x,u=r.y-t.y,l=new N(t.x+o*a,t.y+o*u);return l},wt.area3D=function(t,e,r){var i=e.x-t.x,s=e.y-t.y,o=e.z-t.z,a=r.x-t.x,u=r.y-t.y,l=r.z-t.z,c=s*l-o*u,h=o*a-i*l,d=i*u-s*a,g=c*c+h*h+d*d,v=Math.sqrt(g)/2;return v},wt.centroid=function(t,e,r){var i=(t.x+e.x+r.x)/3,s=(t.y+e.y+r.y)/3;return new N(i,s)},wt.inCentre=function(t,e,r){var i=e.distance(r),s=t.distance(r),o=t.distance(e),a=i+s+o,u=(i*t.x+s*e.x+o*r.x)/a,l=(i*t.y+s*e.y+o*r.y)/a;return new N(u,l)};var hr=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new U;var t=arguments[0],e=arguments[1],r=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=r};hr.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),r=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(r,O.EXTERIOR,O.INTERIOR)},hr.prototype.addPolygon=function(t){var e=this,r=this._distance,i=z.LEFT;this._distance<0&&(r=-this._distance,i=z.RIGHT);var s=t.getExteriorRing(),o=at.removeRepeatedPoints(s.getCoordinates());if(this._distance<0&&this.isErodedCompletely(s,this._distance)||this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,r,i,O.EXTERIOR,O.INTERIOR);for(var a=0;a<t.getNumInteriorRing();a++){var u=t.getInteriorRingN(a),l=at.removeRepeatedPoints(u.getCoordinates());e._distance>0&&e.isErodedCompletely(u,-e._distance)||e.addPolygonRing(l,r,z.opposite(i),O.INTERIOR,O.EXTERIOR)}},hr.prototype.isTriangleErodedCompletely=function(t,e){var r=new wt(t[0],t[1],t[2]),i=r.inCentre(),s=G.distancePointLine(i,r.p0,r.p1);return s<Math.abs(e)},hr.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=at.removeRepeatedPoints(t.getCoordinates()),r=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(r,O.EXTERIOR,O.INTERIOR)},hr.prototype.addCurve=function(t,e,r){if(t===null||t.length<2)return null;var i=new Gt(t,new Et(0,O.BOUNDARY,e,r));this._curveList.add(i)},hr.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},hr.prototype.addPolygonRing=function(t,e,r,i,s){if(e===0&&t.length<hn.MINIMUM_VALID_SIZE)return null;var o=i,a=s;t.length>=hn.MINIMUM_VALID_SIZE&&G.isCCW(t)&&(o=s,a=i,r=z.opposite(r));var u=this._curveBuilder.getRingCurve(t,r,e);this.addCurve(u,o,a)},hr.prototype.add=function(t){if(t.isEmpty())return null;t instanceof Bt?this.addPolygon(t):t instanceof Rt?this.addLineString(t):t instanceof Ve?this.addPoint(t):t instanceof po?this.addCollection(t):t instanceof Oi?this.addCollection(t):t instanceof fn?this.addCollection(t):t instanceof me&&this.addCollection(t)},hr.prototype.isErodedCompletely=function(t,e){var r=t.getCoordinates();if(r.length<4)return e<0;if(r.length===4)return this.isTriangleErodedCompletely(r,e);var i=t.getEnvelopeInternal(),s=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>s},hr.prototype.addCollection=function(t){for(var e=this,r=0;r<t.getNumGeometries();r++){var i=t.getGeometryN(r);e.add(i)}},hr.prototype.interfaces_=function(){return[]},hr.prototype.getClass=function(){return hr};var yo=function(){};yo.prototype.locate=function(t){},yo.prototype.interfaces_=function(){return[]},yo.prototype.getClass=function(){return yo};var gn=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};gn.prototype.next=function(){if(this._atStart)return this._atStart=!1,gn.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 ho;var t=this._parent.getGeometryN(this._index++);return t instanceof me?(this._subcollectionIterator=new gn(t),this._subcollectionIterator.next()):t},gn.prototype.remove=function(){throw new Error(this.getClass().getName())},gn.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)},gn.prototype.interfaces_=function(){return[co]},gn.prototype.getClass=function(){return gn},gn.isAtomic=function(t){return!(t instanceof me)};var tr=function(){this._geom=null;var t=arguments[0];this._geom=t};tr.prototype.locate=function(t){return tr.locate(t,this._geom)},tr.prototype.interfaces_=function(){return[yo]},tr.prototype.getClass=function(){return tr},tr.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?G.isPointInRing(t,e.getCoordinates()):!1},tr.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var r=e.getExteriorRing();if(!tr.isPointInRing(t,r))return!1;for(var i=0;i<e.getNumInteriorRing();i++){var s=e.getInteriorRingN(i);if(tr.isPointInRing(t,s))return!1}return!0},tr.containsPoint=function(t,e){if(e instanceof Bt)return tr.containsPointInPolygon(t,e);if(e instanceof me)for(var r=new gn(e);r.hasNext();){var i=r.next();if(i!==e&&tr.containsPoint(t,i))return!0}return!1},tr.locate=function(t,e){return e.isEmpty()?O.EXTERIOR:tr.containsPoint(t,e)?O.INTERIOR:O.EXTERIOR};var de=function(){this._edgeMap=new he,this._edgeList=null,this._ptInAreaLocation=[O.NONE,O.NONE]};de.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),r=e-1;return e===0&&(r=this._edgeList.size()-1),this._edgeList.get(r)},de.prototype.propagateSideLabels=function(t){for(var e=O.NONE,r=this.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();s.isArea(t)&&s.getLocation(t,z.LEFT)!==O.NONE&&(e=s.getLocation(t,z.LEFT))}if(e===O.NONE)return null;for(var o=e,a=this.iterator();a.hasNext();){var u=a.next(),l=u.getLabel();if(l.getLocation(t,z.ON)===O.NONE&&l.setLocation(t,z.ON,o),l.isArea(t)){var c=l.getLocation(t,z.LEFT),h=l.getLocation(t,z.RIGHT);if(h!==O.NONE){if(h!==o)throw new zn("side location conflict",u.getCoordinate());c===O.NONE&&st.shouldNeverReachHere("found single null side (at "+u.getCoordinate()+")"),o=c}else st.isTrue(l.getLocation(t,z.LEFT)===O.NONE,"found single null side"),l.setLocation(t,z.RIGHT,o),l.setLocation(t,z.LEFT,o)}}},de.prototype.getCoordinate=function(){var t=this.iterator();if(!t.hasNext())return null;var e=t.next();return e.getCoordinate()},de.prototype.print=function(t){ne.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},de.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},de.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var r=e.size()-1,i=e.get(r).getLabel(),s=i.getLocation(t,z.LEFT);st.isTrue(s!==O.NONE,"Found unlabelled area edge");for(var o=s,a=this.iterator();a.hasNext();){var u=a.next(),l=u.getLabel();st.isTrue(l.isArea(t),"Found non-area edge");var c=l.getLocation(t,z.LEFT),h=l.getLocation(t,z.RIGHT);if(c===h||h!==o)return!1;o=c}return!0},de.prototype.findIndex=function(t){var e=this;this.iterator();for(var r=0;r<this._edgeList.size();r++){var i=e._edgeList.get(r);if(i===t)return r}return-1},de.prototype.iterator=function(){return this.getEdges().iterator()},de.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new U(this._edgeMap.values())),this._edgeList},de.prototype.getLocation=function(t,e,r){return this._ptInAreaLocation[t]===O.NONE&&(this._ptInAreaLocation[t]=tr.locate(e,r[t].getGeometry())),this._ptInAreaLocation[t]},de.prototype.toString=function(){var t=new xr;t.append("EdgeEndStar: "+this.getCoordinate()),t.append(`
|
|
43
|
-
`);for(var
|
|
44
|
-
`)}return t.toString()},de.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();r.computeLabel(t)}},de.prototype.computeLabelling=function(t){var e=this;this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var r=[!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)===O.BOUNDARY&&(r[a]=!0);for(var u=this.iterator();u.hasNext();)for(var l=u.next(),c=l.getLabel(),h=0;h<2;h++)if(c.isAnyNull(h)){var d=O.NONE;if(r[h])d=O.EXTERIOR;else{var g=l.getCoordinate();d=e.getLocation(h,g,t)}c.setAllLocationsIfNull(h,d)}},de.prototype.getDegree=function(){return this._edgeMap.size()},de.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},de.prototype.interfaces_=function(){return[]},de.prototype.getClass=function(){return de};var Ay=(function(n){function t(){n.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){var r=this;this.getResultAreaEdges();for(var i=null,s=null,o=this._SCANNING_FOR_INCOMING,a=0;a<this._resultAreaEdgeList.size();a++){var u=r._resultAreaEdgeList.get(a),l=u.getSym();if(u.getLabel().isArea())switch(i===null&&u.isInResult()&&(i=u),o){case r._SCANNING_FOR_INCOMING:if(!l.isInResult())continue;s=l,o=r._LINKING_TO_OUTGOING;break;case r._LINKING_TO_OUTGOING:if(!u.isInResult())continue;s.setNext(u),o=r._SCANNING_FOR_INCOMING;break}}if(o===this._LINKING_TO_OUTGOING){if(i===null)throw new zn("no outgoing dirEdge found",this.getCoordinate());st.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),s.setNext(i)}},t.prototype.insert=function(r){var i=r;this.insertEdgeEnd(i,i)},t.prototype.getRightmostEdge=function(){var r=this.getEdges(),i=r.size();if(i<1)return null;var s=r.get(0);if(i===1)return s;var o=r.get(i-1),a=s.getQuadrant(),u=o.getQuadrant();return St.isNorthern(a)&&St.isNorthern(u)?s:!St.isNorthern(a)&&!St.isNorthern(u)?o:s.getDy()!==0?s:o.getDy()!==0?o:(st.shouldNeverReachHere("found two horizontal edges incident on node"),null)},t.prototype.print=function(r){ne.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var s=i.next();r.print("out "),s.print(r),r.println(),r.print("in "),s.getSym().print(r),r.println()}},t.prototype.getResultAreaEdges=function(){var r=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new U;for(var i=this.iterator();i.hasNext();){var s=i.next();(s.isInResult()||s.getSym().isInResult())&&r._resultAreaEdgeList.add(s)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(r){for(var i=this.iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.setAllLocationsIfNull(0,r.getLocation(0)),o.setAllLocationsIfNull(1,r.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){var r=this;this.getEdges();for(var i=null,s=null,o=this._edgeList.size()-1;o>=0;o--){var a=r._edgeList.get(o),u=a.getSym();s===null&&(s=u),i!==null&&u.setNext(i),i=a}s.setNext(i)},t.prototype.computeDepths=function(){var r=this;if(arguments.length===1){var i=arguments[0],s=this.findIndex(i),o=i.getDepth(z.LEFT),a=i.getDepth(z.RIGHT),u=this.computeDepths(s+1,this._edgeList.size(),o),l=this.computeDepths(0,s,u);if(l!==a)throw new zn("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var c=arguments[0],h=arguments[1],d=arguments[2],g=d,v=c;v<h;v++){var E=r._edgeList.get(v);E.setEdgeDepths(z.RIGHT,g),g=E.getDepth(z.LEFT)}return g}},t.prototype.mergeSymLabels=function(){for(var r=this.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();s.merge(i.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(r){for(var i=this,s=null,o=null,a=this._SCANNING_FOR_INCOMING,u=this._resultAreaEdgeList.size()-1;u>=0;u--){var l=i._resultAreaEdgeList.get(u),c=l.getSym();switch(s===null&&l.getEdgeRing()===r&&(s=l),a){case i._SCANNING_FOR_INCOMING:if(c.getEdgeRing()!==r)continue;o=c,a=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(l.getEdgeRing()!==r)continue;o.setNextMin(l),a=i._SCANNING_FOR_INCOMING;break}}a===this._LINKING_TO_OUTGOING&&(st.isTrue(s!==null,"found null for first outgoing dirEdge"),st.isTrue(s.getEdgeRing()===r,"unable to link last incoming dirEdge"),o.setNextMin(s))},t.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var r=0,i=this.iterator();i.hasNext();){var s=i.next();s.isInResult()&&r++}return r}else if(arguments.length===1){for(var o=arguments[0],a=0,u=this.iterator();u.hasNext();){var l=u.next();l.getEdgeRing()===o&&a++}return a}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var r=O.NONE,i=this.iterator();i.hasNext();){var s=i.next(),o=s.getSym();if(!s.isLineEdge()){if(s.isInResult()){r=O.INTERIOR;break}if(o.isInResult()){r=O.EXTERIOR;break}}}if(r===O.NONE)return null;for(var a=r,u=this.iterator();u.hasNext();){var l=u.next(),c=l.getSym();l.isLineEdge()?l.getEdge().setCovered(a===O.INTERIOR):(l.isInResult()&&(a=O.EXTERIOR),c.isInResult()&&(a=O.INTERIOR))}},t.prototype.computeLabelling=function(r){var i=this;n.prototype.computeLabelling.call(this,r),this._label=new Et(O.NONE);for(var s=this.iterator();s.hasNext();)for(var o=s.next(),a=o.getEdge(),u=a.getLabel(),l=0;l<2;l++){var c=u.getLocation(l);(c===O.INTERIOR||c===O.BOUNDARY)&&i._label.setLocation(l,O.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(de),Ud=(function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createNode=function(r){return new Fu(r,new Ay)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(go),li=function n(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=n.orientation(t)};li.prototype.compareTo=function(t){var e=t,r=li.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return r},li.prototype.interfaces_=function(){return[sr]},li.prototype.getClass=function(){return li},li.orientation=function(t){return at.increasingDirection(t)===1},li.compareOriented=function(t,e,r,i){for(var s=e?1:-1,o=i?1:-1,a=e?t.length:-1,u=i?r.length:-1,l=e?0:t.length-1,c=i?0:r.length-1;;){var h=t[l].compareTo(r[c]);if(h!==0)return h;l+=s,c+=o;var d=l===a,g=c===u;if(d&&!g)return-1;if(!d&&g)return 1;if(d&&g)return 0}};var Ir=function(){this._edges=new U,this._ocaMap=new he};Ir.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var r=0;r<this._edges.size();r++){var i=e._edges.get(r);r>0&&t.print(","),t.print("(");for(var s=i.getCoordinates(),o=0;o<s.length;o++)o>0&&t.print(","),t.print(s[o].x+" "+s[o].y);t.println(")")}t.print(") ")},Ir.prototype.addAll=function(t){for(var e=this,r=t.iterator();r.hasNext();)e.add(r.next())},Ir.prototype.findEdgeIndex=function(t){for(var e=this,r=0;r<this._edges.size();r++)if(e._edges.get(r).equals(t))return r;return-1},Ir.prototype.iterator=function(){return this._edges.iterator()},Ir.prototype.getEdges=function(){return this._edges},Ir.prototype.get=function(t){return this._edges.get(t)},Ir.prototype.findEqualEdge=function(t){var e=new li(t.getCoordinates()),r=this._ocaMap.get(e);return r},Ir.prototype.add=function(t){this._edges.add(t);var e=new li(t.getCoordinates());this._ocaMap.put(e,t)},Ir.prototype.interfaces_=function(){return[]},Ir.prototype.getClass=function(){return Ir};var Li=function(){};Li.prototype.processIntersections=function(t,e,r,i){},Li.prototype.isDone=function(){},Li.prototype.interfaces_=function(){return[]},Li.prototype.getClass=function(){return Li};var er=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 t=arguments[0];this._li=t};er.prototype.isTrivialIntersection=function(t,e,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(er.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.size()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},er.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},er.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},er.prototype.getLineIntersector=function(){return this._li},er.prototype.hasProperIntersection=function(){return this._hasProper},er.prototype.processIntersections=function(t,e,r,i){if(t===r&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=r.getCoordinates()[i],u=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,r,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},er.prototype.hasIntersection=function(){return this._hasIntersection},er.prototype.isDone=function(){return!1},er.prototype.hasInteriorIntersection=function(){return this._hasInterior},er.prototype.interfaces_=function(){return[Li]},er.prototype.getClass=function(){return er},er.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var Gr=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],r=arguments[2];this.coord=new N(t),this.segmentIndex=e,this.dist=r};Gr.prototype.getSegmentIndex=function(){return this.segmentIndex},Gr.prototype.getCoordinate=function(){return this.coord},Gr.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},Gr.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},Gr.prototype.isEndPoint=function(t){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===t},Gr.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},Gr.prototype.getDistance=function(){return this.dist},Gr.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},Gr.prototype.interfaces_=function(){return[sr]},Gr.prototype.getClass=function(){return Gr};var mn=function(){this._nodeMap=new he,this.edge=null;var t=arguments[0];this.edge=t};mn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},mn.prototype.iterator=function(){return this._nodeMap.values().iterator()},mn.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},mn.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},mn.prototype.createSplitEdge=function(t,e){var r=this,i=e.segmentIndex-t.segmentIndex+2,s=this.edge.pts[e.segmentIndex],o=e.dist>0||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new N(t.coord);for(var l=t.segmentIndex+1;l<=e.segmentIndex;l++)a[u++]=r.edge.pts[l];return o&&(a[u]=e.coord),new Vu(a,new Et(this.edge._label))},mn.prototype.add=function(t,e,r){var i=new Gr(t,e,r),s=this._nodeMap.get(i);return s!==null?s:(this._nodeMap.put(i,i),i)},mn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();if(r.coord.equals(t))return!0}return!1},mn.prototype.interfaces_=function(){return[]},mn.prototype.getClass=function(){return mn};var Ai=function(){};Ai.prototype.getChainStartIndices=function(t){var e=this,r=0,i=new U;i.add(new Or(r));do{var s=e.findChainEnd(t,r);i.add(new Or(s)),r=s}while(r<t.length-1);var o=Ai.toIntArray(i);return o},Ai.prototype.findChainEnd=function(t,e){for(var r=St.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){var s=St.quadrant(t[i-1],t[i]);if(s!==r)break;i++}return i-1},Ai.prototype.interfaces_=function(){return[]},Ai.prototype.getClass=function(){return Ai},Ai.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),r=0;r<e.length;r++)e[r]=t.get(r).intValue();return e};var Wn=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new X,this.env2=new X;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new Ai;this.startIndex=e.getChainStartIndices(this.pts)};Wn.prototype.getCoordinates=function(){return this.pts},Wn.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return e>r?e:r},Wn.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return e<r?e:r},Wn.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[r],e.startIndex[r+1],i)}else if(arguments.length===6){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],l=arguments[4],c=arguments[5],h=this.pts[s],d=this.pts[o],g=a.pts[u],v=a.pts[l];if(o-s===1&&l-u===1)return c.addIntersections(this.e,s,a.e,u),null;if(this.env1.init(h,d),this.env2.init(g,v),!this.env1.intersects(this.env2))return null;var E=Math.trunc((s+o)/2),C=Math.trunc((u+l)/2);s<E&&(u<C&&this.computeIntersectsForChain(s,E,a,u,C,c),C<l&&this.computeIntersectsForChain(s,E,a,C,l,c)),E<o&&(u<C&&this.computeIntersectsForChain(E,o,a,u,C,c),C<l&&this.computeIntersectsForChain(E,o,a,C,l,c))}},Wn.prototype.getStartIndexes=function(){return this.startIndex},Wn.prototype.computeIntersects=function(t,e){for(var r=this,i=0;i<this.startIndex.length-1;i++)for(var s=0;s<t.startIndex.length-1;s++)r.computeIntersectsForChain(i,t,s,e)},Wn.prototype.interfaces_=function(){return[]},Wn.prototype.getClass=function(){return Wn};var ie=function n(){var t=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var r=0;r<3;r++)t._depth[e][r]=n.NULL_VALUE},Gd={NULL_VALUE:{configurable:!0}};ie.prototype.getDepth=function(t,e){return this._depth[t][e]},ie.prototype.setDepth=function(t,e,r){this._depth[t][e]=r},ie.prototype.isNull=function(){var t=this;if(arguments.length===0){for(var e=0;e<2;e++)for(var r=0;r<3;r++)if(t._depth[e][r]!==ie.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===ie.NULL_VALUE}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._depth[s][o]===ie.NULL_VALUE}},ie.prototype.normalize=function(){for(var t=this,e=0;e<2;e++)if(!t.isNull(e)){var r=t._depth[e][1];t._depth[e][2]<r&&(r=t._depth[e][2]),r<0&&(r=0);for(var i=1;i<3;i++){var s=0;t._depth[e][i]>r&&(s=1),t._depth[e][i]=s}}},ie.prototype.getDelta=function(t){return this._depth[t][z.RIGHT]-this._depth[t][z.LEFT]},ie.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?O.EXTERIOR:O.INTERIOR},ie.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},ie.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],r=0;r<2;r++)for(var i=1;i<3;i++){var s=e.getLocation(r,i);(s===O.EXTERIOR||s===O.INTERIOR)&&(t.isNull(r,i)?t._depth[r][i]=ie.depthAtLocation(s):t._depth[r][i]+=ie.depthAtLocation(s))}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];u===O.INTERIOR&&this._depth[o][a]++}},ie.prototype.interfaces_=function(){return[]},ie.prototype.getClass=function(){return ie},ie.depthAtLocation=function(t){return t===O.EXTERIOR?0:t===O.INTERIOR?1:ie.NULL_VALUE},Gd.NULL_VALUE.get=function(){return-1},Object.defineProperties(ie,Gd);var Vu=(function(n){function t(){if(n.call(this),this.pts=null,this._env=null,this.eiList=new mn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ie,this._depthDelta=0,arguments.length===1){var e=arguments[0];t.call(this,e,null)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var r=new Array(2).fill(null);r[0]=this.pts[0],r[1]=this.pts[1];var i=new t(r,Et.toLineLabel(this._label));return i},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(r){this._isIsolated=r},t.prototype.setName=function(r){this._name=r},t.prototype.equals=function(r){var i=this;if(!(r instanceof t))return!1;var s=r;if(this.pts.length!==s.pts.length)return!1;for(var o=!0,a=!0,u=this.pts.length,l=0;l<this.pts.length;l++)if(i.pts[l].equals2D(s.pts[l])||(o=!1),i.pts[l].equals2D(s.pts[--u])||(a=!1),!o&&!a)return!1;return!0},t.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var r=arguments[0];return this.pts[r]}},t.prototype.print=function(r){var i=this;r.print("edge "+this._name+": "),r.print("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&r.print(","),r.print(i.pts[s].x+" "+i.pts[s].y);r.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(r){t.updateIM(this._label,r)},t.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(r){var i=this;r.print("edge "+this._name+": ");for(var s=this.pts.length-1;s>=0;s--)r.print(i.pts[s]+" ");r.println("")},t.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new Wn(this)),this._mce},t.prototype.getEnvelope=function(){var r=this;if(this._env===null){this._env=new X;for(var i=0;i<this.pts.length;i++)r._env.expandToInclude(r.pts[i])}return this._env},t.prototype.addIntersection=function(r,i,s,o){var a=new N(r.getIntersection(o)),u=i,l=r.getEdgeDistance(s,o),c=u+1;if(c<this.pts.length){var h=this.pts[c];a.equals2D(h)&&(u=c,l=0)}this.eiList.add(a,u,l)},t.prototype.toString=function(){var r=this,i=new xr;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&i.append(","),i.append(r.pts[s].x+" "+r.pts[s].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},t.prototype.isPointwiseEqual=function(r){var i=this;if(this.pts.length!==r.pts.length)return!1;for(var s=0;s<this.pts.length;s++)if(!i.pts[s].equals2D(r.pts[s]))return!1;return!0},t.prototype.setDepthDelta=function(r){this._depthDelta=r},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(r,i,s){for(var o=this,a=0;a<r.getIntersectionNum();a++)o.addIntersection(r,i,s,a)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];i.setAtLeastIfValid(r.getLocation(0,z.ON),r.getLocation(1,z.ON),1),r.isArea()&&(i.setAtLeastIfValid(r.getLocation(0,z.LEFT),r.getLocation(1,z.LEFT),2),i.setAtLeastIfValid(r.getLocation(0,z.RIGHT),r.getLocation(1,z.RIGHT),2))}else return n.prototype.updateIM.apply(this,arguments)},t})(Qe),_e=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Ir,this._bufParams=t||null};_e.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},_e.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(e!==null){var r=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Et(t.getLabel()),i.flip()),r.merge(i);var s=_e.depthDelta(i),o=e.getDepthDelta(),a=o+s;e.setDepthDelta(a)}else this._edgeList.add(t),t.setDepthDelta(_e.depthDelta(t.getLabel()))},_e.prototype.buildSubgraphs=function(t,e){for(var r=new U,i=t.iterator();i.hasNext();){var s=i.next(),o=s.getRightmostCoordinate(),a=new ms(r),u=a.getDepth(o);s.computeDepth(u),s.findResultEdges(),r.add(s),e.add(s.getDirectedEdges(),s.getNodes())}},_e.prototype.createSubgraphs=function(t){for(var e=new U,r=t.getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isVisited()){var s=new ve;s.create(i),e.add(s)}}return Cr.sort(e,Cr.reverseOrder()),e},_e.prototype.createEmptyResultGeometry=function(){var t=this._geomFact.createPolygon();return t},_e.prototype.getNoder=function(t){if(this._workingNoder!==null)return this._workingNoder;var e=new uc,r=new Ni;return r.setPrecisionModel(t),e.setSegmentIntersector(new er(r)),e},_e.prototype.buffer=function(t,e){var r=this._workingPrecisionModel;r===null&&(r=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new Oe(r,this._bufParams),s=new hr(t,e,i),o=s.getCurves();if(o.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(o,r),this._graph=new Dt(new Ud),this._graph.addEdges(this._edgeList.getEdges());var a=this.createSubgraphs(this._graph),u=new ze(this._geomFact);this.buildSubgraphs(a,u);var l=u.getPolygons();if(l.size()<=0)return this.createEmptyResultGeometry();var c=this._geomFact.buildGeometry(l);return c},_e.prototype.computeNodedEdges=function(t,e){var r=this,i=this.getNoder(e);i.computeNodes(t);for(var s=i.getNodedSubstrings(),o=s.iterator();o.hasNext();){var a=o.next(),u=a.getCoordinates();if(!(u.length===2&&u[0].equals2D(u[1]))){var l=a.getData(),c=new Vu(a.getCoordinates(),new Et(l));r.insertUniqueEdge(c)}}},_e.prototype.setNoder=function(t){this._workingNoder=t},_e.prototype.interfaces_=function(){return[]},_e.prototype.getClass=function(){return _e},_e.depthDelta=function(t){var e=t.getLocation(0,z.LEFT),r=t.getLocation(0,z.RIGHT);return e===O.INTERIOR&&r===O.EXTERIOR?1:e===O.EXTERIOR&&r===O.INTERIOR?-1:0},_e.convertSegStrings=function(t){for(var e=new ut,r=new U;t.hasNext();){var i=t.next(),s=e.createLineString(i.getCoordinates());r.add(s)}return e.buildGeometry(r)};var ci=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3];this._noder=r,this._scaleFactor=i,this._offsetX=s,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};ci.prototype.rescale=function(){var t=this;if(Q(arguments[0],Ht))for(var e=arguments[0],r=e.iterator();r.hasNext();){var i=r.next();t.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/t._scaleFactor+t._offsetX,s[o].y=s[o].y/t._scaleFactor+t._offsetY;s.length===2&&s[0].equals2D(s[1])&&ne.out.println(s)}},ci.prototype.scale=function(){var t=this;if(Q(arguments[0],Ht)){for(var e=arguments[0],r=new U,i=e.iterator();i.hasNext();){var s=i.next();r.add(new Gt(t.scale(s.getCoordinates()),s.getData()))}return r}else if(arguments[0]instanceof Array){for(var o=arguments[0],a=new Array(o.length).fill(null),u=0;u<o.length;u++)a[u]=new N(Math.round((o[u].x-t._offsetX)*t._scaleFactor),Math.round((o[u].y-t._offsetY)*t._scaleFactor),o[u].z);var l=at.removeRepeatedPoints(a);return l}},ci.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},ci.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},ci.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},ci.prototype.interfaces_=function(){return[Mi]},ci.prototype.getClass=function(){return ci};var Wr=function(){this._li=new Ni,this._segStrings=null;var t=arguments[0];this._segStrings=t},Wd={fact:{configurable:!0}};Wr.prototype.checkEndPtVertexIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var r=e.next(),i=r.getCoordinates();t.checkEndPtVertexIntersections(i[0],t._segStrings),t.checkEndPtVertexIntersections(i[i.length-1],t._segStrings)}else if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=o.iterator();a.hasNext();)for(var u=a.next(),l=u.getCoordinates(),c=1;c<l.length-1;c++)if(l[c].equals(s))throw new Ln("found endpt/interior pt intersection at index "+c+" :pt "+s)}},Wr.prototype.checkInteriorIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();)for(var r=e.next(),i=this._segStrings.iterator();i.hasNext();){var s=i.next();t.checkInteriorIntersections(r,s)}else if(arguments.length===2)for(var o=arguments[0],a=arguments[1],u=o.getCoordinates(),l=a.getCoordinates(),c=0;c<u.length-1;c++)for(var h=0;h<l.length-1;h++)t.checkInteriorIntersections(o,c,a,h);else if(arguments.length===4){var d=arguments[0],g=arguments[1],v=arguments[2],E=arguments[3];if(d===v&&g===E)return null;var C=d.getCoordinates()[g],b=d.getCoordinates()[g+1],m=v.getCoordinates()[E],y=v.getCoordinates()[E+1];if(this._li.computeIntersection(C,b,m,y),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,C,b)||this.hasInteriorIntersection(this._li,m,y)))throw new Ln("found non-noded intersection at "+C+"-"+b+" and "+m+"-"+y)}},Wr.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},Wr.prototype.checkCollapses=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var r=e.next();t.checkCollapses(r)}else if(arguments.length===1)for(var i=arguments[0],s=i.getCoordinates(),o=0;o<s.length-2;o++)t.checkCollapse(s[o],s[o+1],s[o+2])},Wr.prototype.hasInteriorIntersection=function(t,e,r){for(var i=0;i<t.getIntersectionNum();i++){var s=t.getIntersection(i);if(!(s.equals(e)||s.equals(r)))return!0}return!1},Wr.prototype.checkCollapse=function(t,e,r){if(t.equals(r))throw new Ln("found non-noded collapse at "+Wr.fact.createLineString([t,e,r]))},Wr.prototype.interfaces_=function(){return[]},Wr.prototype.getClass=function(){return Wr},Wd.fact.get=function(){return new ut},Object.defineProperties(Wr,Wd);var Me=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 t=arguments[0],e=arguments[1],r=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=r,e<=0)throw new xt("Scale factor must be non-zero");e!==1&&(this._pt=new N(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new N,this._p1Scaled=new N),this.initCorners(this._pt)},qd={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};Me.prototype.intersectsScaled=function(t,e){var r=Math.min(t.x,e.x),i=Math.max(t.x,e.x),s=Math.min(t.y,e.y),o=Math.max(t.y,e.y),a=this._maxx<r||this._minx>i||this._maxy<s||this._miny>o;if(a)return!1;var u=this.intersectsToleranceSquare(t,e);return st.isTrue(!(a&&u),"Found bad envelope test"),u},Me.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new N(this._maxx,this._maxy),this._corner[1]=new N(this._minx,this._maxy),this._corner[2]=new N(this._minx,this._miny),this._corner[3]=new N(this._maxx,this._miny)},Me.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},Me.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},Me.prototype.getCoordinate=function(){return this._originalPt},Me.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},Me.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=Me.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new X(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},Me.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))},Me.prototype.intersectsToleranceSquare=function(t,e){var r=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||r&&i||t.equals(this._pt)||e.equals(this._pt))},Me.prototype.addSnappedNode=function(t,e){var r=t.getCoordinate(e),i=t.getCoordinate(e+1);return this.intersects(r,i)?(t.addIntersection(this.getCoordinate(),e),!0):!1},Me.prototype.interfaces_=function(){return[]},Me.prototype.getClass=function(){return Me},qd.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(Me,qd);var Wa=function(){this.tempEnv1=new X,this.selectedSegment=new Y};Wa.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}},Wa.prototype.interfaces_=function(){return[]},Wa.prototype.getClass=function(){return Wa};var _o=function(){this._index=null;var t=arguments[0];this._index=t},Xd={HotPixelSnapAction:{configurable:!0}};_o.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2],s=e.getSafeEnvelope(),o=new Yd(e,r,i);return this._index.query(s,{interfaces_:function(){return[ai]},visitItem:function(a){var u=a;u.select(s,o)}}),o.isNodeAdded()}},_o.prototype.interfaces_=function(){return[]},_o.prototype.getClass=function(){return _o},Xd.HotPixelSnapAction.get=function(){return Yd},Object.defineProperties(_o,Xd);var Yd=(function(n){function t(){n.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],r=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=r,this._hotPixelVertexIndex=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1],s=r.getContext();if(this._parentEdge!==null&&s===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(s,i)}else return n.prototype.select.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(Wa),vs=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new U};vs.prototype.processIntersections=function(t,e,r,i){var s=this;if(t===r&&e===i)return null;var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=r.getCoordinates()[i],l=r.getCoordinates()[i+1];if(this._li.computeIntersection(o,a,u,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var c=0;c<this._li.getIntersectionNum();c++)s._interiorIntersections.add(s._li.getIntersection(c));t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1)}},vs.prototype.isDone=function(){return!1},vs.prototype.getInteriorIntersections=function(){return this._interiorIntersections},vs.prototype.interfaces_=function(){return[Li]},vs.prototype.getClass=function(){return vs};var vn=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new Ni,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};vn.prototype.checkCorrectness=function(t){var e=Gt.getNodedSubstrings(t),r=new Wr(e);try{r.checkValid()}catch(i){if(i instanceof Id)i.printStackTrace();else throw i}finally{}},vn.prototype.getNodedSubstrings=function(){return Gt.getNodedSubstrings(this._nodedSegStrings)},vn.prototype.snapRound=function(t,e){var r=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(r),this.computeVertexSnaps(t)},vn.prototype.findInteriorIntersections=function(t,e){var r=new vs(e);return this._noder.setSegmentIntersector(r),this._noder.computeNodes(t),r.getInteriorIntersections()},vn.prototype.computeVertexSnaps=function(){var t=this;if(Q(arguments[0],Ht))for(var e=arguments[0],r=e.iterator();r.hasNext();){var i=r.next();t.computeVertexSnaps(i)}else if(arguments[0]instanceof Gt)for(var s=arguments[0],o=s.getCoordinates(),a=0;a<o.length;a++){var u=new Me(o[a],t._scaleFactor,t._li),l=t._pointSnapper.snap(u,s,a);l&&s.addIntersection(o[a],a)}},vn.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new uc,this._pointSnapper=new _o(this._noder.getIndex()),this.snapRound(t,this._li)},vn.prototype.computeIntersectionSnaps=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next(),s=new Me(i,e._scaleFactor,e._li);e._pointSnapper.snap(s)}},vn.prototype.interfaces_=function(){return[Mi]},vn.prototype.getClass=function(){return vn};var se=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new _t,this._resultGeometry=null,this._saveException=null,arguments.length===1){var t=arguments[0];this._argGeom=t}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._argGeom=e,this._bufParams=r}},wo={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};se.prototype.bufferFixedPrecision=function(t){var e=new ci(new vn(new yt(1)),t.getScale()),r=new _e(this._bufParams);r.setWorkingPrecisionModel(t),r.setNoder(e),this._resultGeometry=r.buffer(this._argGeom,this._distance)},se.prototype.bufferReducedPrecision=function(){var t=this;if(arguments.length===0){for(var e=se.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(o){if(o instanceof zn)t._saveException=o;else throw o}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var r=arguments[0],i=se.precisionScaleFactor(this._argGeom,this._distance,r),s=new yt(i);this.bufferFixedPrecision(s)}},se.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===yt.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},se.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},se.prototype.bufferOriginalPrecision=function(){try{var t=new _e(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof Ln)this._saveException=e;else throw e}finally{}},se.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},se.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},se.prototype.interfaces_=function(){return[]},se.prototype.getClass=function(){return se},se.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new se(t),i=r.getResultGeometry(e);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof K&&typeof arguments[1]=="number"){var s=arguments[0],o=arguments[1],a=arguments[2],u=new se(s);u.setQuadrantSegments(a);var l=u.getResultGeometry(o);return l}else if(arguments[2]instanceof _t&&arguments[0]instanceof K&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],d=arguments[2],g=new se(c,d),v=g.getResultGeometry(h);return v}}else if(arguments.length===4){var E=arguments[0],C=arguments[1],b=arguments[2],m=arguments[3],y=new se(E);y.setQuadrantSegments(b),y.setEndCapStyle(m);var _=y.getResultGeometry(C);return _}},se.precisionScaleFactor=function(t,e,r){var i=t.getEnvelopeInternal(),s=Ke.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),o=e>0?e:0,a=s+2*o,u=Math.trunc(Math.log(a)/Math.log(10)+1),l=r-u,c=Math.pow(10,l);return c},wo.CAP_ROUND.get=function(){return _t.CAP_ROUND},wo.CAP_BUTT.get=function(){return _t.CAP_FLAT},wo.CAP_FLAT.get=function(){return _t.CAP_FLAT},wo.CAP_SQUARE.get=function(){return _t.CAP_SQUARE},wo.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(se,wo);var we=function(){this._pt=[new N,new N],this._distance=rt.NaN,this._isNull=!0};we.prototype.getCoordinates=function(){return this._pt},we.prototype.getCoordinate=function(t){return this._pt[t]},we.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i<this._distance&&this.initialize(e,r,i)}},we.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},we.prototype.getDistance=function(){return this._distance},we.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i>this._distance&&this.initialize(e,r,i)}},we.prototype.interfaces_=function(){return[]},we.prototype.getClass=function(){return we};var yn=function(){};yn.prototype.interfaces_=function(){return[]},yn.prototype.getClass=function(){return yn},yn.computeDistance=function(){if(arguments[2]instanceof we&&arguments[0]instanceof Rt&&arguments[1]instanceof N)for(var t=arguments[0],e=arguments[1],r=arguments[2],i=t.getCoordinates(),s=new Y,o=0;o<i.length-1;o++){s.setCoordinates(i[o],i[o+1]);var a=s.closestPoint(e);r.setMinimum(a,e)}else if(arguments[2]instanceof we&&arguments[0]instanceof Bt&&arguments[1]instanceof N){var u=arguments[0],l=arguments[1],c=arguments[2];yn.computeDistance(u.getExteriorRing(),l,c);for(var h=0;h<u.getNumInteriorRing();h++)yn.computeDistance(u.getInteriorRingN(h),l,c)}else if(arguments[2]instanceof we&&arguments[0]instanceof K&&arguments[1]instanceof N){var d=arguments[0],g=arguments[1],v=arguments[2];if(d instanceof Rt)yn.computeDistance(d,g,v);else if(d instanceof Bt)yn.computeDistance(d,g,v);else if(d instanceof me)for(var E=d,C=0;C<E.getNumGeometries();C++){var b=E.getGeometryN(C);yn.computeDistance(b,g,v)}else v.setMinimum(d.getCoordinate(),g)}else if(arguments[2]instanceof we&&arguments[0]instanceof Y&&arguments[1]instanceof N){var m=arguments[0],y=arguments[1],_=arguments[2],S=m.closestPoint(y);_.setMinimum(S,y)}};var Ri=function(t){this._maxPtDist=new we,this._inputGeom=t||null},lc={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};Ri.prototype.computeMaxMidpointDistance=function(t){var e=new hi(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},Ri.prototype.computeMaxVertexDistance=function(t){var e=new ys(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},Ri.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},Ri.prototype.getDistancePoints=function(){return this._maxPtDist},Ri.prototype.interfaces_=function(){return[]},Ri.prototype.getClass=function(){return Ri},lc.MaxPointDistanceFilter.get=function(){return ys},lc.MaxMidpointDistanceFilter.get=function(){return hi},Object.defineProperties(Ri,lc);var ys=function(t){this._maxPtDist=new we,this._minPtDist=new we,this._geom=t||null};ys.prototype.filter=function(t){this._minPtDist.initialize(),yn.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},ys.prototype.getMaxPointDistance=function(){return this._maxPtDist},ys.prototype.interfaces_=function(){return[cn]},ys.prototype.getClass=function(){return ys};var hi=function(t){this._maxPtDist=new we,this._minPtDist=new we,this._geom=t||null};hi.prototype.filter=function(t,e){if(e===0)return null;var r=t.getCoordinate(e-1),i=t.getCoordinate(e),s=new N((r.x+i.x)/2,(r.y+i.y)/2);this._minPtDist.initialize(),yn.computeDistance(this._geom,s,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},hi.prototype.isDone=function(){return!1},hi.prototype.isGeometryChanged=function(){return!1},hi.prototype.getMaxPointDistance=function(){return this._maxPtDist},hi.prototype.interfaces_=function(){return[Er]},hi.prototype.getClass=function(){return hi};var qn=function(t){this._comps=t||null};qn.prototype.filter=function(t){t instanceof Bt&&this._comps.add(t)},qn.prototype.interfaces_=function(){return[Ar]},qn.prototype.getClass=function(){return qn},qn.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return qn.getPolygons(t,new U)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e instanceof Bt?r.add(e):e instanceof me&&e.apply(new qn(r)),r}};var oe=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var t=arguments[0];this._lines=t}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._lines=e,this._isForcedToLineString=r}};oe.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof hn){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof Rt&&this._lines.add(t)},oe.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},oe.prototype.interfaces_=function(){return[An]},oe.prototype.getClass=function(){return oe},oe.getGeometry=function(){if(arguments.length===1){var t=arguments[0];return t.getFactory().buildGeometry(oe.getLines(t))}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e.getFactory().buildGeometry(oe.getLines(e,r))}},oe.getLines=function(){if(arguments.length===1){var t=arguments[0];return oe.getLines(t,!1)}else if(arguments.length===2){if(Q(arguments[0],Ht)&&Q(arguments[1],Ht)){for(var e=arguments[0],r=arguments[1],i=e.iterator();i.hasNext();){var s=i.next();oe.getLines(s,r)}return r}else if(arguments[0]instanceof K&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1],u=new U;return o.apply(new oe(u,a)),u}else if(arguments[0]instanceof K&&Q(arguments[1],Ht)){var l=arguments[0],c=arguments[1];return l instanceof Rt?c.add(l):l.apply(new oe(c)),c}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&Q(arguments[0],Ht)&&Q(arguments[1],Ht)){for(var h=arguments[0],d=arguments[1],g=arguments[2],v=h.iterator();v.hasNext();){var E=v.next();oe.getLines(E,d,g)}return d}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof K&&Q(arguments[1],Ht)){var C=arguments[0],b=arguments[1],m=arguments[2];return C.apply(new oe(b,m)),b}}};var Pr=function(){if(this._boundaryRule=ar.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t===null)throw new xt("Rule must be non-null");this._boundaryRule=t}}};Pr.prototype.locateInternal=function(){var t=this;if(arguments[0]instanceof N&&arguments[1]instanceof Bt){var e=arguments[0],r=arguments[1];if(r.isEmpty())return O.EXTERIOR;var i=r.getExteriorRing(),s=this.locateInPolygonRing(e,i);if(s===O.EXTERIOR)return O.EXTERIOR;if(s===O.BOUNDARY)return O.BOUNDARY;for(var o=0;o<r.getNumInteriorRing();o++){var a=r.getInteriorRingN(o),u=t.locateInPolygonRing(e,a);if(u===O.INTERIOR)return O.EXTERIOR;if(u===O.BOUNDARY)return O.BOUNDARY}return O.INTERIOR}else if(arguments[0]instanceof N&&arguments[1]instanceof Rt){var l=arguments[0],c=arguments[1];if(!c.getEnvelopeInternal().intersects(l))return O.EXTERIOR;var h=c.getCoordinates();return!c.isClosed()&&(l.equals(h[0])||l.equals(h[h.length-1]))?O.BOUNDARY:G.isOnLine(l,h)?O.INTERIOR:O.EXTERIOR}else if(arguments[0]instanceof N&&arguments[1]instanceof Ve){var d=arguments[0],g=arguments[1],v=g.getCoordinate();return v.equals2D(d)?O.INTERIOR:O.EXTERIOR}},Pr.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?G.locatePointInRing(t,e.getCoordinates()):O.EXTERIOR},Pr.prototype.intersects=function(t,e){return this.locate(t,e)!==O.EXTERIOR},Pr.prototype.updateLocationInfo=function(t){t===O.INTERIOR&&(this._isIn=!0),t===O.BOUNDARY&&this._numBoundaries++},Pr.prototype.computeLocation=function(t,e){var r=this;if(e instanceof Ve&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof Rt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Bt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Oi)for(var i=e,s=0;s<i.getNumGeometries();s++){var o=i.getGeometryN(s);r.updateLocationInfo(r.locateInternal(t,o))}else if(e instanceof fn)for(var a=e,u=0;u<a.getNumGeometries();u++){var l=a.getGeometryN(u);r.updateLocationInfo(r.locateInternal(t,l))}else if(e instanceof me)for(var c=new gn(e);c.hasNext();){var h=c.next();h!==e&&r.computeLocation(t,h)}},Pr.prototype.locate=function(t,e){return e.isEmpty()?O.EXTERIOR:e instanceof Rt?this.locateInternal(t,e):e instanceof Bt?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?O.BOUNDARY:this._numBoundaries>0||this._isIn?O.INTERIOR:O.EXTERIOR)},Pr.prototype.interfaces_=function(){return[]},Pr.prototype.getClass=function(){return Pr};var Ee=function n(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];n.call(this,t,n.INSIDE_AREA,e)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._component=r,this._segIndex=i,this._pt=s}},Hd={INSIDE_AREA:{configurable:!0}};Ee.prototype.isInsideArea=function(){return this._segIndex===Ee.INSIDE_AREA},Ee.prototype.getCoordinate=function(){return this._pt},Ee.prototype.getGeometryComponent=function(){return this._component},Ee.prototype.getSegmentIndex=function(){return this._segIndex},Ee.prototype.interfaces_=function(){return[]},Ee.prototype.getClass=function(){return Ee},Hd.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Ee,Hd);var fi=function(t){this._pts=t||null};fi.prototype.filter=function(t){t instanceof Ve&&this._pts.add(t)},fi.prototype.interfaces_=function(){return[Ar]},fi.prototype.getClass=function(){return fi},fi.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof Ve?Cr.singletonList(t):fi.getPoints(t,new U)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e instanceof Ve?r.add(e):e instanceof me&&e.apply(new fi(r)),r}};var _s=function(){this._locations=null;var t=arguments[0];this._locations=t};_s.prototype.filter=function(t){(t instanceof Ve||t instanceof Rt||t instanceof Bt)&&this._locations.add(new Ee(t,0,t.getCoordinate()))},_s.prototype.interfaces_=function(){return[Ar]},_s.prototype.getClass=function(){return _s},_s.getLocations=function(t){var e=new U;return t.apply(new _s(e)),e};var ae=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Pr,this._minDistanceLocation=null,this._minDistance=rt.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=r,this._geom[1]=i,this._terminateDistance=s}};ae.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=1-r,o=qn.getPolygons(this._geom[r]);if(o.size()>0){var a=_s.getLocations(this._geom[s]);if(this.computeContainmentDistance(a,o,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[s]=i[0],this._minDistanceLocation[r]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&Q(arguments[0],_r)&&Q(arguments[1],_r)){for(var u=arguments[0],l=arguments[1],c=arguments[2],h=0;h<u.size();h++)for(var d=u.get(h),g=0;g<l.size();g++)if(t.computeContainmentDistance(d,l.get(g),c),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Ee&&arguments[1]instanceof Bt){var v=arguments[0],E=arguments[1],C=arguments[2],b=v.getCoordinate();if(O.EXTERIOR!==this._ptLocator.locate(b,E))return this._minDistance=0,C[0]=v,C[1]=new Ee(E,b),null}}},ae.prototype.computeMinDistanceLinesPoints=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,r),i._minDistance<=i._terminateDistance)return null}},ae.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=oe.getLines(this._geom[0]),r=oe.getLines(this._geom[1]),i=fi.getPoints(this._geom[0]),s=fi.getPoints(this._geom[1]);if(this.computeMinDistanceLines(e,r,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,s,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance)||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(r,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance))return null;t[0]=null,t[1]=null,this.computeMinDistancePoints(i,s,t),this.updateMinDistance(t,!1)},ae.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},ae.prototype.updateMinDistance=function(t,e){if(t[0]===null)return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},ae.prototype.nearestPoints=function(){this.computeMinDistance();var t=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return t},ae.prototype.computeMinDistance=function(){var t=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 Rt&&arguments[1]instanceof Ve){var e=arguments[0],r=arguments[1],i=arguments[2];if(e.getEnvelopeInternal().distance(r.getEnvelopeInternal())>this._minDistance)return null;for(var s=e.getCoordinates(),o=r.getCoordinate(),a=0;a<s.length-1;a++){var u=G.distancePointLine(o,s[a],s[a+1]);if(u<t._minDistance){t._minDistance=u;var l=new Y(s[a],s[a+1]),c=l.closestPoint(o);i[0]=new Ee(e,a,c),i[1]=new Ee(r,0,o)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Rt&&arguments[1]instanceof Rt){var h=arguments[0],d=arguments[1],g=arguments[2];if(h.getEnvelopeInternal().distance(d.getEnvelopeInternal())>this._minDistance)return null;for(var v=h.getCoordinates(),E=d.getCoordinates(),C=0;C<v.length-1;C++)for(var b=0;b<E.length-1;b++){var m=G.distanceLineLine(v[C],v[C+1],E[b],E[b+1]);if(m<t._minDistance){t._minDistance=m;var y=new Y(v[C],v[C+1]),_=new Y(E[b],E[b+1]),S=y.closestPoints(_);g[0]=new Ee(h,C,S[0]),g[1]=new Ee(d,b,S[1])}if(t._minDistance<=t._terminateDistance)return null}}}},ae.prototype.computeMinDistancePoints=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a),l=o.getCoordinate().distance(u.getCoordinate());if(l<i._minDistance&&(i._minDistance=l,r[0]=new Ee(o,0,o.getCoordinate()),r[1]=new Ee(u,0,u.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},ae.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new xt("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},ae.prototype.computeMinDistanceLines=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,r),i._minDistance<=i._terminateDistance)return null}},ae.prototype.interfaces_=function(){return[]},ae.prototype.getClass=function(){return ae},ae.distance=function(t,e){var r=new ae(t,e);return r.distance()},ae.isWithinDistance=function(t,e,r){var i=new ae(t,e,r);return i.distance()<=r},ae.nearestPoints=function(t,e){var r=new ae(t,e);return r.nearestPoints()};var pe=function(){this._pt=[new N,new N],this._distance=rt.NaN,this._isNull=!0};pe.prototype.getCoordinates=function(){return this._pt},pe.prototype.getCoordinate=function(t){return this._pt[t]},pe.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i<this._distance&&this.initialize(e,r,i)}},pe.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},pe.prototype.toString=function(){return yr.toLineString(this._pt[0],this._pt[1])},pe.prototype.getDistance=function(){return this._distance},pe.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i>this._distance&&this.initialize(e,r,i)}},pe.prototype.interfaces_=function(){return[]},pe.prototype.getClass=function(){return pe};var qr=function(){};qr.prototype.interfaces_=function(){return[]},qr.prototype.getClass=function(){return qr},qr.computeDistance=function(){if(arguments[2]instanceof pe&&arguments[0]instanceof Rt&&arguments[1]instanceof N)for(var t=arguments[0],e=arguments[1],r=arguments[2],i=new Y,s=t.getCoordinates(),o=0;o<s.length-1;o++){i.setCoordinates(s[o],s[o+1]);var a=i.closestPoint(e);r.setMinimum(a,e)}else if(arguments[2]instanceof pe&&arguments[0]instanceof Bt&&arguments[1]instanceof N){var u=arguments[0],l=arguments[1],c=arguments[2];qr.computeDistance(u.getExteriorRing(),l,c);for(var h=0;h<u.getNumInteriorRing();h++)qr.computeDistance(u.getInteriorRingN(h),l,c)}else if(arguments[2]instanceof pe&&arguments[0]instanceof K&&arguments[1]instanceof N){var d=arguments[0],g=arguments[1],v=arguments[2];if(d instanceof Rt)qr.computeDistance(d,g,v);else if(d instanceof Bt)qr.computeDistance(d,g,v);else if(d instanceof me)for(var E=d,C=0;C<E.getNumGeometries();C++){var b=E.getGeometryN(C);qr.computeDistance(b,g,v)}else v.setMinimum(d.getCoordinate(),g)}else if(arguments[2]instanceof pe&&arguments[0]instanceof Y&&arguments[1]instanceof N){var m=arguments[0],y=arguments[1],_=arguments[2],S=m.closestPoint(y);_.setMinimum(S,y)}};var fr=function(){this._g0=null,this._g1=null,this._ptDist=new pe,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},cc={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};fr.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},fr.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new xt("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},fr.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},fr.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},fr.prototype.computeOrientedDistance=function(t,e,r){var i=new ws(e);if(t.apply(i),r.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var s=new di(e,this._densifyFrac);t.apply(s),r.setMaximum(s.getMaxPointDistance())}},fr.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},fr.prototype.interfaces_=function(){return[]},fr.prototype.getClass=function(){return fr},fr.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new fr(t,e);return r.distance()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new fr(i,s);return a.setDensifyFraction(o),a.distance()}},cc.MaxPointDistanceFilter.get=function(){return ws},cc.MaxDensifiedByFractionDistanceFilter.get=function(){return di},Object.defineProperties(fr,cc);var ws=function(){this._maxPtDist=new pe,this._minPtDist=new pe,this._euclideanDist=new qr,this._geom=null;var t=arguments[0];this._geom=t};ws.prototype.filter=function(t){this._minPtDist.initialize(),qr.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},ws.prototype.getMaxPointDistance=function(){return this._maxPtDist},ws.prototype.interfaces_=function(){return[cn]},ws.prototype.getClass=function(){return ws};var di=function(){this._maxPtDist=new pe,this._minPtDist=new pe,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};di.prototype.filter=function(t,e){var r=this;if(e===0)return null;for(var i=t.getCoordinate(e-1),s=t.getCoordinate(e),o=(s.x-i.x)/this._numSubSegs,a=(s.y-i.y)/this._numSubSegs,u=0;u<this._numSubSegs;u++){var l=i.x+u*o,c=i.y+u*a,h=new N(l,c);r._minPtDist.initialize(),qr.computeDistance(r._geom,h,r._minPtDist),r._maxPtDist.setMaximum(r._minPtDist)}},di.prototype.isDone=function(){return!1},di.prototype.isGeometryChanged=function(){return!1},di.prototype.getMaxPointDistance=function(){return this._maxPtDist},di.prototype.interfaces_=function(){return[Er]},di.prototype.getClass=function(){return di};var Ge=function(t,e,r){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=t||null,this._bufDistance=e||null,this._result=r||null},hc={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Ge.prototype.checkMaximumDistance=function(t,e,r){var i=new fr(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>r){this._isValid=!1;var s=i.getCoordinates();this._errorLocation=s[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+yr.toLineString(s[0],s[1])+")"}},Ge.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Ge.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Ge.VERBOSE&&ne.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Ge.prototype.checkNegativeValid=function(){if(!(this._input instanceof Bt||this._input instanceof fn||this._input instanceof me))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Ge.prototype.getErrorIndicator=function(){return this._errorIndicator},Ge.prototype.checkMinimumDistance=function(t,e,r){var i=new ae(t,e,r);if(this._minDistanceFound=i.distance(),this._minDistanceFound<r){this._isValid=!1;var s=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+yr.toLineString(s[0],s[1])+" )"}},Ge.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Ge.prototype.getErrorLocation=function(){return this._errorLocation},Ge.prototype.getPolygonLines=function(t){for(var e=new U,r=new oe(e),i=qn.getPolygons(t),s=i.iterator();s.hasNext();){var o=s.next();o.apply(r)}return t.getFactory().buildGeometry(e)},Ge.prototype.getErrorMessage=function(){return this._errMsg},Ge.prototype.interfaces_=function(){return[]},Ge.prototype.getClass=function(){return Ge},hc.VERBOSE.get=function(){return!1},hc.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Ge,hc);var ue=function(t,e,r){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=r||null},fc={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};ue.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},ue.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*ue.MAX_ENV_DIFF_FRAC;t===0&&(t=.001);var e=new X(this._input.getEnvelopeInternal());e.expandBy(this._distance);var r=new X(this._result.getEnvelopeInternal());r.expandBy(t),r.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(r)),this.report("Envelope")},ue.prototype.checkDistance=function(){var t=new Ge(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},ue.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},ue.prototype.checkPolygonal=function(){this._result instanceof Bt||this._result instanceof fn||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},ue.prototype.getErrorIndicator=function(){return this._errorIndicator},ue.prototype.getErrorLocation=function(){return this._errorLocation},ue.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")},ue.prototype.report=function(t){if(!ue.VERBOSE)return null;ne.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},ue.prototype.getErrorMessage=function(){return this._errorMsg},ue.prototype.interfaces_=function(){return[]},ue.prototype.getClass=function(){return ue},ue.isValidMsg=function(t,e,r){var i=new ue(t,e,r);return i.isValid()?null:i.getErrorMessage()},ue.isValid=function(t,e,r){var i=new ue(t,e,r);return!!i.isValid()},fc.VERBOSE.get=function(){return!1},fc.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(ue,fc);var Xr=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Xr.prototype.getCoordinates=function(){return this._pts},Xr.prototype.size=function(){return this._pts.length},Xr.prototype.getCoordinate=function(t){return this._pts[t]},Xr.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Xr.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:ps.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Xr.prototype.setData=function(t){this._data=t},Xr.prototype.getData=function(){return this._data},Xr.prototype.toString=function(){return yr.toLineString(new Ut(this._pts))},Xr.prototype.interfaces_=function(){return[pn]},Xr.prototype.getClass=function(){return Xr};var te=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new U,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};te.prototype.getInteriorIntersection=function(){return this._interiorIntersection},te.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},te.prototype.getIntersectionSegments=function(){return this._intSegments},te.prototype.count=function(){return this._intersectionCount},te.prototype.getIntersections=function(){return this._intersections},te.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},te.prototype.setKeepIntersections=function(t){this._keepIntersections=t},te.prototype.processIntersections=function(t,e,r,i){if(!this._findAllIntersections&&this.hasIntersection()||t===r&&e===i)return null;if(this._isCheckEndSegmentsOnly){var s=this.isEndSegment(t,e)||this.isEndSegment(r,i);if(!s)return null}var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=r.getCoordinates()[i],l=r.getCoordinates()[i+1];this._li.computeIntersection(o,a,u,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=a,this._intSegments[2]=u,this._intSegments[3]=l,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},te.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2},te.prototype.hasIntersection=function(){return this._interiorIntersection!==null},te.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},te.prototype.interfaces_=function(){return[Li]},te.prototype.getClass=function(){return te},te.createAllIntersectionsFinder=function(t){var e=new te(t);return e.setFindAllIntersections(!0),e},te.createAnyIntersectionFinder=function(t){return new te(t)},te.createIntersectionCounter=function(t){var e=new te(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var br=function(){this._li=new Ni,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};br.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},br.prototype.getIntersections=function(){return this._segInt.getIntersections()},br.prototype.isValid=function(){return this.execute(),this._isValid},br.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},br.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new te(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new uc;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},br.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new zn(this.getErrorMessage(),this._segInt.getInteriorIntersection())},br.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+yr.toLineString(t[0],t[1])+" and "+yr.toLineString(t[2],t[3])},br.prototype.interfaces_=function(){return[]},br.prototype.getClass=function(){return br},br.computeIntersections=function(t){var e=new br(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Fi=function n(){this._nv=null;var t=arguments[0];this._nv=new br(n.toSegmentStrings(t))};Fi.prototype.checkValid=function(){this._nv.checkValid()},Fi.prototype.interfaces_=function(){return[]},Fi.prototype.getClass=function(){return Fi},Fi.toSegmentStrings=function(t){for(var e=new U,r=t.iterator();r.hasNext();){var i=r.next();e.add(new Xr(i.getCoordinates(),i))}return e},Fi.checkValid=function(t){var e=new Fi(t);e.checkValid()};var Es=function(t){this._mapOp=t};Es.prototype.map=function(t){for(var e=this,r=new U,i=0;i<t.getNumGeometries();i++){var s=e._mapOp.map(t.getGeometryN(i));s.isEmpty()||r.add(s)}return t.getFactory().createGeometryCollection(ut.toGeometryArray(r))},Es.prototype.interfaces_=function(){return[]},Es.prototype.getClass=function(){return Es},Es.map=function(t,e){var r=new Es(e);return r.map(t)};var Yr=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new U,this._resultLineList=new U;var t=arguments[0],e=arguments[1],r=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=r};Yr.prototype.collectLines=function(t){for(var e=this,r=this._op.getGraph().getEdgeEnds().iterator();r.hasNext();){var i=r.next();e.collectLineEdge(i,t,e._lineEdgesList),e.collectBoundaryTouchEdge(i,t,e._lineEdgesList)}},Yr.prototype.labelIsolatedLine=function(t,e){var r=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,r)},Yr.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},Yr.prototype.collectLineEdge=function(t,e,r){var i=t.getLabel(),s=t.getEdge();t.isLineEdge()&&!t.isVisited()&&it.isResultOfOp(i,e)&&!s.isCovered()&&(r.add(s),t.setVisitedEdge(!0))},Yr.prototype.findCoveredLineEdges=function(){for(var t=this,e=this._op.getGraph().getNodes().iterator();e.hasNext();){var r=e.next();r.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=t._op.isCoveredByA(s.getCoordinate());o.setCovered(a)}}},Yr.prototype.labelIsolatedLines=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();i.isIsolated()&&(s.isNull(0)?e.labelIsolatedLine(i,0):e.labelIsolatedLine(i,1))}},Yr.prototype.buildLines=function(t){for(var e=this,r=this._lineEdgesList.iterator();r.hasNext();){var i=r.next(),s=e._geometryFactory.createLineString(i.getCoordinates());e._resultLineList.add(s),i.setInResult(!0)}},Yr.prototype.collectBoundaryTouchEdge=function(t,e,r){var i=t.getLabel();if(t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult())return null;st.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),it.isResultOfOp(i,e)&&e===it.INTERSECTION&&(r.add(t.getEdge()),t.setVisitedEdge(!0))},Yr.prototype.interfaces_=function(){return[]},Yr.prototype.getClass=function(){return Yr};var Ss=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new U;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Ss.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var r=this._geometryFactory.createPoint(e);this._resultPointList.add(r)}},Ss.prototype.extractNonCoveredResultNodes=function(t){for(var e=this,r=this._op.getGraph().getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||t===it.INTERSECTION)){var s=i.getLabel();it.isResultOfOp(s,t)&&e.filterCoveredNodeToPoint(i)}}},Ss.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Ss.prototype.interfaces_=function(){return[]},Ss.prototype.getClass=function(){return Ss};var De=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};De.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},De.prototype.transformPolygon=function(t,e){var r=this,i=!0,s=this.transformLinearRing(t.getExteriorRing(),t);(s===null||!(s instanceof hn)||s.isEmpty())&&(i=!1);for(var o=new U,a=0;a<t.getNumInteriorRing();a++){var u=r.transformLinearRing(t.getInteriorRingN(a),t);u===null||u.isEmpty()||(u instanceof hn||(i=!1),o.add(u))}if(i)return this._factory.createPolygon(s,o.toArray([]));var l=new U;return s!==null&&l.add(s),l.addAll(o),this._factory.buildGeometry(l)},De.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},De.prototype.getInputGeometry=function(){return this._inputGeom},De.prototype.transformMultiLineString=function(t,e){for(var r=this,i=new U,s=0;s<t.getNumGeometries();s++){var o=r.transformLineString(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},De.prototype.transformCoordinates=function(t,e){return this.copy(t)},De.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},De.prototype.transformMultiPoint=function(t,e){for(var r=this,i=new U,s=0;s<t.getNumGeometries();s++){var o=r.transformPoint(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},De.prototype.transformMultiPolygon=function(t,e){for(var r=this,i=new U,s=0;s<t.getNumGeometries();s++){var o=r.transformPolygon(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},De.prototype.copy=function(t){return t.copy()},De.prototype.transformGeometryCollection=function(t,e){for(var r=this,i=new U,s=0;s<t.getNumGeometries();s++){var o=r.transform(t.getGeometryN(s));o!==null&&(r._pruneEmptyGeometry&&o.isEmpty()||i.add(o))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(ut.toGeometryArray(i)):this._factory.buildGeometry(i)},De.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof Ve)return this.transformPoint(t,null);if(t instanceof po)return this.transformMultiPoint(t,null);if(t instanceof hn)return this.transformLinearRing(t,null);if(t instanceof Rt)return this.transformLineString(t,null);if(t instanceof Oi)return this.transformMultiLineString(t,null);if(t instanceof Bt)return this.transformPolygon(t,null);if(t instanceof fn)return this.transformMultiPolygon(t,null);if(t instanceof me)return this.transformGeometryCollection(t,null);throw new xt("Unknown Geometry subtype: "+t.getClass().getName())},De.prototype.transformLinearRing=function(t,e){var r=this.transformCoordinates(t.getCoordinateSequence(),t);if(r===null)return this._factory.createLinearRing(null);var i=r.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(r):this._factory.createLinearRing(r)},De.prototype.interfaces_=function(){return[]},De.prototype.getClass=function(){return De};var _n=function n(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Y,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Rt&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];n.call(this,t.getCoordinates(),e)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=n.isClosed(r),this._snapTolerance=i}};_n.prototype.snapVertices=function(t,e){for(var r=this,i=this._isClosed?t.size()-1:t.size(),s=0;s<i;s++){var o=t.get(s),a=r.findSnapForVertex(o,e);a!==null&&(t.set(s,new N(a)),s===0&&r._isClosed&&t.set(t.size()-1,new N(a)))}},_n.prototype.findSnapForVertex=function(t,e){for(var r=this,i=0;i<e.length;i++){if(t.equals2D(e[i]))return null;if(t.distance(e[i])<r._snapTolerance)return e[i]}return null},_n.prototype.snapTo=function(t){var e=new Ta(this._srcPts);this.snapVertices(e,t),this.snapSegments(e,t);var r=e.toCoordinateArray();return r},_n.prototype.snapSegments=function(t,e){var r=this;if(e.length===0)return null;var i=e.length;e[0].equals2D(e[e.length-1])&&(i=e.length-1);for(var s=0;s<i;s++){var o=e[s],a=r.findSegmentIndexToSnap(o,t);a>=0&&t.add(a+1,new N(o),!1)}},_n.prototype.findSegmentIndexToSnap=function(t,e){for(var r=this,i=rt.MAX_VALUE,s=-1,o=0;o<e.size()-1;o++){if(r._seg.p0=e.get(o),r._seg.p1=e.get(o+1),r._seg.p0.equals2D(t)||r._seg.p1.equals2D(t)){if(r._allowSnappingToSourceVertices)continue;return-1}var a=r._seg.distance(t);a<r._snapTolerance&&a<i&&(i=a,s=o)}return s},_n.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n},_n.isClosed=function(t){return t.length<=1?!1:t[0].equals2D(t[t.length-1])};var Wt=function(t){this._srcGeom=t||null},Bd={SNAP_PRECISION_FACTOR:{configurable:!0}};Wt.prototype.snapTo=function(t,e){var r=this.extractTargetCoordinates(t),i=new Jd(e,r);return i.transform(this._srcGeom)},Wt.prototype.snapToSelf=function(t,e){var r=this.extractTargetCoordinates(this._srcGeom),i=new Jd(t,r,!0),s=i.transform(this._srcGeom),o=s;return e&&Q(o,oi)&&(o=s.buffer(0)),o},Wt.prototype.computeSnapTolerance=function(t){var e=this.computeMinimumSegmentLength(t),r=e/10;return r},Wt.prototype.extractTargetCoordinates=function(t){for(var e=new Lr,r=t.getCoordinates(),i=0;i<r.length;i++)e.add(r[i]);return e.toArray(new Array(0).fill(null))},Wt.prototype.computeMinimumSegmentLength=function(t){for(var e=rt.MAX_VALUE,r=0;r<t.length-1;r++){var i=t[r].distance(t[r+1]);i<e&&(e=i)}return e},Wt.prototype.interfaces_=function(){return[]},Wt.prototype.getClass=function(){return Wt},Wt.snap=function(t,e,r){var i=new Array(2).fill(null),s=new Wt(t);i[0]=s.snapTo(e,r);var o=new Wt(e);return i[1]=o.snapTo(i[0],r),i},Wt.computeOverlaySnapTolerance=function(){if(arguments.length===1){var t=arguments[0],e=Wt.computeSizeBasedSnapTolerance(t),r=t.getPrecisionModel();if(r.getType()===yt.FIXED){var i=1/r.getScale()*2/1.415;i>e&&(e=i)}return e}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return Math.min(Wt.computeOverlaySnapTolerance(s),Wt.computeOverlaySnapTolerance(o))}},Wt.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),r=Math.min(e.getHeight(),e.getWidth()),i=r*Wt.SNAP_PRECISION_FACTOR;return i},Wt.snapToSelf=function(t,e,r){var i=new Wt(t);return i.snapToSelf(e,r)},Bd.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Wt,Bd);var Jd=(function(n){function t(e,r,i){n.call(this),this._snapTolerance=e||null,this._snapPts=r||null,this._isSelfSnap=i!==void 0?i:!1}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(r,i){var s=new _n(r,this._snapTolerance);return s.setAllowSnappingToSourceVertices(this._isSelfSnap),s.snapTo(i)},t.prototype.transformCoordinates=function(r,i){var s=r.toCoordinateArray(),o=this.snapLine(s,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(o)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(De),Se=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Se.prototype.getCommon=function(){return rt.longBitsToDouble(this._commonBits)},Se.prototype.add=function(t){var e=rt.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=Se.signExpBits(this._commonBits),this._isFirst=!1,null;var r=Se.signExpBits(e);if(r!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=Se.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=Se.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},Se.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=rt.longBitsToDouble(t),r=rt.toBinaryString(t),i="0000000000000000000000000000000000000000000000000000000000000000"+r,s=i.substring(i.length-64),o=s.substring(0,1)+" "+s.substring(1,12)+"(exp) "+s.substring(12)+" [ "+e+" ]";return o}},Se.prototype.interfaces_=function(){return[]},Se.prototype.getClass=function(){return Se},Se.getBit=function(t,e){var r=1<<e;return(t&r)!==0?1:0},Se.signExpBits=function(t){return t>>52},Se.zeroLowerBits=function(t,e){var r=(1<<e)-1,i=~r,s=t&i;return s},Se.numCommonMostSigMantissaBits=function(t,e){for(var r=0,i=52;i>=0;i--){if(Se.getBit(t,i)!==Se.getBit(e,i))return r;r++}return 52};var pi=function(){this._commonCoord=null,this._ccFilter=new Cs},dc={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};pi.prototype.addCommonBits=function(t){var e=new gi(this._commonCoord);t.apply(e),t.geometryChanged()},pi.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new N(this._commonCoord);e.x=-e.x,e.y=-e.y;var r=new gi(e);return t.apply(r),t.geometryChanged(),t},pi.prototype.getCommonCoordinate=function(){return this._commonCoord},pi.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},pi.prototype.interfaces_=function(){return[]},pi.prototype.getClass=function(){return pi},dc.CommonCoordinateFilter.get=function(){return Cs},dc.Translater.get=function(){return gi},Object.defineProperties(pi,dc);var Cs=function(){this._commonBitsX=new Se,this._commonBitsY=new Se};Cs.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},Cs.prototype.getCommonCoordinate=function(){return new N(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},Cs.prototype.interfaces_=function(){return[cn]},Cs.prototype.getClass=function(){return Cs};var gi=function(){this.trans=null;var t=arguments[0];this.trans=t};gi.prototype.filter=function(t,e){var r=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,r),t.setOrdinate(e,1,i)},gi.prototype.isDone=function(){return!1},gi.prototype.isGeometryChanged=function(){return!0},gi.prototype.interfaces_=function(){return[Er]},gi.prototype.getClass=function(){return gi};var ee=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};ee.prototype.selfSnap=function(t){var e=new Wt(t),r=e.snapTo(t,this._snapTolerance);return r},ee.prototype.removeCommonBits=function(t){this._cbr=new pi,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},ee.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},ee.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),r=it.overlayOp(e[0],e[1],t);return this.prepareResult(r)},ee.prototype.checkValid=function(t){t.isValid()||ne.out.println("Snapped geometry is invalid")},ee.prototype.computeSnapTolerance=function(){this._snapTolerance=Wt.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ee.prototype.snap=function(t){var e=this.removeCommonBits(t),r=Wt.snap(e[0],e[1],this._snapTolerance);return r},ee.prototype.interfaces_=function(){return[]},ee.prototype.getClass=function(){return ee},ee.overlayOp=function(t,e,r){var i=new ee(t,e);return i.getResultGeometry(r)},ee.union=function(t,e){return ee.overlayOp(t,e,it.UNION)},ee.intersection=function(t,e){return ee.overlayOp(t,e,it.INTERSECTION)},ee.symDifference=function(t,e){return ee.overlayOp(t,e,it.SYMDIFFERENCE)},ee.difference=function(t,e){return ee.overlayOp(t,e,it.DIFFERENCE)};var Ce=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};Ce.prototype.getResultGeometry=function(t){var e=null,r=!1,i=null;try{e=it.overlayOp(this._geom[0],this._geom[1],t);var s=!0;s&&(r=!0)}catch(o){if(o instanceof Ln)i=o;else throw o}finally{}if(!r)try{e=ee.overlayOp(this._geom[0],this._geom[1],t)}catch(o){throw o instanceof Ln?i:o}finally{}return e},Ce.prototype.interfaces_=function(){return[]},Ce.prototype.getClass=function(){return Ce},Ce.overlayOp=function(t,e,r){var i=new Ce(t,e);return i.getResultGeometry(r)},Ce.union=function(t,e){return Ce.overlayOp(t,e,it.UNION)},Ce.intersection=function(t,e){return Ce.overlayOp(t,e,it.INTERSECTION)},Ce.symDifference=function(t,e){return Ce.overlayOp(t,e,it.SYMDIFFERENCE)},Ce.difference=function(t,e){return Ce.overlayOp(t,e,it.DIFFERENCE)};var qa=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};qa.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},qa.prototype.interfaces_=function(){return[]},qa.prototype.getClass=function(){return qa};var We=function n(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var t=arguments[0],e=arguments[1];this._eventType=n.DELETE,this._xValue=t,this._insertEvent=e}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._eventType=n.INSERT,this._label=r,this._xValue=i,this._obj=s}},pc={INSERT:{configurable:!0},DELETE:{configurable:!0}};We.prototype.isDelete=function(){return this._eventType===We.DELETE},We.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},We.prototype.getObject=function(){return this._obj},We.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},We.prototype.getInsertEvent=function(){return this._insertEvent},We.prototype.isInsert=function(){return this._eventType===We.INSERT},We.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label},We.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},We.prototype.interfaces_=function(){return[sr]},We.prototype.getClass=function(){return We},pc.INSERT.get=function(){return 1},pc.DELETE.get=function(){return 2},Object.defineProperties(We,pc);var zu=function(){};zu.prototype.interfaces_=function(){return[]},zu.prototype.getClass=function(){return zu};var le=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 t=arguments[0],e=arguments[1],r=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=r};le.prototype.isTrivialIntersection=function(t,e,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(le.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.getNumPoints()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},le.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},le.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},le.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},le.prototype.isBoundaryPointInternal=function(t,e){for(var r=e.iterator();r.hasNext();){var i=r.next(),s=i.getCoordinate();if(t.isIntersection(s))return!0}return!1},le.prototype.hasProperIntersection=function(){return this._hasProper},le.prototype.hasIntersection=function(){return this._hasIntersection},le.prototype.isDone=function(){return this._isDone},le.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))},le.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},le.prototype.addIntersections=function(t,e,r,i){if(t===r&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=r.getCoordinates()[i],u=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),r.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,r,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),r.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))))},le.prototype.interfaces_=function(){return[]},le.prototype.getClass=function(){return le},le.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var Ry=(function(n){function t(){n.call(this),this.events=new U,this.nOverlaps=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){var r=this;Cr.sort(this.events);for(var i=0;i<this.events.size();i++){var s=r.events.get(i);s.isDelete()&&s.getInsertEvent().setDeleteEventIndex(i)}},t.prototype.computeIntersections=function(){var r=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=r.events.get(s);if(o.isInsert()&&r.processOverlaps(s,o.getDeleteEventIndex(),o,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof le&&Q(arguments[0],_r)&&Q(arguments[1],_r)){var a=arguments[0],u=arguments[1],l=arguments[2];this.addEdges(a,a),this.addEdges(u,u),this.computeIntersections(l)}else if(typeof arguments[2]=="boolean"&&Q(arguments[0],_r)&&arguments[1]instanceof le){var c=arguments[0],h=arguments[1],d=arguments[2];d?this.addEdges(c,null):this.addEdges(c),this.computeIntersections(h)}}},t.prototype.addEdge=function(r,i){for(var s=this,o=r.getMonotoneChainEdge(),a=o.getStartIndexes(),u=0;u<a.length-1;u++){var l=new qa(o,u),c=new We(i,o.getMinX(u),l);s.events.add(c),s.events.add(new We(o.getMaxX(u),c))}},t.prototype.processOverlaps=function(r,i,s,o){for(var a=this,u=s.getObject(),l=r;l<i;l++){var c=a.events.get(l);if(c.isInsert()){var h=c.getObject();s.isSameLabel(c)||(u.computeIntersections(h,o),a.nOverlaps++)}}},t.prototype.addEdges=function(){var r=this;if(arguments.length===1)for(var i=arguments[0],s=i.iterator();s.hasNext();){var o=s.next();r.addEdge(o,o)}else if(arguments.length===2)for(var a=arguments[0],u=arguments[1],l=a.iterator();l.hasNext();){var c=l.next();r.addEdge(c,u)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(zu),wn=function(){this._min=rt.POSITIVE_INFINITY,this._max=rt.NEGATIVE_INFINITY},jd={NodeComparator:{configurable:!0}};wn.prototype.getMin=function(){return this._min},wn.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},wn.prototype.getMax=function(){return this._max},wn.prototype.toString=function(){return yr.toLineString(new N(this._min,0),new N(this._max,0))},wn.prototype.interfaces_=function(){return[]},wn.prototype.getClass=function(){return wn},jd.NodeComparator.get=function(){return Xa},Object.defineProperties(wn,jd);var Xa=function(){};Xa.prototype.compare=function(t,e){var r=t,i=e,s=(r._min+r._max)/2,o=(i._min+i._max)/2;return s<o?-1:s>o?1:0},Xa.prototype.interfaces_=function(){return[ro]},Xa.prototype.getClass=function(){return Xa};var Fy=(function(n){function t(){n.call(this),this._item=null;var e=arguments[0],r=arguments[1],i=arguments[2];this._min=e,this._max=r,this._item=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;s.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(wn),ky=(function(n){function t(){n.call(this),this._node1=null,this._node2=null;var e=arguments[0],r=arguments[1];this._node1=e,this._node2=r,this.buildExtent(this._node1,this._node2)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(r,i){this._min=Math.min(r._min,i._min),this._max=Math.max(r._max,i._max)},t.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;this._node1!==null&&this._node1.query(r,i,s),this._node2!==null&&this._node2.query(r,i,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(wn),En=function(){this._leaves=new U,this._root=null,this._level=0};En.prototype.buildTree=function(){var t=this;Cr.sort(this._leaves,new wn.NodeComparator);for(var e=this._leaves,r=null,i=new U;;){if(t.buildLevel(e,i),i.size()===1)return i.get(0);r=e,e=i,i=r}},En.prototype.insert=function(t,e,r){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new Fy(t,e,r))},En.prototype.query=function(t,e,r){this.init(),this._root.query(t,e,r)},En.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},En.prototype.printNode=function(t){ne.out.println(yr.toLineString(new N(t._min,this._level),new N(t._max,this._level)))},En.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},En.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var r=0;r<t.size();r+=2){var i=t.get(r),s=r+1<t.size()?t.get(r):null;if(s===null)e.add(i);else{var o=new ky(t.get(r),t.get(r+1));e.add(o)}}},En.prototype.interfaces_=function(){return[]},En.prototype.getClass=function(){return En};var Eo=function(){this._items=new U};Eo.prototype.visitItem=function(t){this._items.add(t)},Eo.prototype.getItems=function(){return this._items},Eo.prototype.interfaces_=function(){return[ai]},Eo.prototype.getClass=function(){return Eo};var So=function(){this._index=null;var t=arguments[0];if(!Q(t,oi))throw new xt("Argument must be Polygonal");this._index=new ki(t)},gc={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};So.prototype.locate=function(t){var e=new Dr(t),r=new Co(e);return this._index.query(t.y,t.y,r),e.getLocation()},So.prototype.interfaces_=function(){return[yo]},So.prototype.getClass=function(){return So},gc.SegmentVisitor.get=function(){return Co},gc.IntervalIndexedGeometry.get=function(){return ki},Object.defineProperties(So,gc);var Co=function(){this._counter=null;var t=arguments[0];this._counter=t};Co.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},Co.prototype.interfaces_=function(){return[ai]},Co.prototype.getClass=function(){return Co};var ki=function(){this._index=new En;var t=arguments[0];this.init(t)};ki.prototype.init=function(t){for(var e=this,r=oe.getLines(t),i=r.iterator();i.hasNext();){var s=i.next(),o=s.getCoordinates();e.addLine(o)}},ki.prototype.addLine=function(t){for(var e=this,r=1;r<t.length;r++){var i=new Y(t[r-1],t[r]),s=Math.min(i.p0.y,i.p1.y),o=Math.max(i.p0.y,i.p1.y);e._index.insert(s,o,i)}},ki.prototype.query=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new Eo;return this._index.query(t,e,r),r.getItems()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];this._index.query(i,s,o)}},ki.prototype.interfaces_=function(){return[]},ki.prototype.getClass=function(){return ki};var Ya=(function(n){function t(){if(n.call(this),this._parentGeom=null,this._lineEdgeMap=new Od,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Pr,arguments.length===2){var e=arguments[0],r=arguments[1],i=ar.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=r,this._boundaryNodeRule=i,r!==null&&this.add(r)}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 n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(r,i){var s=this._nodes.addNode(i),o=s.getLabel(),a=1,u=O.NONE;u=o.getLocation(r,z.ON),u===O.BOUNDARY&&a++;var l=t.determineBoundary(this._boundaryNodeRule,a);o.setLocation(r,l)},t.prototype.computeSelfNodes=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.computeSelfNodes(r,i,!1)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2],u=new le(s,!0,!1);u.setIsDoneIfProperInt(a);var l=this.createEdgeSetIntersector(),c=this._parentGeom instanceof hn||this._parentGeom instanceof Bt||this._parentGeom instanceof fn,h=o||!c;return l.computeIntersections(this._edges,u,h),this.addSelfIntersectionNodes(this._argIndex),u}},t.prototype.computeSplitEdges=function(r){for(var i=this._edges.iterator();i.hasNext();){var s=i.next();s.eiList.addSplitEdges(r)}},t.prototype.computeEdgeIntersections=function(r,i,s){var o=new le(i,s,!0);o.setBoundaryNodes(this.getBoundaryNodes(),r.getBoundaryNodes());var a=this.createEdgeSetIntersector();return a.computeIntersections(this._edges,r._edges,o),o},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof Ve){var r=arguments[0],i=r.getCoordinate();this.insertPoint(this._argIndex,i,O.INTERIOR)}else if(arguments[0]instanceof N){var s=arguments[0];this.insertPoint(this._argIndex,s,O.INTERIOR)}},t.prototype.addPolygon=function(r){var i=this;this.addPolygonRing(r.getExteriorRing(),O.EXTERIOR,O.INTERIOR);for(var s=0;s<r.getNumInteriorRing();s++){var o=r.getInteriorRingN(s);i.addPolygonRing(o,O.INTERIOR,O.EXTERIOR)}},t.prototype.addEdge=function(r){this.insertEdge(r);var i=r.getCoordinates();this.insertPoint(this._argIndex,i[0],O.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],O.BOUNDARY)},t.prototype.addLineString=function(r){var i=at.removeRepeatedPoints(r.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var s=new Vu(i,new Et(this._argIndex,O.INTERIOR));this._lineEdgeMap.put(r,s),this.insertEdge(s),st.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var r=this.getBoundaryNodes(),i=new Array(r.size()).fill(null),s=0,o=r.iterator();o.hasNext();){var a=o.next();i[s++]=a.getCoordinate().copy()}return i},t.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(r,i,s){if(this.isBoundaryNode(r,i))return null;s===O.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(r,i):this.insertPoint(r,i,s)},t.prototype.addPolygonRing=function(r,i,s){if(r.isEmpty())return null;var o=at.removeRepeatedPoints(r.getCoordinates());if(o.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=o[0],null;var a=i,u=s;G.isCCW(o)&&(a=s,u=i);var l=new Vu(o,new Et(this._argIndex,O.BOUNDARY,a,u));this._lineEdgeMap.put(r,l),this.insertEdge(l),this.insertPoint(this._argIndex,o[0],O.BOUNDARY)},t.prototype.insertPoint=function(r,i,s){var o=this._nodes.addNode(i),a=o.getLabel();a===null?o._label=new Et(r,s):a.setLocation(r,s)},t.prototype.createEdgeSetIntersector=function(){return new Ry},t.prototype.addSelfIntersectionNodes=function(r){for(var i=this,s=this._edges.iterator();s.hasNext();)for(var o=s.next(),a=o.getLabel().getLocation(r),u=o.eiList.iterator();u.hasNext();){var l=u.next();i.addSelfIntersectionNode(r,l.coord,a)}},t.prototype.add=function(){if(arguments.length===1){var r=arguments[0];if(r.isEmpty())return null;if(r instanceof fn&&(this._useBoundaryDeterminationRule=!1),r instanceof Bt)this.addPolygon(r);else if(r instanceof Rt)this.addLineString(r);else if(r instanceof Ve)this.addPoint(r);else if(r instanceof po)this.addCollection(r);else if(r instanceof Oi)this.addCollection(r);else if(r instanceof fn)this.addCollection(r);else if(r instanceof me)this.addCollection(r);else throw new Error(r.getClass().getName())}else return n.prototype.add.apply(this,arguments)},t.prototype.addCollection=function(r){for(var i=this,s=0;s<r.getNumGeometries();s++){var o=r.getGeometryN(s);i.add(o)}},t.prototype.locate=function(r){return Q(this._parentGeom,oi)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new So(this._parentGeom)),this._areaPtLocator.locate(r)):this._ptLocator.locate(r,this._parentGeom)},t.prototype.findEdge=function(){if(arguments.length===1){var r=arguments[0];return this._lineEdgeMap.get(r)}else return n.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(r,i){return r.isInBoundary(i)?O.BOUNDARY:O.INTERIOR},t})(Dt),Io=function(){if(this._li=new Ni,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Ya(0,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=ar.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(r.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(r.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Ya(0,e,i),this._arg[1]=new Ya(1,r,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 Ya(0,s,a),this._arg[1]=new Ya(1,o,a)}};Io.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Io.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Io.prototype.interfaces_=function(){return[]},Io.prototype.getClass=function(){return Io};var Vi=function(){};Vi.prototype.interfaces_=function(){return[]},Vi.prototype.getClass=function(){return Vi},Vi.map=function(){if(arguments[0]instanceof K&&Q(arguments[1],Vi.MapOp)){for(var t=arguments[0],e=arguments[1],r=new U,i=0;i<t.getNumGeometries();i++){var s=e.map(t.getGeometryN(i));s!==null&&r.add(s)}return t.getFactory().buildGeometry(r)}else if(Q(arguments[0],Ht)&&Q(arguments[1],Vi.MapOp)){for(var o=arguments[0],a=arguments[1],u=new U,l=o.iterator();l.hasNext();){var c=l.next(),h=a.map(c);h!==null&&u.add(h)}return u}},Vi.MapOp=function(){};var it=(function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r),this._ptLocator=new Pr,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Ir,this._resultPolyList=new U,this._resultLineList=new U,this._resultPointList=new U,this._graph=new Dt(new Ud),this._geomFact=e.getFactory()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(r){var i=this._edgeList.findEqualEdge(r);if(i!==null){var s=i.getLabel(),o=r.getLabel();i.isPointwiseEqual(r)||(o=new Et(r.getLabel()),o.flip());var a=i.getDepth();a.isNull()&&a.add(s),a.add(o),s.merge(o)}else this._edgeList.add(r)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var r=this._graph.getEdgeEnds().iterator();r.hasNext();){var i=r.next(),s=i.getSym();i.isInResult()&&s.isInResult()&&(i.setInResult(!1),s.setInResult(!1))}},t.prototype.isCoveredByLA=function(r){return!!(this.isCovered(r,this._resultLineList)||this.isCovered(r,this._resultPolyList))},t.prototype.computeGeometry=function(r,i,s,o){var a=new U;return a.addAll(r),a.addAll(i),a.addAll(s),a.isEmpty()?t.createEmptyResult(o,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(a)},t.prototype.mergeSymLabels=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next();i.getEdges().mergeSymLabels()}},t.prototype.isCovered=function(r,i){for(var s=this,o=i.iterator();o.hasNext();){var a=o.next(),u=s._ptLocator.locate(r,a);if(u!==O.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var r=new U,i=this._edgeList.iterator();i.hasNext();){var s=i.next();s.isCollapsed()&&(i.remove(),r.add(s.getCollapsedEdge()))}this._edgeList.addAll(r)},t.prototype.updateNodeLabelling=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next(),s=i.getEdges().getLabel();i.getLabel().merge(s)}},t.prototype.getResultGeometry=function(r){return this.computeOverlay(r),this._resultGeom},t.prototype.insertUniqueEdges=function(r){for(var i=this,s=r.iterator();s.hasNext();){var o=s.next();i.insertUniqueEdge(o)}},t.prototype.computeOverlay=function(r){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 U;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Fi.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(r),this.cancelDuplicateResultEdges();var s=new ze(this._geomFact);s.add(this._graph),this._resultPolyList=s.getPolygons();var o=new Yr(this,this._geomFact,this._ptLocator);this._resultLineList=o.build(r);var a=new Ss(this,this._geomFact,this._ptLocator);this._resultPointList=a.build(r),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,r)},t.prototype.labelIncompleteNode=function(r,i){var s=this._ptLocator.locate(r.getCoordinate(),this._arg[i].getGeometry());r.getLabel().setLocation(i,s)},t.prototype.copyPoints=function(r){for(var i=this,s=this._arg[r].getNodeIterator();s.hasNext();){var o=s.next(),a=i._graph.addNode(o.getCoordinate());a.setLabel(r,o.getLabel().getLocation(r))}},t.prototype.findResultAreaEdges=function(r){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.isArea()&&!s.isInteriorAreaEdge()&&t.isResultOfOp(o.getLocation(0,z.RIGHT),o.getLocation(1,z.RIGHT),r)&&s.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var r=this._edgeList.iterator();r.hasNext();){var i=r.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):(st.isTrue(!o.isNull(a,z.LEFT),"depth of LEFT side has not been initialized"),s.setLocation(a,z.LEFT,o.getLocation(a,z.LEFT)),st.isTrue(!o.isNull(a,z.RIGHT),"depth of RIGHT side has not been initialized"),s.setLocation(a,z.RIGHT,o.getLocation(a,z.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next();s.getEdges().computeLabelling(r._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();s.isIsolated()&&(o.isNull(0)?r.labelIncompleteNode(s,0):r.labelIncompleteNode(s,1)),s.getEdges().updateLabelling(o)}},t.prototype.isCoveredByA=function(r){return!!this.isCovered(r,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t})(Io);it.overlayOp=function(n,t,e){var r=new it(n,t),i=r.getResultGeometry(e);return i},it.intersection=function(n,t){if(n.isEmpty()||t.isEmpty())return it.createEmptyResult(it.INTERSECTION,n,t,n.getFactory());if(n.isGeometryCollection()){var e=t;return Es.map(n,{interfaces_:function(){return[Vi.MapOp]},map:function(r){return r.intersection(e)}})}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),Ce.overlayOp(n,t,it.INTERSECTION)},it.symDifference=function(n,t){if(n.isEmpty()||t.isEmpty()){if(n.isEmpty()&&t.isEmpty())return it.createEmptyResult(it.SYMDIFFERENCE,n,t,n.getFactory());if(n.isEmpty())return t.copy();if(t.isEmpty())return n.copy()}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),Ce.overlayOp(n,t,it.SYMDIFFERENCE)},it.resultDimension=function(n,t,e){var r=t.getDimension(),i=e.getDimension(),s=-1;switch(n){case it.INTERSECTION:s=Math.min(r,i);break;case it.UNION:s=Math.max(r,i);break;case it.DIFFERENCE:s=r;break;case it.SYMDIFFERENCE:s=Math.max(r,i);break}return s},it.createEmptyResult=function(n,t,e,r){var i=null;switch(it.resultDimension(n,t,e)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon();break}return i},it.difference=function(n,t){return n.isEmpty()?it.createEmptyResult(it.DIFFERENCE,n,t,n.getFactory()):t.isEmpty()?n.copy():(n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),Ce.overlayOp(n,t,it.DIFFERENCE))},it.isResultOfOp=function(){if(arguments.length===2){var n=arguments[0],t=arguments[1],e=n.getLocation(0),r=n.getLocation(1);return it.isResultOfOp(e,r,t)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];switch(i===O.BOUNDARY&&(i=O.INTERIOR),s===O.BOUNDARY&&(s=O.INTERIOR),o){case it.INTERSECTION:return i===O.INTERIOR&&s===O.INTERIOR;case it.UNION:return i===O.INTERIOR||s===O.INTERIOR;case it.DIFFERENCE:return i===O.INTERIOR&&s!==O.INTERIOR;case it.SYMDIFFERENCE:return i===O.INTERIOR&&s!==O.INTERIOR||i!==O.INTERIOR&&s===O.INTERIOR}return!1}},it.INTERSECTION=1,it.UNION=2,it.DIFFERENCE=3,it.SYMDIFFERENCE=4;var mi=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Pr,this._seg=new Y;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};mi.prototype.isWithinToleranceOfBoundary=function(t){for(var e=this,r=0;r<this._linework.getNumGeometries();r++)for(var i=e._linework.getGeometryN(r),s=i.getCoordinateSequence(),o=0;o<s.size()-1;o++){s.getCoordinate(o,e._seg.p0),s.getCoordinate(o+1,e._seg.p1);var a=e._seg.distance(t);if(a<=e._boundaryDistanceTolerance)return!0}return!1},mi.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?O.BOUNDARY:this._ptLocator.locate(t,this._g)},mi.prototype.extractLinework=function(t){var e=new Po;t.apply(e);var r=e.getLinework(),i=ut.toLineStringArray(r);return t.getFactory().createMultiLineString(i)},mi.prototype.interfaces_=function(){return[]},mi.prototype.getClass=function(){return mi};var Po=function(){this._linework=null,this._linework=new U};Po.prototype.getLinework=function(){return this._linework},Po.prototype.filter=function(t){var e=this;if(t instanceof Bt){var r=t;this._linework.add(r.getExteriorRing());for(var i=0;i<r.getNumInteriorRing();i++)e._linework.add(r.getInteriorRingN(i))}},Po.prototype.interfaces_=function(){return[Ar]},Po.prototype.getClass=function(){return Po};var zi=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};zi.prototype.extractPoints=function(t,e,r){for(var i=this,s=t.getCoordinates(),o=0;o<s.length-1;o++)i.computeOffsetPoints(s[o],s[o+1],e,r)},zi.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},zi.prototype.getPoints=function(t){for(var e=this,r=new U,i=oe.getLines(this._g),s=i.iterator();s.hasNext();){var o=s.next();e.extractPoints(o,t,r)}return r},zi.prototype.computeOffsetPoints=function(t,e,r,i){var s=e.x-t.x,o=e.y-t.y,a=Math.sqrt(s*s+o*o),u=r*s/a,l=r*o/a,c=(e.x+t.x)/2,h=(e.y+t.y)/2;if(this._doLeft){var d=new N(c-l,h+u);i.add(d)}if(this._doRight){var g=new N(c+l,h-u);i.add(g)}},zi.prototype.interfaces_=function(){return[]},zi.prototype.getClass=function(){return zi};var rr=function n(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=n.TOLERANCE,this._testCoords=new U;var t=arguments[0],e=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=n.computeBoundaryDistanceTolerance(t,e),this._geom=[t,e,r],this._locFinder=[new mi(this._geom[0],this._boundaryDistanceTolerance),new mi(this._geom[1],this._boundaryDistanceTolerance),new mi(this._geom[2],this._boundaryDistanceTolerance)]},Zd={TOLERANCE:{configurable:!0}};rr.prototype.reportResult=function(t,e,r){ne.out.println("Overlay result invalid - A:"+O.toLocationSymbol(e[0])+" B:"+O.toLocationSymbol(e[1])+" expected:"+(r?"i":"e")+" actual:"+O.toLocationSymbol(e[2]))},rr.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},rr.prototype.checkValid=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],r=0;r<this._testCoords.size();r++){var i=t._testCoords.get(r);if(!t.checkValid(e,i))return t._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),rr.hasLocation(this._location,O.BOUNDARY)?!0:this.isValidResult(s,this._location)}},rr.prototype.addTestPts=function(t){var e=new zi(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},rr.prototype.isValidResult=function(t,e){var r=it.isResultOfOp(e[0],e[1],t),i=e[2]===O.INTERIOR,s=!(r^i);return s||this.reportResult(t,e,r),s},rr.prototype.getInvalidLocation=function(){return this._invalidLocation},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.hasLocation=function(t,e){for(var r=0;r<3;r++)if(t[r]===e)return!0;return!1},rr.computeBoundaryDistanceTolerance=function(t,e){return Math.min(Wt.computeSizeBasedSnapTolerance(t),Wt.computeSizeBasedSnapTolerance(e))},rr.isValid=function(t,e,r,i){var s=new rr(t,e,i);return s.isValid(r)},Zd.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(rr,Zd);var nr=function n(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=n.extractFactory(t),this._inputGeoms=t};nr.prototype.extractElements=function(t,e){var r=this;if(t===null)return null;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);r._skipEmpty&&s.isEmpty()||e.add(s)}},nr.prototype.combine=function(){for(var t=this,e=new U,r=this._inputGeoms.iterator();r.hasNext();){var i=r.next();t.extractElements(i,e)}return e.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(e)},nr.prototype.interfaces_=function(){return[]},nr.prototype.getClass=function(){return nr},nr.combine=function(){if(arguments.length===1){var t=arguments[0],e=new nr(t);return e.combine()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=new nr(nr.createList(r,i));return s.combine()}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2],l=new nr(nr.createList(o,a,u));return l.combine()}},nr.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},nr.createList=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new U;return r.add(t),r.add(e),r}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new U;return a.add(i),a.add(s),a.add(o),a}};var Yt=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,this._inputPolys===null&&(this._inputPolys=new U)},Kd={STRTREE_NODE_CAPACITY:{configurable:!0}};Yt.prototype.reduceToGeometries=function(t){for(var e=this,r=new U,i=t.iterator();i.hasNext();){var s=i.next(),o=null;Q(s,_r)?o=e.unionTree(s):s instanceof K&&(o=s),r.add(o)}return r},Yt.prototype.extractByEnvelope=function(t,e,r){for(var i=new U,s=0;s<e.getNumGeometries();s++){var o=e.getGeometryN(s);o.getEnvelopeInternal().intersects(t)?i.add(o):r.add(o)}return this._geomFactory.buildGeometry(i)},Yt.prototype.unionOptimized=function(t,e){var r=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!r.intersects(i)){var s=nr.combine(t,e);return s}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var o=r.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,o)},Yt.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 t=new Ad(Yt.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var r=e.next();t.insert(r.getEnvelopeInternal(),r)}this._inputPolys=null;var i=t.itemsTree(),s=this.unionTree(i);return s},Yt.prototype.binaryUnion=function(){if(arguments.length===1){var t=arguments[0];return this.binaryUnion(t,0,t.size())}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2];if(i-r<=1){var s=Yt.getGeometry(e,r);return this.unionSafe(s,null)}else{if(i-r===2)return this.unionSafe(Yt.getGeometry(e,r),Yt.getGeometry(e,r+1));var o=Math.trunc((i+r)/2),a=this.binaryUnion(e,r,o),u=this.binaryUnion(e,o,i);return this.unionSafe(a,u)}}},Yt.prototype.repeatedUnion=function(t){for(var e=null,r=t.iterator();r.hasNext();){var i=r.next();e===null?e=i.copy():e=e.union(i)}return e},Yt.prototype.unionSafe=function(t,e){return t===null&&e===null?null:t===null?e.copy():e===null?t.copy():this.unionOptimized(t,e)},Yt.prototype.unionActual=function(t,e){return Yt.restrictToPolygons(t.union(e))},Yt.prototype.unionTree=function(t){var e=this.reduceToGeometries(t),r=this.binaryUnion(e);return r},Yt.prototype.unionUsingEnvelopeIntersection=function(t,e,r){var i=new U,s=this.extractByEnvelope(r,t,i),o=this.extractByEnvelope(r,e,i),a=this.unionActual(s,o);i.add(a);var u=nr.combine(i);return u},Yt.prototype.bufferUnion=function(){if(arguments.length===1){var t=arguments[0],e=t.get(0).getFactory(),r=e.buildGeometry(t),i=r.buffer(0);return i}else if(arguments.length===2){var s=arguments[0],o=arguments[1],a=s.getFactory(),u=a.createGeometryCollection([s,o]),l=u.buffer(0);return l}},Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Yt.restrictToPolygons=function(t){if(Q(t,oi))return t;var e=qn.getPolygons(t);return e.size()===1?e.get(0):t.getFactory().createMultiPolygon(ut.toPolygonArray(e))},Yt.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Yt.union=function(t){var e=new Yt(t);return e.union()},Kd.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Yt,Kd);var Uu=function(){};Uu.prototype.interfaces_=function(){return[]},Uu.prototype.getClass=function(){return Uu},Uu.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return it.createEmptyResult(it.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),Ce.overlayOp(t,e,it.UNION)};function Ui(){return new Gu}function Gu(){this.reset()}Gu.prototype={constructor:Gu,reset:function(){this.s=this.t=0},add:function(n){Qd(Wu,n,this.t),Qd(this,Wu.s,this.s),this.s?this.t+=Wu.t:this.s=Wu.t},valueOf:function(){return this.s}};var Wu=new Gu;function Qd(n,t,e){var r=n.s=t+e,i=r-t,s=r-i;n.t=t-s+(e-i)}var kt=1e-6,Ct=Math.PI,Xn=Ct/2,$d=Ct/4,Yn=Ct*2,Gi=180/Ct,Hr=Ct/180,Ie=Math.abs,Vy=Math.atan,bo=Math.atan2,jt=Math.cos,Zt=Math.sin,No=Math.sqrt;function tp(n){return n>1?0:n<-1?Ct:Math.acos(n)}function Is(n){return n>1?Xn:n<-1?-Xn:Math.asin(n)}function Ha(){}function qu(n,t){n&&rp.hasOwnProperty(n.type)&&rp[n.type](n,t)}var ep={Feature:function(n,t){qu(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)qu(e[r].geometry,t)}},rp={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){mc(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)mc(e[r],t,0)},Polygon:function(n,t){np(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)np(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)qu(e[r],t)}};function mc(n,t,e){var r=-1,i=n.length-e,s;for(t.lineStart();++r<i;)s=n[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function np(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)mc(n[e],t,1);t.polygonEnd()}function zy(n,t){n&&ep.hasOwnProperty(n.type)?ep[n.type](n,t):qu(n,t)}Ui(),Ui();function vc(n){return[bo(n[1],n[0]),Is(n[2])]}function To(n){var t=n[0],e=n[1],r=jt(e);return[r*jt(t),r*Zt(t),Zt(e)]}function Xu(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function Yu(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function yc(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Hu(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function _c(n){var t=No(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}Ui();function ip(n,t){function e(r,i){return r=n(r,i),t(r[0],r[1])}return n.invert&&t.invert&&(e.invert=function(r,i){return r=t.invert(r,i),r&&n.invert(r[0],r[1])}),e}function wc(n,t){return[n>Ct?n-Yn:n<-Ct?n+Yn:n,t]}wc.invert=wc;function Uy(n,t,e){return(n%=Yn)?t||e?ip(op(n),ap(t,e)):op(n):t||e?ap(t,e):wc}function sp(n){return function(t,e){return t+=n,[t>Ct?t-Yn:t<-Ct?t+Yn:t,e]}}function op(n){var t=sp(n);return t.invert=sp(-n),t}function ap(n,t){var e=jt(n),r=Zt(n),i=jt(t),s=Zt(t);function o(a,u){var l=jt(u),c=jt(a)*l,h=Zt(a)*l,d=Zt(u),g=d*e+c*r;return[bo(h*i-g*s,c*e-d*r),Is(g*i+h*s)]}return o.invert=function(a,u){var l=jt(u),c=jt(a)*l,h=Zt(a)*l,d=Zt(u),g=d*i-h*s;return[bo(h*i+d*s,c*e+g*r),Is(g*e-c*r)]},o}function Gy(n,t,e,r,i,s){if(e){var o=jt(t),a=Zt(t),u=r*e;i==null?(i=t+r*Yn,s=t-u/2):(i=up(o,i),s=up(o,s),(r>0?i<s:i>s)&&(i+=r*Yn));for(var l,c=i;r>0?c>s:c<s;c-=u)l=vc([o,-a*jt(c),-a*Zt(c)]),n.point(l[0],l[1])}}function up(n,t){t=To(t),t[0]-=n,_c(t);var e=tp(-t[1]);return((-t[2]<0?-e:e)+Yn-kt)%Yn}function lp(){var n=[],t;return{point:function(e,r){t.push([e,r])},lineStart:function(){n.push(t=[])},lineEnd:Ha,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function Wy(n,t,e,r,i,s){var o=n[0],a=n[1],u=t[0],l=t[1],c=0,h=1,d=u-o,g=l-a,v;if(v=e-o,!(!d&&v>0)){if(v/=d,d<0){if(v<c)return;v<h&&(h=v)}else if(d>0){if(v>h)return;v>c&&(c=v)}if(v=i-o,!(!d&&v<0)){if(v/=d,d<0){if(v>h)return;v>c&&(c=v)}else if(d>0){if(v<c)return;v<h&&(h=v)}if(v=r-a,!(!g&&v>0)){if(v/=g,g<0){if(v<c)return;v<h&&(h=v)}else if(g>0){if(v>h)return;v>c&&(c=v)}if(v=s-a,!(!g&&v<0)){if(v/=g,g<0){if(v>h)return;v>c&&(c=v)}else if(g>0){if(v<c)return;v<h&&(h=v)}return c>0&&(n[0]=o+c*d,n[1]=a+c*g),h<1&&(t[0]=o+h*d,t[1]=a+h*g),!0}}}}}function Bu(n,t){return Ie(n[0]-t[0])<kt&&Ie(n[1]-t[1])<kt}function Ju(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function cp(n,t,e,r,i){var s=[],o=[],a,u;if(n.forEach(function(v){if(!((E=v.length-1)<=0)){var E,C=v[0],b=v[E],m;if(Bu(C,b)){for(i.lineStart(),a=0;a<E;++a)i.point((C=v[a])[0],C[1]);i.lineEnd();return}s.push(m=new Ju(C,v,null,!0)),o.push(m.o=new Ju(C,null,m,!1)),s.push(m=new Ju(b,v,null,!1)),o.push(m.o=new Ju(b,null,m,!0))}}),!!s.length){for(o.sort(t),hp(s),hp(o),a=0,u=o.length;a<u;++a)o[a].e=e=!e;for(var l=s[0],c,h;;){for(var d=l,g=!0;d.v;)if((d=d.n)===l)return;c=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(g)for(a=0,u=c.length;a<u;++a)i.point((h=c[a])[0],h[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(g)for(c=d.p.z,a=c.length-1;a>=0;--a)i.point((h=c[a])[0],h[1]);else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,c=d.z,g=!g}while(!d.v);i.lineEnd()}}}function hp(n){if(t=n.length){for(var t,e=0,r=n[0],i;++e<t;)r.n=i=n[e],i.p=r,r=i;r.n=i=n[0],i.p=r}}function fp(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function qy(n){return n.length===1&&(n=Xy(n)),{left:function(t,e,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var s=r+i>>>1;n(t[s],e)<0?r=s+1:i=s}return r},right:function(t,e,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var s=r+i>>>1;n(t[s],e)>0?i=s:r=s+1}return r}}}function Xy(n){return function(t,e){return fp(n(t),e)}}qy(fp);function dp(n){for(var t=n.length,e,r=-1,i=0,s,o;++r<t;)i+=n[r].length;for(s=new Array(i);--t>=0;)for(o=n[t],e=o.length;--e>=0;)s[--i]=o[e];return s}var Ba=1e9,ju=-Ba;function Yy(n,t,e,r){function i(l,c){return n<=l&&l<=e&&t<=c&&c<=r}function s(l,c,h,d){var g=0,v=0;if(l==null||(g=o(l,h))!==(v=o(c,h))||u(l,c)<0^h>0)do d.point(g===0||g===3?n:e,g>1?r:t);while((g=(g+h+4)%4)!==v);else d.point(c[0],c[1])}function o(l,c){return Ie(l[0]-n)<kt?c>0?0:3:Ie(l[0]-e)<kt?c>0?2:1:Ie(l[1]-t)<kt?c>0?1:0:c>0?3:2}function a(l,c){return u(l.x,c.x)}function u(l,c){var h=o(l,1),d=o(c,1);return h!==d?h-d:h===0?c[1]-l[1]:h===1?l[0]-c[0]:h===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,h=lp(),d,g,v,E,C,b,m,y,_,S,I,P={point:M,lineStart:A,lineEnd:L,polygonStart:k,polygonEnd:x};function M(J,et){i(J,et)&&c.point(J,et)}function R(){for(var J=0,et=0,dt=g.length;et<dt;++et)for(var Lt=g[et],Qt=1,pr=Lt.length,Vt=Lt[0],At,Pe,wl=Vt[0],pa=Vt[1];Qt<pr;++Qt)At=wl,Pe=pa,Vt=Lt[Qt],wl=Vt[0],pa=Vt[1],Pe<=r?pa>r&&(wl-At)*(r-Pe)>(pa-Pe)*(n-At)&&++J:pa<=r&&(wl-At)*(r-Pe)<(pa-Pe)*(n-At)&&--J;return J}function k(){c=h,d=[],g=[],I=!0}function x(){var J=R(),et=I&&J,dt=(d=dp(d)).length;(et||dt)&&(l.polygonStart(),et&&(l.lineStart(),s(null,null,1,l),l.lineEnd()),dt&&cp(d,a,J,s,l),l.polygonEnd()),c=l,d=g=v=null}function A(){P.point=F,g&&g.push(v=[]),S=!0,_=!1,m=y=NaN}function L(){d&&(F(E,C),b&&_&&h.rejoin(),d.push(h.result())),P.point=M,_&&c.lineEnd()}function F(J,et){var dt=i(J,et);if(g&&v.push([J,et]),S)E=J,C=et,b=dt,S=!1,dt&&(c.lineStart(),c.point(J,et));else if(dt&&_)c.point(J,et);else{var Lt=[m=Math.max(ju,Math.min(Ba,m)),y=Math.max(ju,Math.min(Ba,y))],Qt=[J=Math.max(ju,Math.min(Ba,J)),et=Math.max(ju,Math.min(Ba,et))];Wy(Lt,Qt,n,t,e,r)?(_||(c.lineStart(),c.point(Lt[0],Lt[1])),c.point(Qt[0],Qt[1]),dt||c.lineEnd(),I=!1):dt&&(c.lineStart(),c.point(J,et),I=!1)}m=J,y=et,_=dt}return P}}var Ec=Ui();function Hy(n,t){var e=t[0],r=t[1],i=[Zt(e),-jt(e),0],s=0,o=0;Ec.reset();for(var a=0,u=n.length;a<u;++a)if(c=(l=n[a]).length)for(var l,c,h=l[c-1],d=h[0],g=h[1]/2+$d,v=Zt(g),E=jt(g),C=0;C<c;++C,d=m,v=_,E=S,h=b){var b=l[C],m=b[0],y=b[1]/2+$d,_=Zt(y),S=jt(y),I=m-d,P=I>=0?1:-1,M=P*I,R=M>Ct,k=v*_;if(Ec.add(bo(k*P*Zt(M),E*S+k*jt(M))),s+=R?I+P*Yn:I,R^d>=e^m>=e){var x=Yu(To(h),To(b));_c(x);var A=Yu(i,x);_c(A);var L=(R^I>=0?-1:1)*Is(A[2]);(r>L||r===L&&(x[0]||x[1]))&&(o+=R^I>=0?1:-1)}}return(s<-kt||s<kt&&Ec<-kt)^o&1}Ui();function pp(n){return n}Ui(),Ui();var xo=1/0,Zu=xo,Ja=-xo,Ku=Ja,gp={point:By,lineStart:Ha,lineEnd:Ha,polygonStart:Ha,polygonEnd:Ha,result:function(){var n=[[xo,Zu],[Ja,Ku]];return Ja=Ku=-(Zu=xo=1/0),n}};function By(n,t){n<xo&&(xo=n),n>Ja&&(Ja=n),t<Zu&&(Zu=t),t>Ku&&(Ku=t)}Ui();function mp(n,t,e,r){return function(i,s){var o=t(s),a=i.invert(r[0],r[1]),u=lp(),l=t(u),c=!1,h,d,g,v={point:E,lineStart:b,lineEnd:m,polygonStart:function(){v.point=y,v.lineStart=_,v.lineEnd=S,d=[],h=[]},polygonEnd:function(){v.point=E,v.lineStart=b,v.lineEnd=m,d=dp(d);var I=Hy(h,a);d.length?(c||(s.polygonStart(),c=!0),cp(d,jy,I,e,s)):I&&(c||(s.polygonStart(),c=!0),s.lineStart(),e(null,null,1,s),s.lineEnd()),c&&(s.polygonEnd(),c=!1),d=h=null},sphere:function(){s.polygonStart(),s.lineStart(),e(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function E(I,P){var M=i(I,P);n(I=M[0],P=M[1])&&s.point(I,P)}function C(I,P){var M=i(I,P);o.point(M[0],M[1])}function b(){v.point=C,o.lineStart()}function m(){v.point=E,o.lineEnd()}function y(I,P){g.push([I,P]);var M=i(I,P);l.point(M[0],M[1])}function _(){l.lineStart(),g=[]}function S(){y(g[0][0],g[0][1]),l.lineEnd();var I=l.clean(),P=u.result(),M,R=P.length,k,x,A;if(g.pop(),h.push(g),g=null,!!R){if(I&1){if(x=P[0],(k=x.length-1)>0){for(c||(s.polygonStart(),c=!0),s.lineStart(),M=0;M<k;++M)s.point((A=x[M])[0],A[1]);s.lineEnd()}return}R>1&&I&2&&P.push(P.pop().concat(P.shift())),d.push(P.filter(Jy))}}return v}}function Jy(n){return n.length>1}function jy(n,t){return((n=n.x)[0]<0?n[1]-Xn-kt:Xn-n[1])-((t=t.x)[0]<0?t[1]-Xn-kt:Xn-t[1])}const vp=mp(function(){return!0},Zy,Qy,[-Ct,-Xn]);function Zy(n){var t=NaN,e=NaN,r=NaN,i;return{lineStart:function(){n.lineStart(),i=1},point:function(s,o){var a=s>0?Ct:-Ct,u=Ie(s-t);Ie(u-Ct)<kt?(n.point(t,e=(e+o)/2>0?Xn:-Xn),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(a,e),n.point(s,e),i=0):r!==a&&u>=Ct&&(Ie(t-r)<kt&&(t-=r*kt),Ie(s-a)<kt&&(s-=a*kt),e=Ky(t,e,s,o),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(a,e),i=0),n.point(t=s,e=o),r=a},lineEnd:function(){n.lineEnd(),t=e=NaN},clean:function(){return 2-i}}}function Ky(n,t,e,r){var i,s,o=Zt(n-e);return Ie(o)>kt?Vy((Zt(t)*(s=jt(r))*Zt(e)-Zt(r)*(i=jt(t))*Zt(n))/(i*s*o)):(t+r)/2}function Qy(n,t,e,r){var i;if(n==null)i=e*Xn,r.point(-Ct,i),r.point(0,i),r.point(Ct,i),r.point(Ct,0),r.point(Ct,-i),r.point(0,-i),r.point(-Ct,-i),r.point(-Ct,0),r.point(-Ct,i);else if(Ie(n[0]-t[0])>kt){var s=n[0]<t[0]?Ct:-Ct;i=e*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function $y(n,t){var e=jt(n),r=e>0,i=Ie(e)>kt;function s(c,h,d,g){Gy(g,n,t,d,c,h)}function o(c,h){return jt(c)*jt(h)>e}function a(c){var h,d,g,v,E;return{lineStart:function(){v=g=!1,E=1},point:function(C,b){var m=[C,b],y,_=o(C,b),S=r?_?0:l(C,b):_?l(C+(C<0?Ct:-Ct),b):0;if(!h&&(v=g=_)&&c.lineStart(),_!==g&&(y=u(h,m),(!y||Bu(h,y)||Bu(m,y))&&(m[0]+=kt,m[1]+=kt,_=o(m[0],m[1]))),_!==g)E=0,_?(c.lineStart(),y=u(m,h),c.point(y[0],y[1])):(y=u(h,m),c.point(y[0],y[1]),c.lineEnd()),h=y;else if(i&&h&&r^_){var I;!(S&d)&&(I=u(m,h,!0))&&(E=0,r?(c.lineStart(),c.point(I[0][0],I[0][1]),c.point(I[1][0],I[1][1]),c.lineEnd()):(c.point(I[1][0],I[1][1]),c.lineEnd(),c.lineStart(),c.point(I[0][0],I[0][1])))}_&&(!h||!Bu(h,m))&&c.point(m[0],m[1]),h=m,g=_,d=S},lineEnd:function(){g&&c.lineEnd(),h=null},clean:function(){return E|(v&&g)<<1}}}function u(c,h,d){var g=To(c),v=To(h),E=[1,0,0],C=Yu(g,v),b=Xu(C,C),m=C[0],y=b-m*m;if(!y)return!d&&c;var _=e*b/y,S=-e*m/y,I=Yu(E,C),P=Hu(E,_),M=Hu(C,S);yc(P,M);var R=I,k=Xu(P,R),x=Xu(R,R),A=k*k-x*(Xu(P,P)-1);if(!(A<0)){var L=No(A),F=Hu(R,(-k-L)/x);if(yc(F,P),F=vc(F),!d)return F;var J=c[0],et=h[0],dt=c[1],Lt=h[1],Qt;et<J&&(Qt=J,J=et,et=Qt);var pr=et-J,Vt=Ie(pr-Ct)<kt,At=Vt||pr<kt;if(!Vt&&Lt<dt&&(Qt=dt,dt=Lt,Lt=Qt),At?Vt?dt+Lt>0^F[1]<(Ie(F[0]-J)<kt?dt:Lt):dt<=F[1]&&F[1]<=Lt:pr>Ct^(J<=F[0]&&F[0]<=et)){var Pe=Hu(R,(-k+L)/x);return yc(Pe,P),[F,vc(Pe)]}}}function l(c,h){var d=r?n:Ct-n,g=0;return c<-d?g|=1:c>d&&(g|=2),h<-d?g|=4:h>d&&(g|=8),g}return mp(o,a,s,r?[0,-n]:[-Ct,n-Ct])}function yp(n){return function(t){var e=new Sc;for(var r in n)e[r]=n[r];return e.stream=t,e}}function Sc(){}Sc.prototype={constructor:Sc,point:function(n,t){this.stream.point(n,t)},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 _p(n,t,e){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],s=n.clipExtent&&n.clipExtent();n.scale(150).translate([0,0]),s!=null&&n.clipExtent(null),zy(e,n.stream(gp));var o=gp.result(),a=Math.min(r/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),u=+t[0][0]+(r-a*(o[1][0]+o[0][0]))/2,l=+t[0][1]+(i-a*(o[1][1]+o[0][1]))/2;return s!=null&&n.clipExtent(s),n.scale(a*150).translate([u,l])}function t_(n,t,e){return _p(n,[[0,0],t],e)}var wp=16,e_=jt(30*Hr);function Ep(n,t){return+t?n_(n,t):r_(n)}function r_(n){return yp({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}})}function n_(n,t){function e(r,i,s,o,a,u,l,c,h,d,g,v,E,C){var b=l-r,m=c-i,y=b*b+m*m;if(y>4*t&&E--){var _=o+d,S=a+g,I=u+v,P=No(_*_+S*S+I*I),M=Is(I/=P),R=Ie(Ie(I)-1)<kt||Ie(s-h)<kt?(s+h)/2:bo(S,_),k=n(R,M),x=k[0],A=k[1],L=x-r,F=A-i,J=m*L-b*F;(J*J/y>t||Ie((b*L+m*F)/y-.5)>.3||o*d+a*g+u*v<e_)&&(e(r,i,s,o,a,u,x,A,R,_/=P,S/=P,I,E,C),C.point(x,A),e(x,A,R,_,S,I,l,c,h,d,g,v,E,C))}}return function(r){var i,s,o,a,u,l,c,h,d,g,v,E,C={point:b,lineStart:m,lineEnd:_,polygonStart:function(){r.polygonStart(),C.lineStart=S},polygonEnd:function(){r.polygonEnd(),C.lineStart=m}};function b(M,R){M=n(M,R),r.point(M[0],M[1])}function m(){h=NaN,C.point=y,r.lineStart()}function y(M,R){var k=To([M,R]),x=n(M,R);e(h,d,c,g,v,E,h=x[0],d=x[1],c=M,g=k[0],v=k[1],E=k[2],wp,r),r.point(h,d)}function _(){C.point=b,r.lineEnd()}function S(){m(),C.point=I,C.lineEnd=P}function I(M,R){y(i=M,R),s=h,o=d,a=g,u=v,l=E,C.point=y}function P(){e(h,d,c,g,v,E,s,o,i,a,u,l,wp,r),C.lineEnd=_,_()}return C}}var i_=yp({point:function(n,t){this.stream.point(n*Hr,t*Hr)}});function s_(n){return o_(function(){return n})()}function o_(n){var t,e=150,r=480,i=250,s,o,a=0,u=0,l=0,c=0,h=0,d,g,v=null,E=vp,C=null,b,m,y,_=pp,S=.5,I=Ep(x,S),P,M;function R(F){return F=g(F[0]*Hr,F[1]*Hr),[F[0]*e+s,o-F[1]*e]}function k(F){return F=g.invert((F[0]-s)/e,(o-F[1])/e),F&&[F[0]*Gi,F[1]*Gi]}function x(F,J){return F=t(F,J),[F[0]*e+s,o-F[1]*e]}R.stream=function(F){return P&&M===F?P:P=i_(E(d,I(_(M=F))))},R.clipAngle=function(F){return arguments.length?(E=+F?$y(v=F*Hr,6*Hr):(v=null,vp),L()):v*Gi},R.clipExtent=function(F){return arguments.length?(_=F==null?(C=b=m=y=null,pp):Yy(C=+F[0][0],b=+F[0][1],m=+F[1][0],y=+F[1][1]),L()):C==null?null:[[C,b],[m,y]]},R.scale=function(F){return arguments.length?(e=+F,A()):e},R.translate=function(F){return arguments.length?(r=+F[0],i=+F[1],A()):[r,i]},R.center=function(F){return arguments.length?(a=F[0]%360*Hr,u=F[1]%360*Hr,A()):[a*Gi,u*Gi]},R.rotate=function(F){return arguments.length?(l=F[0]%360*Hr,c=F[1]%360*Hr,h=F.length>2?F[2]%360*Hr:0,A()):[l*Gi,c*Gi,h*Gi]},R.precision=function(F){return arguments.length?(I=Ep(x,S=F*F),L()):No(S)},R.fitExtent=function(F,J){return _p(R,F,J)},R.fitSize=function(F,J){return t_(R,F,J)};function A(){g=ip(d=Uy(l,c,h),t);var F=t(a,u);return s=r-F[0]*e,o=i+F[1]*e,L()}function L(){return P=M=null,R}return function(){return t=n.apply(this,arguments),R.invert=t.invert&&k,A()}}function Sp(n){return function(t,e){var r=jt(t),i=jt(e),s=n(r*i);return[s*i*Zt(t),s*Zt(e)]}}function Cp(n){return function(t,e){var r=No(t*t+e*e),i=n(r),s=Zt(i),o=jt(i);return[bo(t*s,r*o),Is(r&&e*s/r)]}}var a_=Sp(function(n){return No(2/(1+n))});a_.invert=Cp(function(n){return 2*Is(n/2)});var Ip=Sp(function(n){return(n=tp(n))&&n/Zt(n)});Ip.invert=Cp(function(n){return n});function u_(){return s_(Ip).scale(79.4188).clipAngle(180-.001)}function Pp(n,t){return[n,t]}Pp.invert=Pp;function l_(n,t,e){e=e||{};var r=e.units||"kilometers",i=e.steps||8;if(!n)throw new Error("geojson is required");if(typeof e!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(t===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(n.type){case"GeometryCollection":return mu(n,function(o){var a=Qu(o,t,r,i);a&&s.push(a)}),js(s);case"FeatureCollection":return gu(n,function(o){var a=Qu(o,t,r,i);a&&gu(a,function(u){u&&s.push(u)})}),js(s)}return Qu(n,t,r,i)}function Qu(n,t,e,r){var i=n.properties||{},s=n.type==="Feature"?n.geometry:n;if(s.type==="GeometryCollection"){var o=[];return mu(n,function(E){var C=Qu(E,t,e,r);C&&o.push(C)}),js(o)}var a=c_(s),u={type:s.type,coordinates:Np(s.coordinates,a)},l=new oc,c=l.read(u),h=Rl(Fl(t,e),"meters"),d=se.bufferOp(c,h,r),g=new Dd;if(d=g.write(d),!bp(d.coordinates)){var v={type:d.type,coordinates:Tp(d.coordinates,a)};return sn(v,i)}}function bp(n){return Array.isArray(n[0])?bp(n[0]):isNaN(n[0])}function Np(n,t){return typeof n[0]!="object"?t(n):n.map(function(e){return Np(e,t)})}function Tp(n,t){return typeof n[0]!="object"?t.invert(n):n.map(function(e){return Tp(e,t)})}function c_(n){var t=wy(n).geometry.coordinates,e=[-t[0],-t[1]];return u_().rotate(e).scale(Ne)}function h_(n,t,e){e===void 0&&(e={});for(var r=e.steps||64,i=e.properties?e.properties:!Array.isArray(n)&&n.type==="Feature"&&n.properties?n.properties:{},s=[],o=0;o<r;o++)s.push(Zs(n,t,o*-360/r,e).geometry.coordinates);return s.push(s[0]),Je([s],i)}/**
|
|
41
|
+
`,Je=class Je extends V{constructor(){super();d(this,"_ratio",this.dv(B(0)));d(this,"_subPlayers",this.dv(new _u));const t=this.dv(new Fl);{const o=()=>{t.loop=this.loop??Je.defaults.loop};o(),this.d(this.loopChanged.don(o))}{const o=()=>{(this.loop??Je.defaults.loop)!==t.loop&&(this.loop=t.loop)};o(),this.d(t.loopChangedEvent.don(o))}{const o=()=>{t.currentTime=this.currentTime??Je.defaults.currentTime};o(),this.d(this.currentTimeChanged.don(o))}{const o=()=>{(this.currentTime??Je.defaults.currentTime)!==t.currentTime&&(this.currentTime=t.currentTime)};o(),this.d(t.currentTimeChangedEvent.don(o))}{const o=()=>{t.duration=this.duration??Je.defaults.duration};o(),this.d(this.durationChanged.don(o))}{const o=()=>{(this.duration??Je.defaults.duration)!==t.duration&&(this.duration=t.duration)};o(),this.d(t.durationChangedEvent.don(o))}{const o=()=>{t.speed=this.speed??Je.defaults.speed};o(),this.d(this.speedChanged.don(o))}{const o=()=>{(this.speed??Je.defaults.speed)!==t.speed&&(this.speed=t.speed)};o(),this.d(t.speedChangedEvent.don(o))}{const o=()=>{t.playing=this.playing??Je.defaults.playing};o(),this.d(this.playingChanged.don(o))}{const o=()=>{(this.playing??Je.defaults.playing)!==t.playing&&(this.playing=t.playing)};o(),this.d(t.playingChangedEvent.don(o))}const n=()=>{const o=this.duration??Je.defaults.duration;o>0&&(this._ratio.value=(this.currentTime??Je.defaults.currentTime)/o)};n();const i=this.dv(ge(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[u,l,c]=a;return new mw(u,l,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??Je.defaults.duration)*t)}get ratioChanged(){return this._ratio.changed}};d(Je,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),d(Je,"channelsReadMe",vw);let Pr=Je;(r=>{r.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:ss(void 0,(e,t)=>e==null?void 0:e.every((n,i)=>n===t[i]),e=>[...e])})})(Pr||(Pr={})),Oi(Pr.prototype,Pr.createDefaultProps);class yw extends V{constructor(e,t,n,i){super(),this.disposeVar(new le(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 u=ch(o,!1,...a);(!u||!(u instanceof I))&&(a[a.length-1]=a[a.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${a[a.length-1]})再试试!`),u=ch(o,!1,...a),i.debug&&u&&console.warn("event仍然获取不到!")),u?u instanceof I?(s=u,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 V;return a.d(s.dwon(()=>n.emit())),a}else{i.debug&&console.log(`未获取到Event!propChangedName: ${t}`);return}}))}}const Vg=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:class extends V{constructor(t,n,i){super();d(this,"_doEvalEvent",this.dv(new I));const s=this._doEvalEvent,o=this.disposeVar(ge(s)),a=t.map(([u,l])=>{const c=new zh(u),h=l&&new yw(c,l,s,n)||void 0;return[c,h]});this.d(()=>{a.forEach(([u,l])=>{l==null||l.destroy(),u.destroy()}),a.length=0}),this.d(s.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=n;if(u==="Immediate"){const c=a.map(([h])=>h.sceneObject);(!l||c.every(h=>h!==void 0))&&i(c)}})),this.d(o.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=n;if(u==="NextAnimateFrame"){const c=a.map(([h])=>h.sceneObject);(!l||c.every(h=>h!==void 0))&&i(c)}}))}forceExecute(){this._doEvalEvent.emit()}}},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:_w}=Vg;class Tu extends V{constructor(){super();d(this,"_evalFunc");d(this,"_forceExecute",new I);const t=this.dv(B(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 le(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new _w(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:Sl([],(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:dt(void 0),devTags:Ht(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(Tu||(Tu={})),Oi(Tu.prototype,Tu.createDefaultProps);const Bg=Bs("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function ri(r){return Bg.forward(r)}function jg(r){return Bg.inverse(r)}const zg=Bs("+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 ww(r){const e=zg.forward([r[0],r[1]]);return[e[0],e[1],r[2]]}function Ew(r){const e=zg.inverse([r[0],r[1]]);return[e[0],e[1],r[2]]}function Cw(r,e){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1])&&r.push(r[0]);const t=Ue.point(e),n=Ue.polygon([r]);return Ue.booleanPointInPolygon(t,n)}var Ge=63710088e-1,Ug={centimeters:Ge*100,centimetres:Ge*100,degrees:Ge/111325,feet:Ge*3.28084,inches:Ge*39.37,kilometers:Ge/1e3,kilometres:Ge/1e3,meters:Ge,metres:Ge,miles:Ge/1609.344,millimeters:Ge*1e3,millimetres:Ge*1e3,nauticalmiles:Ge/1852,radians:1,yards:Ge*1.0936};function Ir(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 zt(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(!Gg(r[0])||!Gg(r[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:r};return Ir(n,e,t)}function fn(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 Ir(a,e,t)}function xr(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 Ir(n,e,t)}function Yo(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 Uh(r,e,t){t===void 0&&(t={});var n={type:"MultiPolygon",coordinates:r};return Ir(n,e,t)}function Gh(r,e){e===void 0&&(e="kilometers");var t=Ug[e];if(!t)throw new Error(e+" units is invalid");return r*t}function Wh(r,e){e===void 0&&(e="kilometers");var t=Ug[e];if(!t)throw new Error(e+" units is invalid");return r/t}function Ul(r){var e=r%(2*Math.PI);return e*180/Math.PI}function $e(r){var e=r%360;return e*Math.PI/180}function qh(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 Gh(Wh(r,e),t)}function Gg(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function pn(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 Ys(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 Wg(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 kn(r){return r.type==="Feature"?r.geometry:r}function Sw(r,e){return r.type==="FeatureCollection"?"FeatureCollection":r.type==="GeometryCollection"?"GeometryCollection":r.type==="Feature"&&r.geometry!==null?r.geometry.type:r.type}function Nu(r,e,t){if(t===void 0&&(t={}),t.final===!0)return bw(r,e);var n=pn(r),i=pn(e),s=$e(n[0]),o=$e(i[0]),a=$e(n[1]),u=$e(i[1]),l=Math.sin(o-s)*Math.cos(u),c=Math.cos(a)*Math.sin(u)-Math.sin(a)*Math.cos(u)*Math.cos(o-s);return Ul(Math.atan2(l,c))}function bw(r,e){var t=Nu(e,r);return t=(t+180)%360,t}function Jo(r,e,t,n){n===void 0&&(n={});var i=pn(r),s=$e(i[0]),o=$e(i[1]),a=$e(t),u=Wh(e,n.units),l=Math.asin(Math.sin(o)*Math.cos(u)+Math.cos(o)*Math.sin(u)*Math.cos(a)),c=s+Math.atan2(Math.sin(a)*Math.sin(u)*Math.cos(o),Math.cos(u)-Math.sin(o)*Math.sin(l)),h=Ul(c),f=Ul(l);return zt([h,f],n.properties)}function Li(r,e,t){t===void 0&&(t={});var n=pn(r),i=pn(e),s=$e(i[1]-n[1]),o=$e(i[0]-n[0]),a=$e(n[1]),u=$e(i[1]),l=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(a)*Math.cos(u);return Gh(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),t.units)}function Pw(r,e,t){t===void 0&&(t={});for(var n=kn(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 u=Nu(i[o],i[o-1])-180,l=Jo(i[o],a,u,t);return l}else return zt(i[o])}else s+=Li(i[o],i[o+1],t);return zt(i[i.length-1])}function Iw(r,e){const t=xr(r);return Pw(t,e,{units:"meters"}).geometry.coordinates}function Zo(r,e,t){if(r!==null)for(var n,i,s,o,a,u,l,c=0,h=0,f,p=r.type,m=p==="FeatureCollection",w=p==="Feature",E=m?r.features.length:1,b=0;b<E;b++){l=m?r.features[b].geometry:w?r.geometry:r,f=l?l.type==="GeometryCollection":!1,a=f?l.geometries.length:1;for(var v=0;v<a;v++){var y=0,_=0;if(o=f?l.geometries[v]:l,o!==null){u=o.coordinates;var C=o.type;switch(c=t&&(C==="Polygon"||C==="MultiPolygon")?1:0,C){case null:break;case"Point":if(e(u,h,b,y,_)===!1)return!1;h++,y++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(e(u[n],h,b,y,_)===!1)return!1;h++,C==="MultiPoint"&&y++}C==="LineString"&&y++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(i=0;i<u[n].length-c;i++){if(e(u[n][i],h,b,y,_)===!1)return!1;h++}C==="MultiLineString"&&y++,C==="Polygon"&&_++}C==="Polygon"&&y++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(_=0,i=0;i<u[n].length;i++){for(s=0;s<u[n][i].length-c;s++){if(e(u[n][i][s],h,b,y,_)===!1)return!1;h++}_++}y++}break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(Zo(o.geometries[n],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Gl(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 Wl(r,e){var t,n,i,s,o,a,u,l,c,h,f=0,p=r.type==="FeatureCollection",m=r.type==="Feature",w=p?r.features.length:1;for(t=0;t<w;t++){for(a=p?r.features[t].geometry:m?r.geometry:r,l=p?r.features[t].properties:m?r.properties:{},c=p?r.features[t].bbox:m?r.bbox:void 0,h=p?r.features[t].id:m?r.id:void 0,u=a?a.type==="GeometryCollection":!1,o=u?a.geometries.length:1,i=0;i<o;i++){if(s=u?a.geometries[i]:a,s===null){if(e(null,f,l,c,h)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,f,l,c,h)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<s.geometries.length;n++)if(e(s.geometries[n],f,l,c,h)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}f++}}function xw(r,e,t){var n=t;return Wl(r,function(i,s,o,a,u){n=e(n,i,s,o,a,u)}),n}function Xh(r,e){Wl(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(Ir(t,i,{bbox:s,id:o}),n,0)===!1?!1:void 0}var u;switch(a){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var l=0;l<t.coordinates.length;l++){var c=t.coordinates[l],h={type:u,coordinates:c};if(e(Ir(h,i),n,l)===!1)return!1}})}function Tw(r,e){Xh(r,function(t,n,i){var s=0;if(t.geometry){var o=t.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var a,u=0,l=0,c=0;if(Zo(t,function(h,f,p,m,w){if(a===void 0||n>u||m>l||w>c){a=h,u=n,l=m,c=w,s=0;return}var E=xr([a,h],t.properties);if(e(E,n,i,w,s)===!1)return!1;s++,a=h})===!1)return!1}}})}var qg=6378137;function Nw(r){return xw(r,function(e,t){return e+Ow(t)},0)}function Ow(r){var e=0,t;switch(r.type){case"Polygon":return Xg(r.coordinates);case"MultiPolygon":for(t=0;t<r.coordinates.length;t++)e+=Xg(r.coordinates[t]);return e;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function Xg(r){var e=0;if(r&&r.length>0){e+=Math.abs(Hg(r[0]));for(var t=1;t<r.length;t++)e-=Math.abs(Hg(r[t]))}return e}function Hg(r){var e,t,n,i,s,o,a,u=0,l=r.length;if(l>2){for(a=0;a<l;a++)a===l-2?(i=l-2,s=l-1,o=0):a===l-1?(i=l-1,s=0,o=1):(i=a,s=a+1,o=a+2),e=r[i],t=r[s],n=r[o],u+=(Hh(n[0])-Hh(e[0]))*Math.sin(Hh(t[1]));u=u*qg*qg/2}return u}function Hh(r){return r*Math.PI/180}function Yh(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=fn([r]);return Nw(e)}function Yg(r,e,t=0,n=r.length-1,i=Dw){for(;n>t;){if(n-t>600){const u=n-t+1,l=e-t+1,c=Math.log(u),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(u-h)/u)*(l-u/2<0?-1:1),p=Math.max(t,Math.floor(e-l*h/u+f)),m=Math.min(n,Math.floor(e+(u-l)*h/u+f));Yg(r,e,p,m,i)}const s=r[e];let o=t,a=n;for(Ou(r,t,e),i(r[n],s)>0&&Ou(r,t,n);o<a;){for(Ou(r,o,a),o++,a--;i(r[o],s)<0;)o++;for(;i(r[a],s)>0;)a--}i(r[t],s)===0?Ou(r,t,a):(a++,Ou(r,a,n)),a<=e&&(t=a+1),e<=a&&(n=a-1)}}function Ou(r,e,t){const n=r[e];r[e]=r[t],r[t]=n}function Dw(r,e){return r<e?-1:r>e?1:0}class Jg{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const n=[];if(!Xl(e,t))return n;const i=this.toBBox,s=[];for(;t;){for(let o=0;o<t.children.length;o++){const a=t.children[o],u=t.leaf?i(a):a;Xl(e,u)&&(t.leaf?n.push(a):Zh(e,u)?this._all(a,n):s.push(a))}t=s.pop()}return n}collides(e){let t=this.data;if(!Xl(e,t))return!1;const n=[];for(;t;){for(let i=0;i<t.children.length;i++){const s=t.children[i],o=t.leaf?this.toBBox(s):s;if(Xl(e,o)){if(t.leaf||Zh(e,o))return!0;n.push(s)}}t=n.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let n=0;n<e.length;n++)this.insert(e[n]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const n=this.data;this.data=t,t=n}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=Qo([]),this}remove(e,t){if(!e)return this;let n=this.data;const i=this.toBBox(e),s=[],o=[];let a,u,l;for(;n||s.length;){if(n||(n=s.pop(),u=s[s.length-1],a=o.pop(),l=!0),n.leaf){const c=Mw(e,n.children,t);if(c!==-1)return n.children.splice(c,1),s.push(n),this._condense(s),this}!l&&!n.leaf&&Zh(n,i)?(s.push(n),o.push(a),a=0,u=n,n=n.children[0]):u?(a++,n=u.children[a],l=!1):n=null}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const n=[];for(;e;)e.leaf?t.push(...e.children):n.push(...e.children),e=n.pop();return t}_build(e,t,n,i){const s=n-t+1;let o=this._maxEntries,a;if(s<=o)return a=Qo(e.slice(t,n+1)),Ko(a,this.toBBox),a;i||(i=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/Math.pow(o,i-1))),a=Qo([]),a.leaf=!1,a.height=i;const u=Math.ceil(s/o),l=u*Math.ceil(Math.sqrt(o));Zg(e,t,n,l,this.compareMinX);for(let c=t;c<=n;c+=l){const h=Math.min(c+l-1,n);Zg(e,c,h,u,this.compareMinY);for(let f=c;f<=h;f+=u){const p=Math.min(f+u-1,h);a.children.push(this._build(e,f,p,i-1))}}return Ko(a,this.toBBox),a}_chooseSubtree(e,t,n,i){for(;i.push(t),!(t.leaf||i.length-1===n);){let s=1/0,o=1/0,a;for(let u=0;u<t.children.length;u++){const l=t.children[u],c=Jh(l),h=Aw(e,l)-c;h<o?(o=h,s=c<s?c:s,a=l):h===o&&c<s&&(s=c,a=l)}t=a||t.children[0]}return t}_insert(e,t,n){const i=n?e:this.toBBox(e),s=[],o=this._chooseSubtree(i,this.data,t,s);for(o.children.push(e),Mu(o,i);t>=0&&s[t].children.length>this._maxEntries;)this._split(s,t),t--;this._adjustParentBBoxes(i,s,t)}_split(e,t){const n=e[t],i=n.children.length,s=this._minEntries;this._chooseSplitAxis(n,s,i);const o=this._chooseSplitIndex(n,s,i),a=Qo(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,Ko(n,this.toBBox),Ko(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this.data=Qo([e,t]),this.data.height=e.height+1,this.data.leaf=!1,Ko(this.data,this.toBBox)}_chooseSplitIndex(e,t,n){let i,s=1/0,o=1/0;for(let a=t;a<=n-t;a++){const u=Du(e,0,a,this.toBBox),l=Du(e,a,n,this.toBBox),c=Fw(u,l),h=Jh(u)+Jh(l);c<s?(s=c,i=a,o=h<o?h:o):c===s&&h<o&&(o=h,i=a)}return i||n-t}_chooseSplitAxis(e,t,n){const i=e.leaf?this.compareMinX:Rw,s=e.leaf?this.compareMinY:Lw,o=this._allDistMargin(e,t,n,i),a=this._allDistMargin(e,t,n,s);o<a&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const s=this.toBBox,o=Du(e,0,t,s),a=Du(e,n-t,n,s);let u=ql(o)+ql(a);for(let l=t;l<n-t;l++){const c=e.children[l];Mu(o,e.leaf?s(c):c),u+=ql(o)}for(let l=n-t-1;l>=t;l--){const c=e.children[l];Mu(a,e.leaf?s(c):c),u+=ql(a)}return u}_adjustParentBBoxes(e,t,n){for(let i=n;i>=0;i--)Mu(t[i],e)}_condense(e){for(let t=e.length-1,n;t>=0;t--)e[t].children.length===0?t>0?(n=e[t-1].children,n.splice(n.indexOf(e[t]),1)):this.clear():Ko(e[t],this.toBBox)}}function Mw(r,e,t){if(!t)return e.indexOf(r);for(let n=0;n<e.length;n++)if(t(r,e[n]))return n;return-1}function Ko(r,e){Du(r,0,r.children.length,e,r)}function Du(r,e,t,n,i){i||(i=Qo(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s=e;s<t;s++){const o=r.children[s];Mu(i,r.leaf?n(o):o)}return i}function Mu(r,e){return r.minX=Math.min(r.minX,e.minX),r.minY=Math.min(r.minY,e.minY),r.maxX=Math.max(r.maxX,e.maxX),r.maxY=Math.max(r.maxY,e.maxY),r}function Rw(r,e){return r.minX-e.minX}function Lw(r,e){return r.minY-e.minY}function Jh(r){return(r.maxX-r.minX)*(r.maxY-r.minY)}function ql(r){return r.maxX-r.minX+(r.maxY-r.minY)}function Aw(r,e){return(Math.max(e.maxX,r.maxX)-Math.min(e.minX,r.minX))*(Math.max(e.maxY,r.maxY)-Math.min(e.minY,r.minY))}function Fw(r,e){const t=Math.max(r.minX,e.minX),n=Math.max(r.minY,e.minY),i=Math.min(r.maxX,e.maxX),s=Math.min(r.maxY,e.maxY);return Math.max(0,i-t)*Math.max(0,s-n)}function Zh(r,e){return r.minX<=e.minX&&r.minY<=e.minY&&e.maxX<=r.maxX&&e.maxY<=r.maxY}function Xl(r,e){return e.minX<=r.maxX&&e.minY<=r.maxY&&e.maxX>=r.minX&&e.maxY>=r.minY}function Qo(r){return{children:r,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Zg(r,e,t,n,i){const s=[e,t];for(;s.length;){if(t=s.pop(),e=s.pop(),t-e<=n)continue;const o=e+Math.ceil((t-e)/n/2)*n;Yg(r,o,e,t,i),s.push(e,o,o,t)}}class kw{constructor(e=[],t=(n,i)=>n<i?-1:n>i?1:0){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._up(this.length++)}pop(){if(this.length===0)return;const e=this.data[0],t=this.data.pop();return--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;const a=o+1;if(a<this.length&&n(t[a],t[o])<0&&(o=a),n(t[o],s)>=0)break;t[e]=t[o],e=o}t[e]=s}}var Ru={exports:{}},Kh,Kg;function Vw(){return Kg||(Kg=1,Kh=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 u=(i-n)/2,l=0,c=u-1;l<u;c=l++){var h=t[n+l*2+0],f=t[n+l*2+1],p=t[n+c*2+0],m=t[n+c*2+1],w=f>o!=m>o&&s<(p-h)*(o-f)/(m-f)+h;w&&(a=!a)}return a}),Kh}var Qh,Qg;function Bw(){return Qg||(Qg=1,Qh=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 u=i-n,l=0,c=u-1;l<u;c=l++){var h=t[l+n][0],f=t[l+n][1],p=t[c+n][0],m=t[c+n][1],w=f>o!=m>o&&s<(p-h)*(o-f)/(m-f)+h;w&&(a=!a)}return a}),Qh}var $g;function jw(){if($g)return Ru.exports;$g=1;var r=Vw(),e=Bw();return Ru.exports=function(n,i,s,o){return i.length>0&&Array.isArray(i[0])?e(n,i,s,o):r(n,i,s,o)},Ru.exports.nested=e,Ru.exports.flat=r,Ru.exports}var zw=jw();const Uw=Rh(zw),Ai=11102230246251565e-32,tn=134217729,Gw=(3+8*Ai)*Ai;function $h(r,e,t,n,i){let s,o,a,u,l=e[0],c=n[0],h=0,f=0;c>l==c>-l?(s=l,l=e[++h]):(s=c,c=n[++f]);let p=0;if(h<r&&f<t)for(c>l==c>-l?(o=l+s,a=s-(o-l),l=e[++h]):(o=c+s,a=s-(o-c),c=n[++f]),s=o,a!==0&&(i[p++]=a);h<r&&f<t;)c>l==c>-l?(o=s+l,u=o-s,a=s-(o-u)+(l-u),l=e[++h]):(o=s+c,u=o-s,a=s-(o-u)+(c-u),c=n[++f]),s=o,a!==0&&(i[p++]=a);for(;h<r;)o=s+l,u=o-s,a=s-(o-u)+(l-u),l=e[++h],s=o,a!==0&&(i[p++]=a);for(;f<t;)o=s+c,u=o-s,a=s-(o-u)+(c-u),c=n[++f],s=o,a!==0&&(i[p++]=a);return(s!==0||p===0)&&(i[p++]=s),p}function Ww(r,e){let t=e[0];for(let n=1;n<r;n++)t+=e[n];return t}function Lu(r){return new Float64Array(r)}const qw=(3+16*Ai)*Ai,Xw=(2+12*Ai)*Ai,Hw=(9+64*Ai)*Ai*Ai,$o=Lu(4),tm=Lu(8),em=Lu(12),nm=Lu(16),gn=Lu(4);function Yw(r,e,t,n,i,s,o){let a,u,l,c,h,f,p,m,w,E,b,v,y,_,C,S,P,T;const R=r-i,F=t-i,N=e-s,L=n-s;_=R*L,f=tn*R,p=f-(f-R),m=R-p,f=tn*L,w=f-(f-L),E=L-w,C=m*E-(_-p*w-m*w-p*E),S=N*F,f=tn*N,p=f-(f-N),m=N-p,f=tn*F,w=f-(f-F),E=F-w,P=m*E-(S-p*w-m*w-p*E),b=C-P,h=C-b,$o[0]=C-(b+h)+(h-P),v=_+b,h=v-_,y=_-(v-h)+(b-h),b=y-S,h=y-b,$o[1]=y-(b+h)+(h-S),T=v+b,h=T-v,$o[2]=v-(T-h)+(b-h),$o[3]=T;let M=Ww(4,$o),k=Xw*o;if(M>=k||-M>=k||(h=r-R,a=r-(R+h)+(h-i),h=t-F,l=t-(F+h)+(h-i),h=e-N,u=e-(N+h)+(h-s),h=n-L,c=n-(L+h)+(h-s),a===0&&u===0&&l===0&&c===0)||(k=Hw*o+Gw*Math.abs(M),M+=R*c+L*a-(N*l+F*u),M>=k||-M>=k))return M;_=a*L,f=tn*a,p=f-(f-a),m=a-p,f=tn*L,w=f-(f-L),E=L-w,C=m*E-(_-p*w-m*w-p*E),S=u*F,f=tn*u,p=f-(f-u),m=u-p,f=tn*F,w=f-(f-F),E=F-w,P=m*E-(S-p*w-m*w-p*E),b=C-P,h=C-b,gn[0]=C-(b+h)+(h-P),v=_+b,h=v-_,y=_-(v-h)+(b-h),b=y-S,h=y-b,gn[1]=y-(b+h)+(h-S),T=v+b,h=T-v,gn[2]=v-(T-h)+(b-h),gn[3]=T;const J=$h(4,$o,4,gn,tm);_=R*c,f=tn*R,p=f-(f-R),m=R-p,f=tn*c,w=f-(f-c),E=c-w,C=m*E-(_-p*w-m*w-p*E),S=N*l,f=tn*N,p=f-(f-N),m=N-p,f=tn*l,w=f-(f-l),E=l-w,P=m*E-(S-p*w-m*w-p*E),b=C-P,h=C-b,gn[0]=C-(b+h)+(h-P),v=_+b,h=v-_,y=_-(v-h)+(b-h),b=y-S,h=y-b,gn[1]=y-(b+h)+(h-S),T=v+b,h=T-v,gn[2]=v-(T-h)+(b-h),gn[3]=T;const st=$h(J,tm,4,gn,em);_=a*c,f=tn*a,p=f-(f-a),m=a-p,f=tn*c,w=f-(f-c),E=c-w,C=m*E-(_-p*w-m*w-p*E),S=u*l,f=tn*u,p=f-(f-u),m=u-p,f=tn*l,w=f-(f-l),E=l-w,P=m*E-(S-p*w-m*w-p*E),b=C-P,h=C-b,gn[0]=C-(b+h)+(h-P),v=_+b,h=v-_,y=_-(v-h)+(b-h),b=y-S,h=y-b,gn[1]=y-(b+h)+(h-S),T=v+b,h=T-v,gn[2]=v-(T-h)+(b-h),gn[3]=T;const gt=$h(st,em,4,gn,nm);return nm[gt-1]}function rm(r,e,t,n,i,s){const o=(e-s)*(t-i),a=(r-i)*(n-s),u=o-a,l=Math.abs(o+a);return Math.abs(u)>=qw*l?u:-Yw(r,e,t,n,i,s,l)}function Jw(r,e,t){e=Math.max(0,e===void 0?2:e),t=t||0;const n=tE(r),i=new Jg(16);i.toBBox=function(f){return{minX:f[0],minY:f[1],maxX:f[0],maxY:f[1]}},i.compareMinX=function(f,p){return f[0]-p[0]},i.compareMinY=function(f,p){return f[1]-p[1]},i.load(r);const s=[];let o;for(let f=0;f<n.length;f++){const p=n[f];i.remove(p),o=om(p,o),s.push(o)}const a=new Jg(16);for(let f=0;f<s.length;f++)a.insert(td(s[f]));const u=e*e,l=t*t;for(;s.length;){const f=s.shift(),p=f.p,m=f.next.p,w=ed(p,m);if(w<l)continue;const E=w/u,b=Zw(i,f.prev.p,p,m,f.next.next.p,E,a);b&&Math.min(ed(b,p),ed(b,m))<=E&&(s.push(f),s.push(om(b,f)),i.remove(b),a.remove(f),a.insert(td(f)),a.insert(td(f.next)))}let c=o;const h=[];do h.push(c.p),c=c.next;while(c!==o);return h.push(c.p),h}function Zw(r,e,t,n,i,s,o){const a=new kw([],Kw);let u=r.data;for(;u;){for(let l=0;l<u.children.length;l++){const c=u.children[l],h=u.leaf?nd(c,t,n):Qw(t,n,c);h>s||a.push({node:c,dist:h})}for(;a.length&&!a.peek().node.children;){const l=a.pop(),c=l.node,h=nd(c,e,t),f=nd(c,n,i);if(l.dist<h&&l.dist<f&&sm(t,c,o)&&sm(n,c,o))return c}u=a.pop(),u&&(u=u.node)}return null}function Kw(r,e){return r.dist-e.dist}function Qw(r,e,t){if(im(r,t)||im(e,t))return 0;const n=Hl(r[0],r[1],e[0],e[1],t.minX,t.minY,t.maxX,t.minY);if(n===0)return 0;const i=Hl(r[0],r[1],e[0],e[1],t.minX,t.minY,t.minX,t.maxY);if(i===0)return 0;const s=Hl(r[0],r[1],e[0],e[1],t.maxX,t.minY,t.maxX,t.maxY);if(s===0)return 0;const o=Hl(r[0],r[1],e[0],e[1],t.minX,t.maxY,t.maxX,t.maxY);return o===0?0:Math.min(n,i,s,o)}function im(r,e){return r[0]>=e.minX&&r[0]<=e.maxX&&r[1]>=e.minY&&r[1]<=e.maxY}function sm(r,e,t){const n=Math.min(r[0],e[0]),i=Math.min(r[1],e[1]),s=Math.max(r[0],e[0]),o=Math.max(r[1],e[1]),a=t.search({minX:n,minY:i,maxX:s,maxY:o});for(let u=0;u<a.length;u++)if($w(a[u].p,a[u].next.p,r,e))return!1;return!0}function ta(r,e,t){return rm(r[0],r[1],e[0],e[1],t[0],t[1])}function $w(r,e,t,n){return r!==n&&e!==t&&ta(r,e,t)>0!=ta(r,e,n)>0&&ta(t,n,r)>0!=ta(t,n,e)>0}function td(r){const e=r.p,t=r.next.p;return r.minX=Math.min(e[0],t[0]),r.minY=Math.min(e[1],t[1]),r.maxX=Math.max(e[0],t[0]),r.maxY=Math.max(e[1],t[1]),r}function tE(r){let e=r[0],t=r[0],n=r[0],i=r[0];for(let a=0;a<r.length;a++){const u=r[a];u[0]<e[0]&&(e=u),u[0]>n[0]&&(n=u),u[1]<t[1]&&(t=u),u[1]>i[1]&&(i=u)}const s=[e,t,n,i],o=s.slice();for(let a=0;a<r.length;a++)Uw(r[a],s)||o.push(r[a]);return nE(o)}function om(r,e){const t={p:r,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(t.next=e.next,t.prev=e,e.next.prev=t,e.next=t):(t.prev=t,t.next=t),t}function ed(r,e){const t=r[0]-e[0],n=r[1]-e[1];return t*t+n*n}function nd(r,e,t){let n=e[0],i=e[1],s=t[0]-n,o=t[1]-i;if(s!==0||o!==0){const a=((r[0]-n)*s+(r[1]-i)*o)/(s*s+o*o);a>1?(n=t[0],i=t[1]):a>0&&(n+=s*a,i+=o*a)}return s=r[0]-n,o=r[1]-i,s*s+o*o}function Hl(r,e,t,n,i,s,o,a){const u=t-r,l=n-e,c=o-i,h=a-s,f=r-i,p=e-s,m=u*u+l*l,w=u*c+l*h,E=c*c+h*h,b=u*f+l*p,v=c*f+h*p,y=m*E-w*w;let _,C,S=y,P=y;y===0?(_=0,S=1,C=v,P=E):(_=w*v-E*b,C=m*v-w*b,_<0?(_=0,C=v,P=E):_>S&&(_=S,C=v+w,P=E)),C<0?(C=0,-b<0?_=0:-b>m?_=S:(_=-b,S=m)):C>P&&(C=P,-b+w<0?_=0:-b+w>m?_=S:(_=-b+w,S=m));const T=_===0?0:_/S,R=C===0?0:C/P,F=(1-T)*r+T*t,N=(1-T)*e+T*n,L=(1-R)*i+R*o,M=(1-R)*s+R*a,k=L-F,J=M-N;return k*k+J*J}function eE(r,e){return r[0]===e[0]?r[1]-e[1]:r[0]-e[0]}function nE(r){r.sort(eE);const e=[];for(let n=0;n<r.length;n++){for(;e.length>=2&&ta(e[e.length-2],e[e.length-1],r[n])<=0;)e.pop();e.push(r[n])}const t=[];for(let n=r.length-1;n>=0;n--){for(;t.length>=2&&ta(t[t.length-2],t[t.length-1],r[n])<=0;)t.pop();t.push(r[n])}return t.pop(),e.pop(),e.concat(t)}function rE(r,e){e===void 0&&(e={}),e.concavity=e.concavity||1/0;var t=[];if(Zo(r,function(i){t.push([i[0],i[1]])}),!t.length)return null;var n=Jw(t,e.concavity);return n.length>3?fn([n]):null}function am(r,e){e===void 0&&(e={});var t=0,n=0,i=0;return Zo(r,function(s){t+=s[0],n+=s[1],i++},!0),zt([t/i,n/i],e.properties)}function um(r,e){switch(e===void 0&&(e={}),Sw(r)){case"Point":return zt(pn(r),e.properties);case"Polygon":var t=[];Zo(r,function(_){t.push(_)});var n=am(r,{properties:e.properties}),i=n.geometry.coordinates,s=0,o=0,a=0,u,l,c,h,f,p,m,w,E=t.map(function(_){return[_[0]-i[0],_[1]-i[1]]});for(u=0;u<t.length-1;u++)l=E[u],h=l[0],p=l[1],c=E[u+1],f=c[0],m=c[1],w=h*m-f*p,a+=w,s+=(h+f)*w,o+=(p+m)*w;if(a===0)return n;var b=a*.5,v=1/(6*b);return zt([i[0]+v*s,i[1]+v*o],e.properties);default:var y=rE(r);return y?um(y,{properties:e.properties}):am(r,{properties:e.properties})}}function iE(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=fn([r]),n=um(e).geometry.coordinates;return[n[0],n[1],n[2]??r[0][2]??0]}function lm(r,e,t,n){const[i,s,o]=r,a=Jo(zt([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 Yl(r,e){return Li(zt(r),zt(e),{units:"meters"})}function Au(r,e){return Nu(zt(r),zt(e))}function cm(r){if(!r)throw new Error("geojson is required");var e=[];return Xh(r,function(t){sE(t,e)}),Yo(e)}function sE(r,e){var t=[],n=r.geometry;if(n!==null){switch(n.type){case"Polygon":t=Ys(n);break;case"LineString":t=[Ys(n)]}t.forEach(function(i){var s=oE(i,r.properties);s.forEach(function(o){o.id=e.length,e.push(o)})})}}function oE(r,e){var t=[];return r.reduce(function(n,i){var s=xr([n,i],e);return s.bbox=aE(n,i),t.push(s),i}),t}function aE(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,u=t>i?t:i,l=n>s?n:s;return[o,a,u,l]}var Jl={exports:{}},Zl={exports:{}},uE=Zl.exports,hm;function lE(){return hm||(hm=1,(function(r,e){(function(t,n){r.exports=n()})(uE,function(){function t(v,y,_,C,S){(function P(T,R,F,N,L){for(;N>F;){if(N-F>600){var M=N-F+1,k=R-F+1,J=Math.log(M),st=.5*Math.exp(2*J/3),gt=.5*Math.sqrt(J*st*(M-st)/M)*(k-M/2<0?-1:1),Ft=Math.max(F,Math.floor(R-k*st/M+gt)),ne=Math.min(N,Math.floor(R+(M-k)*st/M+gt));P(T,R,Ft,ne,L)}var dn=T[R],Bt=F,kt=N;for(n(T,F,R),L(T[N],dn)>0&&n(T,F,N);Bt<kt;){for(n(T,Bt,kt),Bt++,kt--;L(T[Bt],dn)<0;)Bt++;for(;L(T[kt],dn)>0;)kt--}L(T[F],dn)===0?n(T,F,kt):n(T,++kt,N),kt<=R&&(F=kt+1),R<=kt&&(N=kt-1)}})(v,y,_||0,C||v.length-1,S||i)}function n(v,y,_){var C=v[y];v[y]=v[_],v[_]=C}function i(v,y){return v<y?-1:v>y?1:0}var s=function(v){v===void 0&&(v=9),this._maxEntries=Math.max(4,v),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(v,y,_){if(!_)return y.indexOf(v);for(var C=0;C<y.length;C++)if(_(v,y[C]))return C;return-1}function a(v,y){u(v,0,v.children.length,y,v)}function u(v,y,_,C,S){S||(S=E(null)),S.minX=1/0,S.minY=1/0,S.maxX=-1/0,S.maxY=-1/0;for(var P=y;P<_;P++){var T=v.children[P];l(S,v.leaf?C(T):T)}return S}function l(v,y){return v.minX=Math.min(v.minX,y.minX),v.minY=Math.min(v.minY,y.minY),v.maxX=Math.max(v.maxX,y.maxX),v.maxY=Math.max(v.maxY,y.maxY),v}function c(v,y){return v.minX-y.minX}function h(v,y){return v.minY-y.minY}function f(v){return(v.maxX-v.minX)*(v.maxY-v.minY)}function p(v){return v.maxX-v.minX+(v.maxY-v.minY)}function m(v,y){return v.minX<=y.minX&&v.minY<=y.minY&&y.maxX<=v.maxX&&y.maxY<=v.maxY}function w(v,y){return y.minX<=v.maxX&&y.minY<=v.maxY&&y.maxX>=v.minX&&y.maxY>=v.minY}function E(v){return{children:v,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(v,y,_,C,S){for(var P=[y,_];P.length;)if(!((_=P.pop())-(y=P.pop())<=C)){var T=y+Math.ceil((_-y)/C/2)*C;t(v,T,y,_,S),P.push(y,T,T,_)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(v){var y=this.data,_=[];if(!w(v,y))return _;for(var C=this.toBBox,S=[];y;){for(var P=0;P<y.children.length;P++){var T=y.children[P],R=y.leaf?C(T):T;w(v,R)&&(y.leaf?_.push(T):m(v,R)?this._all(T,_):S.push(T))}y=S.pop()}return _},s.prototype.collides=function(v){var y=this.data;if(!w(v,y))return!1;for(var _=[];y;){for(var C=0;C<y.children.length;C++){var S=y.children[C],P=y.leaf?this.toBBox(S):S;if(w(v,P)){if(y.leaf||m(v,P))return!0;_.push(S)}}y=_.pop()}return!1},s.prototype.load=function(v){if(!v||!v.length)return this;if(v.length<this._minEntries){for(var y=0;y<v.length;y++)this.insert(v[y]);return this}var _=this._build(v.slice(),0,v.length-1,0);if(this.data.children.length)if(this.data.height===_.height)this._splitRoot(this.data,_);else{if(this.data.height<_.height){var C=this.data;this.data=_,_=C}this._insert(_,this.data.height-_.height-1,!0)}else this.data=_;return this},s.prototype.insert=function(v){return v&&this._insert(v,this.data.height-1),this},s.prototype.clear=function(){return this.data=E([]),this},s.prototype.remove=function(v,y){if(!v)return this;for(var _,C,S,P=this.data,T=this.toBBox(v),R=[],F=[];P||R.length;){if(P||(P=R.pop(),C=R[R.length-1],_=F.pop(),S=!0),P.leaf){var N=o(v,P.children,y);if(N!==-1)return P.children.splice(N,1),R.push(P),this._condense(R),this}S||P.leaf||!m(P,T)?C?(_++,P=C.children[_],S=!1):P=null:(R.push(P),F.push(_),_=0,C=P,P=P.children[0])}return this},s.prototype.toBBox=function(v){return v},s.prototype.compareMinX=function(v,y){return v.minX-y.minX},s.prototype.compareMinY=function(v,y){return v.minY-y.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(v){return this.data=v,this},s.prototype._all=function(v,y){for(var _=[];v;)v.leaf?y.push.apply(y,v.children):_.push.apply(_,v.children),v=_.pop();return y},s.prototype._build=function(v,y,_,C){var S,P=_-y+1,T=this._maxEntries;if(P<=T)return a(S=E(v.slice(y,_+1)),this.toBBox),S;C||(C=Math.ceil(Math.log(P)/Math.log(T)),T=Math.ceil(P/Math.pow(T,C-1))),(S=E([])).leaf=!1,S.height=C;var R=Math.ceil(P/T),F=R*Math.ceil(Math.sqrt(T));b(v,y,_,F,this.compareMinX);for(var N=y;N<=_;N+=F){var L=Math.min(N+F-1,_);b(v,N,L,R,this.compareMinY);for(var M=N;M<=L;M+=R){var k=Math.min(M+R-1,L);S.children.push(this._build(v,M,k,C-1))}}return a(S,this.toBBox),S},s.prototype._chooseSubtree=function(v,y,_,C){for(;C.push(y),!y.leaf&&C.length-1!==_;){for(var S=1/0,P=1/0,T=void 0,R=0;R<y.children.length;R++){var F=y.children[R],N=f(F),L=(M=v,k=F,(Math.max(k.maxX,M.maxX)-Math.min(k.minX,M.minX))*(Math.max(k.maxY,M.maxY)-Math.min(k.minY,M.minY))-N);L<P?(P=L,S=N<S?N:S,T=F):L===P&&N<S&&(S=N,T=F)}y=T||y.children[0]}var M,k;return y},s.prototype._insert=function(v,y,_){var C=_?v:this.toBBox(v),S=[],P=this._chooseSubtree(C,this.data,y,S);for(P.children.push(v),l(P,C);y>=0&&S[y].children.length>this._maxEntries;)this._split(S,y),y--;this._adjustParentBBoxes(C,S,y)},s.prototype._split=function(v,y){var _=v[y],C=_.children.length,S=this._minEntries;this._chooseSplitAxis(_,S,C);var P=this._chooseSplitIndex(_,S,C),T=E(_.children.splice(P,_.children.length-P));T.height=_.height,T.leaf=_.leaf,a(_,this.toBBox),a(T,this.toBBox),y?v[y-1].children.push(T):this._splitRoot(_,T)},s.prototype._splitRoot=function(v,y){this.data=E([v,y]),this.data.height=v.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(v,y,_){for(var C,S,P,T,R,F,N,L=1/0,M=1/0,k=y;k<=_-y;k++){var J=u(v,0,k,this.toBBox),st=u(v,k,_,this.toBBox),gt=(S=J,P=st,T=void 0,R=void 0,F=void 0,N=void 0,T=Math.max(S.minX,P.minX),R=Math.max(S.minY,P.minY),F=Math.min(S.maxX,P.maxX),N=Math.min(S.maxY,P.maxY),Math.max(0,F-T)*Math.max(0,N-R)),Ft=f(J)+f(st);gt<L?(L=gt,C=k,M=Ft<M?Ft:M):gt===L&&Ft<M&&(M=Ft,C=k)}return C||_-y},s.prototype._chooseSplitAxis=function(v,y,_){var C=v.leaf?this.compareMinX:c,S=v.leaf?this.compareMinY:h;this._allDistMargin(v,y,_,C)<this._allDistMargin(v,y,_,S)&&v.children.sort(C)},s.prototype._allDistMargin=function(v,y,_,C){v.children.sort(C);for(var S=this.toBBox,P=u(v,0,y,S),T=u(v,_-y,_,S),R=p(P)+p(T),F=y;F<_-y;F++){var N=v.children[F];l(P,v.leaf?S(N):N),R+=p(P)}for(var L=_-y-1;L>=y;L--){var M=v.children[L];l(T,v.leaf?S(M):M),R+=p(T)}return R},s.prototype._adjustParentBBoxes=function(v,y,_){for(var C=_;C>=0;C--)l(y[C],v)},s.prototype._condense=function(v){for(var y=v.length-1,_=void 0;y>=0;y--)v[y].children.length===0?y>0?(_=v[y-1].children).splice(_.indexOf(v[y]),1):this.clear():a(v[y],this.toBBox)},s})})(Zl)),Zl.exports}var rd={},dm;function fm(){return dm||(dm=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(N,L,M){M===void 0&&(M={});var k={type:"Feature"};return(M.id===0||M.id)&&(k.id=M.id),M.bbox&&(k.bbox=M.bbox),k.properties=L||{},k.geometry=N,k}r.feature=e;function t(N,L,M){switch(N){case"Point":return n(L).geometry;case"LineString":return a(L).geometry;case"Polygon":return s(L).geometry;case"MultiPoint":return h(L).geometry;case"MultiLineString":return c(L).geometry;case"MultiPolygon":return f(L).geometry;default:throw new Error(N+" is invalid")}}r.geometry=t;function n(N,L,M){if(M===void 0&&(M={}),!N)throw new Error("coordinates is required");if(!Array.isArray(N))throw new Error("coordinates must be an Array");if(N.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!P(N[0])||!P(N[1]))throw new Error("coordinates must contain numbers");var k={type:"Point",coordinates:N};return e(k,L,M)}r.point=n;function i(N,L,M){return M===void 0&&(M={}),l(N.map(function(k){return n(k,L)}),M)}r.points=i;function s(N,L,M){M===void 0&&(M={});for(var k=0,J=N;k<J.length;k++){var st=J[k];if(st.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var gt=0;gt<st[st.length-1].length;gt++)if(st[st.length-1][gt]!==st[0][gt])throw new Error("First and last Position are not equivalent.")}var Ft={type:"Polygon",coordinates:N};return e(Ft,L,M)}r.polygon=s;function o(N,L,M){return M===void 0&&(M={}),l(N.map(function(k){return s(k,L)}),M)}r.polygons=o;function a(N,L,M){if(M===void 0&&(M={}),N.length<2)throw new Error("coordinates must be an array of two or more positions");var k={type:"LineString",coordinates:N};return e(k,L,M)}r.lineString=a;function u(N,L,M){return M===void 0&&(M={}),l(N.map(function(k){return a(k,L)}),M)}r.lineStrings=u;function l(N,L){L===void 0&&(L={});var M={type:"FeatureCollection"};return L.id&&(M.id=L.id),L.bbox&&(M.bbox=L.bbox),M.features=N,M}r.featureCollection=l;function c(N,L,M){M===void 0&&(M={});var k={type:"MultiLineString",coordinates:N};return e(k,L,M)}r.multiLineString=c;function h(N,L,M){M===void 0&&(M={});var k={type:"MultiPoint",coordinates:N};return e(k,L,M)}r.multiPoint=h;function f(N,L,M){M===void 0&&(M={});var k={type:"MultiPolygon",coordinates:N};return e(k,L,M)}r.multiPolygon=f;function p(N,L,M){M===void 0&&(M={});var k={type:"GeometryCollection",geometries:N};return e(k,L,M)}r.geometryCollection=p;function m(N,L){if(L===void 0&&(L=0),L&&!(L>=0))throw new Error("precision must be a positive number");var M=Math.pow(10,L||0);return Math.round(N*M)/M}r.round=m;function w(N,L){L===void 0&&(L="kilometers");var M=r.factors[L];if(!M)throw new Error(L+" units is invalid");return N*M}r.radiansToLength=w;function E(N,L){L===void 0&&(L="kilometers");var M=r.factors[L];if(!M)throw new Error(L+" units is invalid");return N/M}r.lengthToRadians=E;function b(N,L){return y(E(N,L))}r.lengthToDegrees=b;function v(N){var L=N%360;return L<0&&(L+=360),L}r.bearingToAzimuth=v;function y(N){var L=N%(2*Math.PI);return L*180/Math.PI}r.radiansToDegrees=y;function _(N){var L=N%360;return L*Math.PI/180}r.degreesToRadians=_;function C(N,L,M){if(L===void 0&&(L="kilometers"),M===void 0&&(M="kilometers"),!(N>=0))throw new Error("length must be a positive number");return w(E(N,L),M)}r.convertLength=C;function S(N,L,M){if(L===void 0&&(L="meters"),M===void 0&&(M="kilometers"),!(N>=0))throw new Error("area must be a positive number");var k=r.areaFactors[L];if(!k)throw new Error("invalid original units");var J=r.areaFactors[M];if(!J)throw new Error("invalid final units");return N/k*J}r.convertArea=S;function P(N){return!isNaN(N)&&N!==null&&!Array.isArray(N)}r.isNumber=P;function T(N){return!!N&&N.constructor===Object}r.isObject=T;function R(N){if(!N)throw new Error("bbox is required");if(!Array.isArray(N))throw new Error("bbox must be an Array");if(N.length!==4&&N.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");N.forEach(function(L){if(!P(L))throw new Error("bbox must only contain numbers")})}r.validateBBox=R;function F(N){if(!N)throw new Error("id is required");if(["string","number"].indexOf(typeof N)===-1)throw new Error("id must be a number or a string")}r.validateId=F})(rd)),rd}var me={},pm;function gm(){if(pm)return me;pm=1,Object.defineProperty(me,"__esModule",{value:!0});var r=fm();function e(v,y,_){if(v!==null)for(var C,S,P,T,R,F,N,L=0,M=0,k,J=v.type,st=J==="FeatureCollection",gt=J==="Feature",Ft=st?v.features.length:1,ne=0;ne<Ft;ne++){N=st?v.features[ne].geometry:gt?v.geometry:v,k=N?N.type==="GeometryCollection":!1,R=k?N.geometries.length:1;for(var dn=0;dn<R;dn++){var Bt=0,kt=0;if(T=k?N.geometries[dn]:N,T!==null){F=T.coordinates;var be=T.type;switch(L=_&&(be==="Polygon"||be==="MultiPolygon")?1:0,be){case null:break;case"Point":if(y(F,M,ne,Bt,kt)===!1)return!1;M++,Bt++;break;case"LineString":case"MultiPoint":for(C=0;C<F.length;C++){if(y(F[C],M,ne,Bt,kt)===!1)return!1;M++,be==="MultiPoint"&&Bt++}be==="LineString"&&Bt++;break;case"Polygon":case"MultiLineString":for(C=0;C<F.length;C++){for(S=0;S<F[C].length-L;S++){if(y(F[C][S],M,ne,Bt,kt)===!1)return!1;M++}be==="MultiLineString"&&Bt++,be==="Polygon"&&kt++}be==="Polygon"&&Bt++;break;case"MultiPolygon":for(C=0;C<F.length;C++){for(kt=0,S=0;S<F[C].length;S++){for(P=0;P<F[C][S].length-L;P++){if(y(F[C][S][P],M,ne,Bt,kt)===!1)return!1;M++}kt++}Bt++}break;case"GeometryCollection":for(C=0;C<T.geometries.length;C++)if(e(T.geometries[C],y,_)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function t(v,y,_,C){var S=_;return e(v,function(P,T,R,F,N){T===0&&_===void 0?S=P:S=y(S,P,T,R,F,N)},C),S}function n(v,y){var _;switch(v.type){case"FeatureCollection":for(_=0;_<v.features.length&&y(v.features[_].properties,_)!==!1;_++);break;case"Feature":y(v.properties,0);break}}function i(v,y,_){var C=_;return n(v,function(S,P){P===0&&_===void 0?C=S:C=y(C,S,P)}),C}function s(v,y){if(v.type==="Feature")y(v,0);else if(v.type==="FeatureCollection")for(var _=0;_<v.features.length&&y(v.features[_],_)!==!1;_++);}function o(v,y,_){var C=_;return s(v,function(S,P){P===0&&_===void 0?C=S:C=y(C,S,P)}),C}function a(v){var y=[];return e(v,function(_){y.push(_)}),y}function u(v,y){var _,C,S,P,T,R,F,N,L,M,k=0,J=v.type==="FeatureCollection",st=v.type==="Feature",gt=J?v.features.length:1;for(_=0;_<gt;_++){for(R=J?v.features[_].geometry:st?v.geometry:v,N=J?v.features[_].properties:st?v.properties:{},L=J?v.features[_].bbox:st?v.bbox:void 0,M=J?v.features[_].id:st?v.id:void 0,F=R?R.type==="GeometryCollection":!1,T=F?R.geometries.length:1,S=0;S<T;S++){if(P=F?R.geometries[S]:R,P===null){if(y(null,k,N,L,M)===!1)return!1;continue}switch(P.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(y(P,k,N,L,M)===!1)return!1;break}case"GeometryCollection":{for(C=0;C<P.geometries.length;C++)if(y(P.geometries[C],k,N,L,M)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}k++}}function l(v,y,_){var C=_;return u(v,function(S,P,T,R,F){P===0&&_===void 0?C=S:C=y(C,S,P,T,R,F)}),C}function c(v,y){u(v,function(_,C,S,P,T){var R=_===null?null:_.type;switch(R){case null:case"Point":case"LineString":case"Polygon":return y(r.feature(_,S,{bbox:P,id:T}),C,0)===!1?!1:void 0}var F;switch(R){case"MultiPoint":F="Point";break;case"MultiLineString":F="LineString";break;case"MultiPolygon":F="Polygon";break}for(var N=0;N<_.coordinates.length;N++){var L=_.coordinates[N],M={type:F,coordinates:L};if(y(r.feature(M,S),C,N)===!1)return!1}})}function h(v,y,_){var C=_;return c(v,function(S,P,T){P===0&&T===0&&_===void 0?C=S:C=y(C,S,P,T)}),C}function f(v,y){c(v,function(_,C,S){var P=0;if(_.geometry){var T=_.geometry.type;if(!(T==="Point"||T==="MultiPoint")){var R,F=0,N=0,L=0;if(e(_,function(M,k,J,st,gt){if(R===void 0||C>F||st>N||gt>L){R=M,F=C,N=st,L=gt,P=0;return}var Ft=r.lineString([R,M],_.properties);if(y(Ft,C,S,gt,P)===!1)return!1;P++,R=M})===!1)return!1}}})}function p(v,y,_){var C=_,S=!1;return f(v,function(P,T,R,F,N){S===!1&&_===void 0?C=P:C=y(C,P,T,R,F,N),S=!0}),C}function m(v,y){if(!v)throw new Error("geojson is required");c(v,function(_,C,S){if(_.geometry!==null){var P=_.geometry.type,T=_.geometry.coordinates;switch(P){case"LineString":if(y(_,C,S,0,0)===!1)return!1;break;case"Polygon":for(var R=0;R<T.length;R++)if(y(r.lineString(T[R],_.properties),C,S,R)===!1)return!1;break}}})}function w(v,y,_){var C=_;return m(v,function(S,P,T,R){P===0&&_===void 0?C=S:C=y(C,S,P,T,R)}),C}function E(v,y){if(y=y||{},!r.isObject(y))throw new Error("options is invalid");var _=y.featureIndex||0,C=y.multiFeatureIndex||0,S=y.geometryIndex||0,P=y.segmentIndex||0,T=y.properties,R;switch(v.type){case"FeatureCollection":_<0&&(_=v.features.length+_),T=T||v.features[_].properties,R=v.features[_].geometry;break;case"Feature":T=T||v.properties,R=v.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":R=v;break;default:throw new Error("geojson is invalid")}if(R===null)return null;var F=R.coordinates;switch(R.type){case"Point":case"MultiPoint":return null;case"LineString":return P<0&&(P=F.length+P-1),r.lineString([F[P],F[P+1]],T,y);case"Polygon":return S<0&&(S=F.length+S),P<0&&(P=F[S].length+P-1),r.lineString([F[S][P],F[S][P+1]],T,y);case"MultiLineString":return C<0&&(C=F.length+C),P<0&&(P=F[C].length+P-1),r.lineString([F[C][P],F[C][P+1]],T,y);case"MultiPolygon":return C<0&&(C=F.length+C),S<0&&(S=F[C].length+S),P<0&&(P=F[C][S].length-P-1),r.lineString([F[C][S][P],F[C][S][P+1]],T,y)}throw new Error("geojson is invalid")}function b(v,y){if(y=y||{},!r.isObject(y))throw new Error("options is invalid");var _=y.featureIndex||0,C=y.multiFeatureIndex||0,S=y.geometryIndex||0,P=y.coordIndex||0,T=y.properties,R;switch(v.type){case"FeatureCollection":_<0&&(_=v.features.length+_),T=T||v.features[_].properties,R=v.features[_].geometry;break;case"Feature":T=T||v.properties,R=v.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":R=v;break;default:throw new Error("geojson is invalid")}if(R===null)return null;var F=R.coordinates;switch(R.type){case"Point":return r.point(F,T,y);case"MultiPoint":return C<0&&(C=F.length+C),r.point(F[C],T,y);case"LineString":return P<0&&(P=F.length+P),r.point(F[P],T,y);case"Polygon":return S<0&&(S=F.length+S),P<0&&(P=F[S].length+P),r.point(F[S][P],T,y);case"MultiLineString":return C<0&&(C=F.length+C),P<0&&(P=F[C].length+P),r.point(F[C][P],T,y);case"MultiPolygon":return C<0&&(C=F.length+C),S<0&&(S=F[C].length+S),P<0&&(P=F[C][S].length-P),r.point(F[C][S][P],T,y)}throw new Error("geojson is invalid")}return me.coordAll=a,me.coordEach=e,me.coordReduce=t,me.featureEach=s,me.featureReduce=o,me.findPoint=b,me.findSegment=E,me.flattenEach=c,me.flattenReduce=h,me.geomEach=u,me.geomReduce=l,me.lineEach=m,me.lineReduce=w,me.propEach=n,me.propReduce=i,me.segmentEach=f,me.segmentReduce=p,me}var Kl={},mm;function cE(){if(mm)return Kl;mm=1,Object.defineProperty(Kl,"__esModule",{value:!0});var r=gm();function e(t){var n=[1/0,1/0,-1/0,-1/0];return r.coordEach(t,function(i){n[0]>i[0]&&(n[0]=i[0]),n[1]>i[1]&&(n[1]=i[1]),n[2]<i[0]&&(n[2]=i[0]),n[3]<i[1]&&(n[3]=i[1])}),n}return e.default=e,Kl.default=e,Kl}var vm;function hE(){if(vm)return Jl.exports;vm=1;var r=lE(),e=fm(),t=gm(),n=cE().default,i=t.featureEach;t.coordEach,e.polygon;var s=e.featureCollection;function o(a){var u=new r(a);return u.insert=function(l){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:n(l),r.prototype.insert.call(this,l)},u.load=function(l){var c=[];return Array.isArray(l)?l.forEach(function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:n(h),c.push(h)}):i(l,function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:n(h),c.push(h)}),r.prototype.load.call(this,c)},u.remove=function(l,c){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:n(l),r.prototype.remove.call(this,l,c)},u.clear=function(){return r.prototype.clear.call(this)},u.search=function(l){var c=r.prototype.search.call(this,this.toBBox(l));return s(c)},u.collides=function(l){return r.prototype.collides.call(this,this.toBBox(l))},u.all=function(){var l=r.prototype.all.call(this);return s(l)},u.toJSON=function(){return r.prototype.toJSON.call(this)},u.fromJSON=function(l){return r.prototype.fromJSON.call(this,l)},u.toBBox=function(l){var c;if(l.bbox)c=l.bbox;else if(Array.isArray(l)&&l.length===4)c=l;else if(Array.isArray(l)&&l.length===6)c=[l[0],l[1],l[3],l[4]];else if(l.type==="Feature")c=n(l);else if(l.type==="FeatureCollection")c=n(l);else throw new Error("invalid geojson");return{minX:c[0],minY:c[1],maxX:c[2],maxY:c[3]}},u}return Jl.exports=o,Jl.exports.default=o,Jl.exports}var dE=hE();const fE=Rh(dE);function ym(r,e){var t={},n=[];if(r.type==="LineString"&&(r=Ir(r)),e.type==="LineString"&&(e=Ir(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=_m(r,e);return i&&n.push(i),Yo(n)}var s=fE();return s.load(cm(e)),Gl(cm(r),function(o){Gl(s.search(o),function(a){var u=_m(o,a);if(u){var l=Ys(u).join(",");t[l]||(t[l]=!0,n.push(u))}})}),Yo(n)}function _m(r,e){var t=Ys(r),n=Ys(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],u=n[0][0],l=n[0][1],c=n[1][0],h=n[1][1],f=(h-l)*(o-i)-(c-u)*(a-s),p=(c-u)*(s-l)-(h-l)*(i-u),m=(o-i)*(s-l)-(a-s)*(i-u);if(f===0)return null;var w=p/f,E=m/f;if(w>=0&&w<=1&&E>=0&&E<=1){var b=i+w*(o-i),v=s+w*(a-s);return zt([b,v])}return null}function pE(r,e){return ym(xr(r),xr(e))}function gE(r,e){var t=Li(r,e),n=Nu(r,e),i=Jo(r,t/2,n);return i}function mE(r,e){const t=zt(r),n=zt(e),i=gE(t,n),s=(r[2]+e[2])/2;return[...i.geometry.coordinates,s]}function vE(r,e,t){t===void 0&&(t={});var n=zt([1/0,1/0],{dist:1/0}),i=0;return Xh(r,function(s){for(var o=Ys(s),a=0;a<o.length-1;a++){var u=zt(o[a]);u.properties.dist=Li(e,u,t);var l=zt(o[a+1]);l.properties.dist=Li(e,l,t);var c=Li(u,l,t),h=Math.max(u.properties.dist,l.properties.dist),f=Nu(u,l),p=Jo(e,h,f+90,t),m=Jo(e,h,f-90,t),w=ym(xr([p.geometry.coordinates,m.geometry.coordinates]),xr([u.geometry.coordinates,l.geometry.coordinates])),E=null;w.features.length>0&&(E=w.features[0],E.properties.dist=Li(e,E,t),E.properties.location=i+Li(u,E,t)),u.properties.dist<n.properties.dist&&(n=u,n.properties.index=a,n.properties.location=i),l.properties.dist<n.properties.dist&&(n=l,n.properties.index=a+1,n.properties.location=i+c),E&&E.properties.dist<n.properties.dist&&(n=E,n.properties.index=a),i+=c}}),n}function yE(r,e){const t=zt(e),n=xr(r);return vE(n,t,{units:"meters"})}function wm(r,e,t){t===void 0&&(t={});var n=pn(r),i=pn(e);i[0]+=i[0]-n[0]>180?-360:n[0]-i[0]>180?360:0;var s=_E(n,i),o=qh(s,"meters",t.units);return o}function _E(r,e,t){t=t===void 0?Ge: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 u=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),l=Math.abs(u)>1e-11?o/u:Math.cos(i),c=Math.sqrt(o*o+l*l*a*a),h=c*n;return h}function wE(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=zt(r):r.type==="Point"?r=Ir(r):Wg(r,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=xr(e):e.type==="LineString"?e=Ir(e):Wg(e,"LineString","line");var n=1/0,i=r.geometry.coordinates;return Tw(e,function(s){var o=s.geometry.coordinates[0],a=s.geometry.coordinates[1],u=EE(i,o,a,t);u<n&&(n=u)}),qh(n,"degrees",t.units)}function EE(r,e,t,n){var i=[t[0]-e[0],t[1]-e[1]],s=[r[0]-e[0],r[1]-e[1]],o=Em(s,i);if(o<=0)return id(r,e,{method:n.method,units:"degrees"});var a=Em(i,i);if(a<=o)return id(r,t,{method:n.method,units:"degrees"});var u=o/a,l=[e[0]+u*i[0],e[1]+u*i[1]];return id(r,l,{method:n.method,units:"degrees"})}function Em(r,e){return r[0]*e[0]+r[1]*e[1]}function id(r,e,t){return t.method==="planar"?wm(r,e,t):Li(r,e,t)}function CE(r,e){const t=zt(r),n=xr(e);return wE(t,n,{units:"meters"})}function SE(r,e,t,n){n===void 0&&(n={});var i=e<0,s=qh(Math.abs(e),n.units,"meters");i&&(s=-Math.abs(s));var o=pn(r),a=bE(o,s,t);return a[0]+=a[0]-o[0]>180?-360:o[0]-a[0]>180?360:0,zt(a,n.properties)}function bE(r,e,t,n){n=n===void 0?Ge:Number(n);var i=e/n,s=r[0]*Math.PI/180,o=$e(r[1]),a=$e(t),u=i*Math.cos(a),l=o+u;Math.abs(l)>Math.PI/2&&(l=l>0?Math.PI-l:-Math.PI-l);var c=Math.log(Math.tan(l/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),h=Math.abs(c)>1e-11?u/c:Math.cos(o),f=i*Math.sin(a)/h,p=s+f;return[(p*180/Math.PI+540)%360-180,l*180/Math.PI]}function PE(r,e,t,n){const[i,s,o]=r,a=SE(zt([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 Cm(r,e){return wm(zt(r),zt(e),{units:"meters"})}function IE(r,e,t){t===void 0&&(t={});var n;t.final?n=Sm(pn(e),pn(r)):n=Sm(pn(r),pn(e));var i=n>180?-(360-n):n;return i}function Sm(r,e){var t=$e(r[1]),n=$e(e[1]),i=$e(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(Ul(o)+360)%360}function xE(r,e){return IE(zt(r),zt(e))}function Tr(r){var e=[1/0,1/0,-1/0,-1/0];return Zo(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}Tr.default=Tr;function Nr(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=pn(r),i=kn(e),s=i.type,o=e.bbox,a=i.coordinates;if(o&&TE(n,o)===!1)return!1;s==="Polygon"&&(a=[a]);for(var u=!1,l=0;l<a.length&&!u;l++)if(bm(n,a[l][0],t.ignoreBoundary)){for(var c=!1,h=1;h<a[l].length&&!c;)bm(n,a[l][h],!t.ignoreBoundary)&&(c=!0),h++;c||(u=!0)}return u}function bm(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],u=e[s][0],l=e[s][1],c=r[1]*(o-u)+a*(u-r[0])+l*(r[0]-o)===0&&(o-r[0])*(u-r[0])<=0&&(a-r[1])*(l-r[1])<=0;if(c)return!t;var h=a>r[1]!=l>r[1]&&r[0]<(u-o)*(r[1]-a)/(l-a)+o;h&&(n=!n)}return n}function TE(r,e){return e[0]<=r[0]&&e[1]<=r[1]&&e[2]>=r[0]&&e[3]>=r[1]}function Fi(r,e,t){t===void 0&&(t={});for(var n=pn(r),i=Ys(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")),NE(i[s],i[s+1],n,o,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function NE(r,e,t,n,i){var s=t[0],o=t[1],a=r[0],u=r[1],l=e[0],c=e[1],h=t[0]-a,f=t[1]-u,p=l-a,m=c-u,w=h*m-f*p;if(i!==null){if(Math.abs(w)>i)return!1}else if(w!==0)return!1;if(n){if(n==="start")return Math.abs(p)>=Math.abs(m)?p>0?a<s&&s<=l:l<=s&&s<a:m>0?u<o&&o<=c:c<=o&&o<u;if(n==="end")return Math.abs(p)>=Math.abs(m)?p>0?a<=s&&s<l:l<s&&s<=a:m>0?u<=o&&o<c:c<o&&o<=u;if(n==="both")return Math.abs(p)>=Math.abs(m)?p>0?a<s&&s<l:l<s&&s<a:m>0?u<o&&o<c:c<o&&o<u}else return Math.abs(p)>=Math.abs(m)?p>0?a<=s&&s<=l:l<=s&&s<=a:m>0?u<=o&&o<=c:c<=o&&o<=u;return!1}function OE(r,e){var t=kn(r),n=kn(e),i=t.type,s=n.type,o=t.coordinates,a=n.coordinates;switch(i){case"Point":switch(s){case"Point":return sd(o,a);default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"Point":return DE(t,n);case"MultiPoint":return ME(t,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"Point":return Fi(n,t,{ignoreEndVertices:!0});case"LineString":return AE(t,n);case"MultiPoint":return RE(t,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Point":return Nr(n,t,{ignoreBoundary:!0});case"LineString":return FE(t,n);case"Polygon":return kE(t,n);case"MultiPoint":return LE(t,n);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function DE(r,e){var t,n=!1;for(t=0;t<r.coordinates.length;t++)if(sd(r.coordinates[t],e.coordinates)){n=!0;break}return n}function ME(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 u=a[o];if(sd(i,u)){s=!0;break}}if(!s)return!1}return!0}function RE(r,e){for(var t=!1,n=0,i=e.coordinates;n<i.length;n++){var s=i[n];if(Fi(s,r,{ignoreEndVertices:!0})&&(t=!0),!Fi(s,r))return!1}return!!t}function LE(r,e){for(var t=0,n=e.coordinates;t<n.length;t++){var i=n[t];if(!Nr(i,r,{ignoreBoundary:!0}))return!1}return!0}function AE(r,e){for(var t=!1,n=0,i=e.coordinates;n<i.length;n++){var s=i[n];if(Fi({type:"Point",coordinates:s},r,{ignoreEndVertices:!0})&&(t=!0),!Fi({type:"Point",coordinates:s},r,{ignoreEndVertices:!1}))return!1}return t}function FE(r,e){var t=!1,n=0,i=Tr(r),s=Tr(e);if(!Pm(i,s))return!1;for(n;n<e.coordinates.length-1;n++){var o=VE(e.coordinates[n],e.coordinates[n+1]);if(Nr({type:"Point",coordinates:o},r,{ignoreBoundary:!0})){t=!0;break}}return t}function kE(r,e){if(r.type==="Feature"&&r.geometry===null||e.type==="Feature"&&e.geometry===null)return!1;var t=Tr(r),n=Tr(e);if(!Pm(t,n))return!1;for(var i=kn(e).coordinates,s=0,o=i;s<o.length;s++)for(var a=o[s],u=0,l=a;u<l.length;u++){var c=l[u];if(!Nr(c,r))return!1}return!0}function Pm(r,e){return!(r[0]>e[0]||r[2]<e[2]||r[1]>e[1]||r[3]<e[3])}function sd(r,e){return r[0]===e[0]&&r[1]===e[1]}function VE(r,e){return[(r[0]+e[0])/2,(r[1]+e[1])/2]}function BE(r,e){var t=kn(r),n=kn(e),i=t.type,s=n.type;switch(i){case"Point":switch(s){case"MultiPoint":return jE(t,n);case"LineString":return Fi(t,n,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return Nr(t,n,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return zE(t,n);case"LineString":return UE(t,n);case"Polygon":case"MultiPolygon":return GE(t,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return WE(t,n);case"Polygon":case"MultiPolygon":return qE(t,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return XE(t,n);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function jE(r,e){var t,n=!1;for(t=0;t<e.coordinates.length;t++)if(xm(e.coordinates[t],r.coordinates)){n=!0;break}return n}function zE(r,e){for(var t=0;t<r.coordinates.length;t++){for(var n=!1,i=0;i<e.coordinates.length;i++)xm(r.coordinates[t],e.coordinates[i])&&(n=!0);if(!n)return!1}return!0}function UE(r,e){for(var t=!1,n=0;n<r.coordinates.length;n++){if(!Fi(r.coordinates[n],e))return!1;t||(t=Fi(r.coordinates[n],e,{ignoreEndVertices:!0}))}return t}function GE(r,e){for(var t=!0,n=!1,i=0;i<r.coordinates.length;i++){if(n=Nr(r.coordinates[1],e),!n){t=!1;break}n=Nr(r.coordinates[1],e,{ignoreBoundary:!0})}return t&&n}function WE(r,e){for(var t=0;t<r.coordinates.length;t++)if(!Fi(r.coordinates[t],e))return!1;return!0}function qE(r,e){var t=Tr(e),n=Tr(r);if(!Im(t,n))return!1;for(var i=!1,s=0;s<r.coordinates.length-1;s++){if(!Nr(r.coordinates[s],e))return!1;if(i||(i=Nr(r.coordinates[s],e,{ignoreBoundary:!0})),!i){var o=HE(r.coordinates[s],r.coordinates[s+1]);i=Nr(o,e,{ignoreBoundary:!0})}}return i}function XE(r,e){var t=Tr(r),n=Tr(e);if(!Im(n,t))return!1;for(var i=0;i<r.coordinates[0].length;i++)if(!Nr(r.coordinates[0][i],e))return!1;return!0}function Im(r,e){return!(r[0]>e[0]||r[2]<e[2]||r[1]>e[1]||r[3]<e[3])}function xm(r,e){return r[0]===e[0]&&r[1]===e[1]}function HE(r,e){return[(r[0]+e[0])/2,(r[1]+e[1])/2]}function YE(r,e){e===void 0&&(e={});var t=Tr(r),n=(t[0]+t[2])/2,i=(t[1]+t[3])/2;return zt([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 Js=function(){};Js.prototype.interfaces_=function(){return[]},Js.prototype.getClass=function(){return Js},Js.prototype.equalsWithTolerance=function(e,t,n){return Math.abs(e-t)<=n};var Vt=(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),ot=function(){},Tm={MAX_VALUE:{configurable:!0}};ot.isNaN=function(e){return Number.isNaN(e)},ot.doubleToLongBits=function(e){return e},ot.longBitsToDouble=function(e){return e},ot.isInfinite=function(e){return!Number.isFinite(e)},Tm.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(ot,Tm);var bn=function(){},Ql=function(){},ea=function(){};function Pn(){}var x=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])},Zs={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};x.prototype.setOrdinate=function(e,t){switch(e){case x.X:this.x=t;break;case x.Y:this.y=t;break;case x.Z:this.z=t;break;default:throw new Vt("Invalid ordinate index: "+e)}},x.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!(!Js.equalsWithTolerance(this.x,t.x,n)||!Js.equalsWithTolerance(this.y,t.y,n))}},x.prototype.getOrdinate=function(e){switch(e){case x.X:return this.x;case x.Y:return this.y;case x.Z:return this.z}throw new Vt("Invalid ordinate index: "+e)},x.prototype.equals3D=function(e){return this.x===e.x&&this.y===e.y&&(this.z===e.z||ot.isNaN(this.z))&&ot.isNaN(e.z)},x.prototype.equals=function(e){return e instanceof x?this.equals2D(e):!1},x.prototype.equalInZ=function(e,t){return Js.equalsWithTolerance(this.z,e.z,t)},x.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},x.prototype.clone=function(){},x.prototype.copy=function(){return new x(this)},x.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},x.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)},x.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},x.prototype.hashCode=function(){var e=17;return e=37*e+x.hashCode(this.x),e=37*e+x.hashCode(this.y),e},x.prototype.setCoordinate=function(e){this.x=e.x,this.y=e.y,this.z=e.z},x.prototype.interfaces_=function(){return[bn,Ql,Pn]},x.prototype.getClass=function(){return x},x.hashCode=function(){if(arguments.length===1){var e=arguments[0],t=ot.doubleToLongBits(e);return Math.trunc((t^t)>>>32)}},Zs.DimensionalComparator.get=function(){return ki},Zs.serialVersionUID.get=function(){return 6683108902428367e3},Zs.NULL_ORDINATE.get=function(){return ot.NaN},Zs.X.get=function(){return 0},Zs.Y.get=function(){return 1},Zs.Z.get=function(){return 2},Object.defineProperties(x,Zs);var ki=function(e){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t!==2&&t!==3)throw new Vt("only 2 or 3 dimensions may be specified");this._dimensionsToTest=t}}};ki.prototype.compare=function(e,t){var n=e,i=t,s=ki.compare(n.x,i.x);if(s!==0)return s;var o=ki.compare(n.y,i.y);if(o!==0)return o;if(this._dimensionsToTest<=2)return 0;var a=ki.compare(n.z,i.z);return a},ki.prototype.interfaces_=function(){return[ea]},ki.prototype.getClass=function(){return ki},ki.compare=function(e,t){return e<t?-1:e>t?1:ot.isNaN(e)?ot.isNaN(t)?0:-1:ot.isNaN(t)?1:0};var na=function(){};na.prototype.create=function(){},na.prototype.interfaces_=function(){return[]},na.prototype.getClass=function(){return na};var D=function(){},Fu={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};D.prototype.interfaces_=function(){return[]},D.prototype.getClass=function(){return D},D.toLocationSymbol=function(e){switch(e){case D.EXTERIOR:return"e";case D.BOUNDARY:return"b";case D.INTERIOR:return"i";case D.NONE:return"-"}throw new Vt("Unknown location value: "+e)},Fu.INTERIOR.get=function(){return 0},Fu.BOUNDARY.get=function(){return 1},Fu.EXTERIOR.get=function(){return 2},Fu.NONE.get=function(){return-1},Object.defineProperties(D,Fu);var nt=function(r,e){return r.interfaces_&&r.interfaces_().indexOf(e)>-1},mn=function(){},Nm={LOG_10:{configurable:!0}};mn.prototype.interfaces_=function(){return[]},mn.prototype.getClass=function(){return mn},mn.log10=function(e){var t=Math.log(e);return ot.isInfinite(t)||ot.isNaN(t)?t:t/mn.LOG_10},mn.min=function(e,t,n,i){var s=e;return t<s&&(s=t),n<s&&(s=n),i<s&&(s=i),s},mn.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}},mn.wrap=function(e,t){return e<0?t- -e%t:e%t},mn.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],u=arguments[3],l=s;return o>l&&(l=o),a>l&&(l=a),u>l&&(l=u),l}},mn.average=function(e,t){return(e+t)/2},Nm.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(mn,Nm);var Kn=function(e){this.str=e};Kn.prototype.append=function(e){this.str+=e},Kn.prototype.setCharAt=function(e,t){this.str=this.str.substr(0,e)+t+this.str.substr(e+1)},Kn.prototype.toString=function(e){return this.str};var Qn=function(e){this.value=e};Qn.prototype.intValue=function(){return this.value},Qn.prototype.compareTo=function(e){return this.value<e?-1:this.value>e?1:0},Qn.isNaN=function(e){return Number.isNaN(e)};var ku=function(){};ku.isWhitespace=function(e){return e<=32&&e>=0||e===127},ku.toUpperCase=function(e){return e.toUpperCase()};var A=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)}},Vn={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}};A.prototype.le=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<=e._lo},A.prototype.extractSignificantDigits=function(e,t){var n=this.abs(),i=A.magnitude(n._hi),s=A.TEN.pow(i);n=n.divide(s),n.gt(A.TEN)?(n=n.divide(A.TEN),i+=1):n.lt(A.ONE)&&(n=n.multiply(A.TEN),i-=1);for(var o=i+1,a=new Kn,u=A.MAX_PRINT_DIGITS-1,l=0;l<=u;l++){e&&l===o&&a.append(".");var c=Math.trunc(n._hi);if(c<0)break;var h=!1,f=0;c>9?(h=!0,f="9"):f="0"+c,a.append(f),n=n.subtract(A.valueOf(c)).multiply(A.TEN),h&&n.selfAdd(A.TEN);var p=!0,m=A.magnitude(n._hi);if(m<0&&Math.abs(m)>=u-l&&(p=!1),!p)break}return t[0]=i,a.toString()},A.prototype.sqr=function(){return this.multiply(this)},A.prototype.doubleValue=function(){return this._hi+this._lo},A.prototype.subtract=function(){if(arguments[0]instanceof A){var e=arguments[0];return this.add(e.negate())}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.add(-t)}},A.prototype.equals=function(){if(arguments.length===1){var e=arguments[0];return this._hi===e._hi&&this._lo===e._lo}},A.prototype.isZero=function(){return this._hi===0&&this._lo===0},A.prototype.selfSubtract=function(){if(arguments[0]instanceof A){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)}},A.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},A.prototype.min=function(e){return this.le(e)?this:e},A.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof A){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,u=null,l=null,c=null,h=null,f=null;return l=this._hi/n,c=A.SPLIT*l,s=c-l,f=A.SPLIT*n,s=c-s,o=l-s,a=f-n,h=l*n,a=f-a,u=n-a,f=s*a-h+s*u+o*a+o*u,c=(this._hi-h-f+this._lo-l*i)/n,f=l+c,this._hi=f,this._lo=l-f+c,this}},A.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},A.prototype.divide=function(){if(arguments[0]instanceof A){var e=arguments[0],t=null,n=null,i=null,s=null,o=null,a=null,u=null,l=null;o=this._hi/e._hi,a=A.SPLIT*o,t=a-o,l=A.SPLIT*e._hi,t=a-t,n=o-t,i=l-e._hi,u=o*e._hi,i=l-i,s=e._hi-i,l=t*i-u+t*s+n*i+n*s,a=(this._hi-u-l+this._lo-o*e._lo)/e._hi,l=o+a;var c=l,h=o-l+a;return new A(c,h)}else if(typeof arguments[0]=="number"){var f=arguments[0];return ot.isNaN(f)?A.createNaN():A.copy(this).selfDivide(f,0)}},A.prototype.ge=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>=e._lo},A.prototype.pow=function(e){if(e===0)return A.valueOf(1);var t=new A(this),n=A.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},A.prototype.ceil=function(){if(this.isNaN())return A.NaN;var e=Math.ceil(this._hi),t=0;return e===this._hi&&(t=Math.ceil(this._lo)),new A(e,t)},A.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},A.prototype.rint=function(){if(this.isNaN())return this;var e=this.add(.5);return e.floor()},A.prototype.setValue=function(){if(arguments[0]instanceof A){var e=arguments[0];return this.init(e),this}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.init(t),this}},A.prototype.max=function(e){return this.ge(e)?this:e},A.prototype.sqrt=function(){if(this.isZero())return A.valueOf(0);if(this.isNegative())return A.NaN;var e=1/Math.sqrt(this._hi),t=this._hi*e,n=A.valueOf(t),i=this.subtract(n.sqr()),s=i._hi*(e*.5);return n.add(s)},A.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof A){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,u=null;return s=this._hi+t,a=s-this._hi,o=s-a,o=t-a+(this._hi-o),u=o+this._lo,n=s+u,i=u+(s-n),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(arguments.length===2){var l=arguments[0],c=arguments[1],h=null,f=null,p=null,m=null,w=null,E=null,b=null,v=null;w=this._hi+l,p=this._lo+c,b=w-this._hi,v=p-this._lo,E=w-b,m=p-v,E=l-b+(this._hi-E),m=c-v+(this._lo-m),b=E+p,h=w+b,f=b+(w-h),b=m+f;var y=h+b,_=b+(h-y);return this._hi=y,this._lo=_,this}},A.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof A){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,u=null,l=null,c=null;l=A.SPLIT*this._hi,s=l-this._hi,c=A.SPLIT*n,s=l-s,o=this._hi-s,a=c-n,l=this._hi*n,a=c-a,u=n-a,c=s*a-l+s*u+o*a+o*u+(this._hi*i+this._lo*n);var h=l+c;s=l-h;var f=c+s;return this._hi=h,this._lo=f,this}},A.prototype.selfSqr=function(){return this.selfMultiply(this)},A.prototype.floor=function(){if(this.isNaN())return A.NaN;var e=Math.floor(this._hi),t=0;return e===this._hi&&(t=Math.floor(this._lo)),new A(e,t)},A.prototype.negate=function(){return this.isNaN()?this:new A(-this._hi,-this._lo)},A.prototype.clone=function(){},A.prototype.multiply=function(){if(arguments[0]instanceof A){var e=arguments[0];return e.isNaN()?A.createNaN():A.copy(this).selfMultiply(e)}else if(typeof arguments[0]=="number"){var t=arguments[0];return ot.isNaN(t)?A.createNaN():A.copy(this).selfMultiply(t,0)}},A.prototype.isNaN=function(){return ot.isNaN(this._hi)},A.prototype.intValue=function(){return Math.trunc(this._hi)},A.prototype.toString=function(){var e=A.magnitude(this._hi);return e>=-3&&e<=20?this.toStandardNotation():this.toSciNotation()},A.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."+A.stringOfChar("0",-i)+n;else if(n.indexOf(".")===-1){var o=i-n.length,a=A.stringOfChar("0",o);s=n+a+".0"}return this.isNegative()?"-"+s:s},A.prototype.reciprocal=function(){var e=null,t=null,n=null,i=null,s=null,o=null,a=null,u=null;s=1/this._hi,o=A.SPLIT*s,e=o-s,u=A.SPLIT*this._hi,e=o-e,t=s-e,n=u-this._hi,a=s*this._hi,n=u-n,i=this._hi-n,u=e*n-a+e*i+t*n+t*i,o=(1-a-u-s*this._lo)/this._hi;var l=s+o,c=s-l+o;return new A(l,c)},A.prototype.toSciNotation=function(){if(this.isZero())return A.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=A.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},A.prototype.abs=function(){return this.isNaN()?A.NaN:this.isNegative()?this.negate():new A(this)},A.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},A.prototype.lt=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<e._lo},A.prototype.add=function(){if(arguments[0]instanceof A){var e=arguments[0];return A.copy(this).selfAdd(e)}else if(typeof arguments[0]=="number"){var t=arguments[0];return A.copy(this).selfAdd(t)}},A.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 A){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}},A.prototype.gt=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>e._lo},A.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},A.prototype.trunc=function(){return this.isNaN()?A.NaN:this.isPositive()?this.floor():this.ceil()},A.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},A.prototype.interfaces_=function(){return[Pn,bn,Ql]},A.prototype.getClass=function(){return A},A.sqr=function(e){return A.valueOf(e).selfMultiply(e)},A.valueOf=function(){if(typeof arguments[0]=="string"){var e=arguments[0];return A.parse(e)}else if(typeof arguments[0]=="number"){var t=arguments[0];return new A(t)}},A.sqrt=function(e){return A.valueOf(e).sqrt()},A.parse=function(e){for(var t=0,n=e.length;ku.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 A,a=0,u=0,l=0;!(t>=n);){var c=e.charAt(t);if(t++,ku.isDigit(c)){var h=c-"0";o.selfMultiply(A.TEN),o.selfAdd(h),a++;continue}if(c==="."){u=a;continue}if(c==="e"||c==="E"){var f=e.substring(t);try{l=Qn.parseInt(f)}catch(b){throw b instanceof Error?new Error("Invalid exponent "+f+" in string "+e):b}finally{}break}throw new Error("Unexpected character '"+c+"' at position "+t+" in string "+e)}var p=o,m=a-u-l;if(m===0)p=o;else if(m>0){var w=A.TEN.pow(m);p=o.divide(w)}else if(m<0){var E=A.TEN.pow(-m);p=o.multiply(E)}return i?p.negate():p},A.createNaN=function(){return new A(ot.NaN,ot.NaN)},A.copy=function(e){return new A(e)},A.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},A.stringOfChar=function(e,t){for(var n=new Kn,i=0;i<t;i++)n.append(e);return n.toString()},Vn.PI.get=function(){return new A(3.141592653589793,12246467991473532e-32)},Vn.TWO_PI.get=function(){return new A(6.283185307179586,24492935982947064e-32)},Vn.PI_2.get=function(){return new A(1.5707963267948966,6123233995736766e-32)},Vn.E.get=function(){return new A(2.718281828459045,14456468917292502e-32)},Vn.NaN.get=function(){return new A(ot.NaN,ot.NaN)},Vn.EPS.get=function(){return 123259516440783e-46},Vn.SPLIT.get=function(){return 134217729},Vn.MAX_PRINT_DIGITS.get=function(){return 32},Vn.TEN.get=function(){return A.valueOf(10)},Vn.ONE.get=function(){return A.valueOf(1)},Vn.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},Vn.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(A,Vn);var We=function(){},Om={DP_SAFE_EPSILON:{configurable:!0}};We.prototype.interfaces_=function(){return[]},We.prototype.getClass=function(){return We},We.orientationIndex=function(e,t,n){var i=We.orientationIndexFilter(e,t,n);if(i<=1)return i;var s=A.valueOf(t.x).selfAdd(-e.x),o=A.valueOf(t.y).selfAdd(-e.y),a=A.valueOf(n.x).selfAdd(-t.x),u=A.valueOf(n.y).selfAdd(-t.y);return s.selfMultiply(u).selfSubtract(o.selfMultiply(a)).signum()},We.signOfDet2x2=function(e,t,n,i){var s=e.multiply(i).selfSubtract(t.multiply(n));return s.signum()},We.intersection=function(e,t,n,i){var s=A.valueOf(i.y).selfSubtract(n.y).selfMultiply(A.valueOf(t.x).selfSubtract(e.x)),o=A.valueOf(i.x).selfSubtract(n.x).selfMultiply(A.valueOf(t.y).selfSubtract(e.y)),a=s.subtract(o),u=A.valueOf(i.x).selfSubtract(n.x).selfMultiply(A.valueOf(e.y).selfSubtract(n.y)),l=A.valueOf(i.y).selfSubtract(n.y).selfMultiply(A.valueOf(e.x).selfSubtract(n.x)),c=u.subtract(l),h=c.selfDivide(a).doubleValue(),f=A.valueOf(e.x).selfAdd(A.valueOf(t.x).selfSubtract(e.x).selfMultiply(h)).doubleValue(),p=A.valueOf(t.x).selfSubtract(e.x).selfMultiply(A.valueOf(e.y).selfSubtract(n.y)),m=A.valueOf(t.y).selfSubtract(e.y).selfMultiply(A.valueOf(e.x).selfSubtract(n.x)),w=p.subtract(m),E=w.selfDivide(a).doubleValue(),b=A.valueOf(n.y).selfAdd(A.valueOf(i.y).selfSubtract(n.y).selfMultiply(E)).doubleValue();return new x(f,b)},We.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 We.signum(a);i=s+o}else if(s<0){if(o>=0)return We.signum(a);i=-s-o}else return We.signum(a);var u=We.DP_SAFE_EPSILON*i;return a>=u||-a>=u?We.signum(a):2},We.signum=function(e){return e>0?1:e<0?-1:0},Om.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(We,Om);var _t=function(){},Vu={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Vu.X.get=function(){return 0},Vu.Y.get=function(){return 1},Vu.Z.get=function(){return 2},Vu.M.get=function(){return 3},_t.prototype.setOrdinate=function(e,t,n){},_t.prototype.size=function(){},_t.prototype.getOrdinate=function(e,t){},_t.prototype.getCoordinate=function(){},_t.prototype.getCoordinateCopy=function(e){},_t.prototype.getDimension=function(){},_t.prototype.getX=function(e){},_t.prototype.clone=function(){},_t.prototype.expandEnvelope=function(e){},_t.prototype.copy=function(){},_t.prototype.getY=function(e){},_t.prototype.toCoordinateArray=function(){},_t.prototype.interfaces_=function(){return[Ql]},_t.prototype.getClass=function(){return _t},Object.defineProperties(_t,Vu);var Dm=function(){},ra=(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})(Dm),ve=function(){};ve.arraycopy=function(e,t,n,i,s){for(var o=0,a=t;a<t+s;a++)n[i+o]=e[a],o++},ve.getProperty=function(e){return{"line.separator":`
|
|
42
|
+
`}[e]};var Bn=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 x&&arguments[1]instanceof x){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 u=arguments[0],l=arguments[1],c=arguments[2];this.x=u,this.y=l,this.w=c}else if(arguments.length===4){var h=arguments[0],f=arguments[1],p=arguments[2],m=arguments[3],w=h.y-f.y,E=f.x-h.x,b=h.x*f.y-f.x*h.y,v=p.y-m.y,y=m.x-p.x,_=p.x*m.y-m.x*p.y;this.x=E*_-y*b,this.y=v*b-w*_,this.w=w*y-v*E}};Bn.prototype.getY=function(){var e=this.y/this.w;if(ot.isNaN(e)||ot.isInfinite(e))throw new ra;return e},Bn.prototype.getX=function(){var e=this.x/this.w;if(ot.isNaN(e)||ot.isInfinite(e))throw new ra;return e},Bn.prototype.getCoordinate=function(){var e=new x;return e.x=this.getX(),e.y=this.getY(),e},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn},Bn.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,u=n.y-i.y,l=i.x-n.x,c=n.x*i.y-i.x*n.y,h=o*c-l*a,f=u*a-s*c,p=s*l-u*o,m=h/p,w=f/p;if(ot.isNaN(m)||ot.isInfinite(m)||ot.isNaN(w)||ot.isInfinite(w))throw new ra;return new x(m,w)};var H=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 x){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],u=arguments[3];this.init(s,o,a,u)}},Mm={serialVersionUID:{configurable:!0}};H.prototype.getArea=function(){return this.getWidth()*this.getHeight()},H.prototype.equals=function(e){if(!(e instanceof H))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()},H.prototype.intersection=function(e){if(this.isNull()||e.isNull()||!this.intersects(e))return new H;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 H(t,i,n,s)},H.prototype.isNull=function(){return this._maxx<this._minx},H.prototype.getMaxX=function(){return this._maxx},H.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof x){var e=arguments[0];return this.covers(e.x,e.y)}else if(arguments[0]instanceof H){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}},H.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof H){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 x){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)}},H.prototype.getMinY=function(){return this._miny},H.prototype.getMinX=function(){return this._minx},H.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof x){var e=arguments[0];this.expandToInclude(e.x,e.y)}else if(arguments[0]instanceof H){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))}},H.prototype.minExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e<t?e:t},H.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},H.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},H.prototype.translate=function(e,t){if(this.isNull())return null;this.init(this.getMinX()+e,this.getMaxX()+e,this.getMinY()+t,this.getMaxY()+t)},H.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},H.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},H.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},H.prototype.maxExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e>t?e:t},H.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()}},H.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof H){var e=arguments[0];return this.covers(e)}else if(arguments[0]instanceof x){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)}},H.prototype.centre=function(){return this.isNull()?null:new x((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},H.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof x){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof H){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],u=arguments[3];s<o?(this._minx=s,this._maxx=o):(this._minx=o,this._maxx=s),a<u?(this._miny=a,this._maxy=u):(this._miny=u,this._maxy=a)}},H.prototype.getMaxY=function(){return this._maxy},H.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)},H.prototype.hashCode=function(){var e=17;return e=37*e+x.hashCode(this._minx),e=37*e+x.hashCode(this._maxx),e=37*e+x.hashCode(this._miny),e=37*e+x.hashCode(this._maxy),e},H.prototype.interfaces_=function(){return[bn,Pn]},H.prototype.getClass=function(){return H},H.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],u=Math.min(o.x,a.x),l=Math.max(o.x,a.x),c=Math.min(i.x,s.x),h=Math.max(i.x,s.x);return!(c>l||h<u||(u=Math.min(o.y,a.y),l=Math.max(o.y,a.y),c=Math.min(i.y,s.y),h=Math.max(i.y,s.y),c>l)||h<u)}},Mm.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(H,Mm);var $n={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*$/},$l=function(e){this.geometryFactory=e||new pt};$l.prototype.read=function(e){var t,n,i;e=e.replace(/[\n\r]/g," ");var s=$n.typeStr.exec(e);if(e.search("EMPTY")!==-1&&(s=$n.emptyTypeStr.exec(e),s[2]=void 0),s&&(n=s[1].toLowerCase(),i=s[2],ia[n]&&(t=ia[n].apply(this,[i]))),t===void 0)throw new Error("Could not parse WKT "+e);return t},$l.prototype.write=function(e){return this.extractGeometry(e)},$l.prototype.extractGeometry=function(e){var t=e.getGeometryType().toLowerCase();if(!ii[t])return null;var n=t.toUpperCase(),i;return e.isEmpty()?i=n+" EMPTY":i=n+"("+ii[t].apply(this,[e])+")",i};var ii={coordinate:function(e){return e.x+" "+e.y},point:function(e){return ii.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("("+ii.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(ii.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(ii.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("("+ii.linestring.apply(t,[e._geometries[i]])+")");return n.join(",")},polygon:function(e){var t=this,n=[];n.push("("+ii.linestring.apply(this,[e._shell])+")");for(var i=0,s=e._holes.length;i<s;++i)n.push("("+ii.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("("+ii.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(",")}},ia={point:function(e){if(e===void 0)return this.geometryFactory.createPoint();var t=e.trim().split($n.spaces);return this.geometryFactory.createPoint(new x(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($n.trimParens,"$1"),s.push(ia.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($n.spaces),n.push(new x(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($n.spaces),n.push(new x(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($n.parenComma),s=[],o=0,a=i.length;o<a;++o)n=i[o].replace($n.trimParens,"$1"),s.push(ia.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($n.parenComma),a,u=[],l=0,c=o.length;l<c;++l)n=o[l].replace($n.trimParens,"$1"),i=ia.linestring.apply(t,[n]),s=t.geometryFactory.createLinearRing(i._points),l===0?a=s:u.push(s);return this.geometryFactory.createPolygon(a,u)},multipolygon:function(e){var t=this;if(e===void 0)return this.geometryFactory.createMultiPolygon();for(var n,i=e.trim().split($n.doubleParenComma),s=[],o=0,a=i.length;o<a;++o)n=i[o].replace($n.trimParens,"$1"),s.push(ia.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)}},jn=function(e){this.parser=new $l(e)};jn.prototype.write=function(e){return this.parser.write(e)},jn.toLineString=function(e,t){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+e.x+" "+e.y+", "+t.x+" "+t.y+" )"};var si=(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),tc=(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})(si),ct=function(){};ct.prototype.interfaces_=function(){return[]},ct.prototype.getClass=function(){return ct},ct.shouldNeverReachHere=function(){if(arguments.length===0)ct.shouldNeverReachHere(null);else if(arguments.length===1){var e=arguments[0];throw new tc("Should never reach here"+(e!==null?": "+e:""))}},ct.isTrue=function(){var e,t;if(arguments.length===1)e=arguments[0],ct.isTrue(e,null);else if(arguments.length===2&&(e=arguments[0],t=arguments[1],!e))throw t===null?new tc:new tc(t)},ct.equals=function(){var e,t,n;if(arguments.length===2)e=arguments[0],t=arguments[1],ct.equals(e,t,null);else if(arguments.length===3&&(e=arguments[0],t=arguments[1],n=arguments[2],!t.equals(e)))throw new tc("Expected "+e+" but encountered "+t+(n!==null?": "+n:""))};var Ut=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 x,this._intPt[1]=new x,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},Ks={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};Ut.prototype.getIndexAlongSegment=function(e,t){return this.computeIntLineIndex(),this._intLineIndex[e][t]},Ut.prototype.getTopologySummary=function(){var e=new Kn;return this.isEndPoint()&&e.append(" endpoint"),this._isProper&&e.append(" proper"),this.isCollinear()&&e.append(" collinear"),e.toString()},Ut.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)},Ut.prototype.getIntersectionNum=function(){return this._result},Ut.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)}},Ut.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},Ut.prototype.setPrecisionModel=function(e){this._precisionModel=e},Ut.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}},Ut.prototype.getIntersection=function(e){return this._intPt[e]},Ut.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},Ut.prototype.hasIntersection=function(){return this._result!==Ut.NO_INTERSECTION},Ut.prototype.getEdgeDistance=function(e,t){var n=Ut.computeEdgeDistance(this._intPt[t],this._inputLines[e][0],this._inputLines[e][1]);return n},Ut.prototype.isCollinear=function(){return this._result===Ut.COLLINEAR_INTERSECTION},Ut.prototype.toString=function(){return jn.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+jn.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},Ut.prototype.getEndpoint=function(e,t){return this._inputLines[e][t]},Ut.prototype.isIntersection=function(e){for(var t=this,n=0;n<this._result;n++)if(t._intPt[n].equals2D(e))return!0;return!1},Ut.prototype.getIntersectionAlongSegment=function(e,t){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[e][t]]},Ut.prototype.interfaces_=function(){return[]},Ut.prototype.getClass=function(){return Ut},Ut.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),u=Math.abs(e.y-t.y);i>s?o=a:o=u,o===0&&!e.equals(t)&&(o=Math.max(a,u))}return ct.isTrue(!(o===0&&!e.equals(t)),"Bad distance calculation"),o},Ut.nonRobustComputeEdgeDistance=function(e,t,n){var i=e.x-t.x,s=e.y-t.y,o=Math.sqrt(i*i+s*s);return ct.isTrue(!(o===0&&!e.equals(t)),"Invalid distance calculation"),o},Ks.DONT_INTERSECT.get=function(){return 0},Ks.DO_INTERSECT.get=function(){return 1},Ks.COLLINEAR.get=function(){return 2},Ks.NO_INTERSECTION.get=function(){return 0},Ks.POINT_INTERSECTION.get=function(){return 1},Ks.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(Ut,Ks);var cs=(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 H(this._inputLines[0][0],this._inputLines[0][1]),s=new H(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,H.intersects(i,s,n)&&W.orientationIndex(i,s,n)===0&&W.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=Bn.intersection(n,i,s,o)}catch(u){if(u instanceof ra)a=e.nearestEndpoint(n,i,s,o);else throw u}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 x(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,u=Math.abs(a);return Math.abs(i)<u&&(a=i,u=Math.abs(i)),Math.abs(s)<u&&(a=s,u=Math.abs(s)),Math.abs(o)<u&&(a=o),a},e.prototype.checkDD=function(n,i,s,o,a){var u=We.intersection(n,i,s,o),l=this.isInSegmentEnvelopes(u);ve.out.println("DD in env = "+l+" --------------------- "+u),a.distance(u)>1e-4&&ve.out.println("Distance = "+a.distance(u))},e.prototype.intersectionWithNormalization=function(n,i,s,o){var a=new x(n),u=new x(i),l=new x(s),c=new x(o),h=new x;this.normalizeToEnvCentre(a,u,l,c,h);var f=this.safeHCoordinateIntersection(a,u,l,c);return f.x+=h.x,f.y+=h.y,f},e.prototype.computeCollinearIntersection=function(n,i,s,o){var a=H.intersects(n,i,s),u=H.intersects(n,i,o),l=H.intersects(s,o,n),c=H.intersects(s,o,i);return a&&u?(this._intPt[0]=s,this._intPt[1]=o,r.COLLINEAR_INTERSECTION):l&&c?(this._intPt[0]=n,this._intPt[1]=i,r.COLLINEAR_INTERSECTION):a&&l?(this._intPt[0]=s,this._intPt[1]=n,s.equals(n)&&!u&&!c?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):a&&c?(this._intPt[0]=s,this._intPt[1]=i,s.equals(i)&&!u&&!l?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):u&&l?(this._intPt[0]=o,this._intPt[1]=n,o.equals(n)&&!a&&!c?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):u&&c?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!a&&!l?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):r.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(n,i,s,o,a){var u=n.x<i.x?n.x:i.x,l=n.y<i.y?n.y:i.y,c=n.x>i.x?n.x:i.x,h=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,m=s.x>o.x?s.x:o.x,w=s.y>o.y?s.y:o.y,E=u>f?u:f,b=c<m?c:m,v=l>p?l:p,y=h<w?h:w,_=(E+b)/2,C=(v+y)/2;a.x=_,a.y=C,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,!H.intersects(n,i,s,o))return r.NO_INTERSECTION;var a=W.orientationIndex(n,i,s),u=W.orientationIndex(n,i,o);if(a>0&&u>0||a<0&&u<0)return r.NO_INTERSECTION;var l=W.orientationIndex(s,o,n),c=W.orientationIndex(s,o,i);if(l>0&&c>0||l<0&&c<0)return r.NO_INTERSECTION;var h=a===0&&u===0&&l===0&&c===0;return h?this.computeCollinearIntersection(n,i,s,o):(a===0||u===0||l===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 x(s):u===0?this._intPt[0]=new x(o):l===0?this._intPt[0]=new x(n):c===0&&(this._intPt[0]=new x(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,u=W.distancePointLine(n,s,o),l=W.distancePointLine(i,s,o);return l<u&&(u=l,a=i),l=W.distancePointLine(s,n,i),l<u&&(u=l,a=s),l=W.distancePointLine(o,n,i),l<u&&(u=l,a=o),a},e})(Ut),Qs=function(){};Qs.prototype.interfaces_=function(){return[]},Qs.prototype.getClass=function(){return Qs},Qs.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 Qs.signOfDet2x2(i,s,o,a)},Qs.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 tr=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var e=arguments[0];this._p=e};tr.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,u=t.y-this._p.y,l=Qs.signOfDet2x2(s,o,a,u);if(l===0)return this._isPointOnSegment=!0,null;u<o&&(l=-l),l>0&&this._crossingCount++}},tr.prototype.isPointInPolygon=function(){return this.getLocation()!==D.EXTERIOR},tr.prototype.getLocation=function(){return this._isPointOnSegment?D.BOUNDARY:this._crossingCount%2===1?D.INTERIOR:D.EXTERIOR},tr.prototype.isOnSegment=function(){return this._isPointOnSegment},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},tr.locatePointInRing=function(){if(arguments[0]instanceof x&&nt(arguments[1],_t)){for(var e=arguments[0],t=arguments[1],n=new tr(e),i=new x,s=new x,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 x&&arguments[1]instanceof Array){for(var a=arguments[0],u=arguments[1],l=new tr(a),c=1;c<u.length;c++){var h=u[c],f=u[c-1];if(l.countSegment(h,f),l.isOnSegment())return l.getLocation()}return l.getLocation()}};var W=function(){},$s={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};W.prototype.interfaces_=function(){return[]},W.prototype.getClass=function(){return W},W.orientationIndex=function(e,t,n){return We.orientationIndex(e,t,n)},W.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(nt(arguments[0],_t)){var u=arguments[0],l=u.size();if(l<3)return 0;var c=new x,h=new x,f=new x;u.getCoordinate(0,h),u.getCoordinate(1,f);var p=h.x;f.x-=p;for(var m=0,w=1;w<l-1;w++)c.y=h.y,h.x=f.x,h.y=f.y,u.getCoordinate(w+1,f),f.x-=p,m+=h.x*(c.y-f.y);return m/2}},W.distanceLineLine=function(e,t,n,i){if(e.equals(t))return W.distancePointLine(e,n,i);if(n.equals(i))return W.distancePointLine(i,e,t);var s=!1;if(!H.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),u=(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y),l=u/o,c=a/o;(c<0||c>1||l<0||l>1)&&(s=!0)}}return s?mn.min(W.distancePointLine(e,n,i),W.distancePointLine(t,n,i),W.distancePointLine(n,e,t),W.distancePointLine(i,e,t)):0},W.isPointInRing=function(e,t){return W.locatePointInRing(e,t)!==D.EXTERIOR},W.computeLength=function(e){var t=e.size();if(t<=1)return 0;var n=0,i=new x;e.getCoordinate(0,i);for(var s=i.x,o=i.y,a=1;a<t;a++){e.getCoordinate(a,i);var u=i.x,l=i.y,c=u-s,h=l-o;n+=Math.sqrt(c*c+h*h),s=u,o=l}return n},W.isCCW=function(e){var t=e.length-1;if(t<3)throw new Vt("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 u=i;do u=(u+1)%t;while(e[u].equals2D(n)&&u!==i);var l=e[a],c=e[u];if(l.equals2D(n)||c.equals2D(n)||l.equals2D(c))return!1;var h=W.computeOrientation(l,n,c),f=!1;return h===0?f=l.x>c.x:f=h>0,f},W.locatePointInRing=function(e,t){return tr.locatePointInRing(e,t)},W.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)},W.computeOrientation=function(e,t,n){return W.orientationIndex(e,t,n)},W.distancePointLine=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1];if(t.length===0)throw new Vt("Line array must contain at least one vertex");for(var n=e.distance(t[0]),i=0;i<t.length-1;i++){var s=W.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],u=arguments[2];if(a.x===u.x&&a.y===u.y)return o.distance(a);var l=(u.x-a.x)*(u.x-a.x)+(u.y-a.y)*(u.y-a.y),c=((o.x-a.x)*(u.x-a.x)+(o.y-a.y)*(u.y-a.y))/l;if(c<=0)return o.distance(a);if(c>=1)return o.distance(u);var h=((a.y-o.y)*(u.x-a.x)-(a.x-o.x)*(u.y-a.y))/l;return Math.abs(h)*Math.sqrt(l)}},W.isOnLine=function(e,t){for(var n=new cs,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},$s.CLOCKWISE.get=function(){return-1},$s.RIGHT.get=function(){return W.CLOCKWISE},$s.COUNTERCLOCKWISE.get=function(){return 1},$s.LEFT.get=function(){return W.COUNTERCLOCKWISE},$s.COLLINEAR.get=function(){return 0},$s.STRAIGHT.get=function(){return W.COLLINEAR},Object.defineProperties(W,$s);var oi=function(){};oi.prototype.filter=function(e){},oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi};var et=function(){var e=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=e,this._SRID=e.getSRID()},Or={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}};et.prototype.isGeometryCollection=function(){return this.getSortIndex()===et.SORTINDEX_GEOMETRYCOLLECTION},et.prototype.getFactory=function(){return this._factory},et.prototype.getGeometryN=function(e){return this},et.prototype.getArea=function(){return 0},et.prototype.isRectangle=function(){return!1},et.prototype.equals=function(){if(arguments[0]instanceof et){var e=arguments[0];return e===null?!1:this.equalsTopo(e)}else if(arguments[0]instanceof Object){var t=arguments[0];if(!(t instanceof et))return!1;var n=t;return this.equalsExact(n)}},et.prototype.equalsExact=function(e){return this===e||this.equalsExact(e,0)},et.prototype.geometryChanged=function(){this.apply(et.geometryChangedFilter)},et.prototype.geometryChangedAction=function(){this._envelope=null},et.prototype.equalsNorm=function(e){return e===null?!1:this.norm().equalsExact(e.norm())},et.prototype.getLength=function(){return 0},et.prototype.getNumGeometries=function(){return 1},et.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)}},et.prototype.getUserData=function(){return this._userData},et.prototype.getSRID=function(){return this._SRID},et.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},et.prototype.checkNotGeometryCollection=function(e){if(e.getSortIndex()===et.SORTINDEX_GEOMETRYCOLLECTION)throw new Vt("This method does not support GeometryCollection arguments")},et.prototype.equal=function(e,t,n){return n===0?e.equals(t):e.distance(t)<=n},et.prototype.norm=function(){var e=this.copy();return e.normalize(),e},et.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},et.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new H(this._envelope)},et.prototype.setSRID=function(e){this._SRID=e},et.prototype.setUserData=function(e){this._userData=e},et.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},et.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},et.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===et.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===et.SORTINDEX_MULTIPOINT||this.getSortIndex()===et.SORTINDEX_MULTILINESTRING||this.getSortIndex()===et.SORTINDEX_MULTIPOLYGON},et.prototype.interfaces_=function(){return[Ql,bn,Pn]},et.prototype.getClass=function(){return et},et.hasNonEmptyElements=function(e){for(var t=0;t<e.length;t++)if(!e[t].isEmpty())return!0;return!1},et.hasNullElements=function(e){for(var t=0;t<e.length;t++)if(e[t]===null)return!0;return!1},Or.serialVersionUID.get=function(){return 8763622679187377e3},Or.SORTINDEX_POINT.get=function(){return 0},Or.SORTINDEX_MULTIPOINT.get=function(){return 1},Or.SORTINDEX_LINESTRING.get=function(){return 2},Or.SORTINDEX_LINEARRING.get=function(){return 3},Or.SORTINDEX_MULTILINESTRING.get=function(){return 4},Or.SORTINDEX_POLYGON.get=function(){return 5},Or.SORTINDEX_MULTIPOLYGON.get=function(){return 6},Or.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},Or.geometryChangedFilter.get=function(){return od},Object.defineProperties(et,Or);var od=function(){};od.interfaces_=function(){return[oi]},od.filter=function(e){e.geometryChangedAction()};var Dr=function(){};Dr.prototype.filter=function(e){},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr};var In=function(){},ai={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}};In.prototype.isInBoundary=function(e){},In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In},ai.Mod2BoundaryNodeRule.get=function(){return sa},ai.EndPointBoundaryNodeRule.get=function(){return oa},ai.MultiValentEndPointBoundaryNodeRule.get=function(){return aa},ai.MonoValentEndPointBoundaryNodeRule.get=function(){return ua},ai.MOD2_BOUNDARY_RULE.get=function(){return new sa},ai.ENDPOINT_BOUNDARY_RULE.get=function(){return new oa},ai.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new aa},ai.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new ua},ai.OGC_SFS_BOUNDARY_RULE.get=function(){return In.MOD2_BOUNDARY_RULE},Object.defineProperties(In,ai);var sa=function(){};sa.prototype.isInBoundary=function(e){return e%2===1},sa.prototype.interfaces_=function(){return[In]},sa.prototype.getClass=function(){return sa};var oa=function(){};oa.prototype.isInBoundary=function(e){return e>0},oa.prototype.interfaces_=function(){return[In]},oa.prototype.getClass=function(){return oa};var aa=function(){};aa.prototype.isInBoundary=function(e){return e>1},aa.prototype.interfaces_=function(){return[In]},aa.prototype.getClass=function(){return aa};var ua=function(){};ua.prototype.isInBoundary=function(e){return e===1},ua.prototype.interfaces_=function(){return[In]},ua.prototype.getClass=function(){return ua};var re=function(){};re.prototype.add=function(){},re.prototype.addAll=function(){},re.prototype.isEmpty=function(){},re.prototype.iterator=function(){},re.prototype.size=function(){},re.prototype.toArray=function(){},re.prototype.remove=function(){};function ad(r){this.message=r||""}ad.prototype=new Error,ad.prototype.name="IndexOutOfBoundsException";var la=function(){};la.prototype.hasNext=function(){},la.prototype.next=function(){},la.prototype.remove=function(){};var zn=(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})(re);function ca(r){this.message=r||""}ca.prototype=new Error,ca.prototype.name="NoSuchElementException";var G=(function(r){function e(){r.call(this),this.array_=[],arguments[0]instanceof re&&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,re]},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 JE(this)},e.prototype.get=function(n){if(n<0||n>=this.size())throw new ad;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})(zn),JE=(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 ca;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})(la),Bu=(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,u=s.iterator();u.hasNext();)i.add(u.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 x&&typeof arguments[1]=="boolean"){var u=arguments[0],l=arguments[1];if(!l&&this.size()>=1){var c=this.get(this.size()-1);if(c.equals2D(u))return null}r.prototype.add.call(this,u)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var h=arguments[0],f=arguments[1];return this.add(h,f),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var p=arguments[0],m=arguments[1],w=arguments[2];if(w)for(var E=0;E<p.length;E++)i.add(p[E],m);else for(var b=p.length-1;b>=0;b--)i.add(p[b],m);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof x){var v=arguments[0],y=arguments[1],_=arguments[2];if(!_){var C=this.size();if(C>0){if(v>0){var S=this.get(v-1);if(S.equals2D(y))return null}if(v<C){var P=this.get(v);if(P.equals2D(y))return null}}}r.prototype.add.call(this,v,y)}}else if(arguments.length===4){var T=arguments[0],R=arguments[1],F=arguments[2],N=arguments[3],L=1;F>N&&(L=-1);for(var M=F;M!==N;M+=L)i.add(T[M],R);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new x(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,t),e})(G),ft=function(){},ec={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};ec.ForwardComparator.get=function(){return ju},ec.BidirectionalComparator.get=function(){return ha},ec.coordArrayType.get=function(){return new Array(0).fill(null)},ft.prototype.interfaces_=function(){return[]},ft.prototype.getClass=function(){return ft},ft.isRing=function(e){return!(e.length<4||!e[0].equals2D(e[e.length-1]))},ft.ptNotInList=function(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(ft.indexOf(i,t)<0)return i}return null},ft.scroll=function(e,t){var n=ft.indexOf(t,e);if(n<0)return null;var i=new Array(e.length).fill(null);ve.arraycopy(e,n,i,0,e.length-n),ve.arraycopy(e,0,i,e.length-n,n),ve.arraycopy(i,0,e,0,e.length)},ft.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}},ft.intersection=function(e,t){for(var n=new Bu,i=0;i<e.length;i++)t.intersects(e[i])&&n.add(e[i],!0);return n.toCoordinateArray()},ft.hasRepeatedPoints=function(e){for(var t=1;t<e.length;t++)if(e[t-1].equals(e[t]))return!0;return!1},ft.removeRepeatedPoints=function(e){if(!ft.hasRepeatedPoints(e))return e;var t=new Bu(e,!1);return t.toCoordinateArray()},ft.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}},ft.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},ft.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 x(e[n]);return t}else if(arguments.length===5)for(var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=arguments[4],l=0;l<u;l++)o[a+l]=new x(i[s+l])},ft.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},ft.envelope=function(e){for(var t=new H,n=0;n<e.length;n++)t.expandToInclude(e[n]);return t},ft.toCoordinateArray=function(e){return e.toArray(ft.coordArrayType)},ft.atLeastNCoordinatesOrNothing=function(e,t){return t.length>=e?t:[]},ft.indexOf=function(e,t){for(var n=0;n<t.length;n++)if(e.equals(t[n]))return n;return-1},ft.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},ft.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},ft.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},ft.extract=function(e,t,n){t=mn.clamp(t,0,e.length),n=mn.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(ft,ec);var ju=function(){};ju.prototype.compare=function(e,t){var n=e,i=t;return ft.compare(n,i)},ju.prototype.interfaces_=function(){return[ea]},ju.prototype.getClass=function(){return ju};var ha=function(){};ha.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=ft.compare(n,i),o=ft.isEqualReversed(n,i);return o?0:s},ha.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=ft.increasingDirection(n),o=ft.increasingDirection(i),a=s>0?0:n.length-1,u=o>0?0:n.length-1,l=0;l<n.length;l++){var c=n[a].compareTo(i[u]);if(c!==0)return c;a+=s,u+=o}return 0},ha.prototype.interfaces_=function(){return[ea]},ha.prototype.getClass=function(){return ha};var to=function(){};to.prototype.get=function(){},to.prototype.put=function(){},to.prototype.size=function(){},to.prototype.values=function(){},to.prototype.entrySet=function(){};var ZE=(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})(to);function zu(r){this.message=r||""}zu.prototype=new Error,zu.prototype.name="OperationNotSupported";function nc(){}nc.prototype=new re,nc.prototype.contains=function(){};var ud=(function(r){function e(){r.call(this),this.array_=[],arguments[0]instanceof re&&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 KE(this)},e})(nc),KE=(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 ca;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new zu},e})(la),ui=0,hs=1;function Rm(r){return r===null?ui:r.color}function Dt(r){return r===null?null:r.parent}function li(r,e){r!==null&&(r.color=e)}function ld(r){return r===null?null:r.left}function Lm(r){return r===null?null:r.right}function xe(){this.root_=null,this.size_=0}xe.prototype=new ZE,xe.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},xe.prototype.put=function(r,e){if(this.root_===null)return this.root_={key:r,value:e,left:null,right:null,parent:null,color:ui,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:ui,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},xe.prototype.fixAfterInsertion=function(r){var e=this;for(r.color=hs;r!=null&&r!==this.root_&&r.parent.color===hs;)if(Dt(r)===ld(Dt(Dt(r)))){var t=Lm(Dt(Dt(r)));Rm(t)===hs?(li(Dt(r),ui),li(t,ui),li(Dt(Dt(r)),hs),r=Dt(Dt(r))):(r===Lm(Dt(r))&&(r=Dt(r),e.rotateLeft(r)),li(Dt(r),ui),li(Dt(Dt(r)),hs),e.rotateRight(Dt(Dt(r))))}else{var n=ld(Dt(Dt(r)));Rm(n)===hs?(li(Dt(r),ui),li(n,ui),li(Dt(Dt(r)),hs),r=Dt(Dt(r))):(r===ld(Dt(r))&&(r=Dt(r),e.rotateRight(r)),li(Dt(r),ui),li(Dt(Dt(r)),hs),e.rotateLeft(Dt(Dt(r))))}this.root_.color=ui},xe.prototype.values=function(){var r=new G,e=this.getFirstEntry();if(e!==null)for(r.add(e.value);(e=xe.successor(e))!==null;)r.add(e.value);return r},xe.prototype.entrySet=function(){var r=new ud,e=this.getFirstEntry();if(e!==null)for(r.add(e);(e=xe.successor(e))!==null;)r.add(e);return r},xe.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}},xe.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}},xe.prototype.getFirstEntry=function(){var r=this.root_;if(r!=null)for(;r.left!=null;)r=r.left;return r},xe.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}},xe.prototype.size=function(){return this.size_};var Uu=function(){};Uu.prototype.interfaces_=function(){return[]},Uu.prototype.getClass=function(){return Uu};function Am(){}Am.prototype=new nc;function er(){this.array_=[],arguments[0]instanceof re&&this.addAll(arguments[0])}er.prototype=new Am,er.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},er.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},er.prototype.addAll=function(r){for(var e=this,t=r.iterator();t.hasNext();)e.add(t.next());return!0},er.prototype.remove=function(r){throw new zu},er.prototype.size=function(){return this.array_.length},er.prototype.isEmpty=function(){return this.array_.length===0},er.prototype.toArray=function(){for(var r=this,e=[],t=0,n=this.array_.length;t<n;t++)e.push(r.array_[t]);return e},er.prototype.iterator=function(){return new rc(this)};var rc=function(r){this.treeSet_=r,this.position_=0};rc.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new ca;return this.treeSet_.array_[this.position_++]},rc.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},rc.prototype.remove=function(){throw new zu};var ds=function(){};ds.sort=function(){var e=arguments[0],t,n,i,s;if(arguments.length===1)s=function(a,u){return a.compareTo(u)},e.sort(s);else if(arguments.length===2)i=arguments[1],s=function(a,u){return i.compare(a,u)},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,u){return i.compare(a,u)},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])},ds.asList=function(e){for(var t=new G,n=0,i=e.length;n<i;n++)t.add(e[n]);return t};var St=function(){},Un={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}};Un.P.get=function(){return 0},Un.L.get=function(){return 1},Un.A.get=function(){return 2},Un.FALSE.get=function(){return-1},Un.TRUE.get=function(){return-2},Un.DONTCARE.get=function(){return-3},Un.SYM_FALSE.get=function(){return"F"},Un.SYM_TRUE.get=function(){return"T"},Un.SYM_DONTCARE.get=function(){return"*"},Un.SYM_P.get=function(){return"0"},Un.SYM_L.get=function(){return"1"},Un.SYM_A.get=function(){return"2"},St.prototype.interfaces_=function(){return[]},St.prototype.getClass=function(){return St},St.toDimensionSymbol=function(e){switch(e){case St.FALSE:return St.SYM_FALSE;case St.TRUE:return St.SYM_TRUE;case St.DONTCARE:return St.SYM_DONTCARE;case St.P:return St.SYM_P;case St.L:return St.SYM_L;case St.A:return St.SYM_A}throw new Vt("Unknown dimension value: "+e)},St.toDimensionValue=function(e){switch(ku.toUpperCase(e)){case St.SYM_FALSE:return St.FALSE;case St.SYM_TRUE:return St.TRUE;case St.SYM_DONTCARE:return St.DONTCARE;case St.SYM_P:return St.P;case St.SYM_L:return St.L;case St.SYM_A:return St.A}throw new Vt("Unknown dimension symbol: "+e)},Object.defineProperties(St,Un);var nr=function(){};nr.prototype.filter=function(e){},nr.prototype.interfaces_=function(){return[]},nr.prototype.getClass=function(){return nr};var Gn=function(){};Gn.prototype.filter=function(e,t){},Gn.prototype.isDone=function(){},Gn.prototype.isGeometryChanged=function(){},Gn.prototype.interfaces_=function(){return[]},Gn.prototype.getClass=function(){return Gn};var Re=(function(r){function e(n,i){if(r.call(this,i),this._geometries=n||[],r.hasNullElements(this._geometries))throw new Vt("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 H,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 u=i._geometries[a].getCoordinates(),l=0;l<u.length;l++)o++,s[o]=u[l];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 u=0;u<this._geometries.length;u++)if(!i._geometries[u].equalsExact(a._geometries[u],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();ds.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var i=this,s=St.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=St.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 er(ds.asList(this._geometries)),a=new er(ds.asList(s._geometries));return this.compare(o,a)}else if(arguments.length===2){for(var u=arguments[0],l=arguments[1],c=u,h=this.getNumGeometries(),f=c.getNumGeometries(),p=0;p<h&&p<f;){var m=i.getGeometryN(p),w=c.getGeometryN(p),E=m.compareToSameClass(w,l);if(E!==0)return E;p++}return p<h?1:p<f?-1:0}},e.prototype.apply=function(){var i=this;if(nt(arguments[0],Dr))for(var s=arguments[0],o=0;o<this._geometries.length;o++)i._geometries[o].apply(s);else if(nt(arguments[0],Gn)){var a=arguments[0];if(this._geometries.length===0)return null;for(var u=0;u<this._geometries.length&&(i._geometries[u].apply(a),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(nt(arguments[0],nr)){var l=arguments[0];l.filter(this);for(var c=0;c<this._geometries.length;c++)i._geometries[c].apply(l)}else if(nt(arguments[0],oi)){var h=arguments[0];h.filter(this);for(var f=0;f<this._geometries.length;f++)i._geometries[f].apply(h)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),ct.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})(et),fs=(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 et.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()?St.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[Uu]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(e,t),e})(Re),xn=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var e=arguments[0],t=In.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 Wt?this.boundaryLineString(this._geom):this._geom instanceof fs?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 G;this._endpointMap=new xe;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(),u=a.getValue(),l=u.count;t._bnRule.isInBoundary(l)&&n.add(a.getKey())}return ft.toCoordinateArray(n)},xn.prototype.addEndpoint=function(e){var t=this._endpointMap.get(e);t===null&&(t=new ic,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 ic=function(){this.count=null};ic.prototype.interfaces_=function(){return[]},ic.prototype.getClass=function(){return ic};function QE(){}function $E(){}var tC=function(){};function eC(){}function nC(){}function rC(){}var Tn=function(){},cd={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn},Tn.chars=function(e,t){for(var n=new Array(t).fill(null),i=0;i<t;i++)n[i]=e;return String(n)},Tn.getStackTrace=function(){if(arguments.length===1){var e=arguments[0],t=new eC,n=new QE;return e.printStackTrace(n),t.toString()}else if(arguments.length===2){var i=arguments[0],s=arguments[1],o="";new $E(Tn.getStackTrace(i));for(var a=new rC,u=0;u<s;u++)try{o+=a.readLine()+Tn.NEWLINE}catch(l){if(l instanceof nC)ct.shouldNeverReachHere();else throw l}finally{}return o}},Tn.split=function(e,t){for(var n=t.length,i=new G,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 u=new Array(i.size()).fill(null),l=0;l<u.length;l++)u[l]=i.get(l);return u},Tn.toString=function(){if(arguments.length===1){var e=arguments[0];return Tn.SIMPLE_ORDINATE_FORMAT.format(e)}},Tn.spaces=function(e){return Tn.chars(" ",e)},cd.NEWLINE.get=function(){return ve.getProperty("line.separator")},cd.SIMPLE_ORDINATE_FORMAT.get=function(){return new tC},Object.defineProperties(Tn,cd);var Yt=function(){};Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Yt.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))},Yt.isRing=function(e){var t=e.size();return t===0?!0:t<=3?!1:e.getOrdinate(0,_t.X)===e.getOrdinate(t-1,_t.X)&&e.getOrdinate(0,_t.Y)===e.getOrdinate(t-1,_t.Y)},Yt.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 u=e.getOrdinate(o,a),l=t.getOrdinate(o,a);if(e.getOrdinate(o,a)!==t.getOrdinate(o,a)&&!(ot.isNaN(u)&&ot.isNaN(l)))return!1}return!0},Yt.extend=function(e,t,n){var i=e.create(n,t.getDimension()),s=t.size();if(Yt.copy(t,0,i,0,s),s>0)for(var o=s;o<n;o++)Yt.copy(t,s-1,i,o,1);return i},Yt.reverse=function(e){for(var t=e.size()-1,n=Math.trunc(t/2),i=0;i<=n;i++)Yt.swap(e,i,t-i)},Yt.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)}},Yt.copy=function(e,t,n,i,s){for(var o=0;o<s;o++)Yt.copyCoord(e,t+o,n,i+o)},Yt.toString=function(){if(arguments.length===1){var e=arguments[0],t=e.size();if(t===0)return"()";var n=e.getDimension(),i=new Kn;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(Tn.toString(e.getOrdinate(s,o)))}return i.append(")"),i.toString()}},Yt.ensureValidRing=function(e,t){var n=t.size();if(n===0)return t;if(n<=3)return Yt.createClosedRing(e,t,4);var i=t.getOrdinate(0,_t.X)===t.getOrdinate(n-1,_t.X)&&t.getOrdinate(0,_t.Y)===t.getOrdinate(n-1,_t.Y);return i?t:Yt.createClosedRing(e,t,n+1)},Yt.createClosedRing=function(e,t,n){var i=e.create(n,t.getDimension()),s=t.size();Yt.copy(t,0,i,0,s);for(var o=s;o<n;o++)Yt.copy(t,0,i,o,1);return i};var Wt=(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 H:this._points.expandEnvelope(new H)},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 u=0;u<this._points.size();u++)if(!i.equal(i._points.getCoordinate(u),a._points.getCoordinate(u),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&&Yt.reverse(i._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?St.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 W.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var i=this._points.copy();Yt.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,u=0;a<this._points.size()&&u<o._points.size();){var l=i._points.getCoordinate(a).compareTo(o._points.getCoordinate(u));if(l!==0)return l;a++,u++}return a<this._points.size()?1:u<o._points.size()?-1:0}else if(arguments.length===2){var c=arguments[0],h=arguments[1],f=c;return h.compare(this._points,f._points)}},e.prototype.apply=function(){var i=this;if(nt(arguments[0],Dr))for(var s=arguments[0],o=0;o<this._points.size();o++)s.filter(i._points.getCoordinate(o));else if(nt(arguments[0],Gn)){var a=arguments[0];if(this._points.size()===0)return null;for(var u=0;u<this._points.size()&&(a.filter(i._points,u),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(nt(arguments[0],nr)){var l=arguments[0];l.filter(this)}else if(nt(arguments[0],oi)){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 Vt("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[Uu]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,t),e})(et),Gu=function(){};Gu.prototype.interfaces_=function(){return[]},Gu.prototype.getClass=function(){return Gu};var en=(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 H;var i=new H;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 St.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],u=o;return a.compare(this._coordinates,u._coordinates)}},e.prototype.apply=function(){if(nt(arguments[0],Dr)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(nt(arguments[0],Gn)){var s=arguments[0];if(this.isEmpty())return null;s.filter(this._coordinates,0),s.isGeometryChanged()&&this.geometryChanged()}else if(nt(arguments[0],nr)){var o=arguments[0];o.filter(this)}else if(nt(arguments[0],oi)){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([])),ct.isTrue(i.size()<=1),this._coordinates=i},e.prototype.isSimple=function(){return!0},e.prototype.interfaces_=function(){return[Gu]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(e,t),e})(et),Vi=function(){};Vi.prototype.interfaces_=function(){return[]},Vi.prototype.getClass=function(){return Vi};var ie=(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 Vt("holes must not contain null elements");if(n.isEmpty()&&r.hasNonEmptyElements(i))throw new Vt("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(),u=0;u<a.length;u++)o++,s[o]=a[u];for(var l=0;l<this._holes.length;l++)for(var c=i._holes[l].getCoordinates(),h=0;h<c.length;h++)o++,s[o]=c[h];return s},e.prototype.getArea=function(){var i=this,s=0;s+=Math.abs(W.signedArea(this._shell.getCoordinateSequence()));for(var o=0;o<this._holes.length;o++)s-=Math.abs(W.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 u=i.getY(o);if(!(u===s.getMinY()||u===s.getMaxY()))return!1}for(var l=i.getX(0),c=i.getY(0),h=1;h<=4;h++){var f=i.getX(h),p=i.getY(h),m=f!==l,w=p!==c;if(m===w)return!1;l=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,u=this._shell,l=a._shell;if(!u.equalsExact(l,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);ds.sort(this._holes)}else if(arguments.length===2){var o=arguments[0],a=arguments[1];if(o.isEmpty())return null;var u=new Array(o.getCoordinates().length-1).fill(null);ve.arraycopy(o.getCoordinates(),0,u,0,u.length);var l=ft.minCoordinate(o.getCoordinates());ft.scroll(u,l),ve.arraycopy(u,0,o.getCoordinates(),0,u.length),o.getCoordinates()[u.length]=u[0],W.isCCW(o.getCoordinates())===a&&ft.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 u=arguments[0],l=arguments[1],c=u,h=this._shell,f=c._shell,p=h.compareToSameClass(f,l);if(p!==0)return p;for(var m=this.getNumInteriorRing(),w=c.getNumInteriorRing(),E=0;E<m&&E<w;){var b=i.getInteriorRingN(E),v=c.getInteriorRingN(E),y=b.compareToSameClass(v,l);if(y!==0)return y;E++}return E<m?1:E<w?-1:0}},e.prototype.apply=function(i){var s=this;if(nt(i,Dr)){this._shell.apply(i);for(var o=0;o<this._holes.length;o++)s._holes[o].apply(i)}else if(nt(i,Gn)){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(nt(i,nr))i.filter(this);else if(nt(i,oi)){i.filter(this),this._shell.apply(i);for(var u=0;u<this._holes.length;u++)s._holes[u].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[Vi]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,t),e})(et),da=(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 et.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 St.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[Gu]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(e,t),e})(Re),Mr=(function(r){function e(n,i){n instanceof x&&i instanceof pt&&(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 et.SORTINDEX_LINEARRING},e.prototype.getBoundaryDimension=function(){return St.FALSE},e.prototype.isClosed=function(){return this.isEmpty()?!0:r.prototype.isClosed.call(this)},e.prototype.reverse=function(){var i=this._points.copy();Yt.reverse(i);var s=this.getFactory().createLinearRing(i);return s},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!r.prototype.isClosed.call(this))throw new Vt("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new Vt("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})(Wt),Rr=(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 et.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 G,o=0;o<this._geometries.length;o++)for(var a=i._geometries[o],u=a.getBoundary(),l=0;l<u.getNumGeometries();l++)s.add(u.getGeometryN(l));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[Vi]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,t),e})(Re),Nn=function(e){this._factory=e||null,this._isUserDataCopied=!1},sc={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};Nn.prototype.setCopyUserData=function(e){this._isUserDataCopied=e},Nn.prototype.edit=function(e,t){if(e===null)return null;var n=this.editInternal(e,t);return this._isUserDataCopied&&n.setUserData(e.getUserData()),n},Nn.prototype.editInternal=function(e,t){return this._factory===null&&(this._factory=e.getFactory()),e instanceof Re?this.editGeometryCollection(e,t):e instanceof ie?this.editPolygon(e,t):e instanceof en?t.edit(e,this._factory):e instanceof Wt?t.edit(e,this._factory):(ct.shouldNeverReachHere("Unsupported Geometry class: "+e.getClass().getName()),null)},Nn.prototype.editGeometryCollection=function(e,t){for(var n=this,i=t.edit(e,this._factory),s=new G,o=0;o<i.getNumGeometries();o++){var a=n.edit(i.getGeometryN(o),t);a===null||a.isEmpty()||s.add(a)}return i.getClass()===da?this._factory.createMultiPoint(s.toArray([])):i.getClass()===fs?this._factory.createMultiLineString(s.toArray([])):i.getClass()===Rr?this._factory.createMultiPolygon(s.toArray([])):this._factory.createGeometryCollection(s.toArray([]))},Nn.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 G,a=0;a<i.getNumInteriorRing();a++){var u=n.edit(i.getInteriorRingN(a),t);u===null||u.isEmpty()||o.add(u)}return this._factory.createPolygon(s,o.toArray([]))},Nn.prototype.interfaces_=function(){return[]},Nn.prototype.getClass=function(){return Nn},Nn.GeometryEditorOperation=function(){},sc.NoOpGeometryOperation.get=function(){return Wu},sc.CoordinateOperation.get=function(){return qu},sc.CoordinateSequenceOperation.get=function(){return Xu},Object.defineProperties(Nn,sc);var Wu=function(){};Wu.prototype.edit=function(e,t){return e},Wu.prototype.interfaces_=function(){return[Nn.GeometryEditorOperation]},Wu.prototype.getClass=function(){return Wu};var qu=function(){};qu.prototype.edit=function(e,t){var n=this.editCoordinates(e.getCoordinates(),e);return n===null?e:e instanceof Mr?t.createLinearRing(n):e instanceof Wt?t.createLineString(n):e instanceof en?n.length>0?t.createPoint(n[0]):t.createPoint():e},qu.prototype.interfaces_=function(){return[Nn.GeometryEditorOperation]},qu.prototype.getClass=function(){return qu};var Xu=function(){};Xu.prototype.edit=function(e,t){return e instanceof Mr?t.createLinearRing(this.edit(e.getCoordinateSequence(),e)):e instanceof Wt?t.createLineString(this.edit(e.getCoordinateSequence(),e)):e instanceof en?t.createPoint(this.edit(e.getCoordinateSequence(),e)):e},Xu.prototype.interfaces_=function(){return[Nn.GeometryEditorOperation]},Xu.prototype.getClass=function(){return Xu};var Jt=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 x}else if(nt(arguments[0],_t)){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 u=arguments[0],l=arguments[1];this._coordinates=new Array(u).fill(null),this._dimension=l;for(var c=0;c<u;c++)e._coordinates[c]=new x}}},Fm={serialVersionUID:{configurable:!0}};Jt.prototype.setOrdinate=function(e,t,n){switch(t){case _t.X:this._coordinates[e].x=n;break;case _t.Y:this._coordinates[e].y=n;break;case _t.Z:this._coordinates[e].z=n;break;default:throw new Vt("invalid ordinateIndex")}},Jt.prototype.size=function(){return this._coordinates.length},Jt.prototype.getOrdinate=function(e,t){switch(t){case _t.X:return this._coordinates[e].x;case _t.Y:return this._coordinates[e].y;case _t.Z:return this._coordinates[e].z}return ot.NaN},Jt.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}},Jt.prototype.getCoordinateCopy=function(e){return new x(this._coordinates[e])},Jt.prototype.getDimension=function(){return this._dimension},Jt.prototype.getX=function(e){return this._coordinates[e].x},Jt.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 Jt(t,this._dimension)},Jt.prototype.expandEnvelope=function(e){for(var t=this,n=0;n<this._coordinates.length;n++)e.expandToInclude(t._coordinates[n]);return e},Jt.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 Jt(t,this._dimension)},Jt.prototype.toString=function(){var e=this;if(this._coordinates.length>0){var t=new Kn(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"()"},Jt.prototype.getY=function(e){return this._coordinates[e].y},Jt.prototype.toCoordinateArray=function(){return this._coordinates},Jt.prototype.interfaces_=function(){return[_t,Pn]},Jt.prototype.getClass=function(){return Jt},Fm.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(Jt,Fm);var Lr=function(){},hd={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};Lr.prototype.readResolve=function(){return Lr.instance()},Lr.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new Jt(e)}else if(nt(arguments[0],_t)){var t=arguments[0];return new Jt(t)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new Jt(n):new Jt(n,i)}},Lr.prototype.interfaces_=function(){return[na,Pn]},Lr.prototype.getClass=function(){return Lr},Lr.instance=function(){return Lr.instanceObject},hd.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},hd.instanceObject.get=function(){return new Lr},Object.defineProperties(Lr,hd);var km=(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 G,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 ud;return this.map_.entries().forEach(function(i){return n.add(i)}),n},e.prototype.size=function(){return this.map_.size()},e})(to),bt=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 rr){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}}},dd={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};bt.prototype.equals=function(e){if(!(e instanceof bt))return!1;var t=e;return this._modelType===t._modelType&&this._scale===t._scale},bt.prototype.compareTo=function(e){var t=e,n=this.getMaximumSignificantDigits(),i=t.getMaximumSignificantDigits();return new Qn(n).compareTo(new Qn(i))},bt.prototype.getScale=function(){return this._scale},bt.prototype.isFloating=function(){return this._modelType===bt.FLOATING||this._modelType===bt.FLOATING_SINGLE},bt.prototype.getType=function(){return this._modelType},bt.prototype.toString=function(){var e="UNKNOWN";return this._modelType===bt.FLOATING?e="Floating":this._modelType===bt.FLOATING_SINGLE?e="Floating-Single":this._modelType===bt.FIXED&&(e="Fixed (Scale="+this.getScale()+")"),e},bt.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var e=arguments[0];if(ot.isNaN(e))return e;if(this._modelType===bt.FLOATING_SINGLE){var t=e;return t}return this._modelType===bt.FIXED?Math.round(e*this._scale)/this._scale:e}else if(arguments[0]instanceof x){var n=arguments[0];if(this._modelType===bt.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}},bt.prototype.getMaximumSignificantDigits=function(){var e=16;return this._modelType===bt.FLOATING?e=16:this._modelType===bt.FLOATING_SINGLE?e=6:this._modelType===bt.FIXED&&(e=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),e},bt.prototype.setScale=function(e){this._scale=Math.abs(e)},bt.prototype.interfaces_=function(){return[Pn,bn]},bt.prototype.getClass=function(){return bt},bt.mostPrecise=function(e,t){return e.compareTo(t)>=0?e:t},dd.serialVersionUID.get=function(){return 7777263578777804e3},dd.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(bt,dd);var rr=function r(e){this._name=e||null,r.nameToTypeMap.put(e,this)},fd={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};rr.prototype.readResolve=function(){return rr.nameToTypeMap.get(this._name)},rr.prototype.toString=function(){return this._name},rr.prototype.interfaces_=function(){return[Pn]},rr.prototype.getClass=function(){return rr},fd.serialVersionUID.get=function(){return-552860263173159e4},fd.nameToTypeMap.get=function(){return new km},Object.defineProperties(rr,fd),bt.Type=rr,bt.FIXED=new rr("FIXED"),bt.FLOATING=new rr("FLOATING"),bt.FLOATING_SINGLE=new rr("FLOATING SINGLE");var pt=function r(){this._precisionModel=new bt,this._SRID=0,this._coordinateSequenceFactory=r.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?nt(arguments[0],na)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof bt&&(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]))},Vm={serialVersionUID:{configurable:!0}};pt.prototype.toGeometry=function(e){return e.isNull()?this.createPoint(null):e.getMinX()===e.getMaxX()&&e.getMinY()===e.getMaxY()?this.createPoint(new x(e.getMinX(),e.getMinY())):e.getMinX()===e.getMaxX()||e.getMinY()===e.getMaxY()?this.createLineString([new x(e.getMinX(),e.getMinY()),new x(e.getMaxX(),e.getMaxY())]):this.createPolygon(this.createLinearRing([new x(e.getMinX(),e.getMinY()),new x(e.getMinX(),e.getMaxY()),new x(e.getMaxX(),e.getMaxY()),new x(e.getMaxX(),e.getMinY()),new x(e.getMinX(),e.getMinY())]),null)},pt.prototype.createLineString=function(e){if(e){if(e instanceof Array)return new Wt(this.getCoordinateSequenceFactory().create(e),this);if(nt(e,_t))return new Wt(e,this)}else return new Wt(this.getCoordinateSequenceFactory().create([]),this)},pt.prototype.createMultiLineString=function(){if(arguments.length===0)return new fs(null,this);if(arguments.length===1){var e=arguments[0];return new fs(e,this)}},pt.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(pt.toGeometryArray(e));var u=e.iterator().next(),l=e.size()>1;if(l){if(u instanceof ie)return this.createMultiPolygon(pt.toPolygonArray(e));if(u instanceof Wt)return this.createMultiLineString(pt.toLineStringArray(e));if(u instanceof en)return this.createMultiPoint(pt.toPointArray(e));ct.shouldNeverReachHere("Unhandled class: "+u.getClass().getName())}return u},pt.prototype.createMultiPointFromCoords=function(e){return this.createMultiPoint(e!==null?this.getCoordinateSequenceFactory().create(e):null)},pt.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof x){var e=arguments[0];return this.createPoint(e!==null?this.getCoordinateSequenceFactory().create([e]):null)}else if(nt(arguments[0],_t)){var t=arguments[0];return new en(t,this)}}},pt.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},pt.prototype.createPolygon=function(){if(arguments.length===0)return new ie(null,null,this);if(arguments.length===1){if(nt(arguments[0],_t)){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 Mr){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return new ie(i,s,this)}},pt.prototype.getSRID=function(){return this._SRID},pt.prototype.createGeometryCollection=function(){if(arguments.length===0)return new Re(null,this);if(arguments.length===1){var e=arguments[0];return new Re(e,this)}},pt.prototype.createGeometry=function(e){var t=new Nn(this);return t.edit(e,{edit:function(){if(arguments.length===2){var n=arguments[0];return this._coordinateSequenceFactory.create(n)}}})},pt.prototype.getPrecisionModel=function(){return this._precisionModel},pt.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(nt(arguments[0],_t)){var t=arguments[0];return new Mr(t,this)}}},pt.prototype.createMultiPolygon=function(){if(arguments.length===0)return new Rr(null,this);if(arguments.length===1){var e=arguments[0];return new Rr(e,this)}},pt.prototype.createMultiPoint=function(){var e=this;if(arguments.length===0)return new da(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new da(t,this)}else if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}else if(nt(arguments[0],_t)){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());Yt.copy(i,o,a,0,1),s[o]=e.createPoint(a)}return this.createMultiPoint(s)}}},pt.prototype.interfaces_=function(){return[Pn]},pt.prototype.getClass=function(){return pt},pt.toMultiPolygonArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},pt.toGeometryArray=function(e){if(e===null)return null;var t=new Array(e.size()).fill(null);return e.toArray(t)},pt.getDefaultCoordinateSequenceFactory=function(){return Lr.instance()},pt.toMultiLineStringArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},pt.toLineStringArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},pt.toMultiPointArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},pt.toLinearRingArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},pt.toPointArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},pt.toPolygonArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},pt.createPointFromInternalCoord=function(e,t){return t.getPrecisionModel().makePrecise(e),t.getFactory().createPoint(e)},Vm.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties(pt,Vm);var iC=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],oc=function(e){this.geometryFactory=e||new pt};oc.prototype.read=function(e){var t;typeof e=="string"?t=JSON.parse(e):t=e;var n=t.type;if(!ir[n])throw new Error("Unknown GeoJSON type: "+t.type);return iC.indexOf(n)!==-1?ir[n].apply(this,[t.coordinates]):n==="GeometryCollection"?ir[n].apply(this,[t.geometries]):ir[n].apply(this,[t])},oc.prototype.write=function(e){var t=e.getGeometryType();if(!ci[t])throw new Error("Geometry is not supported");return ci[t].apply(this,[e])};var ir={Feature:function(r){var e={};for(var t in r)e[t]=r[t];if(r.geometry){var n=r.geometry.type;if(!ir[n])throw new Error("Unknown GeoJSON type: "+r.type);e.geometry=this.read(r.geometry)}return r.bbox&&(e.bbox=ir.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 x(n[0],n[1]))}return e},bbox:function(r){return this.geometryFactory.createLinearRing([new x(r[0],r[1]),new x(r[2],r[1]),new x(r[2],r[3]),new x(r[0],r[3]),new x(r[0],r[1])])},Point:function(r){var e=new x(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(ir.Point.apply(e,[r[n]]));return this.geometryFactory.createMultiPoint(t)},LineString:function(r){var e=ir.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(ir.LineString.apply(e,[r[n]]));return this.geometryFactory.createMultiLineString(t)},Polygon:function(r){for(var e=this,t=ir.coordinates.apply(this,[r[0]]),n=this.geometryFactory.createLinearRing(t),i=[],s=1;s<r.length;++s){var o=r[s],a=ir.coordinates.apply(e,[o]),u=e.geometryFactory.createLinearRing(a);i.push(u)}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(ir.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)}},ci={coordinate:function(r){return[r.x,r.y]},Point:function(r){var e=ci.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=ci.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(ci.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=ci.LineString.apply(e,[i]);t.push(s.coordinates)}return{type:"MultiLineString",coordinates:t}},Polygon:function(r){var e=this,t=[],n=ci.LineString.apply(this,[r._shell]);t.push(n.coordinates);for(var i=0;i<r._holes.length;++i){var s=r._holes[i],o=ci.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=ci.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(ci[s].apply(e,[i]))}return{type:"GeometryCollection",geometries:t}}},pd=function(e){this.geometryFactory=e||new pt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new oc(this.geometryFactory)};pd.prototype.read=function(e){var t=this.parser.read(e);return this.precisionModel.getType()===bt.FIXED&&this.reducePrecision(t),t},pd.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 Bm=function(){this.parser=new oc(this.geometryFactory)};Bm.prototype.write=function(e){return this.parser.write(e)};var z=function(){},ac={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};z.prototype.interfaces_=function(){return[]},z.prototype.getClass=function(){return z},z.opposite=function(e){return e===z.LEFT?z.RIGHT:e===z.RIGHT?z.LEFT:e},ac.ON.get=function(){return 0},ac.LEFT.get=function(){return 1},ac.RIGHT.get=function(){return 2},Object.defineProperties(z,ac);function uc(r){this.message=r||""}uc.prototype=new Error,uc.prototype.name="EmptyStackException";function sr(){this.array_=[]}sr.prototype=new zn,sr.prototype.add=function(r){return this.array_.push(r),!0},sr.prototype.get=function(r){if(r<0||r>=this.size())throw new Error;return this.array_[r]},sr.prototype.push=function(r){return this.array_.push(r),r},sr.prototype.pop=function(r){if(this.array_.length===0)throw new uc;return this.array_.pop()},sr.prototype.peek=function(){if(this.array_.length===0)throw new uc;return this.array_[this.array_.length-1]},sr.prototype.empty=function(){return this.array_.length===0},sr.prototype.isEmpty=function(){return this.empty()},sr.prototype.search=function(r){return this.array_.indexOf(r)},sr.prototype.size=function(){return this.array_.length},sr.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 or=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};or.prototype.getCoordinate=function(){return this._minCoord},or.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},or.prototype.findRightmostEdgeAtVertex=function(){var e=this._minDe.getEdge().getCoordinates();ct.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=W.computeOrientation(this._minCoord,n,t),s=!1;(t.y<this._minCoord.y&&n.y<this._minCoord.y&&i===W.COUNTERCLOCKWISE||t.y>this._minCoord.y&&n.y>this._minCoord.y&&i===W.CLOCKWISE)&&(s=!0),s&&(this._minIndex=this._minIndex-1)},or.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=z.LEFT;return i[t].y<i[t+1].y&&(s=z.RIGHT),s},or.prototype.getEdge=function(){return this._orientedDe},or.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])},or.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)},or.prototype.findEdge=function(e){for(var t=this,n=e.iterator();n.hasNext();){var i=n.next();i.isForward()&&t.checkForRightmostCoordinate(i)}ct.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===z.LEFT&&(this._orientedDe=this._minDe.getSym())},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or};var hi=(function(r){function e(t,n){r.call(this,e.msgWithCoord(t,n)),this.pt=n?new x(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})(si),lc=function(){this.array_=[]};lc.prototype.addLast=function(e){this.array_.push(e)},lc.prototype.removeFirst=function(){return this.array_.shift()},lc.prototype.isEmpty=function(){return this.array_.length===0};var Le=function(){this._finder=null,this._dirEdgeList=new G,this._nodes=new G,this._rightMostCoord=null,this._env=null,this._finder=new or};Le.prototype.clearVisitedEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var t=e.next();t.setVisited(!1)}},Le.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Le.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 hi("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)}},Le.prototype.computeDepth=function(e){this.clearVisitedEdges();var t=this._finder.getEdge();t.setEdgeDepths(z.RIGHT,e),this.copySymDepths(t),this.computeDepths(t)},Le.prototype.create=function(e){this.addReachable(e),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Le.prototype.findResultEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var t=e.next();t.getDepth(z.RIGHT)>=1&&t.getDepth(z.LEFT)<=0&&!t.isInteriorAreaEdge()&&t.setInResult(!0)}},Le.prototype.computeDepths=function(e){var t=this,n=new ud,i=new lc,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 u=a.next(),l=u.getSym();if(!l.isVisited()){var c=l.getNode();n.contains(c)||(i.addLast(c),n.add(c))}}}},Le.prototype.compareTo=function(e){var t=e;return this._rightMostCoord.x<t._rightMostCoord.x?-1:this._rightMostCoord.x>t._rightMostCoord.x?1:0},Le.prototype.getEnvelope=function(){if(this._env===null){for(var e=new H,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},Le.prototype.addReachable=function(e){var t=this,n=new sr;for(n.add(e);!n.empty();){var i=n.pop();t.add(i,n)}},Le.prototype.copySymDepths=function(e){var t=e.getSym();t.setDepth(z.LEFT,e.getDepth(z.RIGHT)),t.setDepth(z.RIGHT,e.getDepth(z.LEFT))},Le.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)}},Le.prototype.getNodes=function(){return this._nodes},Le.prototype.getDirectedEdges=function(){return this._dirEdgeList},Le.prototype.interfaces_=function(){return[bn]},Le.prototype.getClass=function(){return Le};var Mt=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[z.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],u=arguments[2];this.init(3),this.location[z.ON]=o,this.location[z.LEFT]=a,this.location[z.RIGHT]=u}};Mt.prototype.setAllLocations=function(e){for(var t=this,n=0;n<this.location.length;n++)t.location[n]=e},Mt.prototype.isNull=function(){for(var e=this,t=0;t<this.location.length;t++)if(e.location[t]!==D.NONE)return!1;return!0},Mt.prototype.setAllLocationsIfNull=function(e){for(var t=this,n=0;n<this.location.length;n++)t.location[n]===D.NONE&&(t.location[n]=e)},Mt.prototype.isLine=function(){return this.location.length===1},Mt.prototype.merge=function(e){var t=this;if(e.location.length>this.location.length){var n=new Array(3).fill(null);n[z.ON]=this.location[z.ON],n[z.LEFT]=D.NONE,n[z.RIGHT]=D.NONE,this.location=n}for(var i=0;i<this.location.length;i++)t.location[i]===D.NONE&&i<e.location.length&&(t.location[i]=e.location[i])},Mt.prototype.getLocations=function(){return this.location},Mt.prototype.flip=function(){if(this.location.length<=1)return null;var e=this.location[z.LEFT];this.location[z.LEFT]=this.location[z.RIGHT],this.location[z.RIGHT]=e},Mt.prototype.toString=function(){var e=new Kn;return this.location.length>1&&e.append(D.toLocationSymbol(this.location[z.LEFT])),e.append(D.toLocationSymbol(this.location[z.ON])),this.location.length>1&&e.append(D.toLocationSymbol(this.location[z.RIGHT])),e.toString()},Mt.prototype.setLocations=function(e,t,n){this.location[z.ON]=e,this.location[z.LEFT]=t,this.location[z.RIGHT]=n},Mt.prototype.get=function(e){return e<this.location.length?this.location[e]:D.NONE},Mt.prototype.isArea=function(){return this.location.length>1},Mt.prototype.isAnyNull=function(){for(var e=this,t=0;t<this.location.length;t++)if(e.location[t]===D.NONE)return!0;return!1},Mt.prototype.setLocation=function(){if(arguments.length===1){var e=arguments[0];this.setLocation(z.ON,e)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];this.location[t]=n}},Mt.prototype.init=function(e){this.location=new Array(e).fill(null),this.setAllLocations(D.NONE)},Mt.prototype.isEqualOnSide=function(e,t){return this.location[t]===e.location[t]},Mt.prototype.allPositionsEqual=function(e){for(var t=this,n=0;n<this.location.length;n++)if(t.location[n]!==e)return!1;return!0},Mt.prototype.interfaces_=function(){return[]},Mt.prototype.getClass=function(){return Mt};var Tt=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 Mt(e),this.elt[1]=new Mt(e)}else if(arguments[0]instanceof r){var t=arguments[0];this.elt[0]=new Mt(t.elt[0]),this.elt[1]=new Mt(t.elt[1])}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.elt[0]=new Mt(D.NONE),this.elt[1]=new Mt(D.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 Mt(s,o,a),this.elt[1]=new Mt(s,o,a)}else if(arguments.length===4){var u=arguments[0],l=arguments[1],c=arguments[2],h=arguments[3];this.elt[0]=new Mt(D.NONE,D.NONE,D.NONE),this.elt[1]=new Mt(D.NONE,D.NONE,D.NONE),this.elt[u].setLocations(l,c,h)}};Tt.prototype.getGeometryCount=function(){var e=0;return this.elt[0].isNull()||e++,this.elt[1].isNull()||e++,e},Tt.prototype.setAllLocations=function(e,t){this.elt[e].setAllLocations(t)},Tt.prototype.isNull=function(e){return this.elt[e].isNull()},Tt.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)}},Tt.prototype.isLine=function(e){return this.elt[e].isLine()},Tt.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 Mt(e.elt[n]):t.elt[n].merge(e.elt[n])},Tt.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Tt.prototype.getLocation=function(){if(arguments.length===1){var e=arguments[0];return this.elt[e].get(z.ON)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];return this.elt[t].get(n)}},Tt.prototype.toString=function(){var e=new Kn;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()},Tt.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()}},Tt.prototype.isAnyNull=function(e){return this.elt[e].isAnyNull()},Tt.prototype.setLocation=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1];this.elt[e].setLocation(z.ON,t)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this.elt[n].setLocation(i,s)}},Tt.prototype.isEqualOnSide=function(e,t){return this.elt[0].isEqualOnSide(e.elt[0],t)&&this.elt[1].isEqualOnSide(e.elt[1],t)},Tt.prototype.allPositionsEqual=function(e,t){return this.elt[e].allPositionsEqual(t)},Tt.prototype.toLine=function(e){this.elt[e].isArea()&&(this.elt[e]=new Mt(this.elt[e].location[0]))},Tt.prototype.interfaces_=function(){return[]},Tt.prototype.getClass=function(){return Tt},Tt.toLineLabel=function(e){for(var t=new Tt(D.NONE),n=0;n<2;n++)t.setLocation(n,e.getLocation(n));return t};var $t=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new G,this._pts=new G,this._label=new Tt(D.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new G,this._geometryFactory=null;var e=arguments[0],t=arguments[1];this._geometryFactory=t,this.computePoints(e),this.computeRing()};$t.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=W.isCCW(this._ring.getCoordinates())},$t.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},$t.prototype.computePoints=function(e){var t=this;this._startDe=e;var n=e,i=!0;do{if(n===null)throw new hi("Found null DirectedEdge");if(n.getEdgeRing()===t)throw new hi("Directed Edge visited twice during ring-building at "+n.getCoordinate());t._edges.add(n);var s=n.getLabel();ct.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)},$t.prototype.getLinearRing=function(){return this._ring},$t.prototype.getCoordinate=function(e){return this._pts.get(e)},$t.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},$t.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 u=s.length-2;n&&(u=s.length-1);for(var l=u;l>=0;l--)i._pts.add(s[l])}},$t.prototype.isHole=function(){return this._isHole},$t.prototype.setInResult=function(){var e=this._startDe;do e.getEdge().setInResult(!0),e=e.getNext();while(e!==this._startDe)},$t.prototype.containsPoint=function(e){var t=this.getLinearRing(),n=t.getEnvelopeInternal();if(!n.contains(e)||!W.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},$t.prototype.addHole=function(e){this._holes.add(e)},$t.prototype.isShell=function(){return this._shell===null},$t.prototype.getLabel=function(){return this._label},$t.prototype.getEdges=function(){return this._edges},$t.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},$t.prototype.getShell=function(){return this._shell},$t.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,z.RIGHT);if(i===D.NONE)return null;if(this._label.getLocation(n)===D.NONE)return this._label.setLocation(n,i),null}},$t.prototype.setShell=function(e){this._shell=e,e!==null&&e.addHole(this)},$t.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},$t.prototype.interfaces_=function(){return[]},$t.prototype.getClass=function(){return $t};var sC=(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})($t),oC=(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 G,s=this._startDe;do{if(s.getMinEdgeRing()===null){var o=new sC(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})($t),vn=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}}};vn.prototype.setVisited=function(e){this._isVisited=e},vn.prototype.setInResult=function(e){this._isInResult=e},vn.prototype.isCovered=function(){return this._isCovered},vn.prototype.isCoveredSet=function(){return this._isCoveredSet},vn.prototype.setLabel=function(e){this._label=e},vn.prototype.getLabel=function(){return this._label},vn.prototype.setCovered=function(e){this._isCovered=e,this._isCoveredSet=!0},vn.prototype.updateIM=function(e){ct.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(e)},vn.prototype.isInResult=function(){return this._isInResult},vn.prototype.isVisited=function(){return this._isVisited},vn.prototype.interfaces_=function(){return[]},vn.prototype.getClass=function(){return vn};var cc=(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 Tt(0,D.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=D.NONE;if(s=this._label.getLocation(i),!n.isNull(i)){var o=n.getLocation(i);s!==D.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 Tt(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 Tt)for(var s=arguments[0],o=0;o<2;o++){var a=n.computeMergedLocation(s,o),u=n._label.getLocation(o);u===D.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=D.NONE;this._label!==null&&(i=this._label.getLocation(n));var s=null;switch(i){case D.BOUNDARY:s=D.INTERIOR;break;case D.INTERIOR:s=D.BOUNDARY;break;default:s=D.BOUNDARY;break}this._label.setLocation(n,s)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(vn),ar=function(){this.nodeMap=new xe,this.nodeFact=null;var e=arguments[0];this.nodeFact=e};ar.prototype.find=function(e){return this.nodeMap.get(e)},ar.prototype.addNode=function(){if(arguments[0]instanceof x){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 cc){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return i===null?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},ar.prototype.print=function(e){for(var t=this.iterator();t.hasNext();){var n=t.next();n.print(e)}},ar.prototype.iterator=function(){return this.nodeMap.values().iterator()},ar.prototype.values=function(){return this.nodeMap.values()},ar.prototype.getBoundaryNodes=function(e){for(var t=new G,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(e)===D.BOUNDARY&&t.add(i)}return t},ar.prototype.add=function(e){var t=e.getCoordinate(),n=this.addNode(t);n.add(e)},ar.prototype.interfaces_=function(){return[]},ar.prototype.getClass=function(){return ar};var Nt=function(){},Hu={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt},Nt.isNorthern=function(e){return e===Nt.NE||e===Nt.NW},Nt.isOpposite=function(e,t){if(e===t)return!1;var n=(e-t+4)%4;return n===2},Nt.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},Nt.isInHalfPlane=function(e,t){return t===Nt.SE?e===Nt.SE||e===Nt.SW:e===t||e===t+1},Nt.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 Vt("Cannot compute the quadrant for point ( "+e+", "+t+" )");return e>=0?t>=0?Nt.NE:Nt.SE:t>=0?Nt.NW:Nt.SW}else if(arguments[0]instanceof x&&arguments[1]instanceof x){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new Vt("Cannot compute the quadrant for two identical points "+n);return i.x>=n.x?i.y>=n.y?Nt.NE:Nt.SE:i.y>=n.y?Nt.NW:Nt.SW}},Hu.NE.get=function(){return 0},Hu.NW.get=function(){return 1},Hu.SW.get=function(){return 2},Hu.SE.get=function(){return 3},Object.defineProperties(Nt,Hu);var Te=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],u=arguments[2],l=arguments[3];this._edge=o,this.init(a,u),this._label=l}};Te.prototype.compareDirection=function(e){return this._dx===e._dx&&this._dy===e._dy?0:this._quadrant>e._quadrant?1:this._quadrant<e._quadrant?-1:W.computeOrientation(e._p0,e._p1,this._p1)},Te.prototype.getDy=function(){return this._dy},Te.prototype.getCoordinate=function(){return this._p0},Te.prototype.setNode=function(e){this._node=e},Te.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)},Te.prototype.compareTo=function(e){var t=e;return this.compareDirection(t)},Te.prototype.getDirectedCoordinate=function(){return this._p1},Te.prototype.getDx=function(){return this._dx},Te.prototype.getLabel=function(){return this._label},Te.prototype.getEdge=function(){return this._edge},Te.prototype.getQuadrant=function(){return this._quadrant},Te.prototype.getNode=function(){return this._node},Te.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},Te.prototype.computeLabel=function(e){},Te.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=Nt.quadrant(this._dx,this._dy),ct.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},Te.prototype.interfaces_=function(){return[bn]},Te.prototype.getClass=function(){return Te};var gd=(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 Tt(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 hi("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,z.LEFT)===D.INTERIOR&&n._label.getLocation(s,z.RIGHT)===D.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[z.LEFT]+"/"+this._depth[z.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,D.EXTERIOR),s=!this._label.isArea(1)||this._label.allPositionsEqual(1,D.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===z.LEFT&&(o=-1);var a=z.opposite(n),u=s*o,l=i+u;this.setDepth(n,i),this.setDepth(a,l)},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===D.EXTERIOR&&i===D.INTERIOR?1:n===D.INTERIOR&&i===D.EXTERIOR?-1:0},e})(Te),fa=function(){};fa.prototype.createNode=function(e){return new cc(e,null)},fa.prototype.interfaces_=function(){return[]},fa.prototype.getClass=function(){return fa};var Gt=function(){if(this._edges=new G,this._nodes=null,this._edgeEndList=new G,arguments.length===0)this._nodes=new ar(new fa);else if(arguments.length===1){var e=arguments[0];this._nodes=new ar(e)}};Gt.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)}},Gt.prototype.find=function(e){return this._nodes.find(e)},Gt.prototype.addNode=function(){if(arguments[0]instanceof cc){var e=arguments[0];return this._nodes.addNode(e)}else if(arguments[0]instanceof x){var t=arguments[0];return this._nodes.addNode(t)}},Gt.prototype.getNodeIterator=function(){return this._nodes.iterator()},Gt.prototype.linkResultDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();){var t=e.next();t.getEdges().linkResultDirectedEdges()}},Gt.prototype.debugPrintln=function(e){ve.out.println(e)},Gt.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)===D.BOUNDARY},Gt.prototype.linkAllDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();){var t=e.next();t.getEdges().linkAllDirectedEdges()}},Gt.prototype.matchInSameDirection=function(e,t,n,i){return e.equals(n)?W.computeOrientation(e,t,i)===W.COLLINEAR&&Nt.quadrant(e,t)===Nt.quadrant(n,i):!1},Gt.prototype.getEdgeEnds=function(){return this._edgeEndList},Gt.prototype.debugPrint=function(e){ve.out.print(e)},Gt.prototype.getEdgeIterator=function(){return this._edges.iterator()},Gt.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},Gt.prototype.insertEdge=function(e){this._edges.add(e)},Gt.prototype.findEdgeEnd=function(e){for(var t=this.getEdgeEnds().iterator();t.hasNext();){var n=t.next();if(n.getEdge()===e)return n}return null},Gt.prototype.addEdges=function(e){for(var t=this,n=e.iterator();n.hasNext();){var i=n.next();t._edges.add(i);var s=new gd(i,!0),o=new gd(i,!1);s.setSym(o),o.setSym(s),t.add(s),t.add(o)}},Gt.prototype.add=function(e){this._nodes.add(e),this._edgeEndList.add(e)},Gt.prototype.getNodes=function(){return this._nodes.values()},Gt.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},Gt.prototype.interfaces_=function(){return[]},Gt.prototype.getClass=function(){return Gt},Gt.linkResultDirectedEdges=function(e){for(var t=e.iterator();t.hasNext();){var n=t.next();n.getEdges().linkResultDirectedEdges()}};var nn=function(){this._geometryFactory=null,this._shellList=new G;var e=arguments[0];this._geometryFactory=e};nn.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)}},nn.prototype.computePolygons=function(e){for(var t=this,n=new G,i=e.iterator();i.hasNext();){var s=i.next(),o=s.toPolygon(t._geometryFactory);n.add(o)}return n},nn.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 hi("unable to assign hole to a shell",s.getCoordinate(0));s.setShell(o)}}},nn.prototype.buildMinimalEdgeRings=function(e,t,n){for(var i=this,s=new G,o=e.iterator();o.hasNext();){var a=o.next();if(a.getMaxNodeDegree()>2){a.linkDirectedEdgesForMinimalEdgeRings();var u=a.buildMinimalRings(),l=i.findShell(u);l!==null?(i.placePolygonHoles(l,u),t.add(l)):n.addAll(u)}else s.add(a)}return s},nn.prototype.containsPoint=function(e){for(var t=this._shellList.iterator();t.hasNext();){var n=t.next();if(n.containsPoint(e))return!0}return!1},nn.prototype.buildMaximalEdgeRings=function(e){for(var t=this,n=new G,i=e.iterator();i.hasNext();){var s=i.next();if(s.isInResult()&&s.getLabel().isArea()&&s.getEdgeRing()===null){var o=new oC(s,t._geometryFactory);n.add(o),o.setInResult()}}return n},nn.prototype.placePolygonHoles=function(e,t){for(var n=t.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(e)}},nn.prototype.getPolygons=function(){var e=this.computePolygons(this._shellList);return e},nn.prototype.findEdgeRingContaining=function(e,t){for(var n=e.getLinearRing(),i=n.getEnvelopeInternal(),s=n.getCoordinateN(0),o=null,a=null,u=t.iterator();u.hasNext();){var l=u.next(),c=l.getLinearRing(),h=c.getEnvelopeInternal();o!==null&&(a=o.getLinearRing().getEnvelopeInternal());var f=!1;h.contains(i)&&W.isPointInRing(s,c.getCoordinates())&&(f=!0),f&&(o===null||a.contains(h))&&(o=l)}return o},nn.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 ct.isTrue(t<=1,"found two shells in MinimalEdgeRing list"),n},nn.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];Gt.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(t),s=new G,o=this.buildMinimalEdgeRings(i,this._shellList,s);this.sortShellsAndHoles(o,this._shellList,s),this.placeFreeHoles(this._shellList,s)}},nn.prototype.interfaces_=function(){return[]},nn.prototype.getClass=function(){return nn};var pa=function(){};pa.prototype.getBounds=function(){},pa.prototype.interfaces_=function(){return[]},pa.prototype.getClass=function(){return pa};var Wn=function(){this._bounds=null,this._item=null;var e=arguments[0],t=arguments[1];this._bounds=e,this._item=t};Wn.prototype.getItem=function(){return this._item},Wn.prototype.getBounds=function(){return this._bounds},Wn.prototype.interfaces_=function(){return[pa,Pn]},Wn.prototype.getClass=function(){return Wn};var di=function(){this._size=null,this._items=null,this._size=0,this._items=new G,this._items.add(null)};di.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},di.prototype.size=function(){return this._size},di.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)},di.prototype.clear=function(){this._size=0,this._items.clear()},di.prototype.isEmpty=function(){return this._size===0},di.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)},di.prototype.interfaces_=function(){return[]},di.prototype.getClass=function(){return di};var Bi=function(){};Bi.prototype.visitItem=function(e){},Bi.prototype.interfaces_=function(){return[]},Bi.prototype.getClass=function(){return Bi};var eo=function(){};eo.prototype.insert=function(e,t){},eo.prototype.remove=function(e,t){},eo.prototype.query=function(){},eo.prototype.interfaces_=function(){return[]},eo.prototype.getClass=function(){return eo};var se=function(){if(this._childBoundables=new G,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this._level=e}}},jm={serialVersionUID:{configurable:!0}};se.prototype.getLevel=function(){return this._level},se.prototype.size=function(){return this._childBoundables.size()},se.prototype.getChildBoundables=function(){return this._childBoundables},se.prototype.addChildBoundable=function(e){ct.isTrue(this._bounds===null),this._childBoundables.add(e)},se.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},se.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},se.prototype.interfaces_=function(){return[pa,Pn]},se.prototype.getClass=function(){return se},jm.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(se,jm);var qn=function(){};qn.reverseOrder=function(){return{compare:function(t,n){return n.compareTo(t)}}},qn.min=function(e){return qn.sort(e),e.get(0)},qn.sort=function(e,t){var n=e.toArray();t?ds.sort(n,t):ds.sort(n);for(var i=e.iterator(),s=0,o=n.length;s<o;s++)i.next(),i.set(n[s])},qn.singletonList=function(e){var t=new G;return t.add(e),t};var te=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()};te.prototype.expandToQueue=function(e,t){var n=te.isComposite(this._boundable1),i=te.isComposite(this._boundable2);if(n&&i)return te.area(this._boundable1)>te.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 Vt("neither boundable is composite")},te.prototype.isLeaves=function(){return!(te.isComposite(this._boundable1)||te.isComposite(this._boundable2))},te.prototype.compareTo=function(e){var t=e;return this._distance<t._distance?-1:this._distance>t._distance?1:0},te.prototype.expand=function(e,t,n,i){for(var s=this,o=e.getChildBoundables(),a=o.iterator();a.hasNext();){var u=a.next(),l=new te(u,t,s._itemDistance);l.getDistance()<i&&n.add(l)}},te.prototype.getBoundable=function(e){return e===0?this._boundable1:this._boundable2},te.prototype.getDistance=function(){return this._distance},te.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},te.prototype.interfaces_=function(){return[bn]},te.prototype.getClass=function(){return te},te.area=function(e){return e.getBounds().getArea()},te.isComposite=function(e){return e instanceof se};var he=function r(){if(this._root=null,this._built=!1,this._itemBoundables=new G,this._nodeCapacity=null,arguments.length===0){var e=r.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(arguments.length===1){var t=arguments[0];ct.isTrue(t>1,"Node capacity must be greater than 1"),this._nodeCapacity=t}},hc={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};he.prototype.getNodeCapacity=function(){return this._nodeCapacity},he.prototype.lastNode=function(e){return e.get(e.size()-1)},he.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 se?n+=e.size(s):s instanceof Wn&&(n+=1)}return n}},he.prototype.removeItem=function(e,t){for(var n=null,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof Wn&&s.getItem()===t&&(n=s)}return n!==null?(e.getChildBoundables().remove(n),!0):!1},he.prototype.itemsTree=function(){var e=this;if(arguments.length===0){this.build();var t=this.itemsTree(this._root);return t===null?new G:t}else if(arguments.length===1){for(var n=arguments[0],i=new G,s=n.getChildBoundables().iterator();s.hasNext();){var o=s.next();if(o instanceof se){var a=e.itemsTree(o);a!==null&&i.add(a)}else o instanceof Wn?i.add(o.getItem()):ct.shouldNeverReachHere()}return i.size()<=0?null:i}},he.prototype.insert=function(e,t){ct.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Wn(e,t))},he.prototype.boundablesAtLevel=function(){var e=this;if(arguments.length===1){var t=arguments[0],n=new G;return this.boundablesAtLevel(t,this._root,n),n}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(ct.isTrue(i>-2),s.getLevel()===i)return o.add(s),null;for(var a=s.getChildBoundables().iterator();a.hasNext();){var u=a.next();u instanceof se?e.boundablesAtLevel(i,u,o):(ct.isTrue(u instanceof Wn),i===-1&&o.add(u))}return null}},he.prototype.query=function(){var e=this;if(arguments.length===1){var t=arguments[0];this.build();var n=new G;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(nt(arguments[2],Bi)&&arguments[0]instanceof Object&&arguments[1]instanceof se)for(var o=arguments[0],a=arguments[1],u=arguments[2],l=a.getChildBoundables(),c=0;c<l.size();c++){var h=l.get(c);e.getIntersectsOp().intersects(h.getBounds(),o)&&(h instanceof se?e.query(o,h,u):h instanceof Wn?u.visitItem(h.getItem()):ct.shouldNeverReachHere())}else if(nt(arguments[2],zn)&&arguments[0]instanceof Object&&arguments[1]instanceof se)for(var f=arguments[0],p=arguments[1],m=arguments[2],w=p.getChildBoundables(),E=0;E<w.size();E++){var b=w.get(E);e.getIntersectsOp().intersects(b.getBounds(),f)&&(b instanceof se?e.query(f,b,m):b instanceof Wn?m.add(b.getItem()):ct.shouldNeverReachHere())}}},he.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},he.prototype.getRoot=function(){return this.build(),this._root},he.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 u=null,l=s.getChildBoundables().iterator();l.hasNext();){var c=l.next();if(e.getIntersectsOp().intersects(c.getBounds(),i)&&c instanceof se&&(a=e.remove(i,c,o),a)){u=c;break}}return u!==null&&u.getChildBoundables().isEmpty()&&s.getChildBoundables().remove(u),a}},he.prototype.createHigherLevels=function(e,t){ct.isTrue(!e.isEmpty());var n=this.createParentBoundables(e,t+1);return n.size()===1?n.get(0):this.createHigherLevels(n,t+1)},he.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 se){var o=e.depth(s);o>n&&(n=o)}}return n+1}},he.prototype.createParentBoundables=function(e,t){var n=this;ct.isTrue(!e.isEmpty());var i=new G;i.add(this.createNode(t));var s=new G(e);qn.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},he.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},he.prototype.interfaces_=function(){return[Pn]},he.prototype.getClass=function(){return he},he.compareDoubles=function(e,t){return e>t?1:e<t?-1:0},hc.IntersectsOp.get=function(){return aC},hc.serialVersionUID.get=function(){return-3886435814360241e3},hc.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(he,hc);var aC=function(){},ga=function(){};ga.prototype.distance=function(e,t){},ga.prototype.interfaces_=function(){return[]},ga.prototype.getClass=function(){return ga};var zm=(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;ct.isTrue(i.length>0);for(var a=new G,u=0;u<i.length;u++)a.addAll(o.createParentBoundablesFromVerticalSlice(i[u],s));return a},e.prototype.createNode=function(i){return new Um(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),u=i.iterator(),l=0;l<s;l++){a[l]=new G;for(var c=0;u.hasNext()&&c<o;){var h=u.next();a[l].add(h),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(nt(arguments[2],Bi)&&arguments[0]instanceof Object&&arguments[1]instanceof se){var a=arguments[0],u=arguments[1],l=arguments[2];r.prototype.query.call(this,a,u,l)}else if(nt(arguments[2],zn)&&arguments[0]instanceof Object&&arguments[1]instanceof se){var c=arguments[0],h=arguments[1],f=arguments[2];r.prototype.query.call(this,c,h,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){ct.isTrue(!i.isEmpty());var o=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),a=new G(i);qn.sort(a,e.xComparator);var u=this.verticalSlices(a,Math.trunc(Math.ceil(Math.sqrt(o))));return this.createParentBoundablesFromVerticalSlices(u,s)},e.prototype.nearestNeighbour=function(){if(arguments.length===1){if(nt(arguments[0],ga)){var i=arguments[0],s=new te(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(s)}else if(arguments[0]instanceof te){var o=arguments[0];return this.nearestNeighbour(o,ot.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof e&&nt(arguments[1],ga)){var a=arguments[0],u=arguments[1],l=new te(this.getRoot(),a.getRoot(),u);return this.nearestNeighbour(l)}else if(arguments[0]instanceof te&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],f=h,p=null,m=new di;for(m.add(c);!m.isEmpty()&&f>0;){var w=m.poll(),E=w.getDistance();if(E>=f)break;w.isLeaves()?(f=E,p=w):w.expandToQueue(m,f)}return[p.getBoundable(0).getItem(),p.getBoundable(1).getItem()]}}else if(arguments.length===3){var b=arguments[0],v=arguments[1],y=arguments[2],_=new Wn(b,v),C=new te(this.getRoot(),_,y);return this.nearestNeighbour(C)[0]}},e.prototype.interfaces_=function(){return[eo,Pn]},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 Um},t.serialVersionUID.get=function(){return 0x39920f7d5f261e0},t.xComparator.get=function(){return{interfaces_:function(){return[ea]},compare:function(n,i){return r.compareDoubles(e.centreX(n.getBounds()),e.centreX(i.getBounds()))}}},t.yComparator.get=function(){return{interfaces_:function(){return[ea]},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})(he),Um=(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 H(s.getBounds()):n.expandToInclude(s.getBounds())}return n},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(se),qe=function(){};qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe},qe.relativeSign=function(e,t){return e<t?-1:e>t?1:0},qe.compare=function(e,t,n){if(t.equals2D(n))return 0;var i=qe.relativeSign(t.x,n.x),s=qe.relativeSign(t.y,n.y);switch(e){case 0:return qe.compareValue(i,s);case 1:return qe.compareValue(s,i);case 2:return qe.compareValue(s,-i);case 3:return qe.compareValue(-i,s);case 4:return qe.compareValue(-i,-s);case 5:return qe.compareValue(-s,-i);case 6:return qe.compareValue(-s,i);case 7:return qe.compareValue(i,-s)}return ct.shouldNeverReachHere("invalid octant value"),0},qe.compareValue=function(e,t){return e<0?-1:e>0?1:t<0?-1:t>0?1:0};var ji=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 x(t),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!t.equals2D(e.getCoordinate(n))};ji.prototype.getCoordinate=function(){return this.coord},ji.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex)},ji.prototype.compareTo=function(e){var t=e;return this.segmentIndex<t.segmentIndex?-1:this.segmentIndex>t.segmentIndex?1:this.coord.equals2D(t.coord)?0:qe.compare(this._segmentOctant,this.coord,t.coord)},ji.prototype.isEndPoint=function(e){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===e},ji.prototype.isInterior=function(){return this._isInterior},ji.prototype.interfaces_=function(){return[bn]},ji.prototype.getClass=function(){return ji};var Ae=function(){this._nodeMap=new xe,this._edge=null;var e=arguments[0];this._edge=e};Ae.prototype.getSplitCoordinates=function(){var e=this,t=new Bu;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()},Ae.prototype.addCollapsedNodes=function(){var e=this,t=new G;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)}},Ae.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();){var n=t.next();n.print(e)}},Ae.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 Qn(n+1))}},Ae.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 x(e.coord),!1);for(var a=e.segmentIndex+1;a<=t.segmentIndex;a++)n.add(i._edge.getCoordinate(a));o&&n.add(new x(t.coord))},Ae.prototype.iterator=function(){return this._nodeMap.values().iterator()},Ae.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}},Ae.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},Ae.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 Qn(n[0])),s=o}},Ae.prototype.getEdge=function(){return this._edge},Ae.prototype.addEndpoints=function(){var e=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(e),e)},Ae.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),u=0;a[u++]=new x(e.coord);for(var l=e.segmentIndex+1;l<=t.segmentIndex;l++)a[u++]=n._edge.getCoordinate(l);return o&&(a[u]=new x(t.coord)),new Zt(a,this._edge.getData())},Ae.prototype.add=function(e,t){var n=new ji(this._edge,e,t,this._edge.getSegmentOctant(t)),i=this._nodeMap.get(n);return i!==null?(ct.isTrue(i.coord.equals2D(e),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(n,n),n)},Ae.prototype.checkSplitEdgesCorrectness=function(e){var t=this._edge.getCoordinates(),n=e.get(0),i=n.getCoordinate(0);if(!i.equals2D(t[0]))throw new si("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 si("bad split edge end point at "+a)},Ae.prototype.interfaces_=function(){return[]},Ae.prototype.getClass=function(){return Ae};var no=function(){};no.prototype.interfaces_=function(){return[]},no.prototype.getClass=function(){return no},no.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 Vt("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 x&&arguments[1]instanceof x){var s=arguments[0],o=arguments[1],a=o.x-s.x,u=o.y-s.y;if(a===0&&u===0)throw new Vt("Cannot compute the octant for two identical points "+s);return no.octant(a,u)}};var Ar=function(){};Ar.prototype.getCoordinates=function(){},Ar.prototype.size=function(){},Ar.prototype.getCoordinate=function(e){},Ar.prototype.isClosed=function(){},Ar.prototype.setData=function(e){},Ar.prototype.getData=function(){},Ar.prototype.interfaces_=function(){return[]},Ar.prototype.getClass=function(){return Ar};var Yu=function(){};Yu.prototype.addIntersection=function(e,t){},Yu.prototype.interfaces_=function(){return[Ar]},Yu.prototype.getClass=function(){return Yu};var Zt=function(){this._nodeList=new Ae(this),this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};Zt.prototype.getCoordinates=function(){return this._pts},Zt.prototype.size=function(){return this._pts.length},Zt.prototype.getCoordinate=function(e){return this._pts[e]},Zt.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Zt.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(e),this.getCoordinate(e+1))},Zt.prototype.setData=function(e){this._data=e},Zt.prototype.safeOctant=function(e,t){return e.equals2D(t)?0:no.octant(e,t)},Zt.prototype.getData=function(){return this._data},Zt.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 x(n.getIntersection(s));this.addIntersection(o,i)}},Zt.prototype.toString=function(){return jn.toLineString(new Jt(this._pts))},Zt.prototype.getNodeList=function(){return this._nodeList},Zt.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},Zt.prototype.addIntersections=function(e,t,n){for(var i=this,s=0;s<e.getIntersectionNum();s++)i.addIntersection(e,t,n,s)},Zt.prototype.interfaces_=function(){return[Yu]},Zt.prototype.getClass=function(){return Zt},Zt.getNodedSubstrings=function(){if(arguments.length===1){var e=arguments[0],t=new G;return Zt.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 Y=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new x,this.p1=new x;else if(arguments.length===1){var e=arguments[0];this.p0=new x(e.p0),this.p1=new x(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 x(t,n),this.p1=new x(i,s)}},Gm={serialVersionUID:{configurable:!0}};Y.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},Y.prototype.orientationIndex=function(){if(arguments[0]instanceof Y){var e=arguments[0],t=W.orientationIndex(this.p0,this.p1,e.p0),n=W.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 x){var i=arguments[0];return W.orientationIndex(this.p0,this.p1,i)}},Y.prototype.toGeometry=function(e){return e.createLineString([this.p0,this.p1])},Y.prototype.isVertical=function(){return this.p0.x===this.p1.x},Y.prototype.equals=function(e){if(!(e instanceof Y))return!1;var t=e;return this.p0.equals(t.p0)&&this.p1.equals(t.p1)},Y.prototype.intersection=function(e){var t=new cs;return t.computeIntersection(this.p0,this.p1,e.p0,e.p1),t.hasIntersection()?t.getIntersection(0):null},Y.prototype.project=function(){if(arguments[0]instanceof x){var e=arguments[0];if(e.equals(this.p0)||e.equals(this.p1))return new x(e);var t=this.projectionFactor(e),n=new x;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 Y){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 u=this.project(i.p1);return o<0&&(u=this.p0),o>1&&(u=this.p1),new Y(a,u)}},Y.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},Y.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},Y.prototype.getCoordinate=function(e){return e===0?this.p0:this.p1},Y.prototype.distancePerpendicular=function(e){return W.distancePointLinePerpendicular(e,this.p0,this.p1)},Y.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},Y.prototype.midPoint=function(){return Y.midPoint(this.p0,this.p1)},Y.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 ot.NaN;var s=((e.x-this.p0.x)*t+(e.y-this.p0.y)*n)/i;return s},Y.prototype.closestPoints=function(e){var t=this.intersection(e);if(t!==null)return[t,t];var n=new Array(2).fill(null),i=ot.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 u=e.closestPoint(this.p0);s=u.distance(this.p0),s<i&&(i=s,n[0]=this.p0,n[1]=u);var l=e.closestPoint(this.p1);return s=l.distance(this.p1),s<i&&(i=s,n[0]=this.p1,n[1]=l),n},Y.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},Y.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},Y.prototype.getLength=function(){return this.p0.distance(this.p1)},Y.prototype.compareTo=function(e){var t=e,n=this.p0.compareTo(t.p0);return n!==0?n:this.p1.compareTo(t.p1)},Y.prototype.reverse=function(){var e=this.p0;this.p0=this.p1,this.p1=e},Y.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)},Y.prototype.lineIntersection=function(e){try{var t=Bn.intersection(this.p0,this.p1,e.p0,e.p1);return t}catch(n){if(!(n instanceof ra))throw n}finally{}return null},Y.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},Y.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),u=0,l=0;if(t!==0){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");u=t*s/a,l=t*o/a}var c=n-l,h=i+u,f=new x(c,h);return f},Y.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}},Y.prototype.segmentFraction=function(e){var t=this.projectionFactor(e);return t<0?t=0:(t>1||ot.isNaN(t))&&(t=1),t},Y.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},Y.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},Y.prototype.distance=function(){if(arguments[0]instanceof Y){var e=arguments[0];return W.distanceLineLine(this.p0,this.p1,e.p0,e.p1)}else if(arguments[0]instanceof x){var t=arguments[0];return W.distancePointLine(t,this.p0,this.p1)}},Y.prototype.pointAlong=function(e){var t=new x;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},Y.prototype.hashCode=function(){var e=ot.doubleToLongBits(this.p0.x);e^=ot.doubleToLongBits(this.p0.y)*31;var t=Math.trunc(e)^Math.trunc(e>>32),n=ot.doubleToLongBits(this.p1.x);n^=ot.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(n)^Math.trunc(n>>32);return t^i},Y.prototype.interfaces_=function(){return[bn,Pn]},Y.prototype.getClass=function(){return Y},Y.midPoint=function(e,t){return new x((e.x+t.x)/2,(e.y+t.y)/2)},Gm.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(Y,Gm);var Ju=function(){this.tempEnv1=new H,this.tempEnv2=new H,this._overlapSeg1=new Y,this._overlapSeg2=new Y};Ju.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)}}},Ju.prototype.interfaces_=function(){return[]},Ju.prototype.getClass=function(){return Ju};var rn=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};rn.prototype.getLineSegment=function(e,t){t.p0=this._pts[e],t.p1=this._pts[e+1]},rn.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)},rn.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},rn.prototype.computeOverlaps=function(e,t){this.computeOverlapsInternal(this._start,this._end,e,e._start,e._end,t)},rn.prototype.setId=function(e){this._id=e},rn.prototype.select=function(e,t){this.computeSelect(e,this._start,this._end,t)},rn.prototype.getEnvelope=function(){if(this._env===null){var e=this._pts[this._start],t=this._pts[this._end];this._env=new H(e,t)}return this._env},rn.prototype.getEndIndex=function(){return this._end},rn.prototype.getStartIndex=function(){return this._start},rn.prototype.getContext=function(){return this._context},rn.prototype.getId=function(){return this._id},rn.prototype.computeOverlapsInternal=function(e,t,n,i,s,o){var a=this._pts[e],u=this._pts[t],l=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,u),o.tempEnv2.init(l,c),!o.tempEnv1.intersects(o.tempEnv2))return null;var h=Math.trunc((e+t)/2),f=Math.trunc((i+s)/2);e<h&&(i<f&&this.computeOverlapsInternal(e,h,n,i,f,o),f<s&&this.computeOverlapsInternal(e,h,n,f,s,o)),h<t&&(i<f&&this.computeOverlapsInternal(h,t,n,i,f,o),f<s&&this.computeOverlapsInternal(h,t,n,f,s,o))},rn.prototype.interfaces_=function(){return[]},rn.prototype.getClass=function(){return rn};var ur=function(){};ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur},ur.getChainStartIndices=function(e){var t=0,n=new G;n.add(new Qn(t));do{var i=ur.findChainEnd(e,t);n.add(new Qn(i)),t=i}while(t<e.length-1);var s=ur.toIntArray(n);return s},ur.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=Nt.quadrant(e[n],e[n+1]),s=t+1;s<e.length;){if(!e[s-1].equals2D(e[s])){var o=Nt.quadrant(e[s-1],e[s]);if(o!==i)break}s++}return s-1},ur.getChains=function(){if(arguments.length===1){var e=arguments[0];return ur.getChains(e,null)}else if(arguments.length===2){for(var t=arguments[0],n=arguments[1],i=new G,s=ur.getChainStartIndices(t),o=0;o<s.length-1;o++){var a=new rn(t,s[o],s[o+1],n);i.add(a)}return i}},ur.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 ps=function(){};ps.prototype.computeNodes=function(e){},ps.prototype.getNodedSubstrings=function(){},ps.prototype.interfaces_=function(){return[]},ps.prototype.getClass=function(){return ps};var Zu=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this.setSegmentIntersector(e)}}};Zu.prototype.setSegmentIntersector=function(e){this._segInt=e},Zu.prototype.interfaces_=function(){return[ps]},Zu.prototype.getClass=function(){return Zu};var md=(function(r){function e(n){n?r.call(this,n):r.call(this),this._monoChains=new G,this._index=new zm,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 Zt.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(i){for(var s=this,o=ur.getChains(i.getCoordinates(),i),a=o.iterator();a.hasNext();){var u=a.next();u.setId(s._idCounter++),s._index.insert(u.getEnvelope(),u),s._monoChains.add(u)}},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 Wm(this._segInt),o=this._monoChains.iterator();o.hasNext();)for(var a=o.next(),u=i._index.query(a.getEnvelope()),l=u.iterator();l.hasNext();){var c=l.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 Wm},Object.defineProperties(e,t),e})(Zu),Wm=(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(),u=s.getContext();this._si.processIntersections(a,i,u,o)}else return r.prototype.overlap.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(Ju),Pt=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)}}},fi={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}};Pt.prototype.getEndCapStyle=function(){return this._endCapStyle},Pt.prototype.isSingleSided=function(){return this._isSingleSided},Pt.prototype.setQuadrantSegments=function(e){this._quadrantSegments=e,this._quadrantSegments===0&&(this._joinStyle=Pt.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Pt.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),e<=0&&(this._quadrantSegments=1),this._joinStyle!==Pt.JOIN_ROUND&&(this._quadrantSegments=Pt.DEFAULT_QUADRANT_SEGMENTS)},Pt.prototype.getJoinStyle=function(){return this._joinStyle},Pt.prototype.setJoinStyle=function(e){this._joinStyle=e},Pt.prototype.setSimplifyFactor=function(e){this._simplifyFactor=e<0?0:e},Pt.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Pt.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Pt.prototype.setEndCapStyle=function(e){this._endCapStyle=e},Pt.prototype.getMitreLimit=function(){return this._mitreLimit},Pt.prototype.setMitreLimit=function(e){this._mitreLimit=e},Pt.prototype.setSingleSided=function(e){this._isSingleSided=e},Pt.prototype.interfaces_=function(){return[]},Pt.prototype.getClass=function(){return Pt},Pt.bufferDistanceError=function(e){var t=Math.PI/2/e;return 1-Math.cos(t/2)},fi.CAP_ROUND.get=function(){return 1},fi.CAP_FLAT.get=function(){return 2},fi.CAP_SQUARE.get=function(){return 3},fi.JOIN_ROUND.get=function(){return 1},fi.JOIN_MITRE.get=function(){return 2},fi.JOIN_BEVEL.get=function(){return 3},fi.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},fi.DEFAULT_MITRE_LIMIT.get=function(){return 5},fi.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(Pt,fi);var qt=function(e){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=W.COUNTERCLOCKWISE,this._inputLine=e||null},Ku={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};qt.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)},qt.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]=qt.DELETE,o=!0,s=!0),o?t=i:t=n,n=e.findNextNonDeletedIndex(t),i=e.findNextNonDeletedIndex(n)}return s},qt.prototype.isShallowConcavity=function(e,t,n,i){var s=W.computeOrientation(e,t,n),o=s===this._angleOrientation;if(!o)return!1;var a=W.distancePointLine(t,e,n);return a<i},qt.prototype.isShallowSampled=function(e,t,n,i,s){var o=this,a=Math.trunc((i-n)/qt.NUM_PTS_TO_CHECK);a<=0&&(a=1);for(var u=n;u<i;u+=a)if(!o.isShallow(e,t,o._inputLine[u],s))return!1;return!0},qt.prototype.isConcave=function(e,t,n){var i=W.computeOrientation(e,t,n),s=i===this._angleOrientation;return s},qt.prototype.simplify=function(e){var t=this;this._distanceTol=Math.abs(e),e<0&&(this._angleOrientation=W.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var n=!1;do n=t.deleteShallowConcavities();while(n);return this.collapseLine()},qt.prototype.findNextNonDeletedIndex=function(e){for(var t=e+1;t<this._inputLine.length&&this._isDeleted[t]===qt.DELETE;)t++;return t},qt.prototype.isShallow=function(e,t,n,i){var s=W.distancePointLine(t,e,n);return s<i},qt.prototype.collapseLine=function(){for(var e=this,t=new Bu,n=0;n<this._inputLine.length;n++)e._isDeleted[n]!==qt.DELETE&&t.add(e._inputLine[n]);return t.toCoordinateArray()},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.simplify=function(e,t){var n=new qt(e);return n.simplify(t)},Ku.INIT.get=function(){return 0},Ku.DELETE.get=function(){return 1},Ku.KEEP.get=function(){return 1},Ku.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(qt,Ku);var yn=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new G},qm={COORDINATE_ARRAY_TYPE:{configurable:!0}};yn.prototype.getCoordinates=function(){var e=this._ptList.toArray(yn.COORDINATE_ARRAY_TYPE);return e},yn.prototype.setPrecisionModel=function(e){this._precisionModel=e},yn.prototype.addPt=function(e){var t=new x(e);if(this._precisionModel.makePrecise(t),this.isRedundant(t))return null;this._ptList.add(t)},yn.prototype.revere=function(){},yn.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])},yn.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},yn.prototype.toString=function(){var e=new pt,t=e.createLineString(this.getCoordinates());return t.toString()},yn.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var e=new x(this._ptList.get(0)),t=this._ptList.get(this._ptList.size()-1);if(e.equals(t))return null;this._ptList.add(e)},yn.prototype.setMinimumVertexDistance=function(e){this._minimimVertexDistance=e},yn.prototype.interfaces_=function(){return[]},yn.prototype.getClass=function(){return yn},qm.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(yn,qm);var vt=function(){},ro={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};vt.prototype.interfaces_=function(){return[]},vt.prototype.getClass=function(){return vt},vt.toDegrees=function(e){return e*180/Math.PI},vt.normalize=function(e){for(;e>Math.PI;)e-=vt.PI_TIMES_2;for(;e<=-Math.PI;)e+=vt.PI_TIMES_2;return e},vt.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)}},vt.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,u=i*o+s*a;return u>0},vt.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,u=i*o+s*a;return u<0},vt.interiorAngle=function(e,t,n){var i=vt.angle(t,e),s=vt.angle(t,n);return Math.abs(s-i)},vt.normalizePositive=function(e){if(e<0){for(;e<0;)e+=vt.PI_TIMES_2;e>=vt.PI_TIMES_2&&(e=0)}else{for(;e>=vt.PI_TIMES_2;)e-=vt.PI_TIMES_2;e<0&&(e=0)}return e},vt.angleBetween=function(e,t,n){var i=vt.angle(t,e),s=vt.angle(t,n);return vt.diff(i,s)},vt.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},vt.toRadians=function(e){return e*Math.PI/180},vt.getTurn=function(e,t){var n=Math.sin(t-e);return n>0?vt.COUNTERCLOCKWISE:n<0?vt.CLOCKWISE:vt.NONE},vt.angleBetweenOriented=function(e,t,n){var i=vt.angle(t,e),s=vt.angle(t,n),o=s-i;return o<=-Math.PI?o+vt.PI_TIMES_2:o>Math.PI?o-vt.PI_TIMES_2:o},ro.PI_TIMES_2.get=function(){return 2*Math.PI},ro.PI_OVER_2.get=function(){return Math.PI/2},ro.PI_OVER_4.get=function(){return Math.PI/4},ro.COUNTERCLOCKWISE.get=function(){return W.COUNTERCLOCKWISE},ro.CLOCKWISE.get=function(){return W.CLOCKWISE},ro.NONE.get=function(){return W.COLLINEAR},Object.defineProperties(vt,ro);var Lt=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 Y,this._seg1=new Y,this._offset0=new Y,this._offset1=new Y,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 cs,this._filletAngleQuantum=Math.PI/2/t.getQuadrantSegments(),t.getQuadrantSegments()>=8&&t.getJoinStyle()===Pt.JOIN_ROUND&&(this._closingSegLengthFactor=r.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)},Qu={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}};Lt.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=W.computeOrientation(this._s0,this._s1,this._s2),i=n===W.CLOCKWISE&&this._side===z.LEFT||n===W.COUNTERCLOCKWISE&&this._side===z.RIGHT;n===0?this.addCollinear(t):i?this.addOutsideTurn(n,t):this.addInsideTurn(n,t)},Lt.prototype.addLineEndCap=function(e,t){var n=new Y(e,t),i=new Y;this.computeOffsetSegment(n,z.LEFT,this._distance,i);var s=new Y;this.computeOffsetSegment(n,z.RIGHT,this._distance,s);var o=t.x-e.x,a=t.y-e.y,u=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case Pt.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(t,u+Math.PI/2,u-Math.PI/2,W.CLOCKWISE,this._distance),this._segList.addPt(s.p1);break;case Pt.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(s.p1);break;case Pt.CAP_SQUARE:var l=new x;l.x=Math.abs(this._distance)*Math.cos(u),l.y=Math.abs(this._distance)*Math.sin(u);var c=new x(i.p1.x+l.x,i.p1.y+l.y),h=new x(s.p1.x+l.x,s.p1.y+l.y);this._segList.addPt(c),this._segList.addPt(h);break}},Lt.prototype.getCoordinates=function(){var e=this._segList.getCoordinates();return e},Lt.prototype.addMitreJoin=function(e,t,n,i){var s=!0,o=null;try{o=Bn.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(u){if(u instanceof ra)o=new x(0,0),s=!1;else throw u}finally{}s?this._segList.addPt(o):this.addLimitedMitreJoin(t,n,i,this._bufParams.getMitreLimit())},Lt.prototype.addFilletCorner=function(e,t,n,i,s){var o=t.x-e.x,a=t.y-e.y,u=Math.atan2(a,o),l=n.x-e.x,c=n.y-e.y,h=Math.atan2(c,l);i===W.CLOCKWISE?u<=h&&(u+=2*Math.PI):u>=h&&(u-=2*Math.PI),this._segList.addPt(t),this.addFilletArc(e,u,h,i,s),this._segList.addPt(n)},Lt.prototype.addOutsideTurn=function(e,t){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Lt.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===Pt.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===Pt.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))},Lt.prototype.createSquare=function(e){this._segList.addPt(new x(e.x+this._distance,e.y+this._distance)),this._segList.addPt(new x(e.x+this._distance,e.y-this._distance)),this._segList.addPt(new x(e.x-this._distance,e.y-this._distance)),this._segList.addPt(new x(e.x-this._distance,e.y+this._distance)),this._segList.closeRing()},Lt.prototype.addSegments=function(e,t){this._segList.addPts(e,t)},Lt.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Lt.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Lt.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)},Lt.prototype.addLimitedMitreJoin=function(e,t,n,i){var s=this._seg0.p1,o=vt.angle(s,this._seg0.p0),a=vt.angleBetweenOriented(this._seg0.p0,s,this._seg1.p1),u=a/2,l=vt.normalize(o+u),c=vt.normalize(l+Math.PI),h=i*n,f=h*Math.abs(Math.sin(u)),p=n-f,m=s.x+h*Math.cos(c),w=s.y+h*Math.sin(c),E=new x(m,w),b=new Y(s,E),v=b.pointAlongOffset(1,p),y=b.pointAlongOffset(1,-p);this._side===z.LEFT?(this._segList.addPt(v),this._segList.addPt(y)):(this._segList.addPt(y),this._segList.addPt(v))},Lt.prototype.computeOffsetSegment=function(e,t,n,i){var s=t===z.LEFT?1:-1,o=e.p1.x-e.p0.x,a=e.p1.y-e.p0.y,u=Math.sqrt(o*o+a*a),l=s*n*o/u,c=s*n*a/u;i.p0.x=e.p0.x-c,i.p0.y=e.p0.y+l,i.p1.x=e.p1.x-c,i.p1.y=e.p1.y+l},Lt.prototype.addFilletArc=function(e,t,n,i,s){var o=this,a=i===W.CLOCKWISE?-1:1,u=Math.abs(t-n),l=Math.trunc(u/this._filletAngleQuantum+.5);if(l<1)return null;for(var c=0,h=u/l,f=c,p=new x;f<u;){var m=t+a*f;p.x=e.x+s*Math.cos(m),p.y=e.y+s*Math.sin(m),o._segList.addPt(p),f+=h}},Lt.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*Lt.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 x((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 x((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)}},Lt.prototype.createCircle=function(e){var t=new x(e.x+this._distance,e.y);this._segList.addPt(t),this.addFilletArc(e,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Lt.prototype.addBevelJoin=function(e,t){this._segList.addPt(e.p1),this._segList.addPt(t.p0)},Lt.prototype.init=function(e){this._distance=e,this._maxCurveSegmentError=e*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new yn,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(e*Lt.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Lt.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()===Pt.JOIN_BEVEL||this._bufParams.getJoinStyle()===Pt.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,W.CLOCKWISE,this._distance))},Lt.prototype.closeRing=function(){this._segList.closeRing()},Lt.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Lt.prototype.interfaces_=function(){return[]},Lt.prototype.getClass=function(){return Lt},Qu.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},Qu.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},Qu.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Qu.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Lt,Qu);var Xe=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var e=arguments[0],t=arguments[1];this._precisionModel=e,this._bufParams=t};Xe.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&&ft.reverse(o),o},Xe.prototype.computeSingleSidedBufferCurve=function(e,t,n){var i=this.simplifyTolerance(this._distance);if(t){n.addSegments(e,!0);var s=qt.simplify(e,-i),o=s.length-1;n.initSideSegments(s[o],s[o-1],z.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(s[a],!0)}else{n.addSegments(e,!1);var u=qt.simplify(e,i),l=u.length-1;n.initSideSegments(u[0],u[1],z.LEFT),n.addFirstSegment();for(var c=2;c<=l;c++)n.addNextSegment(u[c],!0)}n.addLastSegment(),n.closeRing()},Xe.prototype.computeRingBufferCurve=function(e,t,n){var i=this.simplifyTolerance(this._distance);t===z.RIGHT&&(i=-i);var s=qt.simplify(e,i),o=s.length-1;n.initSideSegments(s[o-1],s[0],t);for(var a=1;a<=o;a++){var u=a!==1;n.addNextSegment(s[a],u)}n.closeRing()},Xe.prototype.computeLineBufferCurve=function(e,t){var n=this.simplifyTolerance(this._distance),i=qt.simplify(e,n),s=i.length-1;t.initSideSegments(i[0],i[1],z.LEFT);for(var o=2;o<=s;o++)t.addNextSegment(i[o],!0);t.addLastSegment(),t.addLineEndCap(i[s-1],i[s]);var a=qt.simplify(e,-n),u=a.length-1;t.initSideSegments(a[u],a[u-1],z.LEFT);for(var l=u-2;l>=0;l--)t.addNextSegment(a[l],!0);t.addLastSegment(),t.addLineEndCap(a[1],a[0]),t.closeRing()},Xe.prototype.computePointCurve=function(e,t){switch(this._bufParams.getEndCapStyle()){case Pt.CAP_ROUND:t.createCircle(e);break;case Pt.CAP_SQUARE:t.createSquare(e);break}},Xe.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},Xe.prototype.getBufferParameters=function(){return this._bufParams},Xe.prototype.simplifyTolerance=function(e){return e*this._bufParams.getSimplifyFactor()},Xe.prototype.getRingCurve=function(e,t,n){if(this._distance=n,e.length<=2)return this.getLineCurve(e,n);if(n===0)return Xe.copyCoordinates(e);var i=this.getSegGen(n);return this.computeRingBufferCurve(e,t,i),i.getCoordinates()},Xe.prototype.computeOffsetCurve=function(e,t,n){var i=this.simplifyTolerance(this._distance);if(t){var s=qt.simplify(e,-i),o=s.length-1;n.initSideSegments(s[o],s[o-1],z.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(s[a],!0)}else{var u=qt.simplify(e,i),l=u.length-1;n.initSideSegments(u[0],u[1],z.LEFT),n.addFirstSegment();for(var c=2;c<=l;c++)n.addNextSegment(u[c],!0)}n.addLastSegment()},Xe.prototype.getSegGen=function(e){return new Lt(this._precisionModel,this._bufParams,e)},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe},Xe.copyCoordinates=function(e){for(var t=new Array(e.length).fill(null),n=0;n<t.length;n++)t[n]=new x(e[n]);return t};var io=function(){this._subgraphs=null,this._seg=new Y,this._cga=new W;var e=arguments[0];this._subgraphs=e},Xm={DepthSegment:{configurable:!0}};io.prototype.findStabbedSegments=function(){var e=this;if(arguments.length===1){for(var t=arguments[0],n=new G,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(nt(arguments[2],zn)&&arguments[0]instanceof x&&arguments[1]instanceof gd)for(var a=arguments[0],u=arguments[1],l=arguments[2],c=u.getEdge().getCoordinates(),h=0;h<c.length-1;h++){e._seg.p0=c[h],e._seg.p1=c[h+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)&&W.computeOrientation(e._seg.p0,e._seg.p1,a)!==W.RIGHT){var p=u.getDepth(z.LEFT);e._seg.p0.equals(c[h])||(p=u.getDepth(z.RIGHT));var m=new gs(e._seg,p);l.add(m)}}else if(nt(arguments[2],zn)&&arguments[0]instanceof x&&nt(arguments[1],zn))for(var w=arguments[0],E=arguments[1],b=arguments[2],v=E.iterator();v.hasNext();){var y=v.next();y.isForward()&&e.findStabbedSegments(w,y,b)}}},io.prototype.getDepth=function(e){var t=this.findStabbedSegments(e);if(t.size()===0)return 0;var n=qn.min(t);return n._leftDepth},io.prototype.interfaces_=function(){return[]},io.prototype.getClass=function(){return io},Xm.DepthSegment.get=function(){return gs},Object.defineProperties(io,Xm);var gs=function(){this._upwardSeg=null,this._leftDepth=null;var e=arguments[0],t=arguments[1];this._upwardSeg=new Y(e),this._leftDepth=t};gs.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)},gs.prototype.compareX=function(e,t){var n=e.p0.compareTo(t.p0);return n!==0?n:e.p1.compareTo(t.p1)},gs.prototype.toString=function(){return this._upwardSeg.toString()},gs.prototype.interfaces_=function(){return[bn]},gs.prototype.getClass=function(){return gs};var It=function(e,t,n){this.p0=e||null,this.p1=t||null,this.p2=n||null};It.prototype.area=function(){return It.area(this.p0,this.p1,this.p2)},It.prototype.signedArea=function(){return It.signedArea(this.p0,this.p1,this.p2)},It.prototype.interpolateZ=function(e){if(e===null)throw new Vt("Supplied point is null.");return It.interpolateZ(e,this.p0,this.p1,this.p2)},It.prototype.longestSideLength=function(){return It.longestSideLength(this.p0,this.p1,this.p2)},It.prototype.isAcute=function(){return It.isAcute(this.p0,this.p1,this.p2)},It.prototype.circumcentre=function(){return It.circumcentre(this.p0,this.p1,this.p2)},It.prototype.area3D=function(){return It.area3D(this.p0,this.p1,this.p2)},It.prototype.centroid=function(){return It.centroid(this.p0,this.p1,this.p2)},It.prototype.inCentre=function(){return It.inCentre(this.p0,this.p1,this.p2)},It.prototype.interfaces_=function(){return[]},It.prototype.getClass=function(){return It},It.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)},It.signedArea=function(e,t,n){return((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2},It.det=function(e,t,n,i){return e*i-t*n},It.interpolateZ=function(e,t,n,i){var s=t.x,o=t.y,a=n.x-s,u=i.x-s,l=n.y-o,c=i.y-o,h=a*c-u*l,f=e.x-s,p=e.y-o,m=(c*f-u*p)/h,w=(-l*f+a*p)/h,E=t.z+m*(n.z-t.z)+w*(i.z-t.z);return E},It.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},It.isAcute=function(e,t,n){return!(!vt.isAcute(e,t,n)||!vt.isAcute(t,n,e)||!vt.isAcute(n,e,t))},It.circumcentre=function(e,t,n){var i=n.x,s=n.y,o=e.x-i,a=e.y-s,u=t.x-i,l=t.y-s,c=2*It.det(o,a,u,l),h=It.det(a,o*o+a*a,l,u*u+l*l),f=It.det(o,o*o+a*a,u,u*u+l*l),p=i-h/c,m=s+f/c;return new x(p,m)},It.perpendicularBisector=function(e,t){var n=t.x-e.x,i=t.y-e.y,s=new Bn(e.x+n/2,e.y+i/2,1),o=new Bn(e.x-i+n/2,e.y+n+i/2,1);return new Bn(s,o)},It.angleBisector=function(e,t,n){var i=t.distance(e),s=t.distance(n),o=i/(i+s),a=n.x-e.x,u=n.y-e.y,l=new x(e.x+o*a,e.y+o*u);return l},It.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,u=n.y-e.y,l=n.z-e.z,c=s*l-o*u,h=o*a-i*l,f=i*u-s*a,p=c*c+h*h+f*f,m=Math.sqrt(p)/2;return m},It.centroid=function(e,t,n){var i=(e.x+t.x+n.x)/3,s=(e.y+t.y+n.y)/3;return new x(i,s)},It.inCentre=function(e,t,n){var i=t.distance(n),s=e.distance(n),o=e.distance(t),a=i+s+o,u=(i*e.x+s*t.x+o*n.x)/a,l=(i*e.y+s*t.y+o*n.y)/a;return new x(u,l)};var On=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new G;var e=arguments[0],t=arguments[1],n=arguments[2];this._inputGeom=e,this._distance=t,this._curveBuilder=n};On.prototype.addPoint=function(e){if(this._distance<=0)return null;var t=e.getCoordinates(),n=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(n,D.EXTERIOR,D.INTERIOR)},On.prototype.addPolygon=function(e){var t=this,n=this._distance,i=z.LEFT;this._distance<0&&(n=-this._distance,i=z.RIGHT);var s=e.getExteriorRing(),o=ft.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,D.EXTERIOR,D.INTERIOR);for(var a=0;a<e.getNumInteriorRing();a++){var u=e.getInteriorRingN(a),l=ft.removeRepeatedPoints(u.getCoordinates());t._distance>0&&t.isErodedCompletely(u,-t._distance)||t.addPolygonRing(l,n,z.opposite(i),D.INTERIOR,D.EXTERIOR)}},On.prototype.isTriangleErodedCompletely=function(e,t){var n=new It(e[0],e[1],e[2]),i=n.inCentre(),s=W.distancePointLine(i,n.p0,n.p1);return s<Math.abs(t)},On.prototype.addLineString=function(e){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var t=ft.removeRepeatedPoints(e.getCoordinates()),n=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(n,D.EXTERIOR,D.INTERIOR)},On.prototype.addCurve=function(e,t,n){if(e===null||e.length<2)return null;var i=new Zt(e,new Tt(0,D.BOUNDARY,t,n));this._curveList.add(i)},On.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},On.prototype.addPolygonRing=function(e,t,n,i,s){if(t===0&&e.length<Mr.MINIMUM_VALID_SIZE)return null;var o=i,a=s;e.length>=Mr.MINIMUM_VALID_SIZE&&W.isCCW(e)&&(o=s,a=i,n=z.opposite(n));var u=this._curveBuilder.getRingCurve(e,n,t);this.addCurve(u,o,a)},On.prototype.add=function(e){if(e.isEmpty())return null;e instanceof ie?this.addPolygon(e):e instanceof Wt?this.addLineString(e):e instanceof en?this.addPoint(e):e instanceof da?this.addCollection(e):e instanceof fs?this.addCollection(e):e instanceof Rr?this.addCollection(e):e instanceof Re&&this.addCollection(e)},On.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},On.prototype.addCollection=function(e){for(var t=this,n=0;n<e.getNumGeometries();n++){var i=e.getGeometryN(n);t.add(i)}},On.prototype.interfaces_=function(){return[]},On.prototype.getClass=function(){return On};var ma=function(){};ma.prototype.locate=function(e){},ma.prototype.interfaces_=function(){return[]},ma.prototype.getClass=function(){return ma};var Fr=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()};Fr.prototype.next=function(){if(this._atStart)return this._atStart=!1,Fr.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 ca;var e=this._parent.getGeometryN(this._index++);return e instanceof Re?(this._subcollectionIterator=new Fr(e),this._subcollectionIterator.next()):e},Fr.prototype.remove=function(){throw new Error(this.getClass().getName())},Fr.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)},Fr.prototype.interfaces_=function(){return[la]},Fr.prototype.getClass=function(){return Fr},Fr.isAtomic=function(e){return!(e instanceof Re)};var _n=function(){this._geom=null;var e=arguments[0];this._geom=e};_n.prototype.locate=function(e){return _n.locate(e,this._geom)},_n.prototype.interfaces_=function(){return[ma]},_n.prototype.getClass=function(){return _n},_n.isPointInRing=function(e,t){return t.getEnvelopeInternal().intersects(e)?W.isPointInRing(e,t.getCoordinates()):!1},_n.containsPointInPolygon=function(e,t){if(t.isEmpty())return!1;var n=t.getExteriorRing();if(!_n.isPointInRing(e,n))return!1;for(var i=0;i<t.getNumInteriorRing();i++){var s=t.getInteriorRingN(i);if(_n.isPointInRing(e,s))return!1}return!0},_n.containsPoint=function(e,t){if(t instanceof ie)return _n.containsPointInPolygon(e,t);if(t instanceof Re)for(var n=new Fr(t);n.hasNext();){var i=n.next();if(i!==t&&_n.containsPoint(e,i))return!0}return!1},_n.locate=function(e,t){return t.isEmpty()?D.EXTERIOR:_n.containsPoint(e,t)?D.INTERIOR:D.EXTERIOR};var Ne=function(){this._edgeMap=new xe,this._edgeList=null,this._ptInAreaLocation=[D.NONE,D.NONE]};Ne.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)},Ne.prototype.propagateSideLabels=function(e){for(var t=D.NONE,n=this.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();s.isArea(e)&&s.getLocation(e,z.LEFT)!==D.NONE&&(t=s.getLocation(e,z.LEFT))}if(t===D.NONE)return null;for(var o=t,a=this.iterator();a.hasNext();){var u=a.next(),l=u.getLabel();if(l.getLocation(e,z.ON)===D.NONE&&l.setLocation(e,z.ON,o),l.isArea(e)){var c=l.getLocation(e,z.LEFT),h=l.getLocation(e,z.RIGHT);if(h!==D.NONE){if(h!==o)throw new hi("side location conflict",u.getCoordinate());c===D.NONE&&ct.shouldNeverReachHere("found single null side (at "+u.getCoordinate()+")"),o=c}else ct.isTrue(l.getLocation(e,z.LEFT)===D.NONE,"found single null side"),l.setLocation(e,z.RIGHT,o),l.setLocation(e,z.LEFT,o)}}},Ne.prototype.getCoordinate=function(){var e=this.iterator();if(!e.hasNext())return null;var t=e.next();return t.getCoordinate()},Ne.prototype.print=function(e){ve.out.println("EdgeEndStar: "+this.getCoordinate());for(var t=this.iterator();t.hasNext();){var n=t.next();n.print(e)}},Ne.prototype.isAreaLabelsConsistent=function(e){return this.computeEdgeEndLabels(e.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Ne.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,z.LEFT);ct.isTrue(s!==D.NONE,"Found unlabelled area edge");for(var o=s,a=this.iterator();a.hasNext();){var u=a.next(),l=u.getLabel();ct.isTrue(l.isArea(e),"Found non-area edge");var c=l.getLocation(e,z.LEFT),h=l.getLocation(e,z.RIGHT);if(c===h||h!==o)return!1;o=c}return!0},Ne.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},Ne.prototype.iterator=function(){return this.getEdges().iterator()},Ne.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new G(this._edgeMap.values())),this._edgeList},Ne.prototype.getLocation=function(e,t,n){return this._ptInAreaLocation[e]===D.NONE&&(this._ptInAreaLocation[e]=_n.locate(t,n[e].getGeometry())),this._ptInAreaLocation[e]},Ne.prototype.toString=function(){var e=new Kn;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()},Ne.prototype.computeEdgeEndLabels=function(e){for(var t=this.iterator();t.hasNext();){var n=t.next();n.computeLabel(e)}},Ne.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)===D.BOUNDARY&&(n[a]=!0);for(var u=this.iterator();u.hasNext();)for(var l=u.next(),c=l.getLabel(),h=0;h<2;h++)if(c.isAnyNull(h)){var f=D.NONE;if(n[h])f=D.EXTERIOR;else{var p=l.getCoordinate();f=t.getLocation(h,p,e)}c.setAllLocationsIfNull(h,f)}},Ne.prototype.getDegree=function(){return this._edgeMap.size()},Ne.prototype.insertEdgeEnd=function(e,t){this._edgeMap.put(e,t),this._edgeList=null},Ne.prototype.interfaces_=function(){return[]},Ne.prototype.getClass=function(){return Ne};var uC=(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 u=n._resultAreaEdgeList.get(a),l=u.getSym();if(u.getLabel().isArea())switch(i===null&&u.isInResult()&&(i=u),o){case n._SCANNING_FOR_INCOMING:if(!l.isInResult())continue;s=l,o=n._LINKING_TO_OUTGOING;break;case n._LINKING_TO_OUTGOING:if(!u.isInResult())continue;s.setNext(u),o=n._SCANNING_FOR_INCOMING;break}}if(o===this._LINKING_TO_OUTGOING){if(i===null)throw new hi("no outgoing dirEdge found",this.getCoordinate());ct.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(),u=o.getQuadrant();return Nt.isNorthern(a)&&Nt.isNorthern(u)?s:!Nt.isNorthern(a)&&!Nt.isNorthern(u)?o:s.getDy()!==0?s:o.getDy()!==0?o:(ct.shouldNeverReachHere("found two horizontal edges incident on node"),null)},e.prototype.print=function(n){ve.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 G;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),u=a.getSym();s===null&&(s=u),i!==null&&u.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(z.LEFT),a=i.getDepth(z.RIGHT),u=this.computeDepths(s+1,this._edgeList.size(),o),l=this.computeDepths(0,s,u);if(l!==a)throw new hi("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var c=arguments[0],h=arguments[1],f=arguments[2],p=f,m=c;m<h;m++){var w=n._edgeList.get(m);w.setEdgeDepths(z.RIGHT,p),p=w.getDepth(z.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,u=this._resultAreaEdgeList.size()-1;u>=0;u--){var l=i._resultAreaEdgeList.get(u),c=l.getSym();switch(s===null&&l.getEdgeRing()===n&&(s=l),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(l.getEdgeRing()!==n)continue;o.setNextMin(l),a=i._SCANNING_FOR_INCOMING;break}}a===this._LINKING_TO_OUTGOING&&(ct.isTrue(s!==null,"found null for first outgoing dirEdge"),ct.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,u=this.iterator();u.hasNext();){var l=u.next();l.getEdgeRing()===o&&a++}return a}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var n=D.NONE,i=this.iterator();i.hasNext();){var s=i.next(),o=s.getSym();if(!s.isLineEdge()){if(s.isInResult()){n=D.INTERIOR;break}if(o.isInResult()){n=D.EXTERIOR;break}}}if(n===D.NONE)return null;for(var a=n,u=this.iterator();u.hasNext();){var l=u.next(),c=l.getSym();l.isLineEdge()?l.getEdge().setCovered(a===D.INTERIOR):(l.isInResult()&&(a=D.EXTERIOR),c.isInResult()&&(a=D.INTERIOR))}},e.prototype.computeLabelling=function(n){var i=this;r.prototype.computeLabelling.call(this,n),this._label=new Tt(D.NONE);for(var s=this.iterator();s.hasNext();)for(var o=s.next(),a=o.getEdge(),u=a.getLabel(),l=0;l<2;l++){var c=u.getLocation(l);(c===D.INTERIOR||c===D.BOUNDARY)&&i._label.setLocation(l,D.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(Ne),Hm=(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 cc(n,new uC)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(fa),zi=function r(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=r.orientation(e)};zi.prototype.compareTo=function(e){var t=e,n=zi.compareOriented(this._pts,this._orientation,t._pts,t._orientation);return n},zi.prototype.interfaces_=function(){return[bn]},zi.prototype.getClass=function(){return zi},zi.orientation=function(e){return ft.increasingDirection(e)===1},zi.compareOriented=function(e,t,n,i){for(var s=t?1:-1,o=i?1:-1,a=t?e.length:-1,u=i?n.length:-1,l=t?0:e.length-1,c=i?0:n.length-1;;){var h=e[l].compareTo(n[c]);if(h!==0)return h;l+=s,c+=o;var f=l===a,p=c===u;if(f&&!p)return-1;if(!f&&p)return 1;if(f&&p)return 0}};var Xn=function(){this._edges=new G,this._ocaMap=new xe};Xn.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(") ")},Xn.prototype.addAll=function(e){for(var t=this,n=e.iterator();n.hasNext();)t.add(n.next())},Xn.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},Xn.prototype.iterator=function(){return this._edges.iterator()},Xn.prototype.getEdges=function(){return this._edges},Xn.prototype.get=function(e){return this._edges.get(e)},Xn.prototype.findEqualEdge=function(e){var t=new zi(e.getCoordinates()),n=this._ocaMap.get(t);return n},Xn.prototype.add=function(e){this._edges.add(e);var t=new zi(e.getCoordinates());this._ocaMap.put(t,e)},Xn.prototype.interfaces_=function(){return[]},Xn.prototype.getClass=function(){return Xn};var ms=function(){};ms.prototype.processIntersections=function(e,t,n,i){},ms.prototype.isDone=function(){},ms.prototype.interfaces_=function(){return[]},ms.prototype.getClass=function(){return ms};var wn=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};wn.prototype.isTrivialIntersection=function(e,t,n,i){if(e===n&&this._li.getIntersectionNum()===1){if(wn.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},wn.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},wn.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},wn.prototype.getLineIntersector=function(){return this._li},wn.prototype.hasProperIntersection=function(){return this._hasProper},wn.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],u=n.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),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)))},wn.prototype.hasIntersection=function(){return this._hasIntersection},wn.prototype.isDone=function(){return!1},wn.prototype.hasInteriorIntersection=function(){return this._hasInterior},wn.prototype.interfaces_=function(){return[ms]},wn.prototype.getClass=function(){return wn},wn.isAdjacentSegments=function(e,t){return Math.abs(e-t)===1};var lr=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var e=arguments[0],t=arguments[1],n=arguments[2];this.coord=new x(e),this.segmentIndex=t,this.dist=n};lr.prototype.getSegmentIndex=function(){return this.segmentIndex},lr.prototype.getCoordinate=function(){return this.coord},lr.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex),e.println(" dist = "+this.dist)},lr.prototype.compareTo=function(e){var t=e;return this.compare(t.segmentIndex,t.dist)},lr.prototype.isEndPoint=function(e){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===e},lr.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},lr.prototype.getDistance=function(){return this.dist},lr.prototype.compare=function(e,t){return this.segmentIndex<e?-1:this.segmentIndex>e?1:this.dist<t?-1:this.dist>t?1:0},lr.prototype.interfaces_=function(){return[bn]},lr.prototype.getClass=function(){return lr};var kr=function(){this._nodeMap=new xe,this.edge=null;var e=arguments[0];this.edge=e};kr.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();){var n=t.next();n.print(e)}},kr.prototype.iterator=function(){return this._nodeMap.values().iterator()},kr.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}},kr.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)},kr.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),u=0;a[u++]=new x(e.coord);for(var l=e.segmentIndex+1;l<=t.segmentIndex;l++)a[u++]=n.edge.pts[l];return o&&(a[u]=t.coord),new dc(a,new Tt(this.edge._label))},kr.prototype.add=function(e,t,n){var i=new lr(e,t,n),s=this._nodeMap.get(i);return s!==null?s:(this._nodeMap.put(i,i),i)},kr.prototype.isIntersection=function(e){for(var t=this.iterator();t.hasNext();){var n=t.next();if(n.coord.equals(e))return!0}return!1},kr.prototype.interfaces_=function(){return[]},kr.prototype.getClass=function(){return kr};var vs=function(){};vs.prototype.getChainStartIndices=function(e){var t=this,n=0,i=new G;i.add(new Qn(n));do{var s=t.findChainEnd(e,n);i.add(new Qn(s)),n=s}while(n<e.length-1);var o=vs.toIntArray(i);return o},vs.prototype.findChainEnd=function(e,t){for(var n=Nt.quadrant(e[t],e[t+1]),i=t+1;i<e.length;){var s=Nt.quadrant(e[i-1],e[i]);if(s!==n)break;i++}return i-1},vs.prototype.interfaces_=function(){return[]},vs.prototype.getClass=function(){return vs},vs.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 pi=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new H,this.env2=new H;var e=arguments[0];this.e=e,this.pts=e.getCoordinates();var t=new vs;this.startIndex=t.getChainStartIndices(this.pts)};pi.prototype.getCoordinates=function(){return this.pts},pi.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},pi.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},pi.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],u=arguments[3],l=arguments[4],c=arguments[5],h=this.pts[s],f=this.pts[o],p=a.pts[u],m=a.pts[l];if(o-s===1&&l-u===1)return c.addIntersections(this.e,s,a.e,u),null;if(this.env1.init(h,f),this.env2.init(p,m),!this.env1.intersects(this.env2))return null;var w=Math.trunc((s+o)/2),E=Math.trunc((u+l)/2);s<w&&(u<E&&this.computeIntersectsForChain(s,w,a,u,E,c),E<l&&this.computeIntersectsForChain(s,w,a,E,l,c)),w<o&&(u<E&&this.computeIntersectsForChain(w,o,a,u,E,c),E<l&&this.computeIntersectsForChain(w,o,a,E,l,c))}},pi.prototype.getStartIndexes=function(){return this.startIndex},pi.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)},pi.prototype.interfaces_=function(){return[]},pi.prototype.getClass=function(){return pi};var ye=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},Ym={NULL_VALUE:{configurable:!0}};ye.prototype.getDepth=function(e,t){return this._depth[e][t]},ye.prototype.setDepth=function(e,t,n){this._depth[e][t]=n},ye.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]!==ye.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===ye.NULL_VALUE}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._depth[s][o]===ye.NULL_VALUE}},ye.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}}},ye.prototype.getDelta=function(e){return this._depth[e][z.RIGHT]-this._depth[e][z.LEFT]},ye.prototype.getLocation=function(e,t){return this._depth[e][t]<=0?D.EXTERIOR:D.INTERIOR},ye.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},ye.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===D.EXTERIOR||s===D.INTERIOR)&&(e.isNull(n,i)?e._depth[n][i]=ye.depthAtLocation(s):e._depth[n][i]+=ye.depthAtLocation(s))}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];u===D.INTERIOR&&this._depth[o][a]++}},ye.prototype.interfaces_=function(){return[]},ye.prototype.getClass=function(){return ye},ye.depthAtLocation=function(e){return e===D.EXTERIOR?0:e===D.INTERIOR?1:ye.NULL_VALUE},Ym.NULL_VALUE.get=function(){return-1},Object.defineProperties(ye,Ym);var dc=(function(r){function e(){if(r.call(this),this.pts=null,this._env=null,this.eiList=new kr(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ye,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,Tt.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,u=this.pts.length,l=0;l<this.pts.length;l++)if(i.pts[l].equals2D(s.pts[l])||(o=!1),i.pts[l].equals2D(s.pts[--u])||(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 pi(this)),this._mce},e.prototype.getEnvelope=function(){var n=this;if(this._env===null){this._env=new H;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 x(n.getIntersection(o)),u=i,l=n.getEdgeDistance(s,o),c=u+1;if(c<this.pts.length){var h=this.pts[c];a.equals2D(h)&&(u=c,l=0)}this.eiList.add(a,u,l)},e.prototype.toString=function(){var n=this,i=new Kn;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,z.ON),n.getLocation(1,z.ON),1),n.isArea()&&(i.setAtLeastIfValid(n.getLocation(0,z.LEFT),n.getLocation(1,z.LEFT),2),i.setAtLeastIfValid(n.getLocation(0,z.RIGHT),n.getLocation(1,z.RIGHT),2))}else return r.prototype.updateIM.apply(this,arguments)},e})(vn),Fe=function(e){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Xn,this._bufParams=e||null};Fe.prototype.setWorkingPrecisionModel=function(e){this._workingPrecisionModel=e},Fe.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 Tt(e.getLabel()),i.flip()),n.merge(i);var s=Fe.depthDelta(i),o=t.getDepthDelta(),a=o+s;t.setDepthDelta(a)}else this._edgeList.add(e),e.setDepthDelta(Fe.depthDelta(e.getLabel()))},Fe.prototype.buildSubgraphs=function(e,t){for(var n=new G,i=e.iterator();i.hasNext();){var s=i.next(),o=s.getRightmostCoordinate(),a=new io(n),u=a.getDepth(o);s.computeDepth(u),s.findResultEdges(),n.add(s),t.add(s.getDirectedEdges(),s.getNodes())}},Fe.prototype.createSubgraphs=function(e){for(var t=new G,n=e.getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isVisited()){var s=new Le;s.create(i),t.add(s)}}return qn.sort(t,qn.reverseOrder()),t},Fe.prototype.createEmptyResultGeometry=function(){var e=this._geomFact.createPolygon();return e},Fe.prototype.getNoder=function(e){if(this._workingNoder!==null)return this._workingNoder;var t=new md,n=new cs;return n.setPrecisionModel(e),t.setSegmentIntersector(new wn(n)),t},Fe.prototype.buffer=function(e,t){var n=this._workingPrecisionModel;n===null&&(n=e.getPrecisionModel()),this._geomFact=e.getFactory();var i=new Xe(n,this._bufParams),s=new On(e,t,i),o=s.getCurves();if(o.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(o,n),this._graph=new Gt(new Hm),this._graph.addEdges(this._edgeList.getEdges());var a=this.createSubgraphs(this._graph),u=new nn(this._geomFact);this.buildSubgraphs(a,u);var l=u.getPolygons();if(l.size()<=0)return this.createEmptyResultGeometry();var c=this._geomFact.buildGeometry(l);return c},Fe.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(),u=a.getCoordinates();if(!(u.length===2&&u[0].equals2D(u[1]))){var l=a.getData(),c=new dc(a.getCoordinates(),new Tt(l));n.insertUniqueEdge(c)}}},Fe.prototype.setNoder=function(e){this._workingNoder=e},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe},Fe.depthDelta=function(e){var t=e.getLocation(0,z.LEFT),n=e.getLocation(0,z.RIGHT);return t===D.INTERIOR&&n===D.EXTERIOR?1:t===D.EXTERIOR&&n===D.INTERIOR?-1:0},Fe.convertSegStrings=function(e){for(var t=new pt,n=new G;e.hasNext();){var i=e.next(),s=t.createLineString(i.getCoordinates());n.add(s)}return t.buildGeometry(n)};var Ui=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()}};Ui.prototype.rescale=function(){var e=this;if(nt(arguments[0],re))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])&&ve.out.println(s)}},Ui.prototype.scale=function(){var e=this;if(nt(arguments[0],re)){for(var t=arguments[0],n=new G,i=t.iterator();i.hasNext();){var s=i.next();n.add(new Zt(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),u=0;u<o.length;u++)a[u]=new x(Math.round((o[u].x-e._offsetX)*e._scaleFactor),Math.round((o[u].y-e._offsetY)*e._scaleFactor),o[u].z);var l=ft.removeRepeatedPoints(a);return l}},Ui.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},Ui.prototype.getNodedSubstrings=function(){var e=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(e),e},Ui.prototype.computeNodes=function(e){var t=e;this._isScaled&&(t=this.scale(e)),this._noder.computeNodes(t)},Ui.prototype.interfaces_=function(){return[ps]},Ui.prototype.getClass=function(){return Ui};var cr=function(){this._li=new cs,this._segStrings=null;var e=arguments[0];this._segStrings=e},Jm={fact:{configurable:!0}};cr.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 u=a.next(),l=u.getCoordinates(),c=1;c<l.length-1;c++)if(l[c].equals(s))throw new si("found endpt/interior pt intersection at index "+c+" :pt "+s)}},cr.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],u=o.getCoordinates(),l=a.getCoordinates(),c=0;c<u.length-1;c++)for(var h=0;h<l.length-1;h++)e.checkInteriorIntersections(o,c,a,h);else if(arguments.length===4){var f=arguments[0],p=arguments[1],m=arguments[2],w=arguments[3];if(f===m&&p===w)return null;var E=f.getCoordinates()[p],b=f.getCoordinates()[p+1],v=m.getCoordinates()[w],y=m.getCoordinates()[w+1];if(this._li.computeIntersection(E,b,v,y),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,E,b)||this.hasInteriorIntersection(this._li,v,y)))throw new si("found non-noded intersection at "+E+"-"+b+" and "+v+"-"+y)}},cr.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},cr.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])},cr.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},cr.prototype.checkCollapse=function(e,t,n){if(e.equals(n))throw new si("found non-noded collapse at "+cr.fact.createLineString([e,t,n]))},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},Jm.fact.get=function(){return new pt},Object.defineProperties(cr,Jm);var He=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 Vt("Scale factor must be non-zero");t!==1&&(this._pt=new x(this.scale(e.x),this.scale(e.y)),this._p0Scaled=new x,this._p1Scaled=new x),this.initCorners(this._pt)},Zm={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};He.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 u=this.intersectsToleranceSquare(e,t);return ct.isTrue(!(a&&u),"Found bad envelope test"),u},He.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 x(this._maxx,this._maxy),this._corner[1]=new x(this._minx,this._maxy),this._corner[2]=new x(this._minx,this._miny),this._corner[3]=new x(this._maxx,this._miny)},He.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))},He.prototype.scale=function(e){return Math.round(e*this._scaleFactor)},He.prototype.getCoordinate=function(){return this._originalPt},He.prototype.copyScaled=function(e,t){t.x=this.scale(e.x),t.y=this.scale(e.y)},He.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var e=He.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new H(this._originalPt.x-e,this._originalPt.x+e,this._originalPt.y-e,this._originalPt.y+e)}return this._safeEnv},He.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()))},He.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))},He.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},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He},Zm.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(He,Zm);var $u=function(){this.tempEnv1=new H,this.selectedSegment=new Y};$u.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)}}},$u.prototype.interfaces_=function(){return[]},$u.prototype.getClass=function(){return $u};var va=function(){this._index=null;var e=arguments[0];this._index=e},Km={HotPixelSnapAction:{configurable:!0}};va.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 Qm(t,n,i);return this._index.query(s,{interfaces_:function(){return[Bi]},visitItem:function(a){var u=a;u.select(s,o)}}),o.isNodeAdded()}},va.prototype.interfaces_=function(){return[]},va.prototype.getClass=function(){return va},Km.HotPixelSnapAction.get=function(){return Qm},Object.defineProperties(va,Km);var Qm=(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})($u),so=function(){this._li=null,this._interiorIntersections=null;var e=arguments[0];this._li=e,this._interiorIntersections=new G};so.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],u=n.getCoordinates()[i],l=n.getCoordinates()[i+1];if(this._li.computeIntersection(o,a,u,l),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)}},so.prototype.isDone=function(){return!1},so.prototype.getInteriorIntersections=function(){return this._interiorIntersections},so.prototype.interfaces_=function(){return[ms]},so.prototype.getClass=function(){return so};var Vr=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 cs,this._li.setPrecisionModel(e),this._scaleFactor=e.getScale()};Vr.prototype.checkCorrectness=function(e){var t=Zt.getNodedSubstrings(e),n=new cr(t);try{n.checkValid()}catch(i){if(i instanceof Dm)i.printStackTrace();else throw i}finally{}},Vr.prototype.getNodedSubstrings=function(){return Zt.getNodedSubstrings(this._nodedSegStrings)},Vr.prototype.snapRound=function(e,t){var n=this.findInteriorIntersections(e,t);this.computeIntersectionSnaps(n),this.computeVertexSnaps(e)},Vr.prototype.findInteriorIntersections=function(e,t){var n=new so(t);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(e),n.getInteriorIntersections()},Vr.prototype.computeVertexSnaps=function(){var e=this;if(nt(arguments[0],re))for(var t=arguments[0],n=t.iterator();n.hasNext();){var i=n.next();e.computeVertexSnaps(i)}else if(arguments[0]instanceof Zt)for(var s=arguments[0],o=s.getCoordinates(),a=0;a<o.length;a++){var u=new He(o[a],e._scaleFactor,e._li),l=e._pointSnapper.snap(u,s,a);l&&s.addIntersection(o[a],a)}},Vr.prototype.computeNodes=function(e){this._nodedSegStrings=e,this._noder=new md,this._pointSnapper=new va(this._noder.getIndex()),this.snapRound(e,this._li)},Vr.prototype.computeIntersectionSnaps=function(e){for(var t=this,n=e.iterator();n.hasNext();){var i=n.next(),s=new He(i,t._scaleFactor,t._li);t._pointSnapper.snap(s)}},Vr.prototype.interfaces_=function(){return[ps]},Vr.prototype.getClass=function(){return Vr};var _e=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new Pt,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}},ya={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};_e.prototype.bufferFixedPrecision=function(e){var t=new Ui(new Vr(new bt(1)),e.getScale()),n=new Fe(this._bufParams);n.setWorkingPrecisionModel(e),n.setNoder(t),this._resultGeometry=n.buffer(this._argGeom,this._distance)},_e.prototype.bufferReducedPrecision=function(){var e=this;if(arguments.length===0){for(var t=_e.MAX_PRECISION_DIGITS;t>=0;t--){try{e.bufferReducedPrecision(t)}catch(o){if(o instanceof hi)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=_e.precisionScaleFactor(this._argGeom,this._distance,n),s=new bt(i);this.bufferFixedPrecision(s)}},_e.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var e=this._argGeom.getFactory().getPrecisionModel();e.getType()===bt.FIXED?this.bufferFixedPrecision(e):this.bufferReducedPrecision()},_e.prototype.setQuadrantSegments=function(e){this._bufParams.setQuadrantSegments(e)},_e.prototype.bufferOriginalPrecision=function(){try{var e=new Fe(this._bufParams);this._resultGeometry=e.buffer(this._argGeom,this._distance)}catch(t){if(t instanceof si)this._saveException=t;else throw t}finally{}},_e.prototype.getResultGeometry=function(e){return this._distance=e,this.computeGeometry(),this._resultGeometry},_e.prototype.setEndCapStyle=function(e){this._bufParams.setEndCapStyle(e)},_e.prototype.interfaces_=function(){return[]},_e.prototype.getClass=function(){return _e},_e.bufferOp=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],n=new _e(e),i=n.getResultGeometry(t);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof et&&typeof arguments[1]=="number"){var s=arguments[0],o=arguments[1],a=arguments[2],u=new _e(s);u.setQuadrantSegments(a);var l=u.getResultGeometry(o);return l}else if(arguments[2]instanceof Pt&&arguments[0]instanceof et&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],f=arguments[2],p=new _e(c,f),m=p.getResultGeometry(h);return m}}else if(arguments.length===4){var w=arguments[0],E=arguments[1],b=arguments[2],v=arguments[3],y=new _e(w);y.setQuadrantSegments(b),y.setEndCapStyle(v);var _=y.getResultGeometry(E);return _}},_e.precisionScaleFactor=function(e,t,n){var i=e.getEnvelopeInternal(),s=mn.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,u=Math.trunc(Math.log(a)/Math.log(10)+1),l=n-u,c=Math.pow(10,l);return c},ya.CAP_ROUND.get=function(){return Pt.CAP_ROUND},ya.CAP_BUTT.get=function(){return Pt.CAP_FLAT},ya.CAP_FLAT.get=function(){return Pt.CAP_FLAT},ya.CAP_SQUARE.get=function(){return Pt.CAP_SQUARE},ya.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(_e,ya);var ke=function(){this._pt=[new x,new x],this._distance=ot.NaN,this._isNull=!0};ke.prototype.getCoordinates=function(){return this._pt},ke.prototype.getCoordinate=function(e){return this._pt[e]},ke.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)}},ke.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}},ke.prototype.getDistance=function(){return this._distance},ke.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)}},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke};var Br=function(){};Br.prototype.interfaces_=function(){return[]},Br.prototype.getClass=function(){return Br},Br.computeDistance=function(){if(arguments[2]instanceof ke&&arguments[0]instanceof Wt&&arguments[1]instanceof x)for(var e=arguments[0],t=arguments[1],n=arguments[2],i=e.getCoordinates(),s=new Y,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 ke&&arguments[0]instanceof ie&&arguments[1]instanceof x){var u=arguments[0],l=arguments[1],c=arguments[2];Br.computeDistance(u.getExteriorRing(),l,c);for(var h=0;h<u.getNumInteriorRing();h++)Br.computeDistance(u.getInteriorRingN(h),l,c)}else if(arguments[2]instanceof ke&&arguments[0]instanceof et&&arguments[1]instanceof x){var f=arguments[0],p=arguments[1],m=arguments[2];if(f instanceof Wt)Br.computeDistance(f,p,m);else if(f instanceof ie)Br.computeDistance(f,p,m);else if(f instanceof Re)for(var w=f,E=0;E<w.getNumGeometries();E++){var b=w.getGeometryN(E);Br.computeDistance(b,p,m)}else m.setMinimum(f.getCoordinate(),p)}else if(arguments[2]instanceof ke&&arguments[0]instanceof Y&&arguments[1]instanceof x){var v=arguments[0],y=arguments[1],_=arguments[2],C=v.closestPoint(y);_.setMinimum(C,y)}};var ys=function(e){this._maxPtDist=new ke,this._inputGeom=e||null},vd={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};ys.prototype.computeMaxMidpointDistance=function(e){var t=new Gi(this._inputGeom);e.apply(t),this._maxPtDist.setMaximum(t.getMaxPointDistance())},ys.prototype.computeMaxVertexDistance=function(e){var t=new oo(this._inputGeom);e.apply(t),this._maxPtDist.setMaximum(t.getMaxPointDistance())},ys.prototype.findDistance=function(e){return this.computeMaxVertexDistance(e),this.computeMaxMidpointDistance(e),this._maxPtDist.getDistance()},ys.prototype.getDistancePoints=function(){return this._maxPtDist},ys.prototype.interfaces_=function(){return[]},ys.prototype.getClass=function(){return ys},vd.MaxPointDistanceFilter.get=function(){return oo},vd.MaxMidpointDistanceFilter.get=function(){return Gi},Object.defineProperties(ys,vd);var oo=function(e){this._maxPtDist=new ke,this._minPtDist=new ke,this._geom=e||null};oo.prototype.filter=function(e){this._minPtDist.initialize(),Br.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},oo.prototype.getMaxPointDistance=function(){return this._maxPtDist},oo.prototype.interfaces_=function(){return[Dr]},oo.prototype.getClass=function(){return oo};var Gi=function(e){this._maxPtDist=new ke,this._minPtDist=new ke,this._geom=e||null};Gi.prototype.filter=function(e,t){if(t===0)return null;var n=e.getCoordinate(t-1),i=e.getCoordinate(t),s=new x((n.x+i.x)/2,(n.y+i.y)/2);this._minPtDist.initialize(),Br.computeDistance(this._geom,s,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Gi.prototype.isDone=function(){return!1},Gi.prototype.isGeometryChanged=function(){return!1},Gi.prototype.getMaxPointDistance=function(){return this._maxPtDist},Gi.prototype.interfaces_=function(){return[Gn]},Gi.prototype.getClass=function(){return Gi};var gi=function(e){this._comps=e||null};gi.prototype.filter=function(e){e instanceof ie&&this._comps.add(e)},gi.prototype.interfaces_=function(){return[nr]},gi.prototype.getClass=function(){return gi},gi.getPolygons=function(){if(arguments.length===1){var e=arguments[0];return gi.getPolygons(e,new G)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];return t instanceof ie?n.add(t):t instanceof Re&&t.apply(new gi(n)),n}};var we=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}};we.prototype.filter=function(e){if(this._isForcedToLineString&&e instanceof Mr){var t=e.getFactory().createLineString(e.getCoordinateSequence());return this._lines.add(t),null}e instanceof Wt&&this._lines.add(e)},we.prototype.setForceToLineString=function(e){this._isForcedToLineString=e},we.prototype.interfaces_=function(){return[oi]},we.prototype.getClass=function(){return we},we.getGeometry=function(){if(arguments.length===1){var e=arguments[0];return e.getFactory().buildGeometry(we.getLines(e))}else if(arguments.length===2){var t=arguments[0],n=arguments[1];return t.getFactory().buildGeometry(we.getLines(t,n))}},we.getLines=function(){if(arguments.length===1){var e=arguments[0];return we.getLines(e,!1)}else if(arguments.length===2){if(nt(arguments[0],re)&&nt(arguments[1],re)){for(var t=arguments[0],n=arguments[1],i=t.iterator();i.hasNext();){var s=i.next();we.getLines(s,n)}return n}else if(arguments[0]instanceof et&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1],u=new G;return o.apply(new we(u,a)),u}else if(arguments[0]instanceof et&&nt(arguments[1],re)){var l=arguments[0],c=arguments[1];return l instanceof Wt?c.add(l):l.apply(new we(c)),c}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&nt(arguments[0],re)&&nt(arguments[1],re)){for(var h=arguments[0],f=arguments[1],p=arguments[2],m=h.iterator();m.hasNext();){var w=m.next();we.getLines(w,f,p)}return f}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof et&&nt(arguments[1],re)){var E=arguments[0],b=arguments[1],v=arguments[2];return E.apply(new we(b,v)),b}}};var Hn=function(){if(this._boundaryRule=In.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 Vt("Rule must be non-null");this._boundaryRule=e}}};Hn.prototype.locateInternal=function(){var e=this;if(arguments[0]instanceof x&&arguments[1]instanceof ie){var t=arguments[0],n=arguments[1];if(n.isEmpty())return D.EXTERIOR;var i=n.getExteriorRing(),s=this.locateInPolygonRing(t,i);if(s===D.EXTERIOR)return D.EXTERIOR;if(s===D.BOUNDARY)return D.BOUNDARY;for(var o=0;o<n.getNumInteriorRing();o++){var a=n.getInteriorRingN(o),u=e.locateInPolygonRing(t,a);if(u===D.INTERIOR)return D.EXTERIOR;if(u===D.BOUNDARY)return D.BOUNDARY}return D.INTERIOR}else if(arguments[0]instanceof x&&arguments[1]instanceof Wt){var l=arguments[0],c=arguments[1];if(!c.getEnvelopeInternal().intersects(l))return D.EXTERIOR;var h=c.getCoordinates();return!c.isClosed()&&(l.equals(h[0])||l.equals(h[h.length-1]))?D.BOUNDARY:W.isOnLine(l,h)?D.INTERIOR:D.EXTERIOR}else if(arguments[0]instanceof x&&arguments[1]instanceof en){var f=arguments[0],p=arguments[1],m=p.getCoordinate();return m.equals2D(f)?D.INTERIOR:D.EXTERIOR}},Hn.prototype.locateInPolygonRing=function(e,t){return t.getEnvelopeInternal().intersects(e)?W.locatePointInRing(e,t.getCoordinates()):D.EXTERIOR},Hn.prototype.intersects=function(e,t){return this.locate(e,t)!==D.EXTERIOR},Hn.prototype.updateLocationInfo=function(e){e===D.INTERIOR&&(this._isIn=!0),e===D.BOUNDARY&&this._numBoundaries++},Hn.prototype.computeLocation=function(e,t){var n=this;if(t instanceof en&&this.updateLocationInfo(this.locateInternal(e,t)),t instanceof Wt)this.updateLocationInfo(this.locateInternal(e,t));else if(t instanceof ie)this.updateLocationInfo(this.locateInternal(e,t));else if(t instanceof fs)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 Rr)for(var a=t,u=0;u<a.getNumGeometries();u++){var l=a.getGeometryN(u);n.updateLocationInfo(n.locateInternal(e,l))}else if(t instanceof Re)for(var c=new Fr(t);c.hasNext();){var h=c.next();h!==t&&n.computeLocation(e,h)}},Hn.prototype.locate=function(e,t){return t.isEmpty()?D.EXTERIOR:t instanceof Wt?this.locateInternal(e,t):t instanceof ie?this.locateInternal(e,t):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(e,t),this._boundaryRule.isInBoundary(this._numBoundaries)?D.BOUNDARY:this._numBoundaries>0||this._isIn?D.INTERIOR:D.EXTERIOR)},Hn.prototype.interfaces_=function(){return[]},Hn.prototype.getClass=function(){return Hn};var Ve=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}},$m={INSIDE_AREA:{configurable:!0}};Ve.prototype.isInsideArea=function(){return this._segIndex===Ve.INSIDE_AREA},Ve.prototype.getCoordinate=function(){return this._pt},Ve.prototype.getGeometryComponent=function(){return this._component},Ve.prototype.getSegmentIndex=function(){return this._segIndex},Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve},$m.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Ve,$m);var Wi=function(e){this._pts=e||null};Wi.prototype.filter=function(e){e instanceof en&&this._pts.add(e)},Wi.prototype.interfaces_=function(){return[nr]},Wi.prototype.getClass=function(){return Wi},Wi.getPoints=function(){if(arguments.length===1){var e=arguments[0];return e instanceof en?qn.singletonList(e):Wi.getPoints(e,new G)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];return t instanceof en?n.add(t):t instanceof Re&&t.apply(new Wi(n)),n}};var ao=function(){this._locations=null;var e=arguments[0];this._locations=e};ao.prototype.filter=function(e){(e instanceof en||e instanceof Wt||e instanceof ie)&&this._locations.add(new Ve(e,0,e.getCoordinate()))},ao.prototype.interfaces_=function(){return[nr]},ao.prototype.getClass=function(){return ao},ao.getLocations=function(e){var t=new G;return e.apply(new ao(t)),t};var Ee=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Hn,this._minDistanceLocation=null,this._minDistance=ot.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}};Ee.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=gi.getPolygons(this._geom[n]);if(o.size()>0){var a=ao.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&&nt(arguments[0],zn)&&nt(arguments[1],zn)){for(var u=arguments[0],l=arguments[1],c=arguments[2],h=0;h<u.size();h++)for(var f=u.get(h),p=0;p<l.size();p++)if(e.computeContainmentDistance(f,l.get(p),c),e._minDistance<=e._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Ve&&arguments[1]instanceof ie){var m=arguments[0],w=arguments[1],E=arguments[2],b=m.getCoordinate();if(D.EXTERIOR!==this._ptLocator.locate(b,w))return this._minDistance=0,E[0]=m,E[1]=new Ve(w,b),null}}},Ee.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 u=t.get(a);if(i.computeMinDistance(o,u,n),i._minDistance<=i._terminateDistance)return null}},Ee.prototype.computeFacetDistance=function(){var e=new Array(2).fill(null),t=we.getLines(this._geom[0]),n=we.getLines(this._geom[1]),i=Wi.getPoints(this._geom[0]),s=Wi.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)},Ee.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Ee.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])},Ee.prototype.nearestPoints=function(){this.computeMinDistance();var e=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return e},Ee.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 Wt&&arguments[1]instanceof en){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 u=W.distancePointLine(o,s[a],s[a+1]);if(u<e._minDistance){e._minDistance=u;var l=new Y(s[a],s[a+1]),c=l.closestPoint(o);i[0]=new Ve(t,a,c),i[1]=new Ve(n,0,o)}if(e._minDistance<=e._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Wt&&arguments[1]instanceof Wt){var h=arguments[0],f=arguments[1],p=arguments[2];if(h.getEnvelopeInternal().distance(f.getEnvelopeInternal())>this._minDistance)return null;for(var m=h.getCoordinates(),w=f.getCoordinates(),E=0;E<m.length-1;E++)for(var b=0;b<w.length-1;b++){var v=W.distanceLineLine(m[E],m[E+1],w[b],w[b+1]);if(v<e._minDistance){e._minDistance=v;var y=new Y(m[E],m[E+1]),_=new Y(w[b],w[b+1]),C=y.closestPoints(_);p[0]=new Ve(h,E,C[0]),p[1]=new Ve(f,b,C[1])}if(e._minDistance<=e._terminateDistance)return null}}}},Ee.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 u=t.get(a),l=o.getCoordinate().distance(u.getCoordinate());if(l<i._minDistance&&(i._minDistance=l,n[0]=new Ve(o,0,o.getCoordinate()),n[1]=new Ve(u,0,u.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},Ee.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new Vt("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Ee.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 u=t.get(a);if(i.computeMinDistance(o,u,n),i._minDistance<=i._terminateDistance)return null}},Ee.prototype.interfaces_=function(){return[]},Ee.prototype.getClass=function(){return Ee},Ee.distance=function(e,t){var n=new Ee(e,t);return n.distance()},Ee.isWithinDistance=function(e,t,n){var i=new Ee(e,t,n);return i.distance()<=n},Ee.nearestPoints=function(e,t){var n=new Ee(e,t);return n.nearestPoints()};var Oe=function(){this._pt=[new x,new x],this._distance=ot.NaN,this._isNull=!0};Oe.prototype.getCoordinates=function(){return this._pt},Oe.prototype.getCoordinate=function(e){return this._pt[e]},Oe.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)}},Oe.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}},Oe.prototype.toString=function(){return jn.toLineString(this._pt[0],this._pt[1])},Oe.prototype.getDistance=function(){return this._distance},Oe.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)}},Oe.prototype.interfaces_=function(){return[]},Oe.prototype.getClass=function(){return Oe};var hr=function(){};hr.prototype.interfaces_=function(){return[]},hr.prototype.getClass=function(){return hr},hr.computeDistance=function(){if(arguments[2]instanceof Oe&&arguments[0]instanceof Wt&&arguments[1]instanceof x)for(var e=arguments[0],t=arguments[1],n=arguments[2],i=new Y,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 Oe&&arguments[0]instanceof ie&&arguments[1]instanceof x){var u=arguments[0],l=arguments[1],c=arguments[2];hr.computeDistance(u.getExteriorRing(),l,c);for(var h=0;h<u.getNumInteriorRing();h++)hr.computeDistance(u.getInteriorRingN(h),l,c)}else if(arguments[2]instanceof Oe&&arguments[0]instanceof et&&arguments[1]instanceof x){var f=arguments[0],p=arguments[1],m=arguments[2];if(f instanceof Wt)hr.computeDistance(f,p,m);else if(f instanceof ie)hr.computeDistance(f,p,m);else if(f instanceof Re)for(var w=f,E=0;E<w.getNumGeometries();E++){var b=w.getGeometryN(E);hr.computeDistance(b,p,m)}else m.setMinimum(f.getCoordinate(),p)}else if(arguments[2]instanceof Oe&&arguments[0]instanceof Y&&arguments[1]instanceof x){var v=arguments[0],y=arguments[1],_=arguments[2],C=v.closestPoint(y);_.setMinimum(C,y)}};var Dn=function(){this._g0=null,this._g1=null,this._ptDist=new Oe,this._densifyFrac=0;var e=arguments[0],t=arguments[1];this._g0=e,this._g1=t},yd={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Dn.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Dn.prototype.setDensifyFraction=function(e){if(e>1||e<=0)throw new Vt("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=e},Dn.prototype.compute=function(e,t){this.computeOrientedDistance(e,t,this._ptDist),this.computeOrientedDistance(t,e,this._ptDist)},Dn.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Dn.prototype.computeOrientedDistance=function(e,t,n){var i=new uo(t);if(e.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var s=new qi(t,this._densifyFrac);e.apply(s),n.setMaximum(s.getMaxPointDistance())}},Dn.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},Dn.distance=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],n=new Dn(e,t);return n.distance()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new Dn(i,s);return a.setDensifyFraction(o),a.distance()}},yd.MaxPointDistanceFilter.get=function(){return uo},yd.MaxDensifiedByFractionDistanceFilter.get=function(){return qi},Object.defineProperties(Dn,yd);var uo=function(){this._maxPtDist=new Oe,this._minPtDist=new Oe,this._euclideanDist=new hr,this._geom=null;var e=arguments[0];this._geom=e};uo.prototype.filter=function(e){this._minPtDist.initialize(),hr.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},uo.prototype.getMaxPointDistance=function(){return this._maxPtDist},uo.prototype.interfaces_=function(){return[Dr]},uo.prototype.getClass=function(){return uo};var qi=function(){this._maxPtDist=new Oe,this._minPtDist=new Oe,this._geom=null,this._numSubSegs=0;var e=arguments[0],t=arguments[1];this._geom=e,this._numSubSegs=Math.trunc(Math.round(1/t))};qi.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,u=0;u<this._numSubSegs;u++){var l=i.x+u*o,c=i.y+u*a,h=new x(l,c);n._minPtDist.initialize(),hr.computeDistance(n._geom,h,n._minPtDist),n._maxPtDist.setMaximum(n._minPtDist)}},qi.prototype.isDone=function(){return!1},qi.prototype.isGeometryChanged=function(){return!1},qi.prototype.getMaxPointDistance=function(){return this._maxPtDist},qi.prototype.interfaces_=function(){return[Gn]},qi.prototype.getClass=function(){return qi};var sn=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},_d={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};sn.prototype.checkMaximumDistance=function(e,t,n){var i=new Dn(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 "+jn.toLineString(s[0],s[1])+")"}},sn.prototype.isValid=function(){var e=Math.abs(this._bufDistance),t=sn.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(),sn.VERBOSE&&ve.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},sn.prototype.checkNegativeValid=function(){if(!(this._input instanceof ie||this._input instanceof Rr||this._input instanceof Re))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)},sn.prototype.getErrorIndicator=function(){return this._errorIndicator},sn.prototype.checkMinimumDistance=function(e,t,n){var i=new Ee(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 "+jn.toLineString(s[0],s[1])+" )"}},sn.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)},sn.prototype.getErrorLocation=function(){return this._errorLocation},sn.prototype.getPolygonLines=function(e){for(var t=new G,n=new we(t),i=gi.getPolygons(e),s=i.iterator();s.hasNext();){var o=s.next();o.apply(n)}return e.getFactory().buildGeometry(t)},sn.prototype.getErrorMessage=function(){return this._errMsg},sn.prototype.interfaces_=function(){return[]},sn.prototype.getClass=function(){return sn},_d.VERBOSE.get=function(){return!1},_d.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(sn,_d);var Ce=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},wd={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Ce.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},Ce.prototype.checkEnvelope=function(){if(this._distance<0)return null;var e=this._distance*Ce.MAX_ENV_DIFF_FRAC;e===0&&(e=.001);var t=new H(this._input.getEnvelopeInternal());t.expandBy(this._distance);var n=new H(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")},Ce.prototype.checkDistance=function(){var e=new sn(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")},Ce.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")},Ce.prototype.checkPolygonal=function(){this._result instanceof ie||this._result instanceof Rr||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},Ce.prototype.getErrorIndicator=function(){return this._errorIndicator},Ce.prototype.getErrorLocation=function(){return this._errorLocation},Ce.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")},Ce.prototype.report=function(e){if(!Ce.VERBOSE)return null;ve.out.println("Check "+e+": "+(this._isValid?"passed":"FAILED"))},Ce.prototype.getErrorMessage=function(){return this._errorMsg},Ce.prototype.interfaces_=function(){return[]},Ce.prototype.getClass=function(){return Ce},Ce.isValidMsg=function(e,t,n){var i=new Ce(e,t,n);return i.isValid()?null:i.getErrorMessage()},Ce.isValid=function(e,t,n){var i=new Ce(e,t,n);return!!i.isValid()},wd.VERBOSE.get=function(){return!1},wd.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Ce,wd);var dr=function(){this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};dr.prototype.getCoordinates=function(){return this._pts},dr.prototype.size=function(){return this._pts.length},dr.prototype.getCoordinate=function(e){return this._pts[e]},dr.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},dr.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:no.octant(this.getCoordinate(e),this.getCoordinate(e+1))},dr.prototype.setData=function(e){this._data=e},dr.prototype.getData=function(){return this._data},dr.prototype.toString=function(){return jn.toLineString(new Jt(this._pts))},dr.prototype.interfaces_=function(){return[Ar]},dr.prototype.getClass=function(){return dr};var de=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new G,this._intersectionCount=0,this._keepIntersections=!0;var e=arguments[0];this._li=e,this._interiorIntersection=null};de.prototype.getInteriorIntersection=function(){return this._interiorIntersection},de.prototype.setCheckEndSegmentsOnly=function(e){this._isCheckEndSegmentsOnly=e},de.prototype.getIntersectionSegments=function(){return this._intSegments},de.prototype.count=function(){return this._intersectionCount},de.prototype.getIntersections=function(){return this._intersections},de.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},de.prototype.setKeepIntersections=function(e){this._keepIntersections=e},de.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],u=n.getCoordinates()[i],l=n.getCoordinates()[i+1];this._li.computeIntersection(o,a,u,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=a,this._intSegments[2]=u,this._intSegments[3]=l,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},de.prototype.isEndSegment=function(e,t){return t===0||t>=e.size()-2},de.prototype.hasIntersection=function(){return this._interiorIntersection!==null},de.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},de.prototype.interfaces_=function(){return[ms]},de.prototype.getClass=function(){return de},de.createAllIntersectionsFinder=function(e){var t=new de(e);return t.setFindAllIntersections(!0),t},de.createAnyIntersectionFinder=function(e){return new de(e)},de.createIntersectionCounter=function(e){var t=new de(e);return t.setFindAllIntersections(!0),t.setKeepIntersections(!1),t};var Yn=function(){this._li=new cs,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var e=arguments[0];this._segStrings=e};Yn.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},Yn.prototype.getIntersections=function(){return this._segInt.getIntersections()},Yn.prototype.isValid=function(){return this.execute(),this._isValid},Yn.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},Yn.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new de(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var e=new md;if(e.setSegmentIntersector(this._segInt),e.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Yn.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new hi(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Yn.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var e=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+jn.toLineString(e[0],e[1])+" and "+jn.toLineString(e[2],e[3])},Yn.prototype.interfaces_=function(){return[]},Yn.prototype.getClass=function(){return Yn},Yn.computeIntersections=function(e){var t=new Yn(e);return t.setFindAllIntersections(!0),t.isValid(),t.getIntersections()};var _s=function r(){this._nv=null;var e=arguments[0];this._nv=new Yn(r.toSegmentStrings(e))};_s.prototype.checkValid=function(){this._nv.checkValid()},_s.prototype.interfaces_=function(){return[]},_s.prototype.getClass=function(){return _s},_s.toSegmentStrings=function(e){for(var t=new G,n=e.iterator();n.hasNext();){var i=n.next();t.add(new dr(i.getCoordinates(),i))}return t},_s.checkValid=function(e){var t=new _s(e);t.checkValid()};var lo=function(e){this._mapOp=e};lo.prototype.map=function(e){for(var t=this,n=new G,i=0;i<e.getNumGeometries();i++){var s=t._mapOp.map(e.getGeometryN(i));s.isEmpty()||n.add(s)}return e.getFactory().createGeometryCollection(pt.toGeometryArray(n))},lo.prototype.interfaces_=function(){return[]},lo.prototype.getClass=function(){return lo},lo.map=function(e,t){var n=new lo(t);return n.map(e)};var fr=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new G,this._resultLineList=new G;var e=arguments[0],t=arguments[1],n=arguments[2];this._op=e,this._geometryFactory=t,this._ptLocator=n};fr.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)}},fr.prototype.labelIsolatedLine=function(e,t){var n=this._ptLocator.locate(e.getCoordinate(),this._op.getArgGeometry(t));e.getLabel().setLocation(t,n)},fr.prototype.build=function(e){return this.findCoveredLineEdges(),this.collectLines(e),this.buildLines(e),this._resultLineList},fr.prototype.collectLineEdge=function(e,t,n){var i=e.getLabel(),s=e.getEdge();e.isLineEdge()&&!e.isVisited()&<.isResultOfOp(i,t)&&!s.isCovered()&&(n.add(s),e.setVisitedEdge(!0))},fr.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)}}},fr.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))}},fr.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)}},fr.prototype.collectBoundaryTouchEdge=function(e,t,n){var i=e.getLabel();if(e.isLineEdge()||e.isVisited()||e.isInteriorAreaEdge()||e.getEdge().isInResult())return null;ct.isTrue(!(e.isInResult()||e.getSym().isInResult())||!e.getEdge().isInResult()),lt.isResultOfOp(i,t)&&t===lt.INTERSECTION&&(n.add(e.getEdge()),e.setVisitedEdge(!0))},fr.prototype.interfaces_=function(){return[]},fr.prototype.getClass=function(){return fr};var co=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new G;var e=arguments[0],t=arguments[1];this._op=e,this._geometryFactory=t};co.prototype.filterCoveredNodeToPoint=function(e){var t=e.getCoordinate();if(!this._op.isCoveredByLA(t)){var n=this._geometryFactory.createPoint(t);this._resultPointList.add(n)}},co.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===lt.INTERSECTION)){var s=i.getLabel();lt.isResultOfOp(s,e)&&t.filterCoveredNodeToPoint(i)}}},co.prototype.build=function(e){return this.extractNonCoveredResultNodes(e),this._resultPointList},co.prototype.interfaces_=function(){return[]},co.prototype.getClass=function(){return co};var Ye=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Ye.prototype.transformPoint=function(e,t){return this._factory.createPoint(this.transformCoordinates(e.getCoordinateSequence(),e))},Ye.prototype.transformPolygon=function(e,t){var n=this,i=!0,s=this.transformLinearRing(e.getExteriorRing(),e);(s===null||!(s instanceof Mr)||s.isEmpty())&&(i=!1);for(var o=new G,a=0;a<e.getNumInteriorRing();a++){var u=n.transformLinearRing(e.getInteriorRingN(a),e);u===null||u.isEmpty()||(u instanceof Mr||(i=!1),o.add(u))}if(i)return this._factory.createPolygon(s,o.toArray([]));var l=new G;return s!==null&&l.add(s),l.addAll(o),this._factory.buildGeometry(l)},Ye.prototype.createCoordinateSequence=function(e){return this._factory.getCoordinateSequenceFactory().create(e)},Ye.prototype.getInputGeometry=function(){return this._inputGeom},Ye.prototype.transformMultiLineString=function(e,t){for(var n=this,i=new G,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)},Ye.prototype.transformCoordinates=function(e,t){return this.copy(e)},Ye.prototype.transformLineString=function(e,t){return this._factory.createLineString(this.transformCoordinates(e.getCoordinateSequence(),e))},Ye.prototype.transformMultiPoint=function(e,t){for(var n=this,i=new G,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)},Ye.prototype.transformMultiPolygon=function(e,t){for(var n=this,i=new G,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)},Ye.prototype.copy=function(e){return e.copy()},Ye.prototype.transformGeometryCollection=function(e,t){for(var n=this,i=new G,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(pt.toGeometryArray(i)):this._factory.buildGeometry(i)},Ye.prototype.transform=function(e){if(this._inputGeom=e,this._factory=e.getFactory(),e instanceof en)return this.transformPoint(e,null);if(e instanceof da)return this.transformMultiPoint(e,null);if(e instanceof Mr)return this.transformLinearRing(e,null);if(e instanceof Wt)return this.transformLineString(e,null);if(e instanceof fs)return this.transformMultiLineString(e,null);if(e instanceof ie)return this.transformPolygon(e,null);if(e instanceof Rr)return this.transformMultiPolygon(e,null);if(e instanceof Re)return this.transformGeometryCollection(e,null);throw new Vt("Unknown Geometry subtype: "+e.getClass().getName())},Ye.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)},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye};var jr=function r(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Y,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Wt&&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}};jr.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 x(a)),s===0&&n._isClosed&&e.set(e.size()-1,new x(a)))}},jr.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},jr.prototype.snapTo=function(e){var t=new Bu(this._srcPts);this.snapVertices(t,e),this.snapSegments(t,e);var n=t.toCoordinateArray();return n},jr.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 x(o),!1)}},jr.prototype.findSegmentIndexToSnap=function(e,t){for(var n=this,i=ot.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},jr.prototype.setAllowSnappingToSourceVertices=function(e){this._allowSnappingToSourceVertices=e},jr.prototype.interfaces_=function(){return[]},jr.prototype.getClass=function(){return jr},jr.isClosed=function(e){return e.length<=1?!1:e[0].equals2D(e[e.length-1])};var Kt=function(e){this._srcGeom=e||null},tv={SNAP_PRECISION_FACTOR:{configurable:!0}};Kt.prototype.snapTo=function(e,t){var n=this.extractTargetCoordinates(e),i=new ev(t,n);return i.transform(this._srcGeom)},Kt.prototype.snapToSelf=function(e,t){var n=this.extractTargetCoordinates(this._srcGeom),i=new ev(e,n,!0),s=i.transform(this._srcGeom),o=s;return t&&nt(o,Vi)&&(o=s.buffer(0)),o},Kt.prototype.computeSnapTolerance=function(e){var t=this.computeMinimumSegmentLength(e),n=t/10;return n},Kt.prototype.extractTargetCoordinates=function(e){for(var t=new er,n=e.getCoordinates(),i=0;i<n.length;i++)t.add(n[i]);return t.toArray(new Array(0).fill(null))},Kt.prototype.computeMinimumSegmentLength=function(e){for(var t=ot.MAX_VALUE,n=0;n<e.length-1;n++){var i=e[n].distance(e[n+1]);i<t&&(t=i)}return t},Kt.prototype.interfaces_=function(){return[]},Kt.prototype.getClass=function(){return Kt},Kt.snap=function(e,t,n){var i=new Array(2).fill(null),s=new Kt(e);i[0]=s.snapTo(t,n);var o=new Kt(t);return i[1]=o.snapTo(i[0],n),i},Kt.computeOverlaySnapTolerance=function(){if(arguments.length===1){var e=arguments[0],t=Kt.computeSizeBasedSnapTolerance(e),n=e.getPrecisionModel();if(n.getType()===bt.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(Kt.computeOverlaySnapTolerance(s),Kt.computeOverlaySnapTolerance(o))}},Kt.computeSizeBasedSnapTolerance=function(e){var t=e.getEnvelopeInternal(),n=Math.min(t.getHeight(),t.getWidth()),i=n*Kt.SNAP_PRECISION_FACTOR;return i},Kt.snapToSelf=function(e,t,n){var i=new Kt(e);return i.snapToSelf(t,n)},tv.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Kt,tv);var ev=(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 jr(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})(Ye),Be=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Be.prototype.getCommon=function(){return ot.longBitsToDouble(this._commonBits)},Be.prototype.add=function(e){var t=ot.doubleToLongBits(e);if(this._isFirst)return this._commonBits=t,this._commonSignExp=Be.signExpBits(this._commonBits),this._isFirst=!1,null;var n=Be.signExpBits(t);if(n!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=Be.numCommonMostSigMantissaBits(this._commonBits,t),this._commonBits=Be.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},Be.prototype.toString=function(){if(arguments.length===1){var e=arguments[0],t=ot.longBitsToDouble(e),n=ot.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}},Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be},Be.getBit=function(e,t){var n=1<<t;return(e&n)!==0?1:0},Be.signExpBits=function(e){return e>>52},Be.zeroLowerBits=function(e,t){var n=(1<<t)-1,i=~n,s=e&i;return s},Be.numCommonMostSigMantissaBits=function(e,t){for(var n=0,i=52;i>=0;i--){if(Be.getBit(e,i)!==Be.getBit(t,i))return n;n++}return 52};var Xi=function(){this._commonCoord=null,this._ccFilter=new ho},Ed={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};Xi.prototype.addCommonBits=function(e){var t=new Hi(this._commonCoord);e.apply(t),e.geometryChanged()},Xi.prototype.removeCommonBits=function(e){if(this._commonCoord.x===0&&this._commonCoord.y===0)return e;var t=new x(this._commonCoord);t.x=-t.x,t.y=-t.y;var n=new Hi(t);return e.apply(n),e.geometryChanged(),e},Xi.prototype.getCommonCoordinate=function(){return this._commonCoord},Xi.prototype.add=function(e){e.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},Xi.prototype.interfaces_=function(){return[]},Xi.prototype.getClass=function(){return Xi},Ed.CommonCoordinateFilter.get=function(){return ho},Ed.Translater.get=function(){return Hi},Object.defineProperties(Xi,Ed);var ho=function(){this._commonBitsX=new Be,this._commonBitsY=new Be};ho.prototype.filter=function(e){this._commonBitsX.add(e.x),this._commonBitsY.add(e.y)},ho.prototype.getCommonCoordinate=function(){return new x(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},ho.prototype.interfaces_=function(){return[Dr]},ho.prototype.getClass=function(){return ho};var Hi=function(){this.trans=null;var e=arguments[0];this.trans=e};Hi.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)},Hi.prototype.isDone=function(){return!1},Hi.prototype.isGeometryChanged=function(){return!0},Hi.prototype.interfaces_=function(){return[Gn]},Hi.prototype.getClass=function(){return Hi};var fe=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()};fe.prototype.selfSnap=function(e){var t=new Kt(e),n=t.snapTo(e,this._snapTolerance);return n},fe.prototype.removeCommonBits=function(e){this._cbr=new Xi,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},fe.prototype.prepareResult=function(e){return this._cbr.addCommonBits(e),e},fe.prototype.getResultGeometry=function(e){var t=this.snap(this._geom),n=lt.overlayOp(t[0],t[1],e);return this.prepareResult(n)},fe.prototype.checkValid=function(e){e.isValid()||ve.out.println("Snapped geometry is invalid")},fe.prototype.computeSnapTolerance=function(){this._snapTolerance=Kt.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},fe.prototype.snap=function(e){var t=this.removeCommonBits(e),n=Kt.snap(t[0],t[1],this._snapTolerance);return n},fe.prototype.interfaces_=function(){return[]},fe.prototype.getClass=function(){return fe},fe.overlayOp=function(e,t,n){var i=new fe(e,t);return i.getResultGeometry(n)},fe.union=function(e,t){return fe.overlayOp(e,t,lt.UNION)},fe.intersection=function(e,t){return fe.overlayOp(e,t,lt.INTERSECTION)},fe.symDifference=function(e,t){return fe.overlayOp(e,t,lt.SYMDIFFERENCE)},fe.difference=function(e,t){return fe.overlayOp(e,t,lt.DIFFERENCE)};var je=function(e,t){this._geom=new Array(2).fill(null),this._geom[0]=e,this._geom[1]=t};je.prototype.getResultGeometry=function(e){var t=null,n=!1,i=null;try{t=lt.overlayOp(this._geom[0],this._geom[1],e);var s=!0;s&&(n=!0)}catch(o){if(o instanceof si)i=o;else throw o}finally{}if(!n)try{t=fe.overlayOp(this._geom[0],this._geom[1],e)}catch(o){throw o instanceof si?i:o}finally{}return t},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je},je.overlayOp=function(e,t,n){var i=new je(e,t);return i.getResultGeometry(n)},je.union=function(e,t){return je.overlayOp(e,t,lt.UNION)},je.intersection=function(e,t){return je.overlayOp(e,t,lt.INTERSECTION)},je.symDifference=function(e,t){return je.overlayOp(e,t,lt.SYMDIFFERENCE)},je.difference=function(e,t){return je.overlayOp(e,t,lt.DIFFERENCE)};var tl=function(){this.mce=null,this.chainIndex=null;var e=arguments[0],t=arguments[1];this.mce=e,this.chainIndex=t};tl.prototype.computeIntersections=function(e,t){this.mce.computeIntersectsForChain(this.chainIndex,e.mce,e.chainIndex,t)},tl.prototype.interfaces_=function(){return[]},tl.prototype.getClass=function(){return tl};var on=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}},Cd={INSERT:{configurable:!0},DELETE:{configurable:!0}};on.prototype.isDelete=function(){return this._eventType===on.DELETE},on.prototype.setDeleteEventIndex=function(e){this._deleteEventIndex=e},on.prototype.getObject=function(){return this._obj},on.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},on.prototype.getInsertEvent=function(){return this._insertEvent},on.prototype.isInsert=function(){return this._eventType===on.INSERT},on.prototype.isSameLabel=function(e){return this._label===null?!1:this._label===e._label},on.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},on.prototype.interfaces_=function(){return[bn]},on.prototype.getClass=function(){return on},Cd.INSERT.get=function(){return 1},Cd.DELETE.get=function(){return 2},Object.defineProperties(on,Cd);var fc=function(){};fc.prototype.interfaces_=function(){return[]},fc.prototype.getClass=function(){return fc};var Se=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};Se.prototype.isTrivialIntersection=function(e,t,n,i){if(e===n&&this._li.getIntersectionNum()===1){if(Se.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},Se.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Se.prototype.setIsDoneIfProperInt=function(e){this._isDoneWhenProperInt=e},Se.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Se.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},Se.prototype.hasProperIntersection=function(){return this._hasProper},Se.prototype.hasIntersection=function(){return this._hasIntersection},Se.prototype.isDone=function(){return this._isDone},Se.prototype.isBoundaryPoint=function(e,t){return t===null?!1:!!(this.isBoundaryPointInternal(e,t[0])||this.isBoundaryPointInternal(e,t[1]))},Se.prototype.setBoundaryNodes=function(e,t){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=e,this._bdyNodes[1]=t},Se.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],u=n.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),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))))},Se.prototype.interfaces_=function(){return[]},Se.prototype.getClass=function(){return Se},Se.isAdjacentSegments=function(e,t){return Math.abs(e-t)===1};var lC=(function(r){function e(){r.call(this),this.events=new G,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;qn.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 Se&&nt(arguments[0],zn)&&nt(arguments[1],zn)){var a=arguments[0],u=arguments[1],l=arguments[2];this.addEdges(a,a),this.addEdges(u,u),this.computeIntersections(l)}else if(typeof arguments[2]=="boolean"&&nt(arguments[0],zn)&&arguments[1]instanceof Se){var c=arguments[0],h=arguments[1],f=arguments[2];f?this.addEdges(c,null):this.addEdges(c),this.computeIntersections(h)}}},e.prototype.addEdge=function(n,i){for(var s=this,o=n.getMonotoneChainEdge(),a=o.getStartIndexes(),u=0;u<a.length-1;u++){var l=new tl(o,u),c=new on(i,o.getMinX(u),l);s.events.add(c),s.events.add(new on(o.getMaxX(u),c))}},e.prototype.processOverlaps=function(n,i,s,o){for(var a=this,u=s.getObject(),l=n;l<i;l++){var c=a.events.get(l);if(c.isInsert()){var h=c.getObject();s.isSameLabel(c)||(u.computeIntersections(h,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],u=arguments[1],l=a.iterator();l.hasNext();){var c=l.next();n.addEdge(c,u)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e})(fc),zr=function(){this._min=ot.POSITIVE_INFINITY,this._max=ot.NEGATIVE_INFINITY},nv={NodeComparator:{configurable:!0}};zr.prototype.getMin=function(){return this._min},zr.prototype.intersects=function(e,t){return!(this._min>t||this._max<e)},zr.prototype.getMax=function(){return this._max},zr.prototype.toString=function(){return jn.toLineString(new x(this._min,0),new x(this._max,0))},zr.prototype.interfaces_=function(){return[]},zr.prototype.getClass=function(){return zr},nv.NodeComparator.get=function(){return el},Object.defineProperties(zr,nv);var el=function(){};el.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},el.prototype.interfaces_=function(){return[ea]},el.prototype.getClass=function(){return el};var cC=(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})(zr),hC=(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})(zr),Ur=function(){this._leaves=new G,this._root=null,this._level=0};Ur.prototype.buildTree=function(){var e=this;qn.sort(this._leaves,new zr.NodeComparator);for(var t=this._leaves,n=null,i=new G;;){if(e.buildLevel(t,i),i.size()===1)return i.get(0);n=t,t=i,i=n}},Ur.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 cC(e,t,n))},Ur.prototype.query=function(e,t,n){this.init(),this._root.query(e,t,n)},Ur.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},Ur.prototype.printNode=function(e){ve.out.println(jn.toLineString(new x(e._min,this._level),new x(e._max,this._level)))},Ur.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},Ur.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 hC(e.get(n),e.get(n+1));t.add(o)}}},Ur.prototype.interfaces_=function(){return[]},Ur.prototype.getClass=function(){return Ur};var _a=function(){this._items=new G};_a.prototype.visitItem=function(e){this._items.add(e)},_a.prototype.getItems=function(){return this._items},_a.prototype.interfaces_=function(){return[Bi]},_a.prototype.getClass=function(){return _a};var wa=function(){this._index=null;var e=arguments[0];if(!nt(e,Vi))throw new Vt("Argument must be Polygonal");this._index=new ws(e)},Sd={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};wa.prototype.locate=function(e){var t=new tr(e),n=new Ea(t);return this._index.query(e.y,e.y,n),t.getLocation()},wa.prototype.interfaces_=function(){return[ma]},wa.prototype.getClass=function(){return wa},Sd.SegmentVisitor.get=function(){return Ea},Sd.IntervalIndexedGeometry.get=function(){return ws},Object.defineProperties(wa,Sd);var Ea=function(){this._counter=null;var e=arguments[0];this._counter=e};Ea.prototype.visitItem=function(e){var t=e;this._counter.countSegment(t.getCoordinate(0),t.getCoordinate(1))},Ea.prototype.interfaces_=function(){return[Bi]},Ea.prototype.getClass=function(){return Ea};var ws=function(){this._index=new Ur;var e=arguments[0];this.init(e)};ws.prototype.init=function(e){for(var t=this,n=we.getLines(e),i=n.iterator();i.hasNext();){var s=i.next(),o=s.getCoordinates();t.addLine(o)}},ws.prototype.addLine=function(e){for(var t=this,n=1;n<e.length;n++){var i=new Y(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)}},ws.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)}},ws.prototype.interfaces_=function(){return[]},ws.prototype.getClass=function(){return ws};var nl=(function(r){function e(){if(r.call(this),this._parentGeom=null,this._lineEdgeMap=new km,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Hn,arguments.length===2){var t=arguments[0],n=arguments[1],i=In.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,u=D.NONE;u=o.getLocation(n,z.ON),u===D.BOUNDARY&&a++;var l=e.determineBoundary(this._boundaryNodeRule,a);o.setLocation(n,l)},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],u=new Se(s,!0,!1);u.setIsDoneIfProperInt(a);var l=this.createEdgeSetIntersector(),c=this._parentGeom instanceof Mr||this._parentGeom instanceof ie||this._parentGeom instanceof Rr,h=o||!c;return l.computeIntersections(this._edges,u,h),this.addSelfIntersectionNodes(this._argIndex),u}},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 Se(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 en){var n=arguments[0],i=n.getCoordinate();this.insertPoint(this._argIndex,i,D.INTERIOR)}else if(arguments[0]instanceof x){var s=arguments[0];this.insertPoint(this._argIndex,s,D.INTERIOR)}},e.prototype.addPolygon=function(n){var i=this;this.addPolygonRing(n.getExteriorRing(),D.EXTERIOR,D.INTERIOR);for(var s=0;s<n.getNumInteriorRing();s++){var o=n.getInteriorRingN(s);i.addPolygonRing(o,D.INTERIOR,D.EXTERIOR)}},e.prototype.addEdge=function(n){this.insertEdge(n);var i=n.getCoordinates();this.insertPoint(this._argIndex,i[0],D.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],D.BOUNDARY)},e.prototype.addLineString=function(n){var i=ft.removeRepeatedPoints(n.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var s=new dc(i,new Tt(this._argIndex,D.INTERIOR));this._lineEdgeMap.put(n,s),this.insertEdge(s),ct.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===D.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=ft.removeRepeatedPoints(n.getCoordinates());if(o.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=o[0],null;var a=i,u=s;W.isCCW(o)&&(a=s,u=i);var l=new dc(o,new Tt(this._argIndex,D.BOUNDARY,a,u));this._lineEdgeMap.put(n,l),this.insertEdge(l),this.insertPoint(this._argIndex,o[0],D.BOUNDARY)},e.prototype.insertPoint=function(n,i,s){var o=this._nodes.addNode(i),a=o.getLabel();a===null?o._label=new Tt(n,s):a.setLocation(n,s)},e.prototype.createEdgeSetIntersector=function(){return new lC},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),u=o.eiList.iterator();u.hasNext();){var l=u.next();i.addSelfIntersectionNode(n,l.coord,a)}},e.prototype.add=function(){if(arguments.length===1){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof Rr&&(this._useBoundaryDeterminationRule=!1),n instanceof ie)this.addPolygon(n);else if(n instanceof Wt)this.addLineString(n);else if(n instanceof en)this.addPoint(n);else if(n instanceof da)this.addCollection(n);else if(n instanceof fs)this.addCollection(n);else if(n instanceof Rr)this.addCollection(n);else if(n instanceof Re)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 nt(this._parentGeom,Vi)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new wa(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)?D.BOUNDARY:D.INTERIOR},e})(Gt),Ca=function(){if(this._li=new cs,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 nl(0,e)}else if(arguments.length===2){var t=arguments[0],n=arguments[1],i=In.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 nl(0,t,i),this._arg[1]=new nl(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 nl(0,s,a),this._arg[1]=new nl(1,o,a)}};Ca.prototype.getArgGeometry=function(e){return this._arg[e].getGeometry()},Ca.prototype.setComputationPrecision=function(e){this._resultPrecisionModel=e,this._li.setPrecisionModel(this._resultPrecisionModel)},Ca.prototype.interfaces_=function(){return[]},Ca.prototype.getClass=function(){return Ca};var Es=function(){};Es.prototype.interfaces_=function(){return[]},Es.prototype.getClass=function(){return Es},Es.map=function(){if(arguments[0]instanceof et&&nt(arguments[1],Es.MapOp)){for(var e=arguments[0],t=arguments[1],n=new G,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(nt(arguments[0],re)&&nt(arguments[1],Es.MapOp)){for(var o=arguments[0],a=arguments[1],u=new G,l=o.iterator();l.hasNext();){var c=l.next(),h=a.map(c);h!==null&&u.add(h)}return u}},Es.MapOp=function(){};var lt=(function(r){function e(){var t=arguments[0],n=arguments[1];r.call(this,t,n),this._ptLocator=new Hn,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Xn,this._resultPolyList=new G,this._resultLineList=new G,this._resultPointList=new G,this._graph=new Gt(new Hm),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 Tt(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 G;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(),u=s._ptLocator.locate(n,a);if(u!==D.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var n=new G,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 G;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),_s.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(n),this.cancelDuplicateResultEdges();var s=new nn(this._geomFact);s.add(this._graph),this._resultPolyList=s.getPolygons();var o=new fr(this,this._geomFact,this._ptLocator);this._resultLineList=o.build(n);var a=new co(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,z.RIGHT),o.getLocation(1,z.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):(ct.isTrue(!o.isNull(a,z.LEFT),"depth of LEFT side has not been initialized"),s.setLocation(a,z.LEFT,o.getLocation(a,z.LEFT)),ct.isTrue(!o.isNull(a,z.RIGHT),"depth of RIGHT side has not been initialized"),s.setLocation(a,z.RIGHT,o.getLocation(a,z.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})(Ca);lt.overlayOp=function(r,e,t){var n=new lt(r,e),i=n.getResultGeometry(t);return i},lt.intersection=function(r,e){if(r.isEmpty()||e.isEmpty())return lt.createEmptyResult(lt.INTERSECTION,r,e,r.getFactory());if(r.isGeometryCollection()){var t=e;return lo.map(r,{interfaces_:function(){return[Es.MapOp]},map:function(n){return n.intersection(t)}})}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(e),je.overlayOp(r,e,lt.INTERSECTION)},lt.symDifference=function(r,e){if(r.isEmpty()||e.isEmpty()){if(r.isEmpty()&&e.isEmpty())return lt.createEmptyResult(lt.SYMDIFFERENCE,r,e,r.getFactory());if(r.isEmpty())return e.copy();if(e.isEmpty())return r.copy()}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(e),je.overlayOp(r,e,lt.SYMDIFFERENCE)},lt.resultDimension=function(r,e,t){var n=e.getDimension(),i=t.getDimension(),s=-1;switch(r){case lt.INTERSECTION:s=Math.min(n,i);break;case lt.UNION:s=Math.max(n,i);break;case lt.DIFFERENCE:s=n;break;case lt.SYMDIFFERENCE:s=Math.max(n,i);break}return s},lt.createEmptyResult=function(r,e,t,n){var i=null;switch(lt.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},lt.difference=function(r,e){return r.isEmpty()?lt.createEmptyResult(lt.DIFFERENCE,r,e,r.getFactory()):e.isEmpty()?r.copy():(r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(e),je.overlayOp(r,e,lt.DIFFERENCE))},lt.isResultOfOp=function(){if(arguments.length===2){var r=arguments[0],e=arguments[1],t=r.getLocation(0),n=r.getLocation(1);return lt.isResultOfOp(t,n,e)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];switch(i===D.BOUNDARY&&(i=D.INTERIOR),s===D.BOUNDARY&&(s=D.INTERIOR),o){case lt.INTERSECTION:return i===D.INTERIOR&&s===D.INTERIOR;case lt.UNION:return i===D.INTERIOR||s===D.INTERIOR;case lt.DIFFERENCE:return i===D.INTERIOR&&s!==D.INTERIOR;case lt.SYMDIFFERENCE:return i===D.INTERIOR&&s!==D.INTERIOR||i!==D.INTERIOR&&s===D.INTERIOR}return!1}},lt.INTERSECTION=1,lt.UNION=2,lt.DIFFERENCE=3,lt.SYMDIFFERENCE=4;var Yi=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Hn,this._seg=new Y;var e=arguments[0],t=arguments[1];this._g=e,this._boundaryDistanceTolerance=t,this._linework=this.extractLinework(e)};Yi.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},Yi.prototype.getLocation=function(e){return this.isWithinToleranceOfBoundary(e)?D.BOUNDARY:this._ptLocator.locate(e,this._g)},Yi.prototype.extractLinework=function(e){var t=new Sa;e.apply(t);var n=t.getLinework(),i=pt.toLineStringArray(n);return e.getFactory().createMultiLineString(i)},Yi.prototype.interfaces_=function(){return[]},Yi.prototype.getClass=function(){return Yi};var Sa=function(){this._linework=null,this._linework=new G};Sa.prototype.getLinework=function(){return this._linework},Sa.prototype.filter=function(e){var t=this;if(e instanceof ie){var n=e;this._linework.add(n.getExteriorRing());for(var i=0;i<n.getNumInteriorRing();i++)t._linework.add(n.getInteriorRingN(i))}},Sa.prototype.interfaces_=function(){return[nr]},Sa.prototype.getClass=function(){return Sa};var Cs=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var e=arguments[0];this._g=e};Cs.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)},Cs.prototype.setSidesToGenerate=function(e,t){this._doLeft=e,this._doRight=t},Cs.prototype.getPoints=function(e){for(var t=this,n=new G,i=we.getLines(this._g),s=i.iterator();s.hasNext();){var o=s.next();t.extractPoints(o,e,n)}return n},Cs.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),u=n*s/a,l=n*o/a,c=(t.x+e.x)/2,h=(t.y+e.y)/2;if(this._doLeft){var f=new x(c-l,h+u);i.add(f)}if(this._doRight){var p=new x(c+l,h-u);i.add(p)}},Cs.prototype.interfaces_=function(){return[]},Cs.prototype.getClass=function(){return Cs};var En=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 G;var e=arguments[0],t=arguments[1],n=arguments[2];this._boundaryDistanceTolerance=r.computeBoundaryDistanceTolerance(e,t),this._geom=[e,t,n],this._locFinder=[new Yi(this._geom[0],this._boundaryDistanceTolerance),new Yi(this._geom[1],this._boundaryDistanceTolerance),new Yi(this._geom[2],this._boundaryDistanceTolerance)]},rv={TOLERANCE:{configurable:!0}};En.prototype.reportResult=function(e,t,n){ve.out.println("Overlay result invalid - A:"+D.toLocationSymbol(t[0])+" B:"+D.toLocationSymbol(t[1])+" expected:"+(n?"i":"e")+" actual:"+D.toLocationSymbol(t[2]))},En.prototype.isValid=function(e){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var t=this.checkValid(e);return t},En.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),En.hasLocation(this._location,D.BOUNDARY)?!0:this.isValidResult(s,this._location)}},En.prototype.addTestPts=function(e){var t=new Cs(e);this._testCoords.addAll(t.getPoints(5*this._boundaryDistanceTolerance))},En.prototype.isValidResult=function(e,t){var n=lt.isResultOfOp(t[0],t[1],e),i=t[2]===D.INTERIOR,s=!(n^i);return s||this.reportResult(e,t,n),s},En.prototype.getInvalidLocation=function(){return this._invalidLocation},En.prototype.interfaces_=function(){return[]},En.prototype.getClass=function(){return En},En.hasLocation=function(e,t){for(var n=0;n<3;n++)if(e[n]===t)return!0;return!1},En.computeBoundaryDistanceTolerance=function(e,t){return Math.min(Kt.computeSizeBasedSnapTolerance(e),Kt.computeSizeBasedSnapTolerance(t))},En.isValid=function(e,t,n,i){var s=new En(e,t,i);return s.isValid(n)},rv.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(En,rv);var Cn=function r(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=r.extractFactory(e),this._inputGeoms=e};Cn.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)}},Cn.prototype.combine=function(){for(var e=this,t=new G,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)},Cn.prototype.interfaces_=function(){return[]},Cn.prototype.getClass=function(){return Cn},Cn.combine=function(){if(arguments.length===1){var e=arguments[0],t=new Cn(e);return t.combine()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=new Cn(Cn.createList(n,i));return s.combine()}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2],l=new Cn(Cn.createList(o,a,u));return l.combine()}},Cn.extractFactory=function(e){return e.isEmpty()?null:e.iterator().next().getFactory()},Cn.createList=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],n=new G;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 G;return a.add(i),a.add(s),a.add(o),a}};var ee=function(){this._inputPolys=null,this._geomFactory=null;var e=arguments[0];this._inputPolys=e,this._inputPolys===null&&(this._inputPolys=new G)},iv={STRTREE_NODE_CAPACITY:{configurable:!0}};ee.prototype.reduceToGeometries=function(e){for(var t=this,n=new G,i=e.iterator();i.hasNext();){var s=i.next(),o=null;nt(s,zn)?o=t.unionTree(s):s instanceof et&&(o=s),n.add(o)}return n},ee.prototype.extractByEnvelope=function(e,t,n){for(var i=new G,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)},ee.prototype.unionOptimized=function(e,t){var n=e.getEnvelopeInternal(),i=t.getEnvelopeInternal();if(!n.intersects(i)){var s=Cn.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)},ee.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 zm(ee.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},ee.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=ee.getGeometry(t,n);return this.unionSafe(s,null)}else{if(i-n===2)return this.unionSafe(ee.getGeometry(t,n),ee.getGeometry(t,n+1));var o=Math.trunc((i+n)/2),a=this.binaryUnion(t,n,o),u=this.binaryUnion(t,o,i);return this.unionSafe(a,u)}}},ee.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},ee.prototype.unionSafe=function(e,t){return e===null&&t===null?null:e===null?t.copy():t===null?e.copy():this.unionOptimized(e,t)},ee.prototype.unionActual=function(e,t){return ee.restrictToPolygons(e.union(t))},ee.prototype.unionTree=function(e){var t=this.reduceToGeometries(e),n=this.binaryUnion(t);return n},ee.prototype.unionUsingEnvelopeIntersection=function(e,t,n){var i=new G,s=this.extractByEnvelope(n,e,i),o=this.extractByEnvelope(n,t,i),a=this.unionActual(s,o);i.add(a);var u=Cn.combine(i);return u},ee.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(),u=a.createGeometryCollection([s,o]),l=u.buffer(0);return l}},ee.prototype.interfaces_=function(){return[]},ee.prototype.getClass=function(){return ee},ee.restrictToPolygons=function(e){if(nt(e,Vi))return e;var t=gi.getPolygons(e);return t.size()===1?t.get(0):e.getFactory().createMultiPolygon(pt.toPolygonArray(t))},ee.getGeometry=function(e,t){return t>=e.size()?null:e.get(t)},ee.union=function(e){var t=new ee(e);return t.union()},iv.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(ee,iv);var pc=function(){};pc.prototype.interfaces_=function(){return[]},pc.prototype.getClass=function(){return pc},pc.union=function(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return lt.createEmptyResult(lt.UNION,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),je.overlayOp(e,t,lt.UNION)};function Ss(){return new gc}function gc(){this.reset()}gc.prototype={constructor:gc,reset:function(){this.s=this.t=0},add:function(r){sv(mc,r,this.t),sv(this,mc.s,this.s),this.s?this.t+=mc.t:this.s=mc.t},valueOf:function(){return this.s}};var mc=new gc;function sv(r,e,t){var n=r.s=e+t,i=n-e,s=n-i;r.t=e-s+(t-i)}var Xt=1e-6,Ot=Math.PI,mi=Ot/2,ov=Ot/4,vi=Ot*2,bs=180/Ot,pr=Ot/180,ze=Math.abs,dC=Math.atan,ba=Math.atan2,oe=Math.cos,ae=Math.sin,Pa=Math.sqrt;function av(r){return r>1?0:r<-1?Ot:Math.acos(r)}function fo(r){return r>1?mi:r<-1?-mi:Math.asin(r)}function rl(){}function vc(r,e){r&&lv.hasOwnProperty(r.type)&&lv[r.type](r,e)}var uv={Feature:function(r,e){vc(r.geometry,e)},FeatureCollection:function(r,e){for(var t=r.features,n=-1,i=t.length;++n<i;)vc(t[n].geometry,e)}},lv={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){bd(r.coordinates,e,0)},MultiLineString:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)bd(t[n],e,0)},Polygon:function(r,e){cv(r.coordinates,e)},MultiPolygon:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)cv(t[n],e)},GeometryCollection:function(r,e){for(var t=r.geometries,n=-1,i=t.length;++n<i;)vc(t[n],e)}};function bd(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 cv(r,e){var t=-1,n=r.length;for(e.polygonStart();++t<n;)bd(r[t],e,1);e.polygonEnd()}function fC(r,e){r&&uv.hasOwnProperty(r.type)?uv[r.type](r,e):vc(r,e)}Ss(),Ss();function Pd(r){return[ba(r[1],r[0]),fo(r[2])]}function Ia(r){var e=r[0],t=r[1],n=oe(t);return[n*oe(e),n*ae(e),ae(t)]}function yc(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function _c(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 Id(r,e){r[0]+=e[0],r[1]+=e[1],r[2]+=e[2]}function wc(r,e){return[r[0]*e,r[1]*e,r[2]*e]}function xd(r){var e=Pa(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);r[0]/=e,r[1]/=e,r[2]/=e}Ss();function hv(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 Td(r,e){return[r>Ot?r-vi:r<-Ot?r+vi:r,e]}Td.invert=Td;function pC(r,e,t){return(r%=vi)?e||t?hv(fv(r),pv(e,t)):fv(r):e||t?pv(e,t):Td}function dv(r){return function(e,t){return e+=r,[e>Ot?e-vi:e<-Ot?e+vi:e,t]}}function fv(r){var e=dv(r);return e.invert=dv(-r),e}function pv(r,e){var t=oe(r),n=ae(r),i=oe(e),s=ae(e);function o(a,u){var l=oe(u),c=oe(a)*l,h=ae(a)*l,f=ae(u),p=f*t+c*n;return[ba(h*i-p*s,c*t-f*n),fo(p*i+h*s)]}return o.invert=function(a,u){var l=oe(u),c=oe(a)*l,h=ae(a)*l,f=ae(u),p=f*i-h*s;return[ba(h*i+f*s,c*t+p*n),fo(p*t-c*n)]},o}function gC(r,e,t,n,i,s){if(t){var o=oe(e),a=ae(e),u=n*t;i==null?(i=e+n*vi,s=e-u/2):(i=gv(o,i),s=gv(o,s),(n>0?i<s:i>s)&&(i+=n*vi));for(var l,c=i;n>0?c>s:c<s;c-=u)l=Pd([o,-a*oe(c),-a*ae(c)]),r.point(l[0],l[1])}}function gv(r,e){e=Ia(e),e[0]-=r,xd(e);var t=av(-e[1]);return((-e[2]<0?-t:t)+vi-Xt)%vi}function mv(){var r=[],e;return{point:function(t,n){e.push([t,n])},lineStart:function(){r.push(e=[])},lineEnd:rl,rejoin:function(){r.length>1&&r.push(r.pop().concat(r.shift()))},result:function(){var t=r;return r=[],e=null,t}}}function mC(r,e,t,n,i,s){var o=r[0],a=r[1],u=e[0],l=e[1],c=0,h=1,f=u-o,p=l-a,m;if(m=t-o,!(!f&&m>0)){if(m/=f,f<0){if(m<c)return;m<h&&(h=m)}else if(f>0){if(m>h)return;m>c&&(c=m)}if(m=i-o,!(!f&&m<0)){if(m/=f,f<0){if(m>h)return;m>c&&(c=m)}else if(f>0){if(m<c)return;m<h&&(h=m)}if(m=n-a,!(!p&&m>0)){if(m/=p,p<0){if(m<c)return;m<h&&(h=m)}else if(p>0){if(m>h)return;m>c&&(c=m)}if(m=s-a,!(!p&&m<0)){if(m/=p,p<0){if(m>h)return;m>c&&(c=m)}else if(p>0){if(m<c)return;m<h&&(h=m)}return c>0&&(r[0]=o+c*f,r[1]=a+c*p),h<1&&(e[0]=o+h*f,e[1]=a+h*p),!0}}}}}function Ec(r,e){return ze(r[0]-e[0])<Xt&&ze(r[1]-e[1])<Xt}function Cc(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 vv(r,e,t,n,i){var s=[],o=[],a,u;if(r.forEach(function(m){if(!((w=m.length-1)<=0)){var w,E=m[0],b=m[w],v;if(Ec(E,b)){for(i.lineStart(),a=0;a<w;++a)i.point((E=m[a])[0],E[1]);i.lineEnd();return}s.push(v=new Cc(E,m,null,!0)),o.push(v.o=new Cc(E,null,v,!1)),s.push(v=new Cc(b,m,null,!1)),o.push(v.o=new Cc(b,null,v,!0))}}),!!s.length){for(o.sort(e),yv(s),yv(o),a=0,u=o.length;a<u;++a)o[a].e=t=!t;for(var l=s[0],c,h;;){for(var f=l,p=!0;f.v;)if((f=f.n)===l)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(a=0,u=c.length;a<u;++a)i.point((h=c[a])[0],h[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((h=c[a])[0],h[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 yv(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 _v(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function vC(r){return r.length===1&&(r=yC(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 yC(r){return function(e,t){return _v(r(e),t)}}vC(_v);function wv(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 il=1e9,Sc=-il;function _C(r,e,t,n){function i(l,c){return r<=l&&l<=t&&e<=c&&c<=n}function s(l,c,h,f){var p=0,m=0;if(l==null||(p=o(l,h))!==(m=o(c,h))||u(l,c)<0^h>0)do f.point(p===0||p===3?r:t,p>1?n:e);while((p=(p+h+4)%4)!==m);else f.point(c[0],c[1])}function o(l,c){return ze(l[0]-r)<Xt?c>0?0:3:ze(l[0]-t)<Xt?c>0?2:1:ze(l[1]-e)<Xt?c>0?1:0:c>0?3:2}function a(l,c){return u(l.x,c.x)}function u(l,c){var h=o(l,1),f=o(c,1);return h!==f?h-f:h===0?c[1]-l[1]:h===1?l[0]-c[0]:h===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,h=mv(),f,p,m,w,E,b,v,y,_,C,S,P={point:T,lineStart:L,lineEnd:M,polygonStart:F,polygonEnd:N};function T(J,st){i(J,st)&&c.point(J,st)}function R(){for(var J=0,st=0,gt=p.length;st<gt;++st)for(var Ft=p[st],ne=1,dn=Ft.length,Bt=Ft[0],kt,be,du=Bt[0],Vs=Bt[1];ne<dn;++ne)kt=du,be=Vs,Bt=Ft[ne],du=Bt[0],Vs=Bt[1],be<=n?Vs>n&&(du-kt)*(n-be)>(Vs-be)*(r-kt)&&++J:Vs<=n&&(du-kt)*(n-be)<(Vs-be)*(r-kt)&&--J;return J}function F(){c=h,f=[],p=[],S=!0}function N(){var J=R(),st=S&&J,gt=(f=wv(f)).length;(st||gt)&&(l.polygonStart(),st&&(l.lineStart(),s(null,null,1,l),l.lineEnd()),gt&&vv(f,a,J,s,l),l.polygonEnd()),c=l,f=p=m=null}function L(){P.point=k,p&&p.push(m=[]),C=!0,_=!1,v=y=NaN}function M(){f&&(k(w,E),b&&_&&h.rejoin(),f.push(h.result())),P.point=T,_&&c.lineEnd()}function k(J,st){var gt=i(J,st);if(p&&m.push([J,st]),C)w=J,E=st,b=gt,C=!1,gt&&(c.lineStart(),c.point(J,st));else if(gt&&_)c.point(J,st);else{var Ft=[v=Math.max(Sc,Math.min(il,v)),y=Math.max(Sc,Math.min(il,y))],ne=[J=Math.max(Sc,Math.min(il,J)),st=Math.max(Sc,Math.min(il,st))];mC(Ft,ne,r,e,t,n)?(_||(c.lineStart(),c.point(Ft[0],Ft[1])),c.point(ne[0],ne[1]),gt||c.lineEnd(),S=!1):gt&&(c.lineStart(),c.point(J,st),S=!1)}v=J,y=st,_=gt}return P}}var Nd=Ss();function wC(r,e){var t=e[0],n=e[1],i=[ae(t),-oe(t),0],s=0,o=0;Nd.reset();for(var a=0,u=r.length;a<u;++a)if(c=(l=r[a]).length)for(var l,c,h=l[c-1],f=h[0],p=h[1]/2+ov,m=ae(p),w=oe(p),E=0;E<c;++E,f=v,m=_,w=C,h=b){var b=l[E],v=b[0],y=b[1]/2+ov,_=ae(y),C=oe(y),S=v-f,P=S>=0?1:-1,T=P*S,R=T>Ot,F=m*_;if(Nd.add(ba(F*P*ae(T),w*C+F*oe(T))),s+=R?S+P*vi:S,R^f>=t^v>=t){var N=_c(Ia(h),Ia(b));xd(N);var L=_c(i,N);xd(L);var M=(R^S>=0?-1:1)*fo(L[2]);(n>M||n===M&&(N[0]||N[1]))&&(o+=R^S>=0?1:-1)}}return(s<-Xt||s<Xt&&Nd<-Xt)^o&1}Ss();function Ev(r){return r}Ss(),Ss();var xa=1/0,bc=xa,sl=-xa,Pc=sl,Cv={point:EC,lineStart:rl,lineEnd:rl,polygonStart:rl,polygonEnd:rl,result:function(){var r=[[xa,bc],[sl,Pc]];return sl=Pc=-(bc=xa=1/0),r}};function EC(r,e){r<xa&&(xa=r),r>sl&&(sl=r),e<bc&&(bc=e),e>Pc&&(Pc=e)}Ss();function Sv(r,e,t,n){return function(i,s){var o=e(s),a=i.invert(n[0],n[1]),u=mv(),l=e(u),c=!1,h,f,p,m={point:w,lineStart:b,lineEnd:v,polygonStart:function(){m.point=y,m.lineStart=_,m.lineEnd=C,f=[],h=[]},polygonEnd:function(){m.point=w,m.lineStart=b,m.lineEnd=v,f=wv(f);var S=wC(h,a);f.length?(c||(s.polygonStart(),c=!0),vv(f,SC,S,t,s)):S&&(c||(s.polygonStart(),c=!0),s.lineStart(),t(null,null,1,s),s.lineEnd()),c&&(s.polygonEnd(),c=!1),f=h=null},sphere:function(){s.polygonStart(),s.lineStart(),t(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function w(S,P){var T=i(S,P);r(S=T[0],P=T[1])&&s.point(S,P)}function E(S,P){var T=i(S,P);o.point(T[0],T[1])}function b(){m.point=E,o.lineStart()}function v(){m.point=w,o.lineEnd()}function y(S,P){p.push([S,P]);var T=i(S,P);l.point(T[0],T[1])}function _(){l.lineStart(),p=[]}function C(){y(p[0][0],p[0][1]),l.lineEnd();var S=l.clean(),P=u.result(),T,R=P.length,F,N,L;if(p.pop(),h.push(p),p=null,!!R){if(S&1){if(N=P[0],(F=N.length-1)>0){for(c||(s.polygonStart(),c=!0),s.lineStart(),T=0;T<F;++T)s.point((L=N[T])[0],L[1]);s.lineEnd()}return}R>1&&S&2&&P.push(P.pop().concat(P.shift())),f.push(P.filter(CC))}}return m}}function CC(r){return r.length>1}function SC(r,e){return((r=r.x)[0]<0?r[1]-mi-Xt:mi-r[1])-((e=e.x)[0]<0?e[1]-mi-Xt:mi-e[1])}const bv=Sv(function(){return!0},bC,IC,[-Ot,-mi]);function bC(r){var e=NaN,t=NaN,n=NaN,i;return{lineStart:function(){r.lineStart(),i=1},point:function(s,o){var a=s>0?Ot:-Ot,u=ze(s-e);ze(u-Ot)<Xt?(r.point(e,t=(t+o)/2>0?mi:-mi),r.point(n,t),r.lineEnd(),r.lineStart(),r.point(a,t),r.point(s,t),i=0):n!==a&&u>=Ot&&(ze(e-n)<Xt&&(e-=n*Xt),ze(s-a)<Xt&&(s-=a*Xt),t=PC(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 PC(r,e,t,n){var i,s,o=ae(r-t);return ze(o)>Xt?dC((ae(e)*(s=oe(n))*ae(t)-ae(n)*(i=oe(e))*ae(r))/(i*s*o)):(e+n)/2}function IC(r,e,t,n){var i;if(r==null)i=t*mi,n.point(-Ot,i),n.point(0,i),n.point(Ot,i),n.point(Ot,0),n.point(Ot,-i),n.point(0,-i),n.point(-Ot,-i),n.point(-Ot,0),n.point(-Ot,i);else if(ze(r[0]-e[0])>Xt){var s=r[0]<e[0]?Ot:-Ot;i=t*s/2,n.point(-s,i),n.point(0,i),n.point(s,i)}else n.point(e[0],e[1])}function xC(r,e){var t=oe(r),n=t>0,i=ze(t)>Xt;function s(c,h,f,p){gC(p,r,e,f,c,h)}function o(c,h){return oe(c)*oe(h)>t}function a(c){var h,f,p,m,w;return{lineStart:function(){m=p=!1,w=1},point:function(E,b){var v=[E,b],y,_=o(E,b),C=n?_?0:l(E,b):_?l(E+(E<0?Ot:-Ot),b):0;if(!h&&(m=p=_)&&c.lineStart(),_!==p&&(y=u(h,v),(!y||Ec(h,y)||Ec(v,y))&&(v[0]+=Xt,v[1]+=Xt,_=o(v[0],v[1]))),_!==p)w=0,_?(c.lineStart(),y=u(v,h),c.point(y[0],y[1])):(y=u(h,v),c.point(y[0],y[1]),c.lineEnd()),h=y;else if(i&&h&&n^_){var S;!(C&f)&&(S=u(v,h,!0))&&(w=0,n?(c.lineStart(),c.point(S[0][0],S[0][1]),c.point(S[1][0],S[1][1]),c.lineEnd()):(c.point(S[1][0],S[1][1]),c.lineEnd(),c.lineStart(),c.point(S[0][0],S[0][1])))}_&&(!h||!Ec(h,v))&&c.point(v[0],v[1]),h=v,p=_,f=C},lineEnd:function(){p&&c.lineEnd(),h=null},clean:function(){return w|(m&&p)<<1}}}function u(c,h,f){var p=Ia(c),m=Ia(h),w=[1,0,0],E=_c(p,m),b=yc(E,E),v=E[0],y=b-v*v;if(!y)return!f&&c;var _=t*b/y,C=-t*v/y,S=_c(w,E),P=wc(w,_),T=wc(E,C);Id(P,T);var R=S,F=yc(P,R),N=yc(R,R),L=F*F-N*(yc(P,P)-1);if(!(L<0)){var M=Pa(L),k=wc(R,(-F-M)/N);if(Id(k,P),k=Pd(k),!f)return k;var J=c[0],st=h[0],gt=c[1],Ft=h[1],ne;st<J&&(ne=J,J=st,st=ne);var dn=st-J,Bt=ze(dn-Ot)<Xt,kt=Bt||dn<Xt;if(!Bt&&Ft<gt&&(ne=gt,gt=Ft,Ft=ne),kt?Bt?gt+Ft>0^k[1]<(ze(k[0]-J)<Xt?gt:Ft):gt<=k[1]&&k[1]<=Ft:dn>Ot^(J<=k[0]&&k[0]<=st)){var be=wc(R,(-F+M)/N);return Id(be,P),[k,Pd(be)]}}}function l(c,h){var f=n?r:Ot-r,p=0;return c<-f?p|=1:c>f&&(p|=2),h<-f?p|=4:h>f&&(p|=8),p}return Sv(o,a,s,n?[0,-r]:[-Ot,r-Ot])}function Pv(r){return function(e){var t=new Od;for(var n in r)t[n]=r[n];return t.stream=e,t}}function Od(){}Od.prototype={constructor:Od,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 Iv(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),fC(t,r.stream(Cv));var o=Cv.result(),a=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),u=+e[0][0]+(n-a*(o[1][0]+o[0][0]))/2,l=+e[0][1]+(i-a*(o[1][1]+o[0][1]))/2;return s!=null&&r.clipExtent(s),r.scale(a*150).translate([u,l])}function TC(r,e,t){return Iv(r,[[0,0],e],t)}var xv=16,NC=oe(30*pr);function Tv(r,e){return+e?DC(r,e):OC(r)}function OC(r){return Pv({point:function(e,t){e=r(e,t),this.stream.point(e[0],e[1])}})}function DC(r,e){function t(n,i,s,o,a,u,l,c,h,f,p,m,w,E){var b=l-n,v=c-i,y=b*b+v*v;if(y>4*e&&w--){var _=o+f,C=a+p,S=u+m,P=Pa(_*_+C*C+S*S),T=fo(S/=P),R=ze(ze(S)-1)<Xt||ze(s-h)<Xt?(s+h)/2:ba(C,_),F=r(R,T),N=F[0],L=F[1],M=N-n,k=L-i,J=v*M-b*k;(J*J/y>e||ze((b*M+v*k)/y-.5)>.3||o*f+a*p+u*m<NC)&&(t(n,i,s,o,a,u,N,L,R,_/=P,C/=P,S,w,E),E.point(N,L),t(N,L,R,_,C,S,l,c,h,f,p,m,w,E))}}return function(n){var i,s,o,a,u,l,c,h,f,p,m,w,E={point:b,lineStart:v,lineEnd:_,polygonStart:function(){n.polygonStart(),E.lineStart=C},polygonEnd:function(){n.polygonEnd(),E.lineStart=v}};function b(T,R){T=r(T,R),n.point(T[0],T[1])}function v(){h=NaN,E.point=y,n.lineStart()}function y(T,R){var F=Ia([T,R]),N=r(T,R);t(h,f,c,p,m,w,h=N[0],f=N[1],c=T,p=F[0],m=F[1],w=F[2],xv,n),n.point(h,f)}function _(){E.point=b,n.lineEnd()}function C(){v(),E.point=S,E.lineEnd=P}function S(T,R){y(i=T,R),s=h,o=f,a=p,u=m,l=w,E.point=y}function P(){t(h,f,c,p,m,w,s,o,i,a,u,l,xv,n),E.lineEnd=_,_()}return E}}var MC=Pv({point:function(r,e){this.stream.point(r*pr,e*pr)}});function RC(r){return LC(function(){return r})()}function LC(r){var e,t=150,n=480,i=250,s,o,a=0,u=0,l=0,c=0,h=0,f,p,m=null,w=bv,E=null,b,v,y,_=Ev,C=.5,S=Tv(N,C),P,T;function R(k){return k=p(k[0]*pr,k[1]*pr),[k[0]*t+s,o-k[1]*t]}function F(k){return k=p.invert((k[0]-s)/t,(o-k[1])/t),k&&[k[0]*bs,k[1]*bs]}function N(k,J){return k=e(k,J),[k[0]*t+s,o-k[1]*t]}R.stream=function(k){return P&&T===k?P:P=MC(w(f,S(_(T=k))))},R.clipAngle=function(k){return arguments.length?(w=+k?xC(m=k*pr,6*pr):(m=null,bv),M()):m*bs},R.clipExtent=function(k){return arguments.length?(_=k==null?(E=b=v=y=null,Ev):_C(E=+k[0][0],b=+k[0][1],v=+k[1][0],y=+k[1][1]),M()):E==null?null:[[E,b],[v,y]]},R.scale=function(k){return arguments.length?(t=+k,L()):t},R.translate=function(k){return arguments.length?(n=+k[0],i=+k[1],L()):[n,i]},R.center=function(k){return arguments.length?(a=k[0]%360*pr,u=k[1]%360*pr,L()):[a*bs,u*bs]},R.rotate=function(k){return arguments.length?(l=k[0]%360*pr,c=k[1]%360*pr,h=k.length>2?k[2]%360*pr:0,L()):[l*bs,c*bs,h*bs]},R.precision=function(k){return arguments.length?(S=Tv(N,C=k*k),M()):Pa(C)},R.fitExtent=function(k,J){return Iv(R,k,J)},R.fitSize=function(k,J){return TC(R,k,J)};function L(){p=hv(f=pC(l,c,h),e);var k=e(a,u);return s=n-k[0]*t,o=i+k[1]*t,M()}function M(){return P=T=null,R}return function(){return e=r.apply(this,arguments),R.invert=e.invert&&F,L()}}function Nv(r){return function(e,t){var n=oe(e),i=oe(t),s=r(n*i);return[s*i*ae(e),s*ae(t)]}}function Ov(r){return function(e,t){var n=Pa(e*e+t*t),i=r(n),s=ae(i),o=oe(i);return[ba(e*s,n*o),fo(n&&t*s/n)]}}var AC=Nv(function(r){return Pa(2/(1+r))});AC.invert=Ov(function(r){return 2*fo(r/2)});var Dv=Nv(function(r){return(r=av(r))&&r/ae(r)});Dv.invert=Ov(function(r){return r});function FC(){return RC(Dv).scale(79.4188).clipAngle(180-.001)}function Mv(r,e){return[r,e]}Mv.invert=Mv;function kC(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 Wl(r,function(o){var a=Ic(o,e,n,i);a&&s.push(a)}),Yo(s);case"FeatureCollection":return Gl(r,function(o){var a=Ic(o,e,n,i);a&&Gl(a,function(u){u&&s.push(u)})}),Yo(s)}return Ic(r,e,n,i)}function Ic(r,e,t,n){var i=r.properties||{},s=r.type==="Feature"?r.geometry:r;if(s.type==="GeometryCollection"){var o=[];return Wl(r,function(w){var E=Ic(w,e,t,n);E&&o.push(E)}),Yo(o)}var a=VC(s),u={type:s.type,coordinates:Lv(s.coordinates,a)},l=new pd,c=l.read(u),h=Gh(Wh(e,t),"meters"),f=_e.bufferOp(c,h,n),p=new Bm;if(f=p.write(f),!Rv(f.coordinates)){var m={type:f.type,coordinates:Av(f.coordinates,a)};return Ir(m,i)}}function Rv(r){return Array.isArray(r[0])?Rv(r[0]):isNaN(r[0])}function Lv(r,e){return typeof r[0]!="object"?e(r):r.map(function(t){return Lv(t,e)})}function Av(r,e){return typeof r[0]!="object"?e.invert(r):r.map(function(t){return Av(t,e)})}function VC(r){var e=YE(r).geometry.coordinates,t=[-e[0],-e[1]];return FC().rotate(t).scale(Ge)}function BC(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(Jo(r,e,o*-360/n,t).geometry.coordinates);return s.push(s[0]),fn([s],i)}/**
|
|
45
45
|
* splaytree v3.1.2
|
|
46
46
|
* Fast Splay tree for Node and browser
|
|
47
47
|
*
|
|
@@ -61,11 +61,11 @@ ${u.map(c=>`${c.id} ${c.typeName}
|
|
|
61
61
|
|
|
62
62
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
63
63
|
and limitations under the License.
|
|
64
|
-
***************************************************************************** */function
|
|
65
|
-
`);var s=t+(e?" ":"│ ");n.left&&Ic(n.left,s,!1,r,i),n.right&&Ic(n.right,s,!0,r,i)}}var Pc=(function(){function n(t){t===void 0&&(t=d_),this._root=null,this._size=0,this._comparator=t}return n.prototype.insert=function(t,e){return this._size++,this._root=Cc(t,e,this._root,this._comparator)},n.prototype.add=function(t,e){var r=new Wi(t,e);this._root===null&&(r.left=r.right=null,this._size++,this._root=r);var i=this._comparator,s=qi(t,this._root,i),o=i(t,s.key);return o===0?this._root=s:(o<0?(r.left=s.left,r.right=s,s.left=null):o>0&&(r.right=s.right,r.left=s,s.right=null),this._size++,this._root=r),this._root},n.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},n.prototype._remove=function(t,e,r){var i;if(e===null)return null;e=qi(t,e,r);var s=r(t,e.key);return s===0?(e.left===null?i=e.right:(i=qi(t,e.left,r),i.right=e.right),this._size--,i):e},n.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=qi(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},n.prototype.findStatic=function(t){for(var e=this._root,r=this._comparator;e;){var i=r(t,e.key);if(i===0)return e;i<0?e=e.left:e=e.right}return null},n.prototype.find=function(t){return this._root&&(this._root=qi(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},n.prototype.contains=function(t){for(var e=this._root,r=this._comparator;e;){var i=r(t,e.key);if(i===0)return!0;i<0?e=e.left:e=e.right}return!1},n.prototype.forEach=function(t,e){for(var r=this._root,i=[],s=!1;!s;)r!==null?(i.push(r),r=r.left):i.length!==0?(r=i.pop(),t.call(e,r),r=r.right):s=!0;return this},n.prototype.range=function(t,e,r,i){for(var s=[],o=this._comparator,a=this._root,u;s.length!==0||a;)if(a)s.push(a),a=a.left;else{if(a=s.pop(),u=o(a.key,e),u>0)break;if(o(a.key,t)>=0&&r.call(i,a))return this;a=a.right}return this},n.prototype.keys=function(){var t=[];return this.forEach(function(e){var r=e.key;return t.push(r)}),t},n.prototype.values=function(){var t=[];return this.forEach(function(e){var r=e.data;return t.push(r)}),t},n.prototype.min=function(){return this._root?this.minNode(this._root).key:null},n.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},n.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},n.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},n.prototype.at=function(t){for(var e=this._root,r=!1,i=0,s=[];!r;)if(e)s.push(e),e=e.left;else if(s.length>0){if(e=s.pop(),i===t)return e;i++,e=e.right}else r=!0;return null},n.prototype.next=function(t){var e=this._root,r=null;if(t.right){for(r=t.right;r.left;)r=r.left;return r}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?(r=e,e=e.left):e=e.right}return r},n.prototype.prev=function(t){var e=this._root,r=null;if(t.left!==null){for(r=t.left;r.right;)r=r.right;return r}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?e=e.left:(r=e,e=e.right)}return r},n.prototype.clear=function(){return this._root=null,this._size=0,this},n.prototype.toList=function(){return m_(this._root)},n.prototype.load=function(t,e,r){e===void 0&&(e=[]),r===void 0&&(r=!1);var i=t.length,s=this._comparator;if(r&&Tc(t,e,0,i-1,s),this._root===null)this._root=bc(t,e,0,i),this._size=i;else{var o=v_(this.toList(),g_(t,e),s);i=this._size+i,this._root=Nc({head:o},0,i)}return this},n.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),n.prototype.toString=function(t){t===void 0&&(t=function(r){return String(r.key)});var e=[];return Ic(this._root,"",!0,function(r){return e.push(r)},t),e.join("")},n.prototype.update=function(t,e,r){var i=this._comparator,s=xp(t,this._root,i),o=s.left,a=s.right;i(t,e)<0?a=Cc(e,r,a,i):o=Cc(e,r,o,i),this._root=p_(o,a,i)},n.prototype.split=function(t){return xp(t,this._root,this._comparator)},n.prototype[Symbol.iterator]=function(){var t,e,r;return f_(this,function(i){switch(i.label){case 0:t=this._root,e=[],r=!1,i.label=1;case 1:return r?[3,6]:t===null?[3,2]:(e.push(t),t=t.left,[3,5]);case 2:return e.length===0?[3,4]:(t=e.pop(),[4,t]);case 3:return i.sent(),t=t.right,[3,5];case 4:r=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},n})();function bc(n,t,e,r){var i=r-e;if(i>0){var s=e+Math.floor(i/2),o=n[s],a=t[s],u=new Wi(o,a);return u.left=bc(n,t,e,s),u.right=bc(n,t,s+1,r),u}return null}function g_(n,t){for(var e=new Wi(null,null),r=e,i=0;i<n.length;i++)r=r.next=new Wi(n[i],t[i]);return r.next=null,e.next}function m_(n){for(var t=n,e=[],r=!1,i=new Wi(null,null),s=i;!r;)t?(e.push(t),t=t.left):e.length>0?(t=s=s.next=e.pop(),t=t.right):r=!0;return s.next=null,i.next}function Nc(n,t,e){var r=e-t;if(r>0){var i=t+Math.floor(r/2),s=Nc(n,t,i),o=n.head;return o.left=s,n.head=n.head.next,o.right=Nc(n,i+1,e),o}return null}function v_(n,t,e){for(var r=new Wi(null,null),i=r,s=n,o=t;s!==null&&o!==null;)e(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),r.next}function Tc(n,t,e,r,i){if(!(e>=r)){for(var s=n[e+r>>1],o=e-1,a=r+1;;){do o++;while(i(n[o],s)<0);do a--;while(i(n[a],s)>0);if(o>=a)break;var u=n[o];n[o]=n[a],n[a]=u,u=t[o],t[o]=t[a],t[a]=u}Tc(n,t,e,a,i),Tc(n,t,a+1,r,i)}}const ja=(n,t)=>n.ll.x<=t.x&&t.x<=n.ur.x&&n.ll.y<=t.y&&t.y<=n.ur.y,xc=(n,t)=>{if(t.ur.x<n.ll.x||n.ur.x<t.ll.x||t.ur.y<n.ll.y||n.ur.y<t.ll.y)return null;const e=n.ll.x<t.ll.x?t.ll.x:n.ll.x,r=n.ur.x<t.ur.x?n.ur.x:t.ur.x,i=n.ll.y<t.ll.y?t.ll.y:n.ll.y,s=n.ur.y<t.ur.y?n.ur.y:t.ur.y;return{ll:{x:e,y:i},ur:{x:r,y:s}}};let Xi=Number.EPSILON;Xi===void 0&&(Xi=Math.pow(2,-52));const y_=Xi*Xi,Op=(n,t)=>{if(-Xi<n&&n<Xi&&-Xi<t&&t<Xi)return 0;const e=n-t;return e*e<y_*n*t?0:n<t?-1:1};class __{constructor(){this.reset()}reset(){this.xRounder=new Mp,this.yRounder=new Mp}round(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}class Mp{constructor(){this.tree=new Pc,this.round(0)}round(t){const e=this.tree.add(t),r=this.tree.prev(e);if(r!==null&&Op(e.key,r.key)===0)return this.tree.remove(t),r.key;const i=this.tree.next(e);return i!==null&&Op(e.key,i.key)===0?(this.tree.remove(t),i.key):t}}const Za=new __,$u=(n,t)=>n.x*t.y-n.y*t.x,Dp=(n,t)=>n.x*t.x+n.y*t.y,Lp=(n,t,e)=>{const r=Zf(n.x,n.y,t.x,t.y,e.x,e.y);return r>0?-1:r<0?1:0},tl=n=>Math.sqrt(Dp(n,n)),w_=(n,t,e)=>{const r={x:t.x-n.x,y:t.y-n.y},i={x:e.x-n.x,y:e.y-n.y};return $u(i,r)/tl(i)/tl(r)},E_=(n,t,e)=>{const r={x:t.x-n.x,y:t.y-n.y},i={x:e.x-n.x,y:e.y-n.y};return Dp(i,r)/tl(i)/tl(r)},Ap=(n,t,e)=>t.y===0?null:{x:n.x+t.x/t.y*(e-n.y),y:e},Rp=(n,t,e)=>t.x===0?null:{x:e,y:n.y+t.y/t.x*(e-n.x)},S_=(n,t,e,r)=>{if(t.x===0)return Rp(e,r,n.x);if(r.x===0)return Rp(n,t,e.x);if(t.y===0)return Ap(e,r,n.y);if(r.y===0)return Ap(n,t,e.y);const i=$u(t,r);if(i==0)return null;const s={x:e.x-n.x,y:e.y-n.y},o=$u(s,t)/i,a=$u(s,r)/i,u=n.x+a*t.x,l=e.x+o*r.x,c=n.y+a*t.y,h=e.y+o*r.y,d=(u+l)/2,g=(c+h)/2;return{x:d,y:g}};class Br{static compare(t,e){const r=Br.comparePoints(t.point,e.point);return r!==0?r:(t.point!==e.point&&t.link(e),t.isLeft!==e.isLeft?t.isLeft?1:-1:Yi.compare(t.segment,e.segment))}static comparePoints(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}constructor(t,e){t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let r=0,i=e.length;r<i;r++){const s=e[r];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}checkForConsuming(){const t=this.point.events.length;for(let e=0;e<t;e++){const r=this.point.events[e];if(r.segment.consumedBy===void 0)for(let i=e+1;i<t;i++){const s=this.point.events[i];s.consumedBy===void 0&&r.otherSE.point.events===s.otherSE.point.events&&r.segment.consume(s.segment)}}}getAvailableLinkedEvents(){const t=[];for(let e=0,r=this.point.events.length;e<r;e++){const i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){const e=new Map,r=i=>{const s=i.otherSE;e.set(i,{sine:w_(this.point,t.point,s.point),cosine:E_(this.point,t.point,s.point)})};return(i,s)=>{e.has(i)||r(i),e.has(s)||r(s);const{sine:o,cosine:a}=e.get(i),{sine:u,cosine:l}=e.get(s);return o>=0&&u>=0?a<l?1:a>l?-1:0:o<0&&u<0?a<l?-1:a>l?1:0:u<o?-1:u>o?1:0}}}let C_=0;class Yi{static compare(t,e){const r=t.leftSE.point.x,i=e.leftSE.point.x,s=t.rightSE.point.x,o=e.rightSE.point.x;if(o<r)return 1;if(s<i)return-1;const a=t.leftSE.point.y,u=e.leftSE.point.y,l=t.rightSE.point.y,c=e.rightSE.point.y;if(r<i){if(u<a&&u<l)return 1;if(u>a&&u>l)return-1;const h=t.comparePoint(e.leftSE.point);if(h<0)return 1;if(h>0)return-1;const d=e.comparePoint(t.rightSE.point);return d!==0?d:-1}if(r>i){if(a<u&&a<c)return-1;if(a>u&&a>c)return 1;const h=e.comparePoint(t.leftSE.point);if(h!==0)return h;const d=t.comparePoint(e.rightSE.point);return d<0?1:d>0?-1:1}if(a<u)return-1;if(a>u)return 1;if(s<o){const h=e.comparePoint(t.rightSE.point);if(h!==0)return h}if(s>o){const h=t.comparePoint(e.rightSE.point);if(h<0)return 1;if(h>0)return-1}if(s!==o){const h=l-a,d=s-r,g=c-u,v=o-i;if(h>d&&g<v)return 1;if(h<d&&g>v)return-1}return s>o?1:s<o||l<c?-1:l>c?1:t.id<e.id?-1:t.id>e.id?1:0}constructor(t,e,r,i){this.id=++C_,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=r,this.windings=i}static fromRing(t,e,r){let i,s,o;const a=Br.comparePoints(t,e);if(a<0)i=t,s=e,o=1;else if(a>0)i=e,s=t,o=-1;else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);const u=new Br(i,!0),l=new Br(s,!1);return new Yi(u,l,[r],[o])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}comparePoint(t){if(this.isAnEndpoint(t))return 0;const e=this.leftSE.point,r=this.rightSE.point,i=this.vector();if(e.x===r.x)return t.x===e.x?0:t.x<e.x?1:-1;const s=(t.y-e.y)/i.y,o=e.x+s*i.x;if(t.x===o)return 0;const a=(t.x-e.x)/i.x,u=e.y+a*i.y;return t.y===u?0:t.y<u?-1:1}getIntersection(t){const e=this.bbox(),r=t.bbox(),i=xc(e,r);if(i===null)return null;const s=this.leftSE.point,o=this.rightSE.point,a=t.leftSE.point,u=t.rightSE.point,l=ja(e,a)&&this.comparePoint(a)===0,c=ja(r,s)&&t.comparePoint(s)===0,h=ja(e,u)&&this.comparePoint(u)===0,d=ja(r,o)&&t.comparePoint(o)===0;if(c&&l)return d&&!h?o:!d&&h?u:null;if(c)return h&&s.x===u.x&&s.y===u.y?null:s;if(l)return d&&o.x===a.x&&o.y===a.y?null:a;if(d&&h)return null;if(d)return o;if(h)return u;const g=S_(s,this.vector(),a,t.vector());return g===null||!ja(i,g)?null:Za.round(g.x,g.y)}split(t){const e=[],r=t.events!==void 0,i=new Br(t,!0),s=new Br(t,!1),o=this.rightSE;this.replaceRightSE(s),e.push(s),e.push(i);const a=new Yi(i,o,this.rings.slice(),this.windings.slice());return Br.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),Br.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),s.checkForConsuming()),e}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,r=this.windings.length;e<r;e++)this.windings[e]*=-1}consume(t){let e=this,r=t;for(;e.consumedBy;)e=e.consumedBy;for(;r.consumedBy;)r=r.consumedBy;const i=Yi.compare(e,r);if(i!==0){if(i>0){const s=e;e=r,r=s}if(e.prev===r){const s=e;e=r,r=s}for(let s=0,o=r.rings.length;s<o;s++){const a=r.rings[s],u=r.windings[s],l=e.rings.indexOf(a);l===-1?(e.rings.push(a),e.windings.push(u)):e.windings[l]+=u}r.rings=null,r.windings=null,r.consumedBy=e,r.leftSE.consumedBy=e.leftSE,r.rightSE.consumedBy=e.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 t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};const e=this._afterState.rings,r=this._afterState.windings,i=this._afterState.multiPolys;for(let a=0,u=this.rings.length;a<u;a++){const l=this.rings[a],c=this.windings[a],h=e.indexOf(l);h===-1?(e.push(l),r.push(c)):r[h]+=c}const s=[],o=[];for(let a=0,u=e.length;a<u;a++){if(r[a]===0)continue;const l=e[a],c=l.poly;if(o.indexOf(c)===-1)if(l.isExterior)s.push(c);else{o.indexOf(c)===-1&&o.push(c);const h=s.indexOf(l.poly);h!==-1&&s.splice(h,1)}}for(let a=0,u=s.length;a<u;a++){const l=s[a].multiPoly;i.indexOf(l)===-1&&i.push(l)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(Sn.type){case"union":{const r=t.length===0,i=e.length===0;this._isInResult=r!==i;break}case"intersection":{let r,i;t.length<e.length?(r=t.length,i=e.length):(r=e.length,i=t.length),this._isInResult=i===Sn.numMultiPolys&&r<i;break}case"xor":{const r=Math.abs(t.length-e.length);this._isInResult=r%2===1;break}case"difference":{const r=i=>i.length===1&&i[0].isSubject;this._isInResult=r(t)!==r(e);break}default:throw new Error(`Unrecognized operation type found ${Sn.type}`)}return this._isInResult}}class Fp{constructor(t,e,r){if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=r,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=Za.round(t[0][0],t[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=t.length;o<a;o++){if(typeof t[o][0]!="number"||typeof t[o][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let u=Za.round(t[o][0],t[o][1]);u.x===s.x&&u.y===s.y||(this.segments.push(Yi.fromRing(s,u,this)),u.x<this.bbox.ll.x&&(this.bbox.ll.x=u.x),u.y<this.bbox.ll.y&&(this.bbox.ll.y=u.y),u.x>this.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),s=u)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(Yi.fromRing(s,i,this))}getSweepEvents(){const t=[];for(let e=0,r=this.segments.length;e<r;e++){const i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}}class I_{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Fp(t[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 r=1,i=t.length;r<i;r++){const s=new Fp(t[r],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=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,r=this.interiorRings.length;e<r;e++){const i=this.interiorRings[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class kp{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}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 r=0,i=t.length;r<i;r++){const s=new I_(t[r],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=e}getSweepEvents(){const t=[];for(let e=0,r=this.polys.length;e<r;e++){const i=this.polys[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class el{static factory(t){const e=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];if(!s.isInResult()||s.ringOut)continue;let o=null,a=s.leftSE,u=s.rightSE;const l=[a],c=a.point,h=[];for(;o=a,a=u,l.push(a),a.point!==c;)for(;;){const d=a.getAvailableLinkedEvents();if(d.length===0){const E=l[0].point,C=l[l.length-1].point;throw new Error(`Unable to complete output ring starting at [${E.x}, ${E.y}]. Last matching segment found ends at [${C.x}, ${C.y}].`)}if(d.length===1){u=d[0].otherSE;break}let g=null;for(let E=0,C=h.length;E<C;E++)if(h[E].point===a.point){g=E;break}if(g!==null){const E=h.splice(g)[0],C=l.splice(E.index);C.unshift(C[0].otherSE),e.push(new el(C.reverse()));continue}h.push({index:l.length,point:a.point});const v=a.getLeftmostComparator(o);u=d.sort(v)[0].otherSE;break}e.push(new el(l))}return e}constructor(t){this.events=t;for(let e=0,r=t.length;e<r;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point;const e=[t];for(let l=1,c=this.events.length-1;l<c;l++){const h=this.events[l].point,d=this.events[l+1].point;Lp(h,t,d)!==0&&(e.push(h),t=h)}if(e.length===1)return null;const r=e[0],i=e[1];Lp(r,t,i)===0&&e.shift(),e.push(e[0]);const s=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,a=this.isExteriorRing()?e.length:-1,u=[];for(let l=o;l!=a;l+=s)u.push([e[l].x,e[l].y]);return u}isExteriorRing(){if(this._isExteriorRing===void 0){const t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let i=1,s=this.events.length;i<s;i++){const o=this.events[i];Br.compare(t,o)>0&&(t=o)}let e=t.segment.prevInResult(),r=e?e.prevInResult():null;for(;;){if(!e)return null;if(!r)return e.ringOut;if(r.ringOut!==e.ringOut)return r.ringOut.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut.enclosingRing();e=r.prevInResult(),r=e?e.prevInResult():null}}}class Vp{constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=[this.exteriorRing.getGeom()];if(t[0]===null)return null;for(let e=0,r=this.interiorRings.length;e<r;e++){const i=this.interiorRings[e].getGeom();i!==null&&t.push(i)}return t}}class P_{constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){const t=[];for(let e=0,r=this.polys.length;e<r;e++){const i=this.polys[e].getGeom();i!==null&&t.push(i)}return t}_composePolys(t){const e=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];if(!s.poly)if(s.isExteriorRing())e.push(new Vp(s));else{const o=s.enclosingRing();o.poly||e.push(new Vp(o)),o.poly.addInterior(s)}}return e}}class b_{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yi.compare;this.queue=t,this.tree=new Pc(e),this.segments=[]}process(t){const e=t.segment,r=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),r;const i=t.isLeft?this.tree.add(e):this.tree.find(e);if(!i)throw new Error(`Unable to find segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] in SweepLine tree.`);let s=i,o=i,a,u;for(;a===void 0;)s=this.tree.prev(s),s===null?a=null:s.key.consumedBy===void 0&&(a=s.key);for(;u===void 0;)o=this.tree.next(o),o===null?u=null:o.key.consumedBy===void 0&&(u=o.key);if(t.isLeft){let l=null;if(a){const h=a.getIntersection(e);if(h!==null&&(e.isAnEndpoint(h)||(l=h),!a.isAnEndpoint(h))){const d=this._splitSafely(a,h);for(let g=0,v=d.length;g<v;g++)r.push(d[g])}}let c=null;if(u){const h=u.getIntersection(e);if(h!==null&&(e.isAnEndpoint(h)||(c=h),!u.isAnEndpoint(h))){const d=this._splitSafely(u,h);for(let g=0,v=d.length;g<v;g++)r.push(d[g])}}if(l!==null||c!==null){let h=null;l===null?h=c:c===null?h=l:h=Br.comparePoints(l,c)<=0?l:c,this.queue.remove(e.rightSE),r.push(e.rightSE);const d=e.split(h);for(let g=0,v=d.length;g<v;g++)r.push(d[g])}r.length>0?(this.tree.remove(e),r.push(t)):(this.segments.push(e),e.prev=a)}else{if(a&&u){const l=a.getIntersection(u);if(l!==null){if(!a.isAnEndpoint(l)){const c=this._splitSafely(a,l);for(let h=0,d=c.length;h<d;h++)r.push(c[h])}if(!u.isAnEndpoint(l)){const c=this._splitSafely(u,l);for(let h=0,d=c.length;h<d;h++)r.push(c[h])}}}this.tree.remove(e)}return r}_splitSafely(t,e){this.tree.remove(t);const r=t.rightSE;this.queue.remove(r);const i=t.split(e);return i.push(r),t.consumedBy===void 0&&this.tree.add(t),i}}const zp=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,N_=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class T_{run(t,e,r){Sn.type=t,Za.reset();const i=[new kp(e,!0)];for(let h=0,d=r.length;h<d;h++)i.push(new kp(r[h],!1));if(Sn.numMultiPolys=i.length,Sn.type==="difference"){const h=i[0];let d=1;for(;d<i.length;)xc(i[d].bbox,h.bbox)!==null?d++:i.splice(d,1)}if(Sn.type==="intersection")for(let h=0,d=i.length;h<d;h++){const g=i[h];for(let v=h+1,E=i.length;v<E;v++)if(xc(g.bbox,i[v].bbox)===null)return[]}const s=new Pc(Br.compare);for(let h=0,d=i.length;h<d;h++){const g=i[h].getSweepEvents();for(let v=0,E=g.length;v<E;v++)if(s.insert(g[v]),s.size>zp)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const o=new b_(s);let a=s.size,u=s.pop();for(;u;){const h=u.key;if(s.size===a){const g=h.segment;throw new Error(`Unable to pop() ${h.isLeft?"left":"right"} SweepEvent [${h.point.x}, ${h.point.y}] from segment #${g.id} [${g.leftSE.point.x}, ${g.leftSE.point.y}] -> [${g.rightSE.point.x}, ${g.rightSE.point.y}] from queue.`)}if(s.size>zp)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(o.segments.length>N_)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const d=o.process(h);for(let g=0,v=d.length;g<v;g++){const E=d[g];E.consumedBy===void 0&&s.insert(E)}a=s.size,u=s.pop()}Za.reset();const l=el.factory(o.segments);return new P_(l).getGeom()}}const Sn=new T_;var Oc={union:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Sn.run("union",n,e)},intersection:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Sn.run("intersection",n,e)},xor:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Sn.run("xor",n,e)},difference:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Sn.run("difference",n,e)}};function x_(n,t){var e=gr(n),r=gr(t),i=n.properties||{},s=Oc.difference(e.coordinates,r.coordinates);return s.length===0?null:s.length===1?Je(s[0],i):Al(s,i)}function O_(n,t,e){e===void 0&&(e={});var r=gr(n),i=gr(t),s=Oc.intersection(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?Je(s[0],e.properties):Al(s,e.properties)}function M_(n,t,e){e===void 0&&(e={});var r=gr(n),i=gr(t),s=Oc.union(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?Je(s[0],e.properties):Al(s,e.properties)}function Up(n,t){(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]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=O_(Je([n]),Je([t]));if(e)return e.geometry.coordinates}function Gp(n,t){(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]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=M_(Je([n]),Je([t]));if(e)return e.geometry.coordinates}function Wp(n,t=500,e="meters"){const r=l_(on(n),t,{units:e});if(r)return r.geometry.coordinates}function qp(n,t){(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]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=x_(Je([n]),Je([t]));if(e)return e.geometry.coordinates}function Xp(n,t,e=10,r="meters"){return h_(n,t,{steps:e,units:r}).geometry.coordinates}function Mc(n,t){(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]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=Je([n]),r=Je([t]);return ry(e,r)?"oneBig":hy(e,r)?"twoBig":!1}function Yp(n){const t=p.min(p.objsIterator(n,["0"])),e=p.min(p.objsIterator(n,["1"])),r=p.min(p.objsIterator(n,["2"])),i=p.max(p.objsIterator(n,["0"])),s=p.max(p.objsIterator(n,["1"])),o=p.max(p.objsIterator(n,["2"]));return{minPos:[t,e,r],maxPos:[i,s,o],center:[(t+i)*.5,(e+s)*.5,(r+o)*.5]}}function Hp(n){const{minPos:t,maxPos:e,center:r}=Yp(n);if(t.some(a=>!Number.isFinite(a)||e.some(u=>!Number.isFinite(u))||r.some(u=>!Number.isFinite(u)))){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=wu(t,e);let s=i*.5;const o=Math.abs(t[2]-e[2]);return o!=0&&(s=Math.sqrt(i*i+o*o)*.5),{center:r,radius:s}}function Bp(n,t){const e=Mn(n),r=Mn(t);return p.Vector.distance(e,r)}function Ka(n,t){const e=[],r=n.length;let i=0;for(let s=0;s<r-1;++s){if(t===void 0||t==="GEODESIC"){const o=wu(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="RHUMB"){const o=gd(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="NONE"){const o=Bp(n[s],n[s+1]);i+=o}else console.warn(`未知的arcType: ${t},导致距离无法计算!`);e.push(i)}return e}function Dc(n){const t="__getXyzFromPostion";let e=p.getExtProp(n,t);return(!e||!p.Vector.equals(e[0],n))&&(e=[[...n],Mn(n)],p.setExtProp(n,t,e)),e[1]}class Jp extends p.Tree{constructor(t){super(t)}get propUiTree(){return this.uiTree}}class Lc extends p.TreeItem{constructor(t,e,r){super(t,e),this._property=r}get property(){return this._property}}class Ac extends Lc{constructor(t,e){super(t,!1,e)}}class Rc extends Lc{constructor(t,e){super(t,!0,e)}get groupChildren(){return this.children}}function jp(n,t){const e=new Jp(t),r=n.getProperties("chinese"),i=[];for(let s of r)if(s instanceof $){const o=new Rc(e,s);o.d(()=>s.destroy()),e.children.push(o),i.push(o)}else{const o=new Ac(e,s);e.children.push(o),o.d(()=>s.destroy())}for(;i.length>0;){const s=i.pop();if(!s)throw new Error("should not be here!");const o=s;if(!(o.property instanceof $))throw new Error("!(treeItem.property instanceof GroupProperty)");for(let a of o.property.children)if(a instanceof $){const u=new Rc(e,a);u.d(()=>a.destroy()),o.groupChildren.push(u),i.push(u)}else{const u=new Ac(e,a);o.groupChildren.push(u),u.d(()=>a.destroy())}}return e.d(()=>{e.itemChildrenChanged.reset(),e.itemChildrenToChange.reset();const s=[...e.getDescendants()];s.forEach(o=>{o.children&&(o.children.length=0),o.destroy()}),s.length=0}),e}class Oo extends q{constructor(e){super();f(this,"_propTreeReact",this.dv(p.react(void 0)));this.d(()=>this._propTreeReact.value=void 0),this.dv(new p.ObjResettingWithEvent(this.sceneObjectChanged,r=>{if(!r)return;const i=new q;return i.d(r.toDestroyEvent.don(()=>{this.sceneObject=void 0})),i})),this.d(this.sceneObjectChanged.don(r=>{this._propTreeReact.value=void 0,!(!r||!(r instanceof j))&&(this._propTreeReact.value=jp(r,e))}))}get propTree(){return this._propTreeReact.value}get propTreeChanged(){return this._propTreeReact.changed}}(n=>{n.createDefaultProps=()=>({sceneObject:void 0})})(Oo||(Oo={})),p.extendClassProps(Oo.prototype,Oo.createDefaultProps);function Fc(n){return p.reactDeepArrayWithUndefined(n,(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[...t])}function Zp(n,t){const e=new Array;for(let r of n)e.push(t(r));return e}function kc(n,t){return n===void 0&&t===void 0?!0:!n||!t?!1:n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]}function D_(n,t,e){var i;((i=t.attachedViewers.values().toArray()[0])==null?void 0:i.getEngineObject(t))?e.call(n):(n.dispose(t.viewerAttached.don(()=>{e.call(n)})),n.dispose(t.createdEvent.don(()=>e.call(n))))}function L_(n,t,e,r=!0){r&&e(),n.dispose(t.disposableOn(e))}function A_(n,t){const{type:e,id:r}=n;if(e){const i=j.create(e,r);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 Kp(n){const t=n.children&&p.every(n.children,r=>{if(!(r instanceof qe))throw new Error("!(treeItem instanceof SceneTreeItem)");return!r.show})||!1,e=n.sceneTree.getSceneObjectShowFunc(n.sceneObject);return!t||e}class qe extends p.TreeItem{constructor(e,r=!1,i,s,o=!0){super(e,r,i);f(this,"_dragDrop");f(this,"_showChangedNotAffectChildren",!1);f(this,"_showChangedNotAffectParent",!1);f(this,"_type",this.dv(p.react("Unknown")));f(this,"_isExport",this.dv(p.react(!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 u;const l=()=>{u&&(u(),u=void 0)};this.dispose(l),this.dispose(this.sceneObjectChanged.disposableOn(c=>{l(),c&&(u=p.bind([this,"name"],[c,"name"]))})),this.dispose(this.showChanged.disposableOn(c=>{if(e.setSceneObjectShowFunc(this.sceneObject,c),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let h of this.children)h instanceof qe&&(h._showChangedNotAffectParent=!0,h.show=c,h._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof qe&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=Kp(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new p.ObjResettingWithEvent(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const c=new q;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof V){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.showChanged.disposableOn(h))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof V){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.enabledChanged.disposableOn(h))}return c})),this.childrenChangedEvent.disposableOn(()=>{const c=Kp(this);this._showChangedNotAffectChildren=!0,this.show=c,this._showChangedNotAffectChildren=!1});{const c=()=>{let h="Unknown";this.sceneObject?h=this.sceneObject.typeName:this.children&&(h="Folder"),this._type.value=h};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(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(r){console.error(`sceneTreeItem.jsonStr error ${r}`,r)}}get json(){const e=this.children&&[...this.children].filter(r=>r.isExport).map(r=>r.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 r of e.children){const i=new qe(this.tree,!0);i.json=r,this.children.push(i)}}}clone(){try{const e=new qe(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,r){if(e==="FolderInnerOrAfter"||e==="FolderInnerOrBefore"||e==="FolderInner"){if(r&&r.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&!(e.includes("Or")&&this.sceneObject))return r&&this.children.push(r),!0;if(e==="FolderInner")return!1;if(e==="FolderInnerOrAfter")return super.insertNewTreeItem("After",r);if(e==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",r);throw new Error("should not be here!")}else return super.insertNewTreeItem(e,r)}}(n=>{n.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:p.reactJsonWithUndefined(void 0)})})(qe||(qe={})),p.extendClassProps(qe.prototype,qe.createDefaultProps);function Qp(n,t,e){let{offsetY:r}=t;if(!t.target||!("clientTop"in t.target))return"none";r+=2,r+=t.target.clientTop;let i="none";return n.children?r<=e*.3?i="before":r>=e*.7?!n.uiTreeObject.collapsed&&n.children.length>0?i="inner":i="after":i="inner":r<=e*.5?i="before":i="after",i}class $p extends bf{constructor(t){super(),this._treeItem=t;const{dragStartDataManager:e}=this._treeItem.sceneTree;let r="none";const i=this.disposeVar(p.createTimeoutWithStartValues(()=>{this._treeItem.uiTreeObject.moveToPositionMode=r,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${r});`)},200));function s(o){r!==o&&(r=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 a=e;if(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0){const u=a.data.value,l=this._treeItem,{tree:c}=l;if(c){const h=[...c.selectedItems];~h.indexOf(u)||h.push(u);const d=Qp(l,o,c.itemDivHeight);if(d!=="none"&&p.Tree.canMoveToTreeItems(h,l,d)){o.dataTransfer.dropEffect="move",s(d);return}}}o.dataTransfer.dropEffect="none",s("none")})),this.dispose(this._dropEvent.disposableOn(o=>{const a=e;if(!(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0))return;const u=a.data.value,l=this._treeItem,{tree:c}=l;if(!c)return;const h=[...c.selectedItems];~h.indexOf(u)||h.push(u);const d=Qp(l,o,c.itemDivHeight);d!=="none"&&p.Tree.canMoveToTreeItems(h,l,d)&&(p.Tree.moveToTreeItems(h,l,d),a.data=void 0,s("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{r="none",i.restart()}))}}function R_(n){if(!(n instanceof qe))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new $p(n)}function F_(n){let t=!1;return n&&("show"in n?t=n.show??!0:"enabled"in n&&(t=n.enabled??!0)),t}function k_(n,t){n&&("show"in n?n.show=t:"enabled"in n&&(n.enabled=t))}const V_=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function z_(n){const t=[],{root:e={}}=n,r=[e];for(;r.length>0;){const i=r.pop();if(!i)throw new Error("!todo");if(i.children){for(let s of i.children)if(s.children&&r.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&&V_.includes(o)&&t.push(s.sceneObj)}}}return t}async function U_(n,t){const e=z_(n);let r=0;const i=e.length;for(let s of e)if(++r,t){const o=r/i;t(o,r,i)}}class tg extends q{constructor(e,r){super();f(this,"treeItemContexMenuCallback");this._sceneTree=e,this._projectManager=r}get sceneTree(){return this._sceneTree}}class G_ extends q{constructor(e){super();f(this,"_jsonLoadingEvent",this.disposeVar(new V));f(this,"_setJsonProcessing",this.disposeVar(p.createProcessingFromAsyncFunc(async(e,r)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),r&&await e.promise(this._sceneTree.preloadFunc(r)),this._setJson(r),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=e,this._setJsonProcessing.errorFunc=r=>{this._jsonLoadingEvent.emit({type:"error",error:r})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(e){try{this._sceneTree.setJson(e||{})}catch(r){console.error(`json数据装配时发生错误!error: ${r}`)}}get json(){return this._sceneTree.getJson()}set json(e){this._setJsonProcessing.restart(new p.CancelError("JSON重新赋值!"),e)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){this.json=JSON.parse(e)}}function W_(n){return n.name+"_clone"}function Vc(n,t,e){if(n instanceof qe)return n.insertNewTreeItem(t,e);{const r={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return n.insertNewTreeItem(r[t],e)}}function q_(n){[n,...n.getDescendants()].forEach(t=>t.destroy())}const dr=class dr extends p.Tree{constructor(e,r,i,s){super(i);f(this,"_jsonLoading",this.disposeVar(new G_(this)));f(this,"createSceneObjectFunc",dr.defaultCreateSceneObjectFunc);f(this,"createTreeItemDragDropFunc",dr.defaultCreateTreeItemDragDropFunc);f(this,"preloadFunc",dr.defaultPreload);f(this,"getSceneObjectShowFunc",dr.defaultGetSceneObjectShow);f(this,"setSceneObjectShowFunc",dr.defaultSetSceneObjectShow);f(this,"getSceneTreeItemCloneNameFunc",dr.defaultGetSceneTreeItemCloneNameFunc);f(this,"debug",!1);f(this,"_contextMenu",this.disposeVar(new tg(this,this.projectManager)));f(this,"_showPropUiOnSelecting",this.disposeVar(p.react(!0)));this._name=e,this._dragStartDataManager=r,this._projectManager=s,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var a,u;window.lssn=this.lastSelectedItem,window.lsso=(a=this.lastSelectedItem)==null?void 0:a.sceneObject,this.debug&&console.log(((u=this.lastSelectedItem)==null?void 0:u.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(a=>{for(let u of a){const l=u,{sceneObject:c}=l;c&&o.deleteSceneObject(c)&&c.destroy()&&fu(c,void 0);for(let h of l.getDescendants()){const{sceneObject:d}=h;d&&o.deleteSceneObject(d)&&d.destroy()&&fu(d,void 0)}q_(u)}})),this.dispose(this.itemsAdded.disposableOn(a=>{for(let u of a){const l=u;l.sceneObject&&o.addSceneObject(l.sceneObject)&&fu(l.sceneObject,l)}})),this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{if(!this.showPropUiOnSelecting)return;this._projectManager.propUiTreeManager.sceneObject=void 0;const{lastSelectedItem:a}=this;a&&(this._projectManager.propUiTreeManager.sceneObject=a.sceneObject)}))}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 r=this.getDescendants();let i;for(let s of r)if(s.sceneObject&&s.sceneObject.id===e){i=s;break}return i}get dragStartDataManager(){return this._dragStartDataManager}getJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.json)}}}setJson(e){var i;e.root=e.root||{};const r=e.root.children??[];this.root.resetChildren(!0);for(let s of r){const o=new qe(this,!0);o.json=s,(i=this.root.children)==null||i.push(o)}}testAddNewTreeItem(e,r){const i=e||this.lastSelectedItem||this.root;return i?Vc(i,r):!1}addNewTreeItem(e,r,i,s){const o=e||this.lastSelectedItem||this.root;if(o&&Vc(o,r)){const a=new qe(this,i);if(a.sceneObject=s,!Vc(o,r,a))throw new Error("currentTreeItem.insertNewTreeItem return false!");return a}}createSceneObjectTreeItem(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=j.create(e,r);return a?this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0,a):void 0}createGroupTreeItem(e,r,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=e??"未命名组节点",a}createSceneObjectTreeItemFromClass(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o))return;const a=j.createFromClass(e,r);return a?this.addNewTreeItem(i,o,!0,a):void 0}createSceneObjectTreeItemFromJson(e,r,i){const s=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(r,s))return;const o=j.createFromJson(e);return console.log(o),o?this.addNewTreeItem(r,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 r of e)this.destroySceneObjectTreeItem(r)}};f(dr,"defaultCreateSceneObjectFunc",A_),f(dr,"defaultCreateTreeItemDragDropFunc",R_),f(dr,"defaultPreload",U_),f(dr,"defaultGetSceneObjectShow",F_),f(dr,"defaultSetSceneObjectShow",k_),f(dr,"defaultGetSceneTreeItemCloneNameFunc",W_);let Qa=dr;const zc={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class X_ extends q{constructor(e){super();f(this,"_currentPosition",this.disposeVar(p.reactArrayWithUndefined(void 0)));f(this,"_currentRotation",this.disposeVar(p.reactArrayWithUndefined(void 0)));f(this,"_currentHeading",this.disposeVar(p.react(void 0)));f(this,"_isRotating",this.disposeVar(p.react(!1)));f(this,"_isGround",this.disposeVar(p.react(!1)));f(this,"_startPosition",[0,0,0]);f(this,"_startRotation",[0,0,0]);f(this,"_processing",this.disposeVar(p.createProcessingFromAsyncFunc(async(e,r,i,s)=>{const{currentPosition:o,currentRotation:a}=this;if(!o||s<=0||!a){this._currentPosition.value=r,this._currentRotation.value=i;return}const u=this._startPosition;u.splice(0,3,...o);const l=this._startRotation;l.splice(0,3,...a);let c=Date.now();const h=Ia(u,r);this._currentHeading.value=h;const g=wu(u,r)/s,v=[i[0]-l[0],i[1]-l[1],i[2]-l[2]],E=r[2]-u[2];await e.promise(new Promise(C=>{e.disposer.dispose(p.animateFrame(async()=>{let b=Date.now()-c;b=b<0?0:b,b=b>s?s:b;const m=b*g,y=rd(u,m,h);if(this.isGround&&y){const _=await this._esviewer.getTerrainHeight([y[0],y[1]]);this._currentPosition.value=[y[0],y[1],_??0]}else y&&(y[2]+=E*(b/s)),this._currentPosition.value=y;if(this.isRotating){const[_,S,I]=v,P=b/s;this._currentRotation.value=[l[0]+_*P,l[1]+S*P,l[2]+I*P]}b===s&&(this._currentPosition.value=r,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,r,i){this._processing.restart(void 0,e,r,i)}cancel(){this._processing.cancel()}}function eg(n){let t=0;function e(r,i){i++,t=Math.max(i,t),r.forEach(s=>{Array.isArray(s)&&e(s,i)})}return e(n,0),t}const Hn=class Hn extends bt{constructor(e){super(e);f(this,"editingBindMode","lineString");f(this,"_area",this.dv(p.react(0)));f(this,"_perimeter",this.dv(p.react(0)));const r=()=>{this._updateArea(),this._updatePerimeter()};r(),this.d(this.pointsChanged.don(r))}updateEditing(){var r;const e=[];this.editingBindMode=="doublePoints"?e.push(B.DoublePointsAppend,B.DoublePointsModify):this.editingBindMode=="lineString"?e.push(B.LineStringAppend,B.LineStringInsert,B.Translation):this.editingBindMode=="circular"?(e.push(B.CircularAppend,B.CircularInsert,B.Translation),this.supportEditingModes().includes(B.HeightModify)&&e.push(B.HeightModify)):this.editingBindMode=="visibility"?e.push(B.VisibilityAppend,B.VisibilityModify):this.editingBindMode=="scatter"&&e.push(B.ScatterAppend,B.ScatterModify),(r=this.activeViewer)==null||r.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 Ul([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const e=Ka(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]],r=Ka(e,"GEODESIC");return r[r.length-1]}else return}getIntersect(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=Up(this.points,e);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const u=a[0].map(l=>[...l,0]);o.push(u)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getUnion(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=Gp(this.points,e);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const u=a[0].map(l=>[...l,0]);o.push(u)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getDifference(e){if(this.points&&this.points.length>=3&&e.length>=3){let r=[...e];const i=e[0],s=e[e.length-1];i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]||r.push(i);const o=qp([...this.points,this.points[0]],[...r]);if(!o)return{status:"undefined",positions:void 0};const a=[...o];if(eg(a)===3){const u=a.map(d=>d.map(g=>[...g,0]));if(u.length<=1)return{status:"notIncluded",positions:u};const l=u[0],c=u[1];return Mc([...l],[...c])==="oneBig"?{status:"included",positions:u}:{status:"notIncluded",positions:u}}else if(eg(a)===4){const l=[...a.map(h=>h.map(d=>d.map(g=>[...g,0])))],c=[];return l.forEach(h=>{c.push(h[0])}),{status:"notIncluded",positions:c}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(e=500,r){if(this.points&&this.points.length>=2){const i=Wp(this.points,e,r);return i?[i[0].map(s=>[...s,0])]:void 0}else return}geoPolygonOverlap(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=Mc(this.points,e);return r==="oneBig"?!0:r==="twoBig"?!1:void 0}else return}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",coordinate:[...e.coordinate,new W([this,"editing"],"编辑",!1),new H([this,"points"],"位置数组",Hn.defaults.points,void 0,!0)],style:[...e.style,new $([],"点样式"),new W([this,"pointed"],"开启",!1),new T([this,"pointSize"],"点大小",1),new lt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new gt([this,"pointColor"],"点颜色",[1,1,1,1]),new gt([this,"pointOutlineColor"],"轮廓颜色",Hn.defaults.pointStyle.outlineColor),new T([this,"pointOutlineWidth"],"轮廓宽度",Hn.defaults.pointStyle.outlineWidth),new $([],"线样式"),new W([this,"stroked"],"开启线样式",!0),new W([this,"strokeGround"],"贴地",!1),new T([this,"strokeWidth"],"线宽",1),new lt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new gt([this,"strokeColor"],"线颜色",[1,1,1,1]),new $([],"面样式"),new W([this,"filled"],"开启",!1),new W([this,"fillGround"],"贴地",!1),new gt([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...e.more,new $([],"点样式集合"),new nt([this,"pointMaterial"],"点材质"),new H([this,"pointMaterialParams"],"点材质参数"),new $([],"线样式集合"),new nt([this,"strokeMaterial"],"线材质"),new H([this,"strokeMaterialParams"],"线材质参数"),new $([],"面样式集合"),new nt([this,"fillMaterial"],"面材质"),new H([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}};f(Hn,"createDefaultProps",()=>({...bt.createDefaultProps(),pointed:!1,pointStyle:p.reactJson({size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),stroked:!1,strokeStyle:p.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:p.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1}),points:p.reactPositions([])})),f(Hn,"type",Hn.register("ESGeoVector",Hn,{chsName:"地理矢量",tags:["ESObjects"],description:"地理矢量"})),f(Hn,"supportEditingModes",[...bt.supportEditingModes,B.Translation]);let pt=Hn;const Ns=class Ns extends bt{constructor(){super(...arguments);f(this,"_statusDis",this.dv(p.react(!0)));f(this,"_smoothMoveEvent",this.dv(new V));f(this,"_smoothMoveWithRotationEvent",this.dv(new V));f(this,"_smoothMoveOnGroundEvent",this.dv(new V));f(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new V));f(this,"_automaticLandingEvent",this.dv(new V));f(this,"_smoothMoveKeepPitchEvent",this.dv(new V));f(this,"_smoothMoveRelativelyEvent",this.dv(new V));f(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new V));f(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var r;const e=[];this.editingBindMode=="singlePoint"?(e.push(B.Place,B.Translation),["ESLocationMeasurement"].includes(this.typeName)||e.push(B.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||e.push(B.Scale)):this.editingBindMode=="doublePoints"&&e.push(B.DoublePointsAppend,B.DoublePointsModify),(r=this.activeViewer)==null||r.startEditing(this,e,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(e,r){this._smoothMoveEvent.emit(e,r)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(e,r,i){this._smoothMoveWithRotationEvent.emit(e,r,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(e,r,i,s){this._smoothMoveOnGroundEvent.emit(e,r,i,s)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(e,r,i,s,o){this._smoothMoveWithRotationOnGroundEvent.emit(e,r,i,s,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,r){this._smoothMoveKeepPitchEvent.emit(e,r)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(e,r){this._smoothMoveRelativelyEvent.emit(e,r)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(e,r,i){this._smoothMoveRelativelyWithRotationEvent.emit(e,r,i)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",location:[...e.location,new W([this,"editing"],"是否编辑"),new tt([],()=>this.automaticLanding(),[],"自动落地"),new Bs([this,"position"],"位置数组",[0,0,0]),new Ol([this,"rotation"],"姿态数组",[0,0,0]),new Re([this,"scale"],"缩放",[1,1,1]),new T([this,"minVisibleDistance"],"最小可见距离",0),new T([this,"maxVisibleDistance"],"最大可见距离",0)],more:[...e.more,new tt(["numbers","number"],(r,i)=>this.smoothMove(r,i),[[0,0,0],0],"平滑移动","smoothMove"),new tt(["numbers","number"],(r,i)=>this.smoothMoveKeepPitch(r,i),[[0,0,0],0],"固定方向平滑移动","smoothMoveKeepPitch"),new tt(["numbers","numbers","number"],(r,i,s)=>this.smoothMoveWithRotation(r,i,s),[[0,0,0],[0,0,0],0],"平滑偏移","smoothMoveWithRotation"),new tt(["number","number","number","string"],(r,i,s,o)=>this.smoothMoveOnGround(r,i,s,o),[0,0,0,""],"贴地平滑移动","smoothMoveOnGround"),new tt(["numbers","number","number","number","string"],(r,i,s,o,a)=>this.smoothMoveWithRotationOnGround(r,i,s,o,a),[[0,0,0],0,0,0,""],"贴地平滑偏移","smoothMoveWithRotationOnGround"),new tt(["numbers","number"],(r,i)=>this.smoothMoveRelatively(r,i),[[0,0,0],0],"smoothMoveRelatively","smoothMoveRelatively"),new tt(["numbers","numbers","number"],(r,i,s)=>this.smoothMoveRelativelyWithRotation(r,i,s),[[0,0,0],[0,0,0],0],"smoothMoveRelativelyWithRotation","smoothMoveRelativelyWithRotation"),new W([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}};f(Ns,"createDefaultProps",()=>({...bt.createDefaultProps(),pointed:!1,pointStyle:p.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),position:p.reactArray([0,0,0]),rotation:p.reactArray([0,0,0]),scale:p.reactArray([1,1,1]),minVisibleDistance:p.react(0),maxVisibleDistance:p.react(0)})),f(Ns,"type",Ns.register("ESObjectWithLocation",Ns,{chsName:"对象位置",tags:["ESObjects"],description:"对象位置"})),f(Ns,"supportEditingModes",[...bt.supportEditingModes,B.Place,B.Translation,B.Rotation,B.Scale,B.DoublePointsAppend,B.DoublePointsModify]);let Z=Ns;const ko=class ko extends Z{getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new $([],"点样式集合"),new W([this,"pointed"],"开启点样式",!1),new T([this,"pointSize"],"点大小",1),new lt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new gt([this,"pointColor"],"点颜色",[1,1,1,1]),new $([],"线样式集合"),new W([this,"stroked"],"开启线样式",!1),new W([this,"strokeGround"],"是否贴地(线)",!1),new T([this,"strokeWidth"],"线宽",1),new lt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new gt([this,"strokeColor"],"线颜色",[1,1,1,1]),new $([],"面样式集合"),new W([this,"filled"],"开启填充样式",!1),new W([this,"fillGround"],"是否贴地",!1),new gt([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...t.more,new $([],"点样式"),new nt([this,"pointMaterial"],"点材质",""),new H([this,"pointMaterialParams"],"点材质参数",{}),new $([],"线样式"),new nt([this,"strokeMaterial"],"线材质",""),new H([this,"strokeMaterialParams"],"线材质参数",{}),new $([],"填充样式"),new nt([this,"fillMaterial"],"面材质",""),new H([this,"fillMaterialParams"],"面材质参数",{})]}}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}};f(ko,"createDefaultProps",()=>({...Z.createDefaultProps(),pointed:!1,pointStyle:p.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:1}),stroked:!1,strokeStyle:p.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:p.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(ko,"type",ko.register("ESLocalVector",ko,{chsName:"本地矢量",tags:["ESObjects"],description:"本地矢量对象"}));let Mo=ko;const ou=class ou extends Mo{};f(ou,"type",ou.register("ESLocalVector2D",ou,{chsName:"本地矢量2D",tags:["ESObjects"],description:"本地矢量2D对象"}));let vi=ou;const Y_=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],H_=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]],Vo=class Vo extends Z{constructor(){super(...arguments);f(this,"_widgetEvent",this.dv(new V))}get widgetEvent(){return this._widgetEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new W([this,"screenRender"],"屏幕渲染",!0),new W([this,"sizeByContent"],"尺寸自适应",!0),new ce([this,"size"],"尺寸大小",[100,100]),new ce([this,"anchor"],"偏移比例",[.5,1]),new ce([this,"offset"],"像素偏移",[0,0]),new lt([this,"renderMode"],H_,"渲染模式",0),new lt([this,"rotationType"],Y_,"漫游旋转类型",1),new nt([this,"actorTag"],"绑定对象"),new nt([this,"socketName"],"插槽名称"),new Re([this,"positionOffset"],"位置偏移"),new Re([this,"rotationOffset"],"相对姿态")],more:[...e.more,new T([this,"zOrder"],"排序",0)]}}};f(Vo,"createDefaultProps",()=>({...Z.createDefaultProps(),screenRender:!0,size:p.reactArray([100,100]),anchor:p.reactArray([.5,1]),offset:p.reactArray([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:p.reactArray([0,0,0]),rotationOffset:p.reactArray([0,0,0])})),f(Vo,"type",Vo.register("ESLabel",Vo,{chsName:"标签",tags:["ESObjects"],description:"标签对象"}));let Nr=Vo;const zo=class zo extends j{constructor(t){super(t)}};f(zo,"createDefaultProps",()=>({...j.createDefaultProps(),show:!0,fillStyle:p.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(zo,"type",zo.register("ESTestObject",zo,{chsName:"测试",tags:["ESObjects"],description:""}));let Uc=zo;const Bn=class Bn extends bt{constructor(e){super(e);f(this,"_refreshTilesetEvent",this.dv(new V));f(this,"_tilesetReadyEvent",this.dv(new V));f(this,"_supportEdit",this.dv(p.react(!0)));f(this,"_highlightFeatureEvent",this.dv(new V));f(this,"_highlightFeatureAndFlyToEvent",this.dv(new V));f(this,"_strokeFeatureEvent",this.disposeVar(new V));f(this,"_getFeatureTableEvent",this.dv(new V));f(this,"_featureTableResultEvent",this.dv(new V));f(this,"_getMaterialNameListEvent",this.disposeVar(new V));f(this,"_setFeatureStyleEvent",this.dv(new V));f(this,"_setFeatureColorEvent",this.dv(new V));f(this,"_setFeatureVisableEvent",this.dv(new V));f(this,"_resetFeatureStyleEvent",this.dv(new V));f(this,"setMaterialInfoEvent",this.ad(new V));f(this,"_setMaterialEvent",this.disposeVar(new V));f(this,"_clippingPlanesId",this.dv(p.react("")));f(this,"_clippingPlaneIds",this.dv(p.react([])));f(this,"_flattenedPlaneId",this.dv(p.react("")));f(this,"_flattenedPlaneEnabled",this.dv(p.react(!1)));f(this,"_clippingPlaneId",this.dv(p.react("")));f(this,"_excavateId",this.dv(p.reactArray([])))}updateEditing(){var e;(e=this.activeViewer)==null||e.startEditing(this,[B.Translation,B.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,r){this._highlightFeatureEvent.emit(e,r)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(e,r,i,s){this._highlightFeatureAndFlyToEvent.emit(e,r,i,s)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(e,r=[1,0,0,1]){this._strokeFeatureEvent.emit(e,r)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(e=>{const r=this.d(this._featureTableResultEvent.donce(e));this._getFeatureTableEvent.emit(),setTimeout(()=>{r(),e(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(e=>{const r=new q;r.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(r.destroy(),e(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{r.isDestroyed()||(r.destroy(),e(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e){this._setFeatureStyleEvent.emit(e)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(e,r){this._setFeatureColorEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(e,r){this._setFeatureVisableEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(r=>{const i=new q;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),r(s)})),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={...zc}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new ge([this,"maximumScreenSpaceError"],1,[0,256],"精度",16),new lt([this,"materialMode"],[["常规","normal"],["科技感","technology"]],"材质模式","normal",!0),new lt([this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"颜色模式","HIGHLIGHT"),new H([this,"materialOverrideMap"],"材质替换",Bn.defaults.materialOverrideMap)],dataSource:[...e.dataSource,new H([this,"url"],"服务地址",Bn.defaults.url,void 0,!0)],coordinate:[...e.coordinate,new W([this,"editing"],"编辑",!1,!0),new Re([this,"offset"],"偏移",[0,0,0],!0),new Ol([this,"rotation"],"旋转",[0,0,0])],more:[...e.more,new H([this,"materialParams"],"materialParams",Bn.defaults.materialParams),new tt(["string","string"],(r,i)=>this.highlightFeature(r,i),["","rgba(255,0,0,1)"],"highlightFeature"),new tt(["string","string"],(r,i)=>this.setFeatureColor(r,i),["",""],"setFeatureColor"),new tt(["string","string"],(r,i)=>this.setFeatureVisable(r,i),["",""],"setFeatureVisable"),new tt([],()=>this.resetFeatureStyle(),[],"resetFeatureStyle"),new $([],"ue"),new tt([],()=>this.refreshTileset(),[],"refreshTileset"),new nt([this,"actorTag"]),new W([this,"highlight"],"是否高亮"),new gt([this,"highlightColor"]),new T([this,"highlightID"]),new $([],"czm"),new $([],"可视化"),new ce([this,"czmImageBasedLightingFactor"],"反射强度"),new T([this,"czmAtmosphereScatteringIntensity"],"大气散射强度"),new H([this,"czmEnvironmentMapManager"],"动态环境贴图管理器"),new T([this,"czmMaximumMemoryUsage"],"最大内存"),new $([],"常用"),new lt([this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]],"czmClassificationType","NONE",!0),new H([this,"czmStyleJson"],"czmStyle"),new W([this,"czmBackFaceCulling"]),new W([this,"czmSkipLevelOfDetail"]),new T([this,"cacheBytes"],"最大缓存",512*1024*1024),new $([],"调试信息"),new W([this,"czmDebugShowBoundingVolume"]),new W([this,"czmDebugShowContentBoundingVolume"]),new $([],"clippingPlanes"),new W([this,"clippingPlaneEnabled"]),new W([this,"unionClippingRegions"]),new gt([this,"clippingPlaneEdgeColor"]),new T([this,"clippingPlaneEdgeWidth"])]}}};f(Bn,"createDefaultProps",()=>({...bt.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:p.reactArray([1,0,0,1]),offset:p.reactArrayWithUndefined([0,0,0]),rotation:p.reactArray([0,0,0]),czmImageBasedLightingFactor:p.reactArray([1,1]),czmEnvironmentMapManager:p.reactJsonWithUndefined(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:p.reactJson({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:512*1024*1024,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:p.reactArray([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:p.reactJsonWithUndefined({}),featureIdLabel:0,splitDirection:"NONE"})),f(Bn,"type",Bn.register("ES3DTileset",Bn,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),f(Bn,"supportEditingModes",[...bt.supportEditingModes,B.Translation,B.Rotation]);let Jr=Bn;const Uo=class Uo extends Z{constructor(e){super(e);f(this,"_isFlyInCreated",this.dv(p.react(!1)));f(this,"_readyEvent",this.dv(new V));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position)this.d(Hs([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}get readyEvent(){return this._readyEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new lt([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new T([this,"radius"],"半径",10)]}}};f(Uo,"createDefaultProps",()=>({...Z.createDefaultProps(),mode:"cylinder",radius:10})),f(Uo,"type",Uo.register("ESAlarm",Uo,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"}));let Gc=Uo;const Ts=class Ts extends Z{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new T([this,"radius"],"半径",1),new lt([this,"mode"],[["扫描","scan"],["扩散","diffuse"]],"模式",Ts.defaults.mode)]}}};f(Ts,"createDefaultProps",()=>({...Z.createDefaultProps(),radius:1,mode:"scan",collision:!1})),f(Ts,"type",Ts.register("ESApertureEffect",Ts,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"}));let Wc=Ts;const xs=class xs extends pt{constructor(e){super(e);f(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new T([this,"area"],"面积",0,!1,!0),new T([this,"perimeter"],"周长",0,!1,!0)]}}};f(xs,"createDefaultProps",()=>({...pt.createDefaultProps(),fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),strokeStyle:p.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!0,stroked:!1,collision:!1})),f(xs,"type",xs.register("ESGeoPolygon",xs,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),f(xs,"supportEditingModes",[...pt.supportEditingModes,B.CircularAppend,B.CircularInsert]);let Tt=xs;const _i=class _i extends Tt{get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:_i.defaults.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle??_i.defaults.fillStyle,materialParams:t??_i.defaults.fillStyle.materialParams}}constructor(t){super(t)}};f(_i,"createDefaultProps",()=>({...Tt.createDefaultProps(),stroked:!0,filled:!0,units:p.reactArray(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"]),fillStyle:p.reactJson({color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!0}),strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(_i,"type",_i.register("ESAreaMeasurement",_i,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"面积测量"}));let qc=_i;const Go=class Go extends Z{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"general",more:[...t.more,new $([],"czm"),new ma([this,"image"],"图片"),new Re([this,"translation"],"偏移")]}}};f(Go,"createDefaultProps",()=>({...Z.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:p.reactArray([0,0,0])})),f(Go,"type",Go.register("ESBlastParticleSystem",Go,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"}));let Xc=Go;const In=class In extends Z{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new W([this,"reverse"],"反转",In.defaults.reverse),new Re([this,"size"],"尺寸",In.defaults.size),new gt([this,"edgeColor"],"边框颜色",In.defaults.edgeColor),new T([this,"edgeWidth"],"边框宽度",In.defaults.edgeWidth),new nt([this,"targetID"],"瓦片图层",In.defaults.targetID)]}}};f(In,"createDefaultProps",()=>({...Z.createDefaultProps(),reverse:!1,edgeColor:p.reactArray([1,1,1,1]),edgeWidth:2,size:p.reactArray([10,10,10]),targetID:""})),f(In,"type",In.register("ESBoxClipping",In,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"}));let Yc=In;const au=class au extends Z{constructor(){super(...arguments);f(this,"_thumbnail",this.dv(p.react("")));f(this,"_duration",this.dv(p.react(1)));f(this,"_resetWithCurrentCameraEvent",this.dv(new V));f(this,"_captureEvent",this.dv(new V))}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,r="default"){this.flyInEvent.emit(e,-1,r)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(e,r){this._captureEvent.emit(e,r)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new $([],"ESCameraView"),new tt([],()=>this.resetWithCurrentCamera(),[],"设置为当前视角"),new tt(["number","number"],(r,i)=>this.capture(r,i),[64,64],"获取缩略图"),new nt([this,"thumbnail"],"缩略图","",!0),new T([this,"duration"],"飞行时间",1,!0)]}}};f(au,"type",au.register("ESCameraView",au,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"}));let rl=au;class nl extends q{constructor(e,r,i){super();f(this,"_view",this.dv(new rl));if(this.d(e.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${e.views.length+1}`,r){const a=this._view,u=r;a.duration=u.duration??1,a.position=u.position,a.rotation=u.rotation??[0,0,0],a.thumbnail=u.thumbnail??"",a.name=u.name}else{const a=(i==null?void 0:i.size)??[64,64];this.d(p.nextAnimateFrame(()=>{this._view.resetWithCurrentCamera(),this._view.capture(a[0],a[1])}))}const s=this._view,o=this.dv(p.createNextAnimateFrameEvent(s.durationChanged,s.positionChanged,s.rotationChanged,s.thumbnailChanged,s.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 Zr=class Zr extends j{constructor(e){super(e);f(this,"_currentViewIndex",this.dv(p.react(-1)));f(this,"_viewWrappers",this.dv(new p.ObservableArray));f(this,"_currentViewWrapper",this.dv(p.react(void 0)));f(this,"_container",this.dv(p.react(void 0)));this.initProcessing();{const r=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};r(),this.d(this._viewWrappers.changedEvent.don(r))}{const r=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};r(),this.d(this._viewWrappers.changedEvent.don(r)),this.d(this._currentViewWrapper.changed.don(r))}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 Zp(this._viewWrappers,e=>e.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(e){if(e.length===this._viewWrappers.length){const r=this._viewWrappers;if(e.every((i,s)=>{const o=r.get(s).view;return i.duration===o.duration&&kc(i.position,o.position)&&kc(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let r of e)this._viewWrappers.push(new nl(this,r))}_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}`,r=[64,64]){this._viewWrappers.push(new nl(this,void 0,{name:e,size:r}))}update(e,r,i=[64,64]){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const s=this._viewWrappers.get(e);return r&&(s.view.name=r),s.view.resetWithCurrentCamera(),s.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new nl(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 nl(this))}setCurrentView(e){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const r=this._viewWrappers.get(e);return this._currentViewWrapper.value=r,!0}resetView(e){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const r=this._viewWrappers.get(e);r.view.resetWithCurrentCamera(),r.view.capture()}resetViewName(e,r){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=r}updateView(e,r){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=r.position,i.view.rotation=r.rotation??[0,0,0],i.view.duration=r.duration??1,i.view.thumbnail=r.thumbnail??"",i.view.name=r.name??"",!0}flyToView(e){if(this.setCurrentView(e)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const r=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(r,this.flyMode??Zr.defaults.flyMode)}}flyToPrevView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const r=this._getIndex(e);return this.loop??Zr.defaults.loop?(this.flyToView((this._viewWrappers.length+r-1)%this._viewWrappers.length),!0):r-1<0?!1:(this.flyToView(r-1),!0)}moveToPreView(){const e=this._currentViewWrapper.value;if(!e)return;const r=this._getIndex(e);if(r===0)return;const i=this._viewWrappers.splice(r-1,1,e)[0];this._viewWrappers.set(r,i)}moveToNextView(){const e=this._currentViewWrapper.value;if(!e)return;const r=this._getIndex(e);if(r===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(r+1,1,e)[0];this._viewWrappers.set(r,i)}flyToNextView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const r=this._getIndex(e);return this.loop??Zr.defaults.loop?(this.flyToView((r+1)%this._viewWrappers.length),!0):r+1>this._viewWrappers.length-1?!1:(this.flyToView(r+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 r=this._getIndex(e);if(r===-1){console.warn("index === -1");return}this.deleteView(r)}transitionImageUrl(e){return j.context.getStrFromEnv(e)}_flyStep(e){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const r=this.intervalTime??Zr.defaults.intervalTime,s=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+r)*1e3;return e.promise(p.sleep(s)).then(()=>this._flyStep(e))}initProcessing(){const e=this.dv(p.createProcessingFromAsyncFunc(async i=>this._flyStep(i))),r=()=>{this.playing?e.restart():e.cancel()};r(),this.d(this.playingChanged.don(r))}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new lt([this,"flyMode"],[["默认","default"],["直线飞行","uniform"]],"飞行模式",Zr.defaults.flyMode),new tt([],()=>this.addView(),[],"添加视角"),new tt(["number"],r=>this.insertView(r),[0],"插入视角"),new tt([],()=>this.clearAllViews(),[],"清空所有视角"),new tt([],()=>this.insertView(this.currentViewIndex+1),[],"当前位置插入视角"),new tt([],()=>this.flyToPrevView(),[],"上一个视角"),new tt([],()=>this.flyToNextView(),[],"下一个视角"),new tt([],()=>this.moveToPreView(),[],"当前视角移动到上一个视角"),new tt([],()=>this.moveToNextView(),[],"当前视角移动到下一个视角"),new tt(["number"],r=>this.flyToView(r),[0],"飞入指定视角"),new tt(["number"],r=>this.setCurrentView(r),[0],"设置当前视角"),new tt([],()=>this.deleteCurrentView(),[],"删除当前视角"),new tt(["number"],r=>this.deleteView(r),[0],"删除指定视角"),new tt(["number"],r=>this.resetView(r),[0],"重置视角"),new T([this,"currentViewIndex"],"当前序号",-1,!1,!0),new wf([this,"playing"],()=>this.stop(),[this,"loop"],"播放",Zr.defaults),new W([this,"playing"],"是否播放"),new tt([],()=>this.stop(),[],"停止"),new W([this,"loop"],"是否循环"),new T([this,"intervalTime"],"间隔时间"),new H([this,"views"],"视角集合",[],void 0,!0)]}}};f(Zr,"createDefaultProps",()=>({...j.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})),f(Zr,"type",Zr.register("ESCameraViewCollection",Zr,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"}));let il=Zr;const Wo=class Wo extends Z{constructor(e){super(e);f(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new T([this,"aspectRatio"],"宽高比",1.77778),new T([this,"fov"],"横向夹角",90),new T([this,"far"],"视野长度",100),new T([this,"near"],"近面距离",5)]}}};f(Wo,"createDefaultProps",()=>({...Z.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})),f(Wo,"type",Wo.register("ESCameraVisibleRange",Wo,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"}));let Hc=Wo;const qo=class qo extends Z{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new lt([this,"mode"],[["警车","policeCar"]],"模式","policeCar")]}}};f(qo,"createDefaultProps",()=>({...Z.createDefaultProps(),mode:"policeCar",allowPicking:!0})),f(qo,"type",qo.register("ESCar",qo,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"}));let sl=qo;const Os=class Os extends pt{constructor(e){super(e);f(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new T([this,"height"],"高度",10)],coordinate:[...e.coordinate,new T([this,"area"],"面积",0,!1,!0),new T([this,"perimeter"],"周长",0,!1,!0)]}}};f(Os,"createDefaultProps",()=>({...pt.createDefaultProps(),height:10,filled:!0,fillStyle:p.reactJson({material:"",materialParams:{},ground:!0,color:[1,1,1,1]})})),f(Os,"type",Os.register("ESClassification",Os,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),f(Os,"supportEditingModes",[...pt.supportEditingModes,B.CircularAppend,B.CircularInsert,B.HeightModify]);let ol=Os;const Xo=class Xo extends Z{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new W([this,"showArrow"],"显示箭头",!0),new gt([this,"edgeColor"],"线框颜色",[1,1,1,1]),new T([this,"edgetWidth"],"线框宽度",2),new T([this,"width"],"裁剪宽度",200),new T([this,"height"],"裁剪高度",200),new nt([this,"targetID"],"瓦片图层","")]}}};f(Xo,"createDefaultProps",()=>({...Z.createDefaultProps(),showArrow:!0,edgeColor:p.reactArray([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})),f(Xo,"type",Xo.register("ESClippingPlane",Xo,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"}));let Bc=Xo;class B_ extends q{constructor(t,e,r){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${r.id}) container`);{const u=()=>{const c=` ${e.cssText}
|
|
66
|
-
${
|
|
67
|
-
${
|
|
68
|
-
`;i.style.cssText=c};u();const l=this.dv(
|
|
64
|
+
***************************************************************************** */function jC(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){t.label=l[1];break}if(l[0]===6&&t.label<s[1]){t.label=s[1],s=l;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(l);break}s[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(r,t)}catch(c){l=[6,c],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var Ps=(function(){function r(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null}return r})();function zC(r,e){return r>e?1:r<e?-1:0}function Is(r,e,t){for(var n=new Ps(null,null),i=n,s=n;;){var o=t(r,e.key);if(o<0){if(e.left===null)break;if(t(r,e.left.key)<0){var 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){var 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 Dd(r,e,t,n){var i=new Ps(r,e);if(t===null)return i.left=i.right=null,i;t=Is(r,t,n);var 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 Fv(r,e,t){var n=null,i=null;if(e){e=Is(r,e,t);var 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 UC(r,e,t){return e===null?r:(r===null||(e=Is(r.key,e,t),e.left=r),e)}function Md(r,e,t,n,i){if(r){n(""+e+(t?"└── ":"├── ")+i(r)+`
|
|
65
|
+
`);var s=e+(t?" ":"│ ");r.left&&Md(r.left,s,!1,n,i),r.right&&Md(r.right,s,!0,n,i)}}var Rd=(function(){function r(e){e===void 0&&(e=zC),this._root=null,this._size=0,this._comparator=e}return r.prototype.insert=function(e,t){return this._size++,this._root=Dd(e,t,this._root,this._comparator)},r.prototype.add=function(e,t){var n=new Ps(e,t);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,s=Is(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},r.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},r.prototype._remove=function(e,t,n){var i;if(t===null)return null;t=Is(e,t,n);var s=n(e,t.key);return s===0?(t.left===null?i=t.right:(i=Is(e,t.left,n),i.right=t.right),this._size--,i):t},r.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=Is(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},r.prototype.findStatic=function(e){for(var t=this._root,n=this._comparator;t;){var i=n(e,t.key);if(i===0)return t;i<0?t=t.left:t=t.right}return null},r.prototype.find=function(e){return this._root&&(this._root=Is(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},r.prototype.contains=function(e){for(var t=this._root,n=this._comparator;t;){var i=n(e,t.key);if(i===0)return!0;i<0?t=t.left:t=t.right}return!1},r.prototype.forEach=function(e,t){for(var n=this._root,i=[],s=!1;!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},r.prototype.range=function(e,t,n,i){for(var s=[],o=this._comparator,a=this._root,u;s.length!==0||a;)if(a)s.push(a),a=a.left;else{if(a=s.pop(),u=o(a.key,t),u>0)break;if(o(a.key,e)>=0&&n.call(i,a))return this;a=a.right}return this},r.prototype.keys=function(){var e=[];return this.forEach(function(t){var n=t.key;return e.push(n)}),e},r.prototype.values=function(){var e=[];return this.forEach(function(t){var n=t.data;return e.push(n)}),e},r.prototype.min=function(){return this._root?this.minNode(this._root).key:null},r.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},r.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},r.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},r.prototype.at=function(e){for(var t=this._root,n=!1,i=0,s=[];!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},r.prototype.next=function(e){var t=this._root,n=null;if(e.right){for(n=e.right;n.left;)n=n.left;return n}for(var i=this._comparator;t;){var s=i(e.key,t.key);if(s===0)break;s<0?(n=t,t=t.left):t=t.right}return n},r.prototype.prev=function(e){var t=this._root,n=null;if(e.left!==null){for(n=e.left;n.right;)n=n.right;return n}for(var i=this._comparator;t;){var s=i(e.key,t.key);if(s===0)break;s<0?t=t.left:(n=t,t=t.right)}return n},r.prototype.clear=function(){return this._root=null,this._size=0,this},r.prototype.toList=function(){return WC(this._root)},r.prototype.load=function(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!1);var i=e.length,s=this._comparator;if(n&&Fd(e,t,0,i-1,s),this._root===null)this._root=Ld(e,t,0,i),this._size=i;else{var o=qC(this.toList(),GC(e,t),s);i=this._size+i,this._root=Ad({head:o},0,i)}return this},r.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),r.prototype.toString=function(e){e===void 0&&(e=function(n){return String(n.key)});var t=[];return Md(this._root,"",!0,function(n){return t.push(n)},e),t.join("")},r.prototype.update=function(e,t,n){var i=this._comparator,s=Fv(e,this._root,i),o=s.left,a=s.right;i(e,t)<0?a=Dd(t,n,a,i):o=Dd(t,n,o,i),this._root=UC(o,a,i)},r.prototype.split=function(e){return Fv(e,this._root,this._comparator)},r.prototype[Symbol.iterator]=function(){var e,t,n;return jC(this,function(i){switch(i.label){case 0:e=this._root,t=[],n=!1,i.label=1;case 1:return n?[3,6]:e===null?[3,2]:(t.push(e),e=e.left,[3,5]);case 2:return t.length===0?[3,4]:(e=t.pop(),[4,e]);case 3:return i.sent(),e=e.right,[3,5];case 4:n=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},r})();function Ld(r,e,t,n){var i=n-t;if(i>0){var s=t+Math.floor(i/2),o=r[s],a=e[s],u=new Ps(o,a);return u.left=Ld(r,e,t,s),u.right=Ld(r,e,s+1,n),u}return null}function GC(r,e){for(var t=new Ps(null,null),n=t,i=0;i<r.length;i++)n=n.next=new Ps(r[i],e[i]);return n.next=null,t.next}function WC(r){for(var e=r,t=[],n=!1,i=new Ps(null,null),s=i;!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 Ad(r,e,t){var n=t-e;if(n>0){var i=e+Math.floor(n/2),s=Ad(r,e,i),o=r.head;return o.left=s,r.head=r.head.next,o.right=Ad(r,i+1,t),o}return null}function qC(r,e,t){for(var n=new Ps(null,null),i=n,s=r,o=e;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 Fd(r,e,t,n,i){if(!(t>=n)){for(var s=r[t+n>>1],o=t-1,a=n+1;;){do o++;while(i(r[o],s)<0);do a--;while(i(r[a],s)>0);if(o>=a)break;var u=r[o];r[o]=r[a],r[a]=u,u=e[o],e[o]=e[a],e[a]=u}Fd(r,e,t,a,i),Fd(r,e,a+1,n,i)}}const ol=(r,e)=>r.ll.x<=e.x&&e.x<=r.ur.x&&r.ll.y<=e.y&&e.y<=r.ur.y,kd=(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 xs=Number.EPSILON;xs===void 0&&(xs=Math.pow(2,-52));const XC=xs*xs,kv=(r,e)=>{if(-xs<r&&r<xs&&-xs<e&&e<xs)return 0;const t=r-e;return t*t<XC*r*e?0:r<e?-1:1};class HC{constructor(){this.reset()}reset(){this.xRounder=new Vv,this.yRounder=new Vv}round(e,t){return{x:this.xRounder.round(e),y:this.yRounder.round(t)}}}class Vv{constructor(){this.tree=new Rd,this.round(0)}round(e){const t=this.tree.add(e),n=this.tree.prev(t);if(n!==null&&kv(t.key,n.key)===0)return this.tree.remove(e),n.key;const i=this.tree.next(t);return i!==null&&kv(t.key,i.key)===0?(this.tree.remove(e),i.key):e}}const al=new HC,xc=(r,e)=>r.x*e.y-r.y*e.x,Bv=(r,e)=>r.x*e.x+r.y*e.y,jv=(r,e,t)=>{const n=rm(r.x,r.y,e.x,e.y,t.x,t.y);return n>0?-1:n<0?1:0},Tc=r=>Math.sqrt(Bv(r,r)),YC=(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 xc(i,n)/Tc(i)/Tc(n)},JC=(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 Bv(i,n)/Tc(i)/Tc(n)},zv=(r,e,t)=>e.y===0?null:{x:r.x+e.x/e.y*(t-r.y),y:t},Uv=(r,e,t)=>e.x===0?null:{x:t,y:r.y+e.y/e.x*(t-r.x)},ZC=(r,e,t,n)=>{if(e.x===0)return Uv(t,n,r.x);if(n.x===0)return Uv(r,e,t.x);if(e.y===0)return zv(t,n,r.y);if(n.y===0)return zv(r,e,t.y);const i=xc(e,n);if(i==0)return null;const s={x:t.x-r.x,y:t.y-r.y},o=xc(s,e)/i,a=xc(s,n)/i,u=r.x+a*e.x,l=t.x+o*n.x,c=r.y+a*e.y,h=t.y+o*n.y,f=(u+l)/2,p=(c+h)/2;return{x:f,y:p}};class gr{static compare(e,t){const n=gr.comparePoints(e.point,t.point);return n!==0?n:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:Ts.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:YC(this.point,e.point,s.point),cosine:JC(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:u,cosine:l}=t.get(s);return o>=0&&u>=0?a<l?1:a>l?-1:0:o<0&&u<0?a<l?-1:a>l?1:0:u<o?-1:u>o?1:0}}}let KC=0;class Ts{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,u=t.leftSE.point.y,l=e.rightSE.point.y,c=t.rightSE.point.y;if(n<i){if(u<a&&u<l)return 1;if(u>a&&u>l)return-1;const h=e.comparePoint(t.leftSE.point);if(h<0)return 1;if(h>0)return-1;const f=t.comparePoint(e.rightSE.point);return f!==0?f:-1}if(n>i){if(a<u&&a<c)return-1;if(a>u&&a>c)return 1;const h=t.comparePoint(e.leftSE.point);if(h!==0)return h;const f=e.comparePoint(t.rightSE.point);return f<0?1:f>0?-1:1}if(a<u)return-1;if(a>u)return 1;if(s<o){const h=t.comparePoint(e.rightSE.point);if(h!==0)return h}if(s>o){const h=e.comparePoint(t.rightSE.point);if(h<0)return 1;if(h>0)return-1}if(s!==o){const h=l-a,f=s-n,p=c-u,m=o-i;if(h>f&&p<m)return 1;if(h<f&&p>m)return-1}return s>o?1:s<o||l<c?-1:l>c?1:e.id<t.id?-1:e.id>t.id?1:0}constructor(e,t,n,i){this.id=++KC,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=gr.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 u=new gr(i,!0),l=new gr(s,!1);return new Ts(u,l,[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,u=t.y+a*i.y;return e.y===u?0:e.y<u?-1:1}getIntersection(e){const t=this.bbox(),n=e.bbox(),i=kd(t,n);if(i===null)return null;const s=this.leftSE.point,o=this.rightSE.point,a=e.leftSE.point,u=e.rightSE.point,l=ol(t,a)&&this.comparePoint(a)===0,c=ol(n,s)&&e.comparePoint(s)===0,h=ol(t,u)&&this.comparePoint(u)===0,f=ol(n,o)&&e.comparePoint(o)===0;if(c&&l)return f&&!h?o:!f&&h?u:null;if(c)return h&&s.x===u.x&&s.y===u.y?null:s;if(l)return f&&o.x===a.x&&o.y===a.y?null:a;if(f&&h)return null;if(f)return o;if(h)return u;const p=ZC(s,this.vector(),a,e.vector());return p===null||!ol(i,p)?null:al.round(p.x,p.y)}split(e){const t=[],n=e.events!==void 0,i=new gr(e,!0),s=new gr(e,!1),o=this.rightSE;this.replaceRightSE(s),t.push(s),t.push(i);const a=new Ts(i,o,this.rings.slice(),this.windings.slice());return gr.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),gr.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=Ts.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],u=n.windings[s],l=t.rings.indexOf(a);l===-1?(t.rings.push(a),t.windings.push(u)):t.windings[l]+=u}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,u=this.rings.length;a<u;a++){const l=this.rings[a],c=this.windings[a],h=t.indexOf(l);h===-1?(t.push(l),n.push(c)):n[h]+=c}const s=[],o=[];for(let a=0,u=t.length;a<u;a++){if(n[a]===0)continue;const l=t[a],c=l.poly;if(o.indexOf(c)===-1)if(l.isExterior)s.push(c);else{o.indexOf(c)===-1&&o.push(c);const h=s.indexOf(l.poly);h!==-1&&s.splice(h,1)}}for(let a=0,u=s.length;a<u;a++){const l=s[a].multiPoly;i.indexOf(l)===-1&&i.push(l)}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(Gr.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===Gr.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 ${Gr.type}`)}return this._isInResult}}class Gv{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=al.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 u=al.round(e[o][0],e[o][1]);u.x===s.x&&u.y===s.y||(this.segments.push(Ts.fromRing(s,u,this)),u.x<this.bbox.ll.x&&(this.bbox.ll.x=u.x),u.y<this.bbox.ll.y&&(this.bbox.ll.y=u.y),u.x>this.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),s=u)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(Ts.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 QC{constructor(e,t){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Gv(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 Gv(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 Wv{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 QC(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 Nc{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,u=s.rightSE;const l=[a],c=a.point,h=[];for(;o=a,a=u,l.push(a),a.point!==c;)for(;;){const f=a.getAvailableLinkedEvents();if(f.length===0){const w=l[0].point,E=l[l.length-1].point;throw new Error(`Unable to complete output ring starting at [${w.x}, ${w.y}]. Last matching segment found ends at [${E.x}, ${E.y}].`)}if(f.length===1){u=f[0].otherSE;break}let p=null;for(let w=0,E=h.length;w<E;w++)if(h[w].point===a.point){p=w;break}if(p!==null){const w=h.splice(p)[0],E=l.splice(w.index);E.unshift(E[0].otherSE),t.push(new Nc(E.reverse()));continue}h.push({index:l.length,point:a.point});const m=a.getLeftmostComparator(o);u=f.sort(m)[0].otherSE;break}t.push(new Nc(l))}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 l=1,c=this.events.length-1;l<c;l++){const h=this.events[l].point,f=this.events[l+1].point;jv(h,e,f)!==0&&(t.push(h),e=h)}if(t.length===1)return null;const n=t[0],i=t[1];jv(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,u=[];for(let l=o;l!=a;l+=s)u.push([t[l].x,t[l].y]);return u}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];gr.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 qv{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 $C{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 qv(s));else{const o=s.enclosingRing();o.poly||t.push(new qv(o)),o.poly.addInterior(s)}}return t}}class tS{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ts.compare;this.queue=e,this.tree=new Rd(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,u;for(;a===void 0;)s=this.tree.prev(s),s===null?a=null:s.key.consumedBy===void 0&&(a=s.key);for(;u===void 0;)o=this.tree.next(o),o===null?u=null:o.key.consumedBy===void 0&&(u=o.key);if(e.isLeft){let l=null;if(a){const h=a.getIntersection(t);if(h!==null&&(t.isAnEndpoint(h)||(l=h),!a.isAnEndpoint(h))){const f=this._splitSafely(a,h);for(let p=0,m=f.length;p<m;p++)n.push(f[p])}}let c=null;if(u){const h=u.getIntersection(t);if(h!==null&&(t.isAnEndpoint(h)||(c=h),!u.isAnEndpoint(h))){const f=this._splitSafely(u,h);for(let p=0,m=f.length;p<m;p++)n.push(f[p])}}if(l!==null||c!==null){let h=null;l===null?h=c:c===null?h=l:h=gr.comparePoints(l,c)<=0?l:c,this.queue.remove(t.rightSE),n.push(t.rightSE);const f=t.split(h);for(let p=0,m=f.length;p<m;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&&u){const l=a.getIntersection(u);if(l!==null){if(!a.isAnEndpoint(l)){const c=this._splitSafely(a,l);for(let h=0,f=c.length;h<f;h++)n.push(c[h])}if(!u.isAnEndpoint(l)){const c=this._splitSafely(u,l);for(let h=0,f=c.length;h<f;h++)n.push(c[h])}}}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 Xv=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,eS=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class nS{run(e,t,n){Gr.type=e,al.reset();const i=[new Wv(t,!0)];for(let h=0,f=n.length;h<f;h++)i.push(new Wv(n[h],!1));if(Gr.numMultiPolys=i.length,Gr.type==="difference"){const h=i[0];let f=1;for(;f<i.length;)kd(i[f].bbox,h.bbox)!==null?f++:i.splice(f,1)}if(Gr.type==="intersection")for(let h=0,f=i.length;h<f;h++){const p=i[h];for(let m=h+1,w=i.length;m<w;m++)if(kd(p.bbox,i[m].bbox)===null)return[]}const s=new Rd(gr.compare);for(let h=0,f=i.length;h<f;h++){const p=i[h].getSweepEvents();for(let m=0,w=p.length;m<w;m++)if(s.insert(p[m]),s.size>Xv)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const o=new tS(s);let a=s.size,u=s.pop();for(;u;){const h=u.key;if(s.size===a){const p=h.segment;throw new Error(`Unable to pop() ${h.isLeft?"left":"right"} SweepEvent [${h.point.x}, ${h.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>Xv)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(o.segments.length>eS)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const f=o.process(h);for(let p=0,m=f.length;p<m;p++){const w=f[p];w.consumedBy===void 0&&s.insert(w)}a=s.size,u=s.pop()}al.reset();const l=Nc.factory(o.segments);return new $C(l).getGeom()}}const Gr=new nS;var Vd={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 Gr.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 Gr.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 Gr.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 Gr.run("difference",r,t)}};function rS(r,e){var t=kn(r),n=kn(e),i=r.properties||{},s=Vd.difference(t.coordinates,n.coordinates);return s.length===0?null:s.length===1?fn(s[0],i):Uh(s,i)}function iS(r,e,t){t===void 0&&(t={});var n=kn(r),i=kn(e),s=Vd.intersection(n.coordinates,i.coordinates);return s.length===0?null:s.length===1?fn(s[0],t.properties):Uh(s,t.properties)}function sS(r,e,t){t===void 0&&(t={});var n=kn(r),i=kn(e),s=Vd.union(n.coordinates,i.coordinates);return s.length===0?null:s.length===1?fn(s[0],t.properties):Uh(s,t.properties)}function Hv(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=iS(fn([r]),fn([e]));if(t)return t.geometry.coordinates}function Yv(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=sS(fn([r]),fn([e]));if(t)return t.geometry.coordinates}function Jv(r,e=500,t="meters"){const n=kC(xr(r),e,{units:t});if(n)return n.geometry.coordinates}function Zv(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=rS(fn([r]),fn([e]));if(t)return t.geometry.coordinates}function Kv(r,e,t=10,n="meters"){return BC(r,e,{steps:t,units:n}).geometry.coordinates}function Bd(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=fn([r]),n=fn([e]);return OE(t,n)?"oneBig":BE(t,n)?"twoBig":!1}function Qv(r){const e=os(Us(r,["0"])),t=os(Us(r,["1"])),n=os(Us(r,["2"])),i=Di(Us(r,["0"])),s=Di(Us(r,["1"])),o=Di(Us(r,["2"]));return{minPos:[e,t,n],maxPos:[i,s,o],center:[(e+i)*.5,(t+s)*.5,(n+o)*.5]}}function $v(r){const{minPos:e,maxPos:t,center:n}=Qv(r);if(e.some(a=>!Number.isFinite(a)||t.some(u=>!Number.isFinite(u))||n.some(u=>!Number.isFinite(u)))){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=Yl(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 ty(r,e){const t=ri(r),n=ri(e);return g.Vector.distance(t,n)}function ul(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=Yl(r[s],r[s+1]),a=Math.abs(r[s][2]-r[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(e==="RHUMB"){const o=Cm(r[s],r[s+1]),a=Math.abs(r[s][2]-r[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(e==="NONE"){const o=ty(r[s],r[s+1]);i+=o}else console.warn(`未知的arcType: ${e},导致距离无法计算!`);t.push(i)}return t}function jd(r){const e="__getXyzFromPostion";let t=An(r,e);return(!t||!g.Vector.equals(t[0],r))&&(t=[[...r],ri(r)],ti(r,e,t)),t[1]}class ey extends qo{constructor(e){super(e)}get propUiTree(){return this.uiTree}}class zd extends Wo{constructor(e,t,n){super(e,t),this._property=n}get property(){return this._property}}class Ud extends zd{constructor(e,t){super(e,!1,t)}}class Gd extends zd{constructor(e,t){super(e,!0,t)}get groupChildren(){return this.children}}function ny(r,e){const t=new ey(e),n=r.getProperties("chinese"),i=[];for(let s of n)if(s instanceof rt){const o=new Gd(t,s);o.d(()=>s.destroy()),t.children.push(o),i.push(o)}else{const o=new Ud(t,s);t.children.push(o),o.d(()=>s.destroy())}for(;i.length>0;){const s=i.pop();if(!s)throw new Error("should not be here!");const o=s;if(!(o.property instanceof rt))throw new Error("!(treeItem.property instanceof GroupProperty)");for(let a of o.property.children)if(a instanceof rt){const u=new Gd(t,a);u.d(()=>a.destroy()),o.groupChildren.push(u),i.push(u)}else{const u=new Ud(t,a);o.groupChildren.push(u),u.d(()=>a.destroy())}}return t.d(()=>{t.itemChildrenChanged.reset(),t.itemChildrenToChange.reset();const s=[...t.getDescendants()];s.forEach(o=>{o.children&&(o.children.length=0),o.destroy()}),s.length=0}),t}class Ta extends V{constructor(t){super();d(this,"_propTreeReact",this.dv(B(void 0)));this.d(()=>this._propTreeReact.value=void 0),this.dv(new le(this.sceneObjectChanged,n=>{if(!n)return;const i=new V;return i.d(n.toDestroyEvent.don(()=>{this.sceneObject=void 0})),i})),this.d(this.sceneObjectChanged.don(n=>{this._propTreeReact.value=void 0,!(!n||!(n instanceof Z))&&(this._propTreeReact.value=ny(n,t))}))}get propTree(){return this._propTreeReact.value}get propTreeChanged(){return this._propTreeReact.changed}}(r=>{r.createDefaultProps=()=>({sceneObject:void 0})})(Ta||(Ta={})),Oi(Ta.prototype,Ta.createDefaultProps);function Wd(r){return ss(r,(e,t)=>e[0]===t[0]&&e[1]===t[1],e=>[...e])}function ry(r,e){const t=new Array;for(let n of r)t.push(e(n));return t}function qd(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 oS(r,e,t){var i;((i=e.attachedViewers.values().toArray()[0])==null?void 0:i.getEngineObject(e))?t.call(r):(r.dispose(e.viewerAttached.don(()=>{t.call(r)})),r.dispose(e.createdEvent.don(()=>t.call(r))))}function aS(r,e,t,n=!0){n&&t(),r.dispose(e.disposableOn(t))}function uS(r,e){const{type:t,id:n}=r;if(t){const i=Z.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 iy(r){const e=r.children&&uh(r.children,n=>{if(!(n instanceof an))throw new Error("!(treeItem instanceof SceneTreeItem)");return!n.show})||!1,t=r.sceneTree.getSceneObjectShowFunc(r.sceneObject);return!e||t}class an extends Wo{constructor(t,n=!1,i,s,o=!0){super(t,n,i);d(this,"_dragDrop");d(this,"_showChangedNotAffectChildren",!1);d(this,"_showChangedNotAffectParent",!1);d(this,"_type",this.dv(B("Unknown")));d(this,"_isExport",this.dv(B(!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 u;const l=()=>{u&&(u(),u=void 0)};this.dispose(l),this.dispose(this.sceneObjectChanged.disposableOn(c=>{l(),c&&(u=$([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 h of this.children)h instanceof an&&(h._showChangedNotAffectParent=!0,h.show=c,h._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof an&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=iy(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new le(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const c=new V;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof I){const h=()=>{this.show=t.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.showChanged.disposableOn(h))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof I){const h=()=>{this.show=t.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.enabledChanged.disposableOn(h))}return c})),this.childrenChangedEvent.disposableOn(()=>{const c=iy(this);this._showChangedNotAffectChildren=!0,this.show=c,this._showChangedNotAffectChildren=!1});{const c=()=>{let h="Unknown";this.sceneObject?h=this.sceneObject.typeName:this.children&&(h="Folder"),this._type.value=h};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 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 an(this.tree,!0);i.json=n,this.children.push(i)}}}clone(){try{const t=new an(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:jt(void 0)})})(an||(an={})),Oi(an.prototype,an.createDefaultProps);function sy(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 oy extends Rg{constructor(e){super(),this._treeItem=e;const{dragStartDataManager:t}=this._treeItem.sceneTree;let n="none";const i=this.disposeVar(Lp(()=>{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 u=a.data.value,l=this._treeItem,{tree:c}=l;if(c){const h=[...c.selectedItems];~h.indexOf(u)||h.push(u);const f=sy(l,o,c.itemDivHeight);if(f!=="none"&&qo.canMoveToTreeItems(h,l,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 u=a.data.value,l=this._treeItem,{tree:c}=l;if(!c)return;const h=[...c.selectedItems];~h.indexOf(u)||h.push(u);const f=sy(l,o,c.itemDivHeight);f!=="none"&&qo.canMoveToTreeItems(h,l,f)&&(qo.moveToTreeItems(h,l,f),a.data=void 0,s("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{n="none",i.restart()}))}}function lS(r){if(!(r instanceof an))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new oy(r)}function cS(r){let e=!1;return r&&("show"in r?e=r.show??!0:"enabled"in r&&(e=r.enabled??!0)),e}function hS(r,e){r&&("show"in r?r.show=e:"enabled"in r&&(r.enabled=e))}const dS=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function fS(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&&dS.includes(o)&&e.push(s.sceneObj)}}}return e}async function pS(r,e){const t=fS(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 ay extends V{constructor(t,n){super();d(this,"treeItemContexMenuCallback");this._sceneTree=t,this._projectManager=n}get sceneTree(){return this._sceneTree}}class gS extends V{constructor(t){super();d(this,"_jsonLoadingEvent",this.disposeVar(new I));d(this,"_setJsonProcessing",this.disposeVar(Fn(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 Sr("JSON重新赋值!"),t)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(t){this.json=JSON.parse(t)}}function mS(r){return r.name+"_clone"}function Xd(r,e,t){if(r instanceof an)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 vS(r){[r,...r.getDescendants()].forEach(e=>e.destroy())}const Mn=class Mn extends qo{constructor(t,n,i,s){super(i);d(this,"_jsonLoading",this.disposeVar(new gS(this)));d(this,"createSceneObjectFunc",Mn.defaultCreateSceneObjectFunc);d(this,"createTreeItemDragDropFunc",Mn.defaultCreateTreeItemDragDropFunc);d(this,"preloadFunc",Mn.defaultPreload);d(this,"getSceneObjectShowFunc",Mn.defaultGetSceneObjectShow);d(this,"setSceneObjectShowFunc",Mn.defaultSetSceneObjectShow);d(this,"getSceneTreeItemCloneNameFunc",Mn.defaultGetSceneTreeItemCloneNameFunc);d(this,"debug",!1);d(this,"_contextMenu",this.disposeVar(new ay(this,this.projectManager)));d(this,"_showPropUiOnSelecting",this.disposeVar(B(!0)));this._name=t,this._dragStartDataManager=n,this._projectManager=s,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var a,u;window.lssn=this.lastSelectedItem,window.lsso=(a=this.lastSelectedItem)==null?void 0:a.sceneObject,this.debug&&console.log(((u=this.lastSelectedItem)==null?void 0:u.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(a=>{for(let u of a){const l=u,{sceneObject:c}=l;c&&o.deleteSceneObject(c)&&c.destroy()&&jl(c,void 0);for(let h of l.getDescendants()){const{sceneObject:f}=h;f&&o.deleteSceneObject(f)&&f.destroy()&&jl(f,void 0)}vS(u)}})),this.dispose(this.itemsAdded.disposableOn(a=>{for(let u of a){const l=u;l.sceneObject&&o.addSceneObject(l.sceneObject)&&jl(l.sceneObject,l)}})),this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{if(!this.showPropUiOnSelecting)return;this._projectManager.propUiTreeManager.sceneObject=void 0;const{lastSelectedItem:a}=this;a&&(this._projectManager.propUiTreeManager.sceneObject=a.sceneObject)}))}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}get dragStartDataManager(){return this._dragStartDataManager}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 an(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?Xd(i,n):!1}addNewTreeItem(t,n,i,s){const o=t||this.lastSelectedItem||this.root;if(o&&Xd(o,n)){const a=new an(this,i);if(a.sceneObject=s,!Xd(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=Z.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=Z.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=Z.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)}};d(Mn,"defaultCreateSceneObjectFunc",uS),d(Mn,"defaultCreateTreeItemDragDropFunc",lS),d(Mn,"defaultPreload",pS),d(Mn,"defaultGetSceneObjectShow",cS),d(Mn,"defaultSetSceneObjectShow",hS),d(Mn,"defaultGetSceneTreeItemCloneNameFunc",mS);let ll=Mn;const Hd={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class yS extends V{constructor(t){super();d(this,"_currentPosition",this.disposeVar(Ht(void 0)));d(this,"_currentRotation",this.disposeVar(Ht(void 0)));d(this,"_currentHeading",this.disposeVar(B(void 0)));d(this,"_isRotating",this.disposeVar(B(!1)));d(this,"_isGround",this.disposeVar(B(!1)));d(this,"_startPosition",[0,0,0]);d(this,"_startRotation",[0,0,0]);d(this,"_processing",this.disposeVar(Fn(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 u=this._startPosition;u.splice(0,3,...o);const l=this._startRotation;l.splice(0,3,...a);let c=Date.now();const h=Au(u,n);this._currentHeading.value=h;const p=Yl(u,n)/s,m=[i[0]-l[0],i[1]-l[1],i[2]-l[2]],w=n[2]-u[2];await t.promise(new Promise(E=>{t.disposer.dispose(xl(async()=>{let b=Date.now()-c;b=b<0?0:b,b=b>s?s:b;const v=b*p,y=lm(u,v,h);if(this.isGround&&y){const _=await this._esviewer.getTerrainHeight([y[0],y[1]]);this._currentPosition.value=[y[0],y[1],_??0]}else y&&(y[2]+=w*(b/s)),this._currentPosition.value=y;if(this.isRotating){const[_,C,S]=m,P=b/s;this._currentRotation.value=[l[0]+_*P,l[1]+C*P,l[2]+S*P]}b===s&&(this._currentPosition.value=n,this.isRotating&&(this._currentRotation.value=i),this.isRotating=!1,this.isGround=!1,E())}))}))})));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()}}function uy(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 yi=class yi extends Rt{constructor(t){super(t);d(this,"editingBindMode","lineString");d(this,"_area",this.dv(B(0)));d(this,"_perimeter",this.dv(B(0)));this.d(zs(this.pointsChanged,()=>{this._updateArea(),this._updatePerimeter()},{immediate:!0}))}updateEditing(){var n;const t=[];this.editingBindMode=="doublePoints"?t.push(Q.DoublePointsAppend,Q.DoublePointsModify):this.editingBindMode=="lineString"?t.push(Q.LineStringAppend,Q.LineStringInsert,Q.Translation):this.editingBindMode=="circular"?(t.push(Q.CircularAppend,Q.CircularInsert,Q.Translation),this.supportEditingModes().includes(Q.HeightModify)&&t.push(Q.HeightModify)):this.editingBindMode=="visibility"?t.push(Q.VisibilityAppend,Q.VisibilityModify):this.editingBindMode=="scatter"&&t.push(Q.ScatterAppend,Q.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 Yh([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const t=ul(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=ul(t,"GEODESIC");return n[n.length-1]}else return}getIntersect(t){if(this.points&&this.points.length>=3&&t.length>=3){const n=Hv(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 u=a[0].map(l=>[...l,0]);o.push(u)}),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=Yv(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 u=a[0].map(l=>[...l,0]);o.push(u)}),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=Zv([...this.points,this.points[0]],[...n]);if(!o)return{status:"undefined",positions:void 0};const a=[...o];if(uy(a)===3){const u=a.map(f=>f.map(p=>[...p,0]));if(u.length<=1)return{status:"notIncluded",positions:u};const l=u[0],c=u[1];return Bd([...l],[...c])==="oneBig"?{status:"included",positions:u}:{status:"notIncluded",positions:u}}else if(uy(a)===4){const l=[...a.map(h=>h.map(f=>f.map(p=>[...p,0])))],c=[];return l.forEach(h=>{c.push(h[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=Jv(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=Bd(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 K([this,"points"],"位置数组",yi.defaults.points,void 0,!0)],style:[...t.style,new rt([],"点样式"),new X([this,"pointed"],"开启",!1),new O([this,"pointSize"],"点大小",1),new mt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Et([this,"pointColor"],"点颜色",[1,1,1,1]),new Et([this,"pointOutlineColor"],"轮廓颜色",yi.defaults.pointStyle.outlineColor),new O([this,"pointOutlineWidth"],"轮廓宽度",yi.defaults.pointStyle.outlineWidth),new rt([],"线样式"),new X([this,"stroked"],"开启线样式",!0),new X([this,"strokeGround"],"贴地",!1),new O([this,"strokeWidth"],"线宽",1),new mt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Et([this,"strokeColor"],"线颜色",[1,1,1,1]),new rt([],"面样式"),new X([this,"filled"],"开启",!1),new X([this,"fillGround"],"贴地",!1),new Et([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...t.more,new rt([],"点样式集合"),new ut([this,"pointMaterial"],"点材质"),new K([this,"pointMaterialParams"],"点材质参数"),new rt([],"线样式集合"),new ut([this,"strokeMaterial"],"线材质"),new K([this,"strokeMaterialParams"],"线材质参数"),new rt([],"面样式集合"),new ut([this,"fillMaterial"],"面材质"),new K([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}};d(yi,"createDefaultProps",()=>({...Rt.createDefaultProps(),pointed:!1,pointStyle:dt({size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),stroked:!1,strokeStyle:dt({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:dt({color:[1,1,1,1],material:"",materialParams:{},ground:!1}),points:bl([])})),d(yi,"type",yi.register("ESGeoVector",yi,{chsName:"地理矢量",tags:["ESObjects"],description:"地理矢量"})),d(yi,"supportEditingModes",[...Rt.supportEditingModes,Q.Translation]);let wt=yi;const vo=class vo extends Rt{constructor(){super(...arguments);d(this,"_statusDis",this.dv(B(!0)));d(this,"_smoothMoveEvent",this.dv(new I));d(this,"_smoothMoveWithRotationEvent",this.dv(new I));d(this,"_smoothMoveOnGroundEvent",this.dv(new I));d(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new I));d(this,"_automaticLandingEvent",this.dv(new I));d(this,"_smoothMoveKeepPitchEvent",this.dv(new I));d(this,"_smoothMoveRelativelyEvent",this.dv(new I));d(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new I));d(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var n;const t=[];this.editingBindMode=="singlePoint"?(t.push(Q.Place,Q.Translation),["ESLocationMeasurement"].includes(this.typeName)||t.push(Q.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||t.push(Q.Scale)):this.editingBindMode=="doublePoints"&&t.push(Q.DoublePointsAppend,Q.DoublePointsModify),(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()};return{...t,defaultMenu:"basic",location:[...t.location,new X([this,"editing"],"是否编辑"),new it([],()=>this.automaticLanding(),[],"自动落地"),new Xo([this,"position"],"位置数组",[0,0,0]),new Vh([this,"rotation"],"姿态数组",[0,0,0]),new Qe([this,"scale"],"缩放",[1,1,1]),new O([this,"minVisibleDistance"],"最小可见距离",0),new O([this,"maxVisibleDistance"],"最大可见距离",0)],more:[...t.more,new it(["numbers","number"],(n,i)=>this.smoothMove(n,i),[[0,0,0],0],"平滑移动","smoothMove"),new it(["numbers","number"],(n,i)=>this.smoothMoveKeepPitch(n,i),[[0,0,0],0],"固定方向平滑移动","smoothMoveKeepPitch"),new it(["numbers","numbers","number"],(n,i,s)=>this.smoothMoveWithRotation(n,i,s),[[0,0,0],[0,0,0],0],"平滑偏移","smoothMoveWithRotation"),new it(["number","number","number","string"],(n,i,s,o)=>this.smoothMoveOnGround(n,i,s,o),[0,0,0,""],"贴地平滑移动","smoothMoveOnGround"),new it(["numbers","number","number","number","string"],(n,i,s,o,a)=>this.smoothMoveWithRotationOnGround(n,i,s,o,a),[[0,0,0],0,0,0,""],"贴地平滑偏移","smoothMoveWithRotationOnGround"),new it(["numbers","number"],(n,i)=>this.smoothMoveRelatively(n,i),[[0,0,0],0],"smoothMoveRelatively","smoothMoveRelatively"),new it(["numbers","numbers","number"],(n,i,s)=>this.smoothMoveRelativelyWithRotation(n,i,s),[[0,0,0],[0,0,0],0],"smoothMoveRelativelyWithRotation","smoothMoveRelativelyWithRotation"),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}};d(vo,"createDefaultProps",()=>({...Rt.createDefaultProps(),pointed:!1,pointStyle:dt({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),position:at([0,0,0]),rotation:at([0,0,0]),scale:at([1,1,1]),minVisibleDistance:B(0),maxVisibleDistance:B(0)})),d(vo,"type",vo.register("ESObjectWithLocation",vo,{chsName:"对象位置",tags:["ESObjects"],description:"对象位置"})),d(vo,"supportEditingModes",[...Rt.supportEditingModes,Q.Place,Q.Translation,Q.Rotation,Q.Scale,Q.DoublePointsAppend,Q.DoublePointsModify]);let tt=vo;const Aa=class Aa extends tt{getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new rt([],"点样式集合"),new X([this,"pointed"],"开启点样式",!1),new O([this,"pointSize"],"点大小",1),new mt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Et([this,"pointColor"],"点颜色",[1,1,1,1]),new rt([],"线样式集合"),new X([this,"stroked"],"开启线样式",!1),new X([this,"strokeGround"],"是否贴地(线)",!1),new O([this,"strokeWidth"],"线宽",1),new mt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Et([this,"strokeColor"],"线颜色",[1,1,1,1]),new rt([],"面样式集合"),new X([this,"filled"],"开启填充样式",!1),new X([this,"fillGround"],"是否贴地",!1),new Et([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...e.more,new rt([],"点样式"),new ut([this,"pointMaterial"],"点材质",""),new K([this,"pointMaterialParams"],"点材质参数",{}),new rt([],"线样式"),new ut([this,"strokeMaterial"],"线材质",""),new K([this,"strokeMaterialParams"],"线材质参数",{}),new rt([],"填充样式"),new ut([this,"fillMaterial"],"面材质",""),new K([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}};d(Aa,"createDefaultProps",()=>({...tt.createDefaultProps(),pointed:!1,pointStyle:dt({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:1}),stroked:!1,strokeStyle:dt({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:dt({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Aa,"type",Aa.register("ESLocalVector",Aa,{chsName:"本地矢量",tags:["ESObjects"],description:"本地矢量对象"}));let Na=Aa;const yl=class yl extends Na{};d(yl,"type",yl.register("ESLocalVector2D",yl,{chsName:"本地矢量2D",tags:["ESObjects"],description:"本地矢量2D对象"}));let Ji=yl;const _S=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],wS=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]],Fa=class Fa extends tt{constructor(){super(...arguments);d(this,"_widgetEvent",this.dv(new I))}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 Ie([this,"size"],"尺寸大小",[100,100]),new Ie([this,"anchor"],"偏移比例",[.5,1]),new Ie([this,"offset"],"像素偏移",[0,0]),new mt([this,"renderMode"],wS,"渲染模式",0),new mt([this,"rotationType"],_S,"漫游旋转类型",1),new ut([this,"actorTag"],"绑定对象"),new ut([this,"socketName"],"插槽名称"),new Qe([this,"positionOffset"],"位置偏移"),new Qe([this,"rotationOffset"],"相对姿态")],more:[...t.more,new O([this,"zOrder"],"排序",0)]}}};d(Fa,"createDefaultProps",()=>({...tt.createDefaultProps(),screenRender:!0,size:at([100,100]),anchor:at([.5,1]),offset:at([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:at([0,0,0]),rotationOffset:at([0,0,0])})),d(Fa,"type",Fa.register("ESLabel",Fa,{chsName:"标签",tags:["ESObjects"],description:"标签对象"}));let Jn=Fa;const ka=class ka extends Z{constructor(e){super(e)}};d(ka,"createDefaultProps",()=>({...Z.createDefaultProps(),show:!0,fillStyle:dt({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(ka,"type",ka.register("ESTestObject",ka,{chsName:"测试",tags:["ESObjects"],description:""}));let Yd=ka;const _i=class _i extends Rt{constructor(t){super(t);d(this,"_refreshTilesetEvent",this.dv(new I));d(this,"_tilesetReadyEvent",this.dv(new I));d(this,"_supportEdit",this.dv(B(!0)));d(this,"_highlightFeatureEvent",this.dv(new I));d(this,"_highlightFeatureAndFlyToEvent",this.dv(new I));d(this,"_strokeFeatureEvent",this.disposeVar(new I));d(this,"_getFeatureTableEvent",this.dv(new I));d(this,"_featureTableResultEvent",this.dv(new I));d(this,"_getMaterialNameListEvent",this.disposeVar(new I));d(this,"_setFeatureStyleEvent",this.dv(new I));d(this,"_setFeatureColorEvent",this.dv(new I));d(this,"_setFeatureVisableEvent",this.dv(new I));d(this,"_resetFeatureStyleEvent",this.dv(new I));d(this,"setMaterialInfoEvent",this.ad(new I));d(this,"_setMaterialEvent",this.disposeVar(new I));d(this,"_clippingPlanesId",this.dv(B("")));d(this,"_clippingPlaneIds",this.dv(B([])));d(this,"_flattenedPlaneId",this.dv(B("")));d(this,"_flattenedPlaneEnabled",this.dv(B(!1)));d(this,"_clippingPlaneId",this.dv(B("")));d(this,"_excavateId",this.dv(at([])))}updateEditing(){var t;(t=this.activeViewer)==null||t.startEditing(this,[Q.Translation,Q.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 V;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){this._setFeatureStyleEvent.emit(t)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(t,n){this._setFeatureColorEvent.emit(t,typeof n=="string"?JSON.parse(n):n)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(t,n){this._setFeatureVisableEvent.emit(t,typeof n=="string"?JSON.parse(n):n)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(t){return new Promise(n=>{const i=new V;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={...Hd}}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",basic:[...t.basic,new Me([this,"maximumScreenSpaceError"],1,[0,256],"精度",16),new mt([this,"materialMode"],[["常规","normal"],["科技感","technology"]],"材质模式","normal",!0),new mt([this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"颜色模式","HIGHLIGHT"),new K([this,"materialOverrideMap"],"材质替换",_i.defaults.materialOverrideMap)],dataSource:[...t.dataSource,new K([this,"url"],"服务地址",_i.defaults.url,void 0,!0)],coordinate:[...t.coordinate,new X([this,"editing"],"编辑",!1,!0),new Qe([this,"offset"],"偏移",[0,0,0],!0),new Vh([this,"rotation"],"旋转",[0,0,0])],more:[...t.more,new K([this,"materialParams"],"materialParams",_i.defaults.materialParams),new it(["string","string"],(n,i)=>this.highlightFeature(n,i),["","rgba(255,0,0,1)"],"highlightFeature"),new it(["string","string"],(n,i)=>this.setFeatureColor(n,i),["",""],"setFeatureColor"),new it(["string","string"],(n,i)=>this.setFeatureVisable(n,i),["",""],"setFeatureVisable"),new it([],()=>this.resetFeatureStyle(),[],"resetFeatureStyle"),new rt([],"ue"),new it([],()=>this.refreshTileset(),[],"refreshTileset"),new ut([this,"actorTag"]),new X([this,"highlight"],"是否高亮"),new Et([this,"highlightColor"]),new O([this,"highlightID"]),new rt([],"czm"),new rt([],"可视化"),new Ie([this,"czmImageBasedLightingFactor"],"反射强度"),new O([this,"czmAtmosphereScatteringIntensity"],"大气散射强度"),new K([this,"czmEnvironmentMapManager"],"动态环境贴图管理器"),new O([this,"czmMaximumMemoryUsage"],"最大内存"),new rt([],"常用"),new mt([this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]],"czmClassificationType","NONE",!0),new K([this,"czmStyleJson"],"czmStyle"),new X([this,"czmBackFaceCulling"]),new X([this,"czmSkipLevelOfDetail"]),new O([this,"cacheBytes"],"最大缓存",512*1024*1024),new rt([],"调试信息"),new X([this,"czmDebugShowBoundingVolume"]),new X([this,"czmDebugShowContentBoundingVolume"]),new rt([],"clippingPlanes"),new X([this,"clippingPlaneEnabled"]),new X([this,"unionClippingRegions"]),new Et([this,"clippingPlaneEdgeColor"]),new O([this,"clippingPlaneEdgeWidth"])]}}};d(_i,"createDefaultProps",()=>({...Rt.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:at([1,0,0,1]),offset:Ht([0,0,0]),rotation:at([0,0,0]),czmImageBasedLightingFactor:at([1,1]),czmEnvironmentMapManager:jt(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:dt({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:512*1024*1024,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:at([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:jt({}),featureIdLabel:0,splitDirection:"NONE"})),d(_i,"type",_i.register("ES3DTileset",_i,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),d(_i,"supportEditingModes",[...Rt.supportEditingModes,Q.Translation,Q.Rotation]);let mr=_i;const Va=class Va extends tt{constructor(t){super(t);d(this,"_isFlyInCreated",this.dv(B(!1)));d(this,"_readyEvent",this.dv(new I));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position)this.d(zs([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}get readyEvent(){return this._readyEvent}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new mt([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new O([this,"radius"],"半径",10)]}}};d(Va,"createDefaultProps",()=>({...tt.createDefaultProps(),mode:"cylinder",radius:10})),d(Va,"type",Va.register("ESAlarm",Va,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"}));let Jd=Va;const yo=class yo extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new O([this,"radius"],"半径",1),new mt([this,"mode"],[["扫描","scan"],["扩散","diffuse"]],"模式",yo.defaults.mode)]}}};d(yo,"createDefaultProps",()=>({...tt.createDefaultProps(),radius:1,mode:"scan",collision:!1})),d(yo,"type",yo.register("ESApertureEffect",yo,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"}));let Zd=yo;const _o=class _o extends wt{constructor(t){super(t);d(this,"editingBindMode","circular")}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new O([this,"area"],"面积",0,!1,!0),new O([this,"perimeter"],"周长",0,!1,!0)]}}};d(_o,"createDefaultProps",()=>({...wt.createDefaultProps(),fillStyle:dt({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),strokeStyle:dt({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!0,stroked:!1,collision:!1})),d(_o,"type",_o.register("ESGeoPolygon",_o,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),d(_o,"supportEditingModes",[...wt.supportEditingModes,Q.CircularAppend,Q.CircularInsert]);let At=_o;const Ki=class Ki extends At{get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:Ki.defaults.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle??Ki.defaults.fillStyle,materialParams:e??Ki.defaults.fillStyle.materialParams}}constructor(e){super(e)}};d(Ki,"createDefaultProps",()=>({...At.createDefaultProps(),stroked:!0,filled:!0,units:at(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"]),fillStyle:dt({color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!0}),strokeStyle:dt({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Ki,"type",Ki.register("ESAreaMeasurement",Ki,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"面积测量"}));let Kd=Ki;const Ba=class Ba extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"general",more:[...e.more,new rt([],"czm"),new xu([this,"image"],"图片"),new Qe([this,"translation"],"偏移")]}}};d(Ba,"createDefaultProps",()=>({...tt.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:at([0,0,0])})),d(Ba,"type",Ba.register("ESBlastParticleSystem",Ba,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"}));let Qd=Ba;const Hr=class Hr extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new X([this,"reverse"],"反转",Hr.defaults.reverse),new Qe([this,"size"],"尺寸",Hr.defaults.size),new Et([this,"edgeColor"],"边框颜色",Hr.defaults.edgeColor),new O([this,"edgeWidth"],"边框宽度",Hr.defaults.edgeWidth),new ut([this,"targetID"],"瓦片图层",Hr.defaults.targetID)]}}};d(Hr,"createDefaultProps",()=>({...tt.createDefaultProps(),reverse:!1,edgeColor:at([1,1,1,1]),edgeWidth:2,size:at([10,10,10]),targetID:""})),d(Hr,"type",Hr.register("ESBoxClipping",Hr,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"}));let $d=Hr;const _l=class _l extends tt{constructor(){super(...arguments);d(this,"_thumbnail",this.dv(B("")));d(this,"_duration",this.dv(B(1)));d(this,"_resetWithCurrentCameraEvent",this.dv(new I));d(this,"_captureEvent",this.dv(new I))}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 rt([],"ESCameraView"),new it([],()=>this.resetWithCurrentCamera(),[],"设置为当前视角"),new it(["number","number"],(n,i)=>this.capture(n,i),[64,64],"获取缩略图"),new ut([this,"thumbnail"],"缩略图","",!0),new O([this,"duration"],"飞行时间",1,!0)]}}};d(_l,"type",_l.register("ESCameraView",_l,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"}));let Oc=_l;class Dc extends V{constructor(t,n,i){super();d(this,"_view",this.dv(new Oc));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,u=n;a.duration=u.duration??1,a.position=u.position,a.rotation=u.rotation??[0,0,0],a.thumbnail=u.thumbnail??"",a.name=u.name}else{const a=(i==null?void 0:i.size)??[64,64];this.d(Vo(()=>{this._view.resetWithCurrentCamera(),this._view.capture(a[0],a[1])}))}const s=this._view,o=this.dv(ge(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 vr=class vr extends Z{constructor(t){super(t);d(this,"_currentViewIndex",this.dv(B(-1)));d(this,"_viewWrappers",this.dv(new _u));d(this,"_currentViewWrapper",this.dv(B(void 0)));d(this,"_container",this.dv(B(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 ry(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&&qd(i.position,o.position)&&qd(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let n of t)this._viewWrappers.push(new Dc(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 Dc(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 Dc(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 Dc(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??vr.defaults.flyMode)}}flyToPrevView(){const t=this._currentViewWrapper.value;if(!t)return this.flyToView(0),!0;const n=this._getIndex(t);return this.loop??vr.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??vr.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 Z.context.getStrFromEnv(t)}_flyStep(t){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const n=this.intervalTime??vr.defaults.intervalTime,s=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+n)*1e3;return t.promise(Cu(s)).then(()=>this._flyStep(t))}initProcessing(){const t=this.dv(Fn(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 mt([this,"flyMode"],[["默认","default"],["直线飞行","uniform"]],"飞行模式",vr.defaults.flyMode),new it([],()=>this.addView(),[],"添加视角"),new it(["number"],n=>this.insertView(n),[0],"插入视角"),new it([],()=>this.clearAllViews(),[],"清空所有视角"),new it([],()=>this.insertView(this.currentViewIndex+1),[],"当前位置插入视角"),new it([],()=>this.flyToPrevView(),[],"上一个视角"),new it([],()=>this.flyToNextView(),[],"下一个视角"),new it([],()=>this.moveToPreView(),[],"当前视角移动到上一个视角"),new it([],()=>this.moveToNextView(),[],"当前视角移动到下一个视角"),new it(["number"],n=>this.flyToView(n),[0],"飞入指定视角"),new it(["number"],n=>this.setCurrentView(n),[0],"设置当前视角"),new it([],()=>this.deleteCurrentView(),[],"删除当前视角"),new it(["number"],n=>this.deleteView(n),[0],"删除指定视角"),new it(["number"],n=>this.resetView(n),[0],"重置视角"),new O([this,"currentViewIndex"],"当前序号",-1,!1,!0),new Ng([this,"playing"],()=>this.stop(),[this,"loop"],"播放",vr.defaults),new X([this,"playing"],"是否播放"),new it([],()=>this.stop(),[],"停止"),new X([this,"loop"],"是否循环"),new O([this,"intervalTime"],"间隔时间"),new K([this,"views"],"视角集合",[],void 0,!0)]}}};d(vr,"createDefaultProps",()=>({...Z.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})),d(vr,"type",vr.register("ESCameraViewCollection",vr,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"}));let Mc=vr;const ja=class ja extends tt{constructor(t){super(t);d(this,"editingBindMode","doublePoints")}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new O([this,"aspectRatio"],"宽高比",1.77778),new O([this,"fov"],"横向夹角",90),new O([this,"far"],"视野长度",100),new O([this,"near"],"近面距离",5)]}}};d(ja,"createDefaultProps",()=>({...tt.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})),d(ja,"type",ja.register("ESCameraVisibleRange",ja,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"}));let tf=ja;const za=class za extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([this,"mode"],[["警车","policeCar"]],"模式","policeCar")]}}};d(za,"createDefaultProps",()=>({...tt.createDefaultProps(),mode:"policeCar",allowPicking:!0})),d(za,"type",za.register("ESCar",za,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"}));let Rc=za;const wo=class wo extends wt{constructor(t){super(t);d(this,"editingBindMode","circular")}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new O([this,"height"],"高度",10)],coordinate:[...t.coordinate,new O([this,"area"],"面积",0,!1,!0),new O([this,"perimeter"],"周长",0,!1,!0)]}}};d(wo,"createDefaultProps",()=>({...wt.createDefaultProps(),height:10,filled:!0,fillStyle:dt({material:"",materialParams:{},ground:!0,color:[1,1,1,1]})})),d(wo,"type",wo.register("ESClassification",wo,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),d(wo,"supportEditingModes",[...wt.supportEditingModes,Q.CircularAppend,Q.CircularInsert,Q.HeightModify]);let Lc=wo;const Ua=class Ua extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new X([this,"showArrow"],"显示箭头",!0),new Et([this,"edgeColor"],"线框颜色",[1,1,1,1]),new O([this,"edgetWidth"],"线框宽度",2),new O([this,"width"],"裁剪宽度",200),new O([this,"height"],"裁剪高度",200),new ut([this,"targetID"],"瓦片图层","")]}}};d(Ua,"createDefaultProps",()=>({...tt.createDefaultProps(),showArrow:!0,edgeColor:at([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})),d(Ua,"type",Ua.register("ESClippingPlane",Ua,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"}));let ef=Ua;class ES extends V{constructor(e,t,n){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${t.id})(viewer: ${n.id}) container`);{const u=()=>{const c=` ${t.cssText}
|
|
66
|
+
${t.cssAllInitial?"all: initial;":""}
|
|
67
|
+
${t.show?"":"display: none"}
|
|
68
|
+
`;i.style.cssText=c};u();const l=this.dv(ge(t.cssAllInitialChanged,t.cssTextChanged,t.showChanged));this.d(l.don(u))}e.appendChild(i),this.d(()=>e.removeChild(i));const s=this.dv(ge(t.instanceClassChanged,t.containerChanged,t.shadowDomChanged)),o=this.dv(new le(s,()=>{const{instanceClass:u,container:l}=t;if(!u||l)return;let c=i;if(i.firstElementChild&&i.removeChild(i.firstElementChild),t.shadowDom){const h=i.appendChild(document.createElement("div"));h.setAttribute("xe2-div",`ESCustomDiv(${t.id})(viewer: ${n.id}) container shadowDiv`),c=h.attachShadow({mode:"open"}).appendChild(document.createElement("div")),c.setAttribute("xe2-div",`ESCustomDiv(${t.id})(viewer: ${n.id}) container shadowDiv div`)}return new u(c,t,n)})),{_updateEvent:a}=t;this.d(a.don(u=>{if(o.obj)try{u(o.obj,t,n)}catch(l){console.error(`ESCustomDiv update error! ${l}`)}}))}}const ly=`class MyDiv {
|
|
69
69
|
// subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
|
|
70
70
|
// customDiv指向当前的CustomDiv场景对象
|
|
71
71
|
// viewer指定当前的视口
|
|
@@ -103,11 +103,11 @@ ${u.map(c=>`${c.id} ${c.typeName}
|
|
|
103
103
|
destroy() {
|
|
104
104
|
this._container.removeChild(this._div);
|
|
105
105
|
}
|
|
106
|
-
}`,
|
|
106
|
+
}`,CS=`示例代码:
|
|
107
107
|
\`\`\`
|
|
108
|
-
${
|
|
108
|
+
${ly}
|
|
109
109
|
\`\`\`
|
|
110
|
-
`,
|
|
110
|
+
`,yr=class yr extends Z{constructor(t){super(t);d(this,"_updateEvent",this.dv(new I));d(this,"_instanceClassReact",this.dv(B(void 0)));d(this,"_innerHtmlMounted",this.dv(new I));d(this,"_container",this.dv(B(void 0)));this.registerAttachedObjectForContainer((i,s)=>new ES(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 {
|
|
111
111
|
// subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
|
|
112
112
|
// customDiv指向当前的CustomDiv场景对象
|
|
113
113
|
// viewer指定当前的视口
|
|
@@ -125,16 +125,16 @@ ${rg}
|
|
|
125
125
|
destroy() {
|
|
126
126
|
this._container.removeChild(this._div);
|
|
127
127
|
}
|
|
128
|
-
}`;this.instanceClassStr=s};i(),this.d(this.innerHTMLChanged.don(i))}const
|
|
128
|
+
}`;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};
|
|
129
129
|
${this.cssAllInitial?"all: initial;":""}
|
|
130
130
|
${this.show?"":"display: none;"}
|
|
131
|
-
`;
|
|
131
|
+
`;n.style.cssText=o};i();const s=this.dv(ge(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 V{constructor(o){super(),o.appendChild(n),this.d(()=>o.removeChild(n))}}this.dv(new le(this.containerChanged,()=>{if(this.container)return new i(this.container)}))}{const i=this.dv(ge(this.containerChanged,this.instanceClassChanged,this.shadowDomChanged));this.dv(new le(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 rt([new X([this,"show"],"显示"),new ls([this,"instanceClassStr"],"实例类",ly,CS,!0),new ls([this,"innerHTML"],"innerHTML",yr.defaultInnerHTML,yr.innerHTMLReadMe,!0),new it(["string"],n,["(divClass, dom, viewer) => divClass.update && divClass.update()"],"强制更新"),new X([this,"allowPicking"],"允许拾取",!0),new ut([this,"containerId"],"容器ID",yr.defaults.containerId,!0),new X([this,"shadowDom"],"shadowDom"),new X([this,"cssAllInitial"],"cssAllInitial"),new ut([this,"cssText"],"cssText")],"ESCustomDiv")]}}};d(yr,"createDefaultProps",()=>({...Z.createDefaultProps(),show:!0,instanceClassStr:void 0,innerHTML:void 0,allowPicking:void 0,containerId:"",shadowDom:!1,cssAllInitial:!1,cssText:""})),d(yr,"type",yr.register("ESCustomDiv",yr,{chsName:"ESCustomDiv",tags:["ESObjects"],description:"自定义div"})),d(yr,"defaultInnerHTML",` <!-- z-index样式需要设置,否则可能导致看不到!-->
|
|
132
132
|
<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>
|
|
133
|
-
`),
|
|
133
|
+
`),d(yr,"innerHTMLReadMe",` 示例代码:
|
|
134
134
|
\`\`\`
|
|
135
|
-
${
|
|
135
|
+
${yr.defaultInnerHTML}
|
|
136
136
|
\`\`\`
|
|
137
|
-
`);let
|
|
137
|
+
`);let Ac=yr;const Eo=class Eo extends tt{constructor(t){super(t);d(this,"_maxTime",this.dv(B(23)))}get maxTime(){return this._maxTime.value}get maxTimeChanged(){return this._maxTime.changed}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new K([this,"url"]),new O([this,"maxTime"],"maxTime",23,!0,!0),new O([this,"currentTime"]),new O([this,"minPropValue"]),new O([this,"maxPropValue"]),new K([this,"colorStops"],"colorStops",Eo.defaults.colorStops,void 0,!0)]}}};d(Eo,"createDefaultProps",()=>({...tt.createDefaultProps(),url:"http://114.242.26.126:6003/ESDataMesh/water-assets2/",currentTime:0,minPropValue:0,maxPropValue:1,colorStops:jt([{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]}])})),d(Eo,"type",Eo.register("ESDataMesh",Eo,{chsName:"数值面着色",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"数值面着色"}));let nf=Eo;const Co=class Co extends wt{constructor(t){super(t);d(this,"_distance",this.dv(B(0)));d(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,coordinate:[...t.coordinate,new O([this,"distance"],"长度",0,!1,!0)]}}};d(Co,"createDefaultProps",()=>({...wt.createDefaultProps(),stroked:!0,strokeStyle:dt({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Co,"type",Co.register("ESGeoLineString",Co,{chsName:"地理折线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理折线"})),d(Co,"supportEditingModes",[...wt.supportEditingModes,Q.LineStringAppend,Q.LineStringInsert]);let Zi=Co;const Ga=class Ga extends Zi{constructor(e){super(e)}};d(Ga,"createDefaultProps",()=>({...Zi.createDefaultProps(),strokeStyle:dt({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Ga,"type",Ga.register("ESDistanceMeasurement",Ga,{chsName:"距离测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"距离测量"}));let rf=Ga;const Ds=class Ds extends At{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([this,"mode"],Ds.modes,"模式","in"),new ut([this,"targetID"],"瓦片图层","")]}}};d(Ds,"createDefaultProps",()=>({...At.createDefaultProps(),mode:"in",targetID:"",filled:!1})),d(Ds,"type",Ds.register("ESExcavate",Ds,{chsName:"挖坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"挖坑"})),d(Ds,"modes",[["向内","in"],["向外","out"]]);let cl=Ds;const Wa=class Wa extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"general",more:[...e.more,new xu([this,"image"],"图片"),new Qe([this,"translation"],"偏移")]}}};d(Wa,"createDefaultProps",()=>({...tt.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:at([0,0,0])})),d(Wa,"type",Wa.register("ESFireParticleSystem",Wa,{chsName:"粒子烟火",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子烟火"}));let sf=Wa;const SS=`
|
|
138
138
|
## 参数类型为 ESTreeType
|
|
139
139
|
\`\`\`js
|
|
140
140
|
type ESJVector2D = [number, number]
|
|
@@ -144,7 +144,7 @@ ${rg}
|
|
|
144
144
|
space: number
|
|
145
145
|
}
|
|
146
146
|
\`\`\`
|
|
147
|
-
`,
|
|
147
|
+
`,So=class So extends Rt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new K([this,"url"],"路径",!0),new K([this,"treeTypes"],"treeTypes",[],void 0,!0),new K([this,"xiaoBanWidget"],"xiaoBanWidget",So.defaults.xiaoBanWidget,SS,!0),new ut([this,"youShiSZ"]),new ut([this,"diLei"]),new ut([this,"senLinLB"]),new ut([this,"labelMaterial"]),new O([this,"heightOffset"])]}}};d(So,"createDefaultProps",()=>({...Rt.createDefaultProps(),url:"",treeTypes:jt([]),xiaoBanWidget:jt({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})),d(So,"type",So.register("ESForestTileset",So,{chsName:"森林切片图层",tags:["ESObjects","_ES_Impl_UE"],description:"ESForestTileset"}));let of=So;const cy=`class MyDiv {
|
|
148
148
|
// container是Poi的div
|
|
149
149
|
// geoCustomDivPoi指向当前的GeoCustomDivPoi场景对象
|
|
150
150
|
// viewer指定当前的视口
|
|
@@ -175,16 +175,16 @@ ${rg}
|
|
|
175
175
|
destroy() {
|
|
176
176
|
this._container.removeChild(this._div);
|
|
177
177
|
}
|
|
178
|
-
}`,
|
|
178
|
+
}`,bS=`示例代码:
|
|
179
179
|
\`\`\`
|
|
180
|
-
${
|
|
180
|
+
${cy}
|
|
181
181
|
\`\`\`
|
|
182
|
-
`,
|
|
183
|
-
`,
|
|
182
|
+
`,hy=`<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>
|
|
183
|
+
`,PS=`示例代码:
|
|
184
184
|
\`\`\`
|
|
185
|
-
${
|
|
185
|
+
${hy}
|
|
186
186
|
\`\`\`
|
|
187
|
-
`,
|
|
187
|
+
`,Yr=class Yr extends tt{constructor(t){super(t);d(this,"_widgetEvent",this.dv(new I));d(this,"_echartsFunReact",this.dv(B(void 0)));d(this,"_instanceClassReact",this.dv(B(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 {
|
|
188
188
|
// container是Poi的div
|
|
189
189
|
// geoCustomDivPoi指向当前的GeoCustomDivPoi场景对象
|
|
190
190
|
// viewer指定当前的视口
|
|
@@ -200,7 +200,7 @@ ${ig}
|
|
|
200
200
|
destroy() {
|
|
201
201
|
this._container.removeChild(this._div);
|
|
202
202
|
}
|
|
203
|
-
}`;this.instanceClassStr=s};i(),this.d(this.innerHTMLChanged.don(i))}}get widgetEvent(){return this._widgetEvent}get echartsFun(){return this._echartsFunReact.value}set echartsFun(
|
|
203
|
+
}`;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 O([this,"opacity"],"透明度",Yr.defaults.opacity,!0),new O([this,"zOrder"],"zOrder",Yr.defaults.zOrder,!0),new Ie([this,"anchor"],"偏移比例",Yr.defaults.anchor,!0),new ls([this,"innerHTML"],"innerHTML",Yr.defaults.innerHTML,PS,!0),new ls([this,"instanceClassStr"],"实例类",Yr.defaults.instanceClassStr,bS,!0),new X([this,"renderInUE"],"是否在UE中渲染",!0,!1)]}}};d(Yr,"createDefaultProps",()=>({...tt.createDefaultProps(),opacity:1,anchor:at([.5,1]),instanceClassStr:cy,innerHTML:hy,zOrder:0,renderInUE:!1})),d(Yr,"type",Yr.register("ESGeoDiv",Yr,{chsName:"ESGeoDiv",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESGeoDiv"}));let af=Yr;const bo=class bo extends wt{constructor(t){super(t);d(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=Yh(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=ul(o,"GEODESIC"),u=a[a.length-1];this._perimeter.value=u}else this._perimeter.value=0}getESProperties(){const t=super.getESProperties();return{...t,coordinate:[...t.coordinate,new O([this,"area"],"面积",0,!1,!0),new O([this,"perimeter"],"周长",0,!1,!0)]}}};d(bo,"createDefaultProps",()=>({...wt.createDefaultProps(),collision:!1,stroked:!0,filled:!0,fillStyle:dt({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),d(bo,"type",bo.register("ESGeoRectangle",bo,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),d(bo,"supportEditingModes",[...wt.supportEditingModes,Q.DoublePointsAppend,Q.DoublePointsModify]);let uf=bo;const lf={translationX:0,translationY:0,translationZ:0,rotationHeading:0,rotationPitch:0,rotationRoll:0,scaleX:1,scaleY:1,scaleZ:1},Ms=class Ms extends tt{constructor(t){super(t);d(this,"_nodeTransformations",this.dv(B(void 0)));d(this,"_czmModelReadyEvent",this.dv(new I));d(this,"_setNodePositionEvent",this.dv(new I));d(this,"_setNodeRotationEvent",this.dv(new I));d(this,"_setNodeScaleEvent",this.dv(new I));d(this,"_printDebugInfoEvent",this.dv(new I));d(this,"setMaterialInfoEvent",this.ad(new I));d(this,"_setMaterialEvent",this.disposeVar(new I))}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]??{...lf};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]??{...lf};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]??{...lf};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 V;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),n(s)})),this._setMaterialEvent.emit(t)})}setLight122(){this.czmEnvironmentMapManager={...Hd}}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",dataSource:[...t.dataSource,new K([this,"url"],"模型路径",Ms.defaults.url,void 0,!0),new K([this,"instances"],"实例化矩阵",Ms.defaults.instances,void 0,!0)],more:[...t.more,new Ie([this,"czmImageBasedLightingFactor"]),new O([this,"czmAtmosphereScatteringIntensity"]),new K([this,"czmEnvironmentMapManager"]),new it([],()=>this.printDebugInfo(),[],"控制台输出模型信息"),new O([this,"czmMaximumScale"],"最大缩放比例",void 0,!0),new O([this,"czmNativeScale"],"统一缩放值"),new O([this,"czmMinimumPixelSize"],"最小像素尺寸"),new Et([this,"czmColor"],"颜色")]}}};d(Ms,"createDefaultProps",()=>({...tt.createDefaultProps(),url:"${earthsdk3-assets-script-dir}/assets/glb/building.glb",czmMaximumScale:void 0,czmMinimumPixelSize:0,czmNativeScale:1,czmColor:at([1,1,1,1]),allowPicking:!0,instances:Ht([]),czmImageBasedLightingFactor:at([1,1]),czmAtmosphereScatteringIntensity:2,czmEnvironmentMapManager:jt(void 0)})),d(Ms,"type",Ms.register("ESGltfModel",Ms,{chsName:"模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"gltf模型"}));let Ns=Ms;const _r=class _r extends tt{constructor(t){super(t);d(this,"_aiMoveToEvent",this.dv(new I));d(this,"_stopAIMoveEvent",this.dv(new I))}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 mt([this,"mode"],_r.modes,"模式",_r.defaults.mode,!0),new mt([this,"animation"],_r.animations,"动画",_r.defaults.animation,!0)],more:[...t.more,new it(["numbers","number"],(n,i)=>this.aiMoveTo(n,i),[[0,0,0],0],"自动寻路"),new it([],()=>this.stopAIMove(),[],"停止自动寻路")]}}};d(_r,"createDefaultProps",()=>({...tt.createDefaultProps(),mode:"worker",animation:"standing",allowPicking:!0})),d(_r,"type",_r.register("ESHuman",_r,{chsName:"人员",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"工人 警察 路人"})),d(_r,"modes",[["工人","worker"],["警察","police"],["路人","pedestrian"],["陌生人","stranger"],["男士","suitMan"],["女士","suitWoman"]]),d(_r,"animations",[["站立","standing"],["行走","walking"],["奔跑","running"]]);let po=_r;const Po=class Po extends Jn{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new K([this,"url"],"图片路径",Po.defaults.url),new X([this,"isHoverZoom"],"悬浮放大")]}}};d(Po,"createDefaultProps",()=>({...Jn.createDefaultProps(),url:"inner://CameraBlue.png",isHoverZoom:!1,renderMode:4})),d(Po,"type",Po.register("ESImageLabel",Po,{chsName:"图片标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"基础图片标签。"}));let Fc=Po;const wi=class wi extends Rt{constructor(e){super(e),this.ad($([this,"czmSplitDirection"],[this,"splitDirection"])),this.ad($([this,"czmAlpha"],[this,"opacity"]))}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new O([this,"zIndex"],"层级序号",wi.defaults.zIndex)],dataSource:[...e.dataSource,new K([this,"url"],"影像服务地址"),new br([this,"rectangle"],"矩形范围",wi.defaults.rectangle,!0),new Me([this,"maximumLevel"],1,[1,24],"最大级别",wi.defaults.maximumLevel,!0),new K([this,"options"],"options",wi.defaults.options,void 0,!0),new ut([this,"targetID"],"targetID"),new Me([this,"opacity"],.01,[0,1],"opacity",1)],more:[...e.more,new rt([],"通用"),new O([this,"height"],"高度"),new ut([this,"actorTag"]),new ut([this,"componentTag"]),new O([this,"minimumLevel"]),new rt([],"图像"),new O([this,"czmAlpha"],"透明度"),new O([this,"czmBrightness"],"亮度"),new O([this,"czmContrast"],"对比度"),new O([this,"czmHue"],"色相"),new O([this,"czmSaturation"],"饱和度"),new O([this,"czmGamma"],"伽马值")]}}};d(wi,"createDefaultProps",()=>({...Rt.createDefaultProps(),url:"",rectangle:jt([-180,-90,180,90]),options:jt(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"})),d(wi,"type",wi.register("ESImageryLayer",wi,{chsName:"影像图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"影像图层"}));let cf=wi;const IS=`
|
|
204
204
|
# 声明文件
|
|
205
205
|
### options 类型
|
|
206
206
|
\`\`\`javascript
|
|
@@ -306,14 +306,14 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
306
306
|
};
|
|
307
307
|
|
|
308
308
|
\`\`\`
|
|
309
|
-
`,bn=class bn extends Z{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new T([this,"size"],"尺寸",bn.defaults.size),new W([this,"autoFollow"],"自动跟随",bn.defaults.autoFollow),new lt([this,"mode"],bn.modes,"模式","blueSky")],more:[...t.more,new T([this,"autoOpacityFactor"],"自动消失系数",bn.defaults.autoOpacityFactor)]}}};f(bn,"createDefaultProps",()=>({...Z.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky",collision:!1,allowPicking:!1})),f(bn,"type",bn.register("ESLocalSkyBox",bn,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),f(bn,"modes",[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]);let rh=bn;const uu=class uu extends Z{constructor(e){super(e);f(this,"_location",this.disposeVar(p.react(void 0)));{const r=()=>{this.location=this.position};r(),this.ad(this.positionChanged.don(r))}}get location(){return this._location.value}set location(e){this._location.value=e}get locationChanged(){return this._location.changed}};f(uu,"type",uu.register("ESLocationMeasurement",uu,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"位置测量点"}));let nh=uu;const Ae=class Ae extends Z{constructor(e){super(e);f(this,"_player",this.dv(new nn));{const r=Ae.defaults;this.d(p.bind([this._player,"loop"],[this,"playingLoop"],i=>i??r.playingLoop,i=>i??r.playingLoop)),this.d(p.bind([this._player,"currentTime"],[this,"currentTime"],i=>i??r.currentTime,i=>i??r.currentTime)),this.d(p.bind([this._player,"duration"],[this,"duration"],i=>i??r.duration,i=>i??r.duration)),this.d(p.bind([this._player,"playing"],[this,"playing"],i=>i??r.playing,i=>i??r.playing)),this.d(p.bind([this._player,"speed"],[this,"playingSpeed"],i=>i??r.playingSpeed,i=>i??r.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 $([],"通用","通用"),new tt(["number"],r=>this.flyTo(r),[1e3],"飞入"),new bi([this,"updateCallback"],"更新回调函数",void 0,void 0,!0),new T([this,"emissionRate"],"发射率",5,!0),new W([this,"loop"],"是否循环",!0,!0),new T([this,"particleScale"],"等级",1,!0),new T([this,"startScale"],"初始等级",void 0,!0),new T([this,"endScale"],"结束等级",Ae.defaults.endScale,!0),new gt([this,"color"],"颜色",void 0,!0),new gt([this,"startColor"],"初始颜色",void 0,!0),new gt([this,"endColor"],"结束颜色",void 0,!0),new W([this,"sizeInMeters"],"尺寸单位为米",void 0,!0),new T([this,"speed"],"速度",1,!0),new T([this,"minimumSpeed"],"最小速度",void 0,!0),new T([this,"maximumSpeed"],"最大速度",void 0,!0),new T([this,"lifetime"],"生命周期",Number.MAX_VALUE,!0),new T([this,"particleLife"],"粒子生命周期",Ae.defaults.particleLife,!0),new T([this,"minimumParticleLife"],"最小粒子生命周期",void 0,!0),new T([this,"maximumParticleLife"],"最大粒子生命周期",void 0,!0),new T([this,"mass"],"块数量",1,!0),new T([this,"minimumMass"],"最小块数量",void 0,!0),new T([this,"maximumMass"],"最大块数量",void 0,!0),new ce([this,"imageSize"],"图片尺寸",Ae.defaults.imageSize,!0),new ce([this,"minimumImageSize"],"最小图片尺寸",void 0,!0),new ce([this,"maximumImageSize"],"最大图片尺寸",void 0,!0),new ma([this,"image"],"图片",Ae.defaults.image,!0),new Re([this,"translation"],"偏移",[0,0,0],!0),new Tl([this,"bursts"],"bursts",void 0,!0),new H([this,"emitter"],"emitter",Ae.defaults.emitter),new $([],"播放器","播放器"),new T([this,"ratio"],"播放比率",0,!0),new hu([this,"playing"],[this,"ratio"],[this,"playingLoop"],"播放器"),new W([this,"playingLoop"],"是否循环",Ae.defaults.playingLoop,!0),new T([this,"currentTime"],"当前时间",Ae.defaults.currentTime,!0),new T([this,"duration"],"过渡时间",Ae.defaults.duration,!0),new W([this,"playing"],"是否播放",Ae.defaults.playing,!0),new T([this,"playingSpeed"],"播放速度",Ae.defaults.playingSpeed,!0)]}}};f(Ae,"createDefaultProps",()=>({...Z.createDefaultProps(),emitter:p.reactJsonWithUndefined({type:"CircleEmitter",radius:.5}),bursts:p.reactArrayCollectionWithUndefined(void 0),translation:p.reactArrayWithUndefined(void 0),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",imageSize:p.reactArrayWithUndefined([20,20]),minimumImageSize:p.reactArrayWithUndefined(void 0),maximumImageSize:p.reactArrayWithUndefined(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:4,color:p.reactArrayWithUndefined(void 0),startColor:p.reactArrayWithUndefined(void 0),endColor:p.reactArrayWithUndefined(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})),f(Ae,"type",Ae.register("ESParticleSystemPrimitive",Ae,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"}));let ll=Ae;const Nn=class Nn extends Nr{constructor(e){super(e);f(this,"initialStyle",this.ad(p.reactJsonWithUndefined(void 0)));f(this,"_getInitialStyleEvent",this.disposeVar(new V))}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(e=>{const r=this.d(this.initialStyle.changed.disposableOnce(e));this.getInitialStyleEvent.emit(),setTimeout(()=>{r(),e(void 0)},2e3)})])}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new lt([this,"mode"],Nn.modes,"模式",Nn.defaults.mode),new H([this,"style"],"样式",Nn.defaults.style),new W([this,"autoAnchor"],"自动锚点对齐",Nn.defaults.autoAnchor)]}}};f(Nn,"createDefaultProps",()=>({...Nr.createDefaultProps(),mode:"SquareH01",style:p.reactJson({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})),f(Nn,"type",Nn.register("ESPoi2D",Nn,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),f(Nn,"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 tu=Nn;const jn=class jn extends Z{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new lt([this,"mode"],jn.modes,"模式",jn.defaults.mode),new H([this,"style"],"样式",jn.defaults.style)]}}};f(jn,"createDefaultProps",()=>({...Z.createDefaultProps(),mode:"triangle",style:p.reactJson({UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]})})),f(jn,"type",jn.register("ESPoi3D",jn,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),f(jn,"modes",[["三角形","triangle"],["菱形","diamond"],["制(存)梁场","BridgePrefabricationSite"],["汽车运输便道","ExportRoad"],["拌合站","MixingStation"],["小型预制构件厂","PrefabricatedComponentsSite"],["项目部","ProjectDepartment"],["铁路岔线","RailwayFork"],["钢筋加工厂","RebarMachining"],["临时电力干线","TempElectricMain"],["铺轨基地","TrackLayingBase"],["汽车运梁通道","TransportationBridge"]]);let ih=jn;const Bo=class Bo extends Tt{constructor(e){super(e);f(this,"_czmFlattenedPlaneId",this.dv(p.react("")))}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 nt([this,"targetID"],"瓦片图层","")]}}};f(Bo,"createDefaultProps",()=>({...Tt.createDefaultProps(),targetID:"",filled:!1})),f(Bo,"type",Bo.register("ESPolygonFlattenedPlane",Bo,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"}));let sh=Bo;const sg=async(n,t,e)=>{const{viewer:r}=n;if(!r){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await r.callUeFunc({f:"AddTrees",p:{id:t,TreeParams:e}});return i.error&&console.error("AddTrees:",i.error),i},og=async(n,t)=>{const{viewer:e}=n;if(!e){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const r=await e.callUeFunc({f:"RemoveAllTrees",p:{id:t}});return r.error&&console.error("RemoveAllTrees:",r.error),r},ag=async(n,t,e)=>{const{viewer:r}=n;if(!r){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await r.callUeFunc({f:"UpdateTreeParams",p:{id:t,TreeParams:e}});return i.error&&console.error("UpdateTreeParams:",i.error),i},ug=async(n,t,e,r)=>{const{viewer:i}=n;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const s=await i.callUeFunc({f:"CutDownTrees",p:{id:t,TreeIds:e,TimeLength:r}});return s.error&&console.error("CutDownTrees:",s.error),s},lg=async(n,t,e,r,i)=>{const{viewer:s}=n;if(!s){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const o=await s.callUeFunc({f:"GrowthSimulation",p:{id:t,ToParams:e,SwitchTime:i,TimeLength:r}});return o.error&&console.error("GrowthSimulation:",o.error),o},Jo=class Jo extends bt{constructor(e){super(e);f(this,"_addTreesEvent",this.dv(new V));f(this,"_removeAllTreesEvent",this.dv(new V));f(this,"_updateTreeParamsEvent",this.dv(new V));f(this,"_cutDownTreesEvent",this.dv(new V));f(this,"_growthSimulationEvent",this.dv(new V))}async addTreesCallFunc(e,r){return await sg(e,this.id,r)}async updateTreeParamsCallFunc(e,r){return await ag(e,this.id,r)}async cutDownTreesCallFunc(e,r,i){return await ug(e,this.id,r,i)}async removeAllTreesCallFunc(e){return await og(e,this.id)}async growthSimulationCallFunc(e,r,i,s){return await lg(e,this.id,r,i,s)}async getIdByComponentNameAndHitItem(e,r,i){return await e.getIdByComponentNameAndHitItem(this.id,r,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,r){this._cutDownTreesEvent.emit(e,r)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(e,r,i){this._growthSimulationEvent.emit(e,r,i)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new $([],"通用"),new H([this,"treeTypes"],"treeTypes",[],"{ name: string, meshPath: string }[]",!0),new T([this,"stumpId"],"树桩id"),new T([this,"intervalTime"],"动画间隔时间"),new T([this,"switchIntervalTime"],"切换间隔时间")]}}};f(Jo,"createDefaultProps",()=>({...bt.createDefaultProps(),treeTypes:p.reactJsonWithUndefined([]),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})),f(Jo,"type",Jo.register("ESSeparateFoliage",Jo,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"}));let oh=Jo;function cl(n,t,e){const r="buffer"in n,i=r?n.buffer:n;r&&(t+=n.byteOffset);const s=new Array(e),o=new DataView(i);for(let a=0;a<e;++a){const u=o.getUint8(t+a);s[a]=String.fromCharCode(u)}return s.join("")}function hl(n,t){const e="buffer"in n,r=e?n.buffer:n;return e&&(t+=n.byteOffset),new DataView(r).getUint32(t,!0)}function cg(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,t,e)}function $_(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,t,e)}function t0(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,t,e)}function e0(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,t,e)}function hg(n){if(cl(n,0,4)!=="glTF"){console.error("Not a glTF file");return}const e=hl(n,4);if(e!==2){console.error("Unsupported glTF version");return}const r=hl(n,8);if(r!==n.byteLength){console.error("Invalid glTF length");return}const i=hl(n,12);if(i+12+4>r){console.error("Invalid glTF chunk length");return}if(cl(n,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const o=cl(n,20,i),a={version:e,length:r,gltfJson:o};if(20+i<n.byteLength){const u=hl(n,20+i);if(cl(n,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const c=cg(n,20+i+8,u);a.gltfBinary=c}return a}window.parseGlb=hg;function fg(n){const t=hg(n);if(t===void 0||!t.gltfBinary)return;const e=JSON.parse(t.gltfJson);return e.nodes.map(r=>{var i=e.meshes[r.mesh],s=i.primitives[0].attributes.POSITION,o=i.primitives[0].indices,a=e.accessors[s],u=e.bufferViews[a.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const l=e0(t.gltfBinary,u.byteOffset??0,u.byteLength/4);var c=e.accessors[o],h=e.bufferViews[c.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let d;return c.componentType===5121?d=cg(t.gltfBinary,h.byteOffset??0,h.byteLength/1):c.componentType===5123?d=$_(t.gltfBinary,h.byteOffset??0,h.byteLength/2):c.componentType===5125&&(d=t0(t.gltfBinary,h.byteOffset??0,h.byteLength/4)),{name:r.name,posBuffer:l,indicesBuffer:d}})}window.parseWaterGlb=fg;const Xe=class Xe extends Z{constructor(e){super(e);f(this,"_submergingData");f(this,"_allMoments",[]);f(this,"readyEvent",this.dv(new V));{const r=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(s=>{this._submergingData=fg(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()})}).catch(i=>{console.log(i)})};r(),this.d(this.urlChanged.don(()=>{r()}))}}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new nt([this,"url"],"Url地址",Xe.defaults.url),new ge([this,"amplitude"],.01,[0,1],"振幅",Xe.defaults.amplitude),new T([this,"frequency"],"频率",Xe.defaults.frequency),new T([this,"currentTime"],"当前时间",Xe.defaults.currentTime),new H([this,"materialParams"],"材质参数",Xe.defaults.materialParams),new lt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型","river"),new gt([this,"waterColor"],"水的底色",Xe.defaults.waterColor),new ge([this,"waveVelocity"],.01,[0,1],"波动频率",Xe.defaults.waveVelocity),new T([this,"flowSpeed"],"水流速度",Xe.defaults.flowSpeed),new ge([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Xe.defaults.specularIntensity),new ge([this,"murkiness"],.01,[0,10],"水体浑浊度",Xe.defaults.murkiness)]}}};f(Xe,"createDefaultProps",()=>({...Z.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:p.reactJson({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})),f(Xe,"type",Xe.register("ESSubmergingAnalysis",Xe,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"}));let ah=Xe;const Fs=class Fs extends Tt{constructor(e){super(e);f(this,"_startEvent",this.dv(new V));f(this,"_stopEvent",this.dv(new V))}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 gt([this,"startColor"],"起始颜色"),new gt([this,"endColor"],"结束颜色"),new T([this,"progress"],"计算进度"),new T([this,"extrudedHeight"],"高度m"),new T([this,"height"],"底面高度"),new T([this,"sampleDistance"],"采样间距m"),new T([this,"startTime"],"起始时间,时间戳"),new T([this,"endTime"],"结束时间,时间戳"),new T([this,"spanTime"],"时间跨度,默认1小时时间戳"),new tt([],()=>this.start(),[],"开始分析"),new tt([],()=>this.stop(),[],"结束分析")]}}};f(Fs,"createDefaultProps",()=>({...Tt.createDefaultProps(),extrudedHeight:30,height:0,sampleDistance:10,startColor:p.reactArray([1,1,0,1]),endColor:p.reactArray([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0,filled:!1,stroked:!1})),f(Fs,"type",Fs.register("ESSunshineAnalysis",Fs,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),f(Fs,"supportEditingModes",[...Tt.supportEditingModes,B.HeightModify]);let uh=Fs;const $r=class $r extends bt{constructor(e){super(e);f(this,"_activateEvent",this.disposeVar(new V));f(this,"activate",!1)}get activateEvent(){return this._activateEvent}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new T([this,"zIndex"],"层级序号",$r.defaults.zIndex),new lt([this,"renderMode"],$r.renderModes,"渲染模式","default"),new T([this,"opacity"],"透明度",$r.defaults.opacity)],dataSource:[...e.dataSource,new H([this,"url"],"地形服务地址",$r.defaults.url),new rn([this,"rectangle"],"矩形范围",$r.defaults.rectangle)],more:[...e.more,new T([this,"czmMinzoom"],"czmMinzoom",void 0,!0),new T([this,"czmMaxzoom"],"czmMaxzoom",void 0,!0)]}}};f($r,"createDefaultProps",()=>({...bt.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:p.reactArray([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0,renderMode:"default",opacity:1})),f($r,"type",$r.register("ESTerrainLayer",$r,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"})),f($r,"renderModes",[["使用深度检测","default"],["不使用深度检测","disableDepthTest"],["透明","transparent"]]);let lh=$r;const Zn=class Zn extends Nr{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new gt([this,"color"],"文本颜色",[1,1,1,1]),new T([this,"fontSize"],"文字大小",14),new xl([this,"text"],"内容",Zn.defaults.text,void 0,!0),new gt([this,"backgroundColor"],"背景颜色",Zn.defaults.backgroundColor),new rn([this,"padding"],"内边距",Zn.defaults.padding),new gt([this,"borderColor"],"边界颜色"),new rn([this,"borderRadius"],"边界圆角"),new T([this,"borderWidth"],"边界宽度")],more:[...t.more,new $([],"czm","czm"),new W([this,"textEditingInteraction"],"文本编辑交互"),new W([this,"textEditing"],"文本编辑"),new T([this,"width"],"宽度",Zn.defaults.width,!0),new T([this,"opacity"],"透明度"),new lt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置","left"),new lt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};f(Zn,"createDefaultProps",()=>({...Nr.createDefaultProps(),text:"请输入文字",width:80,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:p.reactArray([1,1,1,1]),backgroundColor:p.reactArray([0,0,0,.8]),padding:p.reactArray([5,5,5,5]),borderRadius:p.reactArray([6,6,6,6]),borderWidth:0,borderColor:p.reactArray([1,1,1,1]),borderStyle:"solid"})),f(Zn,"type",Zn.register("ESTextLabel",Zn,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"}));let Do=Zn;const r0=`
|
|
309
|
+
`,Jr=class Jr extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new O([this,"size"],"尺寸",Jr.defaults.size),new X([this,"autoFollow"],"自动跟随",Jr.defaults.autoFollow),new mt([this,"mode"],Jr.modes,"模式","blueSky")],more:[...e.more,new O([this,"autoOpacityFactor"],"自动消失系数",Jr.defaults.autoOpacityFactor)]}}};d(Jr,"createDefaultProps",()=>({...tt.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky",collision:!1,allowPicking:!1})),d(Jr,"type",Jr.register("ESLocalSkyBox",Jr,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),d(Jr,"modes",[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]);let hf=Jr;const wl=class wl extends tt{constructor(t){super(t);d(this,"_location",this.disposeVar(B(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}};d(wl,"type",wl.register("ESLocationMeasurement",wl,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"位置测量点"}));let df=wl;const Ze=class Ze extends tt{constructor(t){super(t);d(this,"_player",this.dv(new Pr));{const n=Ze.defaults;this.d($([this._player,"loop"],[this,"playingLoop"],i=>i??n.playingLoop,i=>i??n.playingLoop)),this.d($([this._player,"currentTime"],[this,"currentTime"],i=>i??n.currentTime,i=>i??n.currentTime)),this.d($([this._player,"duration"],[this,"duration"],i=>i??n.duration,i=>i??n.duration)),this.d($([this._player,"playing"],[this,"playing"],i=>i??n.playing,i=>i??n.playing)),this.d($([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 rt([],"通用","通用"),new it(["number"],n=>this.flyTo(n),[1e3],"飞入"),new ls([this,"updateCallback"],"更新回调函数",void 0,void 0,!0),new O([this,"emissionRate"],"发射率",5,!0),new X([this,"loop"],"是否循环",!0,!0),new O([this,"particleScale"],"等级",1,!0),new O([this,"startScale"],"初始等级",void 0,!0),new O([this,"endScale"],"结束等级",Ze.defaults.endScale,!0),new Et([this,"color"],"颜色",void 0,!0),new Et([this,"startColor"],"初始颜色",void 0,!0),new Et([this,"endColor"],"结束颜色",void 0,!0),new X([this,"sizeInMeters"],"尺寸单位为米",void 0,!0),new O([this,"speed"],"速度",1,!0),new O([this,"minimumSpeed"],"最小速度",void 0,!0),new O([this,"maximumSpeed"],"最大速度",void 0,!0),new O([this,"lifetime"],"生命周期",Number.MAX_VALUE,!0),new O([this,"particleLife"],"粒子生命周期",Ze.defaults.particleLife,!0),new O([this,"minimumParticleLife"],"最小粒子生命周期",void 0,!0),new O([this,"maximumParticleLife"],"最大粒子生命周期",void 0,!0),new O([this,"mass"],"块数量",1,!0),new O([this,"minimumMass"],"最小块数量",void 0,!0),new O([this,"maximumMass"],"最大块数量",void 0,!0),new Ie([this,"imageSize"],"图片尺寸",Ze.defaults.imageSize,!0),new Ie([this,"minimumImageSize"],"最小图片尺寸",void 0,!0),new Ie([this,"maximumImageSize"],"最大图片尺寸",void 0,!0),new xu([this,"image"],"图片",Ze.defaults.image,!0),new Qe([this,"translation"],"偏移",[0,0,0],!0),new Fh([this,"bursts"],"bursts",void 0,!0),new K([this,"emitter"],"emitter",Ze.defaults.emitter),new rt([],"播放器","播放器"),new O([this,"ratio"],"播放比率",0,!0),new Bl([this,"playing"],[this,"ratio"],[this,"playingLoop"],"播放器"),new X([this,"playingLoop"],"是否循环",Ze.defaults.playingLoop,!0),new O([this,"currentTime"],"当前时间",Ze.defaults.currentTime,!0),new O([this,"duration"],"过渡时间",Ze.defaults.duration,!0),new X([this,"playing"],"是否播放",Ze.defaults.playing,!0),new O([this,"playingSpeed"],"播放速度",Ze.defaults.playingSpeed,!0)]}}};d(Ze,"createDefaultProps",()=>({...tt.createDefaultProps(),emitter:jt({type:"CircleEmitter",radius:.5}),bursts:nh(void 0),translation:Ht(void 0),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",imageSize:Ht([20,20]),minimumImageSize:Ht(void 0),maximumImageSize:Ht(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:4,color:Ht(void 0),startColor:Ht(void 0),endColor:Ht(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})),d(Ze,"type",Ze.register("ESParticleSystemPrimitive",Ze,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"}));let kc=Ze;const Zr=class Zr extends Jn{constructor(t){super(t);d(this,"initialStyle",this.ad(jt(void 0)));d(this,"_getInitialStyleEvent",this.disposeVar(new I))}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 mt([this,"mode"],Zr.modes,"模式",Zr.defaults.mode),new K([this,"style"],"样式",Zr.defaults.style),new X([this,"autoAnchor"],"自动锚点对齐",Zr.defaults.autoAnchor)]}}};d(Zr,"createDefaultProps",()=>({...Jn.createDefaultProps(),mode:"SquareH01",style:dt({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})),d(Zr,"type",Zr.register("ESPoi2D",Zr,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),d(Zr,"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 hl=Zr;const Ei=class Ei extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([this,"mode"],Ei.modes,"模式",Ei.defaults.mode),new K([this,"style"],"样式",Ei.defaults.style)]}}};d(Ei,"createDefaultProps",()=>({...tt.createDefaultProps(),mode:"triangle",style:dt({UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]})})),d(Ei,"type",Ei.register("ESPoi3D",Ei,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),d(Ei,"modes",[["三角形","triangle"],["菱形","diamond"],["制(存)梁场","BridgePrefabricationSite"],["汽车运输便道","ExportRoad"],["拌合站","MixingStation"],["小型预制构件厂","PrefabricatedComponentsSite"],["项目部","ProjectDepartment"],["铁路岔线","RailwayFork"],["钢筋加工厂","RebarMachining"],["临时电力干线","TempElectricMain"],["铺轨基地","TrackLayingBase"],["汽车运梁通道","TransportationBridge"]]);let ff=Ei;const qa=class qa extends At{constructor(t){super(t);d(this,"_czmFlattenedPlaneId",this.dv(B("")))}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 ut([this,"targetID"],"瓦片图层","")]}}};d(qa,"createDefaultProps",()=>({...At.createDefaultProps(),targetID:"",filled:!1})),d(qa,"type",qa.register("ESPolygonFlattenedPlane",qa,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"}));let pf=qa;const dy=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},fy=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},py=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},gy=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},my=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},Xa=class Xa extends Rt{constructor(t){super(t);d(this,"_addTreesEvent",this.dv(new I));d(this,"_removeAllTreesEvent",this.dv(new I));d(this,"_updateTreeParamsEvent",this.dv(new I));d(this,"_cutDownTreesEvent",this.dv(new I));d(this,"_growthSimulationEvent",this.dv(new I))}async addTreesCallFunc(t,n){return await dy(t,this.id,n)}async updateTreeParamsCallFunc(t,n){return await py(t,this.id,n)}async cutDownTreesCallFunc(t,n,i){return await gy(t,this.id,n,i)}async removeAllTreesCallFunc(t){return await fy(t,this.id)}async growthSimulationCallFunc(t,n,i,s){return await my(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 rt([],"通用"),new K([this,"treeTypes"],"treeTypes",[],"{ name: string, meshPath: string }[]",!0),new O([this,"stumpId"],"树桩id"),new O([this,"intervalTime"],"动画间隔时间"),new O([this,"switchIntervalTime"],"切换间隔时间")]}}};d(Xa,"createDefaultProps",()=>({...Rt.createDefaultProps(),treeTypes:jt([]),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})),d(Xa,"type",Xa.register("ESSeparateFoliage",Xa,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"}));let gf=Xa;function Vc(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 u=o.getUint8(e+a);s[a]=String.fromCharCode(u)}return s.join("")}function Bc(r,e){const t="buffer"in r,n=t?r.buffer:r;return t&&(e+=r.byteOffset),new DataView(n).getUint32(e,!0)}function vy(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 xS(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 TS(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 NS(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 yy(r){if(Vc(r,0,4)!=="glTF"){console.error("Not a glTF file");return}const t=Bc(r,4);if(t!==2){console.error("Unsupported glTF version");return}const n=Bc(r,8);if(n!==r.byteLength){console.error("Invalid glTF length");return}const i=Bc(r,12);if(i+12+4>n){console.error("Invalid glTF chunk length");return}if(Vc(r,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const o=Vc(r,20,i),a={version:t,length:n,gltfJson:o};if(20+i<r.byteLength){const u=Bc(r,20+i);if(Vc(r,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const c=vy(r,20+i+8,u);a.gltfBinary=c}return a}window.parseGlb=yy;function _y(r){const e=yy(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],u=t.bufferViews[a.bufferView];if(!e.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const l=NS(e.gltfBinary,u.byteOffset??0,u.byteLength/4);var c=t.accessors[o],h=t.bufferViews[c.bufferView];if(!e.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let f;return c.componentType===5121?f=vy(e.gltfBinary,h.byteOffset??0,h.byteLength/1):c.componentType===5123?f=xS(e.gltfBinary,h.byteOffset??0,h.byteLength/2):c.componentType===5125&&(f=TS(e.gltfBinary,h.byteOffset??0,h.byteLength/4)),{name:n.name,posBuffer:l,indicesBuffer:f}})}window.parseWaterGlb=_y;const un=class un extends tt{constructor(t){super(t);d(this,"_submergingData");d(this,"_allMoments",[]);d(this,"readyEvent",this.dv(new I));{const n=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(s=>{this._submergingData=_y(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()})}).catch(i=>{console.log(i)})};n(),this.d(this.urlChanged.don(()=>{n()}))}}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ut([this,"url"],"Url地址",un.defaults.url),new Me([this,"amplitude"],.01,[0,1],"振幅",un.defaults.amplitude),new O([this,"frequency"],"频率",un.defaults.frequency),new O([this,"currentTime"],"当前时间",un.defaults.currentTime),new K([this,"materialParams"],"材质参数",un.defaults.materialParams),new mt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型","river"),new Et([this,"waterColor"],"水的底色",un.defaults.waterColor),new Me([this,"waveVelocity"],.01,[0,1],"波动频率",un.defaults.waveVelocity),new O([this,"flowSpeed"],"水流速度",un.defaults.flowSpeed),new Me([this,"specularIntensity"],.01,[0,1],"镜面反射强度",un.defaults.specularIntensity),new Me([this,"murkiness"],.01,[0,10],"水体浑浊度",un.defaults.murkiness)]}}};d(un,"createDefaultProps",()=>({...tt.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:dt({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})),d(un,"type",un.register("ESSubmergingAnalysis",un,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"}));let mf=un;const Io=class Io extends At{constructor(t){super(t);d(this,"_startEvent",this.dv(new I));d(this,"_stopEvent",this.dv(new I))}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 Et([this,"startColor"],"起始颜色"),new Et([this,"endColor"],"结束颜色"),new O([this,"progress"],"计算进度"),new O([this,"extrudedHeight"],"高度m"),new O([this,"height"],"底面高度"),new O([this,"sampleDistance"],"采样间距m"),new O([this,"startTime"],"起始时间,时间戳"),new O([this,"endTime"],"结束时间,时间戳"),new O([this,"spanTime"],"时间跨度,默认1小时时间戳"),new it([],()=>this.start(),[],"开始分析"),new it([],()=>this.stop(),[],"结束分析")]}}};d(Io,"createDefaultProps",()=>({...At.createDefaultProps(),extrudedHeight:30,height:0,sampleDistance:10,startColor:at([1,1,0,1]),endColor:at([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0,filled:!1,stroked:!1})),d(Io,"type",Io.register("ESSunshineAnalysis",Io,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),d(Io,"supportEditingModes",[...At.supportEditingModes,Q.HeightModify]);let vf=Io;const Qi=class Qi extends Rt{constructor(t){super(t);d(this,"_activateEvent",this.disposeVar(new I));d(this,"activate",!1)}get activateEvent(){return this._activateEvent}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",basic:[...t.basic,new O([this,"zIndex"],"层级序号",Qi.defaults.zIndex)],dataSource:[...t.dataSource,new K([this,"url"],"地形服务地址",Qi.defaults.url),new br([this,"rectangle"],"矩形范围",Qi.defaults.rectangle)],more:[...t.more,new O([this,"czmMinzoom"],"czmMinzoom",void 0,!0),new O([this,"czmMaxzoom"],"czmMaxzoom",void 0,!0)]}}};d(Qi,"createDefaultProps",()=>({...Rt.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:at([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0})),d(Qi,"type",Qi.register("ESTerrainLayer",Qi,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"}));let yf=Qi;const Ci=class Ci extends Jn{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Et([this,"color"],"文本颜色",[1,1,1,1]),new O([this,"fontSize"],"文字大小",14),new kh([this,"text"],"内容",Ci.defaults.text,void 0,!0),new Et([this,"backgroundColor"],"背景颜色",Ci.defaults.backgroundColor),new br([this,"padding"],"内边距",Ci.defaults.padding),new Et([this,"borderColor"],"边界颜色"),new br([this,"borderRadius"],"边界圆角"),new O([this,"borderWidth"],"边界宽度")],more:[...e.more,new rt([],"czm","czm"),new X([this,"textEditingInteraction"],"文本编辑交互"),new X([this,"textEditing"],"文本编辑"),new O([this,"width"],"宽度",Ci.defaults.width,!0),new O([this,"opacity"],"透明度"),new mt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置","left"),new mt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};d(Ci,"createDefaultProps",()=>({...Jn.createDefaultProps(),text:"请输入文字",width:80,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:at([1,1,1,1]),backgroundColor:at([0,0,0,.8]),padding:at([5,5,5,5]),borderRadius:at([6,6,6,6]),borderWidth:0,borderColor:at([1,1,1,1]),borderStyle:"solid"})),d(Ci,"type",Ci.register("ESTextLabel",Ci,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"}));let Oa=Ci;const OS=`
|
|
310
310
|
#### 默认值如下
|
|
311
311
|
\`\`\`js
|
|
312
312
|
{
|
|
313
313
|
"Title": "示例",
|
|
314
314
|
"Content": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
|
|
315
315
|
}
|
|
316
|
-
\`\`\``,
|
|
316
|
+
\`\`\``,wr=class wr extends Jn{constructor(t){super(t);d(this,"_callFunctionEvent",this.disposeVar(new I));d(this,"_callFunctionResultEvent",this.dv(new I))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(t,n){return new Promise(i=>{const s=new V,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 Qe([this,"positionOffset"],"positionOffset",wr.defaults.positionOffset),new Qe([this,"rotationOffset"],"rotationOffset",wr.defaults.rotationOffset),new ut([this,"actorTag"],"actorTag",wr.defaults.actorTag),new ut([this,"widgetClass"],"widgetClass",wr.defaults.widgetClass),new ut([this,"socketName"],"socketName",wr.defaults.socketName),new K([this,"info"],"info",wr.defaults.info,OS,!0)],more:[...t.more,new it(["string","string"],(n,i)=>this.callFunction(n,JSON.parse(i)),["",""],"callFunction")]}}};d(wr,"createDefaultProps",()=>({...Jn.createDefaultProps(),widgetClass:"",info:jt({Title:"标题示例",Content:"内容示例"})})),d(wr,"type",wr.register("ESUEWidget",wr,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"}));let _f=wr;const Ha=class Ha extends tt{constructor(){super(...arguments);d(this,"_callFunctionEvent",this.dv(new I));d(this,"_callFunctionResultEvent",this.dv(new I));d(this,"_actorEvent",this.dv(new I));d(this,"_lastActorStatus",this.dv(B("null")))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(t,n){return new Promise(i=>{const s=new V,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 ut([this,"actorTag"],"actorTag",""),new ut([this,"actorClass"],"actorClass",""),new X([this,"highlight"],"是否高亮",!1)],more:[...t.more,new it(["string","string"],(n,i)=>this.callFunction(n,JSON.parse(i)),["",""],"callFunction")]}}};d(Ha,"createDefaultProps",()=>({...tt.createDefaultProps(),actorTag:"",actorClass:"",highlight:!1,allowPicking:!0})),d(Ha,"type",Ha.register("ESUnrealActor",Ha,{chsName:"UnrealActor",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"UnrealActor"}));let wf=Ha;const ln=class ln extends tt{constructor(t){super(t);d(this,"editingBindMode","doublePoints");d(this,"_resetWithCameraInfoEvent",this.dv(new I));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"],"循环",ln.defaults.looping),new X([this,"showFrustum"],"视椎体",ln.defaults.showFrustum),new O([this,"aspectRatio"],"宽高比",ln.defaults.aspectRatio),new O([this,"fov"],"横向夹角",ln.defaults.fov),new O([this,"far"],"视野长度",ln.defaults.far),new O([this,"near"],"近面距离",ln.defaults.near),new K([this,"videoStreamUrl"],"视频路径",ln.defaults.videoStreamUrl),new O([this,"zIndex"],"显示优先级",ln.defaults.zIndex),new mt([this,"videoStreamType"],ln.videoStreamTypes,"视频类型","video")],more:[...t.more,new it([],()=>this.resetWithCameraInfo(),[],"以当前相机状态重置")]}}};d(ln,"createDefaultProps",()=>({...tt.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,videoStreamUrl:"",zIndex:1,showFrustum:!0,looping:!0,videoStreamType:"video"})),d(ln,"type",ln.register("ESVideoFusion",ln,{chsName:"视频融合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视频融合"})),d(ln,"videoStreamTypes",[["video","video"],["hls","hls"],["flv","flv"],["img","img"],["gif","gif"]]);let Ef=ln;const Er=class Er extends tt{constructor(t){super(t);d(this,"editingBindMode","doublePoints")}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new X([this,"showFrustum"],"视椎体",Er.defaults.showFrustum),new O([this,"aspectRatio"],"宽高比",Er.defaults.aspectRatio),new O([this,"fov"],"横向夹角",Er.defaults.fov),new O([this,"near"],"近面距离",Er.defaults.near),new O([this,"far"],"视野长度",Er.defaults.far),new O([this,"zIndex"],"显示优先级",Er.defaults.zIndex)]}}};d(Er,"createDefaultProps",()=>({...tt.createDefaultProps(),fov:90,aspectRatio:1.77778,near:10,far:100,zIndex:1,showFrustum:!0,collision:!1})),d(Er,"type",Er.register("ESViewShed",Er,{chsName:"视域分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"信号传输器"}));let Cf=Er;const DS=`
|
|
317
317
|
#### 默认值如下
|
|
318
318
|
\`\`\`js
|
|
319
319
|
{
|
|
@@ -321,7 +321,7 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
321
321
|
"Key":"Value",
|
|
322
322
|
"内容": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
|
|
323
323
|
}
|
|
324
|
-
\`\`\``,
|
|
324
|
+
\`\`\``,Rs=class Rs extends Jn{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new K([this,"info"],"信息",Rs.defaults.info,DS,!0)],more:[...e.more,new rt([],"通用","通用"),new rt([],"ue","ue"),new Xo([this,"positionOffset"],"坐标偏移"),new Xo([this,"rotationOffset"],"旋转偏移"),new ut([this,"actorTag"]),new ut([this,"widgetClass"]),new ut([this,"socketName"]),new rt([],"czm","czm"),new O([this,"opacity"],"透明度",Rs.defaults.opacity,!0)]}}};d(Rs,"createDefaultProps",()=>({...Jn.createDefaultProps(),info:dt({title:"标题示例",内容:"内容示例"}),widgetClass:"WidgetBlueprint'/EarthSDKForUE/Widget/WBP_ES_DefaultInfo.WBP_ES_DefaultInfo'",actorTag:"",socketName:"",positionOffset:at([0,0,0]),rotationOffset:at([0,0,0]),opacity:1})),d(Rs,"type",Rs.register("ESWidget",Rs,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ES组件"}));let Sf=Rs;const xo=class xo extends wt{constructor(t){super(t);d(this,"_direction",this.disposeVar(B(0)));d(this,"editingBindMode","doublePoints");{const n=()=>{this.direction=this.points&&this.points.length>=2?Ho(Au(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}};d(xo,"createDefaultProps",()=>({...wt.createDefaultProps(),stroked:!0,strokeStyle:dt({width:10,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(xo,"type",xo.register("ESDirectionMeasurement",xo,{chsName:"方位角测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"方位角测量"})),d(xo,"supportEditingModes",[...wt.supportEditingModes,Q.Rotation,Q.Scale,Q.DoublePointsAppend,Q.DoublePointsModify]);let bf=xo;const wy=`// dataSource
|
|
325
325
|
(dataSource) => {
|
|
326
326
|
if (dataSource) {
|
|
327
327
|
dataSource.show = true;
|
|
@@ -347,11 +347,11 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
`,
|
|
350
|
+
`,MS=`示例代码
|
|
351
351
|
\`\`\`
|
|
352
|
-
${
|
|
352
|
+
${wy}
|
|
353
353
|
\`\`\`
|
|
354
|
-
`,s0="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",mt=class mt extends bt{constructor(e){super(e);f(this,"_flyToFeatureEvent",this.dv(new V));f(this,"_flyToFeatureIndexEvent",this.dv(new V));f(this,"_features",this.disposeVar(p.reactJsonWithUndefined(void 0)));f(this,"pickedInfoType","FeatureCollection");f(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,r,i){this._flyToFeatureEvent.emit(e,r,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,r){this._flyToFeatureIndexEvent.emit(e,r)}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()")}async _updateUrl(){var r;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const e=this.abortController.signal;if(!this.url){this.features=void 0;return}typeof this.url=="object"?this.features=this.url:Ml(this.url)?this.features=JSON.parse(this.url):await fetch(j.context.getStrFromEnv(this.url),{signal:e}).then(i=>i.json()).then(i=>{this.features=i}).catch(i=>{i.name!="AbortError"&&console.warn("ESEntityCluster数据加载失败",i)}),this.pickedInfoType=((r=this.features)==null?void 0:r.type)??"FeatureCollection"}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",dataSource:[...e.dataSource,new H([this,"url"],"服务地址",mt.defaults.url),new T([this,"minFeatureVisibleDistance"],"要素最小可视距离",mt.defaults.minFeatureVisibleDistance),new T([this,"maxFeatureVisibleDistance"],"要素最大可视距离",mt.defaults.maxFeatureVisibleDistance),new lt([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考")],style:[...e.style,new $([],"点样式集合"),new W([this,"textShow"],"是否显示",mt.defaults.textShow),new ce([this,"textAnchor"],"锚点",mt.defaults.anchor),new nt([this,"textProperty"],"标注显示属性",mt.defaults.textStyle.textProperty),new nt([this,"textDefaultText"],"默认文本",mt.defaults.textStyle.defaultText),new gt([this,"textColor"],"文本颜色",mt.defaults.textStyle.color),new gt([this,"textBackgroundColor"],"文本背景颜色",mt.defaults.textStyle.backgroundColor),new nt([this,"textFontStyle"],"字体样式",mt.defaults.textStyle.fontStyle),new nt([this,"textFontWeight"],"字体粗细",mt.defaults.textStyle.fontWeight),new T([this,"textFontSize"],"字体大小",mt.defaults.textStyle.fontSize),new ce([this,"textOffset"],"像素偏移",mt.defaults.textStyle.offset),new $([],"点图片样式集合"),new W([this,"imageShow"],"是否显示",mt.defaults.imageShow),new ce([this,"imageAnchor"],"锚点",mt.defaults.imageStyle.anchor),new H([this,"imageUrl"],"图片地址",mt.defaults.imageStyle.url),new ce([this,"imageSize"],"图片大小",mt.defaults.imageStyle.size),new ce([this,"imageOffset"],"像素偏移",mt.defaults.imageStyle.offset),new $([],"线样式集合"),new W([this,"stroked"],"是否显示",mt.defaults.stroked),new W([this,"strokeGround"],"贴地",mt.defaults.strokeStyle.ground),new T([this,"strokeWidth"],"线宽",mt.defaults.strokeStyle.width),new lt([this,"strokeWidthType"],mt.strokeStyleWidthTypes,"线宽类型"),new gt([this,"strokeColor"],"线颜色",mt.defaults.strokeStyle.color),new nt([this,"strokeMaterial"],"线材质",mt.defaults.strokeStyle.material),new H([this,"strokeMaterialParams"],"线材质参数",mt.defaults.strokeStyle.materialParams),new $([],"面样式集合"),new W([this,"filled"],"是否显示",mt.defaults.filled),new W([this,"fillGround"],"贴地",mt.defaults.fillStyle.ground),new gt([this,"fillColor"],"填充颜色",mt.defaults.fillStyle.color),new nt([this,"fillMaterial"],"填充材质",mt.defaults.fillStyle.material),new H([this,"fillMaterialParams"],"填充材质参数",mt.defaults.fillStyle.materialParams)],more:[...e.more,new $([],"标注文本样式"),new nt([this,"textFontFamily"],"字体",mt.defaults.textStyle.fontFamily),new $([],"通用"),new bi([this,"loadFuncStr"],"loadFnStr",dg,i0,!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}};f(mt,"createDefaultProps",()=>({...bt.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:s0,stroked:!0,strokeStyle:p.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:p.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:p.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:p.reactJson({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"})),f(mt,"type",mt.register("ESGeoJson",mt,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"})),f(mt,"strokeStyleWidthTypes",[["screen","screen"],["world","world"]]);let eu=mt;const Vs=class Vs extends pt{constructor(e){super(e);f(this,"editingBindMode","doublePoints");f(this,"_height",this.disposeVar(p.react(0)));{const r=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};r(),this.ad(this.pointsChanged.don(r))}}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}};f(Vs,"createDefaultProps",()=>({...pt.createDefaultProps(),stroked:!0,strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(Vs,"type",Vs.register("ESHeightMeasurement",Vs,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),f(Vs,"supportEditingModes",[...pt.supportEditingModes,B.DoublePointsAppend,B.DoublePointsModify]);let mh=Vs;const Zo=class Zo extends vi{constructor(e){super(e);f(this,"_area",this.dv(p.react(0)));f(this,"_perimeter",this.dv(p.react(0)));f(this,"editingBindMode","doublePoints");const r=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};r(),this.d(this.radiusChanged.don(r))}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,r){return Xp([...this.position],this.radius,e,r)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new T([this,"radius"],"圆半径",1,!0)],coordinate:[...e.coordinate,new W([this,"editing"],"是否编辑"),new Bs([this,"position"],"三维坐标",[0,0,0],!0),new T([this,"area"],"面积",0,!1,!0),new T([this,"perimeter"],"周长",0,!1,!0)]}}};f(Zo,"createDefaultProps",()=>({...vi.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),f(Zo,"type",Zo.register("ESLocalCircle",Zo,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let vh=Zo;const Ko=class Ko extends vi{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new mf([this,"points"],"坐标",[])]}}};f(Ko,"createDefaultProps",()=>({...vi.createDefaultProps(),points:Fc([]),filled:!0})),f(Ko,"type",Ko.register("ESLocalPolygon",Ko,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let ru=Ko;const Qo=class Qo extends Mo{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Tl([this,"points"],"本地位置数组")]}}};f(Qo,"createDefaultProps",()=>({...Mo.createDefaultProps(),points:p.reactPositions(void 0),filled:!0})),f(Qo,"type",Qo.register("ESLocalPolygonZ",Qo,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let yh=Qo;const $o=class $o extends vi{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new T([this,"width"],"宽度"),new T([this,"height"],"高度")]}}};f($o,"createDefaultProps",()=>({...vi.createDefaultProps(),width:5e5,height:3e5,filled:!0})),f($o,"type",$o.register("ESLocalRectangle",$o,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let _h=$o;const wi=class wi extends pt{constructor(e){super(e);f(this,"editingBindMode","lineString");f(this,"_distance",this.dv(p.react(0)));f(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);f(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const r=()=>{if(this.points&&this.points.length>=2){const i=Ka(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};r(),this.d(this.pointsChanged.don(r))}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 T([this,"height"],"高度",10),new T([this,"width"],"宽度",10),new lt([this,"materialMode"],wi.materialModes,"模式","purple")],coordinate:[...e.coordinate,new T([this,"distance"],"距离",0,!1,!0)]}}};f(wi,"createDefaultProps",()=>({...pt.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:p.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),f(wi,"type",wi.register("ESPipeFence",wi,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),f(wi,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),f(wi,"supportEditingModes",[...pt.supportEditingModes,B.LineStringAppend,B.LineStringInsert]);let fl=wi;const Ei=class Ei extends Jr{constructor(e){super(e);f(this,"_setLayerVisibleEvent",this.dv(new V));f(this,"_setLayerColorEvent",this.dv(new V))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,r){this._setLayerVisibleEvent.emit(e,r)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,r){this._setLayerColorEvent.emit(e,r)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new $([],"ESPipeserTileset"),new tt(["string","string"],(r,i)=>this.setLayerVisible(r,i),["",""],"setLayerVisible"),new tt(["string","string"],(r,i)=>this.setLayerColor(r,i),["",""],"setLayerColor"),new lt([this,"colorMode"],Ei.colorModes,"colorMode",Ei.defaults.colorMode,!0)]}}};f(Ei,"createDefaultProps",()=>({...Jr.createDefaultProps(),colorMode:"default"})),f(Ei,"type",Ei.register("ESPipeserTileset",Ei,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),f(Ei,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let wh=Ei;const Si=class Si extends pt{constructor(e){super(e);f(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new T([this,"area"],"面积",0,!1,!0),new T([this,"perimeter"],"周长",0,!1,!0)],basic:[...e.basic,new T([this,"height"],"高度",10),new lt([this,"materialMode"],Si.materialModes,"模式","danger")]}}};f(Si,"createDefaultProps",()=>({...pt.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),f(Si,"type",Si.register("ESPolygonFence",Si,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),f(Si,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),f(Si,"supportEditingModes",[...pt.supportEditingModes,B.CircularAppend,B.CircularInsert,B.HeightModify]);let dl=Si;const Qi=class Qi extends pt{constructor(e){super(e);f(this,"_deprecated",["ground"]);f(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());f(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new $([],"通用","通用"),new W([this,"ground"],"是否贴地"),new W([this,"outlineTranslucent"],"轮廓线半透明"),new T([this,"height"],"高度"),new T([this,"extrudedHeight"],"拉伸高度"),new rn([this,"rectangle"],"范围",Qi.defaults.rectangle,!0),new T([this,"stRotation"],"纹理旋转角度"),new T([this,"rotation"],"旋转角度"),new W([this,"pointEditing"],"是否单点编辑")]}}};f(Qi,"createDefaultProps",()=>({...pt.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:p.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),f(Qi,"type",Qi.register("ESRectangle",Qi,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),f(Qi,"supportEditingModes",[...pt.supportEditingModes,B.DoublePointsAppend,B.DoublePointsModify]);let Eh=Qi;const ta=class ta extends Tt{getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new H([this,"innerRings"],"裁切多边形数组",[],void 0,!0)]}}};f(ta,"createDefaultProps",()=>({...Tt.createDefaultProps(),innerRings:p.reactPositionsSet([])})),f(ta,"type",ta.register("ESPolygonWithHole",ta,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let Sh=ta;const $i=class $i extends Tt{constructor(e){super(e);f(this,"_startEvent",this.disposeVar(new V));f(this,"_stopEvent",this.dv(new V));f(this,"_surfaceArea",this.disposeVar(p.react(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 $([],"表面积测量","表面积测量"),new tt([],()=>this.start(),[],"开始计算"),new T([this,"interpolation"],"插值距离",$i.defaults.interpolation),new T([this,"offsetHeight"],"偏移高度",$i.defaults.offsetHeight)]}}};f($i,"createDefaultProps",()=>({...Tt.createDefaultProps(),interpolation:.5,offsetHeight:0,units:p.reactArray(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),f($i,"type",$i.register("ESSurfaceAreaMeasurement",$i,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let Ch=$i;const ts=class ts extends Z{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new T([this,"downloadProgress"],"下载进度",ts.defaults.downloadProgress,!0,!0),new H([this,"importOptions"],"导入参数",ts.defaults.importOptions,void 0,!0)],dataSource:[...t.dataSource,new H([this,"url"],"路径")]}}};f(ts,"createDefaultProps",()=>({...Z.createDefaultProps(),url:"",importOptions:p.reactJsonWithUndefined({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),f(ts,"type",ts.register("ESDatasmithRuntimeModel",ts,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let Ih=ts;const He=class He extends ru{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new lt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",He.defaults.waterType),new T([this,"frequency"],"频率",He.defaults.frequency),new ge([this,"amplitude"],.01,[0,1],"振幅",He.defaults.amplitude),new ge([this,"flowDirection"],1,[0,360],"流向",He.defaults.flowDirection),new ge([this,"waveVelocity"],.01,[0,1],"波动频率",He.defaults.waveVelocity),new ge([this,"specularIntensity"],.01,[0,1],"镜面反射强度",He.defaults.specularIntensity),new ge([this,"murkiness"],.1,[0,10],"水体浑浊度",He.defaults.murkiness),new T([this,"flowSpeed"],"水流速度",He.defaults.flowSpeed),new gt([this,"waterColor"],"水的底色",He.defaults.waterColor),new H([this,"waterImage"],"水的图片",He.defaults.waterImage)]}}};f(He,"createDefaultProps",()=>({...ru.createDefaultProps(),allowPicking:!0,waterImage:p.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),f(He,"type",He.register("ESDynamicWater",He,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let Ph=He;const Be=class Be extends Tt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new lt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Be.defaults.waterType),new T([this,"frequency"],"频率",Be.defaults.frequency),new ge([this,"amplitude"],.01,[0,1],"振幅",Be.defaults.amplitude),new ge([this,"flowDirection"],1,[0,360],"流向",Be.defaults.flowDirection),new ge([this,"waveVelocity"],.01,[0,1],"波动频率",Be.defaults.waveVelocity),new ge([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Be.defaults.specularIntensity),new ge([this,"murkiness"],.1,[0,10],"水体浑浊度",Be.defaults.murkiness),new T([this,"flowSpeed"],"水流速度",Be.defaults.flowSpeed),new gt([this,"waterColor"],"水的底色",Be.defaults.waterColor),new H([this,"waterImage"],"水的图片",Be.defaults.waterImage)]}}};f(Be,"createDefaultProps",()=>({...Tt.createDefaultProps(),allowPicking:!0,waterImage:p.reactJsonWithUndefined({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),f(Be,"type",Be.register("ESGeoWater",Be,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let bh=Be;const zs=class zs extends Z{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new T([this,"downloadProgress"],"下载进度",zs.defaults.downloadProgress,!0,!0),new nt([this,"levelName"],"levelName",""),new T([this,"levelLoadDistance"],"levelLoadDistance",1e3),new Re([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...t.dataSource,new H([this,"url"],"url","")]}}};f(zs,"createDefaultProps",()=>({...Z.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:p.reactArray([0,0,0]),levelLoadDistance:1e3})),f(zs,"type",zs.register("ESLevelRuntimeModel",zs,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let Nh=zs;const Tr=class Tr extends yi{constructor(e){super(e);f(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);f(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new T([this,"radius"],"半径",Tr.defaults.radius),new T([this,"sides"],"圆边数",Tr.defaults.sides),new T([this,"speed"],"材质速度",Tr.defaults.speed),new lt([this,"materialMode"],Tr.materialModes,"材质模式",Tr.defaults.materialMode),new H([this,"materialImage"],"材质图片和重复度",Tr.defaults.materialImage)]}}};f(Tr,"createDefaultProps",()=>({...yi.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:p.reactJson({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:p.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),f(Tr,"type",Tr.register("ESPipeline",Tr,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),f(Tr,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let Th=Tr;const Kn=class Kn extends pt{constructor(e){super(e);f(this,"editingBindMode","visibility")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new gt([this,"visibleColor"],"可视区域颜色",Kn.defaults.visibleColor),new gt([this,"invisibleColor"],"遮挡区域颜色",Kn.defaults.invisibleColor),new T([this,"heightOffset"],"视点高度偏移",Kn.defaults.heightOffset)]}}};f(Kn,"createDefaultProps",()=>({...pt.createDefaultProps(),visibleColor:p.reactArray([0,1,0,1]),invisibleColor:p.reactArray([1,0,0,1]),heightOffset:0})),f(Kn,"type",Kn.register("ESVisibilityAnalysis",Kn,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),f(Kn,"supportEditingModes",[...pt.supportEditingModes,B.VisibilityAppend,B.VisibilityModify]);let xh=Kn;const ea=class ea extends Tt{constructor(e){super(e);f(this,"_startEvent",this.dv(new V));f(this,"_clearEvent",this.dv(new V));f(this,"_volume",this.disposeVar(p.react(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 $([],"通用","通用"),new T([this,"planeHeight"],"基准面高程",void 0,!0),new T([this,"gridWidth"],"采样间距 m"),new T([this,"cutVolume"],"挖方",0,!1,!0),new T([this,"fillVolume"],"填方",0,!1,!0),new T([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new T([this,"progress"],"计算进度",0,!1,!0),new tt([],()=>this.start(),[],"开始分析"),new tt([],()=>this.clear(),[],"清空分析结果"),new W([this,"depthTest"],"是否开启深度检测")]}}};f(ea,"createDefaultProps",()=>({...Tt.createDefaultProps(),planeHeight:p.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(ea,"type",ea.register("ESVolumeMeasurement",ea,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let Oh=ea;const ra=class ra extends Ps{constructor(e){super(e);f(this,"_human",this.dv(new Ps));f(this,"_poi",this.dv(new tu));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._poi));{const{_human:r,_poi:i}=this;this.d(p.track([r,"show"],[this,"show"])),this.d(p.track([i,"show"],[this,"show"])),this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([i,"allowPicking"],[this,"allowPicking"])),this.d(p.bind([r,"scale"],[this,"scale"])),this.d(p.bind([i,"scale"],[this,"scale"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([r,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"animation"],[this,"animation"])),this.d(p.track([r,"mode"],[this,"mode"])),this.d(p.track([r,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(p.track([r,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(p.track([i,"name"],[this,"name"])),this.d(p.track([i,"mode"],[this,"poiMode"])),this.d(p.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(p.track([i,"screenRender"],[this,"screenRender"])),this.d(p.track([i,"size"],[this,"size"])),this.d(p.track([i,"anchor"],[this,"anchor"])),this.d(p.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(p.track([i,"renderMode"],[this,"renderMode"])),this.d(p.track([i,"rotationType"],[this,"rotationType"])),this.d(p.track([i,"zOrder"],[this,"zOrder"])),this.d(p.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(p.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(p.bind([r,"position"],[this,"position"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{r.flyIn(s)})),this.d(this.flyToEvent.don(s=>{r.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{r.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{r.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,o)=>{r.smoothMove(s,o)})),this.d(this.smoothMoveWithRotationEvent.don((s,o,a)=>{r.smoothMoveWithRotation(s,o,a)})),this.d(this.smoothMoveOnGroundEvent.don((s,o,a,u)=>{r.smoothMoveOnGround(s,o,a,u)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,u,l)=>{r.smoothMoveWithRotationOnGround(s,o,a,u,l)})),this.d(this.automaticLandingEvent.don(()=>{r.automaticLanding()}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new lt([this,"poiMode"],tu.modes,"poi模式","SquareH01"),new T([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};f(ra,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:p.reactJson({}),autoAnchor:!0,screenRender:!0,size:p.reactArray([100,100]),anchor:p.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...Ps.createDefaultProps()})),f(ra,"type",ra.register("ESHumanPoi",ra,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let Mh=ra;const Tn=class Tn extends Tt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new T([this,"depth"],"深度",Tn.defaults.depth),new T([this,"interpolation"],"插值",Tn.defaults.interpolation),new T([this,"opacity"],"透明度",Tn.defaults.opacity),new H([this,"sideImage"],"侧面图片",Tn.defaults.sideImage),new H([this,"bottomImage"],"底面图片",Tn.defaults.bottomImage)]}}};f(Tn,"createDefaultProps",()=>({...Tt.createDefaultProps(),depth:100,sideImage:p.reactJson({url:j.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:p.reactJson({url:j.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})),f(Tn,"type",Tn.register("ESPit",Tn,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let Lo=Tn;const na=class na extends Lo{constructor(e){super(e);f(this,"_excavate",this.dv(new $a));f(this,"_pit",this.dv(new Lo));this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit,!0));{const{_excavate:r,_pit:i}=this;this.d(p.track([r,"show"],[this,"show"])),this.d(p.track([i,"show"],[this,"show"])),this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([i,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([i,"points"],[this,"points"])),this.d(p.track([r,"points"],[this,"points"])),this.d(p.track([i,"pointed"],[this,"pointed"])),this.d(p.track([r,"pointed"],[this,"pointed"])),this.d(p.track([i,"pointStyle"],[this,"pointStyle"])),this.d(p.track([r,"pointStyle"],[this,"pointStyle"])),this.d(p.track([i,"stroked"],[this,"stroked"])),this.d(p.track([r,"stroked"],[this,"stroked"])),this.d(p.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(p.track([r,"strokeStyle"],[this,"strokeStyle"])),this.d(p.track([i,"filled"],[this,"filled"])),this.d(p.track([i,"fillStyle"],[this,"fillStyle"])),this.d(p.track([r,"fillStyle"],[this,"fillStyle"])),this.d(p.track([r,"mode"],[this,"mode"])),this.d(p.track([r,"targetID"],[this,"targetID"])),this.d(p.track([i,"depth"],[this,"depth"])),this.d(p.track([i,"sideImage"],[this,"sideImage"])),this.d(p.track([i,"bottomImage"],[this,"bottomImage"])),this.d(p.track([i,"opacity"],[this,"opacity"])),this.d(p.track([i,"interpolation"],[this,"interpolation"])),this.d(p.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([i,"flyToParam"],[this,"flyToParam"])),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 e={...super.getESProperties()};return{...e,basic:[...e.basic,new lt([this,"mode"],$a.modes,"模式","in"),new nt([this,"targetID"],"瓦片图层","")]}}};f(na,"createDefaultProps",()=>({...Lo.createDefaultProps(),mode:"in",targetID:""})),f(na,"type",na.register("ESHole",na,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let Dh=na;const Lh={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},o0=async(n,t,e,r)=>{try{const i=window.localStorage.getItem("Authorization");let s=n+`${Lh.layerconfigfind}?tileServiceName=${t}`;e&&(s+=`&earthdstoken=${encodeURIComponent(r)}`);const o={headers:{...!e&&i?{Authorization:i}:{}},mode:"cors"},u=await(await fetch(s,o)).text();return JSON.parse(u)}catch(i){console.error(i)}},a0=async(n,t,e,r,i)=>{try{const s=window.localStorage.getItem("Authorization");let o=n+Lh.layerconfigsave;const a=i??{};e&&(o+=`?earthdstoken=${encodeURIComponent(r)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!e&&s?{Authorization:s}:{}},mode:"cors",body:JSON.stringify({tileServiceName:t,layerConfig:JSON.stringify(a)})},c=await(await fetch(o,u)).text();return JSON.parse(c)}catch(s){console.error(s)}},u0=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},l0=async(n,t,e,r,i)=>{try{const s={tileServiceName:t,featureId:e},o=window.localStorage.getItem("Authorization");let a=n+Lh.featureproperty;r&&(a+=`?earthdstoken=${encodeURIComponent(i)}`);const l=await(await fetch(a,{method:"post",headers:{"Content-Type":"application/json",...!r&&o?{Authorization:o}:{}},body:JSON.stringify(s),mode:"cors"})).text(),c=JSON.parse(l);if(c.status=="ok")return c.data;console.error(c.data.status);return}catch(s){console.error(s)}},ia=class ia extends Jr{constructor(e){super(e);f(this,"_es3DTileset",this.dv(new Jr));f(this,"_ids",this.dv(p.reactJson([])));f(this,"_useEarthDSToken",this.dv(p.react(!1)));f(this,"_earthdstoken",this.dv(p.react("")));f(this,"_visJson",this.disposeVar(p.react({})));f(this,"_highlightInner3DtilesetEvent",this.dv(new V));f(this,"_removeHighlightInner3DtilesetEvent",this.dv(new V));f(this,"_tilesetServePort",this.dv(p.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"actorTag"],[this,"actorTag"])),this.d(p.track([r,"materialMode"],[this,"materialMode"])),this.d(p.track([r,"highlight"],[this,"highlight"])),this.d(p.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(p.track([r,"highlightID"],[this,"highlightID"])),this.d(p.track([r,"highlightColor"],[this,"highlightColor"])),this.d(p.bind([r,"offset"],[this,"offset"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(p.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(p.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(p.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(p.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(p.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(p.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(p.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(p.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(p.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(p.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(p.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(p.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(p.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(p.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(p.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(p.track([r,"materialParams"],[this,"materialParams"])),this.d(p.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(p.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(p.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(p.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(p.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(p.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(p.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{r.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}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 useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}get visJson(){return this._visJson.value}set visJson(e){this._visJson.value=e}get visJsonChanged(){return this._visJson.changed}setFeatureVisable(e,r){var i;if((i=this.layerConfig)!=null&&i.length){const s={};s[r[0].value]=r[0].visable,this.visJson={...this.visJson,...s}}else this.setFeatureVisableEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}async getFeatureProperty(e){return await l0(this.baseUrl,this.tileServiceName,e,this.useEarthDSToken,this.earthdstoken)}async getLayerConfig(){const e=await o0(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await a0(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,e)}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,r){var a,u,l;const i=await e.pick(r),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:(u=i==null?void 0:i.tilesetPickInfo)==null?void 0:u.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 u0(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new H([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};f(ia,"createDefaultProps",()=>({...Jr.createDefaultProps(),layerConfig:p.reactJsonWithUndefined([])})),f(ia,"type",ia.register("ESRtsTileset",ia,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Ah=ia;function c0(n){return typeof n=="number"&&!isNaN(n)}const sa=class sa extends Jr{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(t){this._innerSetJson(t)}async init(t,e){this.featureId=e;const r=await t.getFeatureProperty(e);this.uiShowprops=r.allFields.map(o=>({featureClassName:o.featureClassName,fields:o.fields.map(a=>({key:a.name,type:a.type,value:a.type!="Double"?a.value:c0(a.value)?Number(a.value.toFixed(3)):""}))})),this.datasetName=r.datasetName,t.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{t.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const i=t.tileServiceIp,s=t.tilesetServePort;if(!s)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${i}:${s}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(o=>{o.assign({sceneObject:t}),t.pickedEvent.emit(o)})),this.d(()=>{this.editing=!1,t.removeHighlightDSFeature(this)})}constructor(t){super(t)}};f(sa,"createDefaultProps",()=>({...Jr.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:p.reactJson({}),changeMaterial:p.reactJsonWithUndefined(void 0),uiShowprops:p.reactJson({}),props:p.reactJson({})})),f(sa,"type",sa.register("ESRtsFeatureEditing",sa,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Rh=sa;const h0=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},lu=class lu extends Jr{constructor(e){super(e);f(this,"_es3DTileset",this.dv(new Jr));f(this,"_tilesetServePort",this.dv(p.react("")));f(this,"_useEarthDSToken",this.dv(p.react(!1)));f(this,"_earthdstoken",this.dv(p.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"actorTag"],[this,"actorTag"])),this.d(p.track([r,"materialMode"],[this,"materialMode"])),this.d(p.track([r,"highlight"],[this,"highlight"])),this.d(p.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(p.track([r,"highlightID"],[this,"highlightID"])),this.d(p.track([r,"highlightColor"],[this,"highlightColor"])),this.d(p.bind([r,"offset"],[this,"offset"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(p.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(p.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(p.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(p.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(p.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(p.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(p.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(p.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(p.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(p.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(p.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(p.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(p.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(p.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(p.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(p.track([r,"materialParams"],[this,"materialParams"])),this.d(p.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(p.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(p.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(p.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(p.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(p.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(p.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}async getport(){const e=await h0(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return r}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 r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}};f(lu,"type",lu.register("ESMsTileset",lu,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Fh=lu;const pg={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:`
|
|
354
|
+
`,RS="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",Ct=class Ct extends Rt{constructor(t){super(t);d(this,"_flyToFeatureEvent",this.dv(new I));d(this,"_flyToFeatureIndexEvent",this.dv(new I));d(this,"_features",this.disposeVar(jt(void 0)));d(this,"pickedInfoType","FeatureCollection");d(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 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()")}async _updateUrl(){var n;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const t=this.abortController.signal;if(!this.url){this.features=void 0;return}typeof this.url=="object"?this.features=this.url:Bh(this.url)?this.features=JSON.parse(this.url):await fetch(Z.context.getStrFromEnv(this.url),{signal:t}).then(i=>i.json()).then(i=>{this.features=i}).catch(i=>{i.name!="AbortError"&&console.warn("ESEntityCluster数据加载失败",i)}),this.pickedInfoType=((n=this.features)==null?void 0:n.type)??"FeatureCollection"}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"style",dataSource:[...t.dataSource,new K([this,"url"],"服务地址",Ct.defaults.url),new O([this,"minFeatureVisibleDistance"],"要素最小可视距离",Ct.defaults.minFeatureVisibleDistance),new O([this,"maxFeatureVisibleDistance"],"要素最大可视距离",Ct.defaults.maxFeatureVisibleDistance),new mt([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考")],style:[...t.style,new rt([],"点样式集合"),new X([this,"textShow"],"是否显示",Ct.defaults.textShow),new Ie([this,"textAnchor"],"锚点",Ct.defaults.anchor),new ut([this,"textProperty"],"标注显示属性",Ct.defaults.textStyle.textProperty),new ut([this,"textDefaultText"],"默认文本",Ct.defaults.textStyle.defaultText),new Et([this,"textColor"],"文本颜色",Ct.defaults.textStyle.color),new Et([this,"textBackgroundColor"],"文本背景颜色",Ct.defaults.textStyle.backgroundColor),new ut([this,"textFontStyle"],"字体样式",Ct.defaults.textStyle.fontStyle),new ut([this,"textFontWeight"],"字体粗细",Ct.defaults.textStyle.fontWeight),new O([this,"textFontSize"],"字体大小",Ct.defaults.textStyle.fontSize),new Ie([this,"textOffset"],"像素偏移",Ct.defaults.textStyle.offset),new rt([],"点图片样式集合"),new X([this,"imageShow"],"是否显示",Ct.defaults.imageShow),new Ie([this,"imageAnchor"],"锚点",Ct.defaults.imageStyle.anchor),new K([this,"imageUrl"],"图片地址",Ct.defaults.imageStyle.url),new Ie([this,"imageSize"],"图片大小",Ct.defaults.imageStyle.size),new Ie([this,"imageOffset"],"像素偏移",Ct.defaults.imageStyle.offset),new rt([],"线样式集合"),new X([this,"stroked"],"是否显示",Ct.defaults.stroked),new X([this,"strokeGround"],"贴地",Ct.defaults.strokeStyle.ground),new O([this,"strokeWidth"],"线宽",Ct.defaults.strokeStyle.width),new mt([this,"strokeWidthType"],Ct.strokeStyleWidthTypes,"线宽类型"),new Et([this,"strokeColor"],"线颜色",Ct.defaults.strokeStyle.color),new ut([this,"strokeMaterial"],"线材质",Ct.defaults.strokeStyle.material),new K([this,"strokeMaterialParams"],"线材质参数",Ct.defaults.strokeStyle.materialParams),new rt([],"面样式集合"),new X([this,"filled"],"是否显示",Ct.defaults.filled),new X([this,"fillGround"],"贴地",Ct.defaults.fillStyle.ground),new Et([this,"fillColor"],"填充颜色",Ct.defaults.fillStyle.color),new ut([this,"fillMaterial"],"填充材质",Ct.defaults.fillStyle.material),new K([this,"fillMaterialParams"],"填充材质参数",Ct.defaults.fillStyle.materialParams)],more:[...t.more,new rt([],"标注文本样式"),new ut([this,"textFontFamily"],"字体",Ct.defaults.textStyle.fontFamily),new rt([],"通用"),new ls([this,"loadFuncStr"],"loadFnStr",wy,MS,!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}};d(Ct,"createDefaultProps",()=>({...Rt.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:RS,stroked:!0,strokeStyle:dt({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:dt({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:dt({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:dt({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"})),d(Ct,"type",Ct.register("ESGeoJson",Ct,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"})),d(Ct,"strokeStyleWidthTypes",[["screen","screen"],["world","world"]]);let dl=Ct;const To=class To extends wt{constructor(t){super(t);d(this,"editingBindMode","doublePoints");d(this,"_height",this.disposeVar(B(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}};d(To,"createDefaultProps",()=>({...wt.createDefaultProps(),stroked:!0,strokeStyle:dt({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(To,"type",To.register("ESHeightMeasurement",To,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),d(To,"supportEditingModes",[...wt.supportEditingModes,Q.DoublePointsAppend,Q.DoublePointsModify]);let Pf=To;const Ya=class Ya extends Ji{constructor(t){super(t);d(this,"_area",this.dv(B(0)));d(this,"_perimeter",this.dv(B(0)));d(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 Kv([...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 O([this,"radius"],"圆半径",1,!0)],coordinate:[...t.coordinate,new X([this,"editing"],"是否编辑"),new Xo([this,"position"],"三维坐标",[0,0,0],!0),new O([this,"area"],"面积",0,!1,!0),new O([this,"perimeter"],"周长",0,!1,!0)]}}};d(Ya,"createDefaultProps",()=>({...Ji.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:dt({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),d(Ya,"type",Ya.register("ESLocalCircle",Ya,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let If=Ya;const Ja=class Ja extends Ji{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new Pg([this,"points"],"坐标",[])]}}};d(Ja,"createDefaultProps",()=>({...Ji.createDefaultProps(),points:Wd([]),filled:!0})),d(Ja,"type",Ja.register("ESLocalPolygon",Ja,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let fl=Ja;const Za=class Za extends Na{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new Fh([this,"points"],"本地位置数组")]}}};d(Za,"createDefaultProps",()=>({...Na.createDefaultProps(),points:bl(void 0),filled:!0})),d(Za,"type",Za.register("ESLocalPolygonZ",Za,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let xf=Za;const Ka=class Ka extends Ji{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new O([this,"width"],"宽度"),new O([this,"height"],"高度")]}}};d(Ka,"createDefaultProps",()=>({...Ji.createDefaultProps(),width:5e5,height:3e5,filled:!0})),d(Ka,"type",Ka.register("ESLocalRectangle",Ka,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let Tf=Ka;const Si=class Si extends wt{constructor(t){super(t);d(this,"editingBindMode","lineString");d(this,"_distance",this.dv(B(0)));d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const n=()=>{if(this.points&&this.points.length>=2){const i=ul(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 O([this,"height"],"高度",10),new O([this,"width"],"宽度",10),new mt([this,"materialMode"],Si.materialModes,"模式",Si.defaults.materialMode)],coordinate:[...t.coordinate,new O([this,"distance"],"距离",0,!1,!0)]}}};d(Si,"createDefaultProps",()=>({...wt.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:dt({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),d(Si,"type",Si.register("ESPipeFence",Si,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),d(Si,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),d(Si,"supportEditingModes",[...wt.supportEditingModes,Q.LineStringAppend,Q.LineStringInsert]);let jc=Si;const $i=class $i extends mr{constructor(t){super(t);d(this,"_setLayerVisibleEvent",this.dv(new I));d(this,"_setLayerColorEvent",this.dv(new I))}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 rt([],"ESPipeserTileset"),new it(["string","string"],(n,i)=>this.setLayerVisible(n,i),["",""],"setLayerVisible"),new it(["string","string"],(n,i)=>this.setLayerColor(n,i),["",""],"setLayerColor"),new mt([this,"colorMode"],$i.colorModes,"colorMode",$i.defaults.colorMode,!0)]}}};d($i,"createDefaultProps",()=>({...mr.createDefaultProps(),colorMode:"default"})),d($i,"type",$i.register("ESPipeserTileset",$i,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),d($i,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let Nf=$i;const ts=class ts extends wt{constructor(t){super(t);d(this,"editingBindMode","circular")}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",coordinate:[...t.coordinate,new O([this,"area"],"面积",0,!1,!0),new O([this,"perimeter"],"周长",0,!1,!0)],basic:[...t.basic,new O([this,"height"],"高度",10),new mt([this,"materialMode"],ts.materialModes,"模式","danger")]}}};d(ts,"createDefaultProps",()=>({...wt.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),d(ts,"type",ts.register("ESPolygonFence",ts,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),d(ts,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),d(ts,"supportEditingModes",[...wt.supportEditingModes,Q.CircularAppend,Q.CircularInsert,Q.HeightModify]);let zc=ts;const Ls=class Ls extends wt{constructor(t){super(t);d(this,"_deprecated",["ground"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());d(this,"editingBindMode","doublePoints")}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new rt([],"通用","通用"),new X([this,"ground"],"是否贴地"),new X([this,"outlineTranslucent"],"轮廓线半透明"),new O([this,"height"],"高度"),new O([this,"extrudedHeight"],"拉伸高度"),new br([this,"rectangle"],"范围",Ls.defaults.rectangle,!0),new O([this,"stRotation"],"纹理旋转角度"),new O([this,"rotation"],"旋转角度"),new X([this,"pointEditing"],"是否单点编辑")]}}};d(Ls,"createDefaultProps",()=>({...wt.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:Ht(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),d(Ls,"type",Ls.register("ESRectangle",Ls,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),d(Ls,"supportEditingModes",[...wt.supportEditingModes,Q.DoublePointsAppend,Q.DoublePointsModify]);let Of=Ls;const Qa=class Qa extends At{getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new K([this,"innerRings"],"裁切多边形数组",[],void 0,!0)]}}};d(Qa,"createDefaultProps",()=>({...At.createDefaultProps(),innerRings:wp([])})),d(Qa,"type",Qa.register("ESPolygonWithHole",Qa,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let Df=Qa;const As=class As extends At{constructor(t){super(t);d(this,"_startEvent",this.disposeVar(new I));d(this,"_stopEvent",this.dv(new I));d(this,"_surfaceArea",this.disposeVar(B(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 rt([],"表面积测量","表面积测量"),new it([],()=>this.start(),[],"开始计算"),new O([this,"interpolation"],"插值距离",As.defaults.interpolation),new O([this,"offsetHeight"],"偏移高度",As.defaults.offsetHeight)]}}};d(As,"createDefaultProps",()=>({...At.createDefaultProps(),interpolation:.5,offsetHeight:0,units:at(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:dt({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),d(As,"type",As.register("ESSurfaceAreaMeasurement",As,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let Mf=As;const Fs=class Fs extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new O([this,"downloadProgress"],"下载进度",Fs.defaults.downloadProgress,!0,!0),new K([this,"importOptions"],"导入参数",Fs.defaults.importOptions,void 0,!0)],dataSource:[...e.dataSource,new K([this,"url"],"路径")]}}};d(Fs,"createDefaultProps",()=>({...tt.createDefaultProps(),url:"",importOptions:jt({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),d(Fs,"type",Fs.register("ESDatasmithRuntimeModel",Fs,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let Rf=Fs;const cn=class cn extends fl{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",cn.defaults.waterType),new O([this,"frequency"],"频率",cn.defaults.frequency),new Me([this,"amplitude"],.01,[0,1],"振幅",cn.defaults.amplitude),new Me([this,"flowDirection"],1,[0,360],"流向",cn.defaults.flowDirection),new Me([this,"waveVelocity"],.01,[0,1],"波动频率",cn.defaults.waveVelocity),new Me([this,"specularIntensity"],.01,[0,1],"镜面反射强度",cn.defaults.specularIntensity),new Me([this,"murkiness"],.1,[0,10],"水体浑浊度",cn.defaults.murkiness),new O([this,"flowSpeed"],"水流速度",cn.defaults.flowSpeed),new Et([this,"waterColor"],"水的底色",cn.defaults.waterColor),new K([this,"waterImage"],"水的图片",cn.defaults.waterImage)]}}};d(cn,"createDefaultProps",()=>({...fl.createDefaultProps(),allowPicking:!0,waterImage:jt(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),d(cn,"type",cn.register("ESDynamicWater",cn,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let Lf=cn;const hn=class hn extends At{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new mt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",hn.defaults.waterType),new O([this,"frequency"],"频率",hn.defaults.frequency),new Me([this,"amplitude"],.01,[0,1],"振幅",hn.defaults.amplitude),new Me([this,"flowDirection"],1,[0,360],"流向",hn.defaults.flowDirection),new Me([this,"waveVelocity"],.01,[0,1],"波动频率",hn.defaults.waveVelocity),new Me([this,"specularIntensity"],.01,[0,1],"镜面反射强度",hn.defaults.specularIntensity),new Me([this,"murkiness"],.1,[0,10],"水体浑浊度",hn.defaults.murkiness),new O([this,"flowSpeed"],"水流速度",hn.defaults.flowSpeed),new Et([this,"waterColor"],"水的底色",hn.defaults.waterColor),new K([this,"waterImage"],"水的图片",hn.defaults.waterImage)]}}};d(hn,"createDefaultProps",()=>({...At.createDefaultProps(),allowPicking:!0,waterImage:jt({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),d(hn,"type",hn.register("ESGeoWater",hn,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let Af=hn;const No=class No extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new O([this,"downloadProgress"],"下载进度",No.defaults.downloadProgress,!0,!0),new ut([this,"levelName"],"levelName",""),new O([this,"levelLoadDistance"],"levelLoadDistance",1e3),new Qe([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...e.dataSource,new K([this,"url"],"url","")]}}};d(No,"createDefaultProps",()=>({...tt.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:at([0,0,0]),levelLoadDistance:1e3})),d(No,"type",No.register("ESLevelRuntimeModel",No,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let Ff=No;const Zn=class Zn extends Zi{constructor(t){super(t);d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new O([this,"radius"],"半径",Zn.defaults.radius),new O([this,"sides"],"圆边数",Zn.defaults.sides),new O([this,"speed"],"材质速度",Zn.defaults.speed),new mt([this,"materialMode"],Zn.materialModes,"材质模式",Zn.defaults.materialMode),new K([this,"materialImage"],"材质图片和重复度",Zn.defaults.materialImage)]}}};d(Zn,"createDefaultProps",()=>({...Zi.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:dt({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:dt({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),d(Zn,"type",Zn.register("ESPipeline",Zn,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),d(Zn,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let kf=Zn;const bi=class bi extends wt{constructor(t){super(t);d(this,"editingBindMode","visibility")}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Et([this,"visibleColor"],"可视区域颜色",bi.defaults.visibleColor),new Et([this,"invisibleColor"],"遮挡区域颜色",bi.defaults.invisibleColor),new O([this,"heightOffset"],"视点高度偏移",bi.defaults.heightOffset)]}}};d(bi,"createDefaultProps",()=>({...wt.createDefaultProps(),visibleColor:at([0,1,0,1]),invisibleColor:at([1,0,0,1]),heightOffset:0})),d(bi,"type",bi.register("ESVisibilityAnalysis",bi,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),d(bi,"supportEditingModes",[...wt.supportEditingModes,Q.VisibilityAppend,Q.VisibilityModify]);let Vf=bi;const $a=class $a extends At{constructor(t){super(t);d(this,"_startEvent",this.dv(new I));d(this,"_clearEvent",this.dv(new I));d(this,"_volume",this.disposeVar(B(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 rt([],"通用","通用"),new O([this,"planeHeight"],"基准面高程",void 0,!0),new O([this,"gridWidth"],"采样间距 m"),new O([this,"cutVolume"],"挖方",0,!1,!0),new O([this,"fillVolume"],"填方",0,!1,!0),new O([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new O([this,"progress"],"计算进度",0,!1,!0),new it([],()=>this.start(),[],"开始分析"),new it([],()=>this.clear(),[],"清空分析结果"),new X([this,"depthTest"],"是否开启深度检测")]}}};d($a,"createDefaultProps",()=>({...At.createDefaultProps(),planeHeight:B(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:dt({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d($a,"type",$a.register("ESVolumeMeasurement",$a,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let Bf=$a;const tu=class tu extends po{constructor(t){super(t);d(this,"_human",this.dv(new po));d(this,"_poi",this.dv(new hl));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._poi));{const{_human:n,_poi:i}=this;this.d(j([n,"show"],[this,"show"])),this.d(j([i,"show"],[this,"show"])),this.d(j([n,"allowPicking"],[this,"allowPicking"])),this.d(j([i,"allowPicking"],[this,"allowPicking"])),this.d($([n,"scale"],[this,"scale"])),this.d($([i,"scale"],[this,"scale"])),this.d(j([n,"collision"],[this,"collision"])),this.d(j([i,"collision"],[this,"collision"])),this.d($([n,"flyInParam"],[this,"flyInParam"])),this.d($([n,"flyToParam"],[this,"flyToParam"])),this.d(j([n,"animation"],[this,"animation"])),this.d(j([n,"mode"],[this,"mode"])),this.d(j([n,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(j([n,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(j([i,"name"],[this,"name"])),this.d(j([i,"mode"],[this,"poiMode"])),this.d(j([i,"autoAnchor"],[this,"autoAnchor"])),this.d(j([i,"screenRender"],[this,"screenRender"])),this.d(j([i,"size"],[this,"size"])),this.d(j([i,"anchor"],[this,"anchor"])),this.d(j([i,"sizeByContent"],[this,"sizeByContent"])),this.d(j([i,"renderMode"],[this,"renderMode"])),this.d(j([i,"rotationType"],[this,"rotationType"])),this.d(j([i,"zOrder"],[this,"zOrder"])),this.d(j([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(j([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d($([n,"position"],[this,"position"])),this.d($([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,u)=>{n.smoothMoveOnGround(s,o,a,u)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,u,l)=>{n.smoothMoveWithRotationOnGround(s,o,a,u,l)})),this.d(this.automaticLandingEvent.don(()=>{n.automaticLanding()}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new mt([this,"poiMode"],hl.modes,"poi模式","SquareH01"),new O([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};d(tu,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:dt({}),autoAnchor:!0,screenRender:!0,size:at([100,100]),anchor:at([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...po.createDefaultProps()})),d(tu,"type",tu.register("ESHumanPoi",tu,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let jf=tu;const Kr=class Kr extends At{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new O([this,"depth"],"深度",Kr.defaults.depth),new O([this,"interpolation"],"插值",Kr.defaults.interpolation),new O([this,"opacity"],"透明度",Kr.defaults.opacity),new K([this,"sideImage"],"侧面图片",Kr.defaults.sideImage),new K([this,"bottomImage"],"底面图片",Kr.defaults.bottomImage)]}}};d(Kr,"createDefaultProps",()=>({...At.createDefaultProps(),depth:100,sideImage:dt({url:Z.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:dt({url:Z.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})),d(Kr,"type",Kr.register("ESPit",Kr,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let Da=Kr;const eu=class eu extends Da{constructor(t){super(t);d(this,"_excavate",this.dv(new cl));d(this,"_pit",this.dv(new Da));this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit,!0));{const{_excavate:n,_pit:i}=this;this.d(j([n,"show"],[this,"show"])),this.d(j([i,"show"],[this,"show"])),this.d(j([n,"allowPicking"],[this,"allowPicking"])),this.d(j([i,"allowPicking"],[this,"allowPicking"])),this.d(j([n,"collision"],[this,"collision"])),this.d(j([i,"collision"],[this,"collision"])),this.d($([i,"points"],[this,"points"])),this.d(j([n,"points"],[this,"points"])),this.d(j([i,"pointed"],[this,"pointed"])),this.d(j([n,"pointed"],[this,"pointed"])),this.d(j([i,"pointStyle"],[this,"pointStyle"])),this.d(j([n,"pointStyle"],[this,"pointStyle"])),this.d(j([i,"stroked"],[this,"stroked"])),this.d(j([n,"stroked"],[this,"stroked"])),this.d(j([i,"strokeStyle"],[this,"strokeStyle"])),this.d(j([n,"strokeStyle"],[this,"strokeStyle"])),this.d(j([i,"filled"],[this,"filled"])),this.d(j([i,"fillStyle"],[this,"fillStyle"])),this.d(j([n,"fillStyle"],[this,"fillStyle"])),this.d(j([n,"mode"],[this,"mode"])),this.d(j([n,"targetID"],[this,"targetID"])),this.d(j([i,"depth"],[this,"depth"])),this.d(j([i,"sideImage"],[this,"sideImage"])),this.d(j([i,"bottomImage"],[this,"bottomImage"])),this.d(j([i,"opacity"],[this,"opacity"])),this.d(j([i,"interpolation"],[this,"interpolation"])),this.d($([i,"flyInParam"],[this,"flyInParam"])),this.d($([i,"flyToParam"],[this,"flyToParam"])),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 mt([this,"mode"],cl.modes,"模式","in"),new ut([this,"targetID"],"瓦片图层","")]}}};d(eu,"createDefaultProps",()=>({...Da.createDefaultProps(),mode:"in",targetID:""})),d(eu,"type",eu.register("ESHole",eu,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let zf=eu;const Uf={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},LS=async(r,e,t,n)=>{try{const i=window.localStorage.getItem("Authorization");let s=r+`${Uf.layerconfigfind}?tileServiceName=${e}`;t&&(s+=`&earthdstoken=${encodeURIComponent(n)}`);const o={headers:{...!t&&i?{Authorization:i}:{}},mode:"cors"},u=await(await fetch(s,o)).text();return JSON.parse(u)}catch(i){console.error(i)}},AS=async(r,e,t,n,i)=>{try{const s=window.localStorage.getItem("Authorization");let o=r+Uf.layerconfigsave;const a=i??{};t&&(o+=`?earthdstoken=${encodeURIComponent(n)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!t&&s?{Authorization:s}:{}},mode:"cors",body:JSON.stringify({tileServiceName:e,layerConfig:JSON.stringify(a)})},c=await(await fetch(o,u)).text();return JSON.parse(c)}catch(s){console.error(s)}},FS=async(r,e,t)=>{try{const n=window.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(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(n){console.error(n)}},kS=async(r,e,t,n,i)=>{try{const s={tileServiceName:e,featureId:t},o=window.localStorage.getItem("Authorization");let a=r+Uf.featureproperty;n&&(a+=`?earthdstoken=${encodeURIComponent(i)}`);const l=await(await fetch(a,{method:"post",headers:{"Content-Type":"application/json",...!n&&o?{Authorization:o}:{}},body:JSON.stringify(s),mode:"cors"})).text(),c=JSON.parse(l);if(c.status=="ok")return c.data;console.error(c.data.status);return}catch(s){console.error(s)}},nu=class nu extends mr{constructor(t){super(t);d(this,"_es3DTileset",this.dv(new mr));d(this,"_ids",this.dv(dt([])));d(this,"_useEarthDSToken",this.dv(B(!1)));d(this,"_earthdstoken",this.dv(B("")));d(this,"_visJson",this.disposeVar(B({})));d(this,"_highlightInner3DtilesetEvent",this.dv(new I));d(this,"_removeHighlightInner3DtilesetEvent",this.dv(new I));d(this,"_tilesetServePort",this.dv(B("")));{const n=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const n=this._es3DTileset;this.d(j([n,"allowPicking"],[this,"allowPicking"])),this.d(j([n,"collision"],[this,"collision"])),this.d($([n,"flyToParam"],[this,"flyToParam"])),this.d($([n,"flyToParam"],[this,"flyToParam"])),this.d(j([n,"actorTag"],[this,"actorTag"])),this.d(j([n,"materialMode"],[this,"materialMode"])),this.d(j([n,"highlight"],[this,"highlight"])),this.d(j([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(j([n,"highlightID"],[this,"highlightID"])),this.d(j([n,"highlightColor"],[this,"highlightColor"])),this.d($([n,"offset"],[this,"offset"])),this.d($([n,"rotation"],[this,"rotation"])),this.d(j([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(j([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(j([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(j([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(j([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(j([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(j([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(j([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(j([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(j([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(j([n,"cacheBytes"],[this,"cacheBytes"])),this.d(j([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(j([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(j([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(j([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(j([n,"materialParams"],[this,"materialParams"])),this.d($([n,"supportEdit"],[this,"supportEdit"])),this.d($([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d($([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d($([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d($([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d($([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d($([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 useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(t){this._useEarthDSToken.value=t}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(t){this._earthdstoken.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)}async getFeatureProperty(t){return await kS(this.baseUrl,this.tileServiceName,t,this.useEarthDSToken,this.earthdstoken)}async getLayerConfig(){const t=await LS(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken);return!t||!Array.isArray(t)?this.layerConfig=[]:this.layerConfig=t,this.layerConfig}async saveLayerConfig(){const t=this.layerConfig;return await AS(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,t)}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,u,l;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:(u=i==null?void 0:i.tilesetPickInfo)==null?void 0:u.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(t){this._tilesetServePort.value=t}async getport(){const t=await FS(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=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],n=+new Date;if(t){const s=this.tileServiceIp,o=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${n}`}console.log("3dtileset url:",this._es3DTileset.url)}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(){var t;if(this.url&&typeof this.url=="string"){const n=(t=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:t[1];if(!n)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return n}else throw new Error("服务地址不合法,tileServiceName 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/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 K([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};d(nu,"createDefaultProps",()=>({...mr.createDefaultProps(),layerConfig:jt([])})),d(nu,"type",nu.register("ESRtsTileset",nu,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Gf=nu;function VS(r){return typeof r=="number"&&!isNaN(r)}const ru=class ru 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){this.featureId=t;const n=await e.getFeatureProperty(t);this.uiShowprops=n.allFields.map(o=>({featureClassName:o.featureClassName,fields:o.fields.map(a=>({key:a.name,type:a.type,value:a.type!="Double"?a.value:VS(a.value)?Number(a.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 i=e.tileServiceIp,s=e.tilesetServePort;if(!s)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${i}:${s}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(o=>{o.assign({sceneObject:e}),e.pickedEvent.emit(o)})),this.d(()=>{this.editing=!1,e.removeHighlightDSFeature(this)})}constructor(e){super(e)}};d(ru,"createDefaultProps",()=>({...mr.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:dt({}),changeMaterial:jt(void 0),uiShowprops:dt({}),props:dt({})})),d(ru,"type",ru.register("ESRtsFeatureEditing",ru,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Wf=ru;const BS=async(r,e,t)=>{try{const n=window.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(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(n){console.error(n)}},El=class El extends mr{constructor(t){super(t);d(this,"_es3DTileset",this.dv(new mr));d(this,"_tilesetServePort",this.dv(B("")));d(this,"_useEarthDSToken",this.dv(B(!1)));d(this,"_earthdstoken",this.dv(B("")));{const n=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const n=this._es3DTileset;this.d(j([n,"allowPicking"],[this,"allowPicking"])),this.d(j([n,"collision"],[this,"collision"])),this.d($([n,"flyToParam"],[this,"flyToParam"])),this.d($([n,"flyToParam"],[this,"flyToParam"])),this.d(j([n,"actorTag"],[this,"actorTag"])),this.d(j([n,"materialMode"],[this,"materialMode"])),this.d(j([n,"highlight"],[this,"highlight"])),this.d(j([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(j([n,"highlightID"],[this,"highlightID"])),this.d(j([n,"highlightColor"],[this,"highlightColor"])),this.d($([n,"offset"],[this,"offset"])),this.d($([n,"rotation"],[this,"rotation"])),this.d(j([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(j([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(j([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(j([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(j([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(j([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(j([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(j([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(j([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(j([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(j([n,"cacheBytes"],[this,"cacheBytes"])),this.d(j([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(j([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(j([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(j([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(j([n,"materialParams"],[this,"materialParams"])),this.d($([n,"supportEdit"],[this,"supportEdit"])),this.d($([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d($([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d($([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d($([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d($([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d($([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.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 tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(t){this._tilesetServePort.value=t}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(t){this._useEarthDSToken.value=t}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(t){this._earthdstoken.value=t}async getport(){const t=await BS(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=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],n=+new Date;if(t){const s=this.tileServiceIp,o=await this.getport();this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${n}`}console.log("3dtileset url:",this._es3DTileset.url)}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(){var t;if(this.url&&typeof this.url=="string"){const n=(t=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:t[1];if(!n)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return n}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}};d(El,"type",El.register("ESMsTileset",El,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let qf=El;const Ey={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:`
|
|
355
355
|
## 参数类型为 ESPoiType[]
|
|
356
356
|
\`\`\`js
|
|
357
357
|
type Vector2D = [number, number]
|
|
@@ -364,7 +364,7 @@ ${dg}
|
|
|
364
364
|
hiddenDistance: number
|
|
365
365
|
}
|
|
366
366
|
\`\`\`
|
|
367
|
-
`},Us=class Us extends bt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new $([],"通用"),new H([this,"url"],"路径"),new H([this,"poiTypes"],Us.defaults.poiTypes,pg.sampleValue),new T([this,"heightOffset"])]}}};f(Us,"createDefaultProps",()=>({...bt.createDefaultProps(),url:"",poiTypes:p.reactJsonWithUndefined(pg.defaultValue),heightOffset:40})),f(Us,"type",Us.register("ESPoiTileset",Us,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let kh=Us;const oa=class oa extends j{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new $([],"通用","通用"),new W([this,"show"],"是否显示"),new lt([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new ce([this,"cssPosition"],"位置")]}}};f(oa,"createDefaultProps",()=>({...j.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),f(oa,"type",oa.register("ESScale",oa,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Vh=oa;const Qn=class Qn extends Tt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new T([this,"height"],"高度",Qn.defaults.height,!0),new T([this,"extrudedHeight"],"拉伸高度",Qn.defaults.extrudedHeight,!0),new W([this,"perPositionHeight"],"应用每个位置高度",Qn.defaults.perPositionHeight,!0)]}}};f(Qn,"createDefaultProps",()=>({...Tt.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),f(Qn,"type",Qn.register("ESGeoExtrudedPolygon",Qn,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),f(Qn,"supportEditingModes",[...Tt.supportEditingModes,B.HeightModify]);let bs=Qn;const Gs=class Gs extends Tt{constructor(e){super(e);f(this,"_classification",this.dv(new ol));f(this,"_geoExtrudedPolygon",this.dv(new bs));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:r,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([i,"points"],[this,"points"])),this.d(p.bind([i,"extrudedHeight"],[this,"height"])),this.d(p.bind([r,"fillColor"],[this,"overheightColor"])),this.d(p.bind([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:a,maxHeight:u}=this;if(!a)return;const l=a.map(c=>[c[0],c[1],o]);r.points=l,r.height=u-o,u-o<=0?r.show=!1:r.show=this.show&&this.filled};s(),this.d(Hs([this.heightChanged,this.pointsChanged,this.maxHeightChanged],s))}{const s=()=>{const{show:o,filled:a}=this;r.show=o&&a,i.show=o&&a};s(),this.d(Hs([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 e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new T([this,"height"],"高度",10),new T([this,"maxHeight"],"最高高度",200),new gt([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new gt([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};f(Gs,"createDefaultProps",()=>({...Tt.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),f(Gs,"type",Gs.register("ESHeightLimitAnalysis",Gs,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),f(Gs,"supportEditingModes",[...Tt.supportEditingModes,B.HeightModify]);let zh=Gs;const xn=class xn extends bt{constructor(e){super(e);f(this,"_widgetEvent",this.dv(new V));f(this,"_data",this.dv(p.react(void 0)));{const r=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:Ml(this.url)?this.data=JSON.parse(this.url):fetch(j.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};r(),this.d(this.urlChanged.don(r))}}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 H([this,"url"],"地址",xn.defaults.url),new T([this,"pixelRange"],"集合范围",xn.defaults.pixelRange),new T([this,"minimumClusterSize"],"最小数量",xn.defaults.minimumClusterSize),new lt([this,"heightReference"],[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","None")],more:[...e.more,new H([this,"style"],"style",xn.defaults.style),new W([this,"perspective"],"透视效果",xn.defaults.perspective)]}}};f(xn,"createDefaultProps",()=>({...bt.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:p.reactJsonWithUndefined({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"None",perspective:!1})),f(xn,"type",xn.register("ESEntityCluster",xn,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let Uh=xn;class nu extends q{constructor(){super();f(this,"_player",this.disposeVar(new nn));const e=this._player;{const r=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};r(),this.d(this.startTimeChanged.don(r)),this.d(this.stopTimeChanged.don(r))}this.d(p.bind([e,"playing"],[this,"playing"])),this.d(p.bind([e,"loop"],[this,"loop"])),this.d(p.bind([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 r=this.currentTime-this.startTime;e.currentTime=p.clamp(r,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=()=>({...j.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(nu||(nu={})),p.extendClassProps(nu.prototype,nu.createDefaultProps);const aa=class aa extends j{constructor(e){super(e);f(this,"_absolutePlayer",this.dv(new nu));const r=this.absolutePlayer;this.d(p.bind([r,"currentTime"],[this,"currentTime"])),this.d(p.bind([r,"startTime"],[this,"startTime"])),this.d(p.bind([r,"stopTime"],[this,"stopTime"])),this.d(p.bind([r,"playing"],[this,"playing"])),this.d(p.bind([r,"loop"],[this,"loop"])),this.d(p.bind([r,"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 hu([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new ss([this,"currentTime"],"currentTime"),new ss([this,"startTime"]),new ss([this,"stopTime"]),new W([this,"playing"]),new W([this,"loop"]),new T([this,"speed"])]}}};f(aa,"createDefaultProps",()=>({...j.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),f(aa,"type",aa.register("ESPlayer",aa,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let Ao=aa;function gg(n,t=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=e.length;if(r===0)return e;if(r===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=1;i<r;++i){if(e[i][2]!==void 0&&!t)continue;const s=e[i-1][1],o=e[i][1],a=Mn(s),u=Mn(o),l=p.Vector.distance(a,u);if(l===0){e[i][2]=e[i-1][2];continue}const c=Ia(s,o),h=o[2]-s[2],d=Math.asin(h/l)*180/Math.PI,g=Number.isFinite(c)?c:0,v=Number.isFinite(d)?d:0;e[i][2]=[g,v,0]}return(e[0][2]===void 0||t)&&(e[0][2]=r>1?e[1][2]:void 0),e}function mg(n,t=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=e.length;if(r===0)return e;if(r===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=r-2;i>=0;--i){if(e[i][2]!==void 0&&!t)continue;const s=e[i][1],o=e[i+1][1],a=Mn(s),u=Mn(o),l=p.Vector.distance(a,u);if(l===0){e[i][2]=e[i+1][2];continue}const c=Ia(s,o),h=o[2]-s[2],d=Math.asin(h/l)*180/Math.PI,g=Number.isFinite(c)?c:0,v=Number.isFinite(d)?d:0;e[i][2]=[g,v,0]}return(e[r-1][2]===void 0||t)&&(e[r-1][2]=r>1?e[r-2][2]:[0,0,0]),e}function f0(n,t=!1){const e=gg(n,t),r=mg(n,t);if(e.length!==r.length)throw new Error("p.length !== n.length");const i=e.length;for(let s=0;s<i;s++){const o=e[s][2],a=r[s][2];o===void 0&&a===void 0?e[s][2]=void 0:o===void 0?e[s][2]=a:a===void 0?e[s][2]=o:e[s][2]=Dl(o,a,.5)}return e}function d0(n,t,e){let i;if(!n.timePosRots)return;const s=[],o=n.timePosRots.length;if(!(o<=2)){s.push(n.timePosRots[0]);for(let a=1;a<o-1;++a){const u=n.timePosRots[a-1][0],l=n.timePosRots[a][0],c=n.timePosRots[a+1][0],h=n.accumDistances[a-1],d=n.accumDistances[a],g=n.accumDistances[a+1],v=d-h;if(v!==0){const C=v-(i??(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5);let b=(C<0?0:C)/v;Number.isNaN(b)&&(b=0);const m=(1-b)*u+b*l,y=n.getCurrent(m);y&&s.push([m,y.position,y.rotation])}e&&s.push(n.timePosRots[a]);const E=g-d;if(E!==0){let C=(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5;const b=(t.length==1?t[0]:t[a]||t[t.length-1])*.5||0;C+b>E?(C=E*(C/(C+b)),i=E-C):i=void 0;let m=(C<0?0:C)/E;Number.isNaN(m)&&(m=0);const y=(1-m)*l+m*c,_=n.getCurrent(y);_&&s.push([y,_.position,_.rotation])}}s.push(n.timePosRots[o-1]),n.timePosRots=s}}function vg(n,t){if(t<0)return[void 0,0];if(t>n.length-1)return[void 0,n.length-1];const e=[...n].slice(0,t+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(e===-1)return[void 0,0];const r=t-e;return[n[r][2],r]}function yg(n,t){if(t<0)return[void 0,0];if(t>=n.length)return[void 0,n.length-1];const e=n.slice(t).findIndex(([,,i])=>i!==void 0),r=e===-1?n.length-1:t+e;return[n[r][2],r]}function p0(n,t,e="Lerp"){let r,i,s,o;if(n.length!==0){if(t<=n[0][0])r=n[0][1],i=n[0][2],s=0,o=0;else if(t>=n[n.length-1][0]){const[u,l,c]=n[n.length-1];r=l,i=c,s=n.length-2,o=1}else{const u=n.findIndex(([l])=>t<=l);if(u===-1)throw new Error("nextIndex === -1");s=u-1;{const[l,c]=n[s],[h,d]=n[u],g=(t-l)/(h-l),v=Dc(c),E=Dc(d),C=p.Vector.lerp(v,E,g);r=Df(C),o=g}{let[l,c]=vg(n,s),[h,d]=yg(n,u);if(e==="Lerp")if(l&&h){if(c<0||d>=n.length)throw new Error("Invalid rotation index");const g=(t-n[c][0])/(n[d][0]-n[c][0]);i=Dl(l,h,g)}else l?i=l:h?i=h:i=void 0;else e==="Prev"?l&&(i=l):e==="Next"&&h&&(i=h)}}return{position:r,rotation:i,index:s,ratio:o}}}function g0(n){try{const t=JSON.parse(n);if(Array.isArray(t)&&t.length>0){const e=typeof t[0][0]=="number",r=Array.isArray(t[0][1])&&t[0][1].length===3;return e&&r?t:void 0}throw new Error("解析有问题")}catch{const e=n.split(/\n|\r\n/),r=[],i=e.length;for(let s=0;s<i;++s){const o=e[s],a=o.split(/[^0-9e\.\+\-]+/).filter(u=>u!=="").map(u=>+u);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?r.push([a[0],[a[1],a[2],a[3]],void 0]):r.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return r}}function m0(n,t,e){const{timePosRots:r}=n;if(!r)throw new Error("!timePosRots");if(r.length===0)throw new Error("timePosRots.length === 0");t=Math.max(t,r[0][0]),e=Math.min(e,r[r.length-1][0]);const i=n.getCurrent(t),s=n.getCurrent(e);if(!i||!s)return;const o=[];i.ratio<1&&o.push([t,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(r[a]);return s.ratio>0&&o.push([e,s.position,s.rotation]),o}const v0=`
|
|
367
|
+
`},Oo=class Oo extends Rt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new rt([],"通用"),new K([this,"url"],"路径"),new K([this,"poiTypes"],Oo.defaults.poiTypes,Ey.sampleValue),new O([this,"heightOffset"])]}}};d(Oo,"createDefaultProps",()=>({...Rt.createDefaultProps(),url:"",poiTypes:jt(Ey.defaultValue),heightOffset:40})),d(Oo,"type",Oo.register("ESPoiTileset",Oo,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let Xf=Oo;const iu=class iu extends Z{getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new rt([],"通用","通用"),new X([this,"show"],"是否显示"),new mt([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new Ie([this,"cssPosition"],"位置")]}}};d(iu,"createDefaultProps",()=>({...Z.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),d(iu,"type",iu.register("ESScale",iu,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Hf=iu;const Pi=class Pi extends At{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new O([this,"height"],"高度",Pi.defaults.height,!0),new O([this,"extrudedHeight"],"拉伸高度",Pi.defaults.extrudedHeight,!0),new X([this,"perPositionHeight"],"应用每个位置高度",Pi.defaults.perPositionHeight,!0)]}}};d(Pi,"createDefaultProps",()=>({...At.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),d(Pi,"type",Pi.register("ESGeoExtrudedPolygon",Pi,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),d(Pi,"supportEditingModes",[...At.supportEditingModes,Q.HeightModify]);let go=Pi;const Do=class Do extends At{constructor(t){super(t);d(this,"_classification",this.dv(new Lc));d(this,"_geoExtrudedPolygon",this.dv(new go));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(j([n,"collision"],[this,"collision"])),this.d(j([i,"collision"],[this,"collision"])),this.d($([i,"flyInParam"],[this,"flyInParam"])),this.d($([i,"flyToParam"],[this,"flyToParam"])),this.d($([i,"points"],[this,"points"])),this.d($([i,"extrudedHeight"],[this,"height"])),this.d($([n,"fillColor"],[this,"overheightColor"])),this.d($([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:a,maxHeight:u}=this;if(!a)return;const l=a.map(c=>[c[0],c[1],o]);n.points=l,n.height=u-o,u-o<=0?n.show=!1:n.show=this.show&&this.filled};s(),this.d(zs([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(zs([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 O([this,"height"],"高度",10),new O([this,"maxHeight"],"最高高度",200),new Et([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new Et([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};d(Do,"createDefaultProps",()=>({...At.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),d(Do,"type",Do.register("ESHeightLimitAnalysis",Do,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),d(Do,"supportEditingModes",[...At.supportEditingModes,Q.HeightModify]);let Yf=Do;const Qr=class Qr extends Rt{constructor(t){super(t);d(this,"_widgetEvent",this.dv(new I));d(this,"_data",this.dv(B(void 0)));{const n=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:Bh(this.url)?this.data=JSON.parse(this.url):fetch(Z.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 K([this,"url"],"地址",Qr.defaults.url),new O([this,"pixelRange"],"集合范围",Qr.defaults.pixelRange),new O([this,"minimumClusterSize"],"最小数量",Qr.defaults.minimumClusterSize),new mt([this,"heightReference"],[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","None")],more:[...t.more,new K([this,"style"],"style",Qr.defaults.style),new X([this,"perspective"],"透视效果",Qr.defaults.perspective)]}}};d(Qr,"createDefaultProps",()=>({...Rt.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:jt({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"None",perspective:!1})),d(Qr,"type",Qr.register("ESEntityCluster",Qr,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let Jf=Qr;class pl extends V{constructor(){super();d(this,"_player",this.disposeVar(new Pr));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($([t,"playing"],[this,"playing"])),this.d($([t,"loop"],[this,"loop"])),this.d($([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=Rl(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=()=>({...Z.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(pl||(pl={})),Oi(pl.prototype,pl.createDefaultProps);const su=class su extends Z{constructor(t){super(t);d(this,"_absolutePlayer",this.dv(new pl));const n=this.absolutePlayer;this.d($([n,"currentTime"],[this,"currentTime"])),this.d($([n,"startTime"],[this,"startTime"])),this.d($([n,"stopTime"],[this,"stopTime"])),this.d($([n,"playing"],[this,"playing"])),this.d($([n,"loop"],[this,"loop"])),this.d($([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 Bl([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new Hs([this,"currentTime"],"currentTime"),new Hs([this,"startTime"]),new Hs([this,"stopTime"]),new X([this,"playing"]),new X([this,"loop"]),new O([this,"speed"])]}}};d(su,"createDefaultProps",()=>({...Z.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),d(su,"type",su.register("ESPlayer",su,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let Ma=su;function Cy(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=ri(s),u=ri(o),l=g.Vector.distance(a,u);if(l===0){t[i][2]=t[i-1][2];continue}const c=Au(s,o),h=o[2]-s[2],f=Math.asin(h/l)*180/Math.PI,p=Number.isFinite(c)?c:0,m=Number.isFinite(f)?f:0;t[i][2]=[p,m,0]}return(t[0][2]===void 0||e)&&(t[0][2]=n>1?t[1][2]:void 0),t}function Sy(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=ri(s),u=ri(o),l=g.Vector.distance(a,u);if(l===0){t[i][2]=t[i+1][2];continue}const c=Au(s,o),h=o[2]-s[2],f=Math.asin(h/l)*180/Math.PI,p=Number.isFinite(c)?c:0,m=Number.isFinite(f)?f:0;t[i][2]=[p,m,0]}return(t[n-1][2]===void 0||e)&&(t[n-1][2]=n>1?t[n-2][2]:[0,0,0]),t}function jS(r,e=!1){const t=Cy(r,e),n=Sy(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]=jh(o,a,.5)}return t}function zS(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 u=r.timePosRots[a-1][0],l=r.timePosRots[a][0],c=r.timePosRots[a+1][0],h=r.accumDistances[a-1],f=r.accumDistances[a],p=r.accumDistances[a+1],m=f-h;if(m!==0){const E=m-(i??(e.length==1?e[0]:e[a-1]||e[e.length-1])*.5);let b=(E<0?0:E)/m;Number.isNaN(b)&&(b=0);const v=(1-b)*u+b*l,y=r.getCurrent(v);y&&s.push([v,y.position,y.rotation])}t&&s.push(r.timePosRots[a]);const w=p-f;if(w!==0){let E=(e.length==1?e[0]:e[a-1]||e[e.length-1])*.5;const b=(e.length==1?e[0]:e[a]||e[e.length-1])*.5||0;E+b>w?(E=w*(E/(E+b)),i=w-E):i=void 0;let v=(E<0?0:E)/w;Number.isNaN(v)&&(v=0);const y=(1-v)*l+v*c,_=r.getCurrent(y);_&&s.push([y,_.position,_.rotation])}}s.push(r.timePosRots[o-1]),r.timePosRots=s}}function by(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 Py(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 US(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[u,l,c]=r[r.length-1];n=l,i=c,s=r.length-2,o=1}else{const u=r.findIndex(([l])=>e<=l);if(u===-1)throw new Error("nextIndex === -1");s=u-1;{const[l,c]=r[s],[h,f]=r[u],p=(e-l)/(h-l),m=jd(c),w=jd(f),E=g.Vector.lerp(m,w,p);n=jg(E),o=p}{let[l,c]=by(r,s),[h,f]=Py(r,u);if(t==="Lerp")if(l&&h){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=jh(l,h,p)}else l?i=l:h?i=h:i=void 0;else t==="Prev"?l&&(i=l):t==="Next"&&h&&(i=h)}}return{position:n,rotation:i,index:s,ratio:o}}}function GS(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(u=>u!=="").map(u=>+u);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 WS(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 qS=`
|
|
368
368
|
timePosRots是一个内部包含三个元素的数组,第一个表示时间戳,单位毫秒,第二个表示经纬度,第三个表示姿态(偏航、俯仰、翻转)。示例代码如下:
|
|
369
369
|
\`\`\`
|
|
370
370
|
[
|
|
@@ -409,7 +409,7 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
409
409
|
]
|
|
410
410
|
]
|
|
411
411
|
\`\`\`
|
|
412
|
-
`,ir=class ir extends q{constructor(e,r){super();f(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});f(this,"_currentInfo",this.disposeVar(p.react(void 0,(e,r)=>!1)));f(this,"_player");f(this,"_flyToEvent",this.disposeVar(new V));f(this,"_accumDistancesChanged",this.disposeVar(new V));f(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));f(this,"_accumDistancesDirty",!1);f(this,"_accumDistances",[]);f(this,"_getCurrentFunc",this.disposeVar(p.react(void 0)));this._player=this.disposeVar(new nn);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:u,ratio:l}=s;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=a,this._scratchCurrentInfo.rotation=u,this._scratchCurrentInfo.ratio=l,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(p.bind([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(p.bind([this._player,"duration"],[this,"duration"])),this.dispose(p.bind([this._player,"playing"],[this,"playing"])),this.dispose(p.bind([this._player,"speed"],[this,"speed"]));{const s=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};s();const o=this.disposeVar(p.createNextAnimateFrameEvent(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(s))}{const s=()=>{const o=this.timePosRots;if(!o)return;let a=0;const u=o.length;for(let l=0;l<u;++l){const c=o[l][0];if(c<0)console.warn("地理路径的时间戳不能小于0!");else if(c<a){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${l} time: ${c}`);break}}};s(),this.dispose(this.timePosRotsChanged.disposableOn(s))}{const s=this.disposeVar(p.createProcessingFromAsyncFunc(async o=>{if(!this.dataUri)return;await o.promise(p.sleep(1e3));const a=await o.promise(fetch(this.dataUri)),u=await o.promise(a.text());this.timePosRots=ir.parseData(u)}));this.dispose(this.dataUriChanged.disposableOn(()=>{s.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=ir.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 r=0;const i=[];let s=Mn(this.timePosRots[0][1]);i.push(r);for(let o=1;o<e;++o){const a=Mn(this.timePosRots[o][1]),u=p.Vector.distance(a,s);s=a,r+=u,i.push(r)}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&&p0(this.timePosRots,e,this.rotLerpMode)}subPath(e,r){return this.timePosRots&&m0(this,e,r)}computeRotIfUndefinedUsingPrevLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=ir.computeRotIfUndefinedUsingPrevLine(this.timePosRots,e)}computeRotIfUndefinedUsingNextLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=ir.computeRotIfUndefinedUsingNextLine(this.timePosRots,e)}computeRotIfUndefinedUsingLerp(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=ir.computeRotIfUndefinedUsingLerp(this.timePosRots,e)}computeRotIfUndefined(e=!1){this.computeRotIfUndefinedUsingPrevLine(e)}addAroundPoints(e,r){d0(this,e,r)}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}};f(ir,"computeRotIfUndefinedUsingPrevLine",gg),f(ir,"computeRotIfUndefinedUsingNextLine",mg),f(ir,"computeRotIfUndefinedUsingLerp",f0),f(ir,"getLeftRotation",vg),f(ir,"getRightRotation",yg),f(ir,"parseData",g0),f(ir,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),f(ir,"timePosRotsMd",v0);let Bi=ir;(n=>{n.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:p.reactDeepArrayWithUndefined(void 0,(t,e)=>t[0]===e[0]&&t[1].every((r,i)=>r===e[1][i])&&t[2]===e[2]===void 0||t[2]!==void 0&&e[2]!==void 0&&t[2].every((r,i)=>e[2][i]),t=>[t[0],[...t[1]],t[2]&&[...t[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:p.reactArray([1,1,1,1]),hasDash:!1,gapColor:p.reactArray([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(Bi||(Bi={})),p.extendClassProps(Bi.prototype,Bi.createDefaultProps);const ua=class ua extends yi{constructor(e){super(e);f(this,"_path");f(this,"_currentPositionChanged",this.disposeVar(new V));f(this,"_currentRotationChanged",this.disposeVar(new V));f(this,"_currentChanged",this.disposeVar(new V));f(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);f(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.strokeStyle={width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1},this._path=this.disposeVar(new Bi),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentRotationChanged.emit(this.currentRotation))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const r=()=>{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),u=[];for(let l=0;l<a;++l)u.push([this.timeStamps[l],this.points[l]]);this._path.timePosRots=u,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.disposeVar(p.createNextAnimateFrameEvent(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));r(),this.dispose(i.disposableOn(r))}}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[Js(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 Ef([this,"timeStamps"],"时间序列",[],!0),new T([this,"speed"],"线条流速",1),new lt([this,"materialMode"],[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]],"模式","singleArrow"),new H([this,"rotationRadius"],"拐弯半径")],more:[...e.more,new Re([this,"currentPosition"],"当前位置",void 0,!0,!0)]}}};f(ua,"createDefaultProps",()=>({...pt.createDefaultProps(),timeStamps:p.reactArrayWithUndefined(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:p.reactJson({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1}),rotationRadius:[5]})),f(ua,"type",ua.register("ESPath",ua,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"}));let Ro=ua;const es=class es extends Z{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new $([]),new W([this,"textEditingInteraction"],"文本编辑交互"),new W([this,"textEditing"],"文本编辑"),new T([this,"width"],"宽度",es.defaults.width,!0),new xl([this,"text"],"内容",es.defaults.text,void 0,!0),new rn([this,"originRatioAndOffset"],"原点比例和偏移"),new T([this,"opacity"],"透明度"),new T([this,"fontSize"],"字体大小"),new gt([this,"color"],"字体颜色"),new gt([this,"backgroundColor"],"背景颜色"),new rn([this,"padding"],"内边距"),new rn([this,"borderRadius"],"边框圆角"),new gt([this,"borderColor"],"边框颜色"),new T([this,"borderWidth"],"边框宽度"),new lt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置"),new lt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};f(es,"createDefaultProps",()=>({...Z.createDefaultProps(),text:"请输入文字",width:80,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:p.reactArray([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:p.reactArray([1,1,1,1]),backgroundColor:p.reactArray([0,0,0,.8]),padding:p.reactArray([5,5,5,5]),borderRadius:p.reactArray([6,6,6,6]),borderWidth:0,borderColor:p.reactArray([1,1,1,1]),borderStyle:"solid"})),f(es,"type",es.register("ESGeoDivTextPoi",es,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"}));let Gh=es;const la=class la extends Z{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new gt([this,"color"],"颜色",[1,1,0,1])]}}};f(la,"createDefaultProps",()=>({...Z.createDefaultProps(),color:p.reactArray([1,1,0,1])})),f(la,"type",la.register("ESCityBasePoint",la,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let Wh=la;const y0=[{id:"document",version:"1.0"},{id:"Vehicle",availability:"2012-08-04T16:00:00Z/2012-08-04T16:14:15.251Z",billboard:{eyeOffset:{cartesian:[0,0,0]},horizontalOrigin:"CENTER",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEISURBVEhLvVXBDYQwDOuojHKj8LhBbpTbpBCEkZsmIVTXq1RVQGrHiWlLmTTqPiZBlyLgy/KSZQ5JSHDQ/mCYCsC8106kDU0AdwRnvYZArWRcAl0dcYJq1hWCb3hBrumbDAVMwAC82WoRvgMnVMDBnB0nYZFTbE6BBvdUGqVqCbjBIk3PyFFR/NU7EKzru+qZsau3ryPwwCRLKYOzutZuCL6fUmWeJGzNzL/RxAMrUmASSCkkAayk2IxPlwhAAYGpsiHQjbLccfdOY5gKkCXAMi7SscAwbQpAnKyctWyUZ6z8ja3OGMepwD8asz+9FnSvbhU8uVOHFIwQsI3/p0CfhuqCSQuxLqsN6mu8SS+N42MAAAAASUVORK5CYII=",pixelOffset:{cartesian2:[0,0]},scale:.8333333333333334,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],verticalOrigin:"BOTTOM"},label:{fillColor:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}],font:"bold 10pt Segoe UI Semibold",horizontalOrigin:"LEFT",outlineColor:{rgba:[0,0,0,255]},pixelOffset:{cartesian2:[10,0]},scale:1,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],style:"FILL",text:"Vehicle",verticalOrigin:"CENTER"},path:{material:{solidColor:{color:{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}}},width:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",number:5}],show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}]},position:{interpolationAlgorithm:"LAGRANGE",interpolationDegree:1,epoch:"2012-08-04T16:00:00Z",cartesian:[0,-23797546637012e-7,-466533288013588e-8,362813368924173e-8,100,-237951008905552e-8,-466541964840452e-8,362818220006795e-8,200,-23795684769522e-7,-46655553441867e-7,362797083323261e-8,300,-237963893786855e-8,-466569163561896e-8,362775082085873e-8,400,-237970929834665e-8,-46658279679646e-7,362753080187124e-8,500,-237983728064915e-8,-46658477494347e-7,362742212874017e-8,600,-237962498289073e-8,-466590750853722e-8,36274841191848e-7,700,-237938612743523e-8,-466602954174431e-8,362748383297459e-8,800,-237914726777171e-8,-466615156669944e-8,36274835403492e-7,900,-237890840390057e-8,-466627358340244e-8,362748324130864e-8,1e3]}}],_0=`第一个packet代表了cesium场景(cesium时间轴的范围,当前时刻,倍速等信息)之外,其他的packet都可以理解为描述某一时间范围内的entity的行为。
|
|
412
|
+
`,Sn=class Sn extends V{constructor(t,n){super();d(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});d(this,"_currentInfo",this.disposeVar(B(void 0,(t,n)=>!1)));d(this,"_player");d(this,"_flyToEvent",this.disposeVar(new I));d(this,"_accumDistancesChanged",this.disposeVar(new I));d(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));d(this,"_accumDistancesDirty",!1);d(this,"_accumDistances",[]);d(this,"_getCurrentFunc",this.disposeVar(B(void 0)));this._player=this.disposeVar(new Pr);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:u,ratio:l}=s;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=a,this._scratchCurrentInfo.rotation=u,this._scratchCurrentInfo.ratio=l,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose($([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($([this._player,"duration"],[this,"duration"])),this.dispose($([this._player,"playing"],[this,"playing"])),this.dispose($([this._player,"speed"],[this,"speed"]));{const s=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};s();const o=this.disposeVar(ge(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(s))}{const s=()=>{const o=this.timePosRots;if(!o)return;let a=0;const u=o.length;for(let l=0;l<u;++l){const c=o[l][0];if(c<0)console.warn("地理路径的时间戳不能小于0!");else if(c<a){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${l} time: ${c}`);break}}};s(),this.dispose(this.timePosRotsChanged.disposableOn(s))}{const s=this.disposeVar(Fn(async o=>{if(!this.dataUri)return;await o.promise(Cu(1e3));const a=await o.promise(fetch(this.dataUri)),u=await o.promise(a.text());this.timePosRots=Sn.parseData(u)}));this.dispose(this.dataUriChanged.disposableOn(()=>{s.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=Sn.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=ri(this.timePosRots[0][1]);i.push(n);for(let o=1;o<t;++o){const a=ri(this.timePosRots[o][1]),u=g.Vector.distance(a,s);s=a,n+=u,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&&US(this.timePosRots,t,this.rotLerpMode)}subPath(t,n){return this.timePosRots&&WS(this,t,n)}computeRotIfUndefinedUsingPrevLine(t=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Sn.computeRotIfUndefinedUsingPrevLine(this.timePosRots,t)}computeRotIfUndefinedUsingNextLine(t=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Sn.computeRotIfUndefinedUsingNextLine(this.timePosRots,t)}computeRotIfUndefinedUsingLerp(t=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Sn.computeRotIfUndefinedUsingLerp(this.timePosRots,t)}computeRotIfUndefined(t=!1){this.computeRotIfUndefinedUsingPrevLine(t)}addAroundPoints(t,n){zS(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}};d(Sn,"computeRotIfUndefinedUsingPrevLine",Cy),d(Sn,"computeRotIfUndefinedUsingNextLine",Sy),d(Sn,"computeRotIfUndefinedUsingLerp",jS),d(Sn,"getLeftRotation",by),d(Sn,"getRightRotation",Py),d(Sn,"parseData",GS),d(Sn,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),d(Sn,"timePosRotsMd",qS);let Os=Sn;(r=>{r.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:ss(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:at([1,1,1,1]),hasDash:!1,gapColor:at([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(Os||(Os={})),Oi(Os.prototype,Os.createDefaultProps);const ou=class ou extends Zi{constructor(t){super(t);d(this,"_path");d(this,"_currentPositionChanged",this.dv(new I));d(this,"_currentRotationChanged",this.dv(new I));d(this,"_currentChanged",this.dv(new I));d(this,"_deprecated",[]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.strokeStyle={width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1},this._path=this.dv(new Os),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),u=[];for(let l=0;l<a;++l)u.push([this.timeStamps[l],this.points[l]]);this._path.timePosRots=u,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(ge(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[Ho(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 Og([this,"timeStamps"],"时间序列",[],!0),new O([this,"speed"],"线条流速",1),new mt([this,"materialMode"],[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]],"模式","singleArrow"),new K([this,"rotationRadius"],"拐弯半径")],more:[...t.more,new Qe([this,"currentPosition"],"当前位置",void 0,!0,!0)]}}};d(ou,"createDefaultProps",()=>({...wt.createDefaultProps(),timeStamps:Ht(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:dt({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1}),rotationRadius:[5]})),d(ou,"type",ou.register("ESPath",ou,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"}));let Ra=ou;const ks=class ks extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new rt([]),new X([this,"textEditingInteraction"],"文本编辑交互"),new X([this,"textEditing"],"文本编辑"),new O([this,"width"],"宽度",ks.defaults.width,!0),new kh([this,"text"],"内容",ks.defaults.text,void 0,!0),new br([this,"originRatioAndOffset"],"原点比例和偏移"),new O([this,"opacity"],"透明度"),new O([this,"fontSize"],"字体大小"),new Et([this,"color"],"字体颜色"),new Et([this,"backgroundColor"],"背景颜色"),new br([this,"padding"],"内边距"),new br([this,"borderRadius"],"边框圆角"),new Et([this,"borderColor"],"边框颜色"),new O([this,"borderWidth"],"边框宽度"),new mt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置"),new mt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};d(ks,"createDefaultProps",()=>({...tt.createDefaultProps(),text:"请输入文字",width:80,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:at([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:at([1,1,1,1]),backgroundColor:at([0,0,0,.8]),padding:at([5,5,5,5]),borderRadius:at([6,6,6,6]),borderWidth:0,borderColor:at([1,1,1,1]),borderStyle:"solid"})),d(ks,"type",ks.register("ESGeoDivTextPoi",ks,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"}));let Zf=ks;const au=class au extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Et([this,"color"],"颜色",[1,1,0,1])]}}};d(au,"createDefaultProps",()=>({...tt.createDefaultProps(),color:at([1,1,0,1])})),d(au,"type",au.register("ESCityBasePoint",au,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let Kf=au;const XS=[{id:"document",version:"1.0"},{id:"Vehicle",availability:"2012-08-04T16:00:00Z/2012-08-04T16:14:15.251Z",billboard:{eyeOffset:{cartesian:[0,0,0]},horizontalOrigin:"CENTER",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEISURBVEhLvVXBDYQwDOuojHKj8LhBbpTbpBCEkZsmIVTXq1RVQGrHiWlLmTTqPiZBlyLgy/KSZQ5JSHDQ/mCYCsC8106kDU0AdwRnvYZArWRcAl0dcYJq1hWCb3hBrumbDAVMwAC82WoRvgMnVMDBnB0nYZFTbE6BBvdUGqVqCbjBIk3PyFFR/NU7EKzru+qZsau3ryPwwCRLKYOzutZuCL6fUmWeJGzNzL/RxAMrUmASSCkkAayk2IxPlwhAAYGpsiHQjbLccfdOY5gKkCXAMi7SscAwbQpAnKyctWyUZ6z8ja3OGMepwD8asz+9FnSvbhU8uVOHFIwQsI3/p0CfhuqCSQuxLqsN6mu8SS+N42MAAAAASUVORK5CYII=",pixelOffset:{cartesian2:[0,0]},scale:.8333333333333334,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],verticalOrigin:"BOTTOM"},label:{fillColor:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}],font:"bold 10pt Segoe UI Semibold",horizontalOrigin:"LEFT",outlineColor:{rgba:[0,0,0,255]},pixelOffset:{cartesian2:[10,0]},scale:1,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],style:"FILL",text:"Vehicle",verticalOrigin:"CENTER"},path:{material:{solidColor:{color:{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}}},width:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",number:5}],show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}]},position:{interpolationAlgorithm:"LAGRANGE",interpolationDegree:1,epoch:"2012-08-04T16:00:00Z",cartesian:[0,-23797546637012e-7,-466533288013588e-8,362813368924173e-8,100,-237951008905552e-8,-466541964840452e-8,362818220006795e-8,200,-23795684769522e-7,-46655553441867e-7,362797083323261e-8,300,-237963893786855e-8,-466569163561896e-8,362775082085873e-8,400,-237970929834665e-8,-46658279679646e-7,362753080187124e-8,500,-237983728064915e-8,-46658477494347e-7,362742212874017e-8,600,-237962498289073e-8,-466590750853722e-8,36274841191848e-7,700,-237938612743523e-8,-466602954174431e-8,362748383297459e-8,800,-237914726777171e-8,-466615156669944e-8,36274835403492e-7,900,-237890840390057e-8,-466627358340244e-8,362748324130864e-8,1e3]}}],HS=`第一个packet代表了cesium场景(cesium时间轴的范围,当前时刻,倍速等信息)之外,其他的packet都可以理解为描述某一时间范围内的entity的行为。
|
|
413
413
|
\`\`\`
|
|
414
414
|
[{
|
|
415
415
|
"id": "document",
|
|
@@ -464,7 +464,7 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
464
464
|
}
|
|
465
465
|
}]
|
|
466
466
|
\`\`\`
|
|
467
|
-
`,
|
|
467
|
+
`,Iy=`(dataSource) => {
|
|
468
468
|
var entities = dataSource.entities.values;
|
|
469
469
|
|
|
470
470
|
for (var i = 0; i < entities.length; i++) {
|
|
@@ -479,12 +479,12 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
`,
|
|
482
|
+
`,YS=`data 路径都可以使用下面回调函数
|
|
483
483
|
\`\`\`
|
|
484
|
-
${
|
|
484
|
+
${Iy}
|
|
485
485
|
\`\`\`
|
|
486
486
|
|
|
487
|
-
`,iu=Date.now();new Date(iu).toISOString(),new Date(iu+1440*60*1e3).toISOString();const On=class On extends j{constructor(e){super(e);f(this,"_flyToEvent",this.disposeVar(new V));f(this,"_resetClockEvent",this.disposeVar(new V))}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 H([this,"data"],On.defaults.data,_0,"数据",!0),new H([this,"uri"],"路径","${earthsdk3-assets-script-dir}/assets/misc/simple.czml",void 0,!0),new W([this,"clockEnabled"],"启用",!1),new T([this,"multiplier"],"倍速",On.defaults.multiplier),new W([this,"autoResetClock"],"自动设置时钟",!0),new ss([this,"startTime"],"开始时间",On.defaults.startTime,!0),new ss([this,"stopTime"],"结束时间",On.defaults.stopTime,!0),new ss([this,"currentTime"],"当前时间",On.defaults.currentTime,!0),new lt([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep","SYSTEM_CLOCK_MULTIPLIER"),new lt([this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"clockRange","UNBOUNDED"),new W([this,"shouldAnimate"],"是否启用动画",!1)],general:[...e.general,new W([this,"show"],"是否显示",!0),new W([this,"collision"],"开启碰撞",!1),new W([this,"allowPicking"],"允许拾取",!1)],more:[...e.more,new tt(["number"],r=>this.flyTo(r),[1e3],"飞入"),new tt([],()=>this.resetClock(),[],"重设时钟"),new bi([this,"loadFuncStr"],"loadFnStr",_g,w0,!0)]}}};f(On,"createDefaultProps",()=>({show:!0,uri:void 0,allowPicking:!1,data:p.reactJsonWithUndefined(y0),autoResetClock:!0,clockEnabled:!1,startTime:iu,stopTime:iu+1440*60*1e3,currentTime:iu,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...j.createDefaultProps()})),f(On,"type",On.register("ESCzml",On,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"}));let qh=On;const ca=class ca extends j{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new $([]),new W([this,"show"],"是否显示"),new T([this,"cssSize"],"尺寸"),new ce([this,"cssPosition"],"位置"),new ma([this,"imgUrl"],"图片地址")]}}};f(ca,"createDefaultProps",()=>({...j.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:j.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")})),f(ca,"type",ca.register("ESNavigator",ca,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"}));let Xh=ca;const $n=class $n extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new $([],"通用","通用"),new W([this,"show"],"是否显示",$n.defaults.show),new T([this,"height"],"高度",$n.defaults.height,!0),new T([this,"fontSize"],"文字大小",$n.defaults.fontSize,!0),new gt([this,"bgColor"],"背景颜色",$n.defaults.bgColor,!0)]}}};f($n,"createDefaultProps",()=>({...j.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:p.reactArray([71/255,71/255,71/255,.8])})),f($n,"type",$n.register("ESViewerStatusBar",$n,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let Yh=$n;const ti=class ti extends j{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new $([],"通用","通用"),new W([this,"show"],"是否显示",ti.defaults.show),new T([this,"height"],"高度",ti.defaults.height,!0),new T([this,"fontSize"],"文字大小",ti.defaults.fontSize,!0),new gt([this,"bgColor"],"背景颜色",ti.defaults.bgColor,!0)]}}};f(ti,"createDefaultProps",()=>({...j.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:p.reactArray([71/255,71/255,71/255,.8])})),f(ti,"type",ti.register("ESViewerStatusBarScale",ti,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let Hh=ti;const ha=class ha extends Z{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new nt([this,"url"],"路径","",!0),new T([this,"progress"],"进度",0,!1,!0)]}}};f(ha,"createDefaultProps",()=>({...Z.createDefaultProps(),url:"",progress:0})),f(ha,"type",ha.register("ESGaussianSplatting",ha,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"}));let Bh=ha;const Ws=class Ws extends Z{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new nt([this,"mesh"],"mesh地址",Ws.defaults.mesh)]}}};f(Ws,"createDefaultProps",()=>({...Z.createDefaultProps(),mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"})),f(Ws,"type",Ws.register("ESStaticMesh",Ws,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"}));let Jh=Ws;const fa=class fa extends pt{constructor(e){super(e);f(this,"_startEvent",this.dv(new V));f(this,"_clearEvent",this.dv(new V));f(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new bs),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(p.track([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(p.track([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 tt([],()=>this.start(),[],"开始分析"),new tt([],()=>this.clear(),[],"清除分析"),new H([this,"windowPositions"],"屏幕坐标",[],void 0,!1,!0),new H([this,"depths"],"深度值",[],void 0,!1,!0),new T([this,"radius"],"半径",1e4,!0)]}}};f(fa,"createDefaultProps",()=>({...pt.createDefaultProps(),windowPositions:Fc([]),depths:p.reactArrayWithUndefined([]),radius:p.react(1e4)})),f(fa,"type",fa.register("ESSkylineAnalysis",fa,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"}));let jh=fa;const Ci=class Ci extends bt{constructor(t){super(t)}getESProperties(){const t=super.getESProperties();return{...t,basic:[...t.basic,new H([this,"data"],"数据",[],void 0,!0),new H([this,"gradient"],"渐变",Ci.defaults.gradient,void 0,!0),new T([this,"radius"],"半径",Ci.defaults.radius,void 0,!0),new T([this,"blur"],"模糊",Ci.defaults.blur,!0),new W([this,"is3D"],"is3D",!1,!0)]}}};f(Ci,"createDefaultProps",()=>({...bt.createDefaultProps(),is3D:p.react(!1),data:p.reactPositions([]),gradient:p.reactJsonWithUndefined({".5":"green",".7":"yellow",".95":"red"}),radius:p.react(10),blur:p.react(.85)})),f(Ci,"type",Ci.register("ESHeatMap",Ci,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"}));let pl=Ci;const qs=class qs extends pt{constructor(e){super(e);f(this,"editingBindMode","scatter")}};f(qs,"createDefaultProps",()=>({...pt.createDefaultProps(),pointed:!0})),f(qs,"type",qs.register("ESGeoPoints",qs,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:"地图中的可视化地理点集合"})),f(qs,"supportEditingModes",[...pt.supportEditingModes,B.ScatterAppend,B.ScatterModify]);let su=qs;const wg=async(n,t=[],e)=>{const r=[];for(const i of t){const{coordinates:s}=i.geometry;for(const o of s){const a=await Promise.all(o.map(async u=>{let l=u[2]??0;if(e)if(e.type==="absolute")l=e.height??l;else if(e.type==="relative"){const c=await n.getTerrainHeight([u[0],u[1]])??0;l=(e.height??l)+c}else e.type==="terrain"&&(l=await n.getTerrainHeight([u[0],u[1]])??0);return[u[0],u[1],l]}));r.push({...i,points:a})}}return r},Eg=async(n,t=[],e)=>await Promise.all(t.map(async r=>{var u,l,c,h,d,g,v,E,C;const i=((u=r.geometry)==null?void 0:u.x)??((c=(l=r.geometry)==null?void 0:l.coordinates)==null?void 0:c[0]),s=((h=r.geometry)==null?void 0:h.y)??((g=(d=r.geometry)==null?void 0:d.coordinates)==null?void 0:g[1]);let a=((v=r.geometry)==null?void 0:v.z)??((C=(E=r.geometry)==null?void 0:E.coordinates)==null?void 0:C[2])??0;if(e)if(e.type==="absolute")a=e.height??a;else if(e.type==="relative"){const b=await n.getTerrainHeight([i,s])??0;a=(e.height??a)+b}else e.type==="terrain"&&(a=await n.getTerrainHeight([i,s])??0);return{...r,points:[i,s,a]}})),Sg=async(n,t=[],e)=>{const r=[];return await Promise.all(t.map(async i=>{const{coordinates:s}=i.geometry;await Promise.all(s.map(async o=>{const a=await Promise.all(o.map(async u=>{let l=u[2]??0;if(e)if(e.type==="absolute")l=e.height??l;else if(e.type==="relative"){const c=await n.getTerrainHeight([u[0],u[1]])??0;l=(e.height??l)+c}else e.type==="terrain"&&(l=await n.getTerrainHeight([u[0],u[1]])??0);return[u[0],u[1],l]}));r.push({...i,points:a})}))})),r};function E0(n){const t=be.lineString(n),e=be.length(t),r=be.along(t,e/2);return[r.geometry.coordinates[0],r.geometry.coordinates[1],r.geometry.coordinates[2]||0]}function S0(n,t){const e=be.lineString(n),r=be.length(e),i=Math.floor(r/t),s=[];if(s.push(n[0]),i<1)return[n[0]];for(let o=1;o<i;o+=1){const a=be.along(e,r*(o/i));s.push([a.geometry.coordinates[0],a.geometry.coordinates[1],a.geometry.coordinates[2]||0])}return s}function C0(n){const t=[...n];JSON.stringify(n[0])!==JSON.stringify(n[n.length-1])&&t.push(n[0]);const e=be.polygon([t]),r=be.center(e);return[r.geometry.coordinates[0],r.geometry.coordinates[1],r.geometry.coordinates[2]||0]}function Cg(n,t,e){const r=n.dv(new Do);for(const i in e)i!=="type"&&(r[i]=e[i]);r.position=t,n.d(n.components.disposableAdd(r))}function Zh(n,t,e,r){let i=r.textTemplate||r.symbol.text||"";const s=/{{(.*?)}}/;for(;s.test(i);){const c=i.match(s);if(c){const h=c[1].trim(),d=e[`${h}`]||"-";i=i.replace(c[0],d)}}let o=r.symbol;const{minVisibleDistance:a,maxVisibleDistance:u}=r;a&&u&&(o={...o,minVisibleDistance:a,maxVisibleDistance:u});const l={...o,text:i};Cg(n,t,l)}function Fo(n,t){const e={width:null,height:null,color:null,opacity:null,rotation:null};return t.forEach(r=>{r.type==="size"?r.axis==="width"?e.width=n[r.field]||null:r.axis==="height"&&(e.height=n[r.field]||null):r.type==="color"?e.color=n[r.field]||null:r.type==="opacity"?e.opacity=n[r.field]||null:r.type==="rotation"&&(e.rotation=n[r.field]||null)}),e}function Kh(n,t,e){const i={...t.symbol};if(e&&e.length>0){const s=Fo(n,e);for(let o in s)i[o]!==void 0&&s[o]!==null&&(i[o]=s[o])}return i}function Qh(n,t,e){var l,c;const r=t,{uniqueValueInfos:i,field:s,fieldDelimiter:o,defaultSymbol:a}=r;let u={...a};if(Array.isArray(s)){const d=s.map(g=>n[g]??"").join(o);u=((l=i.find(g=>g.value==d))==null?void 0:l.symbol)||a}else u=((c=i.find(h=>h.value==n[s]))==null?void 0:c.symbol)||a;if(e&&e.length>0){const h=Fo(n,e);for(let d in h)u[d]!==void 0&&h[d]!==null&&(u[d]=h[d])}return u}function $h(n,t,e){const r=t,{classBreakInfos:i,field:s,defaultSymbol:o}=r;let a=o;const u=n[s];if(u===void 0||typeof u!="number")a=o;else{const l=i.find(c=>u<=c.maxValue&&u>=c.minValue);l?a=l.symbol:a=o}if(e&&e.length>0){const l=Fo(n,e);for(let c in l)a[c]!==void 0&&l[c]!==null&&(a[c]=l[c])}return a}function I0(n,t){function e(l,c,h,d){const g=S=>S*Math.PI/180,v=S=>S*180/Math.PI,E=g(l),C=g(h),b=g(d-c),m=Math.sin(b)*Math.cos(C),y=Math.cos(E)*Math.sin(C)-Math.sin(E)*Math.cos(C)*Math.cos(b),_=Math.atan2(m,y);return(v(_)+360)%360}function r(l,c,h,d,g){const E=P=>P*Math.PI/180,C=P=>P*180/Math.PI,b=d/6371e3,m=E(g),y=E(l),_=E(c),S=Math.asin(Math.sin(y)*Math.cos(b)+Math.cos(y)*Math.sin(b)*Math.cos(m)),I=_+Math.atan2(Math.sin(m)*Math.sin(b)*Math.cos(y),Math.cos(b)-Math.sin(y)*Math.sin(S));return{lat:C(S),lng:C(I),alt:h}}function i(l){const c=[];l.length>1&&c.push(e(l[0].lat,l[0].lng,l[1].lat,l[1].lng));for(let h=1;h<l.length-1;h++){const d=e(l[h-1].lat,l[h-1].lng,l[h].lat,l[h].lng),g=e(l[h].lat,l[h].lng,l[h+1].lat,l[h+1].lng);let v=(d+g)/2;Math.abs(d-g)>180&&(v=(v+180)%360),c.push(v)}return l.length>1&&c.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&&c.push(0),c}if(!n||n.length<2)throw new Error("至少需要两个点才能生成路径");if(t<=0)throw new Error("宽度必须大于0");const s=t/2,o=i(n),a=[],u=[];for(let l=0;l<n.length;l++){const c=(o[l]+90)%360,h=(o[l]+270)%360,d=n[l].alt!==void 0?n[l].alt:0;a.push(r(n[l].lat,n[l].lng,d,s,c)),u.push(r(n[l].lat,n[l].lng,d,s,h))}return a.concat(u.reverse())}function P0(n,t,e,r){function i(E){return E*(Math.PI/180)}const s=6378137,o=i(n),a=i(t),u=i(e),l=i(r),c=u-o,h=l-a,d=Math.sin(c/2)**2+Math.cos(o)*Math.cos(u)*Math.sin(h/2)**2,g=2*Math.atan2(Math.sqrt(d),Math.sqrt(1-d));return s*g}const Ig=(n,t,e)=>Array.isArray(t)?t.map(s=>n[s]??"").join(e):n[t]??"";function Pg(n,t){const r={...t.symbol};return{points:n.map(i=>i.points),symbol:r}}function bg(n,t){const e=t,{uniqueValueInfos:r,field:i,fieldDelimiter:s,defaultSymbol:o}=e,a=[],u=r.reduce((c,h)=>{const d=h.value.toString();return c[d]={points:[],value:h.value,symbol:h.symbol},c},{});for(let c=0;c<n.length;c++){const h=n[c],d=Ig(h,i,s);if(d!==void 0&&d!==""){const g=u[d.toString()];g?g.points.push(h.points):a.push(h.points)}else a.push(h.points)}const l=[];for(let c in u){const{points:h,symbol:d}=u[c];h.length>0&&l.push({points:h,symbol:d})}return a.length>0&&l.push({points:a,symbol:o}),l}function Ng(n,t){const e=t,{classBreakInfos:r,field:i,defaultSymbol:s}=e,o=[],a=r.map(l=>({...l,points:[]}));for(let l=0;l<n.length;l++){const c=n[l],h=c[i];if(h===void 0||typeof h!="number")o.push(c.points);else{const d=a.findIndex(g=>h<=g.maxValue&&h>=g.minValue);d!==-1?a[d].points.push(c.points):o.push(c.points)}}const u=[];return a.forEach(l=>{l.points.length>0&&u.push({points:l.points,symbol:l.symbol})}),o.length>0&&u.push({points:o,symbol:s}),u}function b0(n,t,e=[]){const i={...t.symbol},s=n.map(o=>{const a=Fo(o,e);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 N0(n,t,e=[]){const r=t,{uniqueValueInfos:i,field:s,fieldDelimiter:o}=r,a=r.defaultSymbol,u=[],l=i.reduce((h,d)=>{const g=d.value.toString();return h[g]={locations:[],value:d.value,symbol:d.symbol},h},{});for(let h=0;h<n.length;h++){const d=n[h],g=Ig(d,s,o);if(g){const v=l[g.toString()];if(v){const E=Fo(d,e);v.locations.push({position:d.points,rotation:E.rotation||a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}else u.push({position:d.points,rotation:a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}else u.push({position:d.points,rotation:a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}const c=[];for(let h in l){const{locations:d,symbol:g}=l[h];d.length>0&&c.push({url:g.url,locations:d})}return u.length>0&&c.push({url:a.url,locations:u}),c}function T0(n,t,e=[]){const r=t,{classBreakInfos:i,field:s}=r,o=r.defaultSymbol,a=[],u=i.map(c=>({...c,locations:[]}));for(let c=0;c<n.length;c++){const h=n[c],d=h[s];if(d===void 0||typeof d!="number")a.push({position:h.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]});else{const g=u.findIndex(v=>d<=v.maxValue&&d>=v.minValue);if(g!==-1){const v=Fo(h,e);u[g].locations.push({position:h.points,rotation:v.rotation||o.rotation||[0,0,0],scale:u[g].symbol.scale||[1,1,1]})}else a.push({position:h.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]})}}const l=[];return u.forEach(c=>{c.locations.length>0&&l.push({url:c.symbol.url,locations:c.locations})}),a.length>0&&l.push({url:o.url,locations:a}),l}class x0 extends q{constructor(e,r,i,s){super();f(this,"labelingInfo");this.sceneObject=e;const o=r;if(s&&p.forEach(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 u=Pg(o,i);this._simplePointAllRender(u.points,u.symbol);return}if(i.symbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!");const u=Pg(o,i);this._imageAllRender(u.points,u.symbol);return}if(i.symbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!");const{url:u,locations:l}=b0(o,i,a);this._modelAllRender(u,l);return}for(let u=0;u<o.length;u++){const l=Kh(o[u],i,a);this.render(o[u],l)}}else if(i.type==="unique-value"){const{visualVariables:a}=i;if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!"),bg(o,i).forEach(({points:d,symbol:g})=>{this._simplePointAllRender(d,g)});return}if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!"),bg(o,i).forEach(({points:d,symbol:g})=>{this._imageAllRender(d,g)});return}if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),N0(o,i,a).forEach(({url:d,locations:g})=>{this._modelAllRender(d,g)});return}for(let h=0;h<o.length;h++){const d=Qh(o[h],i,a);this.render(o[h],d)}}else if(i.type==="class-breaks"){const{visualVariables:a}=i;if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!"),Ng(o,i).forEach(({points:d,symbol:g})=>{this._simplePointAllRender(d,g)});return}if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!"),Ng(o,i).forEach(({points:d,symbol:g})=>{this._imageAllRender(d,g)});return}if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),T0(o,i,a).forEach(({url:d,locations:g})=>{this._modelAllRender(d,g)});return}for(let h=0;h<o.length;h++){const d=$h(o[h],i,a);this.render(o[h],d)}}else if(i.type==="heatmap"){const{field:a,fieldValueMax:u,fieldValueMin:l}=i;console.time();const c=o.map(h=>{const{points:d}=h;if(a&&typeof a=="string"){let g=h[a];typeof g=="number"&&(typeof u=="number"&&g>u&&(g=u),typeof l=="number"&&g<l&&(g=l),d[2]=g)}return d});this.renderHeatmap(c,i)}else console.error("PointLayer: renderer type is not supported")}renderLabel(e,r){const{points:i}=e;Zh(this.sceneObject,i,e,r)}renderHeatmap(e,r){const{is3D:i,radius:s,blur:o,gradient:a}=r,u=this.dv(new pl);this.d(this.sceneObject.components.disposableAdd(u)),u.is3D=i,u.radius=s,u.blur=o,a&&(u.gradient={...a}),u.data=e}render(e,r){r.type==="simple-point"?this._simplePointRender(e,r):r.type==="ESImageLabel"?this._simpleImageRender(e,r):r.type==="ESGltfModel"?this._simpleModelRender(e,r):r.type==="ESTextLabel"?Cg(this.sceneObject,e.points,r):r.type==="ESParticleSystemPrimitive"?this._simpleParticleRender(e,r):console.error(" PointLayer: symbol type is not supported")}_simplePointRender(e,r){const{points:i}=e,{size:s,color:o,outlineColor:a,outlineWidth:u}=r,l=this.dv(new su);this.d(this.sceneObject.components.disposableAdd(l)),l.pointed=!0,l.pointOutlineColor=a,l.pointOutlineWidth=u,l.pointSize=s,l.pointColor=o,l.allowPicking=(r==null?void 0:r.allowPicking)??!0,l.extras={selected:!1},l.points=[i]}_simplePointAllRender(e,r){const{size:i,color:s,outlineColor:o,outlineWidth:a}=r,u=this.dv(new su);this.d(this.sceneObject.components.disposableAdd(u)),u.pointed=!0,u.pointOutlineColor=o,u.pointOutlineWidth=a,u.pointSize=i,u.pointColor=s,u.allowPicking=(r==null?void 0:r.allowPicking)??!0,u.points=[...e]}_simpleImageRender(e,r){const{points:i}=e,{rotation:s,offset:o,size:a,url:u,screenRender:l,anchor:c,renderMode:h,rotationType:d}=r,g=this.dv(new ul),v=this.dv(new Do);this.d(this.sceneObject.components.disposableAdd(g)),this.d(this.sceneObject.components.disposableAdd(v)),g.url=u,g.renderMode=h??0,s&&(g.rotation=s),o&&(g.offset=o),g.size=a||[32,32],c&&(g.anchor=c),d&&(g.rotationType=d),g.screenRender=l??!0,g.allowPicking=(r==null?void 0:r.allowPicking)??!0,g.extras={selected:!1},g.position=[...i],g.sizeByContent=!1,v.allowPicking=(r==null?void 0:r.allowPicking)??!0;const E=a?Math.max(...a)+10:Math.max(...g.size)+10;v.sizeByContent=!1,v.screenRender=!0,v.size=[E,E],v.borderRadius=[E,E,E,E],v.padding=[E/2,E/2,E/2,E/2],v.borderWidth=E/10,v.offset=[0,E/10+5],v.text="",v.backgroundColor=[0,0,0,0],v.borderColor=[0,0,0,0]}_imageAllRender(e,r){const i={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:e}}]},s=this.dv(new eu);this.d(this.sceneObject.components.disposableAdd(s));const o=this.dv(new Do);this.d(this.sceneObject.components.disposableAdd(o)),s.textDefaultText="";const{offset:a,size:u,url:l,anchor:c}=r;s.imageUrl=l,c&&(s.imageAnchor=c),a&&(s.imageOffset=a),s.imageSize=u||[32,32],s.url=i,s.allowPicking=(r==null?void 0:r.allowPicking)??!0,s.extras={selected:!1},o.allowPicking=!0;const h=u?Math.max(...u)+10:Math.max(...s.imageSize)+10;o.sizeByContent=!1,o.size=[h,h],o.borderRadius=[h,h,h,h],o.padding=[h/2,h/2,h/2,h/2],o.borderWidth=h/10,o.offset=[0,h/10+5],o.text="",o.backgroundColor=[0,0,0,0],o.borderColor=[0,0,0,0]}_simpleModelRender(e,r){const{points:i}=e,{rotation:s,scale:o,url:a}=r,u=this.dv(new Hi);this.d(this.sceneObject.components.disposableAdd(u)),u.url=a,s&&(u.rotation=s),o&&(u.scale=o),u.position=[...i]}_modelAllRender(e,r){const i=this.dv(new Hi);this.d(this.sceneObject.components.disposableAdd(i)),i.url=e,i.instances=r}_simpleParticleRender(e,r){const{points:i}=e,s=this.dv(new ll);this.d(this.sceneObject.components.disposableAdd(s)),s.position=[...i],Object.keys(r).forEach(o=>{s[o]=r[o]})}}class O0 extends q{constructor(t,e,r,i){super(),this.sceneObject=t;const s=e;if(i&&p.forEach(s,o=>{this.renderLabel(o,i)}),r)if(r.type==="simple"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=Kh(a,r,o);this.render(a,u)})}else if(r.type==="unique-value"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=Qh(a,r,o);this.render(a,u)})}else if(r.type==="class-breaks"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=$h(a,r,o);this.render(a,u)})}else console.error("PolyLineLayer: renderer type is not supported")}render(t,e){console.log("PolyLineLayer: render",t,e),e.type==="simple-line"?this._simpleLineRender(t,e):e.type==="ESPolygonFence"?this._esPolygonFenceRender(t,e):e.type==="ESPipeFence"?this._esPipeFenceRender(t,e):e.type==="ESPath"?this._esPathRender(t,e):e.type==="ESlineInterpolationModel"?this._eslineInterpolationModelRender(t,e):e.type==="ESlineWall"?this._eslineWallRender(t,e):console.error("PolyLineLayer: symbol type is not supported")}_simpleLineRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new yi);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...r],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(t,e){const{points:r}=t;if(r.length<3){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new dl);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...r],i.height=e.height,i.materialMode=e.materialMode}_esPipeFenceRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new fl);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...r],i.height=e.height,i.width=e.width,i.materialMode=e.materialMode}_esPathRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new Ro),s=this.dv(new Ao);if(this.d(this.sceneObject.components.disposableAdd(i)),this.d(this.sceneObject.components.disposableAdd(s)),i.points=[...r],i.speed=e.speed,i.strokeColor=e.color,i.materialMode=e.materialMode,i.strokeWidth=e.width||1,e!=null&&e.runModel){const a=e==null?void 0:e.runSpeed,u=e==null?void 0:e.modelSymbol;let l;switch(e==null?void 0:e.runModel){case"ESHuman":l=this.dv(new Ps);break;case"ESCar":l=this.dv(new sl);break;case"ESGltfModel":l=this.dv(new Hi)}if(this.d(this.sceneObject.components.disposableAdd(l)),u)for(let h in u)l[h]=u[h];const c=[0];for(var o=0;o<r.length-1;o+=1){const h=r[o],d=r[o+1],g=P0(h[1],h[0],d[1],d[0]);c.push(c[o]+Math.ceil(g/a)*1e3)}i.timeStamps=c,e!=null&&e.runSpeed&&(i.currentPositionChanged.don(h=>{i.currentPosition&&(l.position=i.currentPosition,i.currentRotation&&(l.rotation=i.currentRotation))}),s.startTime=0,s.stopTime=c[c.length-1],s.playing=!0,s.loop=(e==null?void 0:e.runLoop)??!0,s.currentTimeChanged.don(h=>{i.path.currentTime=h}))}}_eslineInterpolationModelRender(t,e){const{points:r}=t;if(r.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 s=S0(r,i/1e3),o=this.dv(new Hi);this.d(this.sceneObject.components.disposableAdd(o)),o.url=e.url,o.instances=s.map(a=>({position:a,rotation:e.rotation,scale:e.scale}))}_eslineWallRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=e.height??0,s=e.width??0,o=e.extrudedHeight??0,a=r.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})),u=I0(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]),l=this.dv(new bs);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=u}renderLabel(t,e){const{points:r}=t,i=E0(r);Zh(this.sceneObject,i,t,e)}}function Tg(n,t){try{JSON.stringify(n[n.length-1])!==JSON.stringify(n[0])&&n.push(n[0]);const e=be.featureCollection(n.map(u=>be.point(u))),r=be.polygon([n]),i={gridType:"point",units:"meters"};return be.interpolate(e,t,i).features.map(u=>u.geometry.coordinates)[0][0].filter(u=>be.booleanPointInPolygon(be.point(u),r))}catch(e){return console.error(e),[]}}class M0 extends q{constructor(t,e,r,i){super(),this.sceneObject=t;const s=e;if(i&&p.forEach(s,o=>{this.renderLabel(o,i)}),r)if(r.type==="simple"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=Kh(a,r,o);this.render(a,u)})}else if(r.type==="unique-value"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=Qh(a,r,o);this.render(a,u)})}else if(r.type==="class-breaks"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=$h(a,r,o);this.render(a,u)})}else console.error("PolyLineLayer: renderer type is not supported")}renderLabel(t,e){const{points:r}=t;console.log("PolygonLayer: renderLabel",r);const i=C0(r);Zh(this.sceneObject,i,t,e)}render(t,e){e.type==="simple-fill"?this._simplePolygonRender(t,e):e.type==="ESGeoExtrudedPolygon"?this._esGeoExtrudedPolygonRender(t,e):e.type==="PolygonInterpolateESGltfModel"?this._polygonInterpolateESGltfModelRender(t,e):e.type==="PolygonInterpolateESImageLabel"?this._polygonInterpolateESImageLabelRender(t,e):console.error("PolyLineLayer: symbol type is not supported")}_simplePolygonRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{color:i,outline:s,filled:o,ground:a}=e,{width:u,color:l,stroked:c}=s,h=this.dv(new Tt);this.d(this.sceneObject.components.disposableAdd(h)),h.stroked=c??!1,h.strokeColor=l??[1,1,1,1],h.strokeWidth=u??1,h.filled=o??!0,h.fillGround=a??!1,h.fillColor=i??[1,1,1,1],h.allowPicking=(e==null?void 0:e.allowPicking)??!0,h.extras={selected:!1},h.points=[...r]}_esGeoExtrudedPolygonRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,extrudedHeight:s,color:o}=e,a=this.dv(new bs);this.d(this.sceneObject.components.disposableAdd(a)),a.height=i,a.extrudedHeight=s,a.filled=!0,a.fillColor=o,a.allowPicking=(e==null?void 0:e.allowPicking)??!0,a.extras={selected:!1},a.points=[...r]}_polygonInterpolateESGltfModelRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:s,url:o,rotation:a,scale:u}=e,l=Tg(r,s??10),c=this.dv(new Hi);this.d(this.sceneObject.components.disposableAdd(c)),c.url=o,c.instances=l.map(h=>({position:[...h,i??0],rotation:a??[0,0,0],scale:u??[1,1,1]}))}_polygonInterpolateESImageLabelRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:s,offset:o,size:a,url:u,anchor:l}=e,h={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:[...Tg(r,s??10).map(g=>[...g,i??0])]}}]},d=this.dv(new eu);this.d(this.sceneObject.components.disposableAdd(d)),d.textDefaultText="",d.imageUrl=u,l&&(d.imageAnchor=l),o&&(d.imageOffset=o),a&&(d.imageSize=a),d.url=h}}class D0 extends q{constructor(e,r){super();f(this,"_initEvent",this.dv(new V));const i=this,s=async()=>{try{const a=e.featureProps;if(!a)return;const{heightMode:u,features:l,layerType:c,url:h}=a;let d=[];if(!l&&h){let g=await fetch(h).then(v=>v.json());return g=(g==null?void 0:g.features)??g,c==="polylineVector"?d=await wg(r,g,u):c==="polygonVector"?d=await Sg(r,g,u):c==="pointVector"&&(d=await Eg(r,g,u)),d}else c==="polylineVector"?d=await wg(r,l,u):c==="polygonVector"?d=await Sg(r,l,u):c==="pointVector"&&(d=await Eg(r,l,u));return d}catch(a){console.error(a);return}},o=this.dv(p.createNextAnimateFrameEvent(this._initEvent,e.featurePropsChanged));i.dv(new p.ObjResettingWithEvent(o,()=>{if(!e.featureProps)return;const a=e.featureProps;let u;return(async()=>{const{layerType:c,renderer:h,labelingInfo:d}=a,g=await s();!g||g.length===0||(c==="pointVector"?u=new x0(e,g,h,d):c==="polylineVector"?u=new O0(e,g,h,d):c==="polygonVector"&&(u=new M0(e,g,h,d)),console.log("polygonVectorLayer","createLayer",u))})().catch(console.error),{destroy:()=>{var c;(c=u==null?void 0:u.destroy)==null||c.call(u),u=void 0}}}));{const a=(u,l=1)=>{const c=Hp(u);if(!c)return;const{center:h,radius:d}=c;r.flyTo({distance:d*4,heading:0,pitch:-90,flyDuration:l??1,hDelta:0,pDelta:0},h)};i.d(e.flyToEvent.don(async u=>{const{featureProps:l}=e;if(!l)return;const c=await s();if(!c)return;let h=[];l.layerType==="polylineVector"?h=c.map(d=>d.points).flat():l.layerType==="polygonVector"?h=c.map(d=>d.points).flat():l.layerType==="pointVector"&&(h=c.map(d=>d.points)),h.length!==0&&a(h,u)}))}}init(){this._initEvent.emit()}}const da=class da extends bt{constructor(e){super(e);f(this,"featureLayerMap",new Map);const r=this;r.d(r.viewerAttached.don(i=>{if(console.log("ESFeatureLayer","viewerAttached",i.id),r.featureLayerMap.has(i.id))return;const s=new D0(r,i);s.init(),r.featureLayerMap.set(i.id,s)})),r.d(r.viewerDetached.don(i=>{var s;console.log("ESFeatureLayer","viewerDetached",i.id),r.featureLayerMap.has(i.id)&&((s=r.featureLayerMap.get(i.id))==null||s.destroy(),r.featureLayerMap.delete(i.id))})),r.d(()=>{for(const i of r.featureLayerMap.values())i.destroy();r.featureLayerMap.clear()}),r.d(Hs(r.showChanged,()=>{for(const i of r.components.values())Reflect.has(i,"show")&&(i.show=r.show)},{immediate:!0}))}};f(da,"createDefaultProps",()=>({...bt.createDefaultProps(),featureProps:p.reactJsonWithUndefined(void 0)})),f(da,"type",da.register("ESFeatureLayer",da,{chsName:"矢量图层",tags:["ESObjects"],description:"ESFeatureLayer"}));let tf=da;function xg(n){return typeof n=="string"?document.getElementById(n):n}function ef(n){if(!n)throw new Error("container is not defined");n.innerHTML="";const t=document.createElement("div");return t.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(t),t}class Og extends q{constructor(e,r){super();f(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=r;const i=this._listeningSceneObjects,s=(o,a)=>{if(o)for(let u of o){const l=i.get(u);l&&(l.destroy(),i.delete(u))}if(a)for(let u of a){if(i.get(u)){console.warn(`listeningSceneObjects已存在某对象:${u.name}`,u);debugger}const c=this.createSceneObjectListeningFunc(u);c&&i.set(u,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 L0 extends q{constructor(t){super(),this._esObjectsManager=t;{const e=this._esObjectsManager;class r extends q{constructor(s){super(),this._esPath=s,this.dv(new p.ObjResettingWithEvent(e.activeViewerChanged,()=>{const o=e.activeViewer;if(!o)return;class a extends q{constructor(l){if(super(),this._esPath=l,!o)throw new Error("!viewer");const c=()=>{const h=e.activeViewer;h&&(this._esPath.path.currentTime=h.simulationTime)};c(),this.d(o.simulationTimeChanged.don(c))}}return new a(this._esPath)}))}}this.dv(new Og(e.sceneObjectsManager,i=>{if(i instanceof Ro)return new r(i)}))}{const e=this._esObjectsManager;class r extends q{constructor(s){super();const o=()=>{const a=e.activeViewer;a&&(a.simulationTime=s.currentTime??0)};o(),this.d(s.currentTimeChanged.don(o))}}this.dv(new Og(e.sceneObjectsManager,i=>{if(i instanceof Ao)return new r(i)}))}}}class A0 extends q{constructor(t){super(),t.forEach(e=>{this.d(e.path.currentPositionChanged.don(r=>{r&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...r])})})),this.d(e.path.currentRotationChanged.don(r=>{r&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...r])})}))})}}class R0 extends q{constructor(e){super();f(this,"_player");f(this,"_channels",this.dv(p.reactArray([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new p.ObjResettingWithEvent(this.channelsChanged,()=>{if(this.channels.length===0)return;const r=[];for(let i=0;i<this.channels.length;i++){const s=this.channels[i],o=j.getSceneObjById(s.pathId);if(!o||!(o instanceof Ro))continue;const u=s.sceneObjectIds.map(l=>j.getSceneObjById(l)).filter(l=>l!==void 0);u.length!==0&&r.push({path:o,sceneObjects:u})}if(r.length!==0)return new A0(r)}))}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 gl(n){if(n.data){const{type:t,value:e}=n.data;if(t==="UITreeA"&&e instanceof qe){const{sceneObject:r}=e;if(r)return r.id}}}function F0(n,t){const{property:e,customEventName:r,otherParams:i}=t,{dragstartDataMananger:s}=n;if(!(e instanceof Bs)){if(!(e instanceof _f)){if(e instanceof nt){const[o,a]=p.getReactFuncs(e.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;gl(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const l=gl(s);l!==void 0&&a(l)}}else if(e instanceof pf){const[o,a]=p.getReactFuncs(e.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;gl(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");const u=i[0].$event,l=i[0].strinsPropDom,c=i[0].index;u.preventDefault();const h=gl(s);if(h!==void 0){l[c].firstChild.value=h;const d=new Event("input",{bubbles:!0,cancelable:!0});l[c].firstChild.dispatchEvent(d)}}}else if(e instanceof gf){const[o,a]=p.getReactFuncs(e.reactVar)}}}}function Mg(n,t,e,r){if(e)r.currentActiveEditing=[n,t];else if(r.currentActiveEditing){const[i,s]=r.currentActiveEditing;i===n&&s===t&&(e||(r.currentActiveEditing=void 0))}}const k0=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class V0 extends q{constructor(t,e){super(),this._sceneObject=t;const r=this._sceneObject;for(let i of k0){const s=i+"Changed",o=r[s];if(o){{const a=r[i];Mg(r,i,a,e)}this.dispose(o.disposableOn((a=>Mg(r,i,a,e))))}}}get sceneObject(){return this._sceneObject}}class z0 extends q{constructor(){super();f(this,"_currentActiveEditing",this.disposeVar(p.reactArrayWithUndefined(void 0)));f(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,r)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),r){const[i,s]=r;i[s]===!0&&(i[s]=!1)}if(e){const[i,s]=e;i[s]=!0}})),j.context.sceneObjCreatedEvent.don(e=>{e.dv(new V0(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 U0 extends q{constructor(){super();f(this,"_sceneObjects",new Set);f(this,"_sceneObjectsToChange",this.dv(new V));this.d(()=>{const e=p.length(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,r){const i=j.context.createSceneObject(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromUrl(e,r){const i=j.context.createSceneObjectFromUrl(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,r){const i=j.context.createSceneObjectFromClass(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const r=j.context.createSceneObjectFromJson(e);return r&&this.addSceneObject(r),r}}function Dg(n,t){return n.length===t.length&&n.every((e,r)=>e===t[r])}class G0 extends q{constructor(t){super(),this._viewer=t,this.d(p.track([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class W0 extends q{constructor(t,e){super(),this._viewer=t,this._activeViewer=e;const r=Cn.createCommonProps(),i=[];Object.keys(r).forEach(u=>{const l=this._activeViewer[u+"Changed"];i.push(l)});const s=this.dv(p.createNextAnimateFrameEvent(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(r).forEach(u=>{this._viewer[u]=this._activeViewer[u]})};this.d(s.don(o));const a=this.dv(p.createAnimateFrame());a.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const u=this._activeViewer.getCurrentCameraInfo(),l=this._viewer.getCurrentCameraInfo();if(!u)return;const{position:c,rotation:h}=u;l&&Dg(c,l.position)&&Dg(h,l.rotation)||this._viewer.flyIn(c,h,0)}),this.d(()=>a.cancel())}}const q0=`<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">
|
|
487
|
+
`,gl=Date.now();new Date(gl).toISOString(),new Date(gl+1440*60*1e3).toISOString();const $r=class $r extends Z{constructor(t){super(t);d(this,"_flyToEvent",this.disposeVar(new I));d(this,"_resetClockEvent",this.disposeVar(new I))}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 K([this,"data"],$r.defaults.data,HS,"数据",!0),new K([this,"uri"],"路径","${earthsdk3-assets-script-dir}/assets/misc/simple.czml",void 0,!0),new X([this,"clockEnabled"],"启用",!1),new O([this,"multiplier"],"倍速",$r.defaults.multiplier),new X([this,"autoResetClock"],"自动设置时钟",!0),new Hs([this,"startTime"],"开始时间",$r.defaults.startTime,!0),new Hs([this,"stopTime"],"结束时间",$r.defaults.stopTime,!0),new Hs([this,"currentTime"],"当前时间",$r.defaults.currentTime,!0),new mt([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep","SYSTEM_CLOCK_MULTIPLIER"),new mt([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 it(["number"],n=>this.flyTo(n),[1e3],"飞入"),new it([],()=>this.resetClock(),[],"重设时钟"),new ls([this,"loadFuncStr"],"loadFnStr",Iy,YS,!0)]}}};d($r,"createDefaultProps",()=>({show:!0,uri:void 0,allowPicking:!1,data:jt(XS),autoResetClock:!0,clockEnabled:!1,startTime:gl,stopTime:gl+1440*60*1e3,currentTime:gl,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...Z.createDefaultProps()})),d($r,"type",$r.register("ESCzml",$r,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"}));let Qf=$r;const uu=class uu extends Z{getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new rt([]),new X([this,"show"],"是否显示"),new O([this,"cssSize"],"尺寸"),new Ie([this,"cssPosition"],"位置"),new xu([this,"imgUrl"],"图片地址")]}}};d(uu,"createDefaultProps",()=>({...Z.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:Z.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")})),d(uu,"type",uu.register("ESNavigator",uu,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"}));let $f=uu;const Ii=class Ii extends Z{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new rt([],"通用","通用"),new X([this,"show"],"是否显示",Ii.defaults.show),new O([this,"height"],"高度",Ii.defaults.height,!0),new O([this,"fontSize"],"文字大小",Ii.defaults.fontSize,!0),new Et([this,"bgColor"],"背景颜色",Ii.defaults.bgColor,!0)]}}};d(Ii,"createDefaultProps",()=>({...Z.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:at([71/255,71/255,71/255,.8])})),d(Ii,"type",Ii.register("ESViewerStatusBar",Ii,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let tp=Ii;const xi=class xi extends Z{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new rt([],"通用","通用"),new X([this,"show"],"是否显示",xi.defaults.show),new O([this,"height"],"高度",xi.defaults.height,!0),new O([this,"fontSize"],"文字大小",xi.defaults.fontSize,!0),new Et([this,"bgColor"],"背景颜色",xi.defaults.bgColor,!0)]}}};d(xi,"createDefaultProps",()=>({...Z.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:at([71/255,71/255,71/255,.8])})),d(xi,"type",xi.register("ESViewerStatusBarScale",xi,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let ep=xi;const lu=class lu extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ut([this,"url"],"路径","",!0),new O([this,"progress"],"进度",0,!1,!0)]}}};d(lu,"createDefaultProps",()=>({...tt.createDefaultProps(),url:"",progress:0})),d(lu,"type",lu.register("ESGaussianSplatting",lu,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"}));let np=lu;const Mo=class Mo extends tt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ut([this,"mesh"],"mesh地址",Mo.defaults.mesh)]}}};d(Mo,"createDefaultProps",()=>({...tt.createDefaultProps(),mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"})),d(Mo,"type",Mo.register("ESStaticMesh",Mo,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"}));let rp=Mo;const cu=class cu extends wt{constructor(t){super(t);d(this,"_startEvent",this.dv(new I));d(this,"_clearEvent",this.dv(new I));d(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new go),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(j([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(j([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(j([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(j([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(j([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(j([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(j([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 it([],()=>this.start(),[],"开始分析"),new it([],()=>this.clear(),[],"清除分析"),new K([this,"windowPositions"],"屏幕坐标",[],void 0,!1,!0),new K([this,"depths"],"深度值",[],void 0,!1,!0),new O([this,"radius"],"半径",1e4,!0)]}}};d(cu,"createDefaultProps",()=>({...wt.createDefaultProps(),windowPositions:Wd([]),depths:Ht([]),radius:B(1e4)})),d(cu,"type",cu.register("ESSkylineAnalysis",cu,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"}));let ip=cu;const es=class es extends Rt{constructor(e){super(e)}getESProperties(){const e=super.getESProperties();return{...e,basic:[...e.basic,new K([this,"data"],"数据",[],void 0,!0),new K([this,"gradient"],"渐变",es.defaults.gradient,void 0,!0),new O([this,"radius"],"半径",es.defaults.radius,void 0,!0),new O([this,"blur"],"模糊",es.defaults.blur,!0),new X([this,"is3D"],"is3D",!1,!0)]}}};d(es,"createDefaultProps",()=>({...Rt.createDefaultProps(),is3D:B(!1),data:bl([]),gradient:jt({".5":"green",".7":"yellow",".95":"red"}),radius:B(10),blur:B(.85)})),d(es,"type",es.register("ESHeatMap",es,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"}));let Uc=es;const Ro=class Ro extends wt{constructor(t){super(t);d(this,"editingBindMode","scatter")}};d(Ro,"createDefaultProps",()=>({...wt.createDefaultProps(),pointed:!0})),d(Ro,"type",Ro.register("ESGeoPoints",Ro,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:"地图中的可视化地理点集合"})),d(Ro,"supportEditingModes",[...wt.supportEditingModes,Q.ScatterAppend,Q.ScatterModify]);let ml=Ro;const xy=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 u=>{let l=u[2]??0;if(t)if(t.type==="absolute")l=t.height??l;else if(t.type==="relative"){const c=await r.getTerrainHeight([u[0],u[1]])??0;l=(t.height??l)+c}else t.type==="terrain"&&(l=await r.getTerrainHeight([u[0],u[1]])??0);return[u[0],u[1],l]}));n.push({...i,points:a})}}return n},Ty=async(r,e=[],t)=>await Promise.all(e.map(async n=>{var u,l,c,h,f,p,m,w,E;const i=((u=n.geometry)==null?void 0:u.x)??((c=(l=n.geometry)==null?void 0:l.coordinates)==null?void 0:c[0]),s=((h=n.geometry)==null?void 0:h.y)??((p=(f=n.geometry)==null?void 0:f.coordinates)==null?void 0:p[1]);let a=((m=n.geometry)==null?void 0:m.z)??((E=(w=n.geometry)==null?void 0:w.coordinates)==null?void 0:E[2])??0;if(t)if(t.type==="absolute")a=t.height??a;else if(t.type==="relative"){const b=await r.getTerrainHeight([i,s])??0;a=(t.height??a)+b}else t.type==="terrain"&&(a=await r.getTerrainHeight([i,s])??0);return{...n,points:[i,s,a]}})),Ny=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 u=>{let l=u[2]??0;if(t)if(t.type==="absolute")l=t.height??l;else if(t.type==="relative"){const c=await r.getTerrainHeight([u[0],u[1]])??0;l=(t.height??l)+c}else t.type==="terrain"&&(l=await r.getTerrainHeight([u[0],u[1]])??0);return[u[0],u[1],l]}));n.push({...i,points:a})}))})),n};function JS(r){const e=Ue.lineString(r),t=Ue.length(e),n=Ue.along(e,t/2);return[n.geometry.coordinates[0],n.geometry.coordinates[1],n.geometry.coordinates[2]||0]}function ZS(r,e){const t=Ue.lineString(r),n=Ue.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=Ue.along(t,n*(o/i));s.push([a.geometry.coordinates[0],a.geometry.coordinates[1],a.geometry.coordinates[2]||0])}return s}function KS(r){const e=[...r];JSON.stringify(r[0])!==JSON.stringify(r[r.length-1])&&e.push(r[0]);const t=Ue.polygon([e]),n=Ue.center(t);return[n.geometry.coordinates[0],n.geometry.coordinates[1],n.geometry.coordinates[2]||0]}function Oy(r,e,t){const n=r.dv(new Oa);for(const i in t)i!=="type"&&(n[i]=t[i]);n.position=e,r.d(r.components.disposableAdd(n))}function sp(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 h=c[1].trim(),f=t[`${h}`]||"-";i=i.replace(c[0],f)}}let o=n.symbol;const{minVisibleDistance:a,maxVisibleDistance:u}=n;a&&u&&(o={...o,minVisibleDistance:a,maxVisibleDistance:u});const l={...o,text:i};Oy(r,e,l)}function La(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 op(r,e,t){const i={...e.symbol};if(t&&t.length>0){const s=La(r,t);for(let o in s)i[o]!==void 0&&s[o]!==null&&(i[o]=s[o])}return i}function ap(r,e,t){var l,c;const n=e,{uniqueValueInfos:i,field:s,fieldDelimiter:o,defaultSymbol:a}=n;let u={...a};if(Array.isArray(s)){const f=s.map(p=>r[p]??"").join(o);u=((l=i.find(p=>p.value==f))==null?void 0:l.symbol)||a}else u=((c=i.find(h=>h.value==r[s]))==null?void 0:c.symbol)||a;if(t&&t.length>0){const h=La(r,t);for(let f in h)u[f]!==void 0&&h[f]!==null&&(u[f]=h[f])}return u}function up(r,e,t){const n=e,{classBreakInfos:i,field:s,defaultSymbol:o}=n;let a=o;const u=r[s];if(u===void 0||typeof u!="number")a=o;else{const l=i.find(c=>u<=c.maxValue&&u>=c.minValue);l?a=l.symbol:a=o}if(t&&t.length>0){const l=La(r,t);for(let c in l)a[c]!==void 0&&l[c]!==null&&(a[c]=l[c])}return a}function QS(r,e){function t(l,c,h,f){const p=C=>C*Math.PI/180,m=C=>C*180/Math.PI,w=p(l),E=p(h),b=p(f-c),v=Math.sin(b)*Math.cos(E),y=Math.cos(w)*Math.sin(E)-Math.sin(w)*Math.cos(E)*Math.cos(b),_=Math.atan2(v,y);return(m(_)+360)%360}function n(l,c,h,f,p){const w=P=>P*Math.PI/180,E=P=>P*180/Math.PI,b=f/6371e3,v=w(p),y=w(l),_=w(c),C=Math.asin(Math.sin(y)*Math.cos(b)+Math.cos(y)*Math.sin(b)*Math.cos(v)),S=_+Math.atan2(Math.sin(v)*Math.sin(b)*Math.cos(y),Math.cos(b)-Math.sin(y)*Math.sin(C));return{lat:E(C),lng:E(S),alt:h}}function i(l){const c=[];l.length>1&&c.push(t(l[0].lat,l[0].lng,l[1].lat,l[1].lng));for(let h=1;h<l.length-1;h++){const f=t(l[h-1].lat,l[h-1].lng,l[h].lat,l[h].lng),p=t(l[h].lat,l[h].lng,l[h+1].lat,l[h+1].lng);let m=(f+p)/2;Math.abs(f-p)>180&&(m=(m+180)%360),c.push(m)}return l.length>1&&c.push(t(l[l.length-2].lat,l[l.length-2].lng,l[l.length-1].lat,l[l.length-1].lng)),l.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=[],u=[];for(let l=0;l<r.length;l++){const c=(o[l]+90)%360,h=(o[l]+270)%360,f=r[l].alt!==void 0?r[l].alt:0;a.push(n(r[l].lat,r[l].lng,f,s,c)),u.push(n(r[l].lat,r[l].lng,f,s,h))}return a.concat(u.reverse())}function $S(r,e,t,n){function i(w){return w*(Math.PI/180)}const s=6378137,o=i(r),a=i(e),u=i(t),l=i(n),c=u-o,h=l-a,f=Math.sin(c/2)**2+Math.cos(o)*Math.cos(u)*Math.sin(h/2)**2,p=2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f));return s*p}const Dy=(r,e,t)=>Array.isArray(e)?e.map(s=>r[s]??"").join(t):r[e]??"";function My(r,e){const n={...e.symbol};return{points:r.map(i=>i.points),symbol:n}}function Ry(r,e){const t=e,{uniqueValueInfos:n,field:i,fieldDelimiter:s,defaultSymbol:o}=t,a=[],u=n.reduce((c,h)=>{const f=h.value.toString();return c[f]={points:[],value:h.value,symbol:h.symbol},c},{});for(let c=0;c<r.length;c++){const h=r[c],f=Dy(h,i,s);if(f!==void 0&&f!==""){const p=u[f.toString()];p?p.points.push(h.points):a.push(h.points)}else a.push(h.points)}const l=[];for(let c in u){const{points:h,symbol:f}=u[c];h.length>0&&l.push({points:h,symbol:f})}return a.length>0&&l.push({points:a,symbol:o}),l}function Ly(r,e){const t=e,{classBreakInfos:n,field:i,defaultSymbol:s}=t,o=[],a=n.map(l=>({...l,points:[]}));for(let l=0;l<r.length;l++){const c=r[l],h=c[i];if(h===void 0||typeof h!="number")o.push(c.points);else{const f=a.findIndex(p=>h<=p.maxValue&&h>=p.minValue);f!==-1?a[f].points.push(c.points):o.push(c.points)}}const u=[];return a.forEach(l=>{l.points.length>0&&u.push({points:l.points,symbol:l.symbol})}),o.length>0&&u.push({points:o,symbol:s}),u}function tb(r,e,t=[]){const i={...e.symbol},s=r.map(o=>{const a=La(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 eb(r,e,t=[]){const n=e,{uniqueValueInfos:i,field:s,fieldDelimiter:o}=n,a=n.defaultSymbol,u=[],l=i.reduce((h,f)=>{const p=f.value.toString();return h[p]={locations:[],value:f.value,symbol:f.symbol},h},{});for(let h=0;h<r.length;h++){const f=r[h],p=Dy(f,s,o);if(p){const m=l[p.toString()];if(m){const w=La(f,t);m.locations.push({position:f.points,rotation:w.rotation||a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}else u.push({position:f.points,rotation:a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}else u.push({position:f.points,rotation:a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}const c=[];for(let h in l){const{locations:f,symbol:p}=l[h];f.length>0&&c.push({url:p.url,locations:f})}return u.length>0&&c.push({url:a.url,locations:u}),c}function nb(r,e,t=[]){const n=e,{classBreakInfos:i,field:s}=n,o=n.defaultSymbol,a=[],u=i.map(c=>({...c,locations:[]}));for(let c=0;c<r.length;c++){const h=r[c],f=h[s];if(f===void 0||typeof f!="number")a.push({position:h.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]});else{const p=u.findIndex(m=>f<=m.maxValue&&f>=m.minValue);if(p!==-1){const m=La(h,t);u[p].locations.push({position:h.points,rotation:m.rotation||o.rotation||[0,0,0],scale:u[p].symbol.scale||[1,1,1]})}else a.push({position:h.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]})}}const l=[];return u.forEach(c=>{c.locations.length>0&&l.push({url:c.symbol.url,locations:c.locations})}),a.length>0&&l.push({url:o.url,locations:a}),l}class rb extends V{constructor(t,n,i,s){super();d(this,"labelingInfo");this.sceneObject=t;const o=n;if(s&&ei(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 u=My(o,i);this._simplePointAllRender(u.points,u.symbol);return}if(i.symbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!");const u=My(o,i);this._imageAllRender(u.points,u.symbol);return}if(i.symbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!");const{url:u,locations:l}=tb(o,i,a);this._modelAllRender(u,l);return}for(let u=0;u<o.length;u++){const l=op(o[u],i,a);this.render(o[u],l)}}else if(i.type==="unique-value"){const{visualVariables:a}=i;if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!"),Ry(o,i).forEach(({points:f,symbol:p})=>{this._simplePointAllRender(f,p)});return}if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!"),Ry(o,i).forEach(({points:f,symbol:p})=>{this._imageAllRender(f,p)});return}if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),eb(o,i,a).forEach(({url:f,locations:p})=>{this._modelAllRender(f,p)});return}for(let h=0;h<o.length;h++){const f=ap(o[h],i,a);this.render(o[h],f)}}else if(i.type==="class-breaks"){const{visualVariables:a}=i;if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!"),Ly(o,i).forEach(({points:f,symbol:p})=>{this._simplePointAllRender(f,p)});return}if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!"),Ly(o,i).forEach(({points:f,symbol:p})=>{this._imageAllRender(f,p)});return}if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),nb(o,i,a).forEach(({url:f,locations:p})=>{this._modelAllRender(f,p)});return}for(let h=0;h<o.length;h++){const f=up(o[h],i,a);this.render(o[h],f)}}else if(i.type==="heatmap"){const{field:a,fieldValueMax:u,fieldValueMin:l}=i;console.time();const c=o.map(h=>{const{points:f}=h;if(a&&typeof a=="string"){let p=h[a];typeof p=="number"&&(typeof u=="number"&&p>u&&(p=u),typeof l=="number"&&p<l&&(p=l),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;sp(this.sceneObject,i,t,n)}renderHeatmap(t,n){const{is3D:i,radius:s,blur:o,gradient:a}=n,u=this.dv(new Uc);this.d(this.sceneObject.components.disposableAdd(u)),u.is3D=i,u.radius=s,u.blur=o,a&&(u.gradient={...a}),u.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"?Oy(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:u}=n,l=this.dv(new ml);this.d(this.sceneObject.components.disposableAdd(l)),l.pointed=!0,l.pointOutlineColor=a,l.pointOutlineWidth=u,l.pointSize=s,l.pointColor=o,l.allowPicking=(n==null?void 0:n.allowPicking)??!0,l.extras={selected:!1},l.points=[i]}_simplePointAllRender(t,n){const{size:i,color:s,outlineColor:o,outlineWidth:a}=n,u=this.dv(new ml);this.d(this.sceneObject.components.disposableAdd(u)),u.pointed=!0,u.pointOutlineColor=o,u.pointOutlineWidth=a,u.pointSize=i,u.pointColor=s,u.allowPicking=(n==null?void 0:n.allowPicking)??!0,u.points=[...t]}_simpleImageRender(t,n){const{points:i}=t,{rotation:s,offset:o,size:a,url:u,screenRender:l,anchor:c,renderMode:h,rotationType:f}=n,p=this.dv(new Fc),m=this.dv(new Oa);this.d(this.sceneObject.components.disposableAdd(p)),this.d(this.sceneObject.components.disposableAdd(m)),p.url=u,p.renderMode=h??0,s&&(p.rotation=s),o&&(p.offset=o),p.size=a||[32,32],c&&(p.anchor=c),f&&(p.rotationType=f),p.screenRender=l??!0,p.allowPicking=(n==null?void 0:n.allowPicking)??!0,p.extras={selected:!1},p.position=[...i],p.sizeByContent=!1,m.allowPicking=(n==null?void 0:n.allowPicking)??!0;const w=a?Math.max(...a)+10:Math.max(...p.size)+10;m.sizeByContent=!1,m.screenRender=!0,m.size=[w,w],m.borderRadius=[w,w,w,w],m.padding=[w/2,w/2,w/2,w/2],m.borderWidth=w/10,m.offset=[0,w/10+5],m.text="",m.backgroundColor=[0,0,0,0],m.borderColor=[0,0,0,0]}_imageAllRender(t,n){const i={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:t}}]},s=this.dv(new dl);this.d(this.sceneObject.components.disposableAdd(s));const o=this.dv(new Oa);this.d(this.sceneObject.components.disposableAdd(o)),s.textDefaultText="";const{offset:a,size:u,url:l,anchor:c}=n;s.imageUrl=l,c&&(s.imageAnchor=c),a&&(s.imageOffset=a),s.imageSize=u||[32,32],s.url=i,s.allowPicking=(n==null?void 0:n.allowPicking)??!0,s.extras={selected:!1},o.allowPicking=!0;const h=u?Math.max(...u)+10:Math.max(...s.imageSize)+10;o.sizeByContent=!1,o.size=[h,h],o.borderRadius=[h,h,h,h],o.padding=[h/2,h/2,h/2,h/2],o.borderWidth=h/10,o.offset=[0,h/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,u=this.dv(new Ns);this.d(this.sceneObject.components.disposableAdd(u)),u.url=a,s&&(u.rotation=s),o&&(u.scale=o),u.position=[...i]}_modelAllRender(t,n){const i=this.dv(new Ns);this.d(this.sceneObject.components.disposableAdd(i)),i.url=t,i.instances=n}_simpleParticleRender(t,n){const{points:i}=t,s=this.dv(new kc);this.d(this.sceneObject.components.disposableAdd(s)),s.position=[...i],Object.keys(n).forEach(o=>{s[o]=n[o]})}}class ib extends V{constructor(e,t,n,i){super(),this.sceneObject=e;const s=t;if(i&&ei(s,o=>{this.renderLabel(o,i)}),n)if(n.type==="simple"){const{visualVariables:o}=n;ei(s,a=>{const u=op(a,n,o);this.render(a,u)})}else if(n.type==="unique-value"){const{visualVariables:o}=n;ei(s,a=>{const u=ap(a,n,o);this.render(a,u)})}else if(n.type==="class-breaks"){const{visualVariables:o}=n;ei(s,a=>{const u=up(a,n,o);this.render(a,u)})}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 Zi);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 zc);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 jc);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 Ra),s=this.dv(new Ma);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,u=t==null?void 0:t.modelSymbol;let l;switch(t==null?void 0:t.runModel){case"ESHuman":l=this.dv(new po);break;case"ESCar":l=this.dv(new Rc);break;case"ESGltfModel":l=this.dv(new Ns)}if(this.d(this.sceneObject.components.disposableAdd(l)),u)for(let h in u)l[h]=u[h];const c=[0];for(var o=0;o<n.length-1;o+=1){const h=n[o],f=n[o+1],p=$S(h[1],h[0],f[1],f[0]);c.push(c[o]+Math.ceil(p/a)*1e3)}i.timeStamps=c,t!=null&&t.runSpeed&&(i.currentPositionChanged.don(h=>{i.currentPosition&&(l.position=i.currentPosition,i.currentRotation&&(l.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(h=>{i.path.currentTime=h}))}}_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=ZS(n,i/1e3),o=this.dv(new Ns);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})),u=QS(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]),l=this.dv(new go);this.d(this.sceneObject.components.disposableAdd(l)),l.height=i,l.extrudedHeight=o,l.filled=t.filled??!0,l.fillColor=t.fillColor,l.allowPicking=(t==null?void 0:t.allowPicking)??!0,l.extras={selected:!1},l.points=u}renderLabel(e,t){const{points:n}=e,i=JS(n);sp(this.sceneObject,i,e,t)}}function Ay(r,e){try{JSON.stringify(r[r.length-1])!==JSON.stringify(r[0])&&r.push(r[0]);const t=Ue.featureCollection(r.map(u=>Ue.point(u))),n=Ue.polygon([r]),i={gridType:"point",units:"meters"};return Ue.interpolate(t,e,i).features.map(u=>u.geometry.coordinates)[0][0].filter(u=>Ue.booleanPointInPolygon(Ue.point(u),n))}catch(t){return console.error(t),[]}}class sb extends V{constructor(e,t,n,i){super(),this.sceneObject=e;const s=t;if(i&&ei(s,o=>{this.renderLabel(o,i)}),n)if(n.type==="simple"){const{visualVariables:o}=n;ei(s,a=>{const u=op(a,n,o);this.render(a,u)})}else if(n.type==="unique-value"){const{visualVariables:o}=n;ei(s,a=>{const u=ap(a,n,o);this.render(a,u)})}else if(n.type==="class-breaks"){const{visualVariables:o}=n;ei(s,a=>{const u=up(a,n,o);this.render(a,u)})}else console.error("PolyLineLayer: renderer type is not supported")}renderLabel(e,t){const{points:n}=e;console.log("PolygonLayer: renderLabel",n);const i=KS(n);sp(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:u,color:l,stroked:c}=s,h=this.dv(new At);this.d(this.sceneObject.components.disposableAdd(h)),h.stroked=c??!1,h.strokeColor=l??[1,1,1,1],h.strokeWidth=u??1,h.filled=o??!0,h.fillGround=a??!1,h.fillColor=i??[1,1,1,1],h.allowPicking=(t==null?void 0:t.allowPicking)??!0,h.extras={selected:!1},h.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 go);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:u}=t,l=Ay(n,s??10),c=this.dv(new Ns);this.d(this.sceneObject.components.disposableAdd(c)),c.url=o,c.instances=l.map(h=>({position:[...h,i??0],rotation:a??[0,0,0],scale:u??[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:u,anchor:l}=t,h={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:[...Ay(n,s??10).map(p=>[...p,i??0])]}}]},f=this.dv(new dl);this.d(this.sceneObject.components.disposableAdd(f)),f.textDefaultText="",f.imageUrl=u,l&&(f.imageAnchor=l),o&&(f.imageOffset=o),a&&(f.imageSize=a),f.url=h}}class ob extends V{constructor(t,n){super();d(this,"_initEvent",this.dv(new I));const i=this,s=async()=>{try{const a=t.featureProps;if(!a)return;const{heightMode:u,features:l,layerType:c,url:h}=a;let f=[];if(!l&&h){let p=await fetch(h).then(m=>m.json());return p=(p==null?void 0:p.features)??p,c==="polylineVector"?f=await xy(n,p,u):c==="polygonVector"?f=await Ny(n,p,u):c==="pointVector"&&(f=await Ty(n,p,u)),f}else c==="polylineVector"?f=await xy(n,l,u):c==="polygonVector"?f=await Ny(n,l,u):c==="pointVector"&&(f=await Ty(n,l,u));return f}catch(a){console.error(a);return}},o=this.dv(ge(this._initEvent,t.featurePropsChanged));i.dv(new le(o,()=>{if(!t.featureProps)return;const a=t.featureProps;let u;return(async()=>{const{layerType:c,renderer:h,labelingInfo:f}=a,p=await s();!p||p.length===0||(c==="pointVector"?u=new rb(t,p,h,f):c==="polylineVector"?u=new ib(t,p,h,f):c==="polygonVector"&&(u=new sb(t,p,h,f)),console.log("polygonVectorLayer","createLayer",u))})().catch(console.error),{destroy:()=>{var c;(c=u==null?void 0:u.destroy)==null||c.call(u),u=void 0}}}));{const a=(u,l=1)=>{const c=$v(u);if(!c)return;const{center:h,radius:f}=c;n.flyTo({distance:f*4,heading:0,pitch:-90,flyDuration:l??1,hDelta:0,pDelta:0},h)};i.d(t.flyToEvent.don(async u=>{const{featureProps:l}=t;if(!l)return;const c=await s();if(!c)return;let h=[];l.layerType==="polylineVector"?h=c.map(f=>f.points).flat():l.layerType==="polygonVector"?h=c.map(f=>f.points).flat():l.layerType==="pointVector"&&(h=c.map(f=>f.points)),h.length!==0&&a(h,u)}))}}init(){this._initEvent.emit()}}const hu=class hu extends Rt{constructor(t){super(t);d(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 ob(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(zs(n.showChanged,()=>{for(const i of n.components.values())Reflect.has(i,"show")&&(i.show=n.show)},{immediate:!0}))}};d(hu,"createDefaultProps",()=>({...Rt.createDefaultProps(),featureProps:jt(void 0)})),d(hu,"type",hu.register("ESFeatureLayer",hu,{chsName:"矢量图层",tags:["ESObjects"],description:"ESFeatureLayer"}));let lp=hu;const ns=class ns extends V{constructor(){super();d(this,"_loading",!1);d(this,"_loadedEvent",this.disposeVar(new I));d(this,"_loaded",!1);d(this,"_loadedPromiseResolve");d(this,"_loadedPromise",new Promise(t=>{this._loadedPromiseResolve=t}));d(this,"_processing",this.disposeVar(Fn(async t=>{if(this._loading=!0,window.Hls)console.info("可能系统已经加载hlsjs,此处不再加载!");else{const n=Z.context.getStrFromEnv(ns.path);await t.promise(dh(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}};d(ns,"path","${xr-utils-script-dir}/xr-static/xr-utils/hlsjs/1.4.12/hls.min.js"),d(ns,"_instance");let Gc=ns,ab=class extends V{constructor(t,n){super();d(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 ub extends V{constructor(t,n){super();d(this,"_videoDom");d(this,"_processing",this.disposeVar(Fn(async t=>{const{videoSrc:n}=this,i=Gc.instance();await t.promise(i.loadedPromise);const s=window.Hls,o=new s,a=this.element;await Gs(t,()=>new Promise((u,l)=>{a.xbsjHLS=o,o.attachMedia(a),o.on(s.Events.MEDIA_ATTACHED,()=>{o.loadSource(n),o.on(s.Events.MANIFEST_PARSED,(c,h)=>{a.play(),u()})}),o.on(s.Events.ERROR,(c,h)=>{const{type:f,details:p,fatal:m}=h;m&&(o.destroy(),l(p))})}))})));d(this,"_processingStartup",this._processing.start());this._complexImage=t,this._videoSrc=n,this._videoDom=this.disposeVar(new ab(this._complexImage,""))}get videoSrc(){return this._videoSrc}get videoDom(){return this._videoDom}get element(){return this.videoDom.element}get processing(){return this._processing}}class Fy extends V{constructor(t,n){super();d(this,"_videoDom");d(this,"_update",this.disposeVar(Go(()=>this.update())));d(this,"_updateStart",this._update.start());this._complexImage=t,this._imageUri=n,this._videoDom=this.disposeVar(new ub(this._complexImage,this._imageUri))}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 rs=class rs extends V{constructor(){super();d(this,"_loading",!1);d(this,"_loadedEvent",this.disposeVar(new I));d(this,"_loaded",!1);d(this,"_loadedPromiseResolve");d(this,"_loadedPromise",new Promise(t=>{this._loadedPromiseResolve=t}));d(this,"_processing",this.disposeVar(Fn(async t=>{if(this._loading=!0,window.flvjs)console.info("可能系统已经加载flvjs,此处不再加载!");else{const n=Z.context.getStrFromEnv(rs.path);await t.promise(dh(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 rs._instance=rs._instance||new rs,rs._instance}};d(rs,"path","${xr-utils-script-dir}/xr-static/xr-utils/flvjs/1.6.2/flv.min.js"),d(rs,"_instance");let Wc=rs;class lb extends V{constructor(t,n){super();d(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 cb extends V{constructor(t,n){super();d(this,"_videoDom");d(this,"_processing",this.disposeVar(Fn(async t=>{const{videoSrc:n}=this,i=Wc.instance();await t.promise(i.loadedPromise);const s=window.flvjs,o=this.element;await Gs(t,()=>new Promise((a,u)=>{if(!s.isSupported()){u("flvjs不支持!");return}var l=s.createPlayer({type:"flv",url:n});l.attachMediaElement(o),l.load(),l.play(),o.xbsjFlvPlayer=l}))})));this._complexImage=t,this._videoSrc=n,this._videoDom=this.disposeVar(new lb(this._complexImage,"")),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 ky extends V{constructor(t,n){super();d(this,"_videoDom");d(this,"_update",this.disposeVar(Go(()=>this.update())));d(this,"_updateStart",this._update.start());this._complexImage=t,this._imageUri=n,this._videoDom=this.disposeVar(new cb(t,this._imageUri))}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 Vy(r){const e=r.substring(r.lastIndexOf(".")+1);return vl.suffixTypes[e]}class vl extends V{constructor(){super();d(this,"_enabled",this.disposeVar(B(!1)));d(this,"_uri",this.disposeVar(B("")));d(this,"_type",this.disposeVar(B(void 0)));d(this,"_size",this.disposeVar(Ht(void 0)));d(this,"_pixelFormat",this.disposeVar(B("RGBA")));d(this,"_flipY",this.disposeVar(B(!0)));d(this,"_crossOriginReact",this.disposeVar(B("")));d(this,"_autoplayReact",this.disposeVar(B(!0)));d(this,"_loopReact",this.disposeVar(B(!0)));d(this,"_copyTextureEvent",this.disposeVar(new I));d(this,"_imageProcessingResettingEvent",this.disposeVar(ge(this.enabledChanged,this.uriChanged,this.typeChanged)));d(this,"_imageProcessingResetting",this.disposeVar(new le(this._imageProcessingResettingEvent,()=>{do{if(!this.enabled||!this.uri)break;let{type:t}=this;if(t||(t=Vy(this.uri)),!t)break;if(t==="img")return new ug(this,this.uri);if(t==="video")return new hg(this,this.uri);if(t==="gif")return new wg(this,this.uri);if(t==="hls")return new Fy(this,this.uri);if(t==="flv")return new ky(this,this.uri)}while(!1)})));d(this,"_createNativeTextureEvent",this.disposeVar(ge(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})}}d(vl,"types",cg),d(vl,"czmPixelFormats",lg),d(vl,"suffixTypes",{png:"img",jpg:"img",svg:"img",webp:"img",gif:"gif",mp4:"video",mov:"video",webm:"video",flv:"flv",m3u8:"hls"});const hb=[0,0,0,0];class db{constructor(){d(this,"_value",[]);d(this,"_valueStr","[]");d(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 I),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=Rl(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=hb;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 fb extends V{constructor(){super(...arguments);d(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 u=o;for(;o!=="ESSceneObject"&&(s=s.getParentClass(),!!s);)if(o=s.type,a=i.get(o),a)return console.warn(`未找到${u}在${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 mo(t,n);return s.createdEvent.emit(),s}}}class pb extends V{constructor(){super(...arguments);d(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 mo(t,n);return s.createdEvent.emit(),s}}}const Cr=class Cr extends V{constructor(t,n,i=!1){super();d(this,"_createdEvent",this.dv(new I));d(this,"_id",++Cr._accumId);this._sceneObject=t,this._viewer=n;{if(i)return;const s=(o,a)=>{for(let u of o)this._viewer.delete(u);for(let u of a)u.parentID=this.sceneObject.id,this._viewer.add(u)};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}};d(Cr,"context",new fb),d(Cr,"contextEditing",new pb),d(Cr,"register",Cr.context.register.bind(Cr.context)),d(Cr,"registerEditing",Cr.contextEditing.register.bind(Cr.contextEditing)),d(Cr,"_accumId",-1);let mo=Cr;function By(r){return typeof r=="string"?document.getElementById(r):r}function cp(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 jy extends V{constructor(t,n){super();d(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=t,this._createSceneObjectListeningFunc=n;const i=this._listeningSceneObjects,s=(o,a)=>{if(o)for(let u of o){const l=i.get(u);l&&(l.destroy(),i.delete(u))}if(a)for(let u of a){if(i.get(u)){console.warn(`listeningSceneObjects已存在某对象:${u.name}`,u);debugger}const c=this.createSceneObjectListeningFunc(u);c&&i.set(u,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 gb extends V{constructor(e){super(),this._esObjectsManager=e;{const t=this._esObjectsManager;class n extends V{constructor(s){super(),this._esPath=s,this.dv(new le(t.activeViewerChanged,()=>{const o=t.activeViewer;if(!o)return;class a extends V{constructor(l){if(super(),this._esPath=l,!o)throw new Error("!viewer");const c=()=>{const h=t.activeViewer;h&&(this._esPath.path.currentTime=h.simulationTime)};c(),this.d(o.simulationTimeChanged.don(c))}}return new a(this._esPath)}))}}this.dv(new jy(t.sceneObjectsManager,i=>{if(i instanceof Ra)return new n(i)}))}{const t=this._esObjectsManager;class n extends V{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 jy(t.sceneObjectsManager,i=>{if(i instanceof Ma)return new n(i)}))}}}class mb extends V{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 vb extends V{constructor(t){super();d(this,"_player");d(this,"_channels",this.dv(at([])));this._objectManager=t,this._player=this._objectManager.player,this.dv(new le(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=Z.getSceneObjById(s.pathId);if(!o||!(o instanceof Ra))continue;const u=s.sceneObjectIds.map(l=>Z.getSceneObjById(l)).filter(l=>l!==void 0);u.length!==0&&n.push({path:o,sceneObjects:u})}if(n.length!==0)return new mb(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 qc(r){if(r.data){const{type:e,value:t}=r.data;if(e==="UITreeA"&&t instanceof an){const{sceneObject:n}=t;if(n)return n.id}}}function yb(r,e){const{property:t,customEventName:n,otherParams:i}=e,{dragstartDataMananger:s}=r;if(!(t instanceof Xo)){if(!(t instanceof Tg)){if(t instanceof ut){const[o,a]=Ni(t.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;qc(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const l=qc(s);l!==void 0&&a(l)}}else if(t instanceof Sg){const[o,a]=Ni(t.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;qc(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");const u=i[0].$event,l=i[0].strinsPropDom,c=i[0].index;u.preventDefault();const h=qc(s);if(h!==void 0){l[c].firstChild.value=h;const f=new Event("input",{bubbles:!0,cancelable:!0});l[c].firstChild.dispatchEvent(f)}}}else if(t instanceof bg){const[o,a]=Ni(t.reactVar)}}}}function zy(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 _b=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class wb extends V{constructor(e,t){super(),this._sceneObject=e;const n=this._sceneObject;for(let i of _b){const s=i+"Changed",o=n[s];if(o){{const a=n[i];zy(n,i,a,t)}this.dispose(o.disposableOn((a=>zy(n,i,a,t))))}}}get sceneObject(){return this._sceneObject}}class Eb extends V{constructor(){super();d(this,"_currentActiveEditing",this.disposeVar(Ht(void 0)));d(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}})),Z.context.sceneObjCreatedEvent.don(t=>{t.dv(new wb(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 Cb extends V{constructor(){super();d(this,"_sceneObjects",new Set);d(this,"_sceneObjectsToChange",this.dv(new I));this.d(()=>{const t=lh(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=Z.context.createSceneObject(t,n);return i&&this.addSceneObject(i),i}createSceneObjectFromUrl(t,n){const i=Z.context.createSceneObjectFromUrl(t,n);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(t,n){const i=Z.context.createSceneObjectFromClass(t,n);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(t){const n=Z.context.createSceneObjectFromJson(t);return n&&this.addSceneObject(n),n}}class Sb extends V{constructor(t){super();d(this,"_enabled",this.dv(B(!1)));d(this,"_cursorPosition",B(void 0));d(this,"quickPickPosition",!0);let n=new V;const i=()=>{n&&(n.destroy(),n=void 0)};this.d(i);const s=()=>{if(i(),!t||!this._enabled.value)return;n=new V;const o=n.dv(B(void 0)),a=n.dv(ge(o.changed));n.d(t.pointerMoveEvent.don(l=>{l.pointerEvent&&(o.value=Ke(l.pointerEvent))}));const u=n.dv(Fn(async l=>{if(o.value)if(this.quickPickPosition){const c=await l.promise(Uo(t.quickPickPosition(o.value)));this._cursorPosition.value=c}else{const c=await l.promise(Uo(t.pickPosition(o.value)));this._cursorPosition.value=c}}));n.d(a.don(()=>{u.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 bb extends V{constructor(t){super();d(this,"cursorPositionInfo");this.viewer=t,this.cursorPositionInfo=this.dv(new Sb(this.viewer))}}class Pb extends V{constructor(t){super();d(this,"viewer");const n=this.viewer=t;this.ad(new le(n.rollerShutterChanged,()=>{const i=n.container;if(!i||!n.rollerShutter)return;const s=new V;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 Ib extends V{constructor(t){super();d(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new Pb(t))}}function Uy(r,e){return r.length===e.length&&r.every((t,n)=>t===e[n])}class xb extends V{constructor(e){super(),this._viewer=e,this.d(j([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class Tb extends V{constructor(e,t){super(),this._viewer=e,this._activeViewer=t;const n=Wr.createCommonProps(),i=[];Object.keys(n).forEach(u=>{const l=this._activeViewer[u+"Changed"];i.push(l)});const s=this.dv(ge(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(n).forEach(u=>{this._viewer[u]=this._activeViewer[u]})};this.d(s.don(o));const a=this.dv(Eu());a.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const u=this._activeViewer.getCurrentCameraInfo(),l=this._viewer.getCurrentCameraInfo();if(!u)return;const{position:c,rotation:h}=u;l&&Uy(c,l.position)&&Uy(h,l.rotation)||this._viewer.flyIn(c,h,0)}),this.d(()=>a.cancel())}}const Nb=`<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">
|
|
488
488
|
<animateTransform values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" repeatCount="indefinite" type="rotate" attributeName="transform"></animateTransform>
|
|
489
489
|
</circle><g></g></g></svg>
|
|
490
|
-
`,X0='<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>',Y0='<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>',Xs=class Xs extends q{constructor(t){super();const e=()=>{const r=this.dv(new al);this.d(p.track([r,"show"],[t,"useDefaultStatusDiv"]));{const i=()=>{r.show=(t.useDefaultStatusDiv??!0)&&t.status!=="Created"};i(),this.d(t.useDefaultStatusDivChanged.don(i)),this.d(t.statusChanged.don(i)),r.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}t.add(r),this.d(()=>t.delete(r)),r.instanceClass=class extends q{constructor(o,a,u){super();f(this,"_div",document.createElement("div"));if(this._subContainer=o,!u)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const v=()=>{a.show?this._div.style.opacity="1":this._div.style.opacity="0"};v(),this.d(a.showChanged.don(v))}let l,c,h,d,g;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",c=document.createElement("div"),l.appendChild(c),c.style.pointerEvents="none",c.style.display="block",c.style.width="40px",c.innerHTML=Xs.defaultsSvg.loadingSvg,c.style.filter="drop-shadow(0px 0px 1px black)",h=document.createElement("div"),l.appendChild(h),h.style.pointerEvents="none",h.style.marginLeft="10px",h.style.display="flex",h.style.flexFlow="column",h.style.maxWidth="300px",d=document.createElement("div"),h.appendChild(d),d.style.fontSize="14px",d.style.fontWeight="800",d.style.marginBottom="5px",d.style.textShadow="0 0 2px black",g=document.createElement("div"),h.appendChild(g),g.style.fontWeight="400",g.style.textShadow="0 0 2px black";{const v=()=>{let C="Raw";u.status==="Raw"?C="初始状态":u.status==="Creating"?C="正在创建":u.status==="Created"?C="创建完成":u.status==="Error"?C="创建失败":u.status==="Reconnecting"&&(C="重新连接"),d.innerText=`${C}(${u.status})`,g.innerText=`${u.statusLog}`,(u.status==="Creating"||u.status==="Reconnecting")&&(c.innerHTML=Xs.defaultsSvg.loadingSvg),u.status==="Created"&&(c.innerHTML=Xs.defaultsSvg.successSvg),u.status==="Error"&&(c.innerHTML=Xs.defaultsSvg.warnSvg)};v();const E=this.dv(p.createNextAnimateFrameEvent(u.statusLogChanged,u.statusChanged));this.d(E.don(v))}}update(){const o=255*Math.random()|0,a=255*Math.random()|0,u=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${a}, ${u}, 0.8)`}}};this.d(t.containerChanged.don(()=>{e()}))}};f(Xs,"defaultsSvg",{loadingSvg:q0,successSvg:X0,warnSvg:Y0});let rf=Xs;class H0 extends q{constructor(t,e,r){super(),this._subContainer=t,this._overlayContainer=e,this._viewer=r;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 u=()=>{i.style.display=o.show??!0?"block":"none"};u(),this.d(o.showChanged.don(u));const l=()=>{i.style.opacity=`${o.opacity??1}`};l(),this.d(o.opacityChanged.don(l))}}function ml(n){let t=p.getExtProp(n,"_relativeContainer");return t||(t=document.createElement("div"),t.style.position="relative",t.style.width="100%",t.style.height="100%",t.style.padding="0",t.style.margin="0",n.appendChild(t),p.setExtProp(n,"_relativeContainer",t)),t}class B0 extends q{constructor(e,r){super();f(this,"_subContainer",document.createElement("div"));f(this,"_overlayContainer",document.createElement("div"));f(this,"_containerStyleController");this._container=e,this._viewer=r,this._containerStyleController=this.dv(new H0(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"),ml(this._container).appendChild(i),this.d(()=>ml(this._container).removeChild(i)),ml(this._container).appendChild(s),this.d(()=>ml(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 J0 extends q{constructor(){super(...arguments);f(this,"registerObjsMap",new Map)}register(e,r){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,r),e}getViewerConstructor(e){const r=this.registerObjsMap.get(e);if(!r){console.warn(`未找到${e}类!`);return}return r}createViewer(e){const r=e.type;console.log(e);const i=this.getViewerConstructor(r);if(!i)throw new Error(`没有找到类型为${r}的Viewer构造器!`);return new i(e)}}class Lg extends q{constructor(t,e,r=!1,i=!1){if(super(),this._viewer=t,!e)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(p.DomElementEvent.create(e,"pointerdown")),o=this.dv(p.DomElementEvent.create(e,"pointermove")),a=this.dv(p.DomElementEvent.create(e,"pointerup")),u=this.dv(p.DomElementEvent.create(e,"pointerout")),l=this.dv(p.DomElementEvent.create(e,"pointerover")),c=this.dv(new p.PointerClick),h=this.dv(new p.PointerHover),d=()=>{const _=this._viewer.hoverTime*1e3;h.delayTime=_};this.d(this._viewer.hoverTimeChanged.don(()=>{d()})),this.d(s.don(_=>c.pointerDown(_))),this.d(o.don(_=>c.pointerMove(_))),this.d(a.don(_=>c.pointerUp(_))),this.d(u.don(_=>c.pointerOut(_))),this.d(s.don(_=>h.pointerDown(_))),this.d(o.don(_=>h.pointerMove(_))),this.d(a.don(_=>h.pointerUp(_))),this.d(u.don(_=>h.pointerOut(_)));const{x:g,y:v}=e.getBoundingClientRect(),E=i?g:0,C=i?v:0;this.d(h.hoverEvent.don(_=>{const[S,I]=p.getDomEventCurrentTargetPos(_,r);this._viewer.hoverEvent.emit({screenPosition:[S+E,I+C],pointerEvent:_})})),this.d(c.clickEvent.don(_=>{const[S,I]=p.getDomEventCurrentTargetPos(_,r);this._viewer.clickEvent.emit({screenPosition:[S+E,I+C],pointerEvent:_})})),this.d(c.dbclickEvent.don(_=>{const[S,I]=p.getDomEventCurrentTargetPos(_,r);_.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[S+E,I+C],pointerEvent:_})})),this.d(s.don(_=>{const[S,I]=p.getDomEventCurrentTargetPos(_,r);_.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[S+E,I+C],pointerEvent:_})})),this.d(a.don(_=>{const[S,I]=p.getDomEventCurrentTargetPos(_,r);_.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[S+E,I+C],pointerEvent:_})})),this.d(o.don(_=>{const[S,I]=p.getDomEventCurrentTargetPos(_,r);this._viewer.pointerMoveEvent.emit({screenPosition:[S+E,I+C],pointerEvent:_})})),this.d(l.don(_=>{const[S,I]=p.getDomEventCurrentTargetPos(_,r);this._viewer.pointerOverEvent.emit({screenPosition:[S+E,I+C],pointerEvent:_})})),this.d(u.don(_=>{const[S,I]=p.getDomEventCurrentTargetPos(_,r);this._viewer.pointerOutEvent.emit({screenPosition:[S+E,I+C],pointerEvent:_})}));const b=this.dv(p.DomElementEvent.create(e,"keydown"));this.d(b.don(_=>this._viewer.keyDownEvent.emit(_)));const m=this.dv(p.DomElementEvent.create(e,"keyup"));this.d(m.don(_=>this._viewer.keyUpEvent.emit(_)));const y=this.dv(p.DomElementEvent.create(e,"wheel"));this.d(y.don(_=>this._viewer.wheelEvent.emit(_)))}}class j0 extends q{constructor(e){super();f(this,"viewer");const r=this.viewer=e;this.ad(new p.ObjResettingWithEvent(r.rollerShutterChanged,()=>{const i=r.container;if(!i||!r.rollerShutter)return;const s=new q;this.viewer.splitPosition=.5;let o=this.getRollerShutterDIV();return i.appendChild(o),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(o)}),s}))}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 r=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",r)}),document.addEventListener("mouseup",i=>{e.style.cursor="default",document.removeEventListener("mousemove",r)}),e}}class Z0 extends q{constructor(e){super();f(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new j0(e))}}const Ii=class Ii extends q{constructor(e){super();f(this,"_forceRecreateEvent",this.dv(new V));f(this,"_container",this.dv(p.react(void 0)));f(this,"_containerSize",this.dv(p.react(void 0)));f(this,"_editingEvent",this.disposeVar(new V));f(this,"_status",this.dv(p.react("Raw")));f(this,"_statusLog",this.dv(p.react("")));f(this,"_statusContainer",this.dv(new rf(this)));f(this,"_useCustomInteraction",this.dv(p.react(!0)));f(this,"_resetInteractionEvent",this.dv(p.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));f(this,"_interactionResetting",this.dv(new p.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new Lg(this,this.container)})));f(this,"_viewerChanged",this.dv(new V));f(this,"_cameraChanged",this.dv(new V));f(this,"_containerResetEvent",this.dv(p.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));f(this,"_containerResetting",this.dv(new p.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new B0(this.container,this)})));f(this,"_sceneObjectsMap",new Map);f(this,"_id");f(this,"_typeName");f(this,"_updateFuncReact",this.dv(p.react(void 0)));f(this,"_toDestroyFuncReact",this.dv(p.react(void 0)));f(this,"_statusInfo",Ii.defaults.statusInfo);f(this,"_navigationMode",this.dv(p.react("Map")));f(this,"_syncViewer",this.dv(p.react(void 0)));f(this,"_syncEventDon",this.dv(new p.ObjResettingWithEvent(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new W0(this,e)})));f(this,"_timeSyncdon",this.dv(new p.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new G0(this)})));f(this,"_hoverEvent",this.dv(new V));f(this,"_pointerOverEvent",this.dv(new V));f(this,"_pointerMoveEvent",this.dv(new V));f(this,"_pointerDownEvent",this.dv(new V));f(this,"_pointerUpEvent",this.dv(new V));f(this,"_pointerOutEvent",this.dv(new V));f(this,"_clickEvent",this.dv(new V));f(this,"_dblclickEvent",this.dv(new V));f(this,"_keyDownEvent",this.dv(new V));f(this,"_keyUpEvent",this.dv(new V));f(this,"_wheelEvent",this.dv(new V));f(this,"_actived",this.dv(p.react(!1)));this._id=e.id??p.createGuid();const r=xg(e.container);if(r)this._container.value=ef(r),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{r&&(this.show??!0?r.style.display="block":r.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[a,u]of i.entries())if(!u&&a){const l=is.context.createEngineObject(a,this);l&&i.set(a,l)}},o=()=>{for(let[a,u]of i.entries())u&&!u.isDestroyed()&&u.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||p.createAnimateFrame(),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 Z0(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 r=document.getElementById(e);r&&r instanceof HTMLDivElement?this._container.value=ef(r):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=ef(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 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 r of e)if(!this.has(r)){j.context.addSceneObject(r);const i=is.context.createEngineObject(r,this);i&&this._sceneObjectsMap.set(r,i),r.viewerAttached.emit(this)}}delete(...e){for(let r of e)if(this.has(r)){const i=this._sceneObjectsMap.get(r);i&&i.destroy(),j.context.deleteSceneObject(r),this._sceneObjectsMap.delete(r),r.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 Ii.createDefaultProps()}_getJson(e=!0){const r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof p.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_setJson(e,r,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 s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof p.ReactiveVariable&&(u=u.value),this[a]=u}}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}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(r){console.warn(`时间格式不正确! value: ${e} error: ${r}`)}}async getVersion(){return window.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:[]}}getProperties(e){const r={...this.getESProperties()},i=[];return r.general.length>0&&i.push(new $(r.general,"general")),Object.keys(r).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&r[s].length>0&&i.push(new $(r[s],s))}),i}};f(Ii,"context",new J0),f(Ii,"register",Ii.context.register.bind(Ii.context)),f(Ii,"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]});let Cn=Ii;(n=>{n.createBaseProps=()=>({name:"未命名场景对象",extras:p.reactJson(void 0),devTags:p.reactArrayWithUndefined(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:256,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:p.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:p.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:p.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:n.defaults.terrainShader,splitPosition:p.react(void 0),rollerShutter:!1,cameraMovableRegion:p.reactArrayWithUndefined(void 0)}),n.createDefaultProps=()=>({...(0,n.createBaseProps)(),...(0,n.createCommonProps)()})})(Cn||(Cn={})),p.extendClassProps(Cn.prototype,Cn.createDefaultProps);function Ag(n,t){const e=n._lastCameraInfo;if(e){const r=t.viewerChanged.don(i=>{if(!i||!e)return;const{position:s,rotation:o}=e;t.flyIn(s,o,0),n._lastCameraInfo=void 0,r()})}}const K0=n=>{const t=Cn.createCommonProps(),e={};try{Object.keys(t).forEach(r=>{e[r]=n[r]})}catch(r){console.warn(r)}return e},Rg=(n,t)=>{const e=Cn.createCommonProps();try{Object.keys(e).forEach(r=>{n[r]=t[r]})}catch(r){console.warn(r)}};class Q0 extends q{constructor(e){super();f(this,"_viewersChanged",this.disposeVar(new V));f(this,"_viewers",new Set);f(this,"_viewersToChange",this.dv(new V));this._sceneObjectsManager=e,this.d(()=>{for(const r of this._viewers)this.destroyViewer(r);this._viewers.clear()}),this.viewers.forEach(r=>{const i=this._sceneObjectsManager.sceneObjects;r.add(...i)}),this.d(()=>{const r=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...r)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((r,i)=>{this.viewers.forEach(s=>{i.forEach(o=>{ei(s.devTags,o.devTags)&&(s.has(o)?console.warn(`${s.typeName}中已存${o.typeName},检查逻辑是否有问题!`):s.add(o))}),r.forEach(o=>{ei(s.devTags,o.devTags)&&(s.has(o)?s.delete(o):console.warn(`${s.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(o=>{o.has(s)&&o.delete(s),console.log("sceneObjectsToChange",o.devTags,s.devTags,ei(o.devTags,s.devTags)),ei(o.devTags,s.devTags)&&(o.has(s)?console.warn(`${o.typeName}中已存${s.typeName},检查逻辑是否有问题!`):o.add(s))})}))})})),this.d(this.viewersChanged.don((r,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(o=>{for(let a of s)ei(o.devTags,a.devTags)&&(o.has(a)?console.warn(`${o.typeName}中已存${a.typeName},检查逻辑是否有问题!`):o.add(a))}),r.forEach(o=>{for(let a of s)ei(o.devTags,a.devTags)&&(o.has(a)?o.delete(a):console.warn(`${o.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(()=>{o.clearAllSceneObjects();const a=this._sceneObjectsManager.sceneObjects;for(let u of a)console.log("viewersChanged",o.devTags,u.devTags,ei(o.devTags,u.devTags)),ei(o.devTags,u.devTags)&&(o.has(u)?console.warn(`${o.typeName}中已存${u.typeName},检查逻辑是否有问题!`):o.add(u))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const r=Cn.context.createViewer(e);return this._viewers.add(r),this._viewersChanged.emit([],[r]),r}destroyViewer(e){return e.isDestroyed()?!0:(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed())}}class Ji extends q{constructor(...e){super();f(this,"_drgm",this.dv(new Pf));f(this,"_sobjm",this.dv(new U0));f(this,"_vrm",this.dv(new Q0(this._sobjm)));f(this,"_sceneObjectEditingManager",this.disposeVar(new z0));f(this,"_activeViewer",this.dv(p.react(void 0)));f(this,"_syncOtherViewersToActived",this.dv(p.react(!1)));f(this,"_cmrvm",this.createSceneObjectFromClass(il));f(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));f(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});f(this,"_sceneTree",this.dv(new Qa("default",this.dragstartDataMananger,24,this)));f(this,"_propUiTreeManager",this.dv(new Oo(24)));f(this,"_sceneTreeMap",new Map);f(this,"_viewerCreatedEvent",this.dv(new V));f(this,"_lastCameraInfo");f(this,"_lastActiveViewerJson");f(this,"_syncEventDonFunc",this.d(Hs([this.activeViewerChanged,this.syncOtherViewersToActivedChanged],()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(r=>{e?r.syncOtherViewer(this.activeViewer):r.syncOtherViewer(void 0)})})));f(this,"_player",this.createSceneObjectFromClass(Ao));f(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));f(this,"_esPlyarAndPathTime",this.dv(new L0(this)));f(this,"_pathAnimationManager",this.dv(new R0(this)))}static get envs(){return j.context.environmentVariables}getSceneObjectById(e){return j.getSceneObjectById(e)}getSceneObject(e){return j.getSceneObject(e)}get $refs(){return j.$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.values().forEach(r=>r.actived=r===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 json(){var h;const e=this._asset.createdTime||new Date().toISOString(),r=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:r,name:i},a=this.sceneTree.json,u=this._cmrvm.views,l=[...this._vrm.viewers].map(d=>d.json),c=(h=this.activeViewer)==null?void 0:h.getCurrentCameraInfo();return{asset:o,viewers:l,sceneTree:a,viewCollection:u,lastView:c}}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._vrm.viewers.size===0||e.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.viewers.forEach(r=>{const i=e.viewers.find(s=>s.id===r.id);i&&(r.json=i)})}catch(r){console.error(`ESObjectsManager解析json数据时发生错误! error: ${r}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(e){return F0(this,e)}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,r=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new Qa(e,this.dragstartDataMananger,r,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const r=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=r);const i=this.d(r.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(r),i())}));return r}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,r=!0,i=!0,s=!0){var l;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&r&&(this._lastCameraInfo=(l=this.activeViewer)==null?void 0:l.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?K0(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=e.id,a=o?[...this.getViewers()].find(c=>c.id===o):[...this.getViewers()].find(c=>c.typeName===e.type);if(a)if(o&&a.typeName!==e.type)console.warn(`id为${o}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(a);else return console.log("ESViewer exists, will be used"),r&&Ag(this,a),i&&this._lastActiveViewerJson&&(Rg(a,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),a.container===xg(e.container)?(a.containerOrId=e.container,a.forceRecreate()):a.containerOrId=e.container,this.activeViewer=a,a;console.log("No ESViewer exists, will be created");const u=this.createViewer(e);return console.log(e),console.log(this),r&&Ag(this,u),i&&this._lastActiveViewerJson&&(Rg(u,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=u,u}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:r,viewSync:i,attributeSync:s,destroy:o,id:a}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:r,id:a},i??!0,s??!0,o??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const r={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:s,attributeSync:o,destroy:a,id:u}=r;return this.switchViewer({type:"ESCesiumViewer",container:i,id:u},s,o,a)}}switchToUEViewer(...e){let r,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:u,uri:l,app:c,token:h,viewSync:d,attributeSync:g,destroy:v,id:E}=e[0];r={type:"ESUeViewer",container:u,id:E,options:{uri:l,app:c,token:h}},i={viewSync:d??!0,attributeSync:g??!0,destroy:v??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:u,ws:l,esmsg:c,viewSync:h,attributeSync:d,id:g,destroy:v}=e[0];r={type:"ESUeViewer",container:u,id:g,options:{ws:l,esmsg:c}},i={viewSync:h??!0,attributeSync:d??!0,destroy:v??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:u,project:l,baseUrl:c,viewSync:h,attributeSync:d,id:g,destroy:v}=e[0];r={type:"ESUeViewer",container:u,id:g,options:{project:l,baseUrl:c}},i={viewSync:h??!0,attributeSync:d??!0,destroy:v??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(r={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(r={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(r={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(!r)throw new Error("参数错误");const{viewSync:s,attributeSync:o,destroy:a}=i;return this.switchViewer(r,s,o,a)}createCesiumViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(r={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createOpenLayersViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESOlViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(r={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESOlViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createUeViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?r={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?r={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0}}:r={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!r)throw new Error("参数错误");return this.createViewer(r)}createSceneObject(e,r){return this._sobjm.createSceneObject(e,r)}createSceneObjectFromUrl(e,r){return this._sobjm.createSceneObjectFromUrl(e,r)}createSceneObjectFromClass(e,r){return this._sobjm.createSceneObjectFromClass(e,r)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const r=this._sobjm.deleteSceneObject(e);return e.destroy(),r}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let r of e)r!=this._player&&r!=this._cmrvm&&this.destroySceneObject(r)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}f(Ji,"getSceneObjById",j.context.getSceneObjectById.bind(j.context)),f(Ji,"getEnv",j.context.getEnv.bind(j.context)),f(Ji,"setEnv",j.context.setEnv.bind(j.context)),(n=>{n.createDefaultProps=()=>({})})(Ji||(Ji={})),p.extendClassProps(Ji.prototype,Ji.createDefaultProps),w.BasePropTreeItem=Lc,w.Boolean2Property=fm,w.Boolean2sProperty=gm,w.Boolean3Property=dm,w.Boolean3sProperty=mm,w.Boolean4Property=pm,w.Boolean4sProperty=vm,w.BooleanProperty=W,w.BooleansProperty=im,w.ColorProperty=gt,w.ColorRgbProperty=wm,w.DashPatternProperty=Em,w.DateProperty=ss,w.DatesProperty=Ef,w.Destroyable=q,w.DoublyLinkedList=lf,w.DragStartDataManager=Pf,w.ES3DTileset=Jr,w.ESAlarm=Gc,w.ESApertureEffect=Wc,w.ESAreaMeasurement=qc,w.ESBlastParticleSystem=Xc,w.ESBoxClipping=Yc,w.ESCameraView=rl,w.ESCameraViewCollection=il,w.ESCameraVisibleRange=Hc,w.ESCar=sl,w.ESCityBasePoint=Wh,w.ESClassification=ol,w.ESClippingPlane=Bc,w.ESCustomDiv=al,w.ESCzml=qh,w.ESDataMesh=Jc,w.ESDatasmithRuntimeModel=Ih,w.ESDirectionMeasurement=gh,w.ESDistanceMeasurement=jc,w.ESDynamicWater=Ph,w.ESEntityCluster=Uh,w.ESExcavate=$a,w.ESFeatureLayer=tf,w.ESFireParticleSystem=Zc,w.ESForestTileset=Kc,w.ESGaussianSplatting=Bh,w.ESGeoDiv=Qc,w.ESGeoDivTextPoi=Gh,w.ESGeoExtrudedPolygon=bs,w.ESGeoJson=eu,w.ESGeoLineString=yi,w.ESGeoPoints=su,w.ESGeoPolygon=Tt,w.ESGeoRectangle=$c,w.ESGeoVector=pt,w.ESGeoWater=bh,w.ESGltfModel=Hi,w.ESHeatMap=pl,w.ESHeightLimitAnalysis=zh,w.ESHeightMeasurement=mh,w.ESHole=Dh,w.ESHuman=Ps,w.ESHumanPoi=Mh,w.ESImageLabel=ul,w.ESImageryLayer=eh,w.ESJEditingMode=B,w.ESJLonLatFormat=Sf,w.ESJPickedResult=xm,w.ESLabel=Nr,w.ESLevelRuntimeModel=Nh,w.ESLocalCircle=vh,w.ESLocalPolygon=ru,w.ESLocalPolygonZ=yh,w.ESLocalRectangle=_h,w.ESLocalSkyBox=rh,w.ESLocalVector=Mo,w.ESLocalVector2D=vi,w.ESLocationMeasurement=nh,w.ESMsTileset=Fh,w.ESNavigator=Xh,w.ESObjectWithLocation=Z,w.ESObjectsManager=Ji,w.ESParticleSystemPrimitive=ll,w.ESPath=Ro,w.ESPathImpl=Bi,w.ESPipeFence=fl,w.ESPipeline=Th,w.ESPipeserTileset=wh,w.ESPit=Lo,w.ESPlayer=Ao,w.ESPoi2D=tu,w.ESPoi3D=ih,w.ESPoiTileset=kh,w.ESPolygonFence=dl,w.ESPolygonFlattenedPlane=sh,w.ESPolygonWithHole=Sh,w.ESRectangle=Eh,w.ESRtsFeatureEditing=Rh,w.ESRtsTileset=Ah,w.ESScale=Vh,w.ESSceneObject=j,w.ESSceneObjectWithId=qm,w.ESSeparateFoliage=oh,w.ESSkylineAnalysis=jh,w.ESStaticMesh=Jh,w.ESSubmergingAnalysis=ah,w.ESSunshineAnalysis=uh,w.ESSurfaceAreaMeasurement=Ch,w.ESTerrainLayer=lh,w.ESTestObject=Uc,w.ESTextLabel=Do,w.ESUEWidget=ch,w.ESUnrealActor=hh,w.ESVideoFusion=fh,w.ESViewShed=dh,w.ESViewer=Cn,w.ESViewerStatusBar=Yh,w.ESViewerStatusBarScale=Hh,w.ESVisibilityAnalysis=xh,w.ESVisualObject=bt,w.ESVolumeMeasurement=Oh,w.ESWidget=ph,w.EngineObject=is,w.EnumProperty=lt,w.EnumStringsProperty=Sm,w.EvalStringProperty=bi,w.Event=V,w.EventListenerHandler=bl,w.FunctionProperty=tt,w.GroupPropTreeItem=Rc,w.GroupProperty=$,w.JsonProperty=H,w.LeafPropTreeItem=Ac,w.ListenerPipe=Pl,w.LongStringProperty=xl,w.MaximumScreenSpaceErrorProperty=rm,w.MinmaxProperty=Cm,w.NearFarScalerProperty=Im,w.NextAnimateFrameEvent=df,w.NonreactiveJsonStringProperty=yf,w.Number2Property=ce,w.Number2sProperty=mf,w.Number3Property=Re,w.Number3sProperty=Tl,w.Number4Property=rn,w.Number4WithUndefinedProperty=cm,w.Number4sProperty=hm,w.NumberProperty=T,w.NumberRangeProperty=Pm,w.NumberSliderProperty=ge,w.NumbersProperty=nm,w.ObjPool=Sl,w.ObservableSet=cu,w.ParamsProperty=vf,w.PickedInfo=Tm,w.Player=nn,w.PlayerProperty=hu,w.PositionProperty=Bs,w.PositionsProperty=_f,w.PositionsSetPropety=Nm,w.PropTree=Jp,w.PropUiTreeManager=Oo,w.Property=Pi,w.ReactVarProperty=ht,w.RotationProperty=Ol,w.SceneObjectFromId=Ll,w.SceneTree=Qa,w.SceneTreeContextMenu=tg,w.SceneTreeItem=qe,w.SceneTreeItemDragDrop=$p,w.SmartListenerHandler=ga,w.SmartListenerPipe=Hg,w.SmoothMoveController=X_,w.String2Property=sm,w.String2sProperty=gf,w.String3Property=om,w.String3sProperty=um,w.String4Property=am,w.String4sProperty=lm,w.StringNumberProperty=ym,w.StringNumbersProperty=_m,w.StringProperty=nt,w.StringsProperty=pf,w.TreeItemDragDrop=bf,w.UriProperty=ma,w.ViewPlayerProperty=wf,w.ViewerCustomInteraction=Lg,w.Watcher=va,w.WatcherTools=Of,w.WithUndefinedProperty=Nl,w.addTreesCallFunc=sg,w.animateFrame=jg,w.bindCustomEditing=xf,w.booleanPointInPolygon=Jm,w.cartesianDistance=Bp,w.clamp0_360=Js,w.clampN180_180=Tf,w.createEventsCallFunc=Hs,w.createPropTreeFromSceneObject=jp,w.cutDownTreesCallFunc=ug,w.defaultInitSceneObjectOnCreatingFunc=Am,w.defaultLight122FromEnvironmentMapManager=zc,w.defaultUpdateSceneObjectOnPickingFunc=Lm,w.destroyObject=sf,w.downloadLink=$g,w.equalsN3=kc,w.geoAlong=Qm,w.geoArea=Ul,w.geoBuffer=Wp,w.geoCenterOfMass=Ov,w.geoDestination=rd,w.geoDifference=qp,w.geoDistance=wu,w.geoHeading=Ia,w.geoIntersect=Up,w.geoLineIntersect=Uv,w.geoNearestPointOnLine=Xv,w.geoPointToLineDistance=Jv,w.geoPolygonFromCircle=Xp,w.geoPolygonOverlap=Mc,w.geoRhumbDestination=Kv,w.geoRhumbDistance=gd,w.geoRhumbHeading=$v,w.geoUnion=Gp,w.getDefaultValue=Vm,w.getDistancesFromPositions=Ka,w.getGeoBoundingSphereFromPositions=Hp,w.getMidpoint=Wv,w.getMinMaxCorner=Yp,w.getSceneObjectTreeItem=Rm,w.getXyzFromPostion=Dc,w.growthSimulationCallFunc=lg,w.hasSameTags=Nf,w.hasSameViewerTags=ei,w.inOrderRunning=zm,w.interval=Bg,w.isJSON=Ml,w.isXML=km,w.lbhToWebMerc=Hm,w.lbhToXyz=Mn,w.lerpAngle=du,w.lerpRotation=Dl,w.map=Zp,w.nextAnimateFrame=ff,w.nextMicroTask=Zg,w.oneTimeWarning=hf,w.optionsStr=Q_,w.reactPosition2Ds=Fc,w.registerCreatedEventUpdate=D_,w.registerEventCtor=of,w.registerEventUpdate=L_,w.removeAllTreesCallFunc=og,w.rpToap=Fm,w.saveOnBrowser=Qg,w.setSceneObjectTreeItem=fu,w.timeout=Jg,w.updateTreeParamsCallFunc=ag,w.webMercToLbh=Bm,w.xyzToLbh=Df,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})}));
|
|
490
|
+
`,Ob='<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>',Db='<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>',Lo=class Lo extends V{constructor(e){super();const t=()=>{const n=this.dv(new Ac);this.d(j([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 V{constructor(o,a,u){super();d(this,"_div",document.createElement("div"));if(this._subContainer=o,!u)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const m=()=>{a.show?this._div.style.opacity="1":this._div.style.opacity="0"};m(),this.d(a.showChanged.don(m))}let l,c,h,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",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",c=document.createElement("div"),l.appendChild(c),c.style.pointerEvents="none",c.style.display="block",c.style.width="40px",c.innerHTML=Lo.defaultsSvg.loadingSvg,c.style.filter="drop-shadow(0px 0px 1px black)",h=document.createElement("div"),l.appendChild(h),h.style.pointerEvents="none",h.style.marginLeft="10px",h.style.display="flex",h.style.flexFlow="column",h.style.maxWidth="300px",f=document.createElement("div"),h.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"),h.appendChild(p),p.style.fontWeight="400",p.style.textShadow="0 0 2px black";{const m=()=>{let E="Raw";u.status==="Raw"?E="初始状态":u.status==="Creating"?E="正在创建":u.status==="Created"?E="创建完成":u.status==="Error"?E="创建失败":u.status==="Reconnecting"&&(E="重新连接"),f.innerText=`${E}(${u.status})`,p.innerText=`${u.statusLog}`,(u.status==="Creating"||u.status==="Reconnecting")&&(c.innerHTML=Lo.defaultsSvg.loadingSvg),u.status==="Created"&&(c.innerHTML=Lo.defaultsSvg.successSvg),u.status==="Error"&&(c.innerHTML=Lo.defaultsSvg.warnSvg)};m();const w=this.dv(ge(u.statusLogChanged,u.statusChanged));this.d(w.don(m))}}update(){const o=255*Math.random()|0,a=255*Math.random()|0,u=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${a}, ${u}, 0.8)`}}};this.d(e.containerChanged.don(()=>{t()}))}};d(Lo,"defaultsSvg",{loadingSvg:Nb,successSvg:Ob,warnSvg:Db});let hp=Lo;class Mb extends V{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 u=()=>{i.style.display=o.show??!0?"block":"none"};u(),this.d(o.showChanged.don(u));const l=()=>{i.style.opacity=`${o.opacity??1}`};l(),this.d(o.opacityChanged.don(l))}}function Xc(r){let e=An(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),ti(r,"_relativeContainer",e)),e}class Rb extends V{constructor(t,n){super();d(this,"_subContainer",document.createElement("div"));d(this,"_overlayContainer",document.createElement("div"));d(this,"_containerStyleController");this._container=t,this._viewer=n,this._containerStyleController=this.dv(new Mb(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"),Xc(this._container).appendChild(i),this.d(()=>Xc(this._container).removeChild(i)),Xc(this._container).appendChild(s),this.d(()=>Xc(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 Lb extends V{constructor(){super(...arguments);d(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 Gy extends V{constructor(e,t,n=!1,i=!1){if(super(),this._viewer=e,!t)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(Qt.create(t,"pointerdown")),o=this.dv(Qt.create(t,"pointermove")),a=this.dv(Qt.create(t,"pointerup")),u=this.dv(Qt.create(t,"pointerout")),l=this.dv(Qt.create(t,"pointerover")),c=this.dv(new bh),h=this.dv(new Fp),f=()=>{const _=this._viewer.hoverTime*1e3;h.delayTime=_};this.d(this._viewer.hoverTimeChanged.don(()=>{f()})),this.d(s.don(_=>c.pointerDown(_))),this.d(o.don(_=>c.pointerMove(_))),this.d(a.don(_=>c.pointerUp(_))),this.d(u.don(_=>c.pointerOut(_))),this.d(s.don(_=>h.pointerDown(_))),this.d(o.don(_=>h.pointerMove(_))),this.d(a.don(_=>h.pointerUp(_))),this.d(u.don(_=>h.pointerOut(_)));const{x:p,y:m}=t.getBoundingClientRect(),w=i?p:0,E=i?m:0;this.d(h.hoverEvent.don(_=>{const[C,S]=Bo(_,n);this._viewer.hoverEvent.emit({screenPosition:[C+w,S+E],pointerEvent:_})})),this.d(c.clickEvent.don(_=>{const[C,S]=Bo(_,n);this._viewer.clickEvent.emit({screenPosition:[C+w,S+E],pointerEvent:_})})),this.d(c.dbclickEvent.don(_=>{const[C,S]=Bo(_,n);_.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[C+w,S+E],pointerEvent:_})})),this.d(s.don(_=>{const[C,S]=Bo(_,n);_.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[C+w,S+E],pointerEvent:_})})),this.d(a.don(_=>{const[C,S]=Bo(_,n);_.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[C+w,S+E],pointerEvent:_})})),this.d(o.don(_=>{const[C,S]=Ke(_,n);this._viewer.pointerMoveEvent.emit({screenPosition:[C+w,S+E],pointerEvent:_})})),this.d(l.don(_=>{const[C,S]=Ke(_,n);this._viewer.pointerOverEvent.emit({screenPosition:[C+w,S+E],pointerEvent:_})})),this.d(u.don(_=>{const[C,S]=Ke(_,n);this._viewer.pointerOutEvent.emit({screenPosition:[C+w,S+E],pointerEvent:_})}));const b=this.dv(Qt.create(t,"keydown"));this.d(b.don(_=>this._viewer.keyDownEvent.emit(_)));const v=this.dv(Qt.create(t,"keyup"));this.d(v.don(_=>this._viewer.keyUpEvent.emit(_)));const y=this.dv(Qt.create(t,"wheel"));this.d(y.don(_=>this._viewer.wheelEvent.emit(_)))}}const is=class is extends V{constructor(t){super();d(this,"_forceRecreateEvent",this.dv(new I));d(this,"_container",this.dv(B(void 0)));d(this,"_containerSize",this.dv(B(void 0)));d(this,"_editingEvent",this.disposeVar(new I));d(this,"_esViewerExtensions",this.dv(new bb(this)));d(this,"_status",this.dv(B("Raw")));d(this,"_statusLog",this.dv(B("")));d(this,"_statusContainer",this.dv(new hp(this)));d(this,"_useCustomInteraction",this.dv(B(!0)));d(this,"_resetInteractionEvent",this.dv(ge(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));d(this,"_interactionResetting",this.dv(new le(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new Gy(this,this.container)})));d(this,"_viewerChanged",this.dv(new I));d(this,"_cameraChanged",this.dv(new I));d(this,"_containerResetEvent",this.dv(ge(this.containerChanged,this._forceRecreateEvent)));d(this,"_containerResetting",this.dv(new le(this._containerResetEvent,()=>{if(this.container)return new Rb(this.container,this)})));d(this,"_sceneObjectsMap",new Map);d(this,"_id");d(this,"_typeName");d(this,"_updateFuncReact",this.dv(B(void 0)));d(this,"_toDestroyFuncReact",this.dv(B(void 0)));d(this,"_statusInfo",is.defaults.statusInfo);d(this,"_navigationMode",this.dv(B("Map")));d(this,"_syncViewer",this.dv(B(void 0)));d(this,"_syncEventDon",this.dv(new le(this.syncViewerChanged,()=>{const t=this.syncViewer;if(t)return new Tb(this,t)})));d(this,"_timeSyncdon",this.dv(new le(this.timeSyncChanged,()=>{if(this.timeSync)return new xb(this)})));d(this,"_hoverEvent",this.dv(new I));d(this,"_pointerOverEvent",this.dv(new I));d(this,"_pointerMoveEvent",this.dv(new I));d(this,"_pointerDownEvent",this.dv(new I));d(this,"_pointerUpEvent",this.dv(new I));d(this,"_pointerOutEvent",this.dv(new I));d(this,"_clickEvent",this.dv(new I));d(this,"_dblclickEvent",this.dv(new I));d(this,"_keyDownEvent",this.dv(new I));d(this,"_keyUpEvent",this.dv(new I));d(this,"_wheelEvent",this.dv(new I));d(this,"_actived",this.dv(B(!1)));this._id=t.id??ko();const n=By(t.container);if(n)this._container.value=cp(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,u]of i.entries())if(!u&&a){const l=mo.context.createEngineObject(a,this);l&&i.set(a,l)}},o=()=>{for(let[a,u]of i.entries())u&&!u.isDestroyed()&&u.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||Eu(),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 Ib(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=cp(n):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else t instanceof HTMLDivElement?this._container.value=cp(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)){Z.context.addSceneObject(n);const i=mo.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(),Z.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 is.createDefaultProps()}_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 De?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 u=this.defaultProps[a];u instanceof De&&(u=u.value),this[a]=u}}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}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 window.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:[]}}getProperties(t){const n={...this.getESProperties()},i=[];return n.general.length>0&&i.push(new rt(n.general,"general")),Object.keys(n).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&n[s].length>0&&i.push(new rt(n[s],s))}),i}};d(is,"context",new Lb),d(is,"register",is.context.register.bind(is.context)),d(is,"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 Wr=is;(r=>{r.createBaseProps=()=>({name:"未命名场景对象",extras:dt(void 0),devTags:Ht(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:256,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:Ht(void 0),editingAuxiliaryPointColor:Ht(void 0),editingLineWidth:void 0,editingLineColor:Ht(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:r.defaults.terrainShader,splitPosition:B(void 0),rollerShutter:!1,cameraMovableRegion:Ht(void 0),depthTestAgainstTerrain:!0,terrainOpacity:1}),r.createDefaultProps=()=>({...(0,r.createBaseProps)(),...(0,r.createCommonProps)()})})(Wr||(Wr={})),Oi(Wr.prototype,Wr.createDefaultProps);function Wy(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 Ab=r=>{const e=Wr.createCommonProps(),t={};try{Object.keys(e).forEach(n=>{t[n]=r[n]})}catch(n){console.warn(n)}return t},qy=(r,e)=>{const t=Wr.createCommonProps();try{Object.keys(t).forEach(n=>{r[n]=e[n]})}catch(n){console.warn(n)}};class Fb extends V{constructor(t){super();d(this,"_viewersChanged",this.disposeVar(new I));d(this,"_viewers",new Set);d(this,"_viewersToChange",this.dv(new I));this._sceneObjectsManager=t,this.d(()=>{for(const n of this._viewers)this.destroyViewer(n);this._viewers.clear()}),this.viewers.forEach(n=>{const i=this._sceneObjectsManager.sceneObjects;n.add(...i)}),this.d(()=>{const n=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...n)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((n,i)=>{this.viewers.forEach(s=>{i.forEach(o=>{Ri(s.devTags,o.devTags)&&(s.has(o)?console.warn(`${s.typeName}中已存${o.typeName},检查逻辑是否有问题!`):s.add(o))}),n.forEach(o=>{Ri(s.devTags,o.devTags)&&(s.has(o)?s.delete(o):console.warn(`${s.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(o=>{o.has(s)&&o.delete(s),console.log("sceneObjectsToChange",o.devTags,s.devTags,Ri(o.devTags,s.devTags)),Ri(o.devTags,s.devTags)&&(o.has(s)?console.warn(`${o.typeName}中已存${s.typeName},检查逻辑是否有问题!`):o.add(s))})}))})})),this.d(this.viewersChanged.don((n,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(o=>{for(let a of s)Ri(o.devTags,a.devTags)&&(o.has(a)?console.warn(`${o.typeName}中已存${a.typeName},检查逻辑是否有问题!`):o.add(a))}),n.forEach(o=>{for(let a of s)Ri(o.devTags,a.devTags)&&(o.has(a)?o.delete(a):console.warn(`${o.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(()=>{o.clearAllSceneObjects();const a=this._sceneObjectsManager.sceneObjects;for(let u of a)console.log("viewersChanged",o.devTags,u.devTags,Ri(o.devTags,u.devTags)),Ri(o.devTags,u.devTags)&&(o.has(u)?console.warn(`${o.typeName}中已存${u.typeName},检查逻辑是否有问题!`):o.add(u))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(t){const n=Wr.context.createViewer(t);return this._viewers.add(n),this._viewersChanged.emit([],[n]),n}destroyViewer(t){return t.isDestroyed()?!0:(this._viewers.delete(t),this._viewersChanged.emit([t],[]),t.destroy(),t.isDestroyed())}}class Hc extends V{constructor(...t){super();d(this,"_drgm",this.dv(new Mg));d(this,"_sobjm",this.dv(new Cb));d(this,"_vrm",this.dv(new Fb(this._sobjm)));d(this,"_sceneObjectEditingManager",this.disposeVar(new Eb));d(this,"_activeViewer",this.dv(B(void 0)));d(this,"_syncOtherViewersToActived",this.dv(B(!1)));d(this,"_cmrvm",this.createSceneObjectFromClass(Mc));d(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));d(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});d(this,"_sceneTree",this.dv(new ll("default",this.dragstartDataMananger,24,this)));d(this,"_propUiTreeManager",this.dv(new Ta(24)));d(this,"_sceneTreeMap",new Map);d(this,"_viewerCreatedEvent",this.dv(new I));d(this,"_lastCameraInfo");d(this,"_lastActiveViewerJson");d(this,"_syncEventDonFunc",this.d(zs([this.activeViewerChanged,this.syncOtherViewersToActivedChanged],()=>{const t=this.syncOtherViewersToActived;this.viewers.forEach(n=>{t?n.syncOtherViewer(this.activeViewer):n.syncOtherViewer(void 0)})})));d(this,"_player",this.createSceneObjectFromClass(Ma));d(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));d(this,"_esPlyarAndPathTime",this.dv(new gb(this)));d(this,"_pathAnimationManager",this.dv(new vb(this)))}static get envs(){return Z.context.environmentVariables}getSceneObjectById(t){return Z.getSceneObjectById(t)}getSceneObject(t){return Z.getSceneObject(t)}get $refs(){return Z.$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.values().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 json(){var h;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,u=this._cmrvm.views,l=[...this._vrm.viewers].map(f=>f.json),c=(h=this.activeViewer)==null?void 0:h.getCurrentCameraInfo();return{asset:o,viewers:l,sceneTree:a,viewCollection:u,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._vrm.viewers.size===0||t.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.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}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(t){return yb(this,t)}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 ll(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 l;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&n&&(this._lastCameraInfo=(l=this.activeViewer)==null?void 0:l.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?Ab(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=t.id,a=o?[...this.getViewers()].find(c=>c.id===o):[...this.getViewers()].find(c=>c.typeName===t.type);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&&Wy(this,a),i&&this._lastActiveViewerJson&&(qy(a,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),a.container===By(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 u=this.createViewer(t);return console.log(t),console.log(this),n&&Wy(this,u),i&&this._lastActiveViewerJson&&(qy(u,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=u,u}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:u}=n;return this.switchViewer({type:"ESCesiumViewer",container:i,id:u},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:u,uri:l,app:c,token:h,viewSync:f,attributeSync:p,destroy:m,id:w}=t[0];n={type:"ESUeViewer",container:u,id:w,options:{uri:l,app:c,token:h}},i={viewSync:f??!0,attributeSync:p??!0,destroy:m??!0}}else if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)&&t[0].hasOwnProperty("ws")){const{container:u,ws:l,esmsg:c,viewSync:h,attributeSync:f,id:p,destroy:m}=t[0];n={type:"ESUeViewer",container:u,id:p,options:{ws:l,esmsg:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:m??!0}}else if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)&&t[0].hasOwnProperty("project")){const{container:u,project:l,baseUrl:c,viewSync:h,attributeSync:f,id:p,destroy:m}=t[0];n={type:"ESUeViewer",container:u,id:p,options:{project:l,baseUrl:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:m??!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}},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}},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}}: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}}: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}}d(Hc,"getSceneObjById",Z.context.getSceneObjectById.bind(Z.context)),d(Hc,"getEnv",Z.context.getEnv.bind(Z.context)),d(Hc,"setEnv",Z.context.setEnv.bind(Z.context)),g.BasePropTreeItem=zd,g.Boolean2Property=W0,g.Boolean2sProperty=H0,g.Boolean3Property=q0,g.Boolean3sProperty=Y0,g.Boolean4Property=X0,g.Boolean4sProperty=J0,g.BooleanProperty=X,g.BooleansProperty=F0,g.BorderedPosFloatDiv=Kp,g.BoxPicker=vh,g.CancelError=Sr,g.CancelsManager=wh,g.CanvasImagePoi=o0,g.CanvasPoi=Ph,g.CanvasPointPoi=a0,g.CanvasPrimitive=kp,g.CanvasPrimitivesContext=u0,g.ColorProperty=Et,g.ColorRgbProperty=Q0,g.ColorStops=db,g.ComplexImage=vl,g.CursorFloatDiv=f0,g.CursorInfo=p0,g.DashPatternProperty=$0,g.DateProperty=Hs,g.DatesProperty=Og,g.Debouncing=k_,g.DebouncingDeprecated=ph,g.DebouncingWithStartValues=V_,g.Destroyable=V,g.DivBoxPicker=L_,g.DivPoi=Yp,g.DivPointerClick=i0,g.DomElementEvent=Qt,g.DoublyLinkedList=_p,g.DragStartDataManager=Mg,g.ES3DTileset=mr,g.ESAlarm=Jd,g.ESApertureEffect=Zd,g.ESAreaMeasurement=Kd,g.ESBlastParticleSystem=Qd,g.ESBoxClipping=$d,g.ESCameraView=Oc,g.ESCameraViewCollection=Mc,g.ESCameraVisibleRange=tf,g.ESCar=Rc,g.ESCityBasePoint=Kf,g.ESClassification=Lc,g.ESClippingPlane=ef,g.ESCustomDiv=Ac,g.ESCzml=Qf,g.ESDataMesh=nf,g.ESDatasmithRuntimeModel=Rf,g.ESDirectionMeasurement=bf,g.ESDistanceMeasurement=rf,g.ESDynamicWater=Lf,g.ESEntityCluster=Jf,g.ESExcavate=cl,g.ESFeatureLayer=lp,g.ESFireParticleSystem=sf,g.ESForestTileset=of,g.ESGaussianSplatting=np,g.ESGeoDiv=af,g.ESGeoDivTextPoi=Zf,g.ESGeoExtrudedPolygon=go,g.ESGeoJson=dl,g.ESGeoLineString=Zi,g.ESGeoPoints=ml,g.ESGeoPolygon=At,g.ESGeoRectangle=uf,g.ESGeoVector=wt,g.ESGeoWater=Af,g.ESGltfModel=Ns,g.ESHeatMap=Uc,g.ESHeightLimitAnalysis=Yf,g.ESHeightMeasurement=Pf,g.ESHole=zf,g.ESHuman=po,g.ESHumanPoi=jf,g.ESImageLabel=Fc,g.ESImageryLayer=cf,g.ESJEditingMode=Q,g.ESJLonLatFormat=Dg,g.ESJPickedResult=aw,g.ESLabel=Jn,g.ESLevelRuntimeModel=Ff,g.ESLocalCircle=If,g.ESLocalPolygon=fl,g.ESLocalPolygonZ=xf,g.ESLocalRectangle=Tf,g.ESLocalSkyBox=hf,g.ESLocalVector=Na,g.ESLocalVector2D=Ji,g.ESLocationMeasurement=df,g.ESMsTileset=qf,g.ESNavigator=$f,g.ESObjectWithLocation=tt,g.ESObjectsManager=Hc,g.ESParticleSystemPrimitive=kc,g.ESPath=Ra,g.ESPathImpl=Os,g.ESPipeFence=jc,g.ESPipeline=kf,g.ESPipeserTileset=Nf,g.ESPit=Da,g.ESPlayer=Ma,g.ESPoi2D=hl,g.ESPoi3D=ff,g.ESPoiTileset=Xf,g.ESPolygonFence=zc,g.ESPolygonFlattenedPlane=pf,g.ESPolygonWithHole=Df,g.ESRectangle=Of,g.ESRtsFeatureEditing=Wf,g.ESRtsTileset=Gf,g.ESScale=Hf,g.ESSceneObject=Z,g.ESSceneObjectWithId=kg,g.ESSeparateFoliage=gf,g.ESSkylineAnalysis=ip,g.ESStaticMesh=rp,g.ESSubmergingAnalysis=mf,g.ESSunshineAnalysis=vf,g.ESSurfaceAreaMeasurement=Mf,g.ESTerrainLayer=yf,g.ESTestObject=Yd,g.ESTextLabel=Oa,g.ESUEWidget=_f,g.ESUnrealActor=wf,g.ESVideoFusion=Ef,g.ESViewShed=Cf,g.ESViewer=Wr,g.ESViewerStatusBar=tp,g.ESViewerStatusBarScale=ep,g.ESVisibilityAnalysis=Vf,g.ESVisualObject=Rt,g.ESVolumeMeasurement=Bf,g.ESWidget=Sf,g.EngineObject=mo,g.EnumProperty=mt,g.EnumStringsProperty=tw,g.EvalStringProperty=ls,g.Event=I,g.EventListenerHandler=eh,g.Fetching=N_,g.FloatDiv=Th,g.FlvJsLoading=Wc,g.FlvProcessing=ky,g.FunctionProperty=it,g.Gif=_g,g.GifPlayer=yg,g.GifProcessing=wg,g.GroupPropTreeItem=Gd,g.GroupProperty=rt,g.HasOwner=E_,g.HlsJsLoading=Gc,g.HlsProcessing=Fy,g.IFrameBorderedPosFloatDiv=h0,g.ImageProcessing=ug,g.IntervalDeprecated=mh,g.JsonProperty=K,g.LeafPropTreeItem=Ud,g.ListenerPipe=th,g.LocalFileServer=og,g.LocalRootDir=sg,g.LongStringProperty=kh,g.MaximumScreenSpaceErrorProperty=L0,g.MinmaxProperty=ew,g.NearFarScalerProperty=nw,g.NextAnimateFrameEvent=Nl,g.NextAnimateFrameWeakEvent=Ep,g.NextMicroTaskEvent=oh,g.NextMicroTaskWeakEvent=d_,g.NonreactiveJsonStringProperty=xg,g.Number2Property=Ie,g.Number2sProperty=Pg,g.Number3Property=Qe,g.Number3sProperty=Fh,g.Number4Property=br,g.Number4WithUndefinedProperty=U0,g.Number4sProperty=G0,g.NumberProperty=O,g.NumberRangeProperty=rw,g.NumberSliderProperty=Me,g.NumbersProperty=A0,g.ObjPool=Cl,g.ObjResetting=v0,g.ObjResettingWithEvent=le,g.ObservableArray=_u,g.ObservableSet=Vl,g.ParamsProperty=Ig,g.PickColorMananger=Xp,g.PickedInfo=ow,g.Player=Pr,g.PlayerProperty=Bl,g.PointerClick=bh,g.PointerClickDeprecated=Dp,g.PointerHover=Fp,g.PointerHoverDeprecated=s0,g.PosFloatDiv=Dh,g.PositionProperty=Xo,g.PositionsProperty=Tg,g.PositionsSetPropety=sw,g.Processing=Pe,g.PropTree=ey,g.PropUiTreeManager=Ta,g.Property=us,g.ReactVarProperty=yt,g.ReactiveVariable=De,g.RotationProperty=Vh,g.SceneObjectFromId=zh,g.SceneTree=ll,g.SceneTreeContextMenu=ay,g.SceneTreeItem=an,g.SceneTreeItemDragDrop=oy,g.SmartListenerHandler=fu,g.SmartListenerPipe=n_,g.SmoothMoveController=yS,g.String2Property=k0,g.String2sProperty=bg,g.String3Property=V0,g.String3sProperty=j0,g.String4Property=B0,g.String4sProperty=z0,g.StringNumberProperty=Z0,g.StringNumbersProperty=K0,g.StringProperty=ut,g.StringsProperty=Sg,g.Throttling=n0,g.ThrottlingWithStartValues=r0,g.TimingDeprecated=Np,g.ToolTipDiv=d0,g.Transition=Su,g.TransitionDeprecated=M_,g.Tree=qo,g.TreeItem=Wo,g.TreeItemDragDrop=Rg,g.UiTree=eg,g.UiTreeObject=tg,g.UriProperty=xu,g.VideoProcessing=hg,g.ViewPlayerProperty=Ng,g.ViewerCustomInteraction=Gy,g.Watcher=Tu,g.WatcherTools=Vg,g.WithUndefinedProperty=Ah,g.XrPlayer=Fl,g.Xyzw2Ns=Ml,g.addTreesCallFunc=dy,g.animateFrame=xl,g.ary2Ns=T_,g.asyncFuncToCancelablePromise=U_,g.bind=$,g.bindCustomEditing=Fg,g.bindu=c_,g.booleanPointInPolygon=Cw,g.canMoveToTreeItem=Iu,g.canMoveToTreeItems=Qp,g.cancelFuncToCancelablePromise=z_,g.cancelPromise=yh,g.cancelableFetch=Ch,g.cancelableFetchDeprecated=Tp,g.cancelableFetchWithProgress=W_,g.cartesianDistance=ty,g.clamp=Rl,g.clamp0_360=Ho,g.clampN180_180=Ag,g.complexImageTypes=cg,g.createAnimateFrame=Eu,g.createAnimateFrameWithStartValues=Go,g.createBottomTriangleElement=Zp,g.createCancelablePromise=Uo,g.createCloseDiv=Jp,g.createEventsCallFunc=zs,g.createFetching=q_,g.createFetchingWithStartValues=X_,g.createGuid=ko,g.createInterval=K_,g.createIntervalWithStartValues=Q_,g.createNextAnimateFrame=H_,g.createNextAnimateFrameEvent=ge,g.createNextAnimateFrameEventCallFunc=p_,g.createNextAnimateFrameWeakEvent=g_,g.createNextAnimateFrameWithStartValues=Y_,g.createNextMicroTask=J_,g.createNextMicroTaskEvent=h_,g.createNextMicroTaskWeakEvent=f_,g.createNextMicroTaskWithStartValues=Z_,g.createNumbers=Dl,g.createProcessingFromAsyncFunc=Fn,g.createProcessingFromAsyncFuncWithStartValues=G_,g.createProcessingFromPromiseCreateFunc=Al,g.createProcessingFromPromiseCreateFuncWithStartValues=Eh,g.createPropTreeFromSceneObject=ny,g.createSleeping=$_,g.createSleepingWithStartValues=t0,g.createStartFuncFromAsyncFunc=wu,g.createTimeout=Rp,g.createTimeoutWithStartValues=Lp,g.cutDownTreesCallFunc=gy,g.czmPixelFormats=lg,g.debounce=Il,g.defaultGetLocalFilePath=y0,g.defaultInitSceneObjectOnCreatingFunc=lw,g.defaultLight122FromEnvironmentMapManager=Hd,g.defaultLocalFileServer=ag,g.defaultStartUpdateFunc=Ol,g.defaultUpdateSceneObjectOnPickingFunc=uw,g.defineReactiveProp=gh,g.destroyObject=gp,g.downloadLink=__,g.drawPoint=qs,g.drawRoundRectPath=Vp,g.drawText=Bp,g.drawTextBlock=Ih,g.equalsN3=qd,g.every=uh,g.extendClassProps=Oi,g.fetchArrayBuffer=S_,g.fetchImage=Pp,g.forEach=ei,g.forEachWithBreak=ah,g.geoAlong=Iw,g.geoArea=Yh,g.geoBuffer=Jv,g.geoCenterOfMass=iE,g.geoDestination=lm,g.geoDifference=Zv,g.geoDistance=Yl,g.geoHeading=Au,g.geoIntersect=Hv,g.geoLineIntersect=pE,g.geoNearestPointOnLine=yE,g.geoPointToLineDistance=CE,g.geoPolygonFromCircle=Kv,g.geoPolygonOverlap=Bd,g.geoRhumbDestination=PE,g.geoRhumbDistance=Cm,g.geoRhumbHeading=xE,g.geoUnion=Yv,g.getColorHexStr=Pu,g.getCompleteReactParams=Pl,g.getDefaultValue=fw,g.getDistancesFromPositions=ul,g.getDomEventCurrentTargetPos=Ke,g.getDrawRect=Ws,g.getEventFromPromise=F_,g.getEventPosInCurrentTarget=Bo,g.getExtProp=An,g.getFileArrayBuffer=ig,g.getFileJson=rg,g.getFileText=Mh,g.getFloatDivPool=Oh,g.getGeoBoundingSphereFromPositions=$v,g.getIterator=gu,g.getMidpoint=mE,g.getMinMaxCorner=Qv,g.getMinMaxPosition=C_,g.getPromiseCancel=jo,g.getPromiseFromEvent=A_,g.getPromiseFromProcessing=Sh,g.getReactFuncs=Ni,g.getSceneObjectTreeItem=cw,g.getSubEntriesFromDir=ng,g.getTypeFromImageUri=Vy,g.getValueFromProps=Cp,g.getXyzFromPostion=jd,g.growthSimulationCallFunc=my,g.hasSameTags=Lg,g.hasSameViewerTags=Ri,g.imageToCanvas=jp,g.inOrderRunning=pw,g.interval=ih,g.isJSON=Bh,g.isPromiseCancelable=zo,g.isXML=dw,g.lbhToWebMerc=ww,g.lbhToXyz=ri,g.length=lh,g.lerpAngle=zl,g.lerpRotation=jh,g.loadGifFrames=mg,g.loadJs=dh,g.map=ry,g.max=Di,g.min=os,g.moveToTreeItem=kl,g.moveToTreeItems=$p,g.nextAnimateFrame=Vo,g.nextMicroTask=pu,g.objsIterator=Us,g.oneTimeWarning=Ao,g.optionsStr=IS,g.pairToPromise=_h,g.pluckProperty=ch,g.react=B,g.reactArray=at,g.reactArrayCollection=s_,g.reactArrayCollectionWithUndefined=nh,g.reactArrayWithUndefined=Ht,g.reactDeepArray=Sl,g.reactDeepArrayWithUndefined=ss,g.reactJson=dt,g.reactJsonCollection=o_,g.reactJsonCollectionWithUndefined=a_,g.reactJsonWithUndefined=jt,g.reactPlainObject=r_,g.reactPlainObjectWithUndefined=i_,g.reactPosition2Ds=Wd,g.reactPosition2DsSet=u_,g.reactPositions=bl,g.reactPositionsSet=wp,g.reduce=yu,g.registerCreatedEventUpdate=oS,g.registerEventCtor=mp,g.registerEventUpdate=aS,g.removeAllTreesCallFunc=fy,g.requestAnimationFrameTimeStampTest=w_,g.rpToap=hw,g.saveOnBrowser=y_,g.setCanvasUniformColor=zp,g.setExtProp=ti,g.setPromiseCancel=as,g.setSceneObjectTreeItem=jl,g.setValueFromProps=v_,g.sleep=Cu,g.sleepDeprecated=O_,g.step=Gs,g.stepProcessing=e0,g.throttle=hh,g.timeout=sh,g.track=j,g.uint32ToUint8s=Wp,g.uint8ToHexStr=bu,g.uint8sToUint32=qp,g.updateTreeParamsCallFunc=py,g.webMercToLbh=Ew,g.xyz2N2=b_,g.xyz2N3=P_,g.xyzToLbh=jg,g.xyzw2N4=I_,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})}));
|