@arcgis/core 5.2.0-next.62 → 5.2.0-next.63
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/WebDocument2D.d.ts +17 -1
- package/WebDocument2D.js +1 -1
- package/WebLinkChart.js +1 -1
- package/WebMap.js +1 -1
- package/WebScene.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcgisGlobal.d.ts +5 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02dd79beb13eff6be85e.js +1 -0
- package/assets/esri/core/workers/chunks/04ffe788d2efc0a076dd.js +1 -0
- package/assets/esri/core/workers/chunks/0623acb2bd14a61b65c9.js +29 -0
- package/assets/esri/core/workers/chunks/08c2bf9defcece9e049a.js +1 -0
- package/assets/esri/core/workers/chunks/0d61c8d348b09179777a.js +1 -0
- package/assets/esri/core/workers/chunks/14cd8bb1ad4da8d1d2ca.js +1 -0
- package/assets/esri/core/workers/chunks/23a3d8f91caf3136b2aa.js +1 -0
- package/assets/esri/core/workers/chunks/{1b68b1b724ad30396723.js → 2426601b8cae7f06af4d.js} +1 -1
- package/assets/esri/core/workers/chunks/2a1c6df073e6ca6a6365.js +1 -0
- package/assets/esri/core/workers/chunks/{f4891345507df63cff3c.js → 3f775deea48e268411f1.js} +3 -3
- package/assets/esri/core/workers/chunks/{e3623e557ab463580fd2.js → 41e821ce229bc56dc1a1.js} +1 -1
- package/assets/esri/core/workers/chunks/{17acbf40e7c1cb42d9bd.js → 44b1cdf28269b4fa8a39.js} +1 -1
- package/assets/esri/core/workers/chunks/44e8cd4b3dad777ab0c9.js +1 -0
- package/assets/esri/core/workers/chunks/456e616f32e7de696d38.js +1 -0
- package/assets/esri/core/workers/chunks/54b9667450d066c6f6ce.js +1 -0
- package/assets/esri/core/workers/chunks/5dbd8ca7e7b8eb9a0bf7.js +1 -0
- package/assets/esri/core/workers/chunks/5e3d5347223f0111f40f.js +1 -0
- package/assets/esri/core/workers/chunks/62f3ca0719ac6bc76512.js +1 -0
- package/assets/esri/core/workers/chunks/63ede7295938f7010808.js +1 -0
- package/assets/esri/core/workers/chunks/687cf21e027f49b44d22.js +1 -0
- package/assets/esri/core/workers/chunks/6c98a64d92c9bca78203.js +1 -0
- package/assets/esri/core/workers/chunks/{e7402dfd683f82878360.js → 752343d92ed48e674351.js} +1 -1
- package/assets/esri/core/workers/chunks/7538a0fe0cec3156769e.js +1 -0
- package/assets/esri/core/workers/chunks/{64247e439ef3e1f712e9.js → 7fdd6a5fa062778be55d.js} +1 -1
- package/assets/esri/core/workers/chunks/8369edafab7bdc59b95a.js +1 -0
- package/assets/esri/core/workers/chunks/{94e9cf8e729ec36de5be.js → 8c535c6a39d2be2ed655.js} +1 -1
- package/assets/esri/core/workers/chunks/8e1d4867406753c5483c.js +1 -0
- package/assets/esri/core/workers/chunks/92696cce2b980373f9ad.js +1 -0
- package/assets/esri/core/workers/chunks/{580451761cadfe308919.js → 9954149def644c371894.js} +1 -1
- package/assets/esri/core/workers/chunks/9f65cc6d9f7390bb1d5b.js +1 -0
- package/assets/esri/core/workers/chunks/a09ce34fc7c8abe64ed5.js +1 -0
- package/assets/esri/core/workers/chunks/{83991475aa54fd5aa008.js → a965d151515b76dd7566.js} +1 -1
- package/assets/esri/core/workers/chunks/{128799741dd3c6fc69b9.js → ac4131121230cfc14f21.js} +1 -1
- package/assets/esri/core/workers/chunks/afeeb11b39e140303b5a.js +1 -0
- package/assets/esri/core/workers/chunks/b13d2da33ec07e9d41ff.js +1 -0
- package/assets/esri/core/workers/chunks/{33bd9785bd0b6ccef21b.js → b2cf1d3f0d48eac23a84.js} +1 -1
- package/assets/esri/core/workers/chunks/c53b2be005721591e29b.js +1 -0
- package/assets/esri/core/workers/chunks/{e287113777a94ded8de6.js → c82ab4f0908290e70ee9.js} +1 -1
- package/assets/esri/core/workers/chunks/d456520e4b119a2816b6.js +1 -0
- package/assets/esri/core/workers/chunks/d83ea3e4e9ab45334068.js +1 -0
- package/assets/esri/core/workers/chunks/{4f59357f535f30a6b5cc.js → d9b83d7dd7d1f7729a91.js} +1 -1
- package/assets/esri/core/workers/chunks/dbcec48c4ba104a6d0b5.js +1 -0
- package/assets/esri/core/workers/chunks/e02f02040b63d9c2e654.js +1 -0
- package/assets/esri/core/workers/chunks/e08c64e4ae5a68eae2be.js +1 -0
- package/assets/esri/core/workers/chunks/e2ddfc96ddba92302e0c.js +1 -0
- package/assets/esri/core/workers/chunks/{61d3fcb419d6bf7e355e.js → e65ee26feca0564aeb9b.js} +1 -1
- package/assets/esri/core/workers/chunks/{35cbf00f0c37a86517af.js → ed1de8b7406269e217b9.js} +1 -1
- package/assets/esri/core/workers/chunks/ed4ac5568dc2815b066d.js +1 -0
- package/assets/esri/core/workers/chunks/f029c12f1afee0e9b2a1.js +1 -0
- package/assets/esri/core/workers/chunks/{461c2de938bf4c9b1442.js → f6715b8765cd36d81ec8.js} +1 -1
- package/assets/esri/core/workers/chunks/f9a4f4efd63b8189a4eb.js +1 -0
- package/assets/esri/core/workers/chunks/{26a2d4b95cda0a41d980.js → fa1c58e5b582d61a03ab.js} +1 -1
- package/assets/esri/core/workers/chunks/fa377112ef3b78f6ed18.js +1 -0
- package/chunks/VolumeMask.glsl.js +3 -0
- package/chunks/persistableUrlUtils.js +1 -1
- package/config.js +1 -1
- package/core/Collection.d.ts +42 -6
- package/core/Collection.js +1 -1
- package/geometry/SpatialReference.d.ts +1 -4
- package/kernel.js +1 -1
- package/layers/BaseElevationLayer.js +1 -1
- package/layers/ElevationLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/KnowledgeGraphLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/sources/connections/createConnection.js +1 -1
- package/layers/graphics/sources/parquet/ParquetFileStatistics.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/layers/mixins/SceneService.js +1 -1
- package/layers/raster/datasets/BaseRaster.js +1 -1
- package/layers/save/groupLayerUtils.js +1 -1
- package/layers/save/mediaLayerUtils.js +1 -1
- package/layers/support/ElevationQueryTileCache.js +1 -1
- package/layers/video/types.d.ts +17 -1
- package/linkChart/LinkChartProperties.js +1 -1
- package/package.json +1 -1
- package/portal/support/jsonContext.js +1 -1
- package/support/persistableUrlUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/FeatureHybridTileLoadStrategy.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatHeaderTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualization.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorResult.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/intersectWithPolygonOffset.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/{CutFillMask.glsl.js → VolumeMask.glsl.js} +1 -1
- package/views/3d/webgl-engine/shaders/VolumeMaskTechnique.js +2 -0
- package/webdoc/support/resourceUtils.js +1 -1
- package/webdoc/support/types.d.ts +2 -0
- package/webdoc/support/utils.js +2 -0
- package/webdoc/support/webdocLoadUtils.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ArcadeExecutorProvider.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/Grid/Column.d.ts +6 -0
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/SelectionList/FeatureItem.d.ts +116 -0
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +94 -0
- package/widgets/support/SelectionList/ItemBase.d.ts +70 -0
- package/widgets/support/SelectionList/LayerItem.d.ts +140 -0
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.d.ts +265 -0
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList/types.d.ts +42 -0
- package/widgets/support/forms/formUtils.js +1 -1
- package/assets/esri/core/workers/chunks/003a87b16f8a4b476e14.js +0 -1
- package/assets/esri/core/workers/chunks/0a50efb07eee36237e21.js +0 -1
- package/assets/esri/core/workers/chunks/129fdd1636e67997337c.js +0 -1
- package/assets/esri/core/workers/chunks/12e0c5b7cc5c3f9e6f0f.js +0 -1
- package/assets/esri/core/workers/chunks/147a89553188cc6aabf4.js +0 -1
- package/assets/esri/core/workers/chunks/26f1fd3f2be5102aae1d.js +0 -1
- package/assets/esri/core/workers/chunks/34fbeeeeef4bd01672c6.js +0 -1
- package/assets/esri/core/workers/chunks/36fe6adf6517d8f80125.js +0 -1
- package/assets/esri/core/workers/chunks/403f08e0c1a9203f7fba.js +0 -1
- package/assets/esri/core/workers/chunks/4f2170609742b51bd7b8.js +0 -1
- package/assets/esri/core/workers/chunks/5133083222588799493f.js +0 -1
- package/assets/esri/core/workers/chunks/52993a9dc0c56e9bda19.js +0 -1
- package/assets/esri/core/workers/chunks/5e35828216020f33e26b.js +0 -1
- package/assets/esri/core/workers/chunks/5f0d6c853873a7f32527.js +0 -1
- package/assets/esri/core/workers/chunks/6121cd0264b6841a5bac.js +0 -1
- package/assets/esri/core/workers/chunks/6823ba1688dfedba0107.js +0 -1
- package/assets/esri/core/workers/chunks/705d6b108fd121cea887.js +0 -1
- package/assets/esri/core/workers/chunks/73aa1bfa6e1dc271c9d7.js +0 -1
- package/assets/esri/core/workers/chunks/825eb845216762a1ed2f.js +0 -1
- package/assets/esri/core/workers/chunks/88df19742edb0cdc3e67.js +0 -1
- package/assets/esri/core/workers/chunks/8977c85aecc7e08ab13c.js +0 -1
- package/assets/esri/core/workers/chunks/8bdca809dd88eab9e5d8.js +0 -29
- package/assets/esri/core/workers/chunks/8c5726c7ce40a92901e6.js +0 -1
- package/assets/esri/core/workers/chunks/8c5e65982c3f9295e844.js +0 -1
- package/assets/esri/core/workers/chunks/8ce649e55fefc8eca55c.js +0 -1
- package/assets/esri/core/workers/chunks/90ae80b797642bff0efa.js +0 -1
- package/assets/esri/core/workers/chunks/97c758f736f28c5dab84.js +0 -1
- package/assets/esri/core/workers/chunks/a494abeb026d536d9fae.js +0 -1
- package/assets/esri/core/workers/chunks/a8ade34612e73862de6f.js +0 -1
- package/assets/esri/core/workers/chunks/a9d391071803b1e9e8a0.js +0 -1
- package/assets/esri/core/workers/chunks/aa3abc07de2921ef6ca1.js +0 -1
- package/assets/esri/core/workers/chunks/b03f09ee2224f0cc526a.js +0 -1
- package/assets/esri/core/workers/chunks/b3f1a442d6b7826e917f.js +0 -1
- package/assets/esri/core/workers/chunks/b819a9187426d0c146df.js +0 -1
- package/assets/esri/core/workers/chunks/f0225829f7d941914815.js +0 -1
- package/assets/esri/core/workers/chunks/fb34d6d96c8c0d53fcf6.js +0 -1
- package/chunks/CutFillMask.glsl.js +0 -3
- package/chunks/FocusAreaMask.glsl.js +0 -3
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.glsl.js +0 -2
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +0 -2
|
@@ -241,7 +241,7 @@ screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params)
|
|
|
241
241
|
return size * clamp(mix(factor.x, 1.0, factor.y), factor.z, 1.0);
|
|
242
242
|
}`),t.vertex.code.add(o.H`vec2 screenSizePerspectiveScaleVec2(vec2 size, float absCosAngle, float distanceToCamera, vec3 params) {
|
|
243
243
|
return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params));
|
|
244
|
-
}`)}function c(t){t.uniforms.add(new s.t("screenSizePerspective",t=>l(t.screenSizePerspective,t.screenSizePerspectiveMinPixelReferenceSize)))}function h(t){t.uniforms.add(new s.t("screenSizePerspectiveAlignment",t=>l(t.screenSizePerspectiveAlignment||t.screenSizePerspective,t.screenSizePerspectiveAlignment?null:t.screenSizePerspectiveMinPixelReferenceSize)))}function l(t,e){const i=null!=e&&null!=t?Math.min(t.minPixelSize/e,1):0;return t?(0,r.hZ)(u,t.divisor,t.offset,i):(0,r.hZ)(u,0,0,0)}const u=(0,n.vt)()},77949(t,e,i){i.d(e,{NB:()=>f,Nz:()=>_,S7:()=>g,yu:()=>d});var r=i(58083),n=i(9093),s=i(35522),o=i(51850),a=i(23205),c=i(40710),h=i(33094),l=i(58029),u=i(97102);function d(t,e){e.instancedDoublePrecision?t.constants.add("cameraPosition","vec3",o.uY):t.uniforms.add(new c.W("cameraPosition",(t,e)=>(0,s.hZ)(m,e.camera.viewInverseTransposeMatrix[3]-t.origin[0],e.camera.viewInverseTransposeMatrix[7]-t.origin[1],e.camera.viewInverseTransposeMatrix[11]-t.origin[2])))}function f(t,e){if(!e.instancedDoublePrecision)return void t.uniforms.add(new l.F("proj",t=>t.camera.projectionMatrix),new u.S("view",(t,e)=>(0,r.Tl)(p,e.camera.viewMatrix,t.origin)),new c.W("localOrigin",t=>t.origin));const i=({camera:t})=>(0,s.hZ)(m,t.viewInverseTransposeMatrix[3],t.viewInverseTransposeMatrix[7],t.viewInverseTransposeMatrix[11]);t.uniforms.add(new l.F("proj",t=>t.camera.projectionMatrix),new l.F("view",t=>(0,r.Tl)(p,t.camera.viewMatrix,i(t))),new a.d("localOrigin",t=>i(t)))}const p=(0,n.vt)(),m=(0,o.vt)();function g(t){t.uniforms.add(new l.F("viewNormal",t=>t.camera.viewInverseTransposeMatrix))}function _(t){t.uniforms.add(new h.U("pixelRatio",t=>t.camera.pixelRatio/t.overlayStretch))}},77108(t,e,i){i.d(e,{E:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec2",0,(r,n)=>r.setUniform2fv(t,e(n),i))}}},68259(t,e,i){i.d(e,{t:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec2",2,(r,n,s,o)=>r.setUniform2fv(t,e(n,s,o),i))}}},47286(t,e,i){i.d(e,{G:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec2",1,(r,n,s)=>r.setUniform2fv(t,e(n,s),i))}}},23205(t,e,i){i.d(e,{d:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec3",0,(r,n)=>r.setUniform3fv(t,e(n),i))}}},14314(t,e,i){i.d(e,{I:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec4",0,(r,n)=>r.setUniform4fv(t,e(n),i))}}},71988(t,e,i){i.d(e,{E:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec4",1,(r,n,s)=>r.setUniform4fv(t,e(n,s),i))}}},33094(t,e,i){i.d(e,{U:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"float",0,(r,n)=>r.setUniform1f(t,e(n),i))}}},44887(t,e,i){i.d(e,{x:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i,r){super(t,"float",1,(e,n,s)=>e.setUniform1fv(t,i(n,s),r),e)}}},35818(t,e,i){i.d(e,{W:()=>n});var r=i(74333);class n extends r.n{constructor(t,e){super(t,"int",0,(i,r)=>i.setUniform1i(t,e(r)))}}},93588(t,e,i){i.d(e,{c:()=>n});var r=i(74333);class n extends r.n{constructor(t,e){super(t,"int",1,(i,r,n)=>i.setUniform1i(t,e(r,n)))}}},35644(t,e,i){i.d(e,{k:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"mat3",1,(r,n,s)=>r.setUniformMatrix3fv(t,e(n,s),i))}}},58029(t,e,i){i.d(e,{F:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"mat4",0,(r,n)=>r.setUniformMatrix4fv(t,e(n),i))}}},97102(t,e,i){i.d(e,{S:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"mat4",2,(r,n,s)=>r.setUniformMatrix4fv(t,e(n,s),i))}}},12791(t,e,i){i.d(e,{x:()=>n});var r=i(74333);class n extends r.n{constructor(t,e){super(t,"sampler2D",0,(i,r)=>i.bindTexture(t,e(r)))}}},13840(t,e,i){i.d(e,{r:()=>r});class r{constructor(t,e){this._module=t,this._load=e}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},98958(t,e,i){i.d(e,{w:()=>p});var r=i(5482),n=i(69622),s=i(53966),o=i(91429),a=i(41976),c=(i(44208),i(26857)),h=i(94656);class l{constructor(t,e,i){this._context=t,this.locations=i,this._textures=new Map,this.source=(0,h.en)()?e:null,e.attributeNames.forEach(t=>{i.has(t)||s.A.getLogger("esri.views.3d.webgl-engine.lib.Program").error(`Missing VertexAttributeLocation for ${t} used in shader`)}),this._glProgram=t.programCache.get(e.generate("vertex",!0),e.generate("fragment",!0),i),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bind=e.generateBind(this),this.bindPass=e.generateBindPass(this),this.bindDraw=e.generateBindDraw(this)}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(t,e){this._glProgram.setUniform1i(t,e?1:0)}setUniform1i(t,e){this._glProgram.setUniform1i(t,e)}setUniform1f(t,e,i){this._glProgram.setUniform1f(t,e,i)}setUniform2fv(t,e,i){this._glProgram.setUniform2fv(t,e,i)}setUniform3fv(t,e,i){this._glProgram.setUniform3fv(t,e,i)}setUniform4fv(t,e,i){this._glProgram.setUniform4fv(t,e,i)}setUniformMatrix3fv(t,e,i){this._glProgram.setUniformMatrix3fv(t,e,!1,i)}setUniformMatrix4fv(t,e,i){this._glProgram.setUniformMatrix4fv(t,e,!1,i)}setUniformMatrices4fv(t,e,i){this._glProgram.setUniformMatrices4fv(t,e,!1,i)}setUniform1fv(t,e,i){this._glProgram.setUniform1fv(t,e,i)}setUniform1iv(t,e){this._glProgram.setUniform1iv(t,e)}setUniform2iv(t,e){this._glProgram.setUniform2iv(t,e)}setUniform3iv(t,e){this._glProgram.setUniform3iv(t,e)}setUniform4iv(t,e){this._glProgram.setUniform4iv(t,e)}assertCompatibleVertexAttributeLocations(t,e){if(c.b.ENABLE_OPTIMIZATIONS)return;let i=t.locations;if(e){const t=new Map(i);e.forEach((e,r)=>t.set(r,i.size+e)),i=t}i.size!==this.locations.size&&console.error(`VertexAttributeLocations are incompatible: ${i}, ${this.locations}`),this.locations.forEach((t,e)=>{i.get(e)!==t&&console.error(`VertexAttributeLocations are incompatible: Program has ${e} at position ${t}, VAO has it at position ${i.get(e)}.`)})}stop(){this._textures.clear()}bindTexture(t,e,i){if(!e?.glName){const i=`Texture sampler ${t} in ${this._context.debugBoundTechnique} has no given Texture in ${(new Error).stack}`;(0,h.en)()&&console.error(i),e=this._context.emptyTexture}const r=this._ensureTextureUnit(t,e);this._context.useProgram(this);const n=r.unit;this.setUniform1i(t,n),this._context.bindTexture(e,n,!1,i)}_ensureTextureUnit(t,e){let i=this._textures.get(t);return null==i?(i={texture:e,unit:this._textures.size},this._textures.set(t,i)):i.texture=e,i}}var u=i(63907),d=i(90644),f=i(85079);let p=class extends n.A{constructor(t,e,i){super({}),this._context=t,this._configuration=e,this.primitiveType=u.WR.TRIANGLES,this._unused=!0,this.ignoreUnused=!1,this.key=e.key,this.locations=(0,f.Xk)(i??a.lK),this._pipeline=this.initializePipeline(e),this.reload=async i=>{if(i&&await this.shader.reload(),!this.key.equals(e.key))return void s.A.getLogger("esri.views.3d.webgl.ShaderTechnique").warn(`Configuration was changed after construction, cannot reload shader for ${this.declaredClass}.`);const r=this.shader.get().build(e);r.debugName=this.declaredClass,this._program=new l(t.rctx,r,this.locations),this._pipeline=this.initializePipeline(e)}}initialize(){const t=this.shader.get().build(this._configuration);t.debugName=this.declaredClass,this._program=new l(this._context.rctx,t,this.locations)}get program(){return this._unused=!1,this._program}get compiled(){return this._unused=!1,this.program.compiled}get unused(){return this._unused}ensureAttributeLocations(t){this.program.assertCompatibleVertexAttributeLocations(t)}getPipeline(t,e,i){return this._pipeline}initializePipeline(t){return(0,d.Ey)({blending:d.RC,colorWrite:d.kn})}};p=(0,r.Cg)([(0,o.$K)("esri.views.3d.webgl-engine.core.shaderTechnique.ShaderTechnique")],p)},16943(t,e,i){i.d(e,{E:()=>n});var r=i(44208);function n(){return!!(0,r.A)("enable-feature:objectAndLayerId-rendering")}},41976(t,e,i){var r=i(63907),n=i(85079),s=i(74038);new s._("position",3,r.pe.FLOAT,0,12);const o=[new s._("position",2,r.pe.FLOAT,0,8)];(0,n.Xk)(o),new s._("position",2,r.pe.FLOAT,0,12),new s._("uv0",2,r.pe.HALF_FLOAT,8,12),new s._("position",2,r.pe.FLOAT,0,16),new s._("uv0",2,r.pe.FLOAT,8,16),i.d(e,["lK",0,o,"wR",0,[]])},92130(t,e,i){i.d(e,{A:()=>r});class r{constructor(t){this._material=t.material,this._techniques=t.techniques}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(t,e){return this._techniques.get(t,this._material.getConfiguration(e))}ensureResources(t){return 2}}},67499(t,e,i){i.d(e,{V:()=>E});var r=i(9093),n=i(35522),s=i(97146),o=i(34275),a=i(20498);function c(t){if(t.length<1024)return Array.from(t);if(Array.isArray(t))return Float64Array.from(t);if(!("BYTES_PER_ELEMENT"in t))return Array.from(t);switch(t.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(t);case 2:return(0,o.LW)(t)?(0,a.pX)().from(t):(0,o.jq)(t)?Uint16Array.from(t):Int16Array.from(t);case 4:return(0,o.vZ)(t)?Float32Array.from(t):Uint32Array.from(t);default:return Float64Array.from(t)}}var h=i(15142),l=i(51850),u=i(70328),d=i(94008),f=i(620);class p{constructor(t,e,i){this.primitiveIndices=t,this._numIndexPerPrimitive=e,this._readPosition=i,this._children=void 0,(0,f.vA)(t.length>=1);const r=t.length;v.clear();const s=(0,u.Ie)();for(let n=0;n<r;++n){const r=e*t[n];for(let t=0;t<e;++t){const e=r+t;v.push(e),(0,u.iT)(s,i(m,e))}}this.box=s;const o=new d.iy,a=(0,u.gX)(s,o.center);let c=.5*Math.max((0,u.VL)(s),(0,u.yr)(s),(0,u.uJ)(s)),h=c*c;for(let t=0;t<v.length;++t){const e=i(m,v.at(t)),r=(0,n.Re)(e,e,a),s=(0,n.uE)(r);if(s<=h)continue;const o=Math.sqrt(s),l=.5*(o-c);c+=l,h=c*c,(0,n.Ln)(a,a,r,l/o)}o.radius=c,this.sphere=o,v.clear()}get children(){if(this._children)return this._children;const t=this.box;if((0,u.TF)(t)<=1)return;const{_readPosition:e,_numIndexPerPrimitive:i,primitiveIndices:r}=this,s=(0,u.gX)(t,m),o=r.length,a=new Uint8Array(o),c=[0,0,0,0,0,0,0,0];for(let t=0;t<o;++t){const o=i*r[t],h=e(g,o);for(let t=1;t<i;++t)(0,n.jk)(h,h,e(_,o+t));const l=(h[0]<s[0]?1:0)|(h[1]<s[1]?2:0)|(h[2]<s[2]?4:0);a[t]=l,++c[l]}let h=0;for(let t=0;t<8;++t)c[t]>0&&++h;if(h<2)return;const l=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0];for(let t=0;t<8;++t)c[t]>0&&(l[t]=new Uint32Array(c[t]));c.fill(0);for(let t=0;t<o;++t){const e=a[t];l[e][c[e]++]=r[t]}const d=new Array;for(let t=0;t<8;++t){const r=l[t];void 0!==r&&d.push(new p(r,i,e))}return this._children=d,this._children}static prune(){v.prune()}}const m=(0,l.vt)(),g=(0,l.vt)(),_=(0,l.vt)(),v=new h.A({deallocator:null});var y=i(24326);class x{constructor(t){this.id=(0,y.c)(),this._attributes=new Map;for(const[e,i]of t)this._attributes.set(e,{...i,indices:(0,s.Dg)(i.indices)})}get attributes(){return this._attributes}}var b=i(48295);const w=(0,l.vt)(),T=(0,l.vt)(),M=(0,l.vt)(),A=(0,l.vt)();var S=i(17478),C=i(94656);class E extends x{constructor(t,e,i=null,r=0,n=null,s=-1,o,a){super(e),this.material=t,this.mapPositions=i,this.type=r,this.olidColor=n,this.edgeIndicesLength=s,this.baseGeometry=o,this.drawIndices=a,this._readPrimitivePosition=null,this._vertexPositionIndicesCache=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null,(0,f.vA)((t?.useIndexing??!1)===(null!=a),"Material index requirement and Geometry must match"),this.edgeIndicesLength<0&&(this.edgeIndicesLength=this.indexCount)}get readPrimitivePosition(){return this._readPrimitivePosition??=function(t,e){const{data:i,indices:r,size:n,stride:s}=t;return(0,f.vA)(3===n||4===n,"Position attribute must have 3 or 4 components"),null!=e?(t,n)=>{const o=r[e[n]]*s;return t[0]=i[o],t[1]=i[o+1],t[2]=i[o+2],t}:function(t,e,i){return(r,n)=>{const s=e[n]*i;return r[0]=t[s],r[1]=t[s+1],r[2]=t[s+2],r}}(i,r,s)}(this.positionAttribute,this.drawIndices),this._readPrimitivePosition}_invalidateReadPrimitivePosition(){this._readPrimitivePosition=null}instantiate(t={}){const e=new E(t.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((t,i)=>{t.exclusive=!1,e._attributes.set(i,t)}),e._boundingInfo=this._boundingInfo,e.transformation=t.transformation||this.transformation,e}getMutableAttribute(t){let e=this._attributes.get(t);return e&&!e.exclusive&&(e={...e,exclusive:!0,data:c(e.data)},this._attributes.set(t,e),"position"===t&&this._invalidateReadPrimitivePosition()),e}setAttributeData(t,e){const i=this._attributes.get(t);i?(this._attributes.set(t,{...i,exclusive:!0,data:e}),"position"===t&&this._invalidateReadPrimitivePosition()):(0,C.en)()&&console.warn(`Setting undefined attribute ${t} data`)}get primitivePositionIndices(){return void 0!==this._vertexPositionIndicesCache||(this._vertexPositionIndicesCache=this._computePrimitivePositionIndices()),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){const{drawIndices:t}=this,e=this.positionAttribute;if(null!=t&&null!=e){const i=new Array;for(const r of t)i.push(e.indices[r]);return i}return e?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const t=this.drawIndices??this.positionAttribute?.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(t){return!!this._calculateAttachmentOrigin(t)&&(null!=this._transformation&&(0,n.Z0)(t,t,this._transformation),!0)}_calculateAttachmentOrigin(t){return 0===this.type?this._computeAttachmentOriginTriangles(t):2===this.type?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t)}_computeAttachmentOriginTriangles(t){return function(t,e,i){if(i<=0)return!1;(0,n.hZ)(t,0,0,0),(0,n.hZ)(A,0,0,0);let r=0,s=0;for(let o=0;o<i;++o){const i=3*o;e(w,i),e(T,i+1),e(M,i+2);const a=(0,b.BU)(w,T,M);a?((0,n.WQ)(w,w,T),(0,n.WQ)(w,w,M),(0,n.hs)(w,w,1/3*a),(0,n.WQ)(t,t,w),r+=a):((0,n.WQ)(A,A,w),(0,n.WQ)(A,A,T),(0,n.WQ)(A,A,M),s+=3)}return!(0===s&&0===r||(0!==r?((0,n.hs)(t,t,1/r),0):0===s||((0,n.hs)(t,A,1/s),0)))}(t,this.readPrimitivePosition,this.indexCount/3)}_computeAttachmentOriginLines(t){const{indexCount:e}=this;return function(t,e,i,r){if(i<=0)return!1;(0,n.hZ)(t,0,0,0),(0,n.hZ)(A,0,0,0);let s=0,o=0;const a=i-1,c=a+(r?2:0);for(let i=0;i<c;i+=2){const r=i<a?i+1:0;e(w,i<a?i:a),e(T,r),(0,n.hs)(w,(0,n.WQ)(w,w,T),.5);const c=(0,n.xg)(w,T);c>0?((0,n.WQ)(t,t,(0,n.hs)(w,w,c)),s+=c):0===s&&((0,n.WQ)(A,A,w),o++)}return 0!==s?((0,n.hs)(t,t,1/s),!0):0!==o&&((0,n.hs)(t,A,1/o),!0)}(t,this.readPrimitivePosition,e,function(t,e){return!(!("isClosed"in t)||!t.isClosed)&&e>2}(this.material.parameters,e))}_computeAttachmentOriginPoints(t){return function(t,e,i){if(i<=0)return!1;(0,n.hZ)(t,0,0,0);let r=NaN,s=NaN,o=NaN,a=0;for(let n=0;n<i;n++){const i=e(w,n);i[0]===r&&i[1]===s&&i[2]===o||(t[0]+=i[0],t[1]+=i[1],t[2]+=i[2],a++),r=i[0],s=i[1],o=i[2]}return a>1&&(0,n.hs)(t,t,1/a),a>0}(t,this.readPrimitivePosition,this.indexCount)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const t=this.positionAttribute,e=this.indexCount;if(!t||0===e)return null;const i=0===this.type?3:1;(0,f.vA)(e%i===0,"Indexing error: "+e+" not divisible by "+i);const r=(0,s.tM)(e/i);return new p(r,i,this.readPrimitivePosition)}get transformation(){return this._transformation??r.zK}set transformation(t){this._transformation=t&&t!==r.zK?(0,r.o8)(t):null}get highlights(){return this._highlights||R}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(t){this._highlightOptionsCounts?.forEach((e,i)=>t(i))}allocateIdAndHighlight(t){const e=new S.h(t);return this.addHighlight(e)}addHighlight(t){this._ensureHighlights().add(t);const{highlightName:e}=t,i=(this._highlightOptionsCounts?.get(e)??0)+1;return this._ensureHighlightOptionsCounts().set(e,i),t}_ensureHighlights(){let t=this._highlights;return t||(t=new Set,this._highlights=t),t}_ensureHighlightOptionsCounts(){let t=this._highlightOptionsCounts;return t||(t=new Map,this._highlightOptionsCounts=t),t}removeHighlight(t){if(this._highlights?.delete(t)){const{highlightName:e}=t,i=this._highlightOptionsCounts?.get(e)??0;i<=1?this._highlightOptionsCounts?.delete(e):this._ensureHighlightOptionsCounts().set(e,i-1)}}}const R=new Set},49718(t,e,i){i(51850),i(6867).w_},6867(t,e,i){i.d(e,{w_:()=>u});var r=i(58083),n=i(9093),s=i(35522),o=i(51850),a=i(78955),c=i(91829),h=i(71351);class l{constructor(){this.intersector=4}_init(){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4}_setBase(t,e,i,r,n){this.intersector=t,this.distance=i,this.target=e,this.drapedLayerOrder=r,this.renderPriority=n}}class u extends l{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,s.hs)(f,this.ray.direction,this.distance),(0,s.Bw)(f))}withinDistance(t){return!!d(this)&&null!=this.distanceInRenderSpace&&this.distanceInRenderSpace<=t}getIntersectionPoint(t){return!!d(this)&&((0,s.hs)(f,this.ray.direction,this.distance),(0,s.WQ)(t,this.ray.origin,f),!0)}getTransformedNormal(t){return(0,s.C)(p,this.normal),p[3]=0,(0,a.Z0)(p,p,this.transformation),(0,s.C)(t,p),(0,s.S8)(t,t)}constructor(t){super(),this.normal=(0,o.vt)(),this.transformation=(0,n.vt)(),this._ray=(0,h.vt)(),this.init(t)}init(t){super._init(),t&&(0,h.C)(t,this._ray)}set(t,e,i,a,c,h,l){this._setBase(t,e,i,h,l),(0,s.C)(this.normal,a??o.Cb),(0,r.C)(this.transformation,c??n.zK)}copy(t){this._setBase(t.intersector,t.target,t.distance,t.drapedLayerOrder,t.renderPriority),(0,h.C)(t.ray,this._ray),(0,s.C)(this.normal,t.normal),(0,r.C)(this.transformation,t.transformation)}}function d(t){return null!=t?.distance}const f=(0,o.vt)(),p=(0,c.vt)()},18845(t,e,i){i.d(e,{h:()=>U});var r=i(49186),n=i(65529),s=i(97768),o=i(17676),a=i(34275),c=i(24326),h=i(84952),l=i(38969),u=i(31217),d=i(95117),f=i(2741);let p;var m=i(63907),g=i(21231),_=i(42293);let v=null,y=null;async function x(){return null==y&&(p??=(async()=>{const t=await i.e(9321).then(i.bind(i,49321)),e=await t.default({locateFile:t=>(0,f.s)(`esri/libs/basisu/${t}`)});return e.initializeBasis(),e})(),y=p,v=await y),y}function b(t,e){if(null==v)return t.byteLength;const i=new v.BasisFile(new Uint8Array(t)),r=M(i)?T(i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),e):0;return i.close(),i.delete(),r}function w(t,e){if(null==v)return t.byteLength;const i=new v.KTX2File(new Uint8Array(t)),r=A(i)?T(i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),e):0;return i.close(),i.delete(),r}function T(t,e,i,r,n){const s=(0,_.MW)(e?m.CQ.COMPRESSED_RGBA8_ETC2_EAC:m.CQ.COMPRESSED_RGB8_ETC2),o=n&&t>1?(4**t-1)/(3*4**(t-1)):1;return Math.ceil(i*r*s*o)}function M(t){return t.getNumImages()>=1&&!t.isUASTC()}function A(t){return t.getFaces()>=1&&(t.isETC1S()||t.isUASTC())}function S(t,e,i,r,n,s,o,a){const{compressedTextureETC:c,compressedTextureS3TC:h}=t.capabilities,[l,u]=c?r?[1,m.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,m.CQ.COMPRESSED_RGB8_ETC2]:h?r?[3,m.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,m.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],d=e.hasMipmap?i:Math.min(1,i),f=[];for(let t=0;t<d;t++)f.push(new Uint8Array(o(t,l))),a(t,l,f[t]);return e.internalFormat=u,e.hasMipmap=f.length>1,e.samplingMode=e.hasMipmap?9987:9729,e.width=n,e.height=s,new g.A(t,e,{type:"compressed",levels:f})}var C=i(53966);const E=()=>C.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function R(t){return t.charCodeAt(0)+(t.charCodeAt(1)<<8)+(t.charCodeAt(2)<<16)+(t.charCodeAt(3)<<24)}const I=R("DXT1"),D=R("DXT3"),O=R("DXT5");function P(t,e){const i=new Int32Array(t.buffer,t.byteOffset,31);if(542327876!==i[0])return E().error("Invalid magic number in DDS header"),null;if(!(4&i[20]))return E().error("Unsupported format, must contain a FourCC code"),null;const r=i[21];let n,s;switch(r){case I:n=8,s=m.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case D:n=16,s=m.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case O:n=16,s=m.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return E().error("Unsupported FourCC code:",function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)}(r)),null}let o=1,a=i[4],c=i[3];(3&a||3&c)&&(E().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,c=c+3&-4);const h=a,l=c;let u,d;131072&i[2]&&!1!==e&&(o=Math.max(1,i[7]));let f=t.byteOffset+i[1]+4;const p=[];for(let e=0;e<o;++e)d=(a+3>>2)*(c+3>>2)*n,u=new Uint8Array(t.buffer,f,d),p.push(u),f+=d,a=Math.max(1,a>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:p},internalFormat:s,width:h,height:l}}var F=i(78988),N=i(620),B=i(67171),L=i(12541);class U{constructor(t,e){this._data=t,this.id=(0,c.c)(),this.events=new n.bk,this._parameters={...V,...e},this._startPreload(t)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(t){t instanceof HTMLVideoElement?(this.update=e=>this._update(t,e),this._startPreloadVideoElement(t)):t instanceof HTMLImageElement&&this._startPreloadImageElement(t)}_startPreloadVideoElement(t){if(!((0,h.w8)(t.src)||"auto"===t.preload&&t.crossOrigin)&&(t.preload="auto",t.crossOrigin="anonymous",t.src=t.src,t.paused&&t.autoplay)){const e=[];(0,l.i)(t,t=>e.push(t)).then(()=>{t.play()}).finally(()=>e.forEach(t=>t.remove()))}}_startPreloadImageElement(t){(0,h.DB)(t.src)||(0,h.w8)(t.src)||t.crossOrigin||(t.crossOrigin="anonymous",t.src=t.src)}_createDescriptor(t){const e=new B.R;return e.wrapMode=this._parameters.wrap??10497,e.flipped=!this._parameters.noUnpackFlip,e.samplingMode=this._parameters.mipmap?9987:9729,e.hasMipmap=!!this._parameters.mipmap,e.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,e.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?t.parameters.maxMaxAnisotropy:1),e.dataType=this._parameters.dataType??e.dataType,e.pixelFormat=this._parameters.pixelFormat??e.pixelFormat,e.internalFormat=this._parameters.internalFormat??e.internalFormat,e.isImmutable=!0===this._parameters.immutable&&function(t){return null!=t&&((0,L.tl)(t)||(0,L.tr)(t)||(0,L.CR)(t)||(0,L.QJ)(t))}(this._parameters.internalFormat),e}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(t,e){if(null==t)return 0;if((0,a.mw)(t)||(0,a.mg)(t))return"image/ktx2"===e.encoding?w(t,!!e.mipmap):"image/x.basis"===e.encoding?b(t,!!e.mipmap):t.byteLength;const{width:i,height:r}=t instanceof Image||t instanceof ImageData||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement?H(t):e,n=e.pixelFormat??6408,s=(0,_.wH)(n);return(e.mipmap?4/3:1)*i*r*s||0}(this._data,this._parameters)}load(t){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const e=this._data;return null==e?(this._texture=new g.A(t,this._createDescriptor(t),null),this._texture):(this._emptyTexture=t.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof e?this._loadFromURL(t,e):e instanceof Image?this._loadFromImageElement(t,e):e instanceof HTMLVideoElement?this._loadFromVideoElement(t,e):e instanceof ImageData||e instanceof HTMLCanvasElement?this._loadFromImage(t,e):(0,a.mg)(e)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(t,e):(0,a.mw)(e)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(t,new Uint8Array(e)):((0,a.mw)(e)||(0,a.mg)(e))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(t,e):((0,a.mw)(e)||(0,a.mg)(e))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(t,e):(0,a.mw)(e)?this._loadFromPixelData(t,new Uint8Array(e)):(0,a.iu)(e)?this._loadFromPixelData(t,e):null)}_update(t,e){return null==this._texture||t.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||e===t.currentTime?e:(this._texture.setData(t),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),t.currentTime)}_loadFromDDSData(t,e){return this._texture=function(t,e,i){const r=P(i,e.hasMipmap??!1);if(null==r)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:s,width:o,height:a}=r;return e.samplingMode=n.levels.length>1?9987:9729,e.hasMipmap=n.levels.length>1,e.internalFormat=s,e.width=o,e.height=a,new g.A(t,e,n)}(t,this._createDescriptor(t),e),this._emptyTexture=null,this._texture}_loadFromKTX2(t,e){return this._loadAsync(()=>async function(t,e,i){null==v&&(v=await x());const r=new v.KTX2File(new Uint8Array(i));if(!A(r))return null;r.startTranscoding();const n=S(t,e,r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),(t,e)=>r.getImageTranscodedSizeInBytes(t,0,0,e),(t,e,i)=>r.transcodeImage(i,t,0,0,e,0,-1,-1));return r.close(),r.delete(),n}(t,this._createDescriptor(t),e).then(t=>(this._texture=t,t)))}_loadFromBasis(t,e){return this._loadAsync(()=>async function(t,e,i){null==v&&(v=await x());const r=new v.BasisFile(new Uint8Array(i));if(!M(r))return null;r.startTranscoding();const n=S(t,e,r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),(t,e)=>r.getImageTranscodedSizeInBytes(0,t,e),(t,e,i)=>r.transcodeImage(i,0,t,e,0,0));return r.close(),r.delete(),n}(t,this._createDescriptor(t),e).then(t=>(this._texture=t,t)))}_loadFromPixelData(t,e){(0,N.vA)(this._parameters.width>0&&this._parameters.height>0);const i=this._createDescriptor(t);return 6407!==i.pixelFormat&&6408!==i.pixelFormat||(i.compress=this._parameters.compressionOptions),i.width=this._parameters.width??0,i.height=this._parameters.height??0,this._texture=new g.A(t,i,e),this._texture}_loadFromURL(t,e){return this._loadAsync(async i=>{const r=await(0,u.D)(e,{signal:i});return(0,o.Te)(i),this._loadFromImage(t,r)})}_loadFromImageElement(t,e){return e.complete?this._loadFromImage(t,e):this._loadAsync(async i=>{const r=await(0,d.y)(e,e.src,!1,i);return(0,o.Te)(i),this._loadFromImage(t,r)})}_loadFromVideoElement(t,e){return e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(t,e):this._loadFromVideoElementAsync(t,e)}_loadFromVideoElementAsync(t,e){return this._loadAsync(i=>new Promise((n,a)=>{const c=()=>{e.removeEventListener("loadeddata",h),e.removeEventListener("error",l),(0,s.xt)(u)},h=()=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(c(),n(this._loadFromImage(t,e)))},l=t=>{c(),a(t||new r.A("texture:load-error","Failed to load video"))};e.addEventListener("loadeddata",h),e.addEventListener("error",l);const u=(0,o.u7)(i,()=>l((0,o.NK)()))}))}_loadFromImage(t,e){let i=e;i instanceof HTMLVideoElement||(i=(0,F.vM)(i,t.parameters));const r=H(i);this._parameters.width=r.width,this._parameters.height=r.height;const n=this._createDescriptor(t);return n.width=r.width,n.height=r.height,n.compress=this._parameters.compressionOptions,this._texture=new g.A(t,n,i),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(t){const e=new AbortController;this._loadingController=e;const i=t(e.signal);this._loadingPromise=i;const r=()=>{this._loadingController===e&&(this._loadingController=null),this._loadingPromise===i&&(this._loadingPromise=null),this._emptyTexture=null};return i.then(r,r),i}unload(){if(this._texture=(0,s.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const t=this._loadingController;this._loadingController=null,this._loadingPromise=null,t.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function H(t){return t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t}const V={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},11725(t,e,i){i.d(e,{i:()=>a});var r=i(24326),n=i(49255),s=i(43616),o=i(65786);class a{constructor(t,e){this.id=(0,r.c)(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new e,(0,s.MB)(this._parameters,t),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(t){return!1}setParameters(t,e=!0){(0,s.MB)(this._parameters,t)&&(this.validateParameters(this._parameters),e&&this._parametersChanged())}validateParameters(t){}shouldRender(t){return this.visible&&this.isVisibleForOutput(t.output)&&(!this.parameters.isDecoration||t.bind.decorations)&&0!==(this.parameters.renderOccluded&t.renderOccludedMask)}isVisibleForOutput(t){return!0}get renderPriority(){return this._renderPriority}set renderPriority(t){t!==this._renderPriority&&(this._renderPriority=t,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get emissions(){return 0}getConfiguration(t){return this.updateConfiguration(t),this._configuration}updateConfiguration(t){this._configuration.output=t.output,this._configuration.hasEmission=t.hasEmission&&(0,n._o)(t.output),this._configuration.hasHighlightMixTexture=10===t.output&&null!=t.highlightMixTexture,this._configuration.useFloatBlend=t.useFloatBlend.value,this._configuration.emissionDimmingPass=t.transparentWithoutDepthEmissionDimmingPass&&(0,n._o)(t.output)}}o.Y},17478(t,e,i){i.d(e,{h:()=>s,p:()=>o});var r=i(24326);class n{constructor(){this.uid=(0,r.c)()}}class s extends n{constructor(t){super(),this.highlightName=t,this.channel=0}}class o extends n{constructor(){super(...arguments),this.channel=1}}},33524(t,e,i){i.d(e,{Yf:()=>a,mt:()=>h,z5:()=>c});var r=i(91829),n=i(49255),s=i(90644);const o=(0,s.p3)(1,0,1,771);function a(t,e=!1,i=!1){if(i)return s.uR;switch(t){case 0:return e?s.RC:s.T8;case 1:return o;default:return null}}function c(t){if(t.draped)return null;switch(t.output){case 0:case 2:default:return t.writeDepth?s.Uy:null;case 1:return null}}function h(t,e=513){return{func:(0,n._$)(t)?515:e}}(0,r._Y)()},56133(t,e,i){var r=i(90644);const n=(0,r.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:0}),s=(0,r.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:7681}),o=(0,r.nk)(2,2,{compare:514,fail:7680,zFail:7680,zPass:7680}),a=(0,r.nk)(2,2,{compare:517,fail:7680,zFail:7680,zPass:7680});i.d(e,["Ax",0,s,"Q0",0,a,"cP",0,n,"iB",0,o,"m",0,{func:513},"r8",0,{mask:0},"sf",0,{func:519},"v0",0,{mask:255}])},58964(t,e,i){i.d(e,{Vh:()=>u,jP:()=>d,q6:()=>f});var r=i(90629),n=i(35522),s=i(51850),o=i(19419),a=i(11964),c=i(27921),h=i(48295);function l(t,e){return t.isRectangle?(0,o.Uc)(t.bounds,e):m(e,t.points)}function u(t,e,i,r){const n=Math.min(e[0],i[0],r[0]),s=Math.min(e[1],i[1],r[1]),a=Math.max(e[0],i[0],r[0]),c=Math.max(e[1],i[1],r[1]);if(!function(t,e){if(!(0,o.HY)(t.bounds,e))return!1;if(t.isRectangle)return!0;for(const i of t.points)if((0,o.Uc)(e,i))return!0;for(let i=0;i<4;i++)if(m(b(T,e,i),t.points))return!0;for(let i=0;i<t.points.length;i++){const r=t.points[i],n=i===t.points.length-1?t.points[0]:t.points[i+1];for(let t=0;t<4;t++)if(g(r,n,b(T,e,t),b(M,e,(t+1)%4)))return!0}return!1}(t,(0,o.fA)(n,s,a,c,w)))return!1;if(l(t,e)||l(t,i)||l(t,r))return!0;for(const n of t.points)if((0,h.cq)(e,i,r,n,D))return!0;for(let n=0;n<t.points.length;n++){const s=t.points[n],o=t.points[(n+1)%t.points.length];if(g(e,i,s,o)||g(i,r,s,o)||g(r,e,s,o))return!0}return!1}function d(t,e,i,r){const n=Math.min(e[0],i[0])-r,s=Math.min(e[1],i[1])-r,a=Math.max(e[0],i[0])+r,c=Math.max(e[1],i[1])+r;if(!(0,o.HY)(t.bounds,(0,o.fA)(n,s,a,c,w)))return!1;if(l(t,e)||l(t,i))return!0;const h=r*r;for(const r of t.points)if(v(r,e,i)<=h)return!0;for(let r=0;r<t.points.length;r++){const n=t.points[r],s=t.points[(r+1)%t.points.length];if(g(e,i,n,s)||_(e,i,n,s)<=h)return!0}return!1}function f(t,e,i,r,s){(0,n.C)(C,e),(0,n.C)(E,i);const o=t.projectToRenderScreen(C,A),h=t.projectToRenderScreen(E,S);if(null==o||null==h)return!1;const l=p(t,C),u=p(t,E);if(l&&u)return!1;if(l!==u){const e=l?C:E,i=l?o:h;if(!function(t,e,i){return function(t,e,i,r){return(0,c.T7)(t.frustum[4],(0,a.Cr)(e,i,I),r)}(t,e,i,e)}(t,e,l?E:C))return!1;if(!t.projectToRenderScreen(e,i))return!1}return r[0]=o[0],r[1]=o[1],r[2]=0,s[0]=h[0],s[1]=h[1],s[2]=0,!0}function p(t,e){return function(t,e){return(0,c.mN)(t.frustum[4],e)}(t,e)>0}function m(t,e){let i=!1;for(let r=0,n=e.length-1;r<e.length;n=r++){const s=e[r],o=e[n];if(s[1]>t[1]==o[1]>t[1])continue;const a=(o[0]-s[0])*(t[1]-s[1])/(o[1]-s[1])+s[0];t[0]<a&&(i=!i)}return i}function g(t,e,i,r){const n=y(t,e,i),s=y(t,e,r),o=y(i,r,t),a=y(i,r,e);return n!==s&&o!==a||0===n&&x(t,e,i)||0===s&&x(t,e,r)||0===o&&x(i,r,t)||0===a&&x(i,r,e)}function _(t,e,i,r){return g(t,e,i,r)?0:Math.min(v(t,i,r),v(e,i,r),v(i,t,e),v(r,t,e))}function v(t,e,i){return(0,a.kb)((0,a.Cr)((0,n.hZ)(C,e[0],e[1],0),(0,n.hZ)(E,i[0],i[1],0),I),(0,n.hZ)(R,t[0],t[1],0))}function y(t,e,i){const r=(e[1]-t[1])*(i[0]-e[0])-(e[0]-t[0])*(i[1]-e[1]);return Math.abs(r)<=D?0:Math.sign(r)}function x(t,e,i){return i[0]>=Math.min(t[0],e[0])-D&&i[0]<=Math.max(t[0],e[0])+D&&i[1]>=Math.min(t[1],e[1])-D&&i[1]<=Math.max(t[1],e[1])+D}function b(t,e,i){return t[0]=0===i||3===i?e[0]:e[2],t[1]=i<2?e[1]:e[3],t}const w=(0,o.vt)(),T=(0,r.gs)(),M=(0,r.gs)(),A=(0,r.r_)(),S=(0,r.r_)(),C=(0,s.vt)(),E=(0,s.vt)(),R=(0,s.vt)(),I=(0,a.vt)(),D=1e-9},75956(t,e,i){i.d(e,{IV:()=>d,MJ:()=>p,Uq:()=>f});var r=i(15142),n=i(90629),s=i(35522),o=i(51850),a=i(70328),c=i(82919),h=i(27921),l=i(48295),u=i(58964);class d{constructor(t){this.primitiveIndex=t}}class f{constructor(t){this.type=t,this.distance=Number.POSITIVE_INFINITY,this.primitiveIndex=0,this.hasNormal=!1,this.point=(0,o.vt)(),this.normal=(0,o.vt)()}reset(){this.distance=Number.POSITIVE_INFINITY,this.hasNormal=!1}update(t,e,i,r){this.distance=t,this.primitiveIndex=e,(0,s.C)(this.point,i),this.hasNormal=null!=r,null!=r&&(0,s.C)(this.normal,r)}updateIfCloserFromValues(t,e,i,r){t<this.distance&&this.update(t,e,i,r)}updateIfCloser(t){const{distance:e,primitiveIndex:i,point:r,normal:n}=t;this.updateIfCloserFromValues(e,i,r,t.hasNormal?n:null)}get valid(){return Number.isFinite(this.distance)}}function p(t,e,i,r,n){if(!t.visible||0!==t.type)return null;const s=new f(4);let o;o=t.boundingInfo?g(t.readPrimitivePosition,t.boundingInfo,e,i,r,n):m(e,i,r,0,t.faceCount,t.readPrimitivePosition,n,null,0);for(const t of o)s.updateIfCloser(t);return s.valid?s:null}function*m(t,e,i,r,n,o,a,c=null,u=0){if(null==t.camera)return;const{camera:d,screenPolygonPrimitiveProcessor:f}=t;for(let t=r;t<n;++t){const r=(c?.[t]??t)+u,n=null==c?r:t,p=3*r;_(b[0],o,p+0,a,n,e),_(b[1],o,p+1,a,n,e),_(b[2],o,p+2,a,n,e);const m=A;let g;C.reset();const x=w;for(const t of f.processTriangle(b))if(x.length=0,(0,h.H)(d.frustum[4],t,()=>x.pushNew(),!1),!(x.length<3)){for(let t=0;t<x.length;t++)d.projectToScreen(x.at(t),T[t]);v(i,T,x.length)&&(y(d.eye,x,M),null==g&&(g=(0,l.rb)(A,b[0],b[1],b[2])),C.updateIfCloserFromValues((0,s.Io)(d.eye,M),r,M,g?m:null))}C.valid&&(yield C)}}function*g(t,e,i,r,n,s){let o;if(null!=s?((0,a.C)(x,e.box),s.applyToAabb(x),o=(0,c.GH)(n.broadPhaseFrustum,x,r)):o=(0,c.GH)(n.broadPhaseFrustum,e.box,r),!o)return;const{primitiveIndices:h}=e,l=h.length;if(l>1e3){const o=e.children;if(void 0!==o){for(const e of o)yield*g(t,e,i,r,n,s);return}}yield*m(i,r,n,0,l,t,s,h,0)}function _(t,e,i,r,n,o){const[a,c,h]=e(t,i);null!=r?r.applyToVertex(t,a,c,h,n):(0,s.hZ)(t,a,c,h),o&&(0,s.Z0)(t,t,o)}function v(t,e,i){for(let r=1;r<i-1;r++)if((0,u.Vh)(t,e[0],e[r],e[r+1]))return!0;return!1}function y(t,e,i){let r=Number.POSITIVE_INFINITY;const n=e.at(0);for(let o=1;o<e.length-1;o++){(0,l.k3)(S,t,n,e.at(o),e.at(o+1));const a=(0,s.hG)(t,S);a<r&&(r=a,(0,s.C)(i,S))}}const x=(0,a.vt)(),b=[(0,o.vt)(),(0,o.vt)(),(0,o.vt)()],w=new r.A({allocator:t=>t??(0,o.vt)()}),T=Array.from({length:12},()=>(0,n.gs)()),M=(0,o.vt)(),A=(0,o.vt)(),S=(0,o.vt)(),C=new f(4)},77194(t,e,i){i.d(e,{PS:()=>n}),i(44208);var r=i(34727);class n{constructor(){this._scale=0,this._angleFactor=0,this._minScale=0}update(t,e,i,r){i?(this._scale=Math.min(i.divisor/(e-i.offset),1),this._angleFactor=function(t){return Math.abs(t)**3}(t),this._minScale=null!=r?Math.min(i.minPixelSize/r,1):0):(this._scale=1,this._minScale=1,this._angleFactor=1)}apply(t){const{_scale:e,_angleFactor:i,_minScale:n}=this;return t*(0,r.qE)((0,r.Cc)(e,1,i),n,1)}applyVec2(t,e){t[0]=this.apply(e[0]),t[1]=this.apply(e[1])}}},78988(t,e,i){i.d(e,{Mv:()=>n,vM:()=>s});var r=i(49186);function n(t,e){return e=16*Math.floor(e/16),Math.min(16*Math.round(t/16),e)}function s(t,e){const[i,r]=o(t,e);return t.width===i&&t.height===r?t:a(t,i,r)}function o({width:t,height:e},{maxPreferredTexturePixels:i,maxTextureSize:r}){const s=Math.max(t,e),o=t*e;if(s<=r&&o<=i)return[t,e];const a=Math.min(Math.sqrt(i/o),r/s);return[n(Math.round(t*a),r),n(Math.round(e*a),r)]}function a(t,e,i){if(t instanceof ImageData)return a(function(t){const e=document.createElement("canvas");e.width=t.width,e.height=t.height;const i=e.getContext("2d");if(null==i)throw new r.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return i.putImageData(t,0,0),e}(t),e,i);const n=document.createElement("canvas");return n.width=e,n.height=i,n.getContext("2d").drawImage(t,0,0,n.width,n.height),n}},16396(t,e,i){i.d(e,{ou:()=>c}),i(77690),i(29242),i(58083),i(9093);var r=i(35522),n=i(51850),s=i(94008),o=i(57005);const a=new class{constructor(t=0){this.offset=t,this._tmpSphere=new s.iy}applyToVertex(t,e,i,n){const s=this.objectTransform.transform,o=(0,r.hZ)(h,e,i,n),a=(0,r.Z0)(o,o,s),c=this.offset/(0,r.Bw)(a);(0,r.Ln)(a,a,a,c);const l=this.objectTransform.inverse;return(0,r.Z0)(t,a,l),t}applyToMinMax(t,e){const i=this.offset/(0,r.Bw)(t);(0,r.Ln)(t,t,t,i);const n=this.offset/(0,r.Bw)(e);(0,r.Ln)(e,e,e,n)}applyToAabb(t){const e=this.offset/Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]+=t[0]*e,t[1]+=t[1]*e,t[2]+=t[2]*e;const i=this.offset/Math.sqrt(t[3]*t[3]+t[4]*t[4]+t[5]*t[5]);return t[3]+=t[3]*i,t[4]+=t[4]*i,t[5]+=t[5]*i,t}applyToBoundingSphere(t){const e=t.center,i=(0,r.Bw)(e),n=this.offset/i;return(0,r.Ln)(this._tmpSphere.center,e,e,n),this._tmpSphere.radius=t.radius+t.radius*this.offset/i,this._tmpSphere}};function c(t){return null!=t?(a.offset=t,a):null}new class{constructor(t=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpMbs=new s.iy,this._tmpObb=new o.ab,this._resetOffset(t)}_resetOffset(t){this._offset=t,this._totalOffset=t}set offset(t){this._resetOffset(t)}get offset(){return this._offset}set componentOffset(t){this._totalOffset=this._offset+t}set localOrigin(t){this.componentLocalOriginLength=(0,r.Bw)(t)}applyToVertex(t,e,i,n){const s=(0,r.hZ)(h,e,i,n),o=(0,r.hZ)(l,e,i,n+this.componentLocalOriginLength),a=this._totalOffset/(0,r.Bw)(o);return(0,r.Ln)(t,s,o,a),t}applyToAabb(t){const e=this.componentLocalOriginLength,i=t[0],r=t[1],n=t[2]+e,s=t[3],o=t[4],a=t[5]+e,c=Math.abs(i),h=Math.abs(r),l=Math.abs(n),u=Math.abs(s),d=Math.abs(o),f=Math.abs(a),p=.5*(1+Math.sign(i*s))*Math.min(c,u),m=.5*(1+Math.sign(r*o))*Math.min(h,d),g=.5*(1+Math.sign(n*a))*Math.min(l,f),_=Math.sqrt(p*p+m*m+g*g),v=Math.sign(c+i),y=Math.sign(h+r),x=Math.sign(l+n),b=Math.sign(u+s),w=Math.sign(d+o),T=Math.sign(f+a),M=this._totalOffset;if(_<M)return t[0]-=(1-v)*M,t[1]-=(1-y)*M,t[2]-=(1-x)*M,t[3]+=b*M,t[4]+=w*M,t[5]+=T*M,t;const A=Math.max(c,u),S=Math.max(h,d),C=Math.max(l,f),E=M/Math.sqrt(A*A+S*S+C*C),R=M/_,I=R-E,D=-I;return t[0]+=i*(v*D+R),t[1]+=r*(y*D+R),t[2]+=n*(x*D+R),t[3]+=s*(b*I+E),t[4]+=o*(w*I+E),t[5]+=a*(T*I+E),t}applyToMbs(t){const e=t.center,i=(0,r.Bw)(e),n=this._totalOffset/i;return(0,r.Ln)(this._tmpMbs.center,e,e,n),this._tmpMbs.radius=t.radius+t.radius*this._totalOffset/i,this._tmpMbs}applyToObb(t){return(0,o.gm)(t,this._totalOffset,this._totalOffset,1,this._tmpObb),this._tmpObb}},new class{constructor(t=0){this.offset=t,this._tmpVertex=(0,n.vt)()}applyToVertex(t,e,i,n){const s=(0,r.hZ)(h,e,i,n),o=(0,r.WQ)(l,s,this.localOrigin),a=this.offset/(0,r.Bw)(o);return(0,r.Ln)(t,s,o,a),t}applyToAabb(t){const e=u,i=d,r=f;for(let n=0;n<3;++n)e[n]=t[0+n]+this.localOrigin[n],i[n]=t[3+n]+this.localOrigin[n],r[n]=e[n];const n=this.applyToVertex(this._tmpVertex,e[0],e[1],e[2]);for(let e=0;e<3;++e)t[e]=n[e],t[e+3]=n[e];const s=e=>{const i=this.applyToVertex(this._tmpVertex,e[0],e[1],e[2]);for(let e=0;e<3;++e)t[e]=Math.min(t[e],i[e]),t[e+3]=Math.max(t[e+3],i[e])};for(let t=1;t<8;++t){for(let n=0;n<3;++n)r[n]=t&1<<n?i[n]:e[n];s(r)}let o=0;for(let t=0;t<3;++t)e[t]*i[t]<0&&(o|=1<<t);if(0!==o&&7!==o)for(let t=0;t<8;++t)if(0===(o&t)){for(let n=0;n<3;++n)r[n]=o&1<<n?0:t&1<<n?e[n]:i[n];s(r)}for(let e=0;e<3;++e)t[e]-=this.localOrigin[e],t[e+3]-=this.localOrigin[e];return t}};const h=(0,n.vt)(),l=(0,n.vt)(),u=(0,n.vt)(),d=(0,n.vt)(),f=(0,n.vt)()},75497(t,e,i){i.d(e,{$p:()=>s,Qx:()=>o,e_:()=>a});var r=i(51850),n=i(37957);class s{constructor(t=(0,r.Ul)()){this.intensity=t}}class o{constructor(t=(0,r.Ul)(),e=(0,r.fA)(.57735,.57735,.57735),i=!0,n=1,s=1){this.intensity=t,this.direction=e,this.castShadows=i,this.specularStrength=n,this.environmentStrength=s}}class a{constructor(){this.r=n.P.create(),this.g=n.P.create(),this.b=n.P.create()}clear(){this.r.fill(0),this.g.fill(0),this.b.fill(0)}}},57226(t,e,i){i.d(e,{T:()=>y});var r=i(34727),n=i(35522),s=i(51850),o=i(75497);function a(t,e,i){i.length=t.length;for(let r=0;r<t.length;r++)i[r]=t[r]*e;return i}function c(t,e,i){(i=i||t).length=t.length;for(let r=0;r<t.length;r++)i[r]=t[r]+e[r];return i}var h=i(37957);const l=.28209479177;function u(t,e){(0,n.ze)(m,t.direction),function(t,e){const i=t[0],r=t[1],n=t[2],s=e||h.P.create();s[0]=l,s[1]=.4886025119*i,s[2]=.4886025119*n,s[3]=.4886025119*r,s[4]=1.09254843059*i*r,s[5]=1.09254843059*r*n,s[6]=.31539156525*(3*n*n-1),s[7]=1.09254843059*i*n,s[8]=.54627421529*(i*i-r*r)}(m,f),function(t,e,i){(i=i||t).length=t.length;for(let r=0;r<t.length;r++)i[r]=t[r]*e[r]}(f,g),a(f,t.intensity[0],p),c(e.r,p),a(f,t.intensity[1],p),c(e.g,p),a(f,t.intensity[2],p),c(e.b,p)}function d(t,e){e.r[0]+=l*g[0]*t.intensity[0]*4*Math.PI,e.g[0]+=l*g[0]*t.intensity[1]*4*Math.PI,e.b[0]+=l*g[0]*t.intensity[2]*4*Math.PI}const f=h.P.create(),p=h.P.create(),m=(0,s.vt)(),g=[3.141593,2.094395,2.094395,2.094395,.785398,.785398,.785398,.785398,.785398];class _{constructor(){this.color=(0,s.vt)(),this.intensity=1}}class v{constructor(){this.direction=(0,s.vt)(),this.ambient=new _,this.diffuse=new _}}class y{constructor(){this._legacy=new v,this.globalFactor=.5,this.noonFactor=.5,this._sphericalHarmonics=new o.e_,this._mainLight=new o.Qx((0,s.vt)(),(0,s.fA)(1,0,0),!1)}get legacy(){return this._legacy}get sh(){return this._sphericalHarmonics}get mainLight(){return this._mainLight}set(t){(function(t,e,i){var r;i.clear(),(0,n.hZ)(e.intensity,0,0,0),r=t,Array.isArray(r)?Array.isArray(t)&&((0,n.C)(e.direction,t[0].direction),(0,n.C)(e.intensity,t[0].intensity),e.specularStrength=t[0].specularStrength,e.environmentStrength=t[0].environmentStrength,e.castShadows=t[0].castShadows,u(t[2],i),d(t[1],i)):d(t,i)})(t,this._mainLight,this._sphericalHarmonics),this.updateLegacy()}updateLegacy(){(0,n.C)(this._legacy.direction,this._mainLight.direction);const t=1/Math.PI;this._legacy.ambient.color[0]=.282095*this._sphericalHarmonics.r[0]*t,this._legacy.ambient.color[1]=.282095*this._sphericalHarmonics.g[0]*t,this._legacy.ambient.color[2]=.282095*this._sphericalHarmonics.b[0]*t,(0,n.hs)(this._legacy.diffuse.color,this._mainLight.intensity,t),(0,n.C)(x,this._legacy.diffuse.color),(0,n.hs)(x,x,.4*this.globalFactor),(0,n.WQ)(this._legacy.ambient.color,this._legacy.ambient.color,x)}copyFrom(t){h.P.copy(this._sphericalHarmonics.r,t.sh.r),h.P.copy(this._sphericalHarmonics.g,t.sh.g),h.P.copy(this._sphericalHarmonics.b,t.sh.b),(0,n.C)(this._mainLight.direction,t.mainLight.direction),(0,n.C)(this._mainLight.intensity,t.mainLight.intensity),this._mainLight.castShadows=t.mainLight.castShadows,this._mainLight.specularStrength=t.mainLight.specularStrength,this._mainLight.environmentStrength=t.mainLight.environmentStrength,this.globalFactor=t.globalFactor,this.noonFactor=t.noonFactor}lerpLighting(t,e,i){if((0,n.Cc)(this._mainLight.intensity,t.mainLight.intensity,e.mainLight.intensity,i),this._mainLight.environmentStrength=(0,r.Cc)(t.mainLight.environmentStrength,e.mainLight.environmentStrength,i),this._mainLight.specularStrength=(0,r.Cc)(t.mainLight.specularStrength,e.mainLight.specularStrength,i),(0,n.C)(this._mainLight.direction,e.mainLight.direction),this._mainLight.castShadows=e.mainLight.castShadows,this.globalFactor=(0,r.Cc)(t.globalFactor,e.globalFactor,i),this.noonFactor=(0,r.Cc)(t.noonFactor,e.noonFactor,i),t.sh.r.length===e.sh.r.length)for(let n=0;n<e.sh.r.length;n++)this._sphericalHarmonics.r[n]=(0,r.Cc)(t.sh.r[n],e.sh.r[n],i),this._sphericalHarmonics.g[n]=(0,r.Cc)(t.sh.g[n],e.sh.g[n],i),this._sphericalHarmonics.b[n]=(0,r.Cc)(t.sh.b[n],e.sh.b[n],i);else for(let t=0;t<e.sh.r.length;t++)this._sphericalHarmonics.r[t]=e.sh.r[t],this._sphericalHarmonics.g[t]=e.sh.g[t],this._sphericalHarmonics.b[t]=e.sh.b[t];this.updateLegacy()}}const x=(0,s.vt)()},33442(t,e,i){i.d(e,{T:()=>u,s:()=>h});var r=i(49255);const n=l(-1),s=l(1),o=n,a=new Array;a[0]=null,a[1]=s,a[2]=n,a[3]=l(-2),a[4]=l(-3);const c=a.map(t=>function(t,e){return e?{factor:t.factor+e.factor,units:t.units+e.units}:t}(o,t));function h({output:t,enableOITOffset:e,polygonOffset:i}){return(0,r._$)(t)&&e?c[i]:a[i]}function l(t){return{factor:1*t,units:2*t}}function u(t){const e=h(t)??{factor:0,units:0};return{factor:e.factor+n.factor*t.polygonOffsetIndex,units:e.units+n.units*t.polygonOffsetIndex}}a[1]=s},47724(t,e,i){i.d(e,{L:()=>a});var r=i(5482),n=i(51976),s=i(34711);class o extends s.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,r.Cg)([(0,n.W)()],o.prototype,"hasHighlightMixTexture",void 0),(0,r.Cg)([(0,n.W)()],o.prototype,"emissionDimmingPass",void 0);class a extends o{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}(0,r.Cg)([(0,n.W)({count:5})],a.prototype,"polygonOffset",void 0),(0,r.Cg)([(0,n.W)()],a.prototype,"transparent",void 0),(0,r.Cg)([(0,n.W)()],a.prototype,"enableOITOffset",void 0)},46606(t,e,i){i.d(e,{S:()=>a,p:()=>c}),i(34727),i(77690),i(29242),i(58083);var r=i(9093),n=(i(35522),i(51850)),s=(i(78955),i(91829),i(31756),i(26857),i(16943),i(65786));class o extends s.Y{constructor(t){super(),this.vvSize=t?.size??null,this.vvColor=t?.color??null,this.vvOpacity=t?.opacity??null}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}(0,r.vt)(),(0,n.vt)(),(0,r.vt)();class a extends o{constructor(){super(...arguments),this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}}const c=8},43616(t,e,i){i.d(e,{MB:()=>c,kE:()=>o});var r=i(4576),n=i(34727),s=i(77194);function o(t,e,i,r,s,o){let a=i.screenLength*t.pixelRatio;null!=s&&(h.update(r,e,s,o),a=h.apply(a));const c=a*Math.tan(.5*t.fovY)/(.5*t.fullHeight);return(0,n.qE)(c*e,i.minWorldLength,i.maxWorldLength)}const a=(0,r.VO)();function c(t,e){let i=!1;for(const r in e){const n=e[r];void 0!==n&&(Array.isArray(n)?Array.isArray(t[r])&&a(n,t[r])||(t[r]=n.slice(),i=!0):t[r]!==n&&(i=!0,t[r]=n))}return i}const h=new s.PS;i.d(e,["Um",0,{multiply:1,ignore:2,replace:3,tint:4}])},59907(t,e,i){i.d(e,{vJ:()=>l,vx:()=>h}),i(35522);var r=i(51850),n=i(58083),s=i(13030),o=i(620);function a(t,e,i){const{data:r,indices:n}=t,s=e.typedBuffer,o=e.typedBufferStride,a=n.length;i*=o;for(let t=0;t<a;++t){const e=2*n[t];s[i]=r[e],s[i+1]=r[e+1],i+=o}}function c(t,e,i,r=1){const{data:n,indices:s}=t,o=e.typedBuffer,a=e.typedBufferStride,c=s.length;if(i*=a,1===r)for(let t=0;t<c;++t){const e=3*s[t];o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],i+=a}else for(let t=0;t<c;++t){const e=3*s[t];for(let t=0;t<r;++t)o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],i+=a}}function h(t,e,i,r,n=1){const s=e.typedBuffer,o=e.typedBufferStride;if(r*=o,1===n)for(let e=0;e<i;++e)s[r]=t[0],s[r+1]=t[1],s[r+2]=t[2],s[r+3]=t[3],r+=o;else for(let e=0;e<i;++e)for(let e=0;e<n;++e)s[r]=t[0],s[r+1]=t[1],s[r+2]=t[2],s[r+3]=t[3],r+=o}function l(t,e,i,r,n,o){const{buffer:a,offset:c}=o;for(const o of i.fields.keys()){const i=t.get(o),l=i?.indices;if(i&&l)u(o,i,r,n,a,c);else if("olidColor"===o&&null!=e){const i=t.get("position")?.indices;if(i){const t=i.length;h(e,a.getField(o,s.XP),t,c)}}}}function u(t,e,i,r,h,l){switch(t){case"position":{(0,o.vA)(3===e.size);const r=h.getField(t,s.xs);(0,o.vA)(!!r,`No buffer view for ${t}`),function(t,e,i,r,s=1){if(!e)return void c(t,i,r,s);const{data:o,indices:a}=t,h=i.typedBuffer,l=i.typedBufferStride,u=a.length,d=e[0],f=e[1],p=e[2],m=e[4],g=e[5],_=e[6],v=e[8],y=e[9],x=e[10],b=e[12],w=e[13],T=e[14];r*=l;let M=0,A=0,S=0;const C=(0,n.tZ)(e)?t=>{M=o[t]+b,A=o[t+1]+w,S=o[t+2]+T}:t=>{const e=o[t],i=o[t+1],r=o[t+2];M=d*e+m*i+v*r+b,A=f*e+g*i+y*r+w,S=p*e+_*i+x*r+T};if(1===s)for(let t=0;t<u;++t)C(3*a[t]),h[r]=M,h[r+1]=A,h[r+2]=S,r+=l;else for(let t=0;t<u;++t){C(3*a[t]);for(let t=0;t<s;++t)h[r]=M,h[r+1]=A,h[r+2]=S,r+=l}}(e,i,r,l);break}case"normal":{(0,o.vA)(3===e.size);const i=h.getField(t,s.xs);(0,o.vA)(!!i,`No buffer view for ${t}`),function(t,e,i,r,s=1){if(!e)return void c(t,i,r,s);const{data:o,indices:a}=t,h=e,l=i.typedBuffer,u=i.typedBufferStride,d=a.length,f=h[0],p=h[1],m=h[2],g=h[4],_=h[5],v=h[6],y=h[8],x=h[9],b=h[10],w=!(0,n.ut)(h),T=1e-6,M=1-T;r*=u;let A=0,S=0,C=0;const E=(0,n.tZ)(h)?t=>{A=o[t],S=o[t+1],C=o[t+2]}:t=>{const e=o[t],i=o[t+1],r=o[t+2];A=f*e+g*i+y*r,S=p*e+_*i+x*r,C=m*e+v*i+b*r};if(1===s)if(w)for(let t=0;t<d;++t){E(3*a[t]);const e=A*A+S*S+C*C;if(e<M&&e>T){const t=1/Math.sqrt(e);l[r]=A*t,l[r+1]=S*t,l[r+2]=C*t}else l[r]=A,l[r+1]=S,l[r+2]=C;r+=u}else for(let t=0;t<d;++t)E(3*a[t]),l[r]=A,l[r+1]=S,l[r+2]=C,r+=u;else for(let t=0;t<d;++t){if(E(3*a[t]),w){const t=A*A+S*S+C*C;if(t<M&&t>T){const e=1/Math.sqrt(t);A*=e,S*=e,C*=e}}for(let t=0;t<s;++t)l[r]=A,l[r+1]=S,l[r+2]=C,r+=u}}(e,r,i,l);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,o.vA)(2===e.size);const i=h.getField(t,s.mJ);(0,o.vA)(!!i,`No buffer view for ${t}`),a(e,i,l);break}case"uv0":{(0,o.vA)(2===e.size);const i=h.getField(t,s.ZD)??h.getField(t,s.gH);(0,o.vA)(!!i,`No buffer view for ${t}`),a(e,i,l);break}case"uvi":{(0,o.vA)(2===e.size);const i=h.getField(t,s.mJ);(0,o.vA)(!!i,`No buffer view for ${t}`),a(e,i,l);break}case"color":case"symbolColor":{const i=h.getField(t,s.XP);(0,o.vA)(!!i,`No buffer view for ${t}`),(0,o.vA)(3===e.size||4===e.size),function(t,e,i,r,n=1){const{data:s,indices:o}=t,a=i.typedBuffer,c=i.typedBufferStride,h=o.length;if(r*=c,e===s.length&&4===e){a[r]=s[0],a[r+1]=s[1],a[r+2]=s[2],a[r+3]=s[3];const t=new Uint32Array(i.typedBuffer.buffer,i.start),e=c/4,o=t[r/=4];r+=e;const l=h*n;for(let i=1;i<l;++i)t[r]=o,r+=e;return}if(1!==n)if(4!==e)for(let t=0;t<h;++t){const e=3*o[t];for(let t=0;t<n;++t)a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=255,r+=c}else for(let t=0;t<h;++t){const e=4*o[t];for(let t=0;t<n;++t)a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=s[e+3],r+=c}else{if(4===e){for(let t=0;t<h;++t){const e=4*o[t];a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=s[e+3],r+=c}return}for(let t=0;t<h;++t){const e=3*o[t];a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=255,r+=c}}}(e,e.size,i,l);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const i=h.getField(t,s.Y$)??h.getField(t,s.Y$);(0,o.vA)(!!i,`No buffer view for ${t}`),(0,o.vA)(1===e.size),function(t,e,i){const{data:r,indices:n}=t,s=e.typedBuffer,o=e.typedBufferStride,a=n.length,c=r[0];i*=o;for(let t=0;t<a;++t)s[i]=c,i+=o}(e,i,l);break}case"tangent":{(0,o.vA)(4===e.size);const r=h.getField(t,s.Eq);(0,o.vA)(!!r,`No buffer view for ${t}`),function(t,e,i,r,s=1){if(!e)return void function(t,e,i,r=1){const{data:n,indices:s}=t,o=e.typedBuffer,a=e.typedBufferStride,c=s.length;if(i*=a,1===r)for(let t=0;t<c;++t){const e=4*s[t];o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],o[i+3]=n[e+3],i+=a}else for(let t=0;t<c;++t){const e=4*s[t];for(let t=0;t<r;++t)o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],o[i+3]=n[e+3],i+=a}}(t,i,r,s);const{data:o,indices:a}=t,c=e,h=i.typedBuffer,l=i.typedBufferStride,u=a.length,d=c[0],f=c[1],p=c[2],m=c[4],g=c[5],_=c[6],v=c[8],y=c[9],x=c[10],b=!(0,n.ut)(c),w=1e-6,T=1-w;if(r*=l,1===s)for(let t=0;t<u;++t){const e=4*a[t],i=o[e],n=o[e+1],s=o[e+2],c=o[e+3];let u=d*i+m*n+v*s,M=f*i+g*n+y*s,A=p*i+_*n+x*s;if(b){const t=u*u+M*M+A*A;if(t<T&&t>w){const e=1/Math.sqrt(t);u*=e,M*=e,A*=e}}h[r]=u,h[r+1]=M,h[r+2]=A,h[r+3]=c,r+=l}else for(let t=0;t<u;++t){const e=4*a[t],i=o[e],n=o[e+1],c=o[e+2],u=o[e+3];let M=d*i+m*n+v*c,A=f*i+g*n+y*c,S=p*i+_*n+x*c;if(b){const t=M*M+A*A+S*S;if(t<T&&t>w){const e=1/Math.sqrt(t);M*=e,A*=e,S*=e}}for(let t=0;t<s;++t)h[r]=M,h[r+1]=A,h[r+2]=S,h[r+3]=u,r+=l}}(e,i,r,l);break}}}(0,r.vt)()},47630(t,e,i){i.d(e,{D:()=>d});var r=i(49255),n=i(47187),s=i(3871),o=i(63365);function a(t){t.code.add("\n vec3 emissionFilter(in vec3 srcColor, float srcAlpha) {\n vec3 color = min(srcColor + vec3(1.0 - srcAlpha), 1.0);\n float m = max(color.r, max(color.g, color.b));\n return m > 0.0 ? color / m : vec3(1.0);\n }\n ")}var c=i(31821),h=i(26934),l=i(58243),u=i(72458);function d(t,e){t.include(s.Q,e),t.include(n.zp,e);const{fragment:i,outputs:d}=t;i.include(o.a);const{output:f,hasEmission:p,oitPremultipliedAlpha:m,snowCover:g,emissionDimmingPass:_,renderOccluded:v}=e,y=11===f,x=(0,r._$)(f),b=(0,r.Rb)(f),w=(0,r._o)(f)&&!x,T=0!==f||v;let M=0;(w||x)&&d.add("fragColor","vec4",M++),x&&d.add("fragAlpha","float",M++),p&&d.add("fragEmission","vec4",M++),i.include(o.a),i.include(h.Q),i.include(u.O,e),i.include(l.t,e),_&&i.include(a),i.code.add(c.H`
|
|
244
|
+
}`)}function c(t){t.uniforms.add(new s.t("screenSizePerspective",t=>l(t.screenSizePerspective,t.screenSizePerspectiveMinPixelReferenceSize)))}function h(t){t.uniforms.add(new s.t("screenSizePerspectiveAlignment",t=>l(t.screenSizePerspectiveAlignment||t.screenSizePerspective,t.screenSizePerspectiveAlignment?null:t.screenSizePerspectiveMinPixelReferenceSize)))}function l(t,e){const i=null!=e&&null!=t?Math.min(t.minPixelSize/e,1):0;return t?(0,r.hZ)(u,t.divisor,t.offset,i):(0,r.hZ)(u,0,0,0)}const u=(0,n.vt)()},77949(t,e,i){i.d(e,{NB:()=>f,Nz:()=>_,S7:()=>g,yu:()=>d});var r=i(58083),n=i(9093),s=i(35522),o=i(51850),a=i(23205),c=i(40710),h=i(33094),l=i(58029),u=i(97102);function d(t,e){e.instancedDoublePrecision?t.constants.add("cameraPosition","vec3",o.uY):t.uniforms.add(new c.W("cameraPosition",(t,e)=>(0,s.hZ)(m,e.camera.viewInverseTransposeMatrix[3]-t.origin[0],e.camera.viewInverseTransposeMatrix[7]-t.origin[1],e.camera.viewInverseTransposeMatrix[11]-t.origin[2])))}function f(t,e){if(!e.instancedDoublePrecision)return void t.uniforms.add(new l.F("proj",t=>t.camera.projectionMatrix),new u.S("view",(t,e)=>(0,r.Tl)(p,e.camera.viewMatrix,t.origin)),new c.W("localOrigin",t=>t.origin));const i=({camera:t})=>(0,s.hZ)(m,t.viewInverseTransposeMatrix[3],t.viewInverseTransposeMatrix[7],t.viewInverseTransposeMatrix[11]);t.uniforms.add(new l.F("proj",t=>t.camera.projectionMatrix),new l.F("view",t=>(0,r.Tl)(p,t.camera.viewMatrix,i(t))),new a.d("localOrigin",t=>i(t)))}const p=(0,n.vt)(),m=(0,o.vt)();function g(t){t.uniforms.add(new l.F("viewNormal",t=>t.camera.viewInverseTransposeMatrix))}function _(t){t.uniforms.add(new h.U("pixelRatio",t=>t.camera.pixelRatio/t.overlayStretch))}},77108(t,e,i){i.d(e,{E:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec2",0,(r,n)=>r.setUniform2fv(t,e(n),i))}}},68259(t,e,i){i.d(e,{t:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec2",2,(r,n,s,o)=>r.setUniform2fv(t,e(n,s,o),i))}}},47286(t,e,i){i.d(e,{G:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec2",1,(r,n,s)=>r.setUniform2fv(t,e(n,s),i))}}},23205(t,e,i){i.d(e,{d:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec3",0,(r,n)=>r.setUniform3fv(t,e(n),i))}}},14314(t,e,i){i.d(e,{I:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec4",0,(r,n)=>r.setUniform4fv(t,e(n),i))}}},71988(t,e,i){i.d(e,{E:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec4",1,(r,n,s)=>r.setUniform4fv(t,e(n,s),i))}}},33094(t,e,i){i.d(e,{U:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"float",0,(r,n)=>r.setUniform1f(t,e(n),i))}}},44887(t,e,i){i.d(e,{x:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i,r){super(t,"float",1,(e,n,s)=>e.setUniform1fv(t,i(n,s),r),e)}}},35818(t,e,i){i.d(e,{W:()=>n});var r=i(74333);class n extends r.n{constructor(t,e){super(t,"int",0,(i,r)=>i.setUniform1i(t,e(r)))}}},93588(t,e,i){i.d(e,{c:()=>n});var r=i(74333);class n extends r.n{constructor(t,e){super(t,"int",1,(i,r,n)=>i.setUniform1i(t,e(r,n)))}}},35644(t,e,i){i.d(e,{k:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"mat3",1,(r,n,s)=>r.setUniformMatrix3fv(t,e(n,s),i))}}},58029(t,e,i){i.d(e,{F:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"mat4",0,(r,n)=>r.setUniformMatrix4fv(t,e(n),i))}}},97102(t,e,i){i.d(e,{S:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"mat4",2,(r,n,s)=>r.setUniformMatrix4fv(t,e(n,s),i))}}},12791(t,e,i){i.d(e,{x:()=>n});var r=i(74333);class n extends r.n{constructor(t,e){super(t,"sampler2D",0,(i,r)=>i.bindTexture(t,e(r)))}}},13840(t,e,i){i.d(e,{r:()=>r});class r{constructor(t,e){this._module=t,this._load=e}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},98958(t,e,i){i.d(e,{w:()=>p});var r=i(5482),n=i(69622),s=i(53966),o=i(91429),a=i(41976),c=(i(44208),i(26857)),h=i(94656);class l{constructor(t,e,i){this._context=t,this.locations=i,this._textures=new Map,this.source=(0,h.en)()?e:null,e.attributeNames.forEach(t=>{i.has(t)||s.A.getLogger("esri.views.3d.webgl-engine.lib.Program").error(`Missing VertexAttributeLocation for ${t} used in shader`)}),this._glProgram=t.programCache.get(e.generate("vertex",!0),e.generate("fragment",!0),i),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bind=e.generateBind(this),this.bindPass=e.generateBindPass(this),this.bindDraw=e.generateBindDraw(this)}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(t,e){this._glProgram.setUniform1i(t,e?1:0)}setUniform1i(t,e){this._glProgram.setUniform1i(t,e)}setUniform1f(t,e,i){this._glProgram.setUniform1f(t,e,i)}setUniform2fv(t,e,i){this._glProgram.setUniform2fv(t,e,i)}setUniform3fv(t,e,i){this._glProgram.setUniform3fv(t,e,i)}setUniform4fv(t,e,i){this._glProgram.setUniform4fv(t,e,i)}setUniformMatrix3fv(t,e,i){this._glProgram.setUniformMatrix3fv(t,e,!1,i)}setUniformMatrix4fv(t,e,i){this._glProgram.setUniformMatrix4fv(t,e,!1,i)}setUniformMatrices4fv(t,e,i){this._glProgram.setUniformMatrices4fv(t,e,!1,i)}setUniform1fv(t,e,i){this._glProgram.setUniform1fv(t,e,i)}setUniform1iv(t,e){this._glProgram.setUniform1iv(t,e)}setUniform2iv(t,e){this._glProgram.setUniform2iv(t,e)}setUniform3iv(t,e){this._glProgram.setUniform3iv(t,e)}setUniform4iv(t,e){this._glProgram.setUniform4iv(t,e)}assertCompatibleVertexAttributeLocations(t,e){if(c.b.ENABLE_OPTIMIZATIONS)return;let i=t.locations;if(e){const t=new Map(i);e.forEach((e,r)=>t.set(r,i.size+e)),i=t}i.size!==this.locations.size&&console.error(`VertexAttributeLocations are incompatible: ${i}, ${this.locations}`),this.locations.forEach((t,e)=>{i.get(e)!==t&&console.error(`VertexAttributeLocations are incompatible: Program has ${e} at position ${t}, VAO has it at position ${i.get(e)}.`)})}stop(){this._textures.clear()}bindTexture(t,e,i){if(!e?.glName){const i=`Texture sampler ${t} in ${this._context.debugBoundTechnique} has no given Texture in ${(new Error).stack}`;(0,h.en)()&&console.error(i),e=this._context.emptyTexture}const r=this._ensureTextureUnit(t,e);this._context.useProgram(this);const n=r.unit;this.setUniform1i(t,n),this._context.bindTexture(e,n,!1,i)}_ensureTextureUnit(t,e){let i=this._textures.get(t);return null==i?(i={texture:e,unit:this._textures.size},this._textures.set(t,i)):i.texture=e,i}}var u=i(63907),d=i(90644),f=i(85079);let p=class extends n.A{constructor(t,e,i){super({}),this._context=t,this._configuration=e,this.primitiveType=u.WR.TRIANGLES,this._unused=!0,this.ignoreUnused=!1,this.key=e.key,this.locations=(0,f.Xk)(i??a.lK),this._pipeline=this.initializePipeline(e),this.reload=async i=>{if(i&&await this.shader.reload(),!this.key.equals(e.key))return void s.A.getLogger("esri.views.3d.webgl.ShaderTechnique").warn(`Configuration was changed after construction, cannot reload shader for ${this.declaredClass}.`);const r=this.shader.get().build(e);r.debugName=this.declaredClass,this._program=new l(t.rctx,r,this.locations),this._pipeline=this.initializePipeline(e)}}initialize(){const t=this.shader.get().build(this._configuration);t.debugName=this.declaredClass,this._program=new l(this._context.rctx,t,this.locations)}get program(){return this._unused=!1,this._program}get compiled(){return this._unused=!1,this.program.compiled}get unused(){return this._unused}ensureAttributeLocations(t){this.program.assertCompatibleVertexAttributeLocations(t)}getPipeline(t,e,i){return this._pipeline}initializePipeline(t){return(0,d.Ey)({blending:d.RC,colorWrite:d.kn})}};p=(0,r.Cg)([(0,o.$K)("esri.views.3d.webgl-engine.core.shaderTechnique.ShaderTechnique")],p)},16943(t,e,i){i.d(e,{E:()=>n});var r=i(44208);function n(){return!!(0,r.A)("enable-feature:objectAndLayerId-rendering")}},41976(t,e,i){var r=i(63907),n=i(85079),s=i(74038);new s._("position",3,r.pe.FLOAT,0,12);const o=[new s._("position",2,r.pe.FLOAT,0,8)];(0,n.Xk)(o),new s._("position",2,r.pe.FLOAT,0,12),new s._("uv0",2,r.pe.HALF_FLOAT,8,12),new s._("position",2,r.pe.FLOAT,0,16),new s._("uv0",2,r.pe.FLOAT,8,16),i.d(e,["lK",0,o,"wR",0,[]])},92130(t,e,i){i.d(e,{A:()=>r});class r{constructor(t){this._material=t.material,this._techniques=t.techniques}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(t,e){return this._techniques.get(t,this._material.getConfiguration(e))}ensureResources(t){return 2}}},67499(t,e,i){i.d(e,{V:()=>E});var r=i(9093),n=i(35522),s=i(97146),o=i(34275),a=i(20498);function c(t){if(t.length<1024)return Array.from(t);if(Array.isArray(t))return Float64Array.from(t);if(!("BYTES_PER_ELEMENT"in t))return Array.from(t);switch(t.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(t);case 2:return(0,o.LW)(t)?(0,a.pX)().from(t):(0,o.jq)(t)?Uint16Array.from(t):Int16Array.from(t);case 4:return(0,o.vZ)(t)?Float32Array.from(t):Uint32Array.from(t);default:return Float64Array.from(t)}}var h=i(15142),l=i(51850),u=i(70328),d=i(94008),f=i(620);class p{constructor(t,e,i){this.primitiveIndices=t,this._numIndexPerPrimitive=e,this._readPosition=i,this._children=void 0,(0,f.vA)(t.length>=1);const r=t.length;v.clear();const s=(0,u.Ie)();for(let n=0;n<r;++n){const r=e*t[n];for(let t=0;t<e;++t){const e=r+t;v.push(e),(0,u.iT)(s,i(m,e))}}this.box=s;const o=new d.iy,a=(0,u.gX)(s,o.center);let c=.5*Math.max((0,u.VL)(s),(0,u.yr)(s),(0,u.uJ)(s)),h=c*c;for(let t=0;t<v.length;++t){const e=i(m,v.at(t)),r=(0,n.Re)(e,e,a),s=(0,n.uE)(r);if(s<=h)continue;const o=Math.sqrt(s),l=.5*(o-c);c+=l,h=c*c,(0,n.Ln)(a,a,r,l/o)}o.radius=c,this.sphere=o,v.clear()}get children(){if(this._children)return this._children;const t=this.box;if((0,u.TF)(t)<=1)return;const{_readPosition:e,_numIndexPerPrimitive:i,primitiveIndices:r}=this,s=(0,u.gX)(t,m),o=r.length,a=new Uint8Array(o),c=[0,0,0,0,0,0,0,0];for(let t=0;t<o;++t){const o=i*r[t],h=e(g,o);for(let t=1;t<i;++t)(0,n.jk)(h,h,e(_,o+t));const l=(h[0]<s[0]?1:0)|(h[1]<s[1]?2:0)|(h[2]<s[2]?4:0);a[t]=l,++c[l]}let h=0;for(let t=0;t<8;++t)c[t]>0&&++h;if(h<2)return;const l=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0];for(let t=0;t<8;++t)c[t]>0&&(l[t]=new Uint32Array(c[t]));c.fill(0);for(let t=0;t<o;++t){const e=a[t];l[e][c[e]++]=r[t]}const d=new Array;for(let t=0;t<8;++t){const r=l[t];void 0!==r&&d.push(new p(r,i,e))}return this._children=d,this._children}static prune(){v.prune()}}const m=(0,l.vt)(),g=(0,l.vt)(),_=(0,l.vt)(),v=new h.A({deallocator:null});var y=i(24326);class x{constructor(t){this.id=(0,y.c)(),this._attributes=new Map;for(const[e,i]of t)this._attributes.set(e,{...i,indices:(0,s.Dg)(i.indices)})}get attributes(){return this._attributes}}var b=i(48295);const w=(0,l.vt)(),T=(0,l.vt)(),M=(0,l.vt)(),A=(0,l.vt)();var S=i(17478),C=i(94656);class E extends x{constructor(t,e,i=null,r=0,n=null,s=-1,o,a){super(e),this.material=t,this.mapPositions=i,this.type=r,this.olidColor=n,this.edgeIndicesLength=s,this.baseGeometry=o,this.drawIndices=a,this._readPrimitivePosition=null,this._vertexPositionIndicesCache=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null,(0,f.vA)((t?.useIndexing??!1)===(null!=a),"Material index requirement and Geometry must match"),this.edgeIndicesLength<0&&(this.edgeIndicesLength=this.indexCount)}get readPrimitivePosition(){return this._readPrimitivePosition??=function(t,e){const{data:i,indices:r,size:n,stride:s}=t;return(0,f.vA)(3===n||4===n,"Position attribute must have 3 or 4 components"),null!=e?(t,n)=>{const o=r[e[n]]*s;return t[0]=i[o],t[1]=i[o+1],t[2]=i[o+2],t}:function(t,e,i){return(r,n)=>{const s=e[n]*i;return r[0]=t[s],r[1]=t[s+1],r[2]=t[s+2],r}}(i,r,s)}(this.positionAttribute,this.drawIndices),this._readPrimitivePosition}_invalidateReadPrimitivePosition(){this._readPrimitivePosition=null}instantiate(t={}){const e=new E(t.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((t,i)=>{t.exclusive=!1,e._attributes.set(i,t)}),e._boundingInfo=this._boundingInfo,e.transformation=t.transformation||this.transformation,e}getMutableAttribute(t){let e=this._attributes.get(t);return e&&!e.exclusive&&(e={...e,exclusive:!0,data:c(e.data)},this._attributes.set(t,e),"position"===t&&this._invalidateReadPrimitivePosition()),e}setAttributeData(t,e){const i=this._attributes.get(t);i?(this._attributes.set(t,{...i,exclusive:!0,data:e}),"position"===t&&this._invalidateReadPrimitivePosition()):(0,C.en)()&&console.warn(`Setting undefined attribute ${t} data`)}get primitivePositionIndices(){return void 0!==this._vertexPositionIndicesCache||(this._vertexPositionIndicesCache=this._computePrimitivePositionIndices()),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){const{drawIndices:t}=this,e=this.positionAttribute;if(null!=t&&null!=e){const i=new Array;for(const r of t)i.push(e.indices[r]);return i}return e?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const t=this.drawIndices??this.positionAttribute?.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(t){return!!this._calculateAttachmentOrigin(t)&&(null!=this._transformation&&(0,n.Z0)(t,t,this._transformation),!0)}_calculateAttachmentOrigin(t){return 0===this.type?this._computeAttachmentOriginTriangles(t):2===this.type?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t)}_computeAttachmentOriginTriangles(t){return function(t,e,i){if(i<=0)return!1;(0,n.hZ)(t,0,0,0),(0,n.hZ)(A,0,0,0);let r=0,s=0;for(let o=0;o<i;++o){const i=3*o;e(w,i),e(T,i+1),e(M,i+2);const a=(0,b.BU)(w,T,M);a?((0,n.WQ)(w,w,T),(0,n.WQ)(w,w,M),(0,n.hs)(w,w,1/3*a),(0,n.WQ)(t,t,w),r+=a):((0,n.WQ)(A,A,w),(0,n.WQ)(A,A,T),(0,n.WQ)(A,A,M),s+=3)}return!(0===s&&0===r||(0!==r?((0,n.hs)(t,t,1/r),0):0===s||((0,n.hs)(t,A,1/s),0)))}(t,this.readPrimitivePosition,this.indexCount/3)}_computeAttachmentOriginLines(t){const{indexCount:e}=this;return function(t,e,i,r){if(i<=0)return!1;(0,n.hZ)(t,0,0,0),(0,n.hZ)(A,0,0,0);let s=0,o=0;const a=i-1,c=a+(r?2:0);for(let i=0;i<c;i+=2){const r=i<a?i+1:0;e(w,i<a?i:a),e(T,r),(0,n.hs)(w,(0,n.WQ)(w,w,T),.5);const c=(0,n.xg)(w,T);c>0?((0,n.WQ)(t,t,(0,n.hs)(w,w,c)),s+=c):0===s&&((0,n.WQ)(A,A,w),o++)}return 0!==s?((0,n.hs)(t,t,1/s),!0):0!==o&&((0,n.hs)(t,A,1/o),!0)}(t,this.readPrimitivePosition,e,function(t,e){return!(!("isClosed"in t)||!t.isClosed)&&e>2}(this.material.parameters,e))}_computeAttachmentOriginPoints(t){return function(t,e,i){if(i<=0)return!1;(0,n.hZ)(t,0,0,0);let r=NaN,s=NaN,o=NaN,a=0;for(let n=0;n<i;n++){const i=e(w,n);i[0]===r&&i[1]===s&&i[2]===o||(t[0]+=i[0],t[1]+=i[1],t[2]+=i[2],a++),r=i[0],s=i[1],o=i[2]}return a>1&&(0,n.hs)(t,t,1/a),a>0}(t,this.readPrimitivePosition,this.indexCount)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const t=this.positionAttribute,e=this.indexCount;if(!t||0===e)return null;const i=0===this.type?3:1;(0,f.vA)(e%i===0,"Indexing error: "+e+" not divisible by "+i);const r=(0,s.tM)(e/i);return new p(r,i,this.readPrimitivePosition)}get transformation(){return this._transformation??r.zK}set transformation(t){this._transformation=t&&t!==r.zK?(0,r.o8)(t):null}get highlights(){return this._highlights||R}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(t){this._highlightOptionsCounts?.forEach((e,i)=>t(i))}allocateIdAndHighlight(t){const e=new S.h(t);return this.addHighlight(e)}addHighlight(t){this._ensureHighlights().add(t);const{highlightName:e}=t,i=(this._highlightOptionsCounts?.get(e)??0)+1;return this._ensureHighlightOptionsCounts().set(e,i),t}_ensureHighlights(){let t=this._highlights;return t||(t=new Set,this._highlights=t),t}_ensureHighlightOptionsCounts(){let t=this._highlightOptionsCounts;return t||(t=new Map,this._highlightOptionsCounts=t),t}removeHighlight(t){if(this._highlights?.delete(t)){const{highlightName:e}=t,i=this._highlightOptionsCounts?.get(e)??0;i<=1?this._highlightOptionsCounts?.delete(e):this._ensureHighlightOptionsCounts().set(e,i-1)}}}const R=new Set},49718(t,e,i){i(51850),i(6867).w_},6867(t,e,i){i.d(e,{w_:()=>u});var r=i(58083),n=i(9093),s=i(35522),o=i(51850),a=i(78955),c=i(91829),h=i(71351);class l{constructor(){this.intersector=4}get distance(){return this._distance}get renderDistance(){return this._renderDistance}_init(){this._distance=this._renderDistance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4}_setBase(t,e,i,r=null,n=null,s=null){this.intersector=t,this._distance=i,this._renderDistance=r,this.target=e,this.drapedLayerOrder=n,this.renderPriority=s}}class u extends l{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,s.hs)(f,this.ray.direction,this.distance),(0,s.Bw)(f))}withinDistance(t){return!!d(this)&&null!=this.distanceInRenderSpace&&this.distanceInRenderSpace<=t}getIntersectionPoint(t){return!!d(this)&&((0,s.hs)(f,this.ray.direction,this.distance),(0,s.WQ)(t,this.ray.origin,f),!0)}getTransformedNormal(t){return(0,s.C)(p,this.normal),p[3]=0,(0,a.Z0)(p,p,this.transformation),(0,s.C)(t,p),(0,s.S8)(t,t)}constructor(t){super(),this.normal=(0,o.vt)(),this.transformation=(0,n.vt)(),this._ray=(0,h.vt)(),this.init(t)}init(t){super._init(),t&&(0,h.C)(t,this._ray)}set(t,e,i,a,c,h,l,u){this._setBase(t,e,i,a,l,u),(0,s.C)(this.normal,c??o.Cb),(0,r.C)(this.transformation,h??n.zK)}copy(t){this._setBase(t.intersector,t.target,t.distance,t.renderDistance,t.drapedLayerOrder,t.renderPriority),(0,h.C)(t.ray,this._ray),(0,s.C)(this.normal,t.normal),(0,r.C)(this.transformation,t.transformation)}}function d(t){return null!=t?.distance&&null!=t?.renderDistance}const f=(0,o.vt)(),p=(0,c.vt)()},18845(t,e,i){i.d(e,{h:()=>U});var r=i(49186),n=i(65529),s=i(97768),o=i(17676),a=i(34275),c=i(24326),h=i(84952),l=i(38969),u=i(31217),d=i(95117),f=i(2741);let p;var m=i(63907),g=i(21231),_=i(42293);let v=null,y=null;async function x(){return null==y&&(p??=(async()=>{const t=await i.e(9321).then(i.bind(i,49321)),e=await t.default({locateFile:t=>(0,f.s)(`esri/libs/basisu/${t}`)});return e.initializeBasis(),e})(),y=p,v=await y),y}function b(t,e){if(null==v)return t.byteLength;const i=new v.BasisFile(new Uint8Array(t)),r=M(i)?T(i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),e):0;return i.close(),i.delete(),r}function w(t,e){if(null==v)return t.byteLength;const i=new v.KTX2File(new Uint8Array(t)),r=A(i)?T(i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),e):0;return i.close(),i.delete(),r}function T(t,e,i,r,n){const s=(0,_.MW)(e?m.CQ.COMPRESSED_RGBA8_ETC2_EAC:m.CQ.COMPRESSED_RGB8_ETC2),o=n&&t>1?(4**t-1)/(3*4**(t-1)):1;return Math.ceil(i*r*s*o)}function M(t){return t.getNumImages()>=1&&!t.isUASTC()}function A(t){return t.getFaces()>=1&&(t.isETC1S()||t.isUASTC())}function S(t,e,i,r,n,s,o,a){const{compressedTextureETC:c,compressedTextureS3TC:h}=t.capabilities,[l,u]=c?r?[1,m.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,m.CQ.COMPRESSED_RGB8_ETC2]:h?r?[3,m.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,m.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],d=e.hasMipmap?i:Math.min(1,i),f=[];for(let t=0;t<d;t++)f.push(new Uint8Array(o(t,l))),a(t,l,f[t]);return e.internalFormat=u,e.hasMipmap=f.length>1,e.samplingMode=e.hasMipmap?9987:9729,e.width=n,e.height=s,new g.A(t,e,{type:"compressed",levels:f})}var C=i(53966);const E=()=>C.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function R(t){return t.charCodeAt(0)+(t.charCodeAt(1)<<8)+(t.charCodeAt(2)<<16)+(t.charCodeAt(3)<<24)}const I=R("DXT1"),D=R("DXT3"),O=R("DXT5");function P(t,e){const i=new Int32Array(t.buffer,t.byteOffset,31);if(542327876!==i[0])return E().error("Invalid magic number in DDS header"),null;if(!(4&i[20]))return E().error("Unsupported format, must contain a FourCC code"),null;const r=i[21];let n,s;switch(r){case I:n=8,s=m.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case D:n=16,s=m.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case O:n=16,s=m.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return E().error("Unsupported FourCC code:",function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)}(r)),null}let o=1,a=i[4],c=i[3];(3&a||3&c)&&(E().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,c=c+3&-4);const h=a,l=c;let u,d;131072&i[2]&&!1!==e&&(o=Math.max(1,i[7]));let f=t.byteOffset+i[1]+4;const p=[];for(let e=0;e<o;++e)d=(a+3>>2)*(c+3>>2)*n,u=new Uint8Array(t.buffer,f,d),p.push(u),f+=d,a=Math.max(1,a>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:p},internalFormat:s,width:h,height:l}}var F=i(78988),N=i(620),B=i(67171),L=i(12541);class U{constructor(t,e){this._data=t,this.id=(0,c.c)(),this.events=new n.bk,this._parameters={...V,...e},this._startPreload(t)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(t){t instanceof HTMLVideoElement?(this.update=e=>this._update(t,e),this._startPreloadVideoElement(t)):t instanceof HTMLImageElement&&this._startPreloadImageElement(t)}_startPreloadVideoElement(t){if(!((0,h.w8)(t.src)||"auto"===t.preload&&t.crossOrigin)&&(t.preload="auto",t.crossOrigin="anonymous",t.src=t.src,t.paused&&t.autoplay)){const e=[];(0,l.i)(t,t=>e.push(t)).then(()=>{t.play()}).finally(()=>e.forEach(t=>t.remove()))}}_startPreloadImageElement(t){(0,h.DB)(t.src)||(0,h.w8)(t.src)||t.crossOrigin||(t.crossOrigin="anonymous",t.src=t.src)}_createDescriptor(t){const e=new B.R;return e.wrapMode=this._parameters.wrap??10497,e.flipped=!this._parameters.noUnpackFlip,e.samplingMode=this._parameters.mipmap?9987:9729,e.hasMipmap=!!this._parameters.mipmap,e.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,e.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?t.parameters.maxMaxAnisotropy:1),e.dataType=this._parameters.dataType??e.dataType,e.pixelFormat=this._parameters.pixelFormat??e.pixelFormat,e.internalFormat=this._parameters.internalFormat??e.internalFormat,e.isImmutable=!0===this._parameters.immutable&&function(t){return null!=t&&((0,L.tl)(t)||(0,L.tr)(t)||(0,L.CR)(t)||(0,L.QJ)(t))}(this._parameters.internalFormat),e}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(t,e){if(null==t)return 0;if((0,a.mw)(t)||(0,a.mg)(t))return"image/ktx2"===e.encoding?w(t,!!e.mipmap):"image/x.basis"===e.encoding?b(t,!!e.mipmap):t.byteLength;const{width:i,height:r}=t instanceof Image||t instanceof ImageData||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement?H(t):e,n=e.pixelFormat??6408,s=(0,_.wH)(n);return(e.mipmap?4/3:1)*i*r*s||0}(this._data,this._parameters)}load(t){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const e=this._data;return null==e?(this._texture=new g.A(t,this._createDescriptor(t),null),this._texture):(this._emptyTexture=t.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof e?this._loadFromURL(t,e):e instanceof Image?this._loadFromImageElement(t,e):e instanceof HTMLVideoElement?this._loadFromVideoElement(t,e):e instanceof ImageData||e instanceof HTMLCanvasElement?this._loadFromImage(t,e):(0,a.mg)(e)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(t,e):(0,a.mw)(e)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(t,new Uint8Array(e)):((0,a.mw)(e)||(0,a.mg)(e))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(t,e):((0,a.mw)(e)||(0,a.mg)(e))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(t,e):(0,a.mw)(e)?this._loadFromPixelData(t,new Uint8Array(e)):(0,a.iu)(e)?this._loadFromPixelData(t,e):null)}_update(t,e){return null==this._texture||t.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||e===t.currentTime?e:(this._texture.setData(t),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),t.currentTime)}_loadFromDDSData(t,e){return this._texture=function(t,e,i){const r=P(i,e.hasMipmap??!1);if(null==r)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:s,width:o,height:a}=r;return e.samplingMode=n.levels.length>1?9987:9729,e.hasMipmap=n.levels.length>1,e.internalFormat=s,e.width=o,e.height=a,new g.A(t,e,n)}(t,this._createDescriptor(t),e),this._emptyTexture=null,this._texture}_loadFromKTX2(t,e){return this._loadAsync(()=>async function(t,e,i){null==v&&(v=await x());const r=new v.KTX2File(new Uint8Array(i));if(!A(r))return null;r.startTranscoding();const n=S(t,e,r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),(t,e)=>r.getImageTranscodedSizeInBytes(t,0,0,e),(t,e,i)=>r.transcodeImage(i,t,0,0,e,0,-1,-1));return r.close(),r.delete(),n}(t,this._createDescriptor(t),e).then(t=>(this._texture=t,t)))}_loadFromBasis(t,e){return this._loadAsync(()=>async function(t,e,i){null==v&&(v=await x());const r=new v.BasisFile(new Uint8Array(i));if(!M(r))return null;r.startTranscoding();const n=S(t,e,r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),(t,e)=>r.getImageTranscodedSizeInBytes(0,t,e),(t,e,i)=>r.transcodeImage(i,0,t,e,0,0));return r.close(),r.delete(),n}(t,this._createDescriptor(t),e).then(t=>(this._texture=t,t)))}_loadFromPixelData(t,e){(0,N.vA)(this._parameters.width>0&&this._parameters.height>0);const i=this._createDescriptor(t);return 6407!==i.pixelFormat&&6408!==i.pixelFormat||(i.compress=this._parameters.compressionOptions),i.width=this._parameters.width??0,i.height=this._parameters.height??0,this._texture=new g.A(t,i,e),this._texture}_loadFromURL(t,e){return this._loadAsync(async i=>{const r=await(0,u.D)(e,{signal:i});return(0,o.Te)(i),this._loadFromImage(t,r)})}_loadFromImageElement(t,e){return e.complete?this._loadFromImage(t,e):this._loadAsync(async i=>{const r=await(0,d.y)(e,e.src,!1,i);return(0,o.Te)(i),this._loadFromImage(t,r)})}_loadFromVideoElement(t,e){return e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(t,e):this._loadFromVideoElementAsync(t,e)}_loadFromVideoElementAsync(t,e){return this._loadAsync(i=>new Promise((n,a)=>{const c=()=>{e.removeEventListener("loadeddata",h),e.removeEventListener("error",l),(0,s.xt)(u)},h=()=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(c(),n(this._loadFromImage(t,e)))},l=t=>{c(),a(t||new r.A("texture:load-error","Failed to load video"))};e.addEventListener("loadeddata",h),e.addEventListener("error",l);const u=(0,o.u7)(i,()=>l((0,o.NK)()))}))}_loadFromImage(t,e){let i=e;i instanceof HTMLVideoElement||(i=(0,F.vM)(i,t.parameters));const r=H(i);this._parameters.width=r.width,this._parameters.height=r.height;const n=this._createDescriptor(t);return n.width=r.width,n.height=r.height,n.compress=this._parameters.compressionOptions,this._texture=new g.A(t,n,i),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(t){const e=new AbortController;this._loadingController=e;const i=t(e.signal);this._loadingPromise=i;const r=()=>{this._loadingController===e&&(this._loadingController=null),this._loadingPromise===i&&(this._loadingPromise=null),this._emptyTexture=null};return i.then(r,r),i}unload(){if(this._texture=(0,s.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const t=this._loadingController;this._loadingController=null,this._loadingPromise=null,t.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function H(t){return t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t}const V={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},11725(t,e,i){i.d(e,{i:()=>a});var r=i(24326),n=i(49255),s=i(43616),o=i(65786);class a{constructor(t,e){this.id=(0,r.c)(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new e,(0,s.MB)(this._parameters,t),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(t){return!1}setParameters(t,e=!0){(0,s.MB)(this._parameters,t)&&(this.validateParameters(this._parameters),e&&this._parametersChanged())}validateParameters(t){}shouldRender(t){return this.visible&&this.isVisibleForOutput(t.output)&&(!this.parameters.isDecoration||t.bind.decorations)&&0!==(this.parameters.renderOccluded&t.renderOccludedMask)}isVisibleForOutput(t){return!0}get renderPriority(){return this._renderPriority}set renderPriority(t){t!==this._renderPriority&&(this._renderPriority=t,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get emissions(){return 0}getConfiguration(t){return this.updateConfiguration(t),this._configuration}updateConfiguration(t){this._configuration.output=t.output,this._configuration.hasEmission=t.hasEmission&&(0,n._o)(t.output),this._configuration.hasHighlightMixTexture=10===t.output&&null!=t.highlightMixTexture,this._configuration.useFloatBlend=t.useFloatBlend.value,this._configuration.emissionDimmingPass=t.transparentWithoutDepthEmissionDimmingPass&&(0,n._o)(t.output)}}o.Y},17478(t,e,i){i.d(e,{h:()=>s,p:()=>o});var r=i(24326);class n{constructor(){this.uid=(0,r.c)()}}class s extends n{constructor(t){super(),this.highlightName=t,this.channel=0}}class o extends n{constructor(){super(...arguments),this.channel=1}}},33524(t,e,i){i.d(e,{Yf:()=>a,mt:()=>h,z5:()=>c});var r=i(91829),n=i(49255),s=i(90644);const o=(0,s.p3)(1,0,1,771);function a(t,e=!1,i=!1){if(i)return s.uR;switch(t){case 0:return e?s.RC:s.T8;case 1:return o;default:return null}}function c(t){if(t.draped)return null;switch(t.output){case 0:case 2:default:return t.writeDepth?s.Uy:null;case 1:return null}}function h(t,e=513){return{func:(0,n._$)(t)?515:e}}(0,r._Y)()},56133(t,e,i){var r=i(90644);const n=(0,r.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:0}),s=(0,r.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:7681}),o=(0,r.nk)(2,2,{compare:514,fail:7680,zFail:7680,zPass:7680}),a=(0,r.nk)(2,2,{compare:517,fail:7680,zFail:7680,zPass:7680});i.d(e,["Ax",0,s,"Q0",0,a,"cP",0,n,"iB",0,o,"m",0,{func:513},"r8",0,{mask:0},"sf",0,{func:519},"v0",0,{mask:255}])},58964(t,e,i){i.d(e,{Vh:()=>u,jP:()=>d,q6:()=>f});var r=i(90629),n=i(35522),s=i(51850),o=i(19419),a=i(11964),c=i(27921),h=i(48295);function l(t,e){return t.isRectangle?(0,o.Uc)(t.bounds,e):m(e,t.points)}function u(t,e,i,r){const n=Math.min(e[0],i[0],r[0]),s=Math.min(e[1],i[1],r[1]),a=Math.max(e[0],i[0],r[0]),c=Math.max(e[1],i[1],r[1]);if(!function(t,e){if(!(0,o.HY)(t.bounds,e))return!1;if(t.isRectangle)return!0;for(const i of t.points)if((0,o.Uc)(e,i))return!0;for(let i=0;i<4;i++)if(m(b(T,e,i),t.points))return!0;for(let i=0;i<t.points.length;i++){const r=t.points[i],n=i===t.points.length-1?t.points[0]:t.points[i+1];for(let t=0;t<4;t++)if(g(r,n,b(T,e,t),b(M,e,(t+1)%4)))return!0}return!1}(t,(0,o.fA)(n,s,a,c,w)))return!1;if(l(t,e)||l(t,i)||l(t,r))return!0;for(const n of t.points)if((0,h.cq)(e,i,r,n,D))return!0;for(let n=0;n<t.points.length;n++){const s=t.points[n],o=t.points[(n+1)%t.points.length];if(g(e,i,s,o)||g(i,r,s,o)||g(r,e,s,o))return!0}return!1}function d(t,e,i,r){const n=Math.min(e[0],i[0])-r,s=Math.min(e[1],i[1])-r,a=Math.max(e[0],i[0])+r,c=Math.max(e[1],i[1])+r;if(!(0,o.HY)(t.bounds,(0,o.fA)(n,s,a,c,w)))return!1;if(l(t,e)||l(t,i))return!0;const h=r*r;for(const r of t.points)if(v(r,e,i)<=h)return!0;for(let r=0;r<t.points.length;r++){const n=t.points[r],s=t.points[(r+1)%t.points.length];if(g(e,i,n,s)||_(e,i,n,s)<=h)return!0}return!1}function f(t,e,i,r,s){(0,n.C)(C,e),(0,n.C)(E,i);const o=t.projectToRenderScreen(C,A),h=t.projectToRenderScreen(E,S);if(null==o||null==h)return!1;const l=p(t,C),u=p(t,E);if(l&&u)return!1;if(l!==u){const e=l?C:E,i=l?o:h;if(!function(t,e,i){return function(t,e,i,r){return(0,c.T7)(t.frustum[4],(0,a.Cr)(e,i,I),r)}(t,e,i,e)}(t,e,l?E:C))return!1;if(!t.projectToRenderScreen(e,i))return!1}return r[0]=o[0],r[1]=o[1],r[2]=0,s[0]=h[0],s[1]=h[1],s[2]=0,!0}function p(t,e){return function(t,e){return(0,c.mN)(t.frustum[4],e)}(t,e)>0}function m(t,e){let i=!1;for(let r=0,n=e.length-1;r<e.length;n=r++){const s=e[r],o=e[n];if(s[1]>t[1]==o[1]>t[1])continue;const a=(o[0]-s[0])*(t[1]-s[1])/(o[1]-s[1])+s[0];t[0]<a&&(i=!i)}return i}function g(t,e,i,r){const n=y(t,e,i),s=y(t,e,r),o=y(i,r,t),a=y(i,r,e);return n!==s&&o!==a||0===n&&x(t,e,i)||0===s&&x(t,e,r)||0===o&&x(i,r,t)||0===a&&x(i,r,e)}function _(t,e,i,r){return g(t,e,i,r)?0:Math.min(v(t,i,r),v(e,i,r),v(i,t,e),v(r,t,e))}function v(t,e,i){return(0,a.kb)((0,a.Cr)((0,n.hZ)(C,e[0],e[1],0),(0,n.hZ)(E,i[0],i[1],0),I),(0,n.hZ)(R,t[0],t[1],0))}function y(t,e,i){const r=(e[1]-t[1])*(i[0]-e[0])-(e[0]-t[0])*(i[1]-e[1]);return Math.abs(r)<=D?0:Math.sign(r)}function x(t,e,i){return i[0]>=Math.min(t[0],e[0])-D&&i[0]<=Math.max(t[0],e[0])+D&&i[1]>=Math.min(t[1],e[1])-D&&i[1]<=Math.max(t[1],e[1])+D}function b(t,e,i){return t[0]=0===i||3===i?e[0]:e[2],t[1]=i<2?e[1]:e[3],t}const w=(0,o.vt)(),T=(0,r.gs)(),M=(0,r.gs)(),A=(0,r.r_)(),S=(0,r.r_)(),C=(0,s.vt)(),E=(0,s.vt)(),R=(0,s.vt)(),I=(0,a.vt)(),D=1e-9},75956(t,e,i){i.d(e,{IV:()=>d,MJ:()=>p,Uq:()=>f});var r=i(15142),n=i(90629),s=i(35522),o=i(51850),a=i(70328),c=i(82919),h=i(27921),l=i(48295),u=i(58964);class d{constructor(t){this.primitiveIndex=t}}class f{constructor(t){this.type=t,this.distance=Number.POSITIVE_INFINITY,this.primitiveIndex=0,this.hasNormal=!1,this.point=(0,o.vt)(),this.normal=(0,o.vt)()}reset(){this.distance=Number.POSITIVE_INFINITY,this.hasNormal=!1}update(t,e,i,r){this.distance=t,this.primitiveIndex=e,(0,s.C)(this.point,i),this.hasNormal=null!=r,null!=r&&(0,s.C)(this.normal,r)}updateIfCloserFromValues(t,e,i,r){t<this.distance&&this.update(t,e,i,r)}updateIfCloser(t){const{distance:e,primitiveIndex:i,point:r,normal:n}=t;this.updateIfCloserFromValues(e,i,r,t.hasNormal?n:null)}get valid(){return Number.isFinite(this.distance)}}function p(t,e,i,r,n){if(!t.visible||0!==t.type)return null;const s=new f(4);let o;o=t.boundingInfo?g(t.readPrimitivePosition,t.boundingInfo,e,i,r,n):m(e,i,r,0,t.faceCount,t.readPrimitivePosition,n,null,0);for(const t of o)s.updateIfCloser(t);return s.valid?s:null}function*m(t,e,i,r,n,o,a,c=null,u=0){if(null==t.camera)return;const{camera:d,screenPolygonPrimitiveProcessor:f}=t;for(let t=r;t<n;++t){const r=(c?.[t]??t)+u,n=null==c?r:t,p=3*r;_(b[0],o,p+0,a,n,e),_(b[1],o,p+1,a,n,e),_(b[2],o,p+2,a,n,e);const m=A;let g;C.reset();const x=w;for(const t of f.processTriangle(b))if(x.length=0,(0,h.H)(d.frustum[4],t,()=>x.pushNew(),!1),!(x.length<3)){for(let t=0;t<x.length;t++)d.projectToScreen(x.at(t),T[t]);v(i,T,x.length)&&(y(d.eye,x,M),null==g&&(g=(0,l.rb)(A,b[0],b[1],b[2])),C.updateIfCloserFromValues((0,s.Io)(d.eye,M),r,M,g?m:null))}C.valid&&(yield C)}}function*g(t,e,i,r,n,s){let o;if(null!=s?((0,a.C)(x,e.box),s.applyToAabb(x),o=(0,c.GH)(n.broadPhaseFrustum,x,r)):o=(0,c.GH)(n.broadPhaseFrustum,e.box,r),!o)return;const{primitiveIndices:h}=e,l=h.length;if(l>1e3){const o=e.children;if(void 0!==o){for(const e of o)yield*g(t,e,i,r,n,s);return}}yield*m(i,r,n,0,l,t,s,h,0)}function _(t,e,i,r,n,o){const[a,c,h]=e(t,i);null!=r?r.applyToVertex(t,a,c,h,n):(0,s.hZ)(t,a,c,h),o&&(0,s.Z0)(t,t,o)}function v(t,e,i){for(let r=1;r<i-1;r++)if((0,u.Vh)(t,e[0],e[r],e[r+1]))return!0;return!1}function y(t,e,i){let r=Number.POSITIVE_INFINITY;const n=e.at(0);for(let o=1;o<e.length-1;o++){(0,l.k3)(S,t,n,e.at(o),e.at(o+1));const a=(0,s.hG)(t,S);a<r&&(r=a,(0,s.C)(i,S))}}const x=(0,a.vt)(),b=[(0,o.vt)(),(0,o.vt)(),(0,o.vt)()],w=new r.A({allocator:t=>t??(0,o.vt)()}),T=Array.from({length:12},()=>(0,n.gs)()),M=(0,o.vt)(),A=(0,o.vt)(),S=(0,o.vt)(),C=new f(4)},77194(t,e,i){i.d(e,{PS:()=>n}),i(44208);var r=i(34727);class n{constructor(){this._scale=0,this._angleFactor=0,this._minScale=0}update(t,e,i,r){i?(this._scale=Math.min(i.divisor/(e-i.offset),1),this._angleFactor=function(t){return Math.abs(t)**3}(t),this._minScale=null!=r?Math.min(i.minPixelSize/r,1):0):(this._scale=1,this._minScale=1,this._angleFactor=1)}apply(t){const{_scale:e,_angleFactor:i,_minScale:n}=this;return t*(0,r.qE)((0,r.Cc)(e,1,i),n,1)}applyVec2(t,e){t[0]=this.apply(e[0]),t[1]=this.apply(e[1])}}},78988(t,e,i){i.d(e,{Mv:()=>n,vM:()=>s});var r=i(49186);function n(t,e){return e=16*Math.floor(e/16),Math.min(16*Math.round(t/16),e)}function s(t,e){const[i,r]=o(t,e);return t.width===i&&t.height===r?t:a(t,i,r)}function o({width:t,height:e},{maxPreferredTexturePixels:i,maxTextureSize:r}){const s=Math.max(t,e),o=t*e;if(s<=r&&o<=i)return[t,e];const a=Math.min(Math.sqrt(i/o),r/s);return[n(Math.round(t*a),r),n(Math.round(e*a),r)]}function a(t,e,i){if(t instanceof ImageData)return a(function(t){const e=document.createElement("canvas");e.width=t.width,e.height=t.height;const i=e.getContext("2d");if(null==i)throw new r.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return i.putImageData(t,0,0),e}(t),e,i);const n=document.createElement("canvas");return n.width=e,n.height=i,n.getContext("2d").drawImage(t,0,0,n.width,n.height),n}},16396(t,e,i){i.d(e,{ou:()=>c}),i(77690),i(29242),i(58083),i(9093);var r=i(35522),n=i(51850),s=i(94008),o=i(57005);const a=new class{constructor(t=0){this.offset=t,this._tmpSphere=new s.iy}applyToVertex(t,e,i,n){const s=this.objectTransform.transform,o=(0,r.hZ)(h,e,i,n),a=(0,r.Z0)(o,o,s),c=this.offset/(0,r.Bw)(a);(0,r.Ln)(a,a,a,c);const l=this.objectTransform.inverse;return(0,r.Z0)(t,a,l),t}applyToMinMax(t,e){const i=this.offset/(0,r.Bw)(t);(0,r.Ln)(t,t,t,i);const n=this.offset/(0,r.Bw)(e);(0,r.Ln)(e,e,e,n)}applyToAabb(t){const e=this.offset/Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]+=t[0]*e,t[1]+=t[1]*e,t[2]+=t[2]*e;const i=this.offset/Math.sqrt(t[3]*t[3]+t[4]*t[4]+t[5]*t[5]);return t[3]+=t[3]*i,t[4]+=t[4]*i,t[5]+=t[5]*i,t}applyToBoundingSphere(t){const e=t.center,i=(0,r.Bw)(e),n=this.offset/i;return(0,r.Ln)(this._tmpSphere.center,e,e,n),this._tmpSphere.radius=t.radius+t.radius*this.offset/i,this._tmpSphere}};function c(t){return null!=t?(a.offset=t,a):null}new class{constructor(t=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpMbs=new s.iy,this._tmpObb=new o.ab,this._resetOffset(t)}_resetOffset(t){this._offset=t,this._totalOffset=t}set offset(t){this._resetOffset(t)}get offset(){return this._offset}set componentOffset(t){this._totalOffset=this._offset+t}set localOrigin(t){this.componentLocalOriginLength=(0,r.Bw)(t)}applyToVertex(t,e,i,n){const s=(0,r.hZ)(h,e,i,n),o=(0,r.hZ)(l,e,i,n+this.componentLocalOriginLength),a=this._totalOffset/(0,r.Bw)(o);return(0,r.Ln)(t,s,o,a),t}applyToAabb(t){const e=this.componentLocalOriginLength,i=t[0],r=t[1],n=t[2]+e,s=t[3],o=t[4],a=t[5]+e,c=Math.abs(i),h=Math.abs(r),l=Math.abs(n),u=Math.abs(s),d=Math.abs(o),f=Math.abs(a),p=.5*(1+Math.sign(i*s))*Math.min(c,u),m=.5*(1+Math.sign(r*o))*Math.min(h,d),g=.5*(1+Math.sign(n*a))*Math.min(l,f),_=Math.sqrt(p*p+m*m+g*g),v=Math.sign(c+i),y=Math.sign(h+r),x=Math.sign(l+n),b=Math.sign(u+s),w=Math.sign(d+o),T=Math.sign(f+a),M=this._totalOffset;if(_<M)return t[0]-=(1-v)*M,t[1]-=(1-y)*M,t[2]-=(1-x)*M,t[3]+=b*M,t[4]+=w*M,t[5]+=T*M,t;const A=Math.max(c,u),S=Math.max(h,d),C=Math.max(l,f),E=M/Math.sqrt(A*A+S*S+C*C),R=M/_,I=R-E,D=-I;return t[0]+=i*(v*D+R),t[1]+=r*(y*D+R),t[2]+=n*(x*D+R),t[3]+=s*(b*I+E),t[4]+=o*(w*I+E),t[5]+=a*(T*I+E),t}applyToMbs(t){const e=t.center,i=(0,r.Bw)(e),n=this._totalOffset/i;return(0,r.Ln)(this._tmpMbs.center,e,e,n),this._tmpMbs.radius=t.radius+t.radius*this._totalOffset/i,this._tmpMbs}applyToObb(t){return(0,o.gm)(t,this._totalOffset,this._totalOffset,1,this._tmpObb),this._tmpObb}},new class{constructor(t=0){this.offset=t,this._tmpVertex=(0,n.vt)()}applyToVertex(t,e,i,n){const s=(0,r.hZ)(h,e,i,n),o=(0,r.WQ)(l,s,this.localOrigin),a=this.offset/(0,r.Bw)(o);return(0,r.Ln)(t,s,o,a),t}applyToAabb(t){const e=u,i=d,r=f;for(let n=0;n<3;++n)e[n]=t[0+n]+this.localOrigin[n],i[n]=t[3+n]+this.localOrigin[n],r[n]=e[n];const n=this.applyToVertex(this._tmpVertex,e[0],e[1],e[2]);for(let e=0;e<3;++e)t[e]=n[e],t[e+3]=n[e];const s=e=>{const i=this.applyToVertex(this._tmpVertex,e[0],e[1],e[2]);for(let e=0;e<3;++e)t[e]=Math.min(t[e],i[e]),t[e+3]=Math.max(t[e+3],i[e])};for(let t=1;t<8;++t){for(let n=0;n<3;++n)r[n]=t&1<<n?i[n]:e[n];s(r)}let o=0;for(let t=0;t<3;++t)e[t]*i[t]<0&&(o|=1<<t);if(0!==o&&7!==o)for(let t=0;t<8;++t)if(0===(o&t)){for(let n=0;n<3;++n)r[n]=o&1<<n?0:t&1<<n?e[n]:i[n];s(r)}for(let e=0;e<3;++e)t[e]-=this.localOrigin[e],t[e+3]-=this.localOrigin[e];return t}};const h=(0,n.vt)(),l=(0,n.vt)(),u=(0,n.vt)(),d=(0,n.vt)(),f=(0,n.vt)()},75497(t,e,i){i.d(e,{$p:()=>s,Qx:()=>o,e_:()=>a});var r=i(51850),n=i(37957);class s{constructor(t=(0,r.Ul)()){this.intensity=t}}class o{constructor(t=(0,r.Ul)(),e=(0,r.fA)(.57735,.57735,.57735),i=!0,n=1,s=1){this.intensity=t,this.direction=e,this.castShadows=i,this.specularStrength=n,this.environmentStrength=s}}class a{constructor(){this.r=n.P.create(),this.g=n.P.create(),this.b=n.P.create()}clear(){this.r.fill(0),this.g.fill(0),this.b.fill(0)}}},57226(t,e,i){i.d(e,{T:()=>y});var r=i(34727),n=i(35522),s=i(51850),o=i(75497);function a(t,e,i){i.length=t.length;for(let r=0;r<t.length;r++)i[r]=t[r]*e;return i}function c(t,e,i){(i=i||t).length=t.length;for(let r=0;r<t.length;r++)i[r]=t[r]+e[r];return i}var h=i(37957);const l=.28209479177;function u(t,e){(0,n.ze)(m,t.direction),function(t,e){const i=t[0],r=t[1],n=t[2],s=e||h.P.create();s[0]=l,s[1]=.4886025119*i,s[2]=.4886025119*n,s[3]=.4886025119*r,s[4]=1.09254843059*i*r,s[5]=1.09254843059*r*n,s[6]=.31539156525*(3*n*n-1),s[7]=1.09254843059*i*n,s[8]=.54627421529*(i*i-r*r)}(m,f),function(t,e,i){(i=i||t).length=t.length;for(let r=0;r<t.length;r++)i[r]=t[r]*e[r]}(f,g),a(f,t.intensity[0],p),c(e.r,p),a(f,t.intensity[1],p),c(e.g,p),a(f,t.intensity[2],p),c(e.b,p)}function d(t,e){e.r[0]+=l*g[0]*t.intensity[0]*4*Math.PI,e.g[0]+=l*g[0]*t.intensity[1]*4*Math.PI,e.b[0]+=l*g[0]*t.intensity[2]*4*Math.PI}const f=h.P.create(),p=h.P.create(),m=(0,s.vt)(),g=[3.141593,2.094395,2.094395,2.094395,.785398,.785398,.785398,.785398,.785398];class _{constructor(){this.color=(0,s.vt)(),this.intensity=1}}class v{constructor(){this.direction=(0,s.vt)(),this.ambient=new _,this.diffuse=new _}}class y{constructor(){this._legacy=new v,this.globalFactor=.5,this.noonFactor=.5,this._sphericalHarmonics=new o.e_,this._mainLight=new o.Qx((0,s.vt)(),(0,s.fA)(1,0,0),!1)}get legacy(){return this._legacy}get sh(){return this._sphericalHarmonics}get mainLight(){return this._mainLight}set(t){(function(t,e,i){var r;i.clear(),(0,n.hZ)(e.intensity,0,0,0),r=t,Array.isArray(r)?Array.isArray(t)&&((0,n.C)(e.direction,t[0].direction),(0,n.C)(e.intensity,t[0].intensity),e.specularStrength=t[0].specularStrength,e.environmentStrength=t[0].environmentStrength,e.castShadows=t[0].castShadows,u(t[2],i),d(t[1],i)):d(t,i)})(t,this._mainLight,this._sphericalHarmonics),this.updateLegacy()}updateLegacy(){(0,n.C)(this._legacy.direction,this._mainLight.direction);const t=1/Math.PI;this._legacy.ambient.color[0]=.282095*this._sphericalHarmonics.r[0]*t,this._legacy.ambient.color[1]=.282095*this._sphericalHarmonics.g[0]*t,this._legacy.ambient.color[2]=.282095*this._sphericalHarmonics.b[0]*t,(0,n.hs)(this._legacy.diffuse.color,this._mainLight.intensity,t),(0,n.C)(x,this._legacy.diffuse.color),(0,n.hs)(x,x,.4*this.globalFactor),(0,n.WQ)(this._legacy.ambient.color,this._legacy.ambient.color,x)}copyFrom(t){h.P.copy(this._sphericalHarmonics.r,t.sh.r),h.P.copy(this._sphericalHarmonics.g,t.sh.g),h.P.copy(this._sphericalHarmonics.b,t.sh.b),(0,n.C)(this._mainLight.direction,t.mainLight.direction),(0,n.C)(this._mainLight.intensity,t.mainLight.intensity),this._mainLight.castShadows=t.mainLight.castShadows,this._mainLight.specularStrength=t.mainLight.specularStrength,this._mainLight.environmentStrength=t.mainLight.environmentStrength,this.globalFactor=t.globalFactor,this.noonFactor=t.noonFactor}lerpLighting(t,e,i){if((0,n.Cc)(this._mainLight.intensity,t.mainLight.intensity,e.mainLight.intensity,i),this._mainLight.environmentStrength=(0,r.Cc)(t.mainLight.environmentStrength,e.mainLight.environmentStrength,i),this._mainLight.specularStrength=(0,r.Cc)(t.mainLight.specularStrength,e.mainLight.specularStrength,i),(0,n.C)(this._mainLight.direction,e.mainLight.direction),this._mainLight.castShadows=e.mainLight.castShadows,this.globalFactor=(0,r.Cc)(t.globalFactor,e.globalFactor,i),this.noonFactor=(0,r.Cc)(t.noonFactor,e.noonFactor,i),t.sh.r.length===e.sh.r.length)for(let n=0;n<e.sh.r.length;n++)this._sphericalHarmonics.r[n]=(0,r.Cc)(t.sh.r[n],e.sh.r[n],i),this._sphericalHarmonics.g[n]=(0,r.Cc)(t.sh.g[n],e.sh.g[n],i),this._sphericalHarmonics.b[n]=(0,r.Cc)(t.sh.b[n],e.sh.b[n],i);else for(let t=0;t<e.sh.r.length;t++)this._sphericalHarmonics.r[t]=e.sh.r[t],this._sphericalHarmonics.g[t]=e.sh.g[t],this._sphericalHarmonics.b[t]=e.sh.b[t];this.updateLegacy()}}const x=(0,s.vt)()},33442(t,e,i){i.d(e,{T:()=>u,s:()=>h});var r=i(49255);const n=l(-1),s=l(1),o=n,a=new Array;a[0]=null,a[1]=s,a[2]=n,a[3]=l(-2),a[4]=l(-3);const c=a.map(t=>function(t,e){return e?{factor:t.factor+e.factor,units:t.units+e.units}:t}(o,t));function h({output:t,enableOITOffset:e,polygonOffset:i}){return(0,r._$)(t)&&e?c[i]:a[i]}function l(t){return{factor:1*t,units:2*t}}function u(t){const e=h(t)??{factor:0,units:0};return{factor:e.factor+n.factor*t.polygonOffsetIndex,units:e.units+n.units*t.polygonOffsetIndex}}a[1]=s},47724(t,e,i){i.d(e,{L:()=>a});var r=i(5482),n=i(51976),s=i(34711);class o extends s.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,r.Cg)([(0,n.W)()],o.prototype,"hasHighlightMixTexture",void 0),(0,r.Cg)([(0,n.W)()],o.prototype,"emissionDimmingPass",void 0);class a extends o{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}(0,r.Cg)([(0,n.W)({count:5})],a.prototype,"polygonOffset",void 0),(0,r.Cg)([(0,n.W)()],a.prototype,"transparent",void 0),(0,r.Cg)([(0,n.W)()],a.prototype,"enableOITOffset",void 0)},46606(t,e,i){i.d(e,{S:()=>a,p:()=>c}),i(34727),i(77690),i(29242),i(58083);var r=i(9093),n=(i(35522),i(51850)),s=(i(78955),i(91829),i(31756),i(26857),i(16943),i(65786));class o extends s.Y{constructor(t){super(),this.vvSize=t?.size??null,this.vvColor=t?.color??null,this.vvOpacity=t?.opacity??null}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}(0,r.vt)(),(0,n.vt)(),(0,r.vt)();class a extends o{constructor(){super(...arguments),this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}}const c=8},43616(t,e,i){i.d(e,{MB:()=>c,kE:()=>o});var r=i(4576),n=i(34727),s=i(77194);function o(t,e,i,r,s,o){let a=i.screenLength*t.pixelRatio;null!=s&&(h.update(r,e,s,o),a=h.apply(a));const c=a*Math.tan(.5*t.fovY)/(.5*t.fullHeight);return(0,n.qE)(c*e,i.minWorldLength,i.maxWorldLength)}const a=(0,r.VO)();function c(t,e){let i=!1;for(const r in e){const n=e[r];void 0!==n&&(Array.isArray(n)?Array.isArray(t[r])&&a(n,t[r])||(t[r]=n.slice(),i=!0):t[r]!==n&&(i=!0,t[r]=n))}return i}const h=new s.PS;i.d(e,["Um",0,{multiply:1,ignore:2,replace:3,tint:4}])},59907(t,e,i){i.d(e,{vJ:()=>l,vx:()=>h}),i(35522);var r=i(51850),n=i(58083),s=i(13030),o=i(620);function a(t,e,i){const{data:r,indices:n}=t,s=e.typedBuffer,o=e.typedBufferStride,a=n.length;i*=o;for(let t=0;t<a;++t){const e=2*n[t];s[i]=r[e],s[i+1]=r[e+1],i+=o}}function c(t,e,i,r=1){const{data:n,indices:s}=t,o=e.typedBuffer,a=e.typedBufferStride,c=s.length;if(i*=a,1===r)for(let t=0;t<c;++t){const e=3*s[t];o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],i+=a}else for(let t=0;t<c;++t){const e=3*s[t];for(let t=0;t<r;++t)o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],i+=a}}function h(t,e,i,r,n=1){const s=e.typedBuffer,o=e.typedBufferStride;if(r*=o,1===n)for(let e=0;e<i;++e)s[r]=t[0],s[r+1]=t[1],s[r+2]=t[2],s[r+3]=t[3],r+=o;else for(let e=0;e<i;++e)for(let e=0;e<n;++e)s[r]=t[0],s[r+1]=t[1],s[r+2]=t[2],s[r+3]=t[3],r+=o}function l(t,e,i,r,n,o){const{buffer:a,offset:c}=o;for(const o of i.fields.keys()){const i=t.get(o),l=i?.indices;if(i&&l)u(o,i,r,n,a,c);else if("olidColor"===o&&null!=e){const i=t.get("position")?.indices;if(i){const t=i.length;h(e,a.getField(o,s.XP),t,c)}}}}function u(t,e,i,r,h,l){switch(t){case"position":{(0,o.vA)(3===e.size);const r=h.getField(t,s.xs);(0,o.vA)(!!r,`No buffer view for ${t}`),function(t,e,i,r,s=1){if(!e)return void c(t,i,r,s);const{data:o,indices:a}=t,h=i.typedBuffer,l=i.typedBufferStride,u=a.length,d=e[0],f=e[1],p=e[2],m=e[4],g=e[5],_=e[6],v=e[8],y=e[9],x=e[10],b=e[12],w=e[13],T=e[14];r*=l;let M=0,A=0,S=0;const C=(0,n.tZ)(e)?t=>{M=o[t]+b,A=o[t+1]+w,S=o[t+2]+T}:t=>{const e=o[t],i=o[t+1],r=o[t+2];M=d*e+m*i+v*r+b,A=f*e+g*i+y*r+w,S=p*e+_*i+x*r+T};if(1===s)for(let t=0;t<u;++t)C(3*a[t]),h[r]=M,h[r+1]=A,h[r+2]=S,r+=l;else for(let t=0;t<u;++t){C(3*a[t]);for(let t=0;t<s;++t)h[r]=M,h[r+1]=A,h[r+2]=S,r+=l}}(e,i,r,l);break}case"normal":{(0,o.vA)(3===e.size);const i=h.getField(t,s.xs);(0,o.vA)(!!i,`No buffer view for ${t}`),function(t,e,i,r,s=1){if(!e)return void c(t,i,r,s);const{data:o,indices:a}=t,h=e,l=i.typedBuffer,u=i.typedBufferStride,d=a.length,f=h[0],p=h[1],m=h[2],g=h[4],_=h[5],v=h[6],y=h[8],x=h[9],b=h[10],w=!(0,n.ut)(h),T=1e-6,M=1-T;r*=u;let A=0,S=0,C=0;const E=(0,n.tZ)(h)?t=>{A=o[t],S=o[t+1],C=o[t+2]}:t=>{const e=o[t],i=o[t+1],r=o[t+2];A=f*e+g*i+y*r,S=p*e+_*i+x*r,C=m*e+v*i+b*r};if(1===s)if(w)for(let t=0;t<d;++t){E(3*a[t]);const e=A*A+S*S+C*C;if(e<M&&e>T){const t=1/Math.sqrt(e);l[r]=A*t,l[r+1]=S*t,l[r+2]=C*t}else l[r]=A,l[r+1]=S,l[r+2]=C;r+=u}else for(let t=0;t<d;++t)E(3*a[t]),l[r]=A,l[r+1]=S,l[r+2]=C,r+=u;else for(let t=0;t<d;++t){if(E(3*a[t]),w){const t=A*A+S*S+C*C;if(t<M&&t>T){const e=1/Math.sqrt(t);A*=e,S*=e,C*=e}}for(let t=0;t<s;++t)l[r]=A,l[r+1]=S,l[r+2]=C,r+=u}}(e,r,i,l);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,o.vA)(2===e.size);const i=h.getField(t,s.mJ);(0,o.vA)(!!i,`No buffer view for ${t}`),a(e,i,l);break}case"uv0":{(0,o.vA)(2===e.size);const i=h.getField(t,s.ZD)??h.getField(t,s.gH);(0,o.vA)(!!i,`No buffer view for ${t}`),a(e,i,l);break}case"uvi":{(0,o.vA)(2===e.size);const i=h.getField(t,s.mJ);(0,o.vA)(!!i,`No buffer view for ${t}`),a(e,i,l);break}case"color":case"symbolColor":{const i=h.getField(t,s.XP);(0,o.vA)(!!i,`No buffer view for ${t}`),(0,o.vA)(3===e.size||4===e.size),function(t,e,i,r,n=1){const{data:s,indices:o}=t,a=i.typedBuffer,c=i.typedBufferStride,h=o.length;if(r*=c,e===s.length&&4===e){a[r]=s[0],a[r+1]=s[1],a[r+2]=s[2],a[r+3]=s[3];const t=new Uint32Array(i.typedBuffer.buffer,i.start),e=c/4,o=t[r/=4];r+=e;const l=h*n;for(let i=1;i<l;++i)t[r]=o,r+=e;return}if(1!==n)if(4!==e)for(let t=0;t<h;++t){const e=3*o[t];for(let t=0;t<n;++t)a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=255,r+=c}else for(let t=0;t<h;++t){const e=4*o[t];for(let t=0;t<n;++t)a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=s[e+3],r+=c}else{if(4===e){for(let t=0;t<h;++t){const e=4*o[t];a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=s[e+3],r+=c}return}for(let t=0;t<h;++t){const e=3*o[t];a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=255,r+=c}}}(e,e.size,i,l);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const i=h.getField(t,s.Y$)??h.getField(t,s.Y$);(0,o.vA)(!!i,`No buffer view for ${t}`),(0,o.vA)(1===e.size),function(t,e,i){const{data:r,indices:n}=t,s=e.typedBuffer,o=e.typedBufferStride,a=n.length,c=r[0];i*=o;for(let t=0;t<a;++t)s[i]=c,i+=o}(e,i,l);break}case"tangent":{(0,o.vA)(4===e.size);const r=h.getField(t,s.Eq);(0,o.vA)(!!r,`No buffer view for ${t}`),function(t,e,i,r,s=1){if(!e)return void function(t,e,i,r=1){const{data:n,indices:s}=t,o=e.typedBuffer,a=e.typedBufferStride,c=s.length;if(i*=a,1===r)for(let t=0;t<c;++t){const e=4*s[t];o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],o[i+3]=n[e+3],i+=a}else for(let t=0;t<c;++t){const e=4*s[t];for(let t=0;t<r;++t)o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],o[i+3]=n[e+3],i+=a}}(t,i,r,s);const{data:o,indices:a}=t,c=e,h=i.typedBuffer,l=i.typedBufferStride,u=a.length,d=c[0],f=c[1],p=c[2],m=c[4],g=c[5],_=c[6],v=c[8],y=c[9],x=c[10],b=!(0,n.ut)(c),w=1e-6,T=1-w;if(r*=l,1===s)for(let t=0;t<u;++t){const e=4*a[t],i=o[e],n=o[e+1],s=o[e+2],c=o[e+3];let u=d*i+m*n+v*s,M=f*i+g*n+y*s,A=p*i+_*n+x*s;if(b){const t=u*u+M*M+A*A;if(t<T&&t>w){const e=1/Math.sqrt(t);u*=e,M*=e,A*=e}}h[r]=u,h[r+1]=M,h[r+2]=A,h[r+3]=c,r+=l}else for(let t=0;t<u;++t){const e=4*a[t],i=o[e],n=o[e+1],c=o[e+2],u=o[e+3];let M=d*i+m*n+v*c,A=f*i+g*n+y*c,S=p*i+_*n+x*c;if(b){const t=M*M+A*A+S*S;if(t<T&&t>w){const e=1/Math.sqrt(t);M*=e,A*=e,S*=e}}for(let t=0;t<s;++t)h[r]=M,h[r+1]=A,h[r+2]=S,h[r+3]=u,r+=l}}(e,i,r,l);break}}}(0,r.vt)()},47630(t,e,i){i.d(e,{D:()=>d});var r=i(49255),n=i(47187),s=i(3871),o=i(63365);function a(t){t.code.add("\n vec3 emissionFilter(in vec3 srcColor, float srcAlpha) {\n vec3 color = min(srcColor + vec3(1.0 - srcAlpha), 1.0);\n float m = max(color.r, max(color.g, color.b));\n return m > 0.0 ? color / m : vec3(1.0);\n }\n ")}var c=i(31821),h=i(26934),l=i(58243),u=i(72458);function d(t,e){t.include(s.Q,e),t.include(n.zp,e);const{fragment:i,outputs:d}=t;i.include(o.a);const{output:f,hasEmission:p,oitPremultipliedAlpha:m,snowCover:g,emissionDimmingPass:_,renderOccluded:v}=e,y=11===f,x=(0,r._$)(f),b=(0,r.Rb)(f),w=(0,r._o)(f)&&!x,T=0!==f||v;let M=0;(w||x)&&d.add("fragColor","vec4",M++),x&&d.add("fragAlpha","float",M++),p&&d.add("fragEmission","vec4",M++),i.include(o.a),i.include(h.Q),i.include(u.O,e),i.include(l.t,e),_&&i.include(a),i.code.add(c.H`
|
|
245
245
|
void outputColorHighlightOLID(vec4 finalColor, vec3 emissiveSymbolColor ${(0,c.If)(g,", float snow")}) {
|
|
246
246
|
${(0,c.If)(y,"finalColor.a = 1.0;")}
|
|
247
247
|
${(0,c.If)(T,"if (finalColor.a < alphaCutoff) discard;")}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[909],{92009(e,a,r){r.d(a,{L:()=>u});var t=r(70333),n=r(11254),i=r(49186),l=r(17676),s=r(60694),o=r(20655),y=r(80812);async function u(e,a){const r=(0,s.qg)(e);if(!r)throw new i.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await c(e)).serviceItemId;if(!a)return null;const r=new y.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,l.QP)(e)}return null}(e);null!=i&&(r.portal=new o.A({url:i}));try{return await r.load({signal:e.signal})}catch(e){return(0,l.QP)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!r)return null;const t=new y.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,l.QP)(e),null}}(u);if(!f?.url)throw new i.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const m=await d(f.url,u);return m.portalItem=f,m}async function c(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,s.qg)(e);if(!r)throw new i.A("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,l=a.layerId;if(null==l)return{serverUrl:t};const o=c(a),y=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(y?.layers?.[0]||y?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(t,r)},f=d("anonymous").catch(()=>d("no-prompt")),[m,w]=await Promise.all([f,o]),L=w?.layers,h=m.data&&m.data.layers;if(!Array.isArray(h))throw new Error("expected layers array");if(Array.isArray(L)){for(let e=0;e<Math.min(L.length,h.length);e++)if(L[e].id===l)return{serverUrl:t,layerId:h[e].id}}else if(null!=l&&l<h.length)return{serverUrl:t,layerId:h[l].id};throw new Error("could not find matching associated sublayer")}},23154(e,a,r){r.d(a,{A6:()=>s,Aq:()=>w,Jo:()=>m,QM:()=>l});var t=r(77548),n=r(7861);const i=new Set(["Annotation Layer","Catalog Layer","Dimension Layer","Feature Layer","Oriented Imagery Layer"]);async function l(e,a){const{serviceJSON:r,layersJSON:t,...n}=await s(e,a);u(r);const i={serviceJSON:r,...n};return t&&(u(t),i.layersJSON=t),i}async function s(e,a){const{loadContext:r,...i}=a||{},l=r?await r.fetchServiceMetadata(e,i):await(0,n.L)(e,i),s=(0,t.G$)();f(l);const o={serviceJSON:l,preferredHost:s};if((l.currentVersion??0)<10.5)return o;const y=`${(0,t.$x)()??e}/layers`,u=r?await r.fetchServiceMetadata(y,i):await(0,n.L)(y,i);return f(u),o.layersJSON={layers:u.layers,tables:u.tables},o}function o(e){return i.has(e.type)}function y(e){return"Table"===e.type}function u(e){e.layers=e.layers?.filter(o),e.tables=e.tables?.filter(y)}function c(e){e.type||="Feature Layer"}function d(e){e.type||="Table"}function f(e){e.layers?.forEach(c),e.tables?.forEach(d)}function m(e){if(!e)return"FeatureLayer";switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer";case"Dimension Layer":return"DimensionFeatureLayer";case"Annotation Layer":return"AnnotationFeatureLayer"}return null}function w(e,a){if(!e)return a?"Table":"ArcGISFeatureLayer";switch(e){case"Annotation Layer":return"ArcGISAnnotationLayer";case"Catalog Layer":return"CatalogLayer";case"Dimension Layer":return"ArcGISDimensionLayer";case"Feature Layer":return"ArcGISFeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Parcel Layer":return"ParcelLayer";case"Table":return"Table";case"Topology Layer":return"TopologyLayer";case"Trace Network Layer":return"TraceNetworkLayer";case"Utility Network Layer":return"UtilityNetworkLayer";default:return null}}},2976(e,a,r){const t={AnnotationFeatureLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(564),r.e(7552),r.e(2889),r.e(4674),r.e(4333),r.e(9296)]).then(r.bind(r,20737))).default,BingMapsLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(6684)]).then(r.bind(r,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(7632),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(9953),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(1017),r.e(500),r.e(4674),r.e(993),r.e(4333),r.e(3781),r.e(6231),r.e(7005),r.e(9240),r.e(560),r.e(3290),r.e(990),r.e(594)]).then(r.bind(r,82411))).default,CSVLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(9953),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(1017),r.e(4778)]).then(r.bind(r,68695))).default,CatalogLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(500),r.e(4674),r.e(893),r.e(993),r.e(4333),r.e(3636),r.e(4571),r.e(318)]).then(r.bind(r,83508))).default,DimensionFeatureLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(564),r.e(7552),r.e(2889),r.e(4674),r.e(4333),r.e(4428)]).then(r.bind(r,25077))).default,DimensionLayer:async()=>(await Promise.all([r.e(8278),r.e(3813)]).then(r.bind(r,71493))).default,ElevationLayer:async()=>(await Promise.all([r.e(8278),r.e(9953),r.e(2827),r.e(4493)]).then(r.bind(r,38732))).default,FeatureLayer:async()=>(await Promise.all([r.e(7632),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(9953),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(1017),r.e(500),r.e(4674),r.e(993),r.e(4333),r.e(3781),r.e(5604)]).then(r.bind(r,53781))).default,GaussianSplatLayer:async()=>(await Promise.all([r.e(8278),r.e(6231),r.e(9177),r.e(6475)]).then(r.bind(r,36475))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(9953),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(1017),r.e(500),r.e(7828)]).then(r.bind(r,15481))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(9657)]).then(r.bind(r,63201))).default,GroupLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(5613),r.e(6569)]).then(r.bind(r,85989))).default,ImageryLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(9953),r.e(564),r.e(7552),r.e(893),r.e(6231),r.e(1683),r.e(1356),r.e(5138),r.e(7772),r.e(4884)]).then(r.bind(r,87772))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(9953),r.e(564),r.e(6231),r.e(1683),r.e(2827),r.e(1356),r.e(2754),r.e(5138),r.e(9235),r.e(3500),r.e(1003),r.e(2806),r.e(7944)]).then(r.bind(r,90124))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(8278),r.e(9953),r.e(6231),r.e(9177),r.e(8325),r.e(132)]).then(r.bind(r,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(8278),r.e(9953),r.e(6231),r.e(9240),r.e(9177),r.e(8325),r.e(7464)]).then(r.bind(r,74660))).default,KMLLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(564),r.e(1214),r.e(4664)]).then(r.bind(r,162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(9953),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(1017),r.e(500),r.e(993),r.e(708),r.e(9696),r.e(8245),r.e(1683),r.e(217),r.e(1521),r.e(2969),r.e(2459),r.e(8692)]).then(r.bind(r,28692))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(8278),r.e(6231),r.e(4807),r.e(9695)]).then(r.bind(r,49695))).default,LinkChartLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(9953),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(1017),r.e(500),r.e(993),r.e(708),r.e(9696),r.e(8245),r.e(1683),r.e(217),r.e(1521),r.e(2969),r.e(2459),r.e(3309)]).then(r.bind(r,93309))).default,MapImageLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(500),r.e(4674),r.e(893),r.e(822),r.e(13)]).then(r.bind(r,7656))).default,MapNotesLayer:async()=>(await Promise.all([r.e(7632),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(9953),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(1017),r.e(500),r.e(4674),r.e(993),r.e(4333),r.e(3781),r.e(2969),r.e(9062)]).then(r.bind(r,96299))).default,MediaLayer:async()=>(await Promise.all([r.e(7632),r.e(8278),r.e(7865),r.e(1670),r.e(2491)]).then(r.bind(r,90182))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(1017),r.e(500),r.e(708),r.e(560),r.e(5594)]).then(r.bind(r,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(7269),r.e(349)]).then(r.bind(r,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(7632),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(9953),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(1017),r.e(500),r.e(4674),r.e(993),r.e(4333),r.e(3781),r.e(6113),r.e(5982)]).then(r.bind(r,16852))).default,ParquetLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(2869),r.e(3910),r.e(9953),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(1017),r.e(500),r.e(3819),r.e(1199),r.e(1698)]).then(r.bind(r,99680))).default,PointCloudLayer:async()=>(await Promise.all([r.e(8278),r.e(2869),r.e(6231),r.e(9240),r.e(7984),r.e(6533)]).then(r.bind(r,77885))).default,RouteLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(2869),r.e(3910),r.e(564),r.e(1214),r.e(217),r.e(8195)]).then(r.bind(r,39622))).default,SceneLayer:async()=>(await Promise.all([r.e(8278),r.e(2869),r.e(3910),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(6231),r.e(7005),r.e(9240),r.e(560),r.e(3290),r.e(990),r.e(8231)]).then(r.bind(r,2e4))).default,StreamLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(1017),r.e(3681),r.e(2509)]).then(r.bind(r,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(7632),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(564),r.e(7552),r.e(2889),r.e(500),r.e(4674),r.e(993),r.e(4333),r.e(1683),r.e(6008)]).then(r.bind(r,97483))).default,TileLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(500),r.e(4674),r.e(893),r.e(2827),r.e(822),r.e(2746)]).then(r.bind(r,71756))).default,UnknownLayer:async()=>(await r.e(146).then(r.bind(r,146))).default,UnsupportedLayer:async()=>(await r.e(5165).then(r.bind(r,45165))).default,VectorTileLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2827),r.e(5228),r.e(5013),r.e(3897)]).then(r.bind(r,48757))).default,VideoLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(3910),r.e(4674),r.e(1683),r.e(1670),r.e(1563)]).then(r.bind(r,86875))).default,ViewshedLayer:async()=>(await Promise.all([r.e(8278),r.e(6231),r.e(4807),r.e(6650)]).then(r.bind(r,96650))).default,VoxelLayer:async()=>(await Promise.all([r.e(8278),r.e(2869),r.e(9240),r.e(117)]).then(r.bind(r,21005))).default,WCSLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(9953),r.e(564),r.e(1683),r.e(1356),r.e(2754),r.e(5138),r.e(9235),r.e(3500),r.e(2806),r.e(6792)]).then(r.bind(r,20521))).default,WFSLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(9953),r.e(564),r.e(7552),r.e(1214),r.e(2889),r.e(1017),r.e(708),r.e(7431)]).then(r.bind(r,21901))).default,WMSLayer:async()=>(await Promise.all([r.e(7632),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(3910),r.e(1728)]).then(r.bind(r,51904))).default,WMTSLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(7269),r.e(309)]).then(r.bind(r,20309))).default,WebTileLayer:async()=>(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(7269)]).then(r.bind(r,47314))).default};r.d(a,["U",0,t])},7861(e,a,r){r.d(a,{L:()=>n});var t=r(11254);async function n(e,a){return(await(0,t.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}})).data}}}]);
|