@arcgis/core 5.2.0-next.73 → 5.2.0-next.75
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/analysis/ViewshedAnalysis.js +1 -1
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0502641d9a214b37ff29.js +1 -0
- package/assets/esri/core/workers/chunks/{d3be4d914fc99a1d686c.js → 075e65cc4275ac886f08.js} +1 -1
- package/assets/esri/core/workers/chunks/087bd698b80ca0cea71e.js +1 -0
- package/assets/esri/core/workers/chunks/{b6c7b7b7f87dce5de811.js → 0bf644f93c180a2bc2f8.js} +1 -1
- package/assets/esri/core/workers/chunks/0d3b2d9a19383bb63f0a.js +1 -0
- package/assets/esri/core/workers/chunks/0d9fe49812554e7d7ba7.js +1 -0
- package/assets/esri/core/workers/chunks/0daaa89de339e8ea4b81.js +1 -0
- package/assets/esri/core/workers/chunks/{1ca04ecf010e68863014.js → 0eb35e09765fd74eb698.js} +1 -1
- package/assets/esri/core/workers/chunks/12234a63d3fa4bc25e7e.js +1 -0
- package/assets/esri/core/workers/chunks/18e0e993c0c39c962e61.js +1 -0
- package/assets/esri/core/workers/chunks/1c49c9472167a2e0c923.js +1 -0
- package/assets/esri/core/workers/chunks/{cf360767310fb45660a8.js → 1cf8fb704c48ac3d3b15.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e44978ee677aa23163d.js → 2435ef7d11f8dbb920b7.js} +1 -1
- package/assets/esri/core/workers/chunks/2501d9459f6d14c797e5.js +1 -0
- package/assets/esri/core/workers/chunks/2740f755c3a322cbd477.js +1 -0
- package/assets/esri/core/workers/chunks/27f574acf52f2c8bc2c9.js +1 -0
- package/assets/esri/core/workers/chunks/28f87daaba1ae3441364.js +1 -0
- package/assets/esri/core/workers/chunks/2b93888e61ca638490cf.js +1 -0
- package/assets/esri/core/workers/chunks/2c31648a4b95275516ee.js +1 -0
- package/assets/esri/core/workers/chunks/2f4ed8a63d57636a4ebe.js +1 -0
- package/assets/esri/core/workers/chunks/2f81047790c4890ae625.js +1 -0
- package/assets/esri/core/workers/chunks/305eea9c1fc4aee3309e.js +1 -0
- package/assets/esri/core/workers/chunks/30818b5ff0ce51b25d6f.js +1 -0
- package/assets/esri/core/workers/chunks/3235e14fedb19dd94807.js +1 -0
- package/assets/esri/core/workers/chunks/36ec5b84e551ab08b24a.js +1 -0
- package/assets/esri/core/workers/chunks/3c28e2040cb4fb716eaa.js +1 -0
- package/assets/esri/core/workers/chunks/3c32471785bc8570e41c.js +1 -0
- package/assets/esri/core/workers/chunks/4046bd65d7d0677f4600.js +1 -0
- package/assets/esri/core/workers/chunks/4295822fa6ef743c76f1.js +1 -0
- package/assets/esri/core/workers/chunks/{35fd2f765d2cb3f59a22.js → 42d5ed44111bea77ec71.js} +115 -115
- package/assets/esri/core/workers/chunks/43713bc6f7eea07259d0.js +1 -0
- package/assets/esri/core/workers/chunks/{36171c72a3c04b0d13ef.js → 43a65cab888d43954564.js} +1 -1
- package/assets/esri/core/workers/chunks/44a786aba84918f2b247.js +1 -0
- package/assets/esri/core/workers/chunks/46873badbd6ce8ff4e1e.js +1 -0
- package/assets/esri/core/workers/chunks/495f90fe3d0ad32bb82d.js +1 -0
- package/assets/esri/core/workers/chunks/4b5bd0c9a55ea2998601.js +1 -0
- package/assets/esri/core/workers/chunks/4d7a3b3aaf876da0891b.js +1 -0
- package/assets/esri/core/workers/chunks/4fe2cca405180af23364.js +1 -0
- package/assets/esri/core/workers/chunks/50b08415e072a49bc572.js +1 -0
- package/assets/esri/core/workers/chunks/519af918050b47f93516.js +1 -0
- package/assets/esri/core/workers/chunks/{bd311c85437743cf7d2f.js → 53d165b4f30fd64e5d8a.js} +1 -1
- package/assets/esri/core/workers/chunks/552d6aecc7d88d16227b.js +1 -0
- package/assets/esri/core/workers/chunks/5627f562dea8bae2f346.js +1 -0
- package/assets/esri/core/workers/chunks/5ba3a30b7cbfa9e3aa62.js +1 -0
- package/assets/esri/core/workers/chunks/5e1d84e97de0e662aaa9.js +1 -0
- package/assets/esri/core/workers/chunks/64a1ffc221e5b63b43fb.js +1 -0
- package/assets/esri/core/workers/chunks/{31669511cfddf116d991.js → 66e60351aacbd162775f.js} +1 -1
- package/assets/esri/core/workers/chunks/{c203df41f9d2e4b80889.js → 6743d726e45e7b660505.js} +1 -1
- package/assets/esri/core/workers/chunks/69b0dcd7bcd8ec42e2c3.js +1 -0
- package/assets/esri/core/workers/chunks/6b783f440c4a5d36e879.js +1 -0
- package/assets/esri/core/workers/chunks/6dddd3df31961b9fda12.js +1 -0
- package/assets/esri/core/workers/chunks/6fc3553c52af6ace926d.js +1 -0
- package/assets/esri/core/workers/chunks/702b2381acf4d1f90094.js +1 -0
- package/assets/esri/core/workers/chunks/762be5d3e6aeaea33f74.js +29 -0
- package/assets/esri/core/workers/chunks/792303e4090c0c70c4ff.js +1 -0
- package/assets/esri/core/workers/chunks/7a24cc0f3b4eff2bdb8e.js +1 -0
- package/assets/esri/core/workers/chunks/7aaa051b51a8e34bbfb0.js +1 -0
- package/assets/esri/core/workers/chunks/7dc5aedc964eacd1be5a.js +1 -0
- package/assets/esri/core/workers/chunks/81130dbcb738d40f723b.js +1 -0
- package/assets/esri/core/workers/chunks/835af7b4fd92cb4e7af0.js +1 -0
- package/assets/esri/core/workers/chunks/841c81c280114412c95b.js +1 -0
- package/assets/esri/core/workers/chunks/{96d861265566854760cd.js → 88fd698b940dadcc6dc5.js} +1 -1
- package/assets/esri/core/workers/chunks/8a36b999cbd65dd2f16c.js +1 -0
- package/assets/esri/core/workers/chunks/8ae3a6ddc87bf8315583.js +1 -0
- package/assets/esri/core/workers/chunks/8f0d4aec8bd3cbfefc40.js +1 -0
- package/assets/esri/core/workers/chunks/{7f208ef75ef2ce0d7cf9.js → 910c93bbbf8113a4a51f.js} +1 -1
- package/assets/esri/core/workers/chunks/92c4464b67fce6cea134.js +1 -0
- package/assets/esri/core/workers/chunks/{509cfac9e5d86a8ee449.js → 936d44c7bc3a181e64a3.js} +1 -1
- package/assets/esri/core/workers/chunks/947f1ea4dbc3e3419ecc.js +1 -0
- package/assets/esri/core/workers/chunks/9b76c8974424a1908e86.js +1 -0
- package/assets/esri/core/workers/chunks/9cff18e6f751d1b3085e.js +1 -0
- package/assets/esri/core/workers/chunks/a101152066dd56259619.js +1 -0
- package/assets/esri/core/workers/chunks/a2a2c7e274fb32fecffa.js +1 -0
- package/assets/esri/core/workers/chunks/a50421fe79f264ae3619.js +1 -0
- package/assets/esri/core/workers/chunks/a6a2a4a2bae0d327d7ed.js +1 -0
- package/assets/esri/core/workers/chunks/a7a7d3289d4ca95f545f.js +1 -0
- package/assets/esri/core/workers/chunks/abb6c76d5dba3559a68e.js +1 -0
- package/assets/esri/core/workers/chunks/aca5c524bd3c955e9243.js +1 -0
- package/assets/esri/core/workers/chunks/b14961a9f1f40028f141.js +1 -0
- package/assets/esri/core/workers/chunks/b1a175b3b2d1a7ddde8e.js +1 -0
- package/assets/esri/core/workers/chunks/b6cd165d0e58598f28a5.js +1 -0
- package/assets/esri/core/workers/chunks/b78f509fd8e95f728178.js +1 -0
- package/assets/esri/core/workers/chunks/b9c61b20bbc91cb63036.js +1 -0
- package/assets/esri/core/workers/chunks/b9d1bb106737a05290e1.js +1 -0
- package/assets/esri/core/workers/chunks/{faa55265020591fd2224.js → bc0395777c5c1adb1ddb.js} +1 -1
- package/assets/esri/core/workers/chunks/bf3dc3ad8df8488da3f0.js +1 -0
- package/assets/esri/core/workers/chunks/c1568bcd3f04014152e1.js +1 -0
- package/assets/esri/core/workers/chunks/c374e5d5980db74c4aca.js +1 -0
- package/assets/esri/core/workers/chunks/{b9953277d0cd4a01bdc6.js → c37b28f200b704ae6002.js} +1 -1
- package/assets/esri/core/workers/chunks/c67e4a848d41038367b8.js +1 -0
- package/assets/esri/core/workers/chunks/cff6390b863361eaeeed.js +1 -0
- package/assets/esri/core/workers/chunks/d1c7c877edc6948f3801.js +1 -0
- package/assets/esri/core/workers/chunks/d2172583ee6e481a66aa.js +1 -0
- package/assets/esri/core/workers/chunks/d633e98b0dfa0490e4de.js +1 -0
- package/assets/esri/core/workers/chunks/d8eca13c127b443141b7.js +1 -0
- package/assets/esri/core/workers/chunks/ddd8f6154e265dbb6f9f.js +1 -0
- package/assets/esri/core/workers/chunks/de5013f89f0eae93978f.js +1 -0
- package/assets/esri/core/workers/chunks/de601f0d5a2a282d2efd.js +1 -0
- package/assets/esri/core/workers/chunks/e557043f90c051e93925.js +1 -0
- package/assets/esri/core/workers/chunks/e59101f1d060d0a30a65.js +1 -0
- package/assets/esri/core/workers/chunks/{bee5e738ecf8680909c4.js → eaf26c1cc938789d5336.js} +1 -1
- package/assets/esri/core/workers/chunks/eb1a86159dbc098f06fe.js +1 -0
- package/assets/esri/core/workers/chunks/ee9eb381e675d2d01260.js +1 -0
- package/assets/esri/core/workers/chunks/{014f9fd2818e2c9d9a3b.js → f43a0edf58941e2ac78e.js} +1 -1
- package/assets/esri/core/workers/chunks/f4bc563c71c478d3912f.js +1 -0
- package/assets/esri/core/workers/chunks/{4abd54518e35050feb90.js → f78acff510ca615d42e4.js} +1 -1
- package/assets/esri/core/workers/chunks/{01c92e68fb17cf2d0e08.js → f7a5c4d22a24e1ac433c.js} +1 -1
- package/assets/esri/core/workers/chunks/fb0b89bbb4f8607d5f20.js +1 -0
- package/assets/esri/core/workers/chunks/ff890167ff2baabfc4ce.js +1 -0
- package/chunks/GaussianSplat.glsl.js +8 -8
- package/chunks/GaussianSplatShadow.glsl.js +4 -5
- package/chunks/OccludedGeometryDepth.glsl.js +5 -0
- package/chunks/ShadowCastVisualize.glsl.js +2 -2
- package/config.js +1 -1
- package/core/importUtils.js +2 -0
- package/geometry/operators/importUtils.js +2 -0
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/geometry/support/normalizeUtils.d.ts +17 -15
- package/geometry/support/normalizeUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/DimensionFeatureLayer.d.ts +22 -0
- package/layers/DimensionFeatureLayer.js +1 -1
- package/layers/FeatureLayer.d.ts +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/queryUtils.js +1 -1
- package/layers/graphics/hydratedFeatures.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/layersMapping.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/geoprocessor/utils.js +1 -1
- package/rest/identify.js +1 -1
- package/rest/imageService.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/operations/queryAttributeBins.js +1 -1
- package/rest/query/operations/queryPivot.js +1 -1
- package/rest/query/operations/queryTopFeatures.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMEffects.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
- package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
- package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
- package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteraction.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js +8 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +8 -2
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClear.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClearTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastMaskTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastRenderer.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualize.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualization.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +28 -21
- package/views/3d/webgl-engine/shaders/OccludedGeometryDepth.glsl.js +2 -0
- package/views/3d/webgl-engine/shaders/OccludedGeometryDepthTechnique.js +2 -0
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/plugins/PolylinePlugin.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/InteractiveHandle.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/drawToolUtils.js +1 -1
- package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/draw/support/reshapeTooltipUtils.js +1 -1
- package/views/draw/support/tooltipUtils.js +1 -1
- package/views/interactive/options/InteractiveToolOptions.d.ts +36 -0
- package/views/interactive/options/InteractiveToolOptions.js +2 -0
- package/views/interactive/sketch/SketchOptions.d.ts +4 -3
- package/views/interactive/sketch/SketchOptions.js +1 -1
- package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDynamic.js +1 -1
- package/views/interactive/tooltip/fields/fields.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
- package/views/interactive/tooltip/infos/SketchTooltipInfo.js +1 -1
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/views/selection/SelectionOperation.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +8 -1
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/LayerItem.d.ts +8 -1
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.d.ts +29 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/assets/esri/core/workers/chunks/00cbff0b785e24e87d97.js +0 -1
- package/assets/esri/core/workers/chunks/0623acb2bd14a61b65c9.js +0 -29
- package/assets/esri/core/workers/chunks/06c9aac75a01d3af6d54.js +0 -1
- package/assets/esri/core/workers/chunks/089f8c60e96d920a2cb2.js +0 -1
- package/assets/esri/core/workers/chunks/0c3c311400ee352187ea.js +0 -1
- package/assets/esri/core/workers/chunks/0dbf31a663b5220a3136.js +0 -1
- package/assets/esri/core/workers/chunks/0df660dfd941cff3ea1d.js +0 -1
- package/assets/esri/core/workers/chunks/1418c03c4ab87f7ab5f4.js +0 -1
- package/assets/esri/core/workers/chunks/158d2ac0333d53556e33.js +0 -1
- package/assets/esri/core/workers/chunks/160b204cbf5bda2a29e9.js +0 -1
- package/assets/esri/core/workers/chunks/16cade1c2ddf44e336ee.js +0 -1
- package/assets/esri/core/workers/chunks/1b130af7d14eaae69d96.js +0 -1
- package/assets/esri/core/workers/chunks/1cc063aa2ddf44bbd515.js +0 -1
- package/assets/esri/core/workers/chunks/1e0140556c2e3fa72545.js +0 -1
- package/assets/esri/core/workers/chunks/1e5cb72830c7f32f2961.js +0 -1
- package/assets/esri/core/workers/chunks/259bdacfb7b0f866a8d0.js +0 -1
- package/assets/esri/core/workers/chunks/2a2ed7bd44010f24c2dd.js +0 -1
- package/assets/esri/core/workers/chunks/2bdb9b5365869081c936.js +0 -1
- package/assets/esri/core/workers/chunks/2f58e1f64df2da8259a2.js +0 -1
- package/assets/esri/core/workers/chunks/383304d33b496c5d8baa.js +0 -1
- package/assets/esri/core/workers/chunks/3aacb935d632834d4154.js +0 -1
- package/assets/esri/core/workers/chunks/3c8e98cf23ad8ef12fcb.js +0 -1
- package/assets/esri/core/workers/chunks/3d6b2d5ae647e140abaf.js +0 -1
- package/assets/esri/core/workers/chunks/3dc71e03a630dd50b28e.js +0 -1
- package/assets/esri/core/workers/chunks/3fd022df127af32782ce.js +0 -1
- package/assets/esri/core/workers/chunks/4344ab1250a1c550bf8b.js +0 -1
- package/assets/esri/core/workers/chunks/43de723f765ec8f268ac.js +0 -1
- package/assets/esri/core/workers/chunks/44b50d4716a2567ab6f1.js +0 -1
- package/assets/esri/core/workers/chunks/44e8cd4b3dad777ab0c9.js +0 -1
- package/assets/esri/core/workers/chunks/4695cd6120f60b234d5c.js +0 -1
- package/assets/esri/core/workers/chunks/4cf2b0558a4acc141429.js +0 -1
- package/assets/esri/core/workers/chunks/4e129b9f5772a06e580c.js +0 -1
- package/assets/esri/core/workers/chunks/5441f96cdd0660229efe.js +0 -1
- package/assets/esri/core/workers/chunks/56bbde1dff96b423fbb9.js +0 -1
- package/assets/esri/core/workers/chunks/582a1d468089b9986416.js +0 -1
- package/assets/esri/core/workers/chunks/5f201c77a09ae0df29d6.js +0 -1
- package/assets/esri/core/workers/chunks/6080e46fc79127500283.js +0 -1
- package/assets/esri/core/workers/chunks/613e799377bdb767c955.js +0 -1
- package/assets/esri/core/workers/chunks/623d5518bca227f643bd.js +0 -1
- package/assets/esri/core/workers/chunks/62811bca7ad2100c023c.js +0 -1
- package/assets/esri/core/workers/chunks/64176f7ae719289a2f79.js +0 -1
- package/assets/esri/core/workers/chunks/67d3ff7fcefaa7d5d27f.js +0 -1
- package/assets/esri/core/workers/chunks/6a9002fcba11e2cf3f2e.js +0 -1
- package/assets/esri/core/workers/chunks/72dcd4bd1a28bf8605c5.js +0 -1
- package/assets/esri/core/workers/chunks/73f228d966b89c73c9e9.js +0 -1
- package/assets/esri/core/workers/chunks/73f77f5a6907cb8d9a35.js +0 -1
- package/assets/esri/core/workers/chunks/77df0bb35d2688729479.js +0 -1
- package/assets/esri/core/workers/chunks/7a143ca61c0a70306185.js +0 -1
- package/assets/esri/core/workers/chunks/7e373d9c98ce910db9d2.js +0 -1
- package/assets/esri/core/workers/chunks/869d292a60747c93dc84.js +0 -1
- package/assets/esri/core/workers/chunks/86a4057572755b403548.js +0 -1
- package/assets/esri/core/workers/chunks/8c76f31a363dd0c3354d.js +0 -1
- package/assets/esri/core/workers/chunks/98e6c1d035755a074d24.js +0 -1
- package/assets/esri/core/workers/chunks/9c57161ad48d8d546dc7.js +0 -1
- package/assets/esri/core/workers/chunks/a27cdf4c29dd50a6dab1.js +0 -1
- package/assets/esri/core/workers/chunks/a294dd12b5c708ce04af.js +0 -1
- package/assets/esri/core/workers/chunks/a7f42ada0aa69873a938.js +0 -1
- package/assets/esri/core/workers/chunks/a988fd54912969b812ce.js +0 -1
- package/assets/esri/core/workers/chunks/aff0e7761276036e029d.js +0 -1
- package/assets/esri/core/workers/chunks/b33d870cbfa238762c5e.js +0 -1
- package/assets/esri/core/workers/chunks/b599b7dadce8b8bc88f6.js +0 -1
- package/assets/esri/core/workers/chunks/b7d8817018b3d277c454.js +0 -1
- package/assets/esri/core/workers/chunks/b984b808d383974ca3d8.js +0 -1
- package/assets/esri/core/workers/chunks/ba4f419f46be09a9a55c.js +0 -1
- package/assets/esri/core/workers/chunks/bfb6566c27c09deb0929.js +0 -1
- package/assets/esri/core/workers/chunks/c25dc9073e73d6b44d88.js +0 -1
- package/assets/esri/core/workers/chunks/c45a5bcf26659daf02a1.js +0 -1
- package/assets/esri/core/workers/chunks/c715c585c42d8c2b86f5.js +0 -1
- package/assets/esri/core/workers/chunks/c7e9513f75b8ec205562.js +0 -1
- package/assets/esri/core/workers/chunks/c838cc1c786368b78598.js +0 -1
- package/assets/esri/core/workers/chunks/c866b66ba72d96453899.js +0 -1
- package/assets/esri/core/workers/chunks/c873383e7dae35dc1a61.js +0 -1
- package/assets/esri/core/workers/chunks/cd4e5c948d1bfa9b9a2d.js +0 -1
- package/assets/esri/core/workers/chunks/cfe31b7d1c6c05fbd268.js +0 -1
- package/assets/esri/core/workers/chunks/d08f81d545930a79fb2e.js +0 -1
- package/assets/esri/core/workers/chunks/d0c1bc90e474f706211c.js +0 -1
- package/assets/esri/core/workers/chunks/d607cf154218d20e4114.js +0 -1
- package/assets/esri/core/workers/chunks/d901f8503a73277cfa58.js +0 -1
- package/assets/esri/core/workers/chunks/da484787bd9fd3b13d15.js +0 -1
- package/assets/esri/core/workers/chunks/da6134c7883531f21afe.js +0 -1
- package/assets/esri/core/workers/chunks/e21b3490bfce75405e55.js +0 -1
- package/assets/esri/core/workers/chunks/e4353f0792f45aa6a62f.js +0 -1
- package/assets/esri/core/workers/chunks/e4a2eefffe16cd5bb20f.js +0 -1
- package/assets/esri/core/workers/chunks/e602b91d8fdc36a92530.js +0 -1
- package/assets/esri/core/workers/chunks/e702abaeccef20b64a81.js +0 -1
- package/assets/esri/core/workers/chunks/ebd619533be077059494.js +0 -1
- package/assets/esri/core/workers/chunks/f475672ff4c2ec9367c2.js +0 -1
- package/assets/esri/core/workers/chunks/f69329b85b362b349a8c.js +0 -1
- package/assets/esri/core/workers/chunks/f721756a6c1593f96409.js +0 -1
- package/assets/esri/core/workers/chunks/fb51f823b25c827c6b29.js +0 -1
- package/assets/esri/core/workers/chunks/fba8065a3a6fbd877e23.js +0 -1
- package/assets/esri/core/workers/chunks/fec07a16b72cdcafc641.js +0 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +0 -2
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastClear.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3835],{28491(e,t,r){r.d(t,{b:()=>j});var o=r(32680),a=r(49255),i=r(34711),n=r(76597),s=r(2585),l=r(96336),c=r(53466),u=r(72824),d=r(35640),h=r(9169),m=r(77068),p=r(77695),f=r(72233),v=r(32971),g=r(98619),x=r(62602),b=r(22393),y=r(59469),w=r(32482),M=r(51406),S=r(43259),T=r(58614),C=r(77949),_=r(33079),I=r(31821),O=r(63761),P=r(27832),z=r(47630),D=r(14113);function j(e){const t=new D.N5,{attributes:r,vertex:j,fragment:F,varyings:R}=t,{output:B,normalType:H,offsetBackfaces:W,spherical:E,snowCover:N,pbrMode:G,textureAlphaPremultiplied:A,instancedDoublePrecision:L,hasVertexColors:V,hasVertexTangents:U,hasColorTexture:k,hasNormalTexture:$,hasNormalTextureTransform:q,hasColorTextureTransform:Z}=e;if((0,C.NB)(j,e),r.add("position","vec3"),j.inputs.add("position",()=>"position"),R.add("vpos","vec3",{invariant:!0}),t.include(S.A,e),t.include(s.B,e),t.include(d.Ge,e),t.include(M.q2,e),!(0,a._o)(B))return t.include(h.E,e),t;t.include(M.Sx,e),t.include(M.MU,e),t.include(M.O1,e),t.include(M.QM,e),(0,C.yu)(j,e),t.include(l.Y,e),t.include(n.d);const Y=0===H||1===H;return Y&&W&&t.include(o.M),t.include(p.J,e),t.include(u.Mh,e),R.add("vPositionLocal","vec3"),t.include(c.U,e),t.include(m.F,e),t.include(L?w.QH:w.LA,e),j.main.add(I.H`
|
|
2
2
|
forwardDefaultMaterialExternalColor();
|
|
3
3
|
|
|
4
4
|
vpos = getVertexInLocalOriginSpace();
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
vpos = subtractOrigin(vpos);
|
|
7
7
|
${(0,I.If)(Y,"vNormalWorld = dpNormal(vvLocalNormal(normalModel()));")}
|
|
8
8
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
9
|
-
${(0,I.If)(
|
|
9
|
+
${(0,I.If)(U,"vTangent = dpTransformVertexTangent(tangent);")}
|
|
10
10
|
gl_Position = transformPosition(proj, view, vpos);
|
|
11
|
-
${(0,I.If)(Y&&
|
|
11
|
+
${(0,I.If)(Y&&W,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
|
|
12
12
|
|
|
13
13
|
forwardTextureCoordinates();
|
|
14
14
|
forwardColorUV();
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
22
22
|
}
|
|
23
23
|
forwardLinearDepthToReadShadowMap();
|
|
24
|
-
`),
|
|
24
|
+
`),F.include(v.kA,e),F.include(f.n,e),t.include(T.SS,e),F.include(i.HQ,e),t.include(z.D,e),(0,C.yu)(F,e),F.uniforms.add(j.uniforms.get("localOrigin"),new _.t("ambient",e=>e.ambient),new _.t("diffuse",e=>e.diffuse)),k&&F.uniforms.add(new O.N("tex",e=>e.texture)),t.include(y._,e),F.include(b.c,e),t.include(x.r,e),F.include(P.b,e),(0,v.a8)(F),(0,v.eU)(F),(0,g.O4)(F),F.main.add(I.H`
|
|
25
25
|
discardBySlice(vpos);
|
|
26
|
-
${
|
|
26
|
+
${k?I.H`
|
|
27
27
|
vec4 texColor = texture(tex, ${Z?"colorUV":"vuv0"});
|
|
28
|
-
${(0,I.If)(
|
|
28
|
+
${(0,I.If)(A,"texColor.rgb /= texColor.a;")}
|
|
29
29
|
discardOrAdjustAlpha(texColor);`:I.H`vec4 texColor = vec4(1.0);`}
|
|
30
30
|
shadingParams.viewDirection = normalize(vpos - cameraPosition);
|
|
31
|
-
${2===
|
|
31
|
+
${2===H?I.H`vec3 normal = screenDerivativeNormal(vPositionLocal);`:I.H`shadingParams.normalView = vNormalWorld;
|
|
32
32
|
vec3 normal = shadingNormal(shadingParams);`}
|
|
33
33
|
applyPBRFactors();
|
|
34
34
|
float ssao = evaluateAmbientOcclusionInverse() * getBakedOcclusion();
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
);
|
|
48
48
|
float opacity_ = getDefaultMaterialOpacity(texColor.a);
|
|
49
49
|
|
|
50
|
-
${$?`mat3 tangentSpace = computeTangentSpace(${
|
|
51
|
-
vec3 normalGround = ${
|
|
50
|
+
${$?`mat3 tangentSpace = computeTangentSpace(${U?"normal":"normal, vpos, vuv0"});\n vec3 shadingNormal = computeTextureNormal(tangentSpace, ${q?"normalUV":"vuv0"});`:"vec3 shadingNormal = normal;"}
|
|
51
|
+
vec3 normalGround = ${E?"normalize(posWorld);":"vec3(0.0, 0.0, 1.0);"}
|
|
52
52
|
|
|
53
53
|
${(0,I.If)(N,I.H`
|
|
54
54
|
float snow = getSnow(normal, normalGround);
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
|
|
59
59
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
60
60
|
|
|
61
|
-
${1===
|
|
61
|
+
${1===G||2===G?I.H`
|
|
62
62
|
float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
63
63
|
${(0,I.If)(N,"mrr = applySnowToMRR(mrr, snow);")}
|
|
64
|
-
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, additionalAmbientIrradiance);`:7===
|
|
64
|
+
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, additionalAmbientIrradiance);`:7===G?I.H`vec3 shadedColor = albedo;`:I.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
65
65
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
66
66
|
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,I.If)(N,", snow")});
|
|
67
|
-
`),t}const
|
|
67
|
+
`),t}const F=Object.freeze(Object.defineProperty({__proto__:null,build:j},Symbol.toStringTag,{value:"Module"}));r.d(t,["D",0,F])},587(e,t,r){r.d(t,{G:()=>b,c:()=>y});var o=r(82048),a=r(92573),i=r(65261),n=r(98619),s=r(70893),l=r(34845),c=r(33094),u=r(20304),d=r(31821),h=r(58029),m=r(12791),p=r(63761),f=r(94046),v=(r(72458),r(63907)),g=r(65786),x=r(14113);class b extends g.Y{constructor(){super(...arguments),this.projScale=1,this.scaleGlobalIllumination=1,this.accumulatedFrames=0,this.temporalSampleFrame=0,this.rayMarchMinReach=.15,this.rayMarchMaxReach=.5,this.rayMarchWorldReach=25,this.rayMarchMinReachEmissionWeight=1,this.rayMarchMaxReachEmissionWeight=1,this.rayMarchMaxSteps=16,this.colorBleedWeight=.15,this.highQualityIdleColorBlendStart=.3}}function y(e){const t=new x.N5,r=t.fragment;t.include(o.c),t.include(l.Ir),(0,n.Gc)(r),r.include(a.V),r.include(i.C),r.include(f.R),t.include(s.O,e),r.uniforms.add(new p.N("normalMap",e=>e.normalTexture),new p.N("depthMap",e=>e.depthTexture),new m.x("lastFrameColorTexture",e=>e.reprojection.lastFrameColor?.getTexture()),new m.x("lastFrameDepthTexture",e=>e.reprojection.lastFrameDepth?.attachment),new m.x("lastFrameGlobalIlluminationTexture",e=>e.globalIllumination?.getTexture()),new m.x("lastFrameGlobalIlluminationWeightTexture",e=>e.globalIllumination?.getTexture(36065)),new h.F("reprojectionViewMatrix",e=>e.reprojection.viewMatrix),new h.F("view",e=>e.camera.viewMatrix),new u.m("accumulatedFrames",e=>e.accumulatedFrames),new u.m("temporalSampleFrame",e=>e.temporalSampleFrame),new u.m("scaleGlobalIllumination",e=>e.scaleGlobalIllumination)),r.uniforms.add(new u.m("rayMarchMinReach",e=>e.rayMarchMinReach),new u.m("rayMarchMaxReach",e=>e.rayMarchMaxReach),new u.m("rayMarchWorldReach",e=>e.rayMarchWorldReach),new u.m("rayMarchMinReachEmissionWeight",e=>e.rayMarchMinReachEmissionWeight),new u.m("rayMarchMaxReachEmissionWeight",e=>e.rayMarchMaxReachEmissionWeight),new u.m("rayMarchMaxSteps",e=>e.rayMarchMaxSteps),new u.m("colorBleedWeight",e=>e.colorBleedWeight),new u.m("highQualityIdleColorBlendStart",e=>e.highQualityIdleColorBlendStart));const{hasEmission:g,hasColor:b}=e;return g&&r.uniforms.add(new c.U("inputScale",e=>e.reprojection.lastFrameEmission?.attachment.descriptor.internalFormat===v.H0.RGBA8?16:1),new m.x("lastFrameEmissionTexture",e=>e.reprojection.lastFrameEmission?.attachment)),r.code.add(d.H`
|
|
68
68
|
float computeIdleColorBlendWeight(float accumulatedFrames) {
|
|
69
69
|
float idleColorBlendProgress = clamp(
|
|
70
70
|
accumulatedFrames / ${d.H.float(150)},
|
|
@@ -316,7 +316,7 @@
|
|
|
316
316
|
fragGlobalIllumination.a = mix(lastFrameGlobalIllumination.a + accumulationDither, fragGlobalIllumination.a, occlusionBlendWeight);
|
|
317
317
|
|
|
318
318
|
fragWeight = vec2(occlusionBlendWeight, colorBlendWeight * ${d.H.float(6)});
|
|
319
|
-
`),t}const w=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationPassParameters:b,build:y,defaultColorBleedWeight:.15,defaultRayMarchMaxReach:.5,defaultRayMarchMaxReachEmissionWeight:1,defaultRayMarchMaxSteps:16,defaultRayMarchMinReach:.15,defaultRayMarchMinReachEmissionWeight:1,defaultRayMarchWorldReach:25},Symbol.toStringTag,{value:"Module"}));r.d(t,["a",0,w])},52516(e,t,r){r.d(t,{G:()=>b,b:()=>y});var o=r(48163),a=r(82048),
|
|
319
|
+
`),t}const w=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationPassParameters:b,build:y,defaultColorBleedWeight:.15,defaultRayMarchMaxReach:.5,defaultRayMarchMaxReachEmissionWeight:1,defaultRayMarchMaxSteps:16,defaultRayMarchMinReach:.15,defaultRayMarchMinReachEmissionWeight:1,defaultRayMarchWorldReach:25},Symbol.toStringTag,{value:"Module"}));r.d(t,["a",0,w])},52516(e,t,r){r.d(t,{G:()=>b,b:()=>y});var o=r(48163),a=r(82048),i=r(52540),n=r(72885),s=r(34845),l=r(32976),c=r(68259),u=r(20304),d=r(31821),h=r(15976),m=r(63761),p=r(94046),f=r(58243),v=r(72458),g=r(65786),x=r(14113);class b extends g.Y{constructor(){super(...arguments),this.blurSize=(0,o.vt)()}}function y(){const e=new x.N5,t=e.fragment;e.include(a.c),e.include(s.Ir),e.include(n.Q);return t.include(i.E),t.include(f.t,w),t.include(p.R),t.uniforms.add(new l.o("hasEmission",e=>null!=e.reprojection.lastFrameEmission),new m.N("depthMap",e=>e.depthTexture),new m.N("normalMap",e=>e.normalTexture),new h.o("globalIlluminationTexture",e=>e.texture),new h.o("globalIlluminationWeightTexture",e=>e.weightTexture),new c.t("blurSize",e=>e.blurSize),new u.m("scaleGlobalIllumination",e=>e.scaleGlobalIllumination),new u.m("projScale",(e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale})),t.code.add(d.H`
|
|
320
320
|
void accumulateBlurSample(
|
|
321
321
|
vec2 sampleUv,
|
|
322
322
|
float sampleOffset,
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
blurredEmission += isScaledGlobalIllumination ? ${d.H.float(.85)} * dither : dither;
|
|
419
419
|
|
|
420
420
|
fragColor = vec4(quantizeGlobalIlluminationColor(blurredEmission), occlusion);
|
|
421
|
-
`),e}const w=new v.C;w.useFloatBlend=!1;const M=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationBlurDrawParameters:b,build:y},Symbol.toStringTag,{value:"Module"}));r.d(t,["a",0,M])},50704(e,t,r){r.d(t,{G:()=>p,b:()=>f});var o=r(82048),a=r(52540),
|
|
421
|
+
`),e}const w=new v.C;w.useFloatBlend=!1;const M=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationBlurDrawParameters:b,build:y},Symbol.toStringTag,{value:"Module"}));r.d(t,["a",0,M])},50704(e,t,r){r.d(t,{G:()=>p,b:()=>f});var o=r(82048),a=r(52540),i=r(72885),n=r(34845),s=r(20304),l=r(31821),c=r(15976),u=r(63761),d=r(94046),h=r(65786),m=r(14113);class p extends h.Y{}function f(){const e=new m.N5,t=e.fragment;return e.include(o.c),e.include(n.Ir),e.include(i.Q),t.include(a.E),t.include(d.R),t.uniforms.add(new u.N("depthMap",e=>e.depthTexture),new u.N("normalMap",e=>e.normalTexture),new c.o("tex",e=>e.colorTexture),new c.o("globalIlluminationWeightTexture",e=>e.weightTexture),new s.m("projScale",(e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale})),t.code.add(l.H`
|
|
422
422
|
float computeDepthWeight(float sampleDepth, float centerDepth, float depthSharpness) {
|
|
423
423
|
float depthDelta = abs(sampleDepth - centerDepth);
|
|
424
424
|
return exp(-0.08 - depthDelta * depthDelta * depthSharpness);
|
|
@@ -498,7 +498,7 @@
|
|
|
498
498
|
) / jointBilateralWeightSum;
|
|
499
499
|
}
|
|
500
500
|
`),e.outputs.add("fragColor","vec4",0),e.outputs.add("fragWeight","vec2",1),t.main.add(l.H`sampleJointBilateralUpscale(uv, fragColor, fragWeight);
|
|
501
|
-
fragColor.rgb = quantizeGlobalIlluminationColor(fragColor.rgb);`),e}const v=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationUpscaleDrawParameters:p,build:f},Symbol.toStringTag,{value:"Module"}));r.d(t,["a",0,v])},57323(e,t,r){r.d(t,{b:()=>
|
|
501
|
+
fragColor.rgb = quantizeGlobalIlluminationColor(fragColor.rgb);`),e}const v=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationUpscaleDrawParameters:p,build:f},Symbol.toStringTag,{value:"Module"}));r.d(t,["a",0,v])},57323(e,t,r){r.d(t,{b:()=>P});var o=r(32680),a=r(49255),i=r(34711),n=r(76597),s=r(2585),l=r(96336),c=r(53466),u=r(35640),d=r(9169),h=r(77068),m=r(72233),p=r(32971),f=r(98619),v=r(22393),g=r(59469),x=r(32482),b=r(51406),y=r(43259),w=r(58614),M=r(77949),S=r(33079),T=r(31821),C=r(63761),_=r(27832),I=r(47630),O=r(14113);function P(e){const t=new O.N5,{attributes:r,vertex:P,fragment:z,varyings:D}=t,{output:j,offsetBackfaces:F,pbrMode:R,snowCover:B,spherical:H}=e,W=1===R||2===R;if((0,M.NB)(P,e),r.add("position","vec3"),P.inputs.add("position",()=>"position"),D.add("vpos","vec3",{invariant:!0}),t.include(y.A,e),t.include(s.B,e),t.include(u.Ge,e),t.include(b.q2,e),!(0,a._o)(j))return t.include(d.E,e),t;t.include(b.MU,e),(0,M.yu)(t.vertex,e),t.include(l.Y,e),t.include(n.d),F&&t.include(o.M),D.add("vNormalWorld","vec3"),D.add("localvpos","vec3",{invariant:!0}),t.include(c.U,e),t.include(h.F,e),t.include(e.instancedDoublePrecision?x.QH:x.LA,e),P.main.add(T.H`
|
|
502
502
|
forwardDefaultMaterialExternalColor();
|
|
503
503
|
|
|
504
504
|
vpos = getVertexInLocalOriginSpace();
|
|
@@ -515,11 +515,11 @@ fragColor.rgb = quantizeGlobalIlluminationColor(fragColor.rgb);`),e}const v=Obje
|
|
|
515
515
|
forwardLinearDepthToReadShadowMap();
|
|
516
516
|
|
|
517
517
|
gl_Position = shouldCullByOpacity() ? vec4(1e38, 1e38, 1e38, 1.0) :
|
|
518
|
-
${(0,T.If)(
|
|
519
|
-
`);const{hasColorTexture:
|
|
518
|
+
${(0,T.If)(F,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
|
|
519
|
+
`);const{hasColorTexture:E,hasColorTextureTransform:N}=e;return z.include(p.kA,e),z.include(m.n,e),t.include(w.SS,e),z.include(i.HQ,e),t.include(I.D,e),(0,M.yu)(z,e),(0,f.Gc)(z),(0,p.a8)(z),(0,p.eU)(z),z.uniforms.add(P.uniforms.get("localOrigin"),P.uniforms.get("view"),new S.t("ambient",e=>e.ambient),new S.t("diffuse",e=>e.diffuse)),E&&z.uniforms.add(new C.N("tex",e=>e.texture)),t.include(g._,e),z.include(v.c,e),z.include(_.b,e),(0,f.O4)(z),z.main.add(T.H`
|
|
520
520
|
discardBySlice(vpos);
|
|
521
|
-
vec4 texColor = ${
|
|
522
|
-
${(0,T.If)(
|
|
521
|
+
vec4 texColor = ${E?`texture(tex, ${N?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
|
522
|
+
${(0,T.If)(E,`${(0,T.If)(e.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
|
|
523
523
|
vec3 viewDirection = normalize(vpos - cameraPosition);
|
|
524
524
|
applyPBRFactors();
|
|
525
525
|
float ssao = evaluateAmbientOcclusionInverse();
|
|
@@ -538,9 +538,9 @@ fragColor.rgb = quantizeGlobalIlluminationColor(fragColor.rgb);`),e}const v=Obje
|
|
|
538
538
|
float opacity_ = getDefaultMaterialOpacity(texColor.a);
|
|
539
539
|
|
|
540
540
|
vec3 shadingNormal = normalize(vNormalWorld);
|
|
541
|
-
vec3 groundNormal = ${
|
|
541
|
+
vec3 groundNormal = ${H?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};
|
|
542
542
|
|
|
543
|
-
${(0,T.If)(
|
|
543
|
+
${(0,T.If)(B,"vec3 faceNormal = screenDerivativeNormal(vpos);\n float snow = getRealisticTreeSnow(faceNormal, shadingNormal, groundNormal);\n albedo = mix(albedo, vec3(1), snow);")}
|
|
544
544
|
|
|
545
545
|
${T.H`albedo *= 1.2;
|
|
546
546
|
vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
|
|
@@ -550,11 +550,11 @@ fragColor.rgb = quantizeGlobalIlluminationColor(fragColor.rgb);`),e}const v=Obje
|
|
|
550
550
|
float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
|
|
551
551
|
additionalLight += backLightFactor * mainLightIntensity;`}
|
|
552
552
|
|
|
553
|
-
${
|
|
554
|
-
${(0,T.If)(
|
|
553
|
+
${W?T.H`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
554
|
+
${(0,T.If)(B,"mrr = applySnowToMRR(mrr, snow);")}
|
|
555
555
|
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, groundNormal, mrr, additionalAmbientIrradiance);`:T.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
556
556
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
557
|
-
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,T.If)(
|
|
557
|
+
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,T.If)(B,", 1.0")});`),t}const z=Object.freeze(Object.defineProperty({__proto__:null,build:P},Symbol.toStringTag,{value:"Module"}));r.d(t,["R",0,z])},15581(e,t,r){r.d(t,{b:()=>v,g:()=>g});var o=r(37585),a=r(48163),i=r(82048),n=r(52540),s=r(65261),l=r(34845),c=r(77108),u=r(47286),d=r(33094),h=r(20304),m=r(31821),p=r(63761),f=r(14113);function v(){const e=new f.N5,t=e.fragment;return e.include(i.c),e.include(l.Ir),t.include(n.E),t.include(s.C),t.uniforms.add(new d.U("radius",e=>g(e.camera))).code.add(m.H`vec3 sphere[16] = vec3[16](
|
|
558
558
|
vec3(0.186937, 0.0, 0.0),
|
|
559
559
|
vec3(0.700542, 0.0, 0.0),
|
|
560
560
|
vec3(-0.864858, -0.481795, -0.111713),
|
|
@@ -636,7 +636,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
636
636
|
A = (pow(A, 0.2) + 1.2 * pow(A, 4.0)) * INV_GAMMA;
|
|
637
637
|
|
|
638
638
|
fragOcclusion = A;
|
|
639
|
-
`),e}function g(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const x=(0,a.vt)(),b=Object.freeze(Object.defineProperty({__proto__:null,build:v,getRadius:g},Symbol.toStringTag,{value:"Module"}));r.d(t,["S",0,b])},95774(e,t,r){r.d(t,{b:()=>d});var o=r(82048),a=r(52540),
|
|
639
|
+
`),e}function g(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const x=(0,a.vt)(),b=Object.freeze(Object.defineProperty({__proto__:null,build:v,getRadius:g},Symbol.toStringTag,{value:"Module"}));r.d(t,["S",0,b])},95774(e,t,r){r.d(t,{b:()=>d});var o=r(82048),a=r(52540),i=r(68259),n=r(20304),s=r(31821),l=r(15976),c=r(63761),u=r(14113);function d(){const e=new u.N5,t=e.fragment;return e.include(o.c),t.include(a.E),t.uniforms.add(new c.N("depthMap",e=>e.depthTexture),new l.o("tex",e=>e.colorTexture),new i.t("blurSize",e=>e.blurSize),new n.m("projScale",(e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale})),t.code.add(s.H`
|
|
640
640
|
void blurFunction(vec2 uv, float r, float center_d, float sharpness, inout float wTotal, inout float bTotal) {
|
|
641
641
|
float c = texture(tex, uv).r;
|
|
642
642
|
float d = linearDepthFromTexture(depthMap, uv);
|
|
@@ -659,9 +659,9 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
659
659
|
vec2 uvOffset = uv + rf * blurSize;
|
|
660
660
|
blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
|
|
661
661
|
}
|
|
662
|
-
fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}));r.d(t,["S",0,h])},43609(e,t,r){r.d(t,{a:()=>n,f:()=>i,n:()=>a});var o=r(34275);function a(e,t){n(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r=2,a=r){const n=t.length/2;let i=0,s=0;if(!(0,o.iu)(t)||(0,o.dk)(t)){for(let o=0;o<n;++o)e[i]=t[s],e[i+1]=t[s+1],i+=r,s+=a;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<n;++o)e[i]=Math.max(t[s]/l,-1),e[i+1]=Math.max(t[s+1]/l,-1),i+=r,s+=a;else for(let o=0;o<n;++o)e[i]=t[s]/l,e[i+1]=t[s+1]/l,i+=r,s+=a}function i(e,t,r,o){const a=e.typedBuffer,n=e.typedBufferStride,i=o?.count??e.count;let s=(o?.dstIndex??0)*n;for(let e=0;e<i;++e)a[s]=t,a[s+1]=r,s+=n}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:n,normalizeIntegerBufferView:a},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>d,b:()=>s,c:()=>a,d:()=>i,e:()=>h,f:()=>u,l:()=>c,n:()=>m,t:()=>n}),r(44208);var o=r(72727);function a(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,a=3,n=a){const i=(0,o.k)(e.length,a,3),s=(0,o.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[4],m=r[5],p=r[6],f=r[8],v=r[9],g=r[10],x=r[12],b=r[13],y=r[14];let w=0,M=0;for(let r=0;r<l;r++){const r=t[w],o=t[w+1],i=t[w+2];e[M]=c*r+h*o+f*i+x,e[M+1]=u*r+m*o+v*i+b,e[M+2]=d*r+p*o+g*i+y,w+=n,M+=a}return e}function i(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,a=3,n=a){const i=(0,o.k)(e.length,a,3),s=(0,o.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[3],m=r[4],p=r[5],f=r[6],v=r[7],g=r[8];let x=0,b=0;for(let r=0;r<l;r++){const r=t[x],o=t[x+1],i=t[x+2];e[b]=c*r+h*o+f*i,e[b+1]=u*r+m*o+v*i,e[b+2]=d*r+p*o+g*i,x+=n,b+=a}}function l(e,t,r,o=3,a=o){const n=Math.min(e.length/o,t.length/a);let i=0,s=0;for(let l=0;l<n;l++)e[s]=r*t[i],e[s+1]=r*t[i+1],e[s+2]=r*t[i+2],i+=a,s+=o;return e}function c(e,t,r,o){u(e.typedBuffer,t.typedBuffer,r,o,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r,o,a=3,n=a){const i=Math.min(e.length/a,t.length/n);let s=0,l=0;const c=1/2.2;for(let u=0;u<i;u++)e[l]=o*(r*t[s])**c,e[l+1]=o*(r*t[s+1])**c,e[l+2]=o*(r*t[s+2])**c,s+=n,l+=a}function d(e,t,r,a=3,n=a){const i=(0,o.k)(e.length,a,3),s=(0,o.k)(t.length,n,3),l=Math.min(i,s);let c=0,u=0;for(let o=0;o<l;o++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=n,u+=a;return e}function h(e,t){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(e,t,r=3,o=r){const a=Math.min(e.length/r,t.length/o);let n=0,i=0;for(let s=0;s<a;s++){const a=t[n],s=t[n+1],l=t[n+2],c=a*a+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[i]=t*a,e[i+1]=t*s,e[i+2]=t*l}n+=o,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:m,normalizeView:h,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),a=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)a[c]=i[l]>>r,a[c+1]=i[l+1]>>r,a[c+2]=i[l+2]>>r,l+=s,c+=n},transformMat3:s,transformMat3View:i,transformMat4:n,transformMat4View:a,translate:d},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>a});var o=r(34727);class a{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return n(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,o.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return n(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,o=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(o)?r:o}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function n(e,t,r,o,a=0,n=!1){return(o-=a)<t?o+=i(e,t-o):o>r&&(o-=i(e,o-r)),n&&o===r&&(o=t),o+a}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new a(0,2*Math.PI),l=(new a(-Math.PI,Math.PI),new a(0,360));r.d(t,["ie",0,l,"uC",0,s])},46140(e,t,r){r.d(t,{A:()=>a});var o=r(49186);class a{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new a(this.major,this.minor,this._context)}static parse(e,t=""){const[r,n]=e.split("."),i=/^\s*\d+\s*$/;if(!r?.match||!i.test(r))throw new o.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!n?.match||!i.test(n))throw new o.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(n,10);return new a(s,l,t)}}},61473(e,t,r){function o(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function a(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(n)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>a,b5:()=>o});const n=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,n,i,/^jsapps\.esri\.com$/,s,l]},82534(e,t,r){function o(){return[0,0,0,1]}function a(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>a,vt:()=>o});const n=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:a,create:o,fromValues:function(e,t,r,o){return[e,t,r,o]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["zK",0,n])},88340(e,t,r){function o(){return new Float32Array(2)}function a(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function n(){return o()}function i(){return a(1,1)}function s(){return a(1,0)}function l(){return a(0,1)}r.d(t,{fA:()=>a,vt:()=>o});const c=n(),u=i(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,fromValues:a,ones:i,unitX:s,unitY:l,zeros:n},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,u,"uY",0,c])},48163(e,t,r){function o(){return[0,0]}function a(e){return[e[0],e[1]]}function n(e,t){return[e,t]}function i(){return n(1,1)}function s(){return n(-1,-1)}function l(){return n(1,0)}function c(){return n(0,1)}r.d(t,{fA:()=>n,o8:()=>a,vt:()=>o});const u=i(),d=s(),h=l(),m=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:d,ONES:u,UNIT_X:h,UNIT_Y:m,ZEROS:[0,0],clone:a,create:o,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:n,negativeOnes:s,ones:i,unitX:l,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["IA",0,d,"Un",0,u])},91829(e,t,r){function o(){return[0,0,0,0]}function a(e,t,r,o){return[e,t,r,o]}function n(e,t,r,o){return[e,t,r,o]}function i(){return a(1,1,1,1)}function s(){return a(1,0,0,0)}function l(){return a(0,1,0,0)}function c(){return a(0,0,1,0)}function u(){return a(0,0,0,1)}r.d(t,{CN:()=>n,_Y:()=>u,fA:()=>a,vt:()=>o});const d=[0,0,0,0],h=i(),m=s(),p=l(),f=c(),v=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:v,UNIT_X:m,UNIT_Y:p,UNIT_Z:f,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:o,freeze:n,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:a,ones:i,unitW:u,unitX:s,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,h,"uY",0,d])},78955(e,t,r){r.d(t,{Bw:()=>v,C:()=>a,Cc:()=>y,LI:()=>h,Om:()=>b,S8:()=>x,T9:()=>d,WQ:()=>i,Z0:()=>w,aI:()=>S,hG:()=>f,hZ:()=>n,hs:()=>m,jk:()=>u,m3:()=>g,t2:()=>M});var o=r(34304);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function n(e,t,r,o,a){return e[0]=t,e[1]=r,e[2]=o,e[3]=a,e}function i(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function h(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function p(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return Math.sqrt(r*r+o*o+a*a+n*n)}function f(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return r*r+o*o+a*a+n*n}function v(e){const t=e[0],r=e[1],o=e[2],a=e[3];return Math.sqrt(t*t+r*r+o*o+a*a)}function g(e){const t=e[0],r=e[1],o=e[2],a=e[3];return t*t+r*r+o*o+a*a}function x(e,t){const r=t[0],o=t[1],a=t[2],n=t[3];let i=r*r+o*o+a*a+n*n;return i>0&&(i=1/Math.sqrt(i),e[0]=r*i,e[1]=o*i,e[2]=a*i,e[3]=n*i),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function y(e,t,r,o){const a=t[0],n=t[1],i=t[2],s=t[3];return e[0]=a+o*(r[0]-a),e[1]=n+o*(r[1]-n),e[2]=i+o*(r[2]-i),e[3]=s+o*(r[3]-s),e}function w(e,t,r){const o=t[0],a=t[1],n=t[2],i=t[3];return e[0]=r[0]*o+r[4]*a+r[8]*n+r[12]*i,e[1]=r[1]*o+r[5]*a+r[9]*n+r[13]*i,e[2]=r[2]*o+r[6]*a+r[10]*n+r[14]*i,e[3]=r[3]*o+r[7]*a+r[11]*n+r[15]*i,e}function M(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function S(e,t){const r=e[0],a=e[1],n=e[2],i=e[3],s=t[0],l=t[1],c=t[2],u=t[3],d=(0,o.FD)();return Math.abs(r-s)<=d*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-l)<=d*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(n-c)<=d*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(i-u)<=d*Math.max(1,Math.abs(i),Math.abs(u))}const T=s,C=l,_=c,I=p,P=f,O=v,z=g;Object.freeze(Object.defineProperty({__proto__:null,add:i,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:a,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:I,distance:p,div:_,divide:c,dot:b,equals:S,exactEquals:M,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:O,length:v,lerp:y,max:d,min:u,mul:C,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=o.Ov;let a,n,i,s,l,c;do{a=2*r()-1,n=2*r()-1,l=a*a+n*n}while(l>=1);do{i=2*r()-1,s=2*r()-1,c=i*i+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*a,e[1]=t*n,e[2]=t*i*u,e[3]=t*s*u,e},round:h,scale:m,scaleAndAdd:function(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e},set:n,sqrDist:P,sqrLen:z,squaredDistance:f,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:T,subtract:s,transformMat4:w,transformQuat:function(e,t,r){const o=t[0],a=t[1],n=t[2],i=r[0],s=r[1],l=r[2],c=r[3],u=c*o+s*n-l*a,d=c*a+l*o-i*n,h=c*n+i*a-s*o,m=-i*o-s*a-l*n;return e[0]=u*c+m*-i+d*-l-h*-s,e[1]=d*c+m*-s+h*-i-u*-l,e[2]=h*c+m*-l+u*-s-d*-i,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},56512(e,t,r){function o(e){let t,r,o=[],a=!1;return function(...n){return a&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(n,o)||(r=e.apply(this,n),t=this,o=n,a=!0),r}}r.d(t,{B:()=>o})},69397(e,t,r){r.d(t,{Qf:()=>s,Qh:()=>n,lM:()=>a});var o=r(34275);function a(e){if(!e)return 0;let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=i(e[r],!1));return t}function n(e){if(!e)return 0;if("number"==typeof e[0])return s(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=u;for(let o=0;o<t;o++)r+=i(e[o]);return r}(e);let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=i(e[r]));return t}function i(e,t=!0){switch(typeof e){case"object":return t?n(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function s(...e){return e.reduce((e,t)=>e+(t?(0,o.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return u+e.length*t}const c=32,u=16,d=145},65806(e,t,r){r.d(t,{g:()=>i});var o=r(51850),a=r(91218),n=r(9762);function i(e,t,r,o){if((0,a.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,n.projectBuffer)(s,e.spatialReference,0,t,r,0);const i=(0,a.tryProject)(e,r,o);return!!i&&(t[0]=i.x,t[1]=i.y,t[2]=i.z??0,!0)}const s=(0,o.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var o=r(91218),a=r(16930),n=r(9762),i=r(65806);function s(e,t,r,a){return!(null==t||null==a||e.length<2)&&((0,o.canProjectWithoutEngine)(t,a)?(0,n.projectBuffer)(e,t,0,r,a,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,i.g)(l,r,a)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:a.A.WGS84,type:"point"}},72727(e,t,r){function o(e,t,r){if(t<=0)return 0;const o=e-r;return o<0?0:Math.floor(o/t)+1}r.d(t,{k:()=>o}),r(53966)},31411(e,t,r){r.d(t,{GS:()=>T,gh:()=>_});var o=r(49186),a=r(56512),n=r(65864),i=r(4305),s=r(50954),l=r(52006),c=r(49663),u=r(46068),d=r(15507);const h=1e-6,m=[0,0];function p(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}class f{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:r,maxSegmentsPerCurve:o,minSegmentsPerCurve:a}){const n=r*r,i=t*t,s=1/o,l=this.interpolate(0),c=this.interpolate(1);(0,d.kb)(this.curveStart,l)>h&&e.push(l),this.initialize(l,c);const u=1/a;for(let e=a-1;e>0;e--){const t=e*u;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<s||(0===n||!isFinite(n)||(0,d.kb)(this.arcStart,this.arcEnd)<n)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,d.kb)(this.curveEnd,c)>h&&e.push([...this.curveEnd]),e}}class v extends f{constructor(e,t){const[r,o,a]=t.b;super(e,r),this._controlPointsStack=[],this._curveControlPoints=[o,a],this._arcControlPoints=[o,a],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:r,tStart:o,tEnd:a}=this,[n,i]=this._arcControlPoints,s=(e-o)/(a-o),l=(0,d.RS)([],t,n,s),c=(0,d.RS)(m,n,i,s),u=(0,d.RS)([],i,r,s),h=(0,d.RS)([],l,c,s),p=(0,d.RS)([],c,u,s),f=(0,d.RS)([],h,p,s);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([p,u]),this.tEndStack.push(e),this.arcEndStack.push(f),this._arcControlPoints[0]=l,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:r}=this,[o,a]=this._curveControlPoints;return(0,i.B4)(t,o,a,r,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[r,o]=this._arcControlPoints;return Math.max((0,d.yE)(r,e,t),(0,d.yE)(o,e,t))}}class g extends f{constructor(e,t){const[r]=t.a;super(e,r),this._derivedEllipse=(0,u.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,u.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,d.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function x(e,t,r,{cx:o,cy:a,radius:n,thetaStart:i,thetaEnd:s,isInvalid:l},{maxDeviation:c,maxSegmentLength:u,maxSegmentsPerCurve:m,minSegmentsPerCurve:p}){if(l)return e.push([...r]),e;const f=2*n,v=[o+n*Math.cos(i),a+n*Math.sin(i)],g=[o+n*Math.cos(s),a+n*Math.sin(s)];(0,d.kb)(t,v)>h&&e.push(v);const x=Math.abs(s-i),b=u>0&&u<f?2*Math.asin(u/f):x,y=c>0&&c<=n?2*Math.acos(1-c/n):x,w=Math.min(b,y),M=Math.min(m,Math.max(p,Math.ceil(Math.abs(x/w)))),S=1/M;for(let t=1;t<M;t++){const r=t*S,l=i*(1-r)+s*r;e.push([o+n*Math.cos(l),a+n*Math.sin(l)])}return e.push(g),(0,d.kb)(r,g)>h&&e.push([...r]),e}function b(e,t,r,o){return new v(t,r).densify(e,o)}function y(e,t,r,o){const a=(0,s.pM)(t,r),[n]=r.c;return x(e,t,n,a,o)}function w(e,t,r,o){const a=(0,c.io)(t,r),[n]=r.a;return x(e,t,n,a,o)}function M(e,t,r,o){const[a,n,i,s,l,c,u]=r.a;return 0===c||0===u?(e.push([...a]),e):new g(t,r).densify(e,o)}function S(e,t,r,o){return(0,l.Xq)(r)?(e.push([...r]),e):(0,l.n1)(r)?b(e,t,r,o):(0,l.aO)(r)?y(e,t,r,o):(0,l.DA)(r)?w(e,t,r,o):M(e,t,r,o)}function T(e,t={}){if(!(0,l.Ed)(e))return e;const r=p(t),o=(0,l.FD)(e),a=[];for(const e of o){const t=[];for(let o=0;o<e.length-1;o++){const a=o+1,n=[...(0,l.yP)(e[o])];0===o&&t.push(n),S(t,n,e[a],r)}a.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},paths:a,spatialReference:e.spatialReference}:{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},rings:a,spatialReference:e.spatialReference}}const C=(0,a.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function _(e,t,a){const i=new Set(t);return await async function(e,t,a){let n=null;for(const i of e)if(i&&(0,l.Ed)(i)&&null==i.spatialReference.xyTolerance&&(0,l.V8)(i,t)){const e=i.spatialReference;if(!e)throw new o.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=I(e);if(a.has(t))i.spatialReference=a.get(t);else{n||(n=await Promise.all([r.e(9187),r.e(8885),r.e(5756),r.e(3299),r.e(1550)]).then(r.bind(r,78125)));const s=n.fromSpatialReference(e),l=s?.getTolerance();if(null==l)throw new o.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=i.spatialReference.clone();c.read({xyTolerance:l}),i.spatialReference=c,a.set(t,c)}}}(e,i,a),e.map(e=>{if(!e||!(0,l.Ed)(e))return e;const r=e.spatialReference.xyTolerance;if(null==r)return e;const o=C(r);return(0,n.rS)(function(e,t,r){if(!(0,l.Ed)(e))return e;const o=new Set(t),a=p(r),n=(0,l.FD)(e),i=[];let s=!1;for(const e of n){const t=[];for(let r=0;r<e.length-1;r++){const n=r+1,i=[...(0,l.yP)(e[r])];0===r&&t.push(i);const c=e[n];(0,l.Xq)(c)?t.push([...c]):(0,l.n1)(c)&&!o.has("cubic-bezier")?b(t,i,c,a):(0,l.aO)(c)&&!o.has("circular-arc")?y(t,i,c,a):(0,l.DA)(c)&&!o.has("elliptic-arc")?w(t,i,c,a):(0,l.wY)(c)&&!o.has("elliptic-arc")?M(t,i,c,a):(t.push((0,l.tk)(c)),s=!0)}i.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...s?{curvePaths:i}:{paths:i}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...s?{curveRings:i}:{rings:i}}}(e,t,o))})}function I(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}},65864(e,t,r){r.d(t,{rS:()=>u,xD:()=>h});var o=r(5443),a=r(91075),n=r(48526),i=r(86738),s=r(39829),l=r(82799),c=r(60408);function u(e){return null==e?null:e instanceof a.A?e:(0,c.fT)(e)?i.A.fromJSON(e):(0,c.Rg)(e)?l.A.fromJSON(e):(0,c.Bi)(e)?s.A.fromJSON(e):(0,c.U9)(e)?n.A.fromJSON(e):(0,c.ZC)(e)?o.A.fromJSON(e):null}const d={esriGeometryPoint:i.A,esriGeometryPolyline:l.A,esriGeometryPolygon:s.A,esriGeometryEnvelope:o.A,esriGeometryMultipoint:n.A,esriGeometryMultiPatch:s.A};function h(e){return e&&d[e]||null}},17136(e,t,r){r.d(t,{Y_:()=>z,O7:()=>P,el:()=>I});var o=r(92602),a=r(69052),n=r(49186),i=r(53966),s=r(39829),l=r(82799),c=r(16930),u=r(80754),d=r(21325),h=r(28735),m=r(52006),p=r(31411),f=r(11254),v=r(60408),g=r(65864),x=r(2272),b=r(84952),y=r(92300);const w=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function M(e){return"polygon"===e[0].type}function S(e){return"polyline"===e[0].type}function T(e,t,r){const o=1e6;if(t){const t=(0,m.Ed)(e)?(0,p.GS)(e,{maxSegmentLength:o}):function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw w().error(e),new n.A("internal:geometry",e)}const r=(0,u.r8)(e),o=[];for(const e of r){const r=[];o.push(r),r.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const a=e[o][0],n=e[o][1],i=e[o+1][0],s=e[o+1][1],l=Math.sqrt((i-a)*(i-a)+(s-n)*(s-n)),c=(s-n)/l,u=(i-a)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const o=e*t,i=u*o+a,s=c*o+n;r.push([i,s])}const e=(l+Math.floor(d-1)*t)/2,o=u*e+a,i=c*e+n;r.push([o,i])}r.push([i,s])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:o,spatialReference:e.spatialReference}):new l.A({paths:o,spatialReference:e.spatialReference})}(e,o);e=(0,h.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function C(e,t,r){if(Array.isArray(e)){const o=e[0];if(o>t){const r=(0,u.kd)(o,t);e[0]=o+r*(-2*t)}else if(o<r){const t=(0,u.kd)(o,r);e[0]=o+t*(-2*r)}}else{const o=e.x;if(o>t){const r=(0,u.kd)(o,t);e=e.clone().offset(r*(-2*t),0)}else if(o<r){const t=(0,u.kd)(o,r);e=e.clone().offset(t*(-2*r),0)}}return e}function _(e,t){let r=-1;for(let o=0;o<t.cutIndexes.length;o++){const a=t.cutIndexes[o],n=t.geometries[o],i=(0,u.r8)(n);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const o=t[e][0];r=o>r?o:r}r=Number(r.toFixed(9));const o=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=n.getPoint(e,r);n.setPoint(e,r,t.clone().offset(o,0))}return!0}})}if(a===r){if(M(e))for(const t of(0,u.r8)(n))e[a]=e[a].addRing(t);else if(S(e))for(const t of(0,u.r8)(n))e[a]=e[a].addPath(t)}else r=a,e[a]=n}return e}async function I(e,t,r){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&w().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??o.A.geometryServiceUrl;let n,i,c,m,p,M,S,P,O=0;const z=[],R=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,i=(0,d.Vp)(n),c=n.isWebMercator,M=c?102100:4326,m=u.j7[M].maxX,p=u.j7[M].minX,S=u.j7[M].plus180Line,P=u.j7[M].minus180Line),i)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(C(t.clone(),m,p));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>C(e,m,p)),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);R.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,p)*(2*m);let o=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:a,xmax:n}=e;a=Number(a.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(S)&&n!==m?(O=n>O?n:O,o=T(o,c),z.push(o),R.push("cut")):e.intersects(P)&&a!==p?(O=n*(2*m)>O?n*(2*m):O,o=T(o,c,360),z.push(o),R.push("cut")):R.push(o)}else R.push(t.clone());else R.push(t);else R.push(t);let D=(0,u.kd)(O,m),j=-90;const F=D,E=new l.A;for(;D>0;){const e=360*D-180;E.addPath([[e,j],[e,-1*j]]),j*=-1,D--}if(z.length>0&&F>0){const t=_(z,await async function(e,t,r,o){const a=(0,x.Dl)(e),n=t[0].spatialReference,i={...o,responseType:"json",query:{...a.query,f:"json",sr:(0,d.YX)(n),target:JSON.stringify({geometryType:(0,v.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},s=await(0,f.A)(a.path+"/cut",i),{cutIndexes:l,geometries:c=[]}=s.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=n,t})}}(a,z,E,r)),o=[],n=[];for(let r=0;r<R.length;r++){const a=R[r];if("cut"!==a)n.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(o.push(a),n.push("simplify")):n.push(c?(0,h.Gh)(a):a)}}if(!o.length)return n;const i=await async function(e,t,r){const o="string"==typeof e?(0,b.An)(e):e,a=t[0].spatialReference,n=(0,v.$B)(t[0]),i={...r,query:{...o.query,f:"json",sr:(0,d.YX)(a),geometries:JSON.stringify((0,y.X)(t))}},{data:s}=await(0,f.A)(o.path+"/simplify",i);return(0,y.V)(s.geometries,n,a)}(a,o,r),s=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?s.push(t):s.push(c?(0,h.Gh)(i.shift()):i.shift())}return s}const B=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)B.push(t);else{const e=z.shift();B.push(!0===c?(0,h.Gh)(e):e)}}return B}function P(e,t,r){const o=(0,d.Vp)(r);if(null==o)return e;const[a,n]=o.valid,i=2*n;let s=0,l=0;t>n?s=Math.ceil(Math.abs(t-n)/i):t<a&&(s=-Math.ceil(Math.abs(t-a)/i)),e>n?l=Math.ceil(Math.abs(e-n)/i):e<a&&(l=-Math.ceil(Math.abs(e-a)/i));let c=e+(s-l)*i;const u=c-t;return u>n?c-=i:u<a&&(c+=i),c}function O(e){const t=(0,d.Vp)(e);if(null==t)return null;const[r,o]=t.valid;return new a.hr(r,o)}const z=O(c.A.WGS84);O(c.A.WebMercator)},80754(e,t,r){r.d(t,{kS:()=>c,kd:()=>l,r8:()=>u});var o=r(82799),a=r(16930),n=r(60408),i=r(52006);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new o.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new o.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,i.Ed)(e))for(const r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of r){if((0,i.aO)(e)){const[r,o]=e.c;r[0]+=t,o[0]+=t;continue}if((0,i.FG)(e)){const[r,o]=e.a;r[0]+=t,o[0]+=t;continue}if((0,i.n1)(e)){const[r,o,a]=e.b;r[0]+=t,o[0]+=t,a[0]+=t;continue}e[0]+=t}for(const r of u(e))for(const e of r)e[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}r.d(t,["j7",0,s])},27921(e,t,r){r.d(t,{$Q:()=>y,C:()=>s,Cr:()=>u,H:()=>M,O_:()=>c,Qj:()=>l,T7:()=>x,Tj:()=>b,lU:()=>d,mN:()=>S,vE:()=>T,vt:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e=C){return[e[0],e[1],e[2],e[3]]}function s(e,t){return function(e,t,r,o,a=i()){return a[0]=e,a[1]=t,a[2]=r,a[3]=o,a}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,r){const o=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],a=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=t[0]*a,r[1]=t[1]*a,r[2]=t[2]*a,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function u(e,t,r,o=i()){const a=r[0]-t[0],n=r[1]-t[1],s=r[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],d=n*u-s*c,h=s*l-a*u,m=a*c-n*l,p=d*d+h*h+m*m,f=Math.abs(p-1)>1e-5&&p>1e-12?1/Math.sqrt(p):1;return o[0]=d*f,o[1]=h*f,o[2]=m*f,o[3]=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]),o}function d(e,t,r,o=0,n=Math.floor(r*(1/3)),i=Math.floor(r*(2/3))){if(r<3)return!1;t(m,o);let s=n,l=!1;for(;s<r-1&&!l;)t(p,s),s++,l=!(0,a.t2)(m,p);if(!l)return!1;for(s=Math.max(s,i),l=!1;s<r&&!l;)t(f,s),s++,(0,a.Re)(v,m,p),(0,a.S8)(v,v),(0,a.Re)(g,p,f),(0,a.S8)(g,g),l=!(0,a.t2)(m,f)&&!(0,a.t2)(p,f)&&Math.abs((0,a.Om)(v,g))<h;return l?(u(m,p,f,e),!0):(0!==o||1!==n||2!==i)&&d(e,t,r,0,1,2)}r(78955),r(44280),r(32114),r(32728);const h=.99619469809,m=(0,n.vt)(),p=(0,n.vt)(),f=(0,n.vt)(),v=(0,n.vt)(),g=(0,n.vt)();function x(e,t,r){return function(e){return 0===e||1===e}(T(e,t.origin,t.vector,0,r))}function b(e,t){return S(e,t)>=0}function y(e,t){return function(e,t,r,o,n,i,s){const l=(0,a.Om)(e,r),c=S(e,t);if(l>-1e-6&&l<1e-6)return w(c,n,i);const u=-c/l,d=w(l,n,!1);return!(s&&!d&&!w(c,n,i))&&(d?u>o.c0&&(o.c0=u):u<o.c1&&(o.c1=u),o.c0<=o.c1)}(e,t.ray.origin,t.ray.direction,t,!1,!1,!0)}function w(e,t,r){return r?t?e>=0:e<=0:t?e>0:e<0}function M(e,t,r,o=!1){let n=t.at(-1),i=S(e,n),s=o?i>0:i<=0;for(let l=0;l<t.length;l++){const c=t.at(l),u=S(e,c),d=o?u>0:u<=0;s!==d&&(0,a.Cc)(r(),n,c,i/(i-u)),d&&(0,a.C)(r(),c),n=c,i=u,s=d}}function S(e,t){return(0,a.Om)(e,t)+e[3]}function T(e,t,r,n,i){const s=(0,a.Om)(e,r),l=S(e,t);if(0===s)return l>=0?2:3;let c=-l/s;return 1&n&&(c=(0,o.qE)(c,0,1)),!(4&n)&&c<0||!(8&n)&&c>1?l>=0?2:3:((0,a.WQ)(i,t,(0,a.hs)(i,r,c)),l>=0?0:1)}const C=[0,0,1,0];(0,n.vt)()},44280(e,t,r){r.d(t,{g7:()=>s,gr:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e,t){return(0,a.Om)(e,t)/(0,a.Bw)(e)}function s(e,t){const r=(0,a.Om)(e,t)/((0,a.Bw)(e)*(0,a.Bw)(t));return-(0,o.XM)(r)}(0,n.vt)(),(0,n.vt)()},32114(e,t,r){r.d(t,{Rc:()=>m,rq:()=>d,Km:()=>h}),r(44208);var o=r(26390),a=r(29242),n=r(9093),i=r(82534),s=r(48163),l=r(51850),c=r(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,o.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(s.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(a.vt)}static createMat4f64(){return new u(n.vt)}static createQuatf64(){return new u(i.vt)}get test(){}}u.createVec2f64();const d=u.createVec3f64(),h=u.createVec4f64(),m=(u.createMat3f64(),u.createMat4f64());u.createQuatf64()},38969(e,t,r){r.d(t,{i:()=>a});var o=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,o.Oo)(e,"canplay",r)),t((0,o.Oo)(e,"error",a)))})}},92300(e,t,r){r.d(t,{V:()=>i,X:()=>n});var o=r(60408),a=r(65864);function n(e){return{geometryType:(0,o.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const o=(0,a.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>l});var o=r(11254),a=r(60999),n=r(49186),i=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,i.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const s=await(0,a.Ke)((0,o.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,i.QP)(s.error),new n.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>i});var o=r(34275),a=r(97146),n=r(63907);function i(e,t){switch(t){case n.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,a.tM)(e):(0,o.mg)(e)?new Uint16Array(e):e}(e);case n.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,a.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let a=0;a<r;a+=1)a%2==0?(o[t++]=e[a],o[t++]=e[a+1],o[t++]=e[a+2]):(o[t++]=e[a+1],o[t++]=e[a],o[t++]=e[a+2])}return o}(e);case n.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const a=e[0];let n=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];o[i++]=a,o[i++]=n,o[i++]=r,n=r}return o}(e)}}},51530(e,t,r){r.d(t,{KB:()=>i,Xi:()=>a,pn:()=>s,x3:()=>n});var o=r(44208);class a{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function n(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new a(e);const r=new Blob([e],{type:t});let n=URL.createObjectURL(r);switch(t){case"image/jpeg":n+="#.jpg";break;case"image/png":n+="#.png"}const i=new Image;if((0,o.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{a(),e(i)},o=e=>{a(),t(e)},a=()=>{URL.revokeObjectURL(n),i.removeEventListener("load",r),i.removeEventListener("error",o)};i.addEventListener("load",r),i.addEventListener("error",o),i.src=n});try{i.src=n,await i.decode()}catch{}return URL.revokeObjectURL(n),i}},77691(e,t,r){r.d(t,{fetch:()=>Ct});var o=r(40876),a=r(61473),n=r(34727),i=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),h=r(51850),m=r(70328);function p(e,t=!1){return e<=1024?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var f=r(13030),v=r(73354),g=r(50867),x=r(43609),b=r(21015),y=r(84498),w=r(51530),M=r(88340);function S(e){if(null==e)return null;const t=null!=e.offset?e.offset:M.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:M.Un,a=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),n=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,s.vt)();return(0,i.lw)(c,n,l),(0,i.lw)(c,a,c),c}class T{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new T,this.numberOfVertices=0}}var _=r(11254),I=r(60999),P=r(49186),O=r(53966),z=r(69397);class R{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const o=this._outer.get(e);o?o.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,o]of t)yield[e,r,o]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,o)=>e(t,r,o)))}copy(){const e=new R;return this.forAll((t,r,o)=>e.set(r,o,t)),e}}var D=r(17676),j=r(46140),F=r(97146),E=r(31217),B=r(46610),H=r(67499),W=r(18845),N=r(49255),A=r(97768),G=r(92130),L=r(65786);class V extends G.A{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,A.Gz)(this._texture),this._textureNormal=(0,A.Gz)(this._textureNormal),this._textureEmissive=(0,A.Gz)(this._textureEmissive),this._textureOcclusion=(0,A.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,A.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new U(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,A.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,D.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,A.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class k extends L.Y{constructor(e=null){super(),this.textureEmissive=e}}class U extends k{constructor(e,t,r,o,a,n,i){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=o,this.textureMetallicRoughness=a,this.scale=n,this.normalTextureTransformMatrix=i}}var $=r(11725),q=r(620);class Z{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const Y=(0,m.vt)();function J(e,t,r,o,a,n){if(!e.visible)return;const i=(0,d.jb)(le,o,r),{tolerance:s}=t,l=new Z(s,!1,t.options.normalRequired);if(e.boundingInfo)(0,q.vA)(0===e.type),K(e.readPrimitivePosition,e.boundingInfo,r,i,s,a,l,n);else{const t=e.readPrimitivePosition;!function(e,t,r,o,a,n,i,s){const l=t,c=ce,u=Math.abs(l[0]),h=Math.abs(l[1]),m=Math.abs(l[2]),p=u>=h?u>=m?0:2:h>=m?1:2,f=p,v=l[f]<0?2:1,g=(p+v)%3,x=(p+(3-v))%3,b=l[g]/l[f],y=l[x]/l[f],w=1/l[f],M=ee,S=te,T=re,{normalRequired:C}=i;for(let t=r;t<o;++t){const r=3*t;a(c[0],r),a(c[1],r+1),a(c[2],r+2),n&&(n.applyToVertex(c[0],c[0][0],c[0][1],c[0][2],t),n.applyToVertex(c[1],c[1][0],c[1][1],c[1][2],t),n.applyToVertex(c[2],c[2][0],c[2][1],c[2][2],t)),(0,d.jb)(M,c[0],e),(0,d.jb)(S,c[1],e),(0,d.jb)(T,c[2],e);const o=M[g]-b*M[f],i=M[x]-y*M[f],l=S[g]-b*S[f],u=S[x]-y*S[f],h=T[g]-b*T[f],m=T[x]-y*T[f],p=h*u-m*l,v=o*m-i*h,_=l*i-u*o;if((p<0||v<0||_<0)&&(p>0||v>0||_>0))continue;const I=p+v+_;if(0===I)continue;const P=p*(w*M[f])+v*(w*S[f])+_*(w*T[f]);if(P*Math.sign(I)<0)continue;const O=P/I;O>=0&&s(O,O,C?ae(c):null,t)}}(r,i,0,e.faceCount,t,a,l,n)}}const X=(0,h.vt)();function K(e,t,r,o,a,n,i,s){if(null==t)return;const l=function(e,t){return(0,d.hZ)(t,1/e[0],1/e[1],1/e[2])}(o,X);if((0,m.C)(Y,t.box),null!=n&&n.applyToAabb(Y),function(e,t,r,o){return function(e,t,r,o){const a=(e[0]-o-t[0])*r[0],n=(e[3]+o-t[0])*r[0];let i=Math.min(a,n),s=Math.max(a,n);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(i=Math.max(i,Math.min(l,c)),i>s)return!1;const u=(e[2]-o-t[2])*r[2],d=(e[5]+o-t[2])*r[2];return s=Math.min(s,Math.max(u,d)),!(s<0)&&(i=Math.max(i,Math.min(u,d)),!(i>s)&&i<1/0)}(e,t,r,o)}(Y,r,l,a)){const{primitiveIndices:l}=t,c=l.length;if(c>1e3){const l=t.children;if(void 0!==l){for(const t of l)K(e,t,r,o,a,n,i,s);return}}!function(e,t,r,o,a,n,i,s,l){const c=e[0],u=e[1],d=e[2],h=t[0],m=t[1],p=t[2],{normalRequired:f}=s;for(let e=0;e<o;++e){const t=n[e],r=3*t;let[o,s,v]=a(de,r),[g,x,b]=a(de,r+1),[y,w,M]=a(de,r+2);null!=i&&([o,s,v]=i.applyToVertex(ue,o,s,v,e),[g,x,b]=i.applyToVertex(ue,g,x,b,e),[y,w,M]=i.applyToVertex(ue,y,w,M,e));const S=g-o,T=x-s,C=b-v,_=y-o,I=w-s,P=M-v,O=m*P-I*p,z=p*_-P*h,R=h*I-_*m,D=S*O+T*z+C*R,j=D*D;if(j<=se)continue;const F=c-o,E=u-s,B=d-v,H=(F*O+E*z+B*R)*D;if(H<0||H>j)continue;const W=E*C-T*B,N=B*S-C*F,A=F*T-S*E,G=(h*W+m*N+p*A)*D;if(G<0||H+G>j)continue;const L=(_*W+I*N+P*A)/D;L>=0&&l(L,L,f?oe(S,T,C,_,I,P,Q):null,t)}}(r,o,0,c,e,l,n,i,s)}}const Q=(0,h.vt)();const ee=(0,h.vt)(),te=(0,h.vt)(),re=(0,h.vt)();function oe(e,t,r,o,a,n,i){return(0,d.hZ)(ne,e,t,r),(0,d.hZ)(ie,o,a,n),(0,d.$A)(i,ne,ie),(0,d.S8)(i,i),i}function ae(e){return(0,d.jb)(ne,e[1],e[0]),(0,d.jb)(ie,e[2],e[0]),(0,d.$A)(Q,ne,ie),(0,d.S8)(Q,Q),Q}const ne=(0,h.vt)(),ie=(0,h.vt)(),se=1e-7*1e-7,le=(0,h.vt)(),ce=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()],ue=(0,h.vt)(),de=(0,h.vt)();var he=r(75956),me=r(16396),pe=r(59907);class fe{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,o,a){null!=a&&(0,pe.vJ)(r,o,this.layout,e,t,a)}}var ve=r(33442),ge=r(47724);const xe=new ge.L,be=2e-5,ye=2e-6,we=(0,h.vt)();var Me=r(43616),Se=r(5482),Te=r(91429),Ce=r(91829),_e=r(4431),Ie=r(1843),Pe=r(72824),Oe=r(13840),ze=r(98958),Re=r(16943),De=r(33524),je=r(56133);r(4576),r(66289);var Fe=r(69622),Ee=r(65529),Be=r(32728);class He{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",f.Eq),this.color=e.getField("instanceColor",f.XP),this.olidColor=e.getField("instanceOlidColor",f.XP),this.state=e.getField("state",f.SL),this.lodLevel=e.getField("lodLevel",f.SL)}}let We=class extends Fe.A{constructor(e,t){super(e),this.events=new Ee.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Ae(Ne.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Ue,this._buffer=this._layout.createBuffer(this._capacity),this._view=new He(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,q.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,q.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=Ge,o=Le;t.localTransform.getMat(e,Ve),t.globalTransform.getMat(e,ke);const a=(0,l.lw)(ke,ke,Ve);(0,d.hZ)(r,a[12],a[13],a[14]),t.modelOrigin.setVec(e,r),(0,i.z0)(o,a),t.model.setMat(e,o);const n=(0,Be.wp)(Ge,a);n.sort(),t.modelScaleFactors.set(e,0,n[1]),t.modelScaleFactors.set(e,1,n[2]),(0,i.B8)(o,o),(0,i.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Le),r.modelOrigin.getVec(e,Ge),t[0]=Le[0],t[1]=Le[1],t[2]=Le[2],t[3]=0,t[4]=Le[3],t[5]=Le[4],t[6]=Le[5],t[7]=0,t[8]=Le[6],t[9]=Le[7],t[10]=Le[8],t[11]=0,t[12]=Ge[0],t[13]=Ge[1],t[14]=Ge[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ge,this,e),t*=Math.max(Ge[0],Ge[1],Ge[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ge,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(Ge[0],Ge[1],Ge[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,o=r.get(e);t?t!==o&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):o&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Ue,Math.floor(1.5*this._capacity)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new He(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,Se.Cg)([(0,Te.MZ)({constructOnly:!0})],We.prototype,"shaderTransformation",void 0),(0,Se.Cg)([(0,Te.MZ)()],We.prototype,"_size",void 0),(0,Se.Cg)([(0,Te.MZ)({readOnly:!0})],We.prototype,"size",null),We=(0,Se.Cg)([(0,Te.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],We);const Ne=(0,Ie.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Ae(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Re.E)()&&e.vec4u8("instanceOlidColor"),e}const Ge=(0,h.vt)(),Le=(0,s.vt)(),Ve=(0,c.vt)(),ke=(0,c.vt)(),Ue=64,$e=(0,Ie.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var qe=r(74810),Ze=r(28491),Ye=r(90644),Je=r(49788);class Xe extends Pe.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=qe.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=h.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,h.CN)(.2,.2,.2),this.diffuse=(0,h.CN)(.8,.8,.8),this.externalColor=(0,Ce.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,h.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=Je.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}Pe.gy;let Ke=class extends ze.w{constructor(e,t){let o=(0,_e.U)(tt(t));t.instanced&&t.instancedDoublePrecision&&(o=o.concat((0,_e.U)(function(e){return Ae($e.clone(),e)}(t)))),super(e,t,o),this.shader=new Oe.r(Ze.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:o,cullFace:a,customDepthTest:n,hasOccludees:i}=e;return(0,Ye.Ey)({blending:o?(0,De.Yf)(r,!1,e.emissionDimmingPass):null,culling:et(e)?(0,Ye.Xt)(a):null,depthTest:(0,De.mt)(r,Qe(n)),depthWrite:(0,De.z5)(e),colorWrite:Ye.kn,stencilWrite:i?je.v0:null,stencilTest:i?t?je.Ax:je.cP:null,polygonOffset:(0,ve.s)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,r){return r?this._occludeePipelineState:super.getPipeline(e,t,r)}};function Qe(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function et(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function tt(e){const t=(0,Ie.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Re.E)()&&t.vec4u8("olidColor"),t}Ke=(0,Se.Cg)([(0,Te.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Ke);var rt=r(51976);class ot extends ge.L{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1,this.renderOccluded=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}}(0,Se.Cg)([(0,rt.W)({count:4})],ot.prototype,"alphaDiscardMode",void 0),(0,Se.Cg)([(0,rt.W)({count:3})],ot.prototype,"doubleSidedMode",void 0),(0,Se.Cg)([(0,rt.W)({count:8})],ot.prototype,"pbrMode",void 0),(0,Se.Cg)([(0,rt.W)({count:3})],ot.prototype,"cullFace",void 0),(0,Se.Cg)([(0,rt.W)({count:3})],ot.prototype,"normalType",void 0),(0,Se.Cg)([(0,rt.W)({count:3})],ot.prototype,"customDepthTest",void 0),(0,Se.Cg)([(0,rt.W)({count:8})],ot.prototype,"emissionSource",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasVertexColors",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasSymbolColors",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasVerticalOffset",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasColorTexture",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasMetallicRoughnessTexture",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasOcclusionTexture",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasNormalTexture",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasScreenSizePerspective",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasVertexTangents",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasOccludees",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"instanced",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"instancedDoublePrecision",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasModelTransformation",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"offsetBackfaces",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasVVSize",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasVVColor",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"receiveShadows",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasShadowHighlights",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"receiveAmbientOcclusion",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"receiveGlobalIllumination",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"textureAlphaPremultiplied",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"instancedFeatureAttribute",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"instancedColor",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"writeDepth",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"snowCover",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasColorTextureTransform",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasEmissionTextureTransform",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasNormalTextureTransform",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasOcclusionTextureTransform",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasMetallicRoughnessTextureTransform",void 0);var at=r(57323);let nt=class extends Ke{constructor(){super(...arguments),this.shader=new Oe.r(at.R,()=>r.e(2314).then(r.bind(r,39933)))}};nt=(0,Se.Cg)([(0,Te.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],nt);class it extends rt.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,Se.Cg)([(0,rt.W)()],it.prototype,"receiveShadows",void 0);class st extends $.i{constructor(e,t){super(e,ct),this.materialType="default",this.supportsEdges=!0,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[2,e=>(0,N.uw)(e)&&!this.transparent],[4,e=>(0,N.uw)(e)&&this.transparent]]),this._layout=tt(this.parameters),this._configuration=new ot(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:o}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(o[3])?1:o[3])>=Je.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,h.uY)}get emissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:o,doubleSided:a,doubleSidedType:n}=t;r.hasVertexTangents=!o&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=o?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!o&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=o?2:a&&"normal"===n?1:a&&"winding-order"===n?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,N._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.unlit?7:t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersectRay(e,t,r,o,a,n){const i=this._getMaterialVerticalOffset(t,r);null!=i&&(o=(0,d.Re)(ut,o,i),a=(0,d.Re)(dt,a,i)),n=function(e,t,r,o){xe.output=t.transparent?1:0,xe.polygonOffset=t.polygonOffset,xe.enableOITOffset=t.enableOITOffset;const a=(0,ve.s)(xe);if(!a)return e;const n=ye*a.units,i=(0,d.oW)(we,o,r);return(t,r,o,s)=>{const l=(o?1-Math.abs((0,d.Om)(i,o)):0)*a.factor*be+n;return e(t,r+l,o,s)}}(n,this._configuration,o,a),J(e,r,o,a,(0,me.ou)(r.verticalOffset),n)}intersectScreenPolygon(e,t,r,o){return function(e,t,r){return null==e?null:(e.distance=function(e,t,r,o,a){const n=(0,ve.s)(r);return n?function({units:e,factor:t},r,o,a){const n=ye*e;return o+((a?1-Math.abs((0,d.Om)(r,a)):0)*t*be+n)}(n,(0,d.oW)(we,a,o),e,t):e}(e.distance,e.hasNormal?e.normal:null,t,r,e.point),e)}((0,he.MJ)(e,r,t,o,this._createScreenPolygonVertexDisplacement(t,r)),this._configuration,r.camera.eye)}createGLMaterial(e){return new lt(e)}createBufferWriter(){return new fe(this._layout)}get transparent(){const{drivenOpacity:e,opacity:t,externalColor:r,layerOpacity:o,texture:a,textureId:n,textureAlphaMode:i,colorMixMode:s}=this.parameters,l=r[3];return e||t<1&&"replace"!==s||l<1&&"ignore"!==s||o<1||(null!=a||null!=n)&&1!==i&&2!==i&&"replace"!==s}_createScreenPolygonVertexDisplacement(e,t){const r=this._getMaterialVerticalOffset(e,t);return null==r?null:{applyToVertex:(e,t,o,a)=>(e[0]=t+r[0],e[1]=o+r[1],e[2]=a+r[2],e),applyToAabb:e=>((0,m.Ne)(e,(0,d.WQ)(gt,(0,m.pg)(e,gt),r)),(0,m.vI)(e,(0,d.WQ)(gt,(0,m.Lu)(e,gt),r)),e)}}_getMaterialVerticalOffset(e,t){if(null==this.parameters.verticalOffset)return null;const r=t.camera;(0,d.hZ)(pt,e[12],e[13],e[14]);let o=null;switch(t.viewingMode){case 1:o=(0,d.S8)(mt,pt);break;case 2:o=(0,d.C)(mt,ht)}const a=(0,d.Re)(ft,pt,r.eye),n=(0,d.Bw)(a),i=(0,d.hs)(a,a,1/n);let s=null;this.parameters.screenSizePerspective&&(s=(0,d.Om)(o,i));const l=(0,Me.kE)(r,n,this.parameters.verticalOffset,s??0,this.parameters.screenSizePerspective,null);return(0,d.hs)(o,o,l),(0,d.ei)(vt,o,t.transform.inverseRotation)}}class lt extends V{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?nt:Ke,e)}}class ct extends Xe{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1,this.unlit=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const ut=(0,h.vt)(),dt=(0,h.vt)(),ht=(0,h.fA)(0,0,1),mt=(0,h.vt)(),pt=(0,h.vt)(),ft=(0,h.vt)(),vt=(0,h.vt)(),gt=(0,h.vt)(),xt=()=>O.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class bt{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function yt(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(xt().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(xt().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(xt().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(xt().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else xt().warn("Indexed geometries must specify faces"),o=!1;break}default:xt().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(xt().warn("Geometry requires material"),o=!1);const a=e.params.vertexAttributes;for(const e in a)a[e].values||(xt().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function wt(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&(0,m.RF)(t,r.box)}),t}function Mt(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function St(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Tt=new j.A(1,2,"wosr");async function Ct(e,t){const s=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?"wosr":"unknown",url:e,specifiedLodIndex:null}}((0,a.EM)(e));if("wosr"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,I.Ke)((0,_.A)(e,t));if(r.ok)return r.value.data;(0,D.QP)(r.error),function(e){throw new P.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const a=e[o],n=a.images[0].data;if(!n){xt().warn("Externally referenced texture data is not yet supported");continue}const i=a.encoding+";base64,"+n,s="/textureDefinitions/"+o,l="rgba"===a.channels?a.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==Mt(l)},u=t?.disableTextures?Promise.resolve(null):(0,E.D)(i,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const o=await Promise.all(r),a={};for(const e of o)a[e.refId]=e;return a}(r.textureDefinitions??{},t);let a=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];a+=t?.image?t.image.width*t.image.height*4:0}return new bt(r,o,a+(0,z.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,a=new Array,n=new R,i=e.resource,s=j.A.parse(i.version||"1.0","wosr");Tt.validate(s);const l=i.model.name,c=i.model.geometries,u=i.materialDefinitions??{},d=e.textures;let m=0;const p=new Map;for(let e=0;e<c.length;e++){const i=c[e];if(!yt(i))continue;const s=St(i),l=i.params.vertexAttributes,f=[],v=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,F.tM)(x);f.push([e,new B.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,y=d&&d[b];if(y&&!p.has(b)){const{image:e,parameters:t}=y,r=new W.h(e,t);o.push(r),p.set(b,r)}const w=p.get(b),M=w?w.id:void 0,S=s.material;let T=n.get(S,b);if(null==T){const e=u[S.slice(S.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?Mt(y.alphaChannelUsage):void 0,o={ambient:(0,h.ci)(e.diffuse),diffuse:(0,h.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(o,t.materialParameters),T=new st(o,t),n.set(S,b,T)}a.push(T);const C=new H.V(T,f);m+=f.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(C)}return{engineResources:[{name:l,stageResources:{textures:o,materials:a,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:wt(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let M;if(t.cache)M=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));M=await e(new b.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:T,referenceBoundingBox:O}=function(e,t,r){const a=e.model,s=e.meta,b=a.meta?.ESRI_proxyEllipsoid,M=s.isEsriSymbolResource&&null!=b&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;M&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const o=e.model.lods[r];for(const a of o.parts){const o=a.attributes.normal;if(null==o)return;const n=a.attributes.position,i=n.count,s=(0,h.vt)(),u=(0,h.vt)(),m=(0,h.vt)(),p=new Float32Array(4*i),v=new Float32Array(3*i),g=(0,l.B8)((0,c.vt)(),a.transform);let x=0,b=0;for(let l=0;l<i;l++){n.getVec(l,u),o.getVec(l,s),(0,d.Z0)(u,u,a.transform),(0,d.Re)(m,u,t.center),(0,d.Qr)(m,m,t.radius);const i=m[2],c=(0,d.Bw)(m),h=Math.min(.45+.55*c*c,1)**2.2;(0,d.Qr)(m,m,t.radius),null!==g&&(0,d.Z0)(m,m,g),(0,d.S8)(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.Cc)(m,m,s,i>-1?.2:Math.min(-4*i-3.8,1)),v[x]=m[0],v[x+1]=m[1],v[x+2]=m[2],x+=3,p[b]=h,p[b+1]=h,p[b+2]=h,p[b+3]=1,b+=4}a.attributes.normal=new f.xs(v.buffer),a.attributes.color=new f.Eq(p.buffer)}}}(e,b));const T=!!t.usePBR,_=s.isEsriSymbolResource?{usePBR:T,isSchematic:!1,treeRendering:M,mrrFactors:qe.SY}:{usePBR:T,isSchematic:!1,treeRendering:!1,mrrFactors:qe.mb},I={...t.materialParameters,treeRendering:M},P=new Array,O=new Map,z=new Map,R=a.lods.length,D=(0,m.Ie)();return a.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(R>1&&0===s||R>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new st({},t):function(e,t,r,a,n,i,s,l,c){const d=e.materials.get(t.material);if(null==d)return null;const{normal:m,color:p,texCoord0:f,tangent:v}=t.attributes,g=t.material+(m?"_normal":"")+(p?"_color":"")+(f?"_texCoord0":"")+(v?"_tangent":""),x=null!=t.attributes.texCoord0,b=null!=t.attributes.normal,y=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!i.has(g)){if(x){const t=(t,r=!1,o=!1)=>{if(null!=t&&!s.has(t)){const a=e.textures.get(t);if(a){const e=a.data,n=r&&!(0,w.x3)(e)?l.compressionOptions:void 0;s.set(t,new W.h((0,w.x3)(e)?e.data:e,{...a.parameters,preMultiplyAlpha:!(0,w.x3)(e)&&o,encoding:(0,w.x3)(e)?e.encoding:void 0,compressionOptions:n}))}}},r=1!==y&&!c;t(d.colorTexture,r,1!==y),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}const r=(0,o.xV)(d.color[0]),m=(0,o.xV)(d.color[1]),p=(0,o.xV)(d.color[2]),f=null!=d.colorTexture&&x?s.get(d.colorTexture):null,v=(0,qe.Jr)(d),M=null!=d.normalTextureTransform?.scale?d.normalTextureTransform?.scale:u.Un;i.set(g,new st({...a,customDepthTest:1,textureAlphaMode:y,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,m,p],ambient:[r,m,p],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:b?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,unlit:d.unlit,textureId:null!=f?f.id:void 0,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&x?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=f&&!!f.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&x?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&x&&!d.unlit?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&x?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:d.unlit?h.uY:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null!=d.emissiveStrengthKHR?d.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=n.emissiveStrengthFromSymbol?n.emissiveStrengthFromSymbol:void 0,mrrFactors:v?qe.Bt:[d.metallicFactor,d.roughnessFactor,a.mrrFactors[2]],isSchematic:v,colorTextureTransformMatrix:S(d.colorTextureTransform),normalTextureTransformMatrix:S(d.normalTextureTransform),scale:[M[0],M[1]],occlusionTextureTransformMatrix:S(d.occlusionTextureTransform),emissiveTextureTransformMatrix:S(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:S(d.metallicRoughnessTextureTransform),...n},l))}const M=i.get(g);if(r.stageResources.materials.push(M),x){const e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return M}(a,e,c,_,I,O,z,t,M),{geometry:d,vertexCount:b}=function(e,t){const r=e.attributes.position.count,o=(0,y.x)(e.indices||r,e.primitiveType),a=p(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,v.t)(a,s,e.transform,3,l);const c=[["position",new B.n(a,o,3,!0)]];if(null!=e.attributes.normal){const t=p(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;(0,i.Ge)(_t,e.transform),(0,v.b)(t,a,_t,3,s),(0,n.or)(_t)&&(0,v.n)(t,t),c.push(["normal",new B.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=p(4*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.tangent;(0,i.z0)(_t,e.transform),(0,g.t)(t,a,_t,4,s),(0,n.or)(_t)&&(0,v.n)(t,t,4),c.push(["tangent",new B.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=p(2*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.texCoord0;(0,x.a)(t,a,2,n),c.push(["uv0",new B.n(t,o,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof f.Eq?(0,g.b)(t,u,1,255):(u instanceof f.XP||u instanceof f.Uz)&&(0,g.b)(t,u,1/255,255):(t.fill(255),u instanceof f.xs?(0,v.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof f.eI||e.attributes.color instanceof f.nS)&&(0,v.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new B.n(t,o,4,!0)])}return{geometry:new H.V(t,c),vertexCount:r}}(e,r??new st({},t)),T=d.boundingInfo;null!=T&&0===s&&(0,m.RF)(D,T.box),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=b)}),l||P.push(c)}),{engineResources:P,referenceBoundingBox:D}}(M,t,s.specifiedLodIndex);return{lods:T,referenceBoundingBox:O,isEsriSymbolResource:M.meta.isEsriSymbolResource,isWosr:!1}}const _t=(0,s.vt)()},32728(e,t,r){r.d(t,{YH:()=>s,hG:()=>n,nu:()=>l,wp:()=>i}),r(34727);var o=r(35522),a=r(51850);function n(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],r=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],o=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,r,o))}function i(e,t){const r=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),a=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),n=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,o.hZ)(e,r,a,n),e}function s(e,t,r){r=r||e;const a=(0,o.Om)(e,t);(0,o.hZ)(r,e[0]-a*t[0],e[1]-a*t[1],e[2]-a*t[2]),(0,o.S8)(r,r)}function l(e,t,r,n=(0,a.vt)()){const i=(0,o.Bw)(e),s=(0,o.Bw)(t),l=(0,o.Om)(e,t)/(i*s);if(l<.9999999999999999){const a=Math.acos(l),d=((1-r)*i+r*s)/Math.sin(a),h=d/i*Math.sin((1-r)*a),m=d/s*Math.sin(r*a);return(0,o.hs)(c,e,h),(0,o.hs)(u,t,m),(0,o.WQ)(n,c,u)}return(0,o.Cc)(n,e,t,r)}(0,a.vt)(),(0,a.vt)(),(0,a.vt)();const c=(0,a.vt)(),u=(0,a.vt)()},46686(e,t,r){r.d(t,{o:()=>a});var o=r(31821);function a(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(o.H`
|
|
662
|
+
fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}));r.d(t,["S",0,h])},43609(e,t,r){r.d(t,{a:()=>i,f:()=>n,n:()=>a});var o=r(34275);function a(e,t){i(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r=2,a=r){const i=t.length/2;let n=0,s=0;if(!(0,o.iu)(t)||(0,o.dk)(t)){for(let o=0;o<i;++o)e[n]=t[s],e[n+1]=t[s+1],n+=r,s+=a;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<i;++o)e[n]=Math.max(t[s]/l,-1),e[n+1]=Math.max(t[s+1]/l,-1),n+=r,s+=a;else for(let o=0;o<i;++o)e[n]=t[s]/l,e[n+1]=t[s+1]/l,n+=r,s+=a}function n(e,t,r,o){const a=e.typedBuffer,i=e.typedBufferStride,n=o?.count??e.count;let s=(o?.dstIndex??0)*i;for(let e=0;e<n;++e)a[s]=t,a[s+1]=r,s+=i}Object.freeze(Object.defineProperty({__proto__:null,fill:n,normalizeIntegerBuffer:i,normalizeIntegerBufferView:a},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>d,b:()=>s,c:()=>a,d:()=>n,e:()=>h,f:()=>u,l:()=>c,n:()=>m,t:()=>i}),r(44208);var o=r(72727);function a(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,a=3,i=a){const n=(0,o.k)(e.length,a,3),s=(0,o.k)(t.length,i,3),l=Math.min(n,s),c=r[0],u=r[1],d=r[2],h=r[4],m=r[5],p=r[6],f=r[8],v=r[9],g=r[10],x=r[12],b=r[13],y=r[14];let w=0,M=0;for(let r=0;r<l;r++){const r=t[w],o=t[w+1],n=t[w+2];e[M]=c*r+h*o+f*n+x,e[M+1]=u*r+m*o+v*n+b,e[M+2]=d*r+p*o+g*n+y,w+=i,M+=a}return e}function n(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,a=3,i=a){const n=(0,o.k)(e.length,a,3),s=(0,o.k)(t.length,i,3),l=Math.min(n,s),c=r[0],u=r[1],d=r[2],h=r[3],m=r[4],p=r[5],f=r[6],v=r[7],g=r[8];let x=0,b=0;for(let r=0;r<l;r++){const r=t[x],o=t[x+1],n=t[x+2];e[b]=c*r+h*o+f*n,e[b+1]=u*r+m*o+v*n,e[b+2]=d*r+p*o+g*n,x+=i,b+=a}}function l(e,t,r,o=3,a=o){const i=Math.min(e.length/o,t.length/a);let n=0,s=0;for(let l=0;l<i;l++)e[s]=r*t[n],e[s+1]=r*t[n+1],e[s+2]=r*t[n+2],n+=a,s+=o;return e}function c(e,t,r,o){u(e.typedBuffer,t.typedBuffer,r,o,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r,o,a=3,i=a){const n=Math.min(e.length/a,t.length/i);let s=0,l=0;const c=1/2.2;for(let u=0;u<n;u++)e[l]=o*(r*t[s])**c,e[l+1]=o*(r*t[s+1])**c,e[l+2]=o*(r*t[s+2])**c,s+=i,l+=a}function d(e,t,r,a=3,i=a){const n=(0,o.k)(e.length,a,3),s=(0,o.k)(t.length,i,3),l=Math.min(n,s);let c=0,u=0;for(let o=0;o<l;o++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=i,u+=a;return e}function h(e,t){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(e,t,r=3,o=r){const a=Math.min(e.length/r,t.length/o);let i=0,n=0;for(let s=0;s<a;s++){const a=t[i],s=t[i+1],l=t[i+2],c=a*a+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[n]=t*a,e[n+1]=t*s,e[n+2]=t*l}i+=o,n+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:m,normalizeView:h,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),a=e.typedBuffer,i=e.typedBufferStride,n=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)a[c]=n[l]>>r,a[c+1]=n[l+1]>>r,a[c+2]=n[l+2]>>r,l+=s,c+=i},transformMat3:s,transformMat3View:n,transformMat4:i,transformMat4View:a,translate:d},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>a});var o=r(34727);class a{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return i(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,o.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+n(this.range,e-t,r)}minimalMonotonic(e,t,r){return i(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,o=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(o)?r:o}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function i(e,t,r,o,a=0,i=!1){return(o-=a)<t?o+=n(e,t-o):o>r&&(o-=n(e,o-r)),i&&o===r&&(o=t),o+a}function n(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new a(0,2*Math.PI),l=(new a(-Math.PI,Math.PI),new a(0,360));r.d(t,["ie",0,l,"uC",0,s])},46140(e,t,r){r.d(t,{A:()=>a});var o=r(49186);class a{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new a(this.major,this.minor,this._context)}static parse(e,t=""){const[r,i]=e.split("."),n=/^\s*\d+\s*$/;if(!r?.match||!n.test(r))throw new o.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!i?.match||!n.test(i))throw new o.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(i,10);return new a(s,l,t)}}},61473(e,t,r){function o(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function a(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(i)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(n)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>a,b5:()=>o});const i=/^devext\.arcgis\.com$/,n=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,i,n,/^jsapps\.esri\.com$/,s,l]},82534(e,t,r){function o(){return[0,0,0,1]}function a(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>a,vt:()=>o});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:o,fromValues:function(e,t,r,o){return[e,t,r,o]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["zK",0,i])},88340(e,t,r){function o(){return new Float32Array(2)}function a(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function i(){return o()}function n(){return a(1,1)}function s(){return a(1,0)}function l(){return a(0,1)}r.d(t,{fA:()=>a,vt:()=>o});const c=i(),u=n(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,fromValues:a,ones:n,unitX:s,unitY:l,zeros:i},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,u,"uY",0,c])},48163(e,t,r){function o(){return[0,0]}function a(e){return[e[0],e[1]]}function i(e,t){return[e,t]}function n(){return i(1,1)}function s(){return i(-1,-1)}function l(){return i(1,0)}function c(){return i(0,1)}r.d(t,{fA:()=>i,o8:()=>a,vt:()=>o});const u=n(),d=s(),h=l(),m=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:d,ONES:u,UNIT_X:h,UNIT_Y:m,ZEROS:[0,0],clone:a,create:o,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:i,negativeOnes:s,ones:n,unitX:l,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["IA",0,d,"Un",0,u])},91829(e,t,r){function o(){return[0,0,0,0]}function a(e,t,r,o){return[e,t,r,o]}function i(e,t,r,o){return[e,t,r,o]}function n(){return a(1,1,1,1)}function s(){return a(1,0,0,0)}function l(){return a(0,1,0,0)}function c(){return a(0,0,1,0)}function u(){return a(0,0,0,1)}r.d(t,{CN:()=>i,_Y:()=>u,fA:()=>a,vt:()=>o});const d=[0,0,0,0],h=n(),m=s(),p=l(),f=c(),v=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:v,UNIT_X:m,UNIT_Y:p,UNIT_Z:f,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:o,freeze:i,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:a,ones:n,unitW:u,unitX:s,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,h,"uY",0,d])},78955(e,t,r){r.d(t,{Bw:()=>v,C:()=>a,Cc:()=>y,LI:()=>h,Om:()=>b,S8:()=>x,T9:()=>d,WQ:()=>n,Z0:()=>w,aI:()=>S,hG:()=>f,hZ:()=>i,hs:()=>m,jk:()=>u,m3:()=>g,t2:()=>M});var o=r(34304);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(e,t,r,o,a){return e[0]=t,e[1]=r,e[2]=o,e[3]=a,e}function n(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function h(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function p(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],i=t[3]-e[3];return Math.sqrt(r*r+o*o+a*a+i*i)}function f(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],i=t[3]-e[3];return r*r+o*o+a*a+i*i}function v(e){const t=e[0],r=e[1],o=e[2],a=e[3];return Math.sqrt(t*t+r*r+o*o+a*a)}function g(e){const t=e[0],r=e[1],o=e[2],a=e[3];return t*t+r*r+o*o+a*a}function x(e,t){const r=t[0],o=t[1],a=t[2],i=t[3];let n=r*r+o*o+a*a+i*i;return n>0&&(n=1/Math.sqrt(n),e[0]=r*n,e[1]=o*n,e[2]=a*n,e[3]=i*n),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function y(e,t,r,o){const a=t[0],i=t[1],n=t[2],s=t[3];return e[0]=a+o*(r[0]-a),e[1]=i+o*(r[1]-i),e[2]=n+o*(r[2]-n),e[3]=s+o*(r[3]-s),e}function w(e,t,r){const o=t[0],a=t[1],i=t[2],n=t[3];return e[0]=r[0]*o+r[4]*a+r[8]*i+r[12]*n,e[1]=r[1]*o+r[5]*a+r[9]*i+r[13]*n,e[2]=r[2]*o+r[6]*a+r[10]*i+r[14]*n,e[3]=r[3]*o+r[7]*a+r[11]*i+r[15]*n,e}function M(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function S(e,t){const r=e[0],a=e[1],i=e[2],n=e[3],s=t[0],l=t[1],c=t[2],u=t[3],d=(0,o.FD)();return Math.abs(r-s)<=d*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-l)<=d*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(i-c)<=d*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(n-u)<=d*Math.max(1,Math.abs(n),Math.abs(u))}const T=s,C=l,_=c,I=p,O=f,P=v,z=g;Object.freeze(Object.defineProperty({__proto__:null,add:n,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:a,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:I,distance:p,div:_,divide:c,dot:b,equals:S,exactEquals:M,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:P,length:v,lerp:y,max:d,min:u,mul:C,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=o.Ov;let a,i,n,s,l,c;do{a=2*r()-1,i=2*r()-1,l=a*a+i*i}while(l>=1);do{n=2*r()-1,s=2*r()-1,c=n*n+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*a,e[1]=t*i,e[2]=t*n*u,e[3]=t*s*u,e},round:h,scale:m,scaleAndAdd:function(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e},set:i,sqrDist:O,sqrLen:z,squaredDistance:f,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:T,subtract:s,transformMat4:w,transformQuat:function(e,t,r){const o=t[0],a=t[1],i=t[2],n=r[0],s=r[1],l=r[2],c=r[3],u=c*o+s*i-l*a,d=c*a+l*o-n*i,h=c*i+n*a-s*o,m=-n*o-s*a-l*i;return e[0]=u*c+m*-n+d*-l-h*-s,e[1]=d*c+m*-s+h*-n-u*-l,e[2]=h*c+m*-l+u*-s-d*-n,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{Qf:()=>s,Qh:()=>i,lM:()=>a});var o=r(34275);function a(e){if(!e)return 0;let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=n(e[r],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return s(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=u;for(let o=0;o<t;o++)r+=n(e[o]);return r}(e);let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=n(e[r]));return t}function n(e,t=!0){switch(typeof e){case"object":return t?i(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function s(...e){return e.reduce((e,t)=>e+(t?(0,o.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return u+e.length*t}const c=32,u=16,d=145},93146(e,t,r){r.d(t,{z:()=>a});class o{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(async e=>(this.module=e,e))),this._promise}}function a(e){return new o(async()=>{const t=await e();return!1===t.isLoaded?.()&&await t.load(),t})}},65806(e,t,r){r.d(t,{g:()=>n});var o=r(51850),a=r(91218),i=r(9762);function n(e,t,r,o){if((0,a.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,i.projectBuffer)(s,e.spatialReference,0,t,r,0);const n=(0,a.tryProject)(e,r,o);return!!n&&(t[0]=n.x,t[1]=n.y,t[2]=n.z??0,!0)}const s=(0,o.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var o=r(91218),a=r(16930),i=r(9762),n=r(65806);function s(e,t,r,a){return!(null==t||null==a||e.length<2)&&((0,o.canProjectWithoutEngine)(t,a)?(0,i.projectBuffer)(e,t,0,r,a,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,n.g)(l,r,a)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:a.A.WGS84,type:"point"}},72727(e,t,r){function o(e,t,r){if(t<=0)return 0;const o=e-r;return o<0?0:Math.floor(o/t)+1}r.d(t,{k:()=>o}),r(53966)},52039(e,t,r){r.d(t,{O7:()=>d,el:()=>l});var o=r(69052),a=(r(49186),r(17676)),i=(r(5443),r(39829),r(82799),r(16930)),n=r(93146),s=(r(80754),r(21325));async function l(e,t,r){Array.isArray(e)||(e=[e]),null!=t&&"object"==typeof t&&"authMode"in t&&(r=t);let o=null;for(const t of e)o??=t?.spatialReference;if(!o)return e;const i=(0,s.Vp)(o);if(!i)return e;const[n,l]=i.valid;let d=!1;for(const t of e){if(!t)continue;if("point"===t.type){d||=t.x>=l,d||=t.x<=n;continue}const{extent:e}=t;if(null==e){d=!0;break}d||=e.xmin>=l,d||=e.xmin<=n,d||=e.xmax>=l,d||=e.xmax<=n}if(!d)return e;const[{foldInto360Range:h},m]=await(0,a.qr)(Promise.all([c.getImportPromise(),u.getImportPromise()]),r),p=m.fromSpatialReference(o);return e.map(e=>{if(null==e||"mesh"===e.type)return e;const t=m.fromGeometry(e),r=m.toGeometry(h(t,p),o);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const c=(0,n.z)(()=>r.e(4144).then(r.bind(r,4144))),u=(0,n.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(5756),r.e(3299),r.e(1550)]).then(r.bind(r,78125)));function d(e,t,r){const o=(0,s.Vp)(r);if(null==o)return e;const[a,i]=o.valid,n=2*i;let l=0,c=0;t>i?l=Math.ceil(Math.abs(t-i)/n):t<a&&(l=-Math.ceil(Math.abs(t-a)/n)),e>i?c=Math.ceil(Math.abs(e-i)/n):e<a&&(c=-Math.ceil(Math.abs(e-a)/n));let u=e+(l-c)*n;const d=u-t;return d>i?u-=n:d<a&&(u+=n),u}function h(e){const t=(0,s.Vp)(e);if(null==t)return null;const[r,a]=t.valid;return new o.hr(r,a)}const m=h(i.A.WGS84);h(i.A.WebMercator),r.d(t,["Y_",0,m])},80754(e,t,r){r.d(t,{kS:()=>c,kd:()=>l});var o=r(82799),a=r(16930),i=r(60408),n=r(52006);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new o.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new o.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,n.Ed)(e))for(const r of function(e){return(0,i.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of r){if((0,n.aO)(e)){const[r,o]=e.c;r[0]+=t,o[0]+=t;continue}if((0,n.FG)(e)){const[r,o]=e.a;r[0]+=t,o[0]+=t;continue}if((0,n.n1)(e)){const[r,o,a]=e.b;r[0]+=t,o[0]+=t,a[0]+=t;continue}e[0]+=t}for(const r of function(e){return(0,i.Bi)(e)?e.rings:e.paths}(e))for(const e of r)e[0]+=t;return e}r.d(t,["j7",0,s])},27921(e,t,r){r.d(t,{$Q:()=>y,C:()=>s,Cr:()=>u,H:()=>M,O_:()=>c,Qj:()=>l,T7:()=>x,Tj:()=>b,lU:()=>d,mN:()=>S,vE:()=>T,vt:()=>n});var o=r(34727),a=r(35522),i=r(51850);function n(e=C){return[e[0],e[1],e[2],e[3]]}function s(e,t){return function(e,t,r,o,a=n()){return a[0]=e,a[1]=t,a[2]=r,a[3]=o,a}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,r){const o=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],a=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=t[0]*a,r[1]=t[1]*a,r[2]=t[2]*a,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function u(e,t,r,o=n()){const a=r[0]-t[0],i=r[1]-t[1],s=r[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],d=i*u-s*c,h=s*l-a*u,m=a*c-i*l,p=d*d+h*h+m*m,f=Math.abs(p-1)>1e-5&&p>1e-12?1/Math.sqrt(p):1;return o[0]=d*f,o[1]=h*f,o[2]=m*f,o[3]=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]),o}function d(e,t,r,o=0,i=Math.floor(r*(1/3)),n=Math.floor(r*(2/3))){if(r<3)return!1;t(m,o);let s=i,l=!1;for(;s<r-1&&!l;)t(p,s),s++,l=!(0,a.t2)(m,p);if(!l)return!1;for(s=Math.max(s,n),l=!1;s<r&&!l;)t(f,s),s++,(0,a.Re)(v,m,p),(0,a.S8)(v,v),(0,a.Re)(g,p,f),(0,a.S8)(g,g),l=!(0,a.t2)(m,f)&&!(0,a.t2)(p,f)&&Math.abs((0,a.Om)(v,g))<h;return l?(u(m,p,f,e),!0):(0!==o||1!==i||2!==n)&&d(e,t,r,0,1,2)}r(78955),r(44280),r(32114),r(32728);const h=.99619469809,m=(0,i.vt)(),p=(0,i.vt)(),f=(0,i.vt)(),v=(0,i.vt)(),g=(0,i.vt)();function x(e,t,r){return function(e){return 0===e||1===e}(T(e,t.origin,t.vector,0,r))}function b(e,t){return S(e,t)>=0}function y(e,t){return function(e,t,r,o,i,n,s){const l=(0,a.Om)(e,r),c=S(e,t);if(l>-1e-6&&l<1e-6)return w(c,i,n);const u=-c/l,d=w(l,i,!1);return!(s&&!d&&!w(c,i,n))&&(d?u>o.c0&&(o.c0=u):u<o.c1&&(o.c1=u),o.c0<=o.c1)}(e,t.ray.origin,t.ray.direction,t,!1,!1,!0)}function w(e,t,r){return r?t?e>=0:e<=0:t?e>0:e<0}function M(e,t,r,o=!1){let i=t.at(-1),n=S(e,i),s=o?n>0:n<=0;for(let l=0;l<t.length;l++){const c=t.at(l),u=S(e,c),d=o?u>0:u<=0;s!==d&&(0,a.Cc)(r(),i,c,n/(n-u)),d&&(0,a.C)(r(),c),i=c,n=u,s=d}}function S(e,t){return(0,a.Om)(e,t)+e[3]}function T(e,t,r,i,n){const s=(0,a.Om)(e,r),l=S(e,t);if(0===s)return l>=0?2:3;let c=-l/s;return 1&i&&(c=(0,o.qE)(c,0,1)),!(4&i)&&c<0||!(8&i)&&c>1?l>=0?2:3:((0,a.WQ)(n,t,(0,a.hs)(n,r,c)),l>=0?0:1)}const C=[0,0,1,0];(0,i.vt)()},44280(e,t,r){r.d(t,{g7:()=>s,gr:()=>n});var o=r(34727),a=r(35522),i=r(51850);function n(e,t){return(0,a.Om)(e,t)/(0,a.Bw)(e)}function s(e,t){const r=(0,a.Om)(e,t)/((0,a.Bw)(e)*(0,a.Bw)(t));return-(0,o.XM)(r)}(0,i.vt)(),(0,i.vt)()},32114(e,t,r){r.d(t,{Rc:()=>m,rq:()=>d,Km:()=>h}),r(44208);var o=r(26390),a=r(29242),i=r(9093),n=r(82534),s=r(48163),l=r(51850),c=r(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,o.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(s.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(a.vt)}static createMat4f64(){return new u(i.vt)}static createQuatf64(){return new u(n.vt)}get test(){}}u.createVec2f64();const d=u.createVec3f64(),h=u.createVec4f64(),m=(u.createMat3f64(),u.createMat4f64());u.createQuatf64()},38969(e,t,r){r.d(t,{i:()=>a});var o=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,o.Oo)(e,"canplay",r)),t((0,o.Oo)(e,"error",a)))})}},21015(e,t,r){r.d(t,{R:()=>l});var o=r(11254),a=r(60999),i=r(49186),n=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,n.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const s=await(0,a.Ke)((0,o.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,n.QP)(s.error),new i.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>n});var o=r(34275),a=r(97146),i=r(63907);function n(e,t){switch(t){case i.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,a.tM)(e):(0,o.mg)(e)?new Uint16Array(e):e}(e);case i.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,a.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let a=0;a<r;a+=1)a%2==0?(o[t++]=e[a],o[t++]=e[a+1],o[t++]=e[a+2]):(o[t++]=e[a+1],o[t++]=e[a],o[t++]=e[a+2])}return o}(e);case i.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const a=e[0];let i=e[1],n=0;for(let t=0;t<r;++t){const r=e[t+2];o[n++]=a,o[n++]=i,o[n++]=r,i=r}return o}(e)}}},51530(e,t,r){r.d(t,{KB:()=>n,Xi:()=>a,pn:()=>s,x3:()=>i});var o=r(44208);class a{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function i(e){return"encoded-mesh-texture"===e?.type}async function n(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new a(e);const r=new Blob([e],{type:t});let i=URL.createObjectURL(r);switch(t){case"image/jpeg":i+="#.jpg";break;case"image/png":i+="#.png"}const n=new Image;if((0,o.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{a(),e(n)},o=e=>{a(),t(e)},a=()=>{URL.revokeObjectURL(i),n.removeEventListener("load",r),n.removeEventListener("error",o)};n.addEventListener("load",r),n.addEventListener("error",o),n.src=i});try{n.src=i,await n.decode()}catch{}return URL.revokeObjectURL(i),n}},77691(e,t,r){r.d(t,{fetch:()=>Ct});var o=r(40876),a=r(61473),i=r(34727),n=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),h=r(51850),m=r(70328);function p(e,t=!1){return e<=1024?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var f=r(13030),v=r(73354),g=r(50867),x=r(43609),b=r(21015),y=r(84498),w=r(51530),M=r(88340);function S(e){if(null==e)return null;const t=null!=e.offset?e.offset:M.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:M.Un,a=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),i=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,s.vt)();return(0,n.lw)(c,i,l),(0,n.lw)(c,a,c),c}class T{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new T,this.numberOfVertices=0}}var _=r(11254),I=r(60999),O=r(49186),P=r(53966),z=r(69397);class D{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const o=this._outer.get(e);o?o.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,o]of t)yield[e,r,o]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,o)=>e(t,r,o)))}copy(){const e=new D;return this.forAll((t,r,o)=>e.set(r,o,t)),e}}var j=r(17676),F=r(46140),R=r(97146),B=r(31217),H=r(46610),W=r(67499),E=r(18845),N=r(49255),G=r(97768),A=r(92130),L=r(65786);class V extends A.A{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,G.Gz)(this._texture),this._textureNormal=(0,G.Gz)(this._textureNormal),this._textureEmissive=(0,G.Gz)(this._textureEmissive),this._textureOcclusion=(0,G.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,G.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new k(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,G.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,j.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,G.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class U extends L.Y{constructor(e=null){super(),this.textureEmissive=e}}class k extends U{constructor(e,t,r,o,a,i,n){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=o,this.textureMetallicRoughness=a,this.scale=i,this.normalTextureTransformMatrix=n}}var $=r(11725),q=r(620);class Z{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const Y=(0,m.vt)();function J(e,t,r,o,a,i){if(!e.visible)return;const n=(0,d.jb)(le,o,r),{tolerance:s}=t,l=new Z(s,!1,t.options.normalRequired);if(e.boundingInfo)(0,q.vA)(0===e.type),X(e.readPrimitivePosition,e.boundingInfo,r,n,s,a,l,i);else{const t=e.readPrimitivePosition;!function(e,t,r,o,a,i,n,s){const l=t,c=ce,u=Math.abs(l[0]),h=Math.abs(l[1]),m=Math.abs(l[2]),p=u>=h?u>=m?0:2:h>=m?1:2,f=p,v=l[f]<0?2:1,g=(p+v)%3,x=(p+(3-v))%3,b=l[g]/l[f],y=l[x]/l[f],w=1/l[f],M=ee,S=te,T=re,{normalRequired:C}=n;for(let t=r;t<o;++t){const r=3*t;a(c[0],r),a(c[1],r+1),a(c[2],r+2),i&&(i.applyToVertex(c[0],c[0][0],c[0][1],c[0][2],t),i.applyToVertex(c[1],c[1][0],c[1][1],c[1][2],t),i.applyToVertex(c[2],c[2][0],c[2][1],c[2][2],t)),(0,d.jb)(M,c[0],e),(0,d.jb)(S,c[1],e),(0,d.jb)(T,c[2],e);const o=M[g]-b*M[f],n=M[x]-y*M[f],l=S[g]-b*S[f],u=S[x]-y*S[f],h=T[g]-b*T[f],m=T[x]-y*T[f],p=h*u-m*l,v=o*m-n*h,_=l*n-u*o;if((p<0||v<0||_<0)&&(p>0||v>0||_>0))continue;const I=p+v+_;if(0===I)continue;const O=p*(w*M[f])+v*(w*S[f])+_*(w*T[f]);if(O*Math.sign(I)<0)continue;const P=O/I;P>=0&&s(P,P,C?ae(c):null,t)}}(r,n,0,e.faceCount,t,a,l,i)}}const K=(0,h.vt)();function X(e,t,r,o,a,i,n,s){if(null==t)return;const l=function(e,t){return(0,d.hZ)(t,1/e[0],1/e[1],1/e[2])}(o,K);if((0,m.C)(Y,t.box),null!=i&&i.applyToAabb(Y),function(e,t,r,o){return function(e,t,r,o){const a=(e[0]-o-t[0])*r[0],i=(e[3]+o-t[0])*r[0];let n=Math.min(a,i),s=Math.max(a,i);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(n=Math.max(n,Math.min(l,c)),n>s)return!1;const u=(e[2]-o-t[2])*r[2],d=(e[5]+o-t[2])*r[2];return s=Math.min(s,Math.max(u,d)),!(s<0)&&(n=Math.max(n,Math.min(u,d)),!(n>s)&&n<1/0)}(e,t,r,o)}(Y,r,l,a)){const{primitiveIndices:l}=t,c=l.length;if(c>1e3){const l=t.children;if(void 0!==l){for(const t of l)X(e,t,r,o,a,i,n,s);return}}!function(e,t,r,o,a,i,n,s,l){const c=e[0],u=e[1],d=e[2],h=t[0],m=t[1],p=t[2],{normalRequired:f}=s;for(let e=0;e<o;++e){const t=i[e],r=3*t;let[o,s,v]=a(de,r),[g,x,b]=a(de,r+1),[y,w,M]=a(de,r+2);null!=n&&([o,s,v]=n.applyToVertex(ue,o,s,v,e),[g,x,b]=n.applyToVertex(ue,g,x,b,e),[y,w,M]=n.applyToVertex(ue,y,w,M,e));const S=g-o,T=x-s,C=b-v,_=y-o,I=w-s,O=M-v,P=m*O-I*p,z=p*_-O*h,D=h*I-_*m,j=S*P+T*z+C*D,F=j*j;if(F<=se)continue;const R=c-o,B=u-s,H=d-v,W=(R*P+B*z+H*D)*j;if(W<0||W>F)continue;const E=B*C-T*H,N=H*S-C*R,G=R*T-S*B,A=(h*E+m*N+p*G)*j;if(A<0||W+A>F)continue;const L=(_*E+I*N+O*G)/j;L>=0&&l(L,L,f?oe(S,T,C,_,I,O,Q):null,t)}}(r,o,0,c,e,l,i,n,s)}}const Q=(0,h.vt)();const ee=(0,h.vt)(),te=(0,h.vt)(),re=(0,h.vt)();function oe(e,t,r,o,a,i,n){return(0,d.hZ)(ie,e,t,r),(0,d.hZ)(ne,o,a,i),(0,d.$A)(n,ie,ne),(0,d.S8)(n,n),n}function ae(e){return(0,d.jb)(ie,e[1],e[0]),(0,d.jb)(ne,e[2],e[0]),(0,d.$A)(Q,ie,ne),(0,d.S8)(Q,Q),Q}const ie=(0,h.vt)(),ne=(0,h.vt)(),se=1e-7*1e-7,le=(0,h.vt)(),ce=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()],ue=(0,h.vt)(),de=(0,h.vt)();var he=r(75956),me=r(16396),pe=r(59907);class fe{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,o,a){null!=a&&(0,pe.vJ)(r,o,this.layout,e,t,a)}}var ve=r(33442),ge=r(47724);const xe=new ge.L,be=2e-5,ye=2e-6,we=(0,h.vt)();var Me=r(43616),Se=r(5482),Te=r(91429),Ce=r(91829),_e=r(4431),Ie=r(1843),Oe=r(72824),Pe=r(13840),ze=r(98958),De=r(16943),je=r(33524),Fe=r(56133);r(4576),r(66289);var Re=r(69622),Be=r(65529),He=r(32728);class We{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",f.Eq),this.color=e.getField("instanceColor",f.XP),this.olidColor=e.getField("instanceOlidColor",f.XP),this.state=e.getField("state",f.SL),this.lodLevel=e.getField("lodLevel",f.SL)}}let Ee=class extends Re.A{constructor(e,t){super(e),this.events=new Be.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Ge(Ne.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=ke,this._buffer=this._layout.createBuffer(this._capacity),this._view=new We(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,q.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,q.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=Ae,o=Le;t.localTransform.getMat(e,Ve),t.globalTransform.getMat(e,Ue);const a=(0,l.lw)(Ue,Ue,Ve);(0,d.hZ)(r,a[12],a[13],a[14]),t.modelOrigin.setVec(e,r),(0,n.z0)(o,a),t.model.setMat(e,o);const i=(0,He.wp)(Ae,a);i.sort(),t.modelScaleFactors.set(e,0,i[1]),t.modelScaleFactors.set(e,1,i[2]),(0,n.B8)(o,o),(0,n.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Le),r.modelOrigin.getVec(e,Ae),t[0]=Le[0],t[1]=Le[1],t[2]=Le[2],t[3]=0,t[4]=Le[3],t[5]=Le[4],t[6]=Le[5],t[7]=0,t[8]=Le[6],t[9]=Le[7],t[10]=Le[8],t[11]=0,t[12]=Ae[0],t[13]=Ae[1],t[14]=Ae[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ae,this,e),t*=Math.max(Ae[0],Ae[1],Ae[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ae,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(Ae[0],Ae[1],Ae[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,o=r.get(e);t?t!==o&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):o&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(ke,Math.floor(1.5*this._capacity)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new We(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,Se.Cg)([(0,Te.MZ)({constructOnly:!0})],Ee.prototype,"shaderTransformation",void 0),(0,Se.Cg)([(0,Te.MZ)()],Ee.prototype,"_size",void 0),(0,Se.Cg)([(0,Te.MZ)({readOnly:!0})],Ee.prototype,"size",null),Ee=(0,Se.Cg)([(0,Te.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Ee);const Ne=(0,Ie.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Ge(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,De.E)()&&e.vec4u8("instanceOlidColor"),e}const Ae=(0,h.vt)(),Le=(0,s.vt)(),Ve=(0,c.vt)(),Ue=(0,c.vt)(),ke=64,$e=(0,Ie.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var qe=r(74810),Ze=r(28491),Ye=r(90644),Je=r(49788);class Ke extends Oe.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=qe.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=h.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,h.CN)(.2,.2,.2),this.diffuse=(0,h.CN)(.8,.8,.8),this.externalColor=(0,Ce.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,h.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=Je.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}Oe.gy;let Xe=class extends ze.w{constructor(e,t){let o=(0,_e.U)(tt(t));t.instanced&&t.instancedDoublePrecision&&(o=o.concat((0,_e.U)(function(e){return Ge($e.clone(),e)}(t)))),super(e,t,o),this.shader=new Pe.r(Ze.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:o,cullFace:a,customDepthTest:i,hasOccludees:n}=e;return(0,Ye.Ey)({blending:o?(0,je.Yf)(r,!1,e.emissionDimmingPass):null,culling:et(e)?(0,Ye.Xt)(a):null,depthTest:(0,je.mt)(r,Qe(i)),depthWrite:(0,je.z5)(e),colorWrite:Ye.kn,stencilWrite:n?Fe.v0:null,stencilTest:n?t?Fe.Ax:Fe.cP:null,polygonOffset:(0,ve.s)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,r){return r?this._occludeePipelineState:super.getPipeline(e,t,r)}};function Qe(e){switch(e){case 1:return 515;case 0:case 4:return 513;case 2:return 516;case 3:return 514}}function et(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function tt(e){const t=(0,Ie.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,De.E)()&&t.vec4u8("olidColor"),t}Xe=(0,Se.Cg)([(0,Te.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Xe);var rt=r(51976);class ot extends ge.L{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1,this.renderOccluded=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}}(0,Se.Cg)([(0,rt.W)({count:4})],ot.prototype,"alphaDiscardMode",void 0),(0,Se.Cg)([(0,rt.W)({count:3})],ot.prototype,"doubleSidedMode",void 0),(0,Se.Cg)([(0,rt.W)({count:8})],ot.prototype,"pbrMode",void 0),(0,Se.Cg)([(0,rt.W)({count:3})],ot.prototype,"cullFace",void 0),(0,Se.Cg)([(0,rt.W)({count:3})],ot.prototype,"normalType",void 0),(0,Se.Cg)([(0,rt.W)({count:4})],ot.prototype,"customDepthTest",void 0),(0,Se.Cg)([(0,rt.W)({count:8})],ot.prototype,"emissionSource",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasVertexColors",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasSymbolColors",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasVerticalOffset",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasColorTexture",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasMetallicRoughnessTexture",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasOcclusionTexture",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasNormalTexture",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasScreenSizePerspective",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasVertexTangents",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasOccludees",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"instanced",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"instancedDoublePrecision",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasModelTransformation",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"offsetBackfaces",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasVVSize",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasVVColor",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"receiveShadows",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasShadowHighlights",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"receiveAmbientOcclusion",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"receiveGlobalIllumination",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"textureAlphaPremultiplied",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"instancedFeatureAttribute",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"instancedColor",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"writeDepth",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"snowCover",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasColorTextureTransform",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasEmissionTextureTransform",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasNormalTextureTransform",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasOcclusionTextureTransform",void 0),(0,Se.Cg)([(0,rt.W)()],ot.prototype,"hasMetallicRoughnessTextureTransform",void 0);var at=r(57323);let it=class extends Xe{constructor(){super(...arguments),this.shader=new Pe.r(at.R,()=>r.e(2314).then(r.bind(r,39933)))}};it=(0,Se.Cg)([(0,Te.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],it);class nt extends rt.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,Se.Cg)([(0,rt.W)()],nt.prototype,"receiveShadows",void 0);class st extends $.i{constructor(e,t){super(e,ct),this.materialType="default",this.supportsEdges=!0,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[2,e=>(0,N.uw)(e)&&!this.transparent],[4,e=>(0,N.uw)(e)&&this.transparent]]),this._layout=tt(this.parameters),this._configuration=new ot(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:o}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(o[3])?1:o[3])>=Je.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,h.uY)}get emissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:o,doubleSided:a,doubleSidedType:i}=t;r.hasVertexTangents=!o&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=o?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!o&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=o?2:a&&"normal"===i?1:a&&"winding-order"===i?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,N._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.unlit?7:t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersectRay(e,t,r,o,a,i){const n=this._getMaterialVerticalOffset(t,r);null!=n&&(o=(0,d.Re)(ut,o,n),a=(0,d.Re)(dt,a,n)),i=function(e,t,r,o){xe.output=t.transparent?1:0,xe.polygonOffset=t.polygonOffset,xe.enableOITOffset=t.enableOITOffset;const a=(0,ve.s)(xe);if(!a)return e;const i=ye*a.units,n=(0,d.oW)(we,o,r);return(t,r,o,s)=>{const l=(o?1-Math.abs((0,d.Om)(n,o)):0)*a.factor*be+i;return e(t,r+l,o,s)}}(i,this._configuration,o,a),J(e,r,o,a,(0,me.ou)(r.verticalOffset),i)}intersectScreenPolygon(e,t,r,o){return function(e,t,r){return null==e?null:(e.distance=function(e,t,r,o,a){const i=(0,ve.s)(r);return i?function({units:e,factor:t},r,o,a){const i=ye*e;return o+((a?1-Math.abs((0,d.Om)(r,a)):0)*t*be+i)}(i,(0,d.oW)(we,a,o),e,t):e}(e.distance,e.hasNormal?e.normal:null,t,r,e.point),e)}((0,he.MJ)(e,r,t,o,this._createScreenPolygonVertexDisplacement(t,r)),this._configuration,r.camera.eye)}createGLMaterial(e){return new lt(e)}createBufferWriter(){return new fe(this._layout)}get transparent(){const{drivenOpacity:e,opacity:t,externalColor:r,layerOpacity:o,texture:a,textureId:i,textureAlphaMode:n,colorMixMode:s}=this.parameters,l=r[3];return e||t<1&&"replace"!==s||l<1&&"ignore"!==s||o<1||(null!=a||null!=i)&&1!==n&&2!==n&&"replace"!==s}_createScreenPolygonVertexDisplacement(e,t){const r=this._getMaterialVerticalOffset(e,t);return null==r?null:{applyToVertex:(e,t,o,a)=>(e[0]=t+r[0],e[1]=o+r[1],e[2]=a+r[2],e),applyToAabb:e=>((0,m.Ne)(e,(0,d.WQ)(gt,(0,m.pg)(e,gt),r)),(0,m.vI)(e,(0,d.WQ)(gt,(0,m.Lu)(e,gt),r)),e)}}_getMaterialVerticalOffset(e,t){if(null==this.parameters.verticalOffset)return null;const r=t.camera;(0,d.hZ)(pt,e[12],e[13],e[14]);let o=null;switch(t.viewingMode){case 1:o=(0,d.S8)(mt,pt);break;case 2:o=(0,d.C)(mt,ht)}const a=(0,d.Re)(ft,pt,r.eye),i=(0,d.Bw)(a),n=(0,d.hs)(a,a,1/i);let s=null;this.parameters.screenSizePerspective&&(s=(0,d.Om)(o,n));const l=(0,Me.kE)(r,i,this.parameters.verticalOffset,s??0,this.parameters.screenSizePerspective,null);return(0,d.hs)(o,o,l),(0,d.ei)(vt,o,t.transform.inverseRotation)}}class lt extends V{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?it:Xe,e)}}class ct extends Ke{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1,this.unlit=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const ut=(0,h.vt)(),dt=(0,h.vt)(),ht=(0,h.fA)(0,0,1),mt=(0,h.vt)(),pt=(0,h.vt)(),ft=(0,h.vt)(),vt=(0,h.vt)(),gt=(0,h.vt)(),xt=()=>P.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class bt{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function yt(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(xt().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(xt().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(xt().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(xt().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else xt().warn("Indexed geometries must specify faces"),o=!1;break}default:xt().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(xt().warn("Geometry requires material"),o=!1);const a=e.params.vertexAttributes;for(const e in a)a[e].values||(xt().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function wt(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&(0,m.RF)(t,r.box)}),t}function Mt(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function St(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Tt=new F.A(1,2,"wosr");async function Ct(e,t){const s=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?"wosr":"unknown",url:e,specifiedLodIndex:null}}((0,a.EM)(e));if("wosr"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,I.Ke)((0,_.A)(e,t));if(r.ok)return r.value.data;(0,j.QP)(r.error),function(e){throw new O.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const a=e[o],i=a.images[0].data;if(!i){xt().warn("Externally referenced texture data is not yet supported");continue}const n=a.encoding+";base64,"+i,s="/textureDefinitions/"+o,l="rgba"===a.channels?a.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==Mt(l)},u=t?.disableTextures?Promise.resolve(null):(0,B.D)(n,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const o=await Promise.all(r),a={};for(const e of o)a[e.refId]=e;return a}(r.textureDefinitions??{},t);let a=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];a+=t?.image?t.image.width*t.image.height*4:0}return new bt(r,o,a+(0,z.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,a=new Array,i=new D,n=e.resource,s=F.A.parse(n.version||"1.0","wosr");Tt.validate(s);const l=n.model.name,c=n.model.geometries,u=n.materialDefinitions??{},d=e.textures;let m=0;const p=new Map;for(let e=0;e<c.length;e++){const n=c[e];if(!yt(n))continue;const s=St(n),l=n.params.vertexAttributes,f=[],v=e=>{if("PerAttributeArray"===n.params.topology)return null;const t=n.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,R.tM)(x);f.push([e,new H.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,y=d&&d[b];if(y&&!p.has(b)){const{image:e,parameters:t}=y,r=new E.h(e,t);o.push(r),p.set(b,r)}const w=p.get(b),M=w?w.id:void 0,S=s.material;let T=i.get(S,b);if(null==T){const e=u[S.slice(S.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?Mt(y.alphaChannelUsage):void 0,o={ambient:(0,h.ci)(e.diffuse),diffuse:(0,h.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(o,t.materialParameters),T=new st(o,t),i.set(S,b,T)}a.push(T);const C=new W.V(T,f);m+=f.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(C)}return{engineResources:[{name:l,stageResources:{textures:o,materials:a,geometries:r},pivotOffset:n.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:wt(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let M;if(t.cache)M=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));M=await e(new b.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:T,referenceBoundingBox:P}=function(e,t,r){const a=e.model,s=e.meta,b=a.meta?.ESRI_proxyEllipsoid,M=s.isEsriSymbolResource&&null!=b&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;M&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const o=e.model.lods[r];for(const a of o.parts){const o=a.attributes.normal;if(null==o)return;const i=a.attributes.position,n=i.count,s=(0,h.vt)(),u=(0,h.vt)(),m=(0,h.vt)(),p=new Float32Array(4*n),v=new Float32Array(3*n),g=(0,l.B8)((0,c.vt)(),a.transform);let x=0,b=0;for(let l=0;l<n;l++){i.getVec(l,u),o.getVec(l,s),(0,d.Z0)(u,u,a.transform),(0,d.Re)(m,u,t.center),(0,d.Qr)(m,m,t.radius);const n=m[2],c=(0,d.Bw)(m),h=Math.min(.45+.55*c*c,1)**2.2;(0,d.Qr)(m,m,t.radius),null!==g&&(0,d.Z0)(m,m,g),(0,d.S8)(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.Cc)(m,m,s,n>-1?.2:Math.min(-4*n-3.8,1)),v[x]=m[0],v[x+1]=m[1],v[x+2]=m[2],x+=3,p[b]=h,p[b+1]=h,p[b+2]=h,p[b+3]=1,b+=4}a.attributes.normal=new f.xs(v.buffer),a.attributes.color=new f.Eq(p.buffer)}}}(e,b));const T=!!t.usePBR,_=s.isEsriSymbolResource?{usePBR:T,isSchematic:!1,treeRendering:M,mrrFactors:qe.SY}:{usePBR:T,isSchematic:!1,treeRendering:!1,mrrFactors:qe.mb},I={...t.materialParameters,treeRendering:M},O=new Array,P=new Map,z=new Map,D=a.lods.length,j=(0,m.Ie)();return a.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(D>1&&0===s||D>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new st({},t):function(e,t,r,a,i,n,s,l,c){const d=e.materials.get(t.material);if(null==d)return null;const{normal:m,color:p,texCoord0:f,tangent:v}=t.attributes,g=t.material+(m?"_normal":"")+(p?"_color":"")+(f?"_texCoord0":"")+(v?"_tangent":""),x=null!=t.attributes.texCoord0,b=null!=t.attributes.normal,y=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!n.has(g)){if(x){const t=(t,r=!1,o=!1)=>{if(null!=t&&!s.has(t)){const a=e.textures.get(t);if(a){const e=a.data,i=r&&!(0,w.x3)(e)?l.compressionOptions:void 0;s.set(t,new E.h((0,w.x3)(e)?e.data:e,{...a.parameters,preMultiplyAlpha:!(0,w.x3)(e)&&o,encoding:(0,w.x3)(e)?e.encoding:void 0,compressionOptions:i}))}}},r=1!==y&&!c;t(d.colorTexture,r,1!==y),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}const r=(0,o.xV)(d.color[0]),m=(0,o.xV)(d.color[1]),p=(0,o.xV)(d.color[2]),f=null!=d.colorTexture&&x?s.get(d.colorTexture):null,v=(0,qe.Jr)(d),M=null!=d.normalTextureTransform?.scale?d.normalTextureTransform?.scale:u.Un;n.set(g,new st({...a,customDepthTest:1,textureAlphaMode:y,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,m,p],ambient:[r,m,p],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:b?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,unlit:d.unlit,textureId:null!=f?f.id:void 0,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&x?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=f&&!!f.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&x?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&x&&!d.unlit?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&x?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:d.unlit?h.uY:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null!=d.emissiveStrengthKHR?d.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=i.emissiveStrengthFromSymbol?i.emissiveStrengthFromSymbol:void 0,mrrFactors:v?qe.Bt:[d.metallicFactor,d.roughnessFactor,a.mrrFactors[2]],isSchematic:v,colorTextureTransformMatrix:S(d.colorTextureTransform),normalTextureTransformMatrix:S(d.normalTextureTransform),scale:[M[0],M[1]],occlusionTextureTransformMatrix:S(d.occlusionTextureTransform),emissiveTextureTransformMatrix:S(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:S(d.metallicRoughnessTextureTransform),...i},l))}const M=n.get(g);if(r.stageResources.materials.push(M),x){const e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return M}(a,e,c,_,I,P,z,t,M),{geometry:d,vertexCount:b}=function(e,t){const r=e.attributes.position.count,o=(0,y.x)(e.indices||r,e.primitiveType),a=p(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,v.t)(a,s,e.transform,3,l);const c=[["position",new H.n(a,o,3,!0)]];if(null!=e.attributes.normal){const t=p(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;(0,n.Ge)(_t,e.transform),(0,v.b)(t,a,_t,3,s),(0,i.or)(_t)&&(0,v.n)(t,t),c.push(["normal",new H.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=p(4*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.tangent;(0,n.z0)(_t,e.transform),(0,g.t)(t,a,_t,4,s),(0,i.or)(_t)&&(0,v.n)(t,t,4),c.push(["tangent",new H.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=p(2*r),{typedBuffer:a,typedBufferStride:i}=e.attributes.texCoord0;(0,x.a)(t,a,2,i),c.push(["uv0",new H.n(t,o,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof f.Eq?(0,g.b)(t,u,1,255):(u instanceof f.XP||u instanceof f.Uz)&&(0,g.b)(t,u,1/255,255):(t.fill(255),u instanceof f.xs?(0,v.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof f.eI||e.attributes.color instanceof f.nS)&&(0,v.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new H.n(t,o,4,!0)])}return{geometry:new W.V(t,c),vertexCount:r}}(e,r??new st({},t)),T=d.boundingInfo;null!=T&&0===s&&(0,m.RF)(j,T.box),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=b)}),l||O.push(c)}),{engineResources:O,referenceBoundingBox:j}}(M,t,s.specifiedLodIndex);return{lods:T,referenceBoundingBox:P,isEsriSymbolResource:M.meta.isEsriSymbolResource,isWosr:!1}}const _t=(0,s.vt)()},32728(e,t,r){r.d(t,{YH:()=>s,hG:()=>i,nu:()=>l,wp:()=>n}),r(34727);var o=r(35522),a=r(51850);function i(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],r=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],o=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,r,o))}function n(e,t){const r=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),a=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),i=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,o.hZ)(e,r,a,i),e}function s(e,t,r){r=r||e;const a=(0,o.Om)(e,t);(0,o.hZ)(r,e[0]-a*t[0],e[1]-a*t[1],e[2]-a*t[2]),(0,o.S8)(r,r)}function l(e,t,r,i=(0,a.vt)()){const n=(0,o.Bw)(e),s=(0,o.Bw)(t),l=(0,o.Om)(e,t)/(n*s);if(l<.9999999999999999){const a=Math.acos(l),d=((1-r)*n+r*s)/Math.sin(a),h=d/n*Math.sin((1-r)*a),m=d/s*Math.sin(r*a);return(0,o.hs)(c,e,h),(0,o.hs)(u,t,m),(0,o.WQ)(i,c,u)}return(0,o.Cc)(i,e,t,r)}(0,a.vt)(),(0,a.vt)(),(0,a.vt)();const c=(0,a.vt)(),u=(0,a.vt)()},46686(e,t,r){r.d(t,{o:()=>a});var o=r(31821);function a(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(o.H`
|
|
663
663
|
void forwardLinearDepth(float _linearDepth) { ${(0,o.If)(t,"linearDepth = _linearDepth;")} }
|
|
664
|
-
`)}},33120(e,t,r){r.d(t,{i$:()=>
|
|
664
|
+
`)}},33120(e,t,r){r.d(t,{i$:()=>n,xJ:()=>i}),r(46686),r(28682);var o=r(77108),a=r(31821);function i(e){e.vertex.uniforms.add(new o.E("nearFar",e=>e.camera.nearFar))}function n(e){e.vertex.code.add(a.H`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
665
665
|
return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
666
666
|
}`)}},32680(e,t,r){r.d(t,{M:()=>a});var o=r(31821);function a(e){e.vertex.code.add(o.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
|
|
667
667
|
vec3 camToVert = posWorld - camPosWorld;
|
|
@@ -670,13 +670,13 @@ if (isBackface) {
|
|
|
670
670
|
posClip.z += 0.0000003 * posClip.w;
|
|
671
671
|
}
|
|
672
672
|
return posClip;
|
|
673
|
-
}`)}},49255(e,t,r){function o(e){return function(e){return c(e)||4===e}(e)||function(e){return 5===(t=e)||6===t||7===t||8===e||9===e;var t}(e)}function a(e){return 10===e||11===e}function
|
|
673
|
+
}`)}},49255(e,t,r){function o(e){return function(e){return c(e)||4===e}(e)||function(e){return 5===(t=e)||6===t||7===t||8===e||9===e;var t}(e)}function a(e){return 10===e||11===e}function i(e){return l(e)||a(e)}function n(e){return 1===e}function s(e){return 2===e}function l(e){return 0===e||function(e){return n(e)||s(e)}(e)}function c(e){return function(e){return l(e)||a(e)}(e)||u(e)}function u(e){return 3===e}r.d(t,{Ex:()=>a,Rb:()=>s,_$:()=>n,_o:()=>l,eh:()=>u,gr:()=>c,i3:()=>i,uw:()=>o})},29941(e,t,r){r.d(t,{v:()=>i});var o=r(5482),a=r(51976);class i extends a.K{constructor(){super(...arguments),this.output=0,this.hasEmission=!1,this.useFloatBlend=!0}}(0,o.Cg)([(0,a.W)({count:12})],i.prototype,"output",void 0),(0,o.Cg)([(0,a.W)()],i.prototype,"hasEmission",void 0),(0,o.Cg)([(0,a.W)()],i.prototype,"useFloatBlend",void 0)},76597(e,t,r){r.d(t,{d:()=>i});var o=r(33120),a=r(31821);function i(e){(0,o.i$)(e),e.vertex.code.add(a.H`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) {
|
|
674
674
|
vec4 eye = view * vec4(pos, 1.0);
|
|
675
675
|
depth = calculateLinearDepth(nearFar,eye.z);
|
|
676
676
|
return proj * eye;
|
|
677
677
|
}`),e.vertex.code.add(a.H`vec4 transformPosition(mat4 proj, mat4 view, vec3 pos) {
|
|
678
678
|
return proj * (view * vec4(pos, 1.0));
|
|
679
|
-
}`)}},2585(e,t,r){r.d(t,{B:()=>g});var o=r(77690),a=r(29242),
|
|
679
|
+
}`)}},2585(e,t,r){r.d(t,{B:()=>g});var o=r(77690),a=r(29242),i=r(9093),n=r(35522),s=r(51850),l=r(26425),c=r(77949),u=r(23205),d=r(31821),h=r(35644),m=r(74333);class p extends m.n{constructor(e,t,r){super(e,"mat4",1,(o,a,i)=>o.setUniformMatrix4fv(e,t(a,i),r))}}var f=r(28449);r(65786).Y;const v=(0,a.vt)();function g(e,t){const{hasModelTransformation:r,instancedDoublePrecision:a,instanced:s,output:m,hasVertexTangents:g}=t;r&&(e.vertex.uniforms.add(new p("model",e=>e.modelTransformation??i.zK)),e.vertex.uniforms.add(new h.k("normalLocalOriginFromModel",e=>((0,o.Ge)(v,e.modelTransformation??i.zK),v)))),s&&a&&(e.attributes.add("instanceModelOriginHi","vec3"),e.attributes.add("instanceModelOriginLo","vec3"),e.attributes.add("instanceModel","mat3"),e.attributes.add("instanceModelNormal","mat3"));const b=e.vertex;a&&(b.include(l.u),b.uniforms.add(new u.d("viewOriginHi",e=>(0,f.Zo)((0,n.hZ)(x,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),x)),new u.d("viewOriginLo",e=>(0,f.jA)((0,n.hZ)(x,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),x)))),b.code.add(d.H`
|
|
680
680
|
vec3 getVertexInLocalOriginSpace() {
|
|
681
681
|
return ${r?a?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":a?"instanceModel * localPosition().xyz":"localPosition().xyz"};
|
|
682
682
|
}
|
|
@@ -711,21 +711,21 @@ return normal;
|
|
|
711
711
|
}`);break;default:t.normalType;case 2:case 3:}}},53466(e,t,r){r.d(t,{U:()=>a});var o=r(31821);function a(e,t){switch(t.textureCoordinateType){case 1:return e.attributes.add("uv0","vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(o.H`void forwardTextureCoordinates() { vuv0 = uv0; }`);case 2:return e.attributes.add("uv0","vec2"),e.attributes.add("uvRegion","vec4"),e.varyings.add("vuv0","vec2"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(o.H`void forwardTextureCoordinates() {
|
|
712
712
|
vuv0 = uv0;
|
|
713
713
|
vuvRegion = uvRegion;
|
|
714
|
-
}`);default:t.textureCoordinateType;case 0:return void e.vertex.code.add(o.H`void forwardTextureCoordinates() {}`);case 3:return}}},72824(e,t,r){r.d(t,{Mh:()=>c,Zo:()=>u,gy:()=>d});var o=r(29242),a=r(91829),
|
|
714
|
+
}`);default:t.textureCoordinateType;case 0:return void e.vertex.code.add(o.H`void forwardTextureCoordinates() {}`);case 3:return}}},72824(e,t,r){r.d(t,{Mh:()=>c,Zo:()=>u,gy:()=>d});var o=r(29242),a=r(91829),i=r(96336),n=r(28682),s=r(31821),l=r(35644);function c(e,t){const{vertex:r,varyings:o}=e;switch(t.normalType){case 0:case 1:e.include(i.Y,t),o.add("vNormalWorld","vec3"),o.add("vNormalView","vec3"),r.uniforms.add(new l.k("transformNormalViewFromGlobal",e=>e.transformNormalViewFromGlobal)),r.code.add(s.H`void forwardNormal() {
|
|
715
715
|
vNormalWorld = normalModel();
|
|
716
716
|
vNormalView = transformNormalViewFromGlobal * vNormalWorld;
|
|
717
|
-
}`);break;case 2:e.vertex.code.add(s.H`void forwardNormal() {}`);break;default:t.normalType;case 3:}}class u extends
|
|
717
|
+
}`);break;case 2:e.vertex.code.add(s.H`void forwardNormal() {}`);break;default:t.normalType;case 3:}}class u extends n.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,o.vt)()}}class d extends n.EM{constructor(){super(...arguments),this.toMapSpace=(0,a.vt)()}}},28682(e,t,r){r.d(t,{EM:()=>l,dO:()=>s});var o=r(29242),a=r(51850),i=(r(26425),r(40710),r(33079),r(31821),r(74333));i.n,i.n,r(35644),r(58029),r(63761);var n=r(65786);class s extends n.Y{constructor(){super(...arguments),this.transformWorldFromViewTH=(0,a.vt)(),this.transformWorldFromViewTL=(0,a.vt)(),this.transformViewFromCameraRelativeRS=(0,o.vt)()}}class l extends n.Y{constructor(){super(...arguments),this.transformWorldFromModelRS=(0,o.vt)(),this.transformWorldFromModelTH=(0,a.vt)(),this.transformWorldFromModelTL=(0,a.vt)(),this.transformationDrawId=0}}},99208(e,t,r){r.d(t,{r:()=>n});var o=r(53466),a=r(31821);function i(e){e.fragment.code.add(a.H`vec4 textureAtlasLookup(sampler2D tex, vec2 textureCoordinates, vec4 atlasRegion) {
|
|
718
718
|
vec2 atlasScale = atlasRegion.zw - atlasRegion.xy;
|
|
719
719
|
vec2 uvAtlas = fract(textureCoordinates) * atlasScale + atlasRegion.xy;
|
|
720
720
|
float maxdUV = 0.125;
|
|
721
721
|
vec2 dUVdx = clamp(dFdx(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
|
|
722
722
|
vec2 dUVdy = clamp(dFdy(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
|
|
723
723
|
return textureGrad(tex, uvAtlas, dUVdx, dUVdy);
|
|
724
|
-
}`)}function
|
|
724
|
+
}`)}function n(e,t){const{textureCoordinateType:r}=t;if(0===r||3===r)return;e.include(o.U,t);const n=2===r;n&&e.include(i),e.fragment.code.add(a.H`
|
|
725
725
|
vec4 textureLookup(sampler2D tex, vec2 uv) {
|
|
726
|
-
return ${
|
|
726
|
+
return ${n?"textureAtlasLookup(tex, uv, vuvRegion)":"texture(tex, uv)"};
|
|
727
727
|
}
|
|
728
|
-
`)}},35640(e,t,r){r.d(t,{Ge:()=>c}),r(90629);var o=r(78955),a=r(91829),
|
|
728
|
+
`)}},35640(e,t,r){r.d(t,{Ge:()=>c}),r(90629);var o=r(78955),a=r(91829),i=r(52587),n=r(77949),s=r(71988),l=r(31821);function c(e,t){const r=e.vertex;t.hasVerticalOffset?(function(e){e.uniforms.add(new s.E("verticalOffset",(e,t)=>{const{minWorldLength:r,maxWorldLength:a,screenLength:i}=e.verticalOffset,n=Math.tan(.5*t.camera.fovY)/(.5*t.camera.fullViewport[3]),s=t.camera.pixelRatio||1;return(0,o.hZ)(u,i*s,n,r,a)}))}(r),t.hasScreenSizePerspective&&(e.include(i.Y6),(0,i.OH)(r),(0,n.yu)(e.vertex,t)),r.code.add(l.H`
|
|
729
729
|
vec3 calculateVerticalOffset(vec3 worldPos, vec3 localOrigin) {
|
|
730
730
|
float viewDistance = length((view * vec4(worldPos, 1.0)).xyz);
|
|
731
731
|
${t.spherical?l.H`vec3 worldNormal = normalize(worldPos + localOrigin);`:l.H`vec3 worldNormal = vec3(0.0, 0.0, 1.0);`}
|
|
@@ -741,7 +741,7 @@ return textureGrad(tex, uvAtlas, dUVdx, dUVdy);
|
|
|
741
741
|
vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) {
|
|
742
742
|
return worldPos + calculateVerticalOffset(worldPos, localOrigin);
|
|
743
743
|
}
|
|
744
|
-
`)):r.code.add(l.H`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}const u=(0,a.vt)()},9169(e,t,r){r.d(t,{E:()=>x});var o=r(33120),a=r(34711),
|
|
744
|
+
`)):r.code.add(l.H`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}const u=(0,a.vt)()},9169(e,t,r){r.d(t,{E:()=>x});var o=r(33120),a=r(34711),i=r(76597),n=r(96336),s=r(31821);function l(e,t){if(11!==t.output)return e.vertex.code.add(s.H`void forwardObjectAndLayerIdColor() {}`),void e.fragment.code.add(s.H`void outputObjectAndLayerIdColor() {}`);const r=t.instanced;e.varyings.add("objectAndLayerIdColorVarying","vec4");const o=r?"instanceOlidColor":"olidColor";e.attributes.add(o,"vec4"),e.vertex.code.add(s.H`
|
|
745
745
|
void forwardObjectAndLayerIdColor() {
|
|
746
746
|
objectAndLayerIdColorVarying = ${o} * 0.003921568627451;
|
|
747
747
|
}`),e.fragment.code.add(s.H`void outputObjectAndLayerIdColor() {
|
|
@@ -751,14 +751,14 @@ const float slope_scale = 2.0;
|
|
|
751
751
|
const float bias = 20.0 * .000015259;
|
|
752
752
|
float m = max(abs(dFdx(_linearDepth)), abs(dFdy(_linearDepth)));
|
|
753
753
|
gl_FragDepth = _linearDepth + slope_scale * m + bias;
|
|
754
|
-
}`)}}var m=r(3871),p=r(43259),f=r(58614),v=r(77949),g=r(63761);function x(e,t){const{vertex:r,fragment:x,varyings:b}=e,{hasColorTexture:y,alphaDiscardMode:w}=t,M=y&&1!==w,{output:S,normalType:T,hasColorTextureTransform:C}=t;switch(S){case 3:(0,v.NB)(r,t),e.include(
|
|
754
|
+
}`)}}var m=r(3871),p=r(43259),f=r(58614),v=r(77949),g=r(63761);function x(e,t){const{vertex:r,fragment:x,varyings:b}=e,{hasColorTexture:y,alphaDiscardMode:w}=t,M=y&&1!==w,{output:S,normalType:T,hasColorTextureTransform:C}=t;switch(S){case 3:(0,v.NB)(r,t),e.include(i.d),x.include(a.HQ,t),e.include(c.U,t),M&&x.uniforms.add(new g.N("tex",e=>e.texture)),r.main.add(s.H`vpos = getVertexInLocalOriginSpace();
|
|
755
755
|
vpos = subtractOrigin(vpos);
|
|
756
756
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
757
757
|
gl_Position = transformPosition(proj, view, vpos);
|
|
758
758
|
forwardTextureCoordinates();`),e.include(f.SS,t),x.main.add(s.H`
|
|
759
759
|
discardBySlice(vpos);
|
|
760
760
|
${(0,s.If)(M,s.H`vec4 texColor = texture(tex, ${C?"colorUV":"vuv0"});
|
|
761
|
-
discardOrAdjustAlpha(texColor);`)}`);break;case 5:case 6:case 7:case 8:case 11:(0,v.NB)(r,t),e.include(
|
|
761
|
+
discardOrAdjustAlpha(texColor);`)}`);break;case 5:case 6:case 7:case 8:case 11:(0,v.NB)(r,t),e.include(i.d),e.include(c.U,t),e.include(p.A,t),e.include(h,t),x.include(a.HQ,t),e.include(l,t),(0,o.xJ)(e),b.add("depth","float",{invariant:!0}),M&&x.uniforms.add(new g.N("tex",e=>e.texture)),r.main.add(s.H`vpos = getVertexInLocalOriginSpace();
|
|
762
762
|
vpos = subtractOrigin(vpos);
|
|
763
763
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
764
764
|
gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);
|
|
@@ -767,7 +767,7 @@ forwardObjectAndLayerIdColor();`),e.include(f.SS,t),x.main.add(s.H`
|
|
|
767
767
|
discardBySlice(vpos);
|
|
768
768
|
${(0,s.If)(M,s.H`vec4 texColor = texture(tex, ${C?"colorUV":"vuv0"});
|
|
769
769
|
discardOrAdjustAlpha(texColor);`)}
|
|
770
|
-
${11===S?s.H`outputObjectAndLayerIdColor();`:s.H`outputDepth(depth);`}`);break;case 4:{(0,v.NB)(r,t),e.include(
|
|
770
|
+
${11===S?s.H`outputObjectAndLayerIdColor();`:s.H`outputDepth(depth);`}`);break;case 4:{(0,v.NB)(r,t),e.include(i.d),e.include(n.Y,t),e.include(u.Mh,t),e.include(c.U,t),e.include(p.A,t),e.include(d.F,t),M&&x.uniforms.add(new g.N("tex",e=>e.texture)),2===T&&b.add("vPositionView","vec3",{invariant:!0});const o=0===T||1===T;r.main.add(s.H`
|
|
771
771
|
forwardDefaultMaterialExternalColor();
|
|
772
772
|
|
|
773
773
|
if (shouldCullByOpacity()) {
|
|
@@ -790,7 +790,7 @@ forwardObjectAndLayerIdColor();`),e.include(f.SS,t),x.main.add(s.H`
|
|
|
790
790
|
if (gl_FrontFacing == false){
|
|
791
791
|
normal = -normal;
|
|
792
792
|
}`}
|
|
793
|
-
fragColor = vec4(0.5 + 0.5 * normal, opacity);`);break}case 10:(0,v.NB)(r,t),e.include(
|
|
793
|
+
fragColor = vec4(0.5 + 0.5 * normal, opacity);`);break}case 10:(0,v.NB)(r,t),e.include(i.d),e.include(c.U,t),e.include(p.A,t),M&&x.uniforms.add(new g.N("tex",e=>e.texture)),r.main.add(s.H`vpos = getVertexInLocalOriginSpace();
|
|
794
794
|
vpos = subtractOrigin(vpos);
|
|
795
795
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
796
796
|
gl_Position = transformPosition(proj, view, vpos);
|
|
@@ -798,13 +798,13 @@ forwardTextureCoordinates();`),x.include(a.HQ,t),e.include(f.SS,t),e.include(m.Q
|
|
|
798
798
|
discardBySlice(vpos);
|
|
799
799
|
${(0,s.If)(M,s.H`vec4 texColor = texture(tex, ${C?"colorUV":"vuv0"});
|
|
800
800
|
discardOrAdjustAlpha(texColor);`)}
|
|
801
|
-
calculateOcclusionAndOutputHighlight();`)}}},77068(e,t,r){r.d(t,{F:()=>p});var o=r(43519),a=r(31821);function
|
|
801
|
+
calculateOcclusionAndOutputHighlight();`)}}},77068(e,t,r){r.d(t,{F:()=>p});var o=r(43519),a=r(31821);function i(e,t){t.instancedColor?(e.attributes.add("instanceColor","vec4"),e.vertex.include(o.WD),e.vertex.include(o.Y1),e.vertex.include(o.ML),e.vertex.code.add(a.H`
|
|
802
802
|
MaskedColor applyInstanceColor(MaskedColor color) {
|
|
803
803
|
return multiplyMaskedColors( color, createMaskedFromUInt8NaNColor(${"instanceColor"}));
|
|
804
804
|
}
|
|
805
805
|
`)):e.vertex.code.add(a.H`MaskedColor applyInstanceColor(MaskedColor color) {
|
|
806
806
|
return color;
|
|
807
|
-
}`)}var
|
|
807
|
+
}`)}var n=r(93588),s=r(43616);function l(e,t){e.varyings.add("colorMixMode","int"),e.varyings.add("opacityMixMode","int"),e.vertex.uniforms.add(new n.c("symbolColorMixMode",e=>s.Um[e.colorMixMode])),t.hasSymbolColors?(e.vertex.include(o.WD),e.vertex.include(o.Y1),e.vertex.include(o.ML),e.attributes.add("symbolColor","vec4"),e.vertex.code.add(a.H`
|
|
808
808
|
MaskedColor applySymbolColor(MaskedColor color) {
|
|
809
809
|
return multiplyMaskedColors(color, createMaskedFromUInt8NaNColor(${"symbolColor"}));
|
|
810
810
|
}
|
|
@@ -815,7 +815,7 @@ return color;
|
|
|
815
815
|
colorMixMode = mask.r ? ${a.H.int(s.Um.ignore)} : symbolColorMixMode;
|
|
816
816
|
opacityMixMode = mask.a ? ${a.H.int(s.Um.ignore)} : symbolColorMixMode;
|
|
817
817
|
}
|
|
818
|
-
`)}function c(e,t){t.hasVertexColors?(e.attributes.add("color","vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(a.H`void forwardVertexColor() { vColor = color; }`)):e.vertex.code.add(a.H`void forwardVertexColor() {}`)}var u=r(27950),d=r(71988),h=r(20304),m=r(26934);function p(e,t){const{vertex:r,fragment:
|
|
818
|
+
`)}function c(e,t){t.hasVertexColors?(e.attributes.add("color","vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(a.H`void forwardVertexColor() { vColor = color; }`)):e.vertex.code.add(a.H`void forwardVertexColor() {}`)}var u=r(27950),d=r(71988),h=r(20304),m=r(26934);function p(e,t){const{vertex:r,fragment:n,varyings:p}=e;e.include(i,t),e.include(l,t),e.include(c,t),r.include(o.WD),r.include(o.oF),r.include(m.Q),r.uniforms.add(new d.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),p.add("vExternalColor","vec4"),r.code.add(a.H`
|
|
819
819
|
void forwardDefaultMaterialExternalColor() {
|
|
820
820
|
forwardVertexColor();
|
|
821
821
|
|
|
@@ -829,7 +829,7 @@ return color;
|
|
|
829
829
|
bool shouldCullByOpacity() {
|
|
830
830
|
return opacityMixMode != ${a.H.int(s.Um.ignore)} && vExternalColor.a < alphaCutoff;
|
|
831
831
|
}
|
|
832
|
-
`),
|
|
832
|
+
`),n.include(u.N),n.uniforms.add(new h.m("opacity",e=>e.opacity),new h.m("layerOpacity",e=>e.layerOpacity)),n.code.add(a.H`
|
|
833
833
|
float getDefaultMaterialOpacity(float textureOpacity) {
|
|
834
834
|
return layerOpacity * mixExternalOpacity(
|
|
835
835
|
${(0,a.If)(t.hasVertexColors,"vColor.a * ")} opacity,
|
|
@@ -838,32 +838,32 @@ return color;
|
|
|
838
838
|
opacityMixMode
|
|
839
839
|
);
|
|
840
840
|
}
|
|
841
|
-
`)}},10036(e,t,r){r.d(t,{E:()=>l,W:()=>s});var o=r(37585),a=r(48163),
|
|
841
|
+
`)}},10036(e,t,r){r.d(t,{E:()=>l,W:()=>s});var o=r(37585),a=r(48163),i=r(77108),n=r(31821);function s(e){e.uniforms.add(new i.E("zProjectionMap",e=>l(e.camera))),e.code.add(n.H`float linearizeDepth(float depth, vec2 zProjectionConstants) {
|
|
842
842
|
float depthNdc = depth * 2.0 - 1.0;
|
|
843
843
|
return -(zProjectionConstants[0] / (depthNdc + zProjectionConstants[1] + 1e-7));
|
|
844
844
|
}
|
|
845
845
|
float linearizeDepth(float depth) {
|
|
846
846
|
return linearizeDepth(depth, zProjectionMap);
|
|
847
|
-
}`),e.code.add(
|
|
847
|
+
}`),e.code.add(n.H`float delinearizeDepth(float linearDepth) {
|
|
848
848
|
float c1 = zProjectionMap[0];
|
|
849
849
|
float c2 = zProjectionMap[1];
|
|
850
850
|
float depthNdc = (-c1/linearDepth) - c2 - 1e-7;
|
|
851
851
|
float depthNonlinear01 = (depthNdc + 1.0 ) / 2.0;
|
|
852
852
|
return depthNonlinear01;
|
|
853
|
-
}`)}function l(e){const t=e.projectionMatrix;return(0,o.hZ)(c,t[14],t[10])}const c=(0,a.vt)()},52540(e,t,r){r.d(t,{E:()=>
|
|
853
|
+
}`)}function l(e){const t=e.projectionMatrix;return(0,o.hZ)(c,t[14],t[10])}const c=(0,a.vt)()},52540(e,t,r){r.d(t,{E:()=>i});var o=r(10036),a=r(31821);function i(e){e.include(o.W),e.code.add(a.H`float depthFromTexture(sampler2D depthTexture, vec2 uv) {
|
|
854
854
|
ivec2 iuv = ivec2(uv * vec2(textureSize(depthTexture, 0)));
|
|
855
855
|
return texelFetch(depthTexture, iuv, 0).r;
|
|
856
856
|
}`),e.code.add(a.H`float linearDepthFromTexture(sampler2D depthTexture, vec2 uv) {
|
|
857
857
|
return linearizeDepth(depthFromTexture(depthTexture, uv));
|
|
858
|
-
}`)}},92573(e,t,r){r.d(t,{V:()=>s});var o=r(10036),a=r(52540),
|
|
858
|
+
}`)}},92573(e,t,r){r.d(t,{V:()=>s});var o=r(10036),a=r(52540),i=r(77108),n=r(31821);function s(e){e.include(a.E),e.uniforms.add(new i.E("zProjectionMapLastFrame",e=>(0,o.E)(e.reprojection.lastFrameCamera))),e.code.add(n.H`float linearDepthFromTextureLastFrame(sampler2D depthTexture, vec2 uv) {
|
|
859
859
|
return linearizeDepth(depthFromTexture(depthTexture, uv), zProjectionMapLastFrame);
|
|
860
|
-
}`)}},47187(e,t,r){r.d(t,{zp:()=>x});var o=r(5482),a=r(34727),
|
|
860
|
+
}`)}},47187(e,t,r){r.d(t,{zp:()=>x});var o=r(5482),a=r(34727),i=r(49255),n=r(29941),s=r(99208),l=r(65261),c=r(40710),u=r(33079),d=r(28421),h=r(20304),m=r(31821),p=r(15976),f=r(63761),v=r(51976);r(72458);class g extends n.v{constructor(){super(...arguments),this.emissionSource=0}}function x(e,t){const{hasEmission:r,emissionSource:o,hasEmissiveTextureTransform:n,bindType:v}=t;if(!(0,i._o)(t.output)||!r)return;const g=e.fragment;g.include(l.C);const x=3===o||4===o||5===o;x&&(e.include(s.r,t),g.uniforms.add(1===v?new f.N("texEmission",e=>e.textureEmissive):new p.o("texEmission",e=>e.textureEmissive)));const b=2===o||x;if(b&&g.uniforms.add(1===v?new u.t("emissiveBaseColor",e=>e.emissiveBaseColor):new c.W("emissiveBaseColor",e=>e.emissiveBaseColor)),r&&function({emissionSource:e}){return 0===e||1===e||2===e||3===e}(t)){const e=e=>(0,a.qE)(e??0,0,16);g.uniforms.add(1===v?new h.m("emissiveStrength",t=>e(t.emissiveStrength)):new d.J("emissiveStrength",t=>e(t.emissiveStrength)))}const y=7===o,w=5===o,M=1===o||6===o||y;g.code.add(m.H`vec4 getEmissions(vec3 symbolColor) {
|
|
861
861
|
vec4 emissions =`),b?w?g.code.add("emissiveSource == 0 ? vec4(emissiveBaseColor, 1.0): vec4(linearizeGamma(symbolColor), 1.0)"):g.code.add("vec4(emissiveBaseColor, 1.0)"):M?y?g.code.add("emissiveSource == 0 ? vec4(0.0): vec4(linearizeGamma(symbolColor), 1.0)"):g.code.add("vec4(linearizeGamma(symbolColor), 1.0)"):g.code.add("vec4(0.0)"),g.code.add(";"),x&&(w?g.code.add(m.H`
|
|
862
862
|
if(emissiveSource == 0) {
|
|
863
|
-
vec4 emissiveFromTex = textureLookup(texEmission, ${
|
|
863
|
+
vec4 emissiveFromTex = textureLookup(texEmission, ${n?"emissiveUV":"vuv0"});
|
|
864
864
|
emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);
|
|
865
865
|
}
|
|
866
|
-
`):g.code.add(`vec4 emissiveFromTex = textureLookup(texEmission, ${
|
|
866
|
+
`):g.code.add(`vec4 emissiveFromTex = textureLookup(texEmission, ${n?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);`),g.code.add("emissions.a = emissions.rgb == vec3(0.0) ? 0.0: emissions.a;")),r&&g.code.add("emissions.rgb *= emissiveStrength;"),g.code.add("return emissions;}")}(0,o.Cg)([(0,v.W)({count:8})],g.prototype,"emissionSource",void 0),(0,o.Cg)([(0,v.W)()],g.prototype,"hasEmissiveTextureTransform",void 0)},77695(e,t,r){r.d(t,{J:()=>h});var o=r(29242),a=r(48163),i=r(99208),n=r(68259),s=r(47286),l=r(31821),c=r(35644),u=r(15976),d=r(63761);function h(e,t){return function(e,t){const r=e.fragment,{hasVertexTangents:h,doubleSidedMode:m,hasNormalTexture:p,textureCoordinateType:f,bindType:v,hasNormalTextureTransform:g}=t;h?(e.attributes.add("tangent","vec4"),e.varyings.add("vTangent","vec4"),2===m?r.code.add(l.H`mat3 computeTangentSpace(vec3 normal) {
|
|
867
867
|
float tangentHeadedness = gl_FrontFacing ? vTangent.w : -vTangent.w;
|
|
868
868
|
vec3 tangent = normalize(gl_FrontFacing ? vTangent.xyz : -vTangent.xyz);
|
|
869
869
|
vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
|
|
@@ -884,19 +884,19 @@ T = T - normal * dot(normal, T);
|
|
|
884
884
|
T *= inversesqrt(max(dot(T,T), 1.e-10));
|
|
885
885
|
vec3 B = sign(det) * cross(normal, T);
|
|
886
886
|
return mat3(T, B, normal);
|
|
887
|
-
}`),p&&0!==f&&(e.include(
|
|
887
|
+
}`),p&&0!==f&&(e.include(i.r,t),r.uniforms.add(1===v?new d.N("normalTexture",e=>e.textureNormal):new u.o("normalTexture",e=>e.textureNormal)),g&&(r.uniforms.add(1===v?new s.G("scale",e=>e.scale??a.Un):new n.t("scale",e=>e.scale??a.Un)),r.uniforms.add(new c.k("normalTextureTransformMatrix",e=>e.normalTextureTransformMatrix??o.zK))),r.code.add(l.H`vec3 computeTextureNormal(mat3 tangentSpace, vec2 uv) {
|
|
888
888
|
vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;`),g&&r.code.add(l.H`mat3 normalRotation = mat3(normalTextureTransformMatrix[0][0]/scale[0], normalTextureTransformMatrix[0][1]/scale[1], 0.0,
|
|
889
889
|
normalTextureTransformMatrix[1][0]/scale[0], normalTextureTransformMatrix[1][1]/scale[1], 0.0,
|
|
890
890
|
0.0, 0.0, 0.0 );
|
|
891
891
|
rawNormal.xy = (normalRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),r.code.add(l.H`return tangentSpace * rawNormal;
|
|
892
|
-
}`))}(e,t)}},72233(e,t,r){r.d(t,{n:()=>
|
|
892
|
+
}`))}(e,t)}},72233(e,t,r){r.d(t,{n:()=>D});var o=r(31821),a=r(12791),i=r(5482),n=r(34727),s=r(97768),l=r(36708),c=r(78659),u=r(91429),d=r(37585),h=r(63666),m=r(78607),p=r(15581),f=r(13840),v=r(98958),g=r(95774),x=r(90644);let b=class extends v.w{constructor(){super(...arguments),this.shader=new f.r(g.S,()=>r.e(1285).then(r.bind(r,91285)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};b=(0,i.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],b);var y=r(48163),w=r(65786);class M extends w.Y{constructor(){super(...arguments),this.projScale=1}}class S extends M{constructor(){super(...arguments),this.intensity=1}}class T extends w.Y{}class C extends T{constructor(){super(...arguments),this.blurSize=(0,y.vt)()}}let _=class extends v.w{constructor(){super(...arguments),this.shader=new f.r(p.S,()=>r.e(6122).then(r.bind(r,86122)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};_=(0,i.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],_),r(63907);var I=r(25530),O=r(67171);let P=class extends m.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=h.OG.AMBIENT_ILLUMINATION,this._enableTime=(0,c.l5)(0),this._passParameters=new S,this._drawParameters=new C}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new O.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new I.A(this.renderingContext,t,e),this.addHandles((0,l.wB)(()=>this.view.stage.renderer.hasAmbientIllumination,()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),o=t?.getTexture(33306);if(!r||!o)return;const a=this.techniques.getCompiled(_),i=this.techniques.getCompiled(b);if(!a||!i)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,u=this.bindParameters,m=u.camera,f=m.relativeElevation,v=(0,n.qE)((5e5-f)/2e5,0,1),g=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,x=g*v;this._passParameters.normalTexture=r,this._passParameters.depthTexture=o,this._passParameters.projScale=1/m.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*z/(0,p.g)(m)**6*x;const y=m.fullViewport[2],w=m.fullViewport[3],M=this.fboCache.acquire(y,w,"ssao input",2);s.bindFramebuffer(M.fbo),s.setViewport(0,0,y,w),s.bindTechnique(a,u,this._passParameters,this._drawParameters),s.screen.draw();const S=Math.round(y/2),T=Math.round(w/2),C=this.fboCache.acquire(S,T,"ssao blur",0);s.bindFramebuffer(C.fbo),this._drawParameters.colorTexture=M.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,0,2/w),s.bindTechnique(i,u,this._passParameters,this._drawParameters),s.setViewport(0,0,S,T),s.screen.draw(),M.release();const I=this.fboCache.acquire(S,T,h.OG.AMBIENT_ILLUMINATION,0);return s.bindFramebuffer(I.fbo),s.setViewport(0,0,y,w),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=C.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,2/y,0),s.bindTechnique(i,u,this._passParameters,this._drawParameters),s.setViewport(0,0,S,T),s.screen.draw(),s.setViewport4fv(m.fullViewport),C.release(),g<1&&this.requestRender(2),I}};(0,i.Cg)([(0,u.MZ)()],P.prototype,"consumes",void 0),(0,i.Cg)([(0,u.MZ)()],P.prototype,"produces",void 0),P=(0,i.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],P);const z=.5;function D(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new a.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",.5),e.code.add(o.H`float evaluateAmbientOcclusionInverse() {
|
|
893
893
|
vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
|
|
894
894
|
return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
|
|
895
895
|
}
|
|
896
896
|
float evaluateAmbientOcclusion() {
|
|
897
897
|
return 1.0 - evaluateAmbientOcclusionInverse();
|
|
898
898
|
}`)):e.code.add(o.H`float evaluateAmbientOcclusionInverse() { return 1.0; }
|
|
899
|
-
float evaluateAmbientOcclusion() { return 0.0; }`)}},32971(e,t,r){r.d(t,{kA:()=>N,a8:()=>
|
|
899
|
+
float evaluateAmbientOcclusion() { return 0.0; }`)}},32971(e,t,r){r.d(t,{kA:()=>N,a8:()=>W,eU:()=>E});var o=r(74333);class a extends o.n{constructor(e,t,r,o){super(e,"float",0,(t,a)=>t.setUniform1fv(e,r(a),o),t)}}var i=r(31821);function n(e,t){e.uniforms.add(new a("shR",9,({lighting:e})=>e.sh.r),new a("shG",9,({lighting:e})=>e.sh.g),new a("shB",9,({lighting:e})=>e.sh.b)),e.code.add(i.H`vec3 calculateAmbientIrradiance(vec3 normal) {
|
|
900
900
|
vec3 ambientLight = 0.282095 * vec3(shR[0], shG[0], shB[0]);
|
|
901
901
|
vec4 sh1 = vec4(
|
|
902
902
|
0.488603 * normal.x,
|
|
@@ -927,12 +927,12 @@ dot(lightingAmbientSH_G2, sh2),
|
|
|
927
927
|
dot(lightingAmbientSH_B2, sh2)
|
|
928
928
|
);
|
|
929
929
|
return ambientLight;
|
|
930
|
-
}`),1!==t.pbrMode&&2!==t.pbrMode||e.code.add(
|
|
930
|
+
}`),1!==t.pbrMode&&2!==t.pbrMode||e.code.add(i.H`const vec3 skyTransmittance = vec3(0.9, 0.9, 1.0);
|
|
931
931
|
vec3 calculateAmbientRadiance()
|
|
932
932
|
{
|
|
933
933
|
vec3 ambientLight = 1.2 * (0.282095 * vec3(shR[0], shG[0], shB[0])) - 0.2;
|
|
934
934
|
return ambientLight *= skyTransmittance;
|
|
935
|
-
}`)}var s=r(72233),l=r(65261),c=r(98619),u=r(22393),d=r(89786),h=r(32976),m=r(12791),p=r(5482),f=r(97768),v=r(36708),g=r(91429),x=r(37585),b=r(63666),y=r(78607),w=r(587),M=r(52516),S=r(13840),T=r(98958),C=r(90644);let _=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(M.a,()=>r.e(2013).then(r.bind(r,42013)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};_=(0,p.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationBlurTechnique")],_);let I=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(w.a,()=>r.e(9794).then(r.bind(r,89794)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};I=(0,p.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationTechnique")],I);var
|
|
935
|
+
}`)}var s=r(72233),l=r(65261),c=r(98619),u=r(22393),d=r(89786),h=r(32976),m=r(12791),p=r(5482),f=r(97768),v=r(36708),g=r(91429),x=r(37585),b=r(63666),y=r(78607),w=r(587),M=r(52516),S=r(13840),T=r(98958),C=r(90644);let _=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(M.a,()=>r.e(2013).then(r.bind(r,42013)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};_=(0,p.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationBlurTechnique")],_);let I=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(w.a,()=>r.e(9794).then(r.bind(r,89794)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};I=(0,p.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationTechnique")],I);var O=r(51976);class P extends O.K{constructor(){super(...arguments),this.hasColor=!0,this.hasEmission=!1,this.rayMarchMaxReach=.5,this.rayMarchMaxSteps=16,this.useProjectedRayLength=!0,this.clampRayToScreen=!1}}(0,p.Cg)([(0,O.W)()],P.prototype,"hasColor",void 0),(0,p.Cg)([(0,O.W)()],P.prototype,"hasEmission",void 0);var z=r(50704);let D=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(z.a,()=>r.e(7891).then(r.bind(r,37891)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};D=(0,p.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationUpscaleTechnique")],D),r(63907);let j=class extends y.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=b.OG.AMBIENT_ILLUMINATION,this._passParameters=new w.G,this._drawParameters=new M.G,this._drawParametersUpscale=new z.G,this._maxFrames=256,this._lowQualityResolutionScale=.25,this._configuration=new P,this._lastOutput=null,this._isGlobalIlluminationUpdate=!1,this._resetBuffer=!1}initialize(){this.addHandles((0,v.wB)(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this._reset(),this._requestRender()},v.pc))}destroy(){this._lastOutput=(0,f.Gz)(this._lastOutput)}resetAccumulatedFrames(){this._isGlobalIlluminationUpdate||!(this._passParameters.accumulatedFrames>100)&&this._configuration.hasEmission||this._reset()}render(e){if(this._passParameters.accumulatedFrames>=this._maxFrames)return this._lastOutput?.retain(),this._lastOutput;const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),o=t?.getTexture(33306),a=this._mode;if(!r||!o)return this._emptyOutput;if(0===a)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this._requestRender(),this._emptyOutput;const i=this.bindParameters;this._configuration.hasEmission=!!i.reprojection.lastFrameEmission;const n=this.techniques.getCompiled(I,this._configuration),s=this.techniques.getCompiled(_),l=1===a,c=l?this._lowQualityResolutionScale:1,u=l?this.techniques.getCompiled(D):null;if(!n||!s||l&&!u)return this._requestRender(),this._emptyOutput;const d=this.renderingContext,{camera:h}=i;this._passParameters.normalTexture=r,this._passParameters.depthTexture=o,this._passParameters.projScale=1/h.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=c;const{fullWidth:m,fullHeight:p}=h,f=Math.max(1,Math.floor(m*c)),v=Math.max(1,Math.floor(p*c)),g=this.fboCache.acquire(f,v,"global illumination input").acquireColor(36065,2);d.bindFramebuffer(g.fbo),d.setViewport(0,0,f,v),d.bindTechnique(n,i,this._passParameters,this._drawParameters),d.screen.draw();const y=g.obtainAttachment(36065),w=Math.max(1,Math.round(f/1)),M=Math.max(1,Math.round(v/1)),S=this.fboCache.acquire(w,M,"global illumination blur horizontal");d.bindFramebuffer(S.fbo),this._drawParameters.texture=g.getTexture(),this._drawParameters.weightTexture=y.attachment,(0,x.hZ)(this._drawParameters.blurSize,0,1/v),d.bindTechnique(s,i,this._passParameters,this._drawParameters),d.setViewport(0,0,w,M),d.screen.draw(),g.release();const T=l?"global illumination blur vertical":b.OG.AMBIENT_ILLUMINATION,C=this.fboCache.acquire(w,M,T);d.bindFramebuffer(C.fbo),d.setViewport(0,0,w,M),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParameters.texture=S.getTexture(),this._drawParameters.weightTexture=y.attachment,(0,x.hZ)(this._drawParameters.blurSize,1/w,0),d.bindTechnique(s,i,this._passParameters,this._drawParameters),d.setViewport(0,0,w,M),d.screen.draw(),S.release(),C.attachColor(y,36065),y.release();let O=C;return u&&(O=this.fboCache.acquire(m,p,b.OG.AMBIENT_ILLUMINATION).acquireColor(36065,2),d.bindFramebuffer(O.fbo),d.setViewport(0,0,m,p),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParametersUpscale.colorTexture=C.getTexture(),this._drawParametersUpscale.weightTexture=C.getTexture(36065),d.bindTechnique(u,i,this._passParameters,this._drawParametersUpscale),d.screen.draw(),C.release()),d.setViewport4fv(h.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,++this._passParameters.accumulatedFrames,this._storeOutput(O),this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),O}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_storeOutput(e){this._lastOutput!==e&&(this._lastOutput=(0,f.Gz)(this._lastOutput),this._lastOutput=e,this._lastOutput.retain())}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:r}=this.bindParameters.camera,o=this.fboCache.acquire(t,r,b.OG.AMBIENT_ILLUMINATION).acquireColor(36065,2);return e.bindFramebuffer(o.fbo),e.setViewport(0,0,t,r),e.clearBuffer(0,[0,0,0,1]),e.clearBuffer(1,[0,0,0,0]),o}get _canRender(){const{reprojection:e,hasEmission:t,globalIllumination:r}=this.bindParameters;return!(!e.lastFrameColor||t&&!e.lastFrameEmission||!e.lastFrameDepth||!r||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}_reset(){this._passParameters.accumulatedFrames=0,this._lastOutput=(0,f.Gz)(this._lastOutput)}get test(){const e=this;return{passParameters:this._passParameters,configuration:this._configuration,get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},get mode(){return e._mode},restartAccumulation:()=>{this._reset(),this._passParameters.temporalSampleFrame=0,this._resetBuffer=!0,this._requestRender()}}}};function F(e,t){t.receiveGlobalIllumination?(e.uniforms.add(new h.o("hasGlobalIlluminationTexture",e=>null!=e.globalIllumination),new m.x("globalIlluminationTexture",e=>e.globalIllumination?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1),e.code.add(i.H`vec3 readGlobalIlluminationOcclusionInverse() {
|
|
936
936
|
if (!hasGlobalIlluminationTexture) {
|
|
937
937
|
return vec3(1.0);
|
|
938
938
|
}
|
|
@@ -951,21 +951,21 @@ return 1.0 - vec4(texelFetch(globalIlluminationTexture, texel, 0).rgb, 0.0);
|
|
|
951
951
|
}
|
|
952
952
|
vec4 readGlobalIlluminationEmission() {
|
|
953
953
|
return max((1.0 - readGlobalIlluminationEmissionInverse() - 0.01) / 0.99, 0.0);
|
|
954
|
-
}`)):e.code.add(
|
|
954
|
+
}`)):e.code.add(i.H`vec3 readGlobalIlluminationOcclusionInverse() { return vec3(1.0); }
|
|
955
955
|
vec3 readGlobalIlluminationOcclusion() { return vec3(0.0); }
|
|
956
956
|
vec4 readGlobalIlluminationEmissionInverse() { return vec4(1.0); }
|
|
957
|
-
vec4 readGlobalIlluminationEmission() { return vec4(0.0); }`)}(0,p.Cg)([(0,g.MZ)()],
|
|
957
|
+
vec4 readGlobalIlluminationEmission() { return vec4(0.0); }`)}(0,p.Cg)([(0,g.MZ)()],j.prototype,"consumes",void 0),(0,p.Cg)([(0,g.MZ)()],j.prototype,"produces",void 0),j=(0,p.Cg)([(0,g.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],j);var R=r(33094);function B(e){e.code.add(i.H`float mapChannel(float x, vec2 p) {
|
|
958
958
|
if((x < p.x) && (p.x == 0.0) || !(x < p.x) && (p.x == 1.0)) {
|
|
959
959
|
return 0.0;
|
|
960
960
|
}
|
|
961
961
|
float result = (x < p.x) ? mix(0.0, p.y, x/p.x) : mix(p.y, 1.0, (x - p.x) / (1.0 - p.x) );
|
|
962
962
|
return max(result, 0.0);
|
|
963
|
-
}`),e.code.add(
|
|
963
|
+
}`),e.code.add(i.H`vec3 blackLevelSoftCompression(vec3 color, float averageAmbientRadiance) {
|
|
964
964
|
vec2 p = vec2(0.02, 0.0075) * averageAmbientRadiance;
|
|
965
965
|
return vec3(mapChannel(color.x, p), mapChannel(color.y, p), mapChannel(color.z, p));
|
|
966
|
-
}`)}function
|
|
966
|
+
}`)}function H(e){e.code.add(i.H`vec3 tonemapACES(vec3 x) {
|
|
967
967
|
return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0);
|
|
968
|
-
}`),e.code.add(
|
|
968
|
+
}`),e.code.add(i.H`vec3 tonemapKhronosNeutral(vec3 color) {
|
|
969
969
|
const float startCompression = 0.76;
|
|
970
970
|
const float desaturation = 0.15;
|
|
971
971
|
float peak = max(color.r, max(color.g, color.b));
|
|
@@ -977,19 +977,19 @@ float newPeak = 1.0 - d * d / (peak + d - startCompression);
|
|
|
977
977
|
color *= newPeak / peak;
|
|
978
978
|
float g = 1.0 - 1.0 / (desaturation * (peak - newPeak) + 1.0 );
|
|
979
979
|
return mix(color, vec3(newPeak), g);
|
|
980
|
-
}`)}function
|
|
980
|
+
}`)}function W(e){e.constants.add("ambientBoostFactor","float",.4)}function E(e){e.uniforms.add(new R.U("lightingGlobalFactor",e=>e.lighting.globalFactor))}function N(e,t){const{pbrMode:r,spherical:o,hasColorTexture:a,receiveGlobalIllumination:m}=t;e.include(l.C),e.include(F,t),e.include(s.n,t),0!==r&&e.include(u.c,t),e.include(n,t),e.include(d.p),e.include(H,t);const p=!(2===r&&!a);p&&e.include(B),W(e),E(e),(0,c.Gc)(e),e.code.add(i.H`
|
|
981
981
|
float additionalDirectedAmbientLight(float lightAlignment) {
|
|
982
982
|
return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
|
|
983
983
|
}
|
|
984
984
|
|
|
985
985
|
float additionalDirectedAmbientLight(vec3 vPosWorld) {
|
|
986
|
-
float lightAlignment = dot(${o?
|
|
986
|
+
float lightAlignment = dot(${o?i.H`normalize(vPosWorld)`:i.H`vec3(0.0, 0.0, 1.0)`}, mainLightDirection);
|
|
987
987
|
return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
|
|
988
988
|
}
|
|
989
|
-
`),(0,c.O4)(e),e.code.add(
|
|
989
|
+
`),(0,c.O4)(e),e.code.add(i.H`vec3 evaluateAdditionalLighting(float ambientOcclusion, vec3 vPosWorld) {
|
|
990
990
|
float additionalAmbientScale = additionalDirectedAmbientLight(vPosWorld);
|
|
991
991
|
return (1.0 - ambientOcclusion) * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor * mainLightIntensity;
|
|
992
|
-
}`);const f=m?"globalIlluminationOcclusion":"ssao",v=m?.75:1,g=m?1.5:1;switch(r){case 0:case 4:case 3:e.include(c.Vt),e.code.add(
|
|
992
|
+
}`);const f=m?"globalIlluminationOcclusion":"ssao",v=m?.75:1,g=m?1.5:1;switch(r){case 0:case 4:case 3:e.include(c.Vt),e.code.add(i.H`vec3 evaluateSceneLighting(vec3 normalWorld, vec3 albedo, float shadow, float ssao, vec3 additionalLight) {
|
|
993
993
|
vec3 mainLighting = applyShading(normalWorld, shadow);
|
|
994
994
|
vec3 ambientLighting = calculateAmbientIrradiance(normalWorld) * (1.0 - ssao);
|
|
995
995
|
vec3 albedoLinear = linearizeGamma(albedo);
|
|
@@ -997,35 +997,35 @@ vec3 totalLight = mainLighting + ambientLighting + additionalLight;
|
|
|
997
997
|
totalLight = min(totalLight, vec3(PI));
|
|
998
998
|
vec3 outColor = vec3((albedoLinear / PI) * totalLight);
|
|
999
999
|
return delinearizeGamma(outColor);
|
|
1000
|
-
}`);break;case 1:case 2:{const r=m?.35:.2;e.code.add(
|
|
1000
|
+
}`);break;case 1:case 2:{const r=m?.35:.2;e.code.add(i.H`
|
|
1001
1001
|
const float fillLightIntensity = 0.25;
|
|
1002
1002
|
const float horizonLightDiffusion = 0.4;
|
|
1003
1003
|
const float additionalAmbientIrradianceFactor = 0.02;
|
|
1004
|
-
const float groundReflectance = ${
|
|
1004
|
+
const float groundReflectance = ${i.H.float(r)};
|
|
1005
1005
|
|
|
1006
1006
|
vec3 evaluateSceneLightingPBR(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight,
|
|
1007
1007
|
vec3 viewDirection, vec3 upDirection, vec3 mrr, float additionalAmbientIrradiance) {
|
|
1008
1008
|
PBRShadingInfo inputs;
|
|
1009
1009
|
calculatePBRInputs(inputs, normal, viewDirection, upDirection, albedo, mrr);
|
|
1010
1010
|
|
|
1011
|
-
${(0,
|
|
1012
|
-
`),t.useFillLights?e.uniforms.add(new h.o("hasFillLights",e=>e.enableFillLights)):e.constants.add("hasFillLights","bool",!1),e.code.add(
|
|
1011
|
+
${(0,i.If)(m,i.H`vec3 globalIlluminationOcclusion = min(1.2 * readGlobalIlluminationOcclusion(), 1.0);`)}
|
|
1012
|
+
`),t.useFillLights?e.uniforms.add(new h.o("hasFillLights",e=>e.enableFillLights)):e.constants.add("hasFillLights","bool",!1),e.code.add(i.H`
|
|
1013
1013
|
vec3 ambientDir = vec3(5.0 * upDirection[1] - upDirection[0] * upDirection[2], - 5.0 * upDirection[0] - upDirection[2] * upDirection[1], upDirection[1] * upDirection[1] + upDirection[0] * upDirection[0]);
|
|
1014
1014
|
ambientDir = ambientDir != vec3(0.0) ? normalize(ambientDir) : normalize(vec3(5.0, -1.0, 0.0));
|
|
1015
1015
|
|
|
1016
1016
|
inputs.NdotAmbDir = hasFillLights ? abs(dot(normal, ambientDir)) : 1.0;
|
|
1017
1017
|
|
|
1018
1018
|
// Calculate the irradiance components: sun, fill lights and the sky.
|
|
1019
|
-
vec3 mainLightIrradianceComponent = ${
|
|
1019
|
+
vec3 mainLightIrradianceComponent = ${i.H.float(v)} * inputs.NdotL * (1.0 - shadow) * mainLightIntensity;
|
|
1020
1020
|
vec3 fillLightsIrradianceComponent = inputs.NdotAmbDir * mainLightIntensity * fillLightIntensity;
|
|
1021
1021
|
// calculate ambient irradiance for localView and additionalLight for globalView
|
|
1022
|
-
vec3 ambientLightIrradianceComponent = ${
|
|
1022
|
+
vec3 ambientLightIrradianceComponent = ${i.H.float(g)} * calculateAmbientIrradiance(normal) * (1.0 - ${f}) + additionalLight;
|
|
1023
1023
|
|
|
1024
1024
|
// Assemble the overall irradiance of the sky that illuminates the surface
|
|
1025
1025
|
inputs.skyIrradianceToSurface = ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
|
|
1026
1026
|
// Assemble the overall irradiance of the ground that illuminates the surface. for this we use the simple model that changes only the sky irradiance by the groundReflectance
|
|
1027
1027
|
inputs.groundIrradianceToSurface = groundReflectance * ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
|
|
1028
|
-
`),e.uniforms.add(new
|
|
1028
|
+
`),e.uniforms.add(new R.U("lightingSpecularStrength",e=>e.lighting.mainLight.specularStrength),new R.U("lightingEnvironmentStrength",e=>e.lighting.mainLight.environmentStrength)).code.add(i.H`
|
|
1029
1029
|
vec3 horizonRingDir = inputs.RdotUP * upDirection - inputs.reflectedView;
|
|
1030
1030
|
vec3 horizonRingH = normalize(horizonRingDir - viewDirection);
|
|
1031
1031
|
inputs.NdotH_Horizon = dot(normal, horizonRingH);
|
|
@@ -1045,31 +1045,31 @@ return delinearizeGamma(outColor);
|
|
|
1045
1045
|
|
|
1046
1046
|
// Calculate average ambient radiance - This is used in the gamut mapping process to determine the black level for compression
|
|
1047
1047
|
inputs.averageAmbientRadiance = ambientLightIrradianceComponent[1] * (1.0 + groundReflectance);
|
|
1048
|
-
`),e.code.add(
|
|
1048
|
+
`),e.code.add(i.H`
|
|
1049
1049
|
vec3 reflectedColorComponent = evaluateEnvironmentIllumination(inputs);
|
|
1050
1050
|
vec3 additionalMaterialReflectanceComponent = inputs.albedoLinear * additionalAmbientIrradiance;
|
|
1051
1051
|
vec3 outColorLinear = reflectedColorComponent + additionalMaterialReflectanceComponent;
|
|
1052
1052
|
|
|
1053
|
-
${(0,
|
|
1053
|
+
${(0,i.If)(m,i.H`
|
|
1054
1054
|
vec3 globalIlluminationEmission = 2.25 * (0.75 * inputs.albedoLinear + 0.25) * readGlobalIlluminationEmission().rgb;
|
|
1055
1055
|
outColorLinear += globalIlluminationEmission;`)}
|
|
1056
1056
|
|
|
1057
|
-
${p?
|
|
1057
|
+
${p?i.H`vec3 adjustedOutColorLinear = blackLevelSoftCompression(outColorLinear, inputs.averageAmbientRadiance);`:i.H`vec3 adjustedOutColorLinear = max(vec3(0.0), outColorLinear - 0.005 * inputs.averageAmbientRadiance);`}
|
|
1058
1058
|
|
|
1059
1059
|
return delinearizeGamma(adjustedOutColorLinear);
|
|
1060
1060
|
}
|
|
1061
|
-
`);break}case 5:case 6:{const t=m?.35:.5,r=m?.75:1,o=m?1.5:1;(0,c.Gc)(e),(0,c.O4)(e),e.code.add(
|
|
1061
|
+
`);break}case 5:case 6:{const t=m?.35:.5,r=m?.75:1,o=m?1.5:1;(0,c.Gc)(e),(0,c.O4)(e),e.code.add(i.H`
|
|
1062
1062
|
const float roughnessTerrain = 0.5;
|
|
1063
|
-
const float specularityTerrain = ${
|
|
1063
|
+
const float specularityTerrain = ${i.H.float(t)};
|
|
1064
1064
|
|
|
1065
1065
|
vec3 evaluatePBRSimplifiedLighting(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight, vec3 viewDirection, vec3 upDirection) {
|
|
1066
1066
|
PBRShadingInfo inputs;
|
|
1067
1067
|
calculateSimplifiedInputs(inputs, normal, viewDirection, upDirection, albedo);
|
|
1068
1068
|
|
|
1069
|
-
${(0,
|
|
1069
|
+
${(0,i.If)(m,i.H`vec3 globalIlluminationOcclusion = min(1.2 * readGlobalIlluminationOcclusion(), 1.0);`)}
|
|
1070
1070
|
|
|
1071
|
-
vec3 mainLightIrradianceComponent = ${
|
|
1072
|
-
vec3 ambientLightIrradianceComponent = ${
|
|
1071
|
+
vec3 mainLightIrradianceComponent = ${i.H.float(r)} * (1.0 - shadow) * inputs.NdotL * mainLightIntensity;
|
|
1072
|
+
vec3 ambientLightIrradianceComponent = ${i.H.float(o)} * calculateAmbientIrradiance(normal) * (1.0 - ${f}) + additionalLight;
|
|
1073
1073
|
vec3 ambientSky = ambientLightIrradianceComponent + mainLightIrradianceComponent;
|
|
1074
1074
|
|
|
1075
1075
|
vec3 indirectDiffuse = ((1.0 - inputs.NdotUP) * mainLightIrradianceComponent + (1.0 + inputs.NdotUP ) * ambientSky) * 0.5;
|
|
@@ -1082,13 +1082,13 @@ return delinearizeGamma(outColor);
|
|
|
1082
1082
|
|
|
1083
1083
|
vec3 outColorLinear = outDiffColor + specularComponent;
|
|
1084
1084
|
|
|
1085
|
-
${(0,
|
|
1085
|
+
${(0,i.If)(m,i.H`
|
|
1086
1086
|
vec3 globalIlluminationEmission = 2.25 * (0.75 * inputs.albedoLinear + 0.25) * readGlobalIlluminationEmission().rgb;
|
|
1087
1087
|
outColorLinear += globalIlluminationEmission;`)}
|
|
1088
1088
|
|
|
1089
1089
|
return delinearizeGamma(outColorLinear);
|
|
1090
1090
|
}
|
|
1091
|
-
`);break}}}r(57226)},65261(e,t,r){r.d(t,{C:()=>
|
|
1091
|
+
`);break}}}r(57226)},65261(e,t,r){r.d(t,{C:()=>i});var o=r(40876),a=r(31821);function i(e){e.constants.add("GAMMA","float",2.2).constants.add("INV_GAMMA","float",o.iw).code.add(a.H`vec3 delinearizeGamma(vec3 color) {
|
|
1092
1092
|
return pow(color, vec3(INV_GAMMA));
|
|
1093
1093
|
}
|
|
1094
1094
|
vec4 delinearizeGamma(vec4 color) {
|
|
@@ -1113,7 +1113,7 @@ return pow(color, vec3(GAMMA));
|
|
|
1113
1113
|
float globalIlluminationDepthSharpness(float projScale, float depth, vec3 encodedNormal) {
|
|
1114
1114
|
return globalIlluminationDepthSharpness(projScale, depth) * globalIlluminationDepthNormalCorrection(encodedNormal);
|
|
1115
1115
|
}
|
|
1116
|
-
`)}},98619(e,t,r){r.d(t,{Gc:()=>
|
|
1116
|
+
`)}},98619(e,t,r){r.d(t,{Gc:()=>i,O4:()=>n,Vt:()=>s});var o=r(23205),a=r(31821);function i(e){e.uniforms.add(new o.d("mainLightDirection",e=>e.lighting.mainLight.direction))}function n(e){e.uniforms.add(new o.d("mainLightIntensity",e=>e.lighting.mainLight.intensity))}function s(e){i(e),n(e),e.code.add(a.H`vec3 applyShading(vec3 shadingNormal, float shadow) {
|
|
1117
1117
|
float dotVal = clamp(dot(shadingNormal, mainLightDirection), 0.0, 1.0);
|
|
1118
1118
|
return mainLightIntensity * ((1.0 - shadow) * dotVal);
|
|
1119
1119
|
}`)}},62602(e,t,r){r.d(t,{r:()=>a});var o=r(31821);function a(e,t){const r=e.fragment;switch(r.code.add(o.H`struct ShadingNormalParameters {
|
|
@@ -1135,7 +1135,7 @@ float intRadTheta = integratedRadiance(cosTheta2, roughness);
|
|
|
1135
1135
|
float ground = RdotNG < 0.0 ? 1.0 - intRadTheta : 1.0 + intRadTheta;
|
|
1136
1136
|
float sky = 2.0 - ground;
|
|
1137
1137
|
return (ground * ambientGround + sky * ambientSky) * 0.5;
|
|
1138
|
-
}`)}var
|
|
1138
|
+
}`)}var i=r(65261),n=r(89786);function s(e,t){e.include(i.C),e.include(n.p),1!==t.pbrMode&&2!==t.pbrMode&&5!==t.pbrMode&&6!==t.pbrMode||(e.code.add(o.H`float normalDistribution(float NdotH, float roughness)
|
|
1139
1139
|
{
|
|
1140
1140
|
float a = NdotH * roughness;
|
|
1141
1141
|
float b = roughness / (1.0 - NdotH * NdotH + a * a);
|
|
@@ -1199,19 +1199,19 @@ calculateCommonInputs(inputs, normal, viewDirection, upDirection, albedo);
|
|
|
1199
1199
|
float lightness = 0.3 * inputs.albedoLinear[0] + 0.5 * inputs.albedoLinear[1] + 0.2 * inputs.albedoLinear[2];
|
|
1200
1200
|
inputs.f0 = (0.85 * lightness + 0.15) * fresnelReflectionSimplified;
|
|
1201
1201
|
inputs.f90 = vec3(clamp(dot(inputs.f0, vec3(50.0 * 0.33)), 0.0, 1.0));
|
|
1202
|
-
}`)}},59469(e,t,r){r.d(t,{_:()=>c});var o=r(99208),a=r(40710),
|
|
1203
|
-
float getBakedOcclusion() { return 1.0; }`);case 2:return void c.code.add(
|
|
1202
|
+
}`)}},59469(e,t,r){r.d(t,{_:()=>c});var o=r(99208),a=r(40710),i=r(33079),n=r(31821),s=r(15976),l=r(63761);function c(e,t){const r=t.pbrMode,c=e.fragment;switch(r){case 5:case 3:case 4:case 6:return void c.code.add(n.H`void applyPBRFactors() {}`);case 0:case 7:return void c.code.add(n.H`void applyPBRFactors() {}
|
|
1203
|
+
float getBakedOcclusion() { return 1.0; }`);case 2:return void c.code.add(n.H`vec3 mrr = vec3(0.0, 0.6, 0.2);
|
|
1204
1204
|
float occlusion = 1.0;
|
|
1205
1205
|
void applyPBRFactors() {}
|
|
1206
|
-
float getBakedOcclusion() { return 1.0; }`);case 1:{const{hasMetallicRoughnessTexture:r,hasMetallicRoughnessTextureTransform:u,hasOcclusionTexture:d,hasOcclusionTextureTransform:h,bindType:m}=t;(r||d)&&e.include(o.r,t),c.code.add(
|
|
1207
|
-
float occlusion;`),r&&c.uniforms.add(1===m?new l.N("texMetallicRoughness",e=>e.textureMetallicRoughness):new s.o("texMetallicRoughness",e=>e.textureMetallicRoughness)),d&&c.uniforms.add(1===m?new l.N("texOcclusion",e=>e.textureOcclusion):new s.o("texOcclusion",e=>e.textureOcclusion)),c.uniforms.add(1===m?new
|
|
1208
|
-
${(0,
|
|
1206
|
+
float getBakedOcclusion() { return 1.0; }`);case 1:{const{hasMetallicRoughnessTexture:r,hasMetallicRoughnessTextureTransform:u,hasOcclusionTexture:d,hasOcclusionTextureTransform:h,bindType:m}=t;(r||d)&&e.include(o.r,t),c.code.add(n.H`vec3 mrr;
|
|
1207
|
+
float occlusion;`),r&&c.uniforms.add(1===m?new l.N("texMetallicRoughness",e=>e.textureMetallicRoughness):new s.o("texMetallicRoughness",e=>e.textureMetallicRoughness)),d&&c.uniforms.add(1===m?new l.N("texOcclusion",e=>e.textureOcclusion):new s.o("texOcclusion",e=>e.textureOcclusion)),c.uniforms.add(1===m?new i.t("mrrFactors",e=>e.mrrFactors):new a.W("mrrFactors",e=>e.mrrFactors)),c.code.add(n.H`
|
|
1208
|
+
${(0,n.If)(r,n.H`void applyMetallicRoughness(vec2 uv) {
|
|
1209
1209
|
vec3 metallicRoughness = textureLookup(texMetallicRoughness, uv).rgb;
|
|
1210
1210
|
mrr[0] *= metallicRoughness.b;
|
|
1211
1211
|
mrr[1] *= metallicRoughness.g;
|
|
1212
1212
|
}`)}
|
|
1213
1213
|
|
|
1214
|
-
${(0,
|
|
1214
|
+
${(0,n.If)(d,"void applyOcclusion(vec2 uv) { occlusion *= textureLookup(texOcclusion, uv).r; }")}
|
|
1215
1215
|
|
|
1216
1216
|
float getBakedOcclusion() {
|
|
1217
1217
|
return ${d?"occlusion":"1.0"};
|
|
@@ -1221,11 +1221,11 @@ float occlusion;`),r&&c.uniforms.add(1===m?new l.N("texMetallicRoughness",e=>e.t
|
|
|
1221
1221
|
mrr = mrrFactors;
|
|
1222
1222
|
occlusion = 1.0;
|
|
1223
1223
|
|
|
1224
|
-
${(0,
|
|
1225
|
-
${(0,
|
|
1226
|
-
}`)}}}(r(74810),r(65786)).Y},32482(e,t,r){r.d(t,{LA:()=>M,QH:()=>w}),r(51850);var o=r(46686),a=r(49255),
|
|
1227
|
-
void forwardLinearDepthToReadShadowMap() { ${(0,
|
|
1228
|
-
`)}var s=r(14314),l=r(35818),c=r(74333);class u extends c.n{constructor(e,t,r,o){super(e,"mat4",2,(r,a,n
|
|
1224
|
+
${(0,n.If)(r,`applyMetallicRoughness(${u?"metallicRoughnessUV":"vuv0"});`)}
|
|
1225
|
+
${(0,n.If)(d,`applyOcclusion(${h?"occlusionUV":"vuv0"});`)}
|
|
1226
|
+
}`)}}}(r(74810),r(65786)).Y},32482(e,t,r){r.d(t,{LA:()=>M,QH:()=>w}),r(51850);var o=r(46686),a=r(49255),i=r(31821);function n(e,t){const r=(0,a._o)(t.output)&&t.receiveShadows;r&&(0,o.o)(e,!0),e.vertex.code.add(i.H`
|
|
1227
|
+
void forwardLinearDepthToReadShadowMap() { ${(0,i.If)(r,"forwardLinearDepth(gl_Position.w);")} }
|
|
1228
|
+
`)}var s=r(14314),l=r(35818),c=r(74333);class u extends c.n{constructor(e,t,r,o){super(e,"mat4",2,(r,a,i,n)=>r.setUniformMatrices4fv(e,t(a,i,n),o),r)}}class d extends c.n{constructor(e,t,r,o){super(e,"mat4",1,(r,a,i)=>r.setUniformMatrices4fv(e,t(a,i),o),r)}}var h=r(65786);function m(e){e.uniforms.add(new d("shadowMapMatrix",(e,t)=>t.shadowMap.getShadowMapMatrices(e.origin),4)),e.include(f)}function p(e){e.uniforms.add(new u("shadowMapMatrix",(e,t)=>t.shadowMap.getShadowMapMatrices(e.origin),4)),e.include(f)}function f(e){e.uniforms.add(new s.I("cascadeDistances",e=>e.shadowMap.cascadeDistances),new l.W("numCascades",e=>e.shadowMap.numCascades)),e.code.add(v)}h.Y;const v=i.H`const vec3 invalidShadowmapUVZ = vec3(0.0, 0.0, -1.0);
|
|
1229
1229
|
vec3 lightSpacePosition(vec3 _vpos, mat4 mat) {
|
|
1230
1230
|
vec4 lv = mat * vec4(_vpos, 1.0);
|
|
1231
1231
|
lv.xy /= lv.w;
|
|
@@ -1247,25 +1247,25 @@ return invalidShadowmapUVZ;
|
|
|
1247
1247
|
}
|
|
1248
1248
|
vec2 uvShadow = cascadeCoordinates(i, shadowMapSize, lvpos);
|
|
1249
1249
|
return vec3(uvShadow, lvpos.z);
|
|
1250
|
-
}`;function g(e){e.code.add(
|
|
1250
|
+
}`;function g(e){e.code.add(i.H`float readShadowMapUVZ(vec3 uvzShadow, sampler2DShadow _shadowMap) {
|
|
1251
1251
|
return texture(_shadowMap, uvzShadow);
|
|
1252
|
-
}`)}var x=r(33094),b=r(12791);class y extends c.n{constructor(e,t){super(e,"sampler2DShadow",0,(r,o)=>r.bindTexture(e,t(o)))}}function w(e,t){t.receiveShadows&&e.fragment.include(m),S(e,t)}function M(e,t){t.receiveShadows&&e.fragment.include(p),S(e,t)}function S(e,t){e.fragment.uniforms.add(new x.U("lightingGlobalFactor",e=>e.lighting.globalFactor));const{hasShadowHighlights:r,receiveShadows:o,spherical:a}=t;e.include(
|
|
1252
|
+
}`)}var x=r(33094),b=r(12791);class y extends c.n{constructor(e,t){super(e,"sampler2DShadow",0,(r,o)=>r.bindTexture(e,t(o)))}}function w(e,t){t.receiveShadows&&e.fragment.include(m),S(e,t)}function M(e,t){t.receiveShadows&&e.fragment.include(p),S(e,t)}function S(e,t){e.fragment.uniforms.add(new x.U("lightingGlobalFactor",e=>e.lighting.globalFactor));const{hasShadowHighlights:r,receiveShadows:o,spherical:a}=t;e.include(n,t),o&&function(e,t){(function(e,t){e.include(g),e.uniforms.add(T()),t&&e.uniforms.add(new b.x("shadowHighlight",({shadowHighlight:e})=>e?.getTexture())),e.code.add(i.H`
|
|
1253
1253
|
float readShadowMaps(const in vec3 uvzShadow) {
|
|
1254
1254
|
if (uvzShadow.z < 0.0) {
|
|
1255
1255
|
return 0.0;
|
|
1256
1256
|
}
|
|
1257
1257
|
|
|
1258
1258
|
float shadow1 = readShadowMapUVZ(uvzShadow, shadowMap);
|
|
1259
|
-
${(0,
|
|
1259
|
+
${(0,i.If)(t,"float shadow2 = texelFetch(shadowHighlight, ivec2(gl_FragCoord.xy), 0).r;\n return shadow1 > shadow2 ? shadow1 : shadow2;","return shadow1;")}
|
|
1260
1260
|
}
|
|
1261
|
-
`)})(e,t),function(e){e.code.add(
|
|
1261
|
+
`)})(e,t),function(e){e.code.add(i.H`float readShadowMap(const in vec3 _worldPos, float _linearDepth) {
|
|
1262
1262
|
vec3 uvzShadow = calculateUVZShadow(_worldPos, _linearDepth, textureSize(shadowMap, 0));
|
|
1263
1263
|
return readShadowMaps(uvzShadow);
|
|
1264
|
-
}`)}(e)}(e.fragment,r),e.fragment.code.add(
|
|
1264
|
+
}`)}(e)}(e.fragment,r),e.fragment.code.add(i.H`
|
|
1265
1265
|
float readShadow(float additionalAmbientScale, vec3 vpos) {
|
|
1266
|
-
return ${o?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":(0,
|
|
1266
|
+
return ${o?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":(0,i.If)(a,"lightingGlobalFactor * (1.0 - additionalAmbientScale)","0.0")};
|
|
1267
1267
|
}
|
|
1268
|
-
`)}function T(){return new y("shadowMap",({shadowMap:e})=>e.getOutput(5)??e.getOutput(7))}h.Y},70893(e,t,r){r.d(t,{O:()=>c});var o=r(52540),a=r(77108),
|
|
1268
|
+
`)}function T(){return new y("shadowMap",({shadowMap:e})=>e.getOutput(5)??e.getOutput(7))}h.Y},70893(e,t,r){r.d(t,{O:()=>c});var o=r(52540),a=r(77108),i=r(33094),n=r(31821),s=r(58029),l=r(12791);function c(e,t){const r=e.fragment;r.include(o.E),r.uniforms.add(new a.E("nearFar",e=>e.camera.nearFar),new l.x("depthMap",e=>e.depth?.attachment),new s.F("proj",e=>e.camera.projectionMatrix),new i.U("invResolutionHeight",e=>1/e.camera.height),new s.F("reprojectionMatrix",e=>e.reprojection.matrix)).code.add(n.H`
|
|
1269
1269
|
vec2 reprojectionCoordinate(vec3 projectionCoordinate) {
|
|
1270
1270
|
vec4 clipDepthCoordinate = proj * vec4(0.0, 0.0, -projectionCoordinate.z, 1.0);
|
|
1271
1271
|
vec4 reprojectedCoordinate = reprojectionMatrix * vec4(
|
|
@@ -1404,7 +1404,7 @@ return readShadowMaps(uvzShadow);
|
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
1406
|
|
|
1407
|
-
${(0,
|
|
1407
|
+
${(0,n.If)(!t.clampRayToScreen,"if (projectedPosition.x <= 0.0 || projectedPosition.x >= 1.0) {\n return vec3(projectedPosition, 0.0);\n }")}
|
|
1408
1408
|
|
|
1409
1409
|
// Continue with ray marching
|
|
1410
1410
|
projectedPosition = projectedPosition + projectedStep;
|
|
@@ -1412,7 +1412,7 @@ return readShadowMaps(uvzShadow);
|
|
|
1412
1412
|
inverseW += inverseWStep;
|
|
1413
1413
|
previousEstimatedDepthDifference = estimatedDepthDifference;
|
|
1414
1414
|
|
|
1415
|
-
${(0,
|
|
1415
|
+
${(0,n.If)(t.clampRayToScreen,"projectedPosition = clamp(projectedPosition, vec2(0.0), vec2(0.999));")}
|
|
1416
1416
|
}
|
|
1417
1417
|
return vec3(projectedPosition, 0.0);
|
|
1418
1418
|
}
|
|
@@ -1424,32 +1424,32 @@ return readShadowMaps(uvzShadow);
|
|
|
1424
1424
|
viewDirection,
|
|
1425
1425
|
normal,
|
|
1426
1426
|
rayStepOffset,
|
|
1427
|
-
${
|
|
1428
|
-
${
|
|
1427
|
+
${n.H.float(t.rayMarchMaxReach)},
|
|
1428
|
+
${n.H.float(t.rayMarchMaxSteps)}
|
|
1429
1429
|
);
|
|
1430
1430
|
}
|
|
1431
|
-
`)}},51406(e,t,r){r.d(t,{MU:()=>l,O1:()=>c,QM:()=>u,Sx:()=>s,q2:()=>
|
|
1431
|
+
`)}},51406(e,t,r){r.d(t,{MU:()=>l,O1:()=>c,QM:()=>u,Sx:()=>s,q2:()=>n});var o=r(29242),a=r(31821),i=r(35644);function n(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new i.k("colorTextureTransformMatrix",e=>e.colorTextureTransformMatrix??o.zK)).code.add(a.H`void forwardColorUV(){
|
|
1432
1432
|
colorUV = (colorTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1433
|
-
}`)):e.vertex.code.add(a.H`void forwardColorUV(){}`)}function s(e,t){t.hasNormalTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("normalUV","vec2"),e.vertex.uniforms.add(new
|
|
1433
|
+
}`)):e.vertex.code.add(a.H`void forwardColorUV(){}`)}function s(e,t){t.hasNormalTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("normalUV","vec2"),e.vertex.uniforms.add(new i.k("normalTextureTransformMatrix",e=>e.normalTextureTransformMatrix??o.zK)).code.add(a.H`void forwardNormalUV(){
|
|
1434
1434
|
normalUV = (normalTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1435
|
-
}`)):e.vertex.code.add(a.H`void forwardNormalUV(){}`)}function l(e,t){t.hasEmissionTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("emissiveUV","vec2"),e.vertex.uniforms.add(new
|
|
1435
|
+
}`)):e.vertex.code.add(a.H`void forwardNormalUV(){}`)}function l(e,t){t.hasEmissionTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("emissiveUV","vec2"),e.vertex.uniforms.add(new i.k("emissiveTextureTransformMatrix",e=>e.emissiveTextureTransformMatrix??o.zK)).code.add(a.H`void forwardEmissiveUV(){
|
|
1436
1436
|
emissiveUV = (emissiveTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1437
|
-
}`)):e.vertex.code.add(a.H`void forwardEmissiveUV(){}`)}function c(e,t){t.hasOcclusionTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("occlusionUV","vec2"),e.vertex.uniforms.add(new
|
|
1437
|
+
}`)):e.vertex.code.add(a.H`void forwardEmissiveUV(){}`)}function c(e,t){t.hasOcclusionTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("occlusionUV","vec2"),e.vertex.uniforms.add(new i.k("occlusionTextureTransformMatrix",e=>e.occlusionTextureTransformMatrix??o.zK)).code.add(a.H`void forwardOcclusionUV(){
|
|
1438
1438
|
occlusionUV = (occlusionTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1439
|
-
}`)):e.vertex.code.add(a.H`void forwardOcclusionUV(){}`)}function u(e,t){t.hasMetallicRoughnessTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("metallicRoughnessUV","vec2"),e.vertex.uniforms.add(new
|
|
1439
|
+
}`)):e.vertex.code.add(a.H`void forwardOcclusionUV(){}`)}function u(e,t){t.hasMetallicRoughnessTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("metallicRoughnessUV","vec2"),e.vertex.uniforms.add(new i.k("metallicRoughnessTextureTransformMatrix",e=>e.metallicRoughnessTextureTransformMatrix??o.zK)).code.add(a.H`void forwardMetallicRoughnessUV(){
|
|
1440
1440
|
metallicRoughnessUV = (metallicRoughnessTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
1441
|
-
}`)):e.vertex.code.add(a.H`void forwardMetallicRoughnessUV(){}`)}},34845(e,t,r){r.d(t,{Ir:()=>u});var o=r(37585),a=r(48163),
|
|
1441
|
+
}`)):e.vertex.code.add(a.H`void forwardMetallicRoughnessUV(){}`)}},34845(e,t,r){r.d(t,{Ir:()=>u});var o=r(37585),a=r(48163),i=r(78955),n=r(91829),s=r(77108),l=r(14314),c=r(31821);function u(e){e.fragment.uniforms.add(new l.I("projInfo",e=>function(e){const t=e.projectionMatrix;return 0===t[11]?(0,i.hZ)(d,2/(e.fullWidth*t[0]),2/(e.fullHeight*t[5]),(1+t[12])/t[0],(1+t[13])/t[5]):(0,i.hZ)(d,-2/(e.fullWidth*t[0]),-2/(e.fullHeight*t[5]),(1-t[8])/t[0],(1-t[9])/t[5])}(e.camera))),e.fragment.uniforms.add(new s.E("zScale",e=>0===e.camera.projectionMatrix[11]?(0,o.hZ)(h,0,1):(0,o.hZ)(h,1,0))),e.fragment.code.add(c.H`vec3 reconstructPosition(vec2 fragCoord, float depth) {
|
|
1442
1442
|
return vec3((fragCoord * projInfo.xy + projInfo.zw) * (zScale.x * depth + zScale.y), depth);
|
|
1443
|
-
}`)}const d=(0,
|
|
1443
|
+
}`)}const d=(0,n.vt)(),h=(0,a.vt)()},58614(e,t,r){r.d(t,{SS:()=>n});var o=r(29941),a=(r(28421),r(20304)),i=r(26934);function n(e,t){!function(e,t,r){const o=e.fragment;switch(o.code.add("void discardOrAdjustAlpha(inout vec4 color) {"),t.alphaDiscardMode){case 1:o.code.add("color.a = 1.0;");break;case 0:0!==t.output&&(o.include(i.Q),o.code.add("if (color.a < alphaCutoff) discard;"));break;case 3:0!==t.output&&o.uniforms.add(r).code.add("if (color.a < textureAlphaCutoff) discard;");break;case 2:o.uniforms.add(r).code.add("\n if (color.a < textureAlphaCutoff) discard;\n color.a = 1.0;\n ");break;case 4:break;default:t.alphaDiscardMode}o.code.add("}")}(e,t,new a.m("textureAlphaCutoff",e=>e.textureAlphaCutoff))}o.v},26425(e,t,r){r.d(t,{u:()=>i});var o=r(33094),a=r(31821);function i(e){e.uniforms.add(new o.U("dpDummy",()=>1)).code.add(a.H`vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {
|
|
1444
1444
|
vec3 hiD = hiA + hiB;
|
|
1445
1445
|
vec3 loD = loA + loB;
|
|
1446
1446
|
return dpDummy * hiD + loD;
|
|
1447
|
-
}`)}},32976(e,t,r){r.d(t,{o:()=>a});var o=r(74333);class a extends o.n{constructor(e,t){super(e,"bool",0,(r,o)=>r.setUniform1b(e,t(o)))}}},40710(e,t,r){r.d(t,{W:()=>a});var o=r(74333);class a extends o.n{constructor(e,t,r){super(e,"vec3",2,(o,a,n
|
|
1447
|
+
}`)}},32976(e,t,r){r.d(t,{o:()=>a});var o=r(74333);class a extends o.n{constructor(e,t){super(e,"bool",0,(r,o)=>r.setUniform1b(e,t(o)))}}},40710(e,t,r){r.d(t,{W:()=>a});var o=r(74333);class a extends o.n{constructor(e,t,r){super(e,"vec3",2,(o,a,i,n)=>o.setUniform3fv(e,t(a,i,n),r))}}},33079(e,t,r){r.d(t,{t:()=>a});var o=r(74333);class a extends o.n{constructor(e,t,r){super(e,"vec3",1,(o,a,i)=>o.setUniform3fv(e,t(a,i),r))}}},28421(e,t,r){r.d(t,{J:()=>a});var o=r(74333);class a extends o.n{constructor(e,t,r){super(e,"float",2,(o,a,i)=>o.setUniform1f(e,t(a,i),r))}}},20304(e,t,r){r.d(t,{m:()=>a});var o=r(74333);class a extends o.n{constructor(e,t,r){super(e,"float",1,(o,a,i)=>o.setUniform1f(e,t(a,i),r))}}},15976(e,t,r){r.d(t,{o:()=>a});var o=r(74333);class a extends o.n{constructor(e,t,r){super(e,"sampler2D",2,(o,a,i)=>o.bindTexture(e,t(a,i),r?.(a,i)))}}},63761(e,t,r){r.d(t,{N:()=>a});var o=r(74333);class a extends o.n{constructor(e,t){super(e,"sampler2D",1,(r,o,a)=>r.bindTexture(e,t(o,a)))}}},31821(e,t,r){r.d(t,{If:()=>a});const o=(e,...t)=>{let r="";for(let o=0;o<t.length;o++)r+=e[o]+t[o];return r+=e[e.length-1],r};function a(e,t,r=""){return e?t:r}o.int=e=>e.toFixed(),o.uint=e=>`${Math.max(0,e).toFixed()}u`,o.hexuint=e=>`0x${Math.round(Math.max(0,e)).toString(16)}u`,o.float=e=>e.toPrecision(8),r.d(t,["H",0,o])},51976(e,t,r){r.d(t,{K:()=>s,W:()=>l});var o=r(49186),a=r(4576);class i{constructor(e){this._bits=[...e]}equals(e){return(0,a.aI)(this._bits,e.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}var n=r(65786);class s extends n.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map(()=>0)??[],this._parameterNames??=[]}get key(){return this._key??=new i(this._parameterBits),this._key}decode(e=this.key){const t=this._parameterBits;this._parameterBits=[...e.bits];const r=this._parameterNames.map(e=>` ${e}: ${this[e]}`).join("\n");return this._parameterBits=t,r}}function l(e={}){return(t,r)=>{t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t._parameterNames.push(r);const a=e.count||2,i=Math.ceil(Math.log2(a)),n=t._parameterBits;let s=0;for(;n[s]+i>16;)s++,s>=n.length&&n.push(0);const l=n[s],c=(1<<i)-1<<l;n[s]+=i,e.count?Object.defineProperty(t,r,{get(){return(this._parameterBits[s]&c)>>l},set(t){const a=this._parameterBits[s];if((a&c)>>l!==t){if(this._key=null,this._parameterBits[s]=a&~c|+t<<l&c,"number"!=typeof t)throw new o.A("internal:invalid-shader-configuration",`Configuration value for ${r} must be a number, got ${typeof t}`);if(null==e.count)throw new o.A("internal:invalid-shader-configuration",`Configuration value for ${r} must provide a count option`)}}}):Object.defineProperty(t,r,{get(){return!!((this._parameterBits[s]&c)>>l)},set(e){const t=this._parameterBits[s];if(!!((t&c)>>l)!==e&&(this._key=null,this._parameterBits[s]=t&~c|+e<<l,"boolean"!=typeof e))throw new o.A("internal:invalid-shader-configurationx",`Configuration value for ${r} must be boolean, got ${typeof e}`)}})}}},94046(e,t,r){r.d(t,{R:()=>a});var o=r(31821);function a(e){e.code.add(o.H`
|
|
1448
1448
|
vec3 quantizeGlobalIlluminationColor(vec3 color) {
|
|
1449
1449
|
vec3 clampedColor = clamp(color, vec3(0.0), vec3(1.0));
|
|
1450
1450
|
return floor(clampedColor * ${o.H.float(255)} + 0.5) * ${o.H.float(1/255)};
|
|
1451
1451
|
}
|
|
1452
|
-
`)}},27832(e,t,r){r.d(t,{b:()=>
|
|
1452
|
+
`)}},27832(e,t,r){r.d(t,{b:()=>i});var o=r(33094),a=r(31821);function i(e,t){t.snowCover&&(e.uniforms.add(new o.U("snowCover",e=>e.snowCover)).code.add(a.H`float getSnow(vec3 normal, vec3 groundNormal) {
|
|
1453
1453
|
return smoothstep(0.5, 0.55, dot(normal, groundNormal)) * snowCover;
|
|
1454
1454
|
}
|
|
1455
1455
|
float getRealisticTreeSnow(vec3 faceNormal, vec3 shadingNormal, vec3 groundNormal) {
|
|
@@ -1459,4 +1459,4 @@ smoothstep(0.0, 0.1, dot(shadingNormal, groundNormal)));
|
|
|
1459
1459
|
return snow * snowCover;
|
|
1460
1460
|
}`),e.code.add(a.H`vec3 applySnowToMRR(vec3 mrr, float snow) {
|
|
1461
1461
|
return mix(mrr, vec3(0.0, 1.0, 0.04), snow);
|
|
1462
|
-
}`))}},74810(e,t,r){r.d(t,{Jr:()=>
|
|
1462
|
+
}`))}},74810(e,t,r){r.d(t,{Jr:()=>i});var o=r(35522),a=r(51850);function i({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:i,emissiveTexture:n,emissiveFactor:s,occlusionTexture:l}){return null==e&&null==t&&null==n&&(null==s||(0,o.t2)(s,a.uY))&&null==l&&(null==i||1===i)&&(null==r||1===r)}const n=(0,a.CN)(1,1,.5),s=(0,a.CN)(0,.6,.2),l=(0,a.CN)(0,1,.2);r.d(t,["Bt",0,s,"SY",0,l,"mb",0,n])},72458(e,t,r){r.d(t,{C:()=>i,O:()=>n});var o=r(5482),a=r(51976);class i extends a.K{constructor(){super(...arguments),this.useFloatBlend=!0}}function n(e,t){t.useFloatBlend?(e.constants.add("floatBlendOutputScale","float",1),e.constants.add("floatBlendInputScale","float",1)):(e.constants.add("floatBlendOutputScale","float",1/16),e.constants.add("floatBlendInputScale","float",16)),e.constants.add("maxEmissiveStrength","float",16)}(0,o.Cg)([(0,a.W)()],i.prototype,"useFloatBlend",void 0)},65786(e,t,r){const o=class{};new o,r.d(t,["Y",0,o])},74333(e,t,r){r.d(t,{n:()=>o});class o{constructor(e,t,r,o,a=null){if(this.name=e,this.type=t,this.arraySize=a,this.bind={0:null,1:null,2:null},o)switch(r){case void 0:break;case 0:this.bind[0]=o;break;case 1:this.bind[1]=o;break;case 2:this.bind[2]=o}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}}}]);
|