@arcgis/core 4.27.0-rc.0 → 4.27.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/OrderBy.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0407bf97ad621c89a734.js +1 -0
- package/assets/esri/core/workers/chunks/0610691a0c0d9fbbd6d2.js +1 -0
- package/assets/esri/core/workers/chunks/0a86c458916e83d6c523.js +1 -0
- package/assets/esri/core/workers/chunks/14145959a3dab1437818.js +1 -0
- package/assets/esri/core/workers/chunks/16db0bc87d87a7313dc4.js +1 -0
- package/assets/esri/core/workers/chunks/183e2e0cb86c1c640d94.js +1 -0
- package/assets/esri/core/workers/chunks/19d329b9d4ec2eff1d13.js +1 -0
- package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +1 -0
- package/assets/esri/core/workers/chunks/1f69fb9687de9ebfcf90.js +1 -0
- package/assets/esri/core/workers/chunks/2154d395f405be3cd3ba.js +1 -0
- package/assets/esri/core/workers/chunks/{33dbba3b7fc648437e50.js → 21e1f3b11e7d363b727a.js} +1 -1
- package/assets/esri/core/workers/chunks/{31a158c73994603c169d.js → 2446e336b1f7256d4fde.js} +1 -1
- package/assets/esri/core/workers/chunks/29290a44fd3b183c24e3.js +1 -0
- package/assets/esri/core/workers/chunks/2b55295590b4a0503749.js +1 -0
- package/assets/esri/core/workers/chunks/{f498c4d4831141125781.js → 2f5639886f577baedbca.js} +1 -1
- package/assets/esri/core/workers/chunks/33901eb1574e46abd9af.js +1 -0
- package/assets/esri/core/workers/chunks/{9c78ad5ab57e0d47ac43.js → 3ba2fcb9110230f8790c.js} +1 -1
- package/assets/esri/core/workers/chunks/3e239bfad611985e50fb.js +1 -0
- package/assets/esri/core/workers/chunks/42f3421740a5479559dc.js +1 -0
- package/assets/esri/core/workers/chunks/471f6eba213412b82840.js +1 -0
- package/assets/esri/core/workers/chunks/53ad34bf32f5f3d4fe18.js +1 -0
- package/assets/esri/core/workers/chunks/{97cdbec7532cfcdf9ad2.js → 595a2baa04d92de59558.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e627c94e57c924e5917.js → 5e6471dd2a08e66b47d0.js} +79 -81
- package/assets/esri/core/workers/chunks/624521961fe1f2c4f2c5.js +1 -0
- package/assets/esri/core/workers/chunks/{212d59764c275c763941.js → 659b7bad7281c0e2aed3.js} +1 -1
- package/assets/esri/core/workers/chunks/6a3d611e8842afbb50ab.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/6cd248d065f6d1616294.js +1 -0
- package/assets/esri/core/workers/chunks/6e562fa57c0347091154.js +1 -0
- package/assets/esri/core/workers/chunks/6f510f28526c73ab453c.js +1 -0
- package/assets/esri/core/workers/chunks/7479dc0c790337af7597.js +1 -0
- package/assets/esri/core/workers/chunks/{e88cff2537be52da6531.js → 74fd2059ddda9083cbcc.js} +1 -1
- package/assets/esri/core/workers/chunks/7dc6774c77c822b68c99.js +1 -0
- package/assets/esri/core/workers/chunks/82a103a8b5382300889d.js +1 -0
- package/assets/esri/core/workers/chunks/83e3d104886b48f00397.js +1 -0
- package/assets/esri/core/workers/chunks/{9849f64793f2ad39366b.js → 9290b0d330f02233d803.js} +1 -1
- package/assets/esri/core/workers/chunks/{3c5a64a545272f148e93.js → 9621b7d8d951aa881686.js} +1 -1
- package/assets/esri/core/workers/chunks/{36df72362b38759b895b.js → 9648a8f2b24f1ca3d637.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad18fb7bb54a0c4bdb38.js → a20361b4d3bdd7d196ca.js} +1 -1
- package/assets/esri/core/workers/chunks/a7fd2a95fde197c06828.js +1 -0
- package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +1 -0
- package/assets/esri/core/workers/chunks/b2a423d9ce8bb784267c.js +1 -0
- package/assets/esri/core/workers/chunks/{b6e173eddaad4244cb5f.js → b31974524932e638df8c.js} +1 -1
- package/assets/esri/core/workers/chunks/{df0453cdfe685d6436cc.js → b6dc41fce601b9d3480e.js} +1 -1
- package/assets/esri/core/workers/chunks/b8e6c64792a512df4c4d.js +1 -0
- package/assets/esri/core/workers/chunks/c6617a937440701c0180.js +1 -0
- package/assets/esri/core/workers/chunks/d8607326a199dd994844.js +1 -0
- package/assets/esri/core/workers/chunks/da57eba2fe25495ea217.js +1 -0
- package/assets/esri/core/workers/chunks/dabd889e064c4e7807fa.js +1 -0
- package/assets/esri/core/workers/chunks/{39e473586579d11d6732.js → e2432871f1329f47465d.js} +1 -1
- package/assets/esri/core/workers/chunks/ee5ee03dd2c7dc940272.js +1 -0
- package/assets/esri/core/workers/chunks/{c83669cf08391a62fb72.js → f1da7b29eecad0e9efae.js} +1 -1
- package/assets/esri/core/workers/chunks/f35895e03c036d67b3ed.js +1 -0
- package/assets/esri/core/workers/chunks/f505ebd4bd3bfb6c790d.js +1 -0
- package/assets/esri/core/workers/chunks/f6e68befe2812b90b40d.js +1 -0
- package/assets/esri/core/workers/chunks/{3c6c082157c916f8ddba.js → ffe61d5a6a9b34bee9d4.js} +1 -1
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +5 -0
- package/assets/esri/themes/base/widgets/_Feature.scss +4 -0
- package/assets/esri/themes/base/widgets/_FeatureContent.scss +9 -2
- package/assets/esri/themes/base/widgets/_Features.scss +5 -7
- package/assets/esri/themes/base/widgets/_Popup.scss +3 -3
- package/assets/esri/themes/base/widgets/_ScaleRangeSlider.scss +1 -0
- package/assets/esri/themes/base/widgets/_Swipe.scss +11 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/DefaultMaterial.glsl.js +3 -2
- package/chunks/SSAO.glsl.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/core/timeUtils.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/meshUtils/bounds.js +5 -0
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshVertexSpaceUtils.js +5 -0
- package/interfaces.d.ts +181 -33
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/controllers/StreamController.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/attributeSupport.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/support/FeatureReductionBinning.js +1 -1
- package/layers/support/FeatureReductionCluster.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/rasterFunctions/colormaps.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/video/videoUtils.js +5 -0
- package/package.json +2 -2
- package/renderers/support/utils.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/smartMapping/symbology/flow.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/effects/EffectBuffer.js +1 -1
- package/symbols/cim/effects/EffectDonut.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/2d/layers/features/Store2D.js +1 -1
- package/views/2d/layers/features/sources/StreamSource.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/II3SMeshView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/webStyleUtils.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +3 -9
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +12 -9
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +10 -10
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderModules/Matrix4sDrawUniform.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/pbrUtils.js +5 -0
- package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/layers/GroupLayerView.js +1 -1
- package/webdoc/support/writeUtils.js +1 -1
- package/widgets/Bookmarks/css.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Feature/FeatureRelationship.js +1 -1
- package/widgets/FeatureForm/EditableInput.d.ts +2 -2
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
- package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/ValuePicker/ValuePickerBaseComponent.js +1 -1
- package/widgets/ValuePicker.js +1 -1
- package/assets/esri/core/workers/chunks/0b03165dbf289797cefa.js +0 -1
- package/assets/esri/core/workers/chunks/0c1c0024879f944f44c4.js +0 -1
- package/assets/esri/core/workers/chunks/13a48796905613bc1679.js +0 -1
- package/assets/esri/core/workers/chunks/1ea1104651ab15f9a13c.js +0 -1
- package/assets/esri/core/workers/chunks/2108cfc7921430f0b805.js +0 -1
- package/assets/esri/core/workers/chunks/2eacca322737aafd8f0c.js +0 -1
- package/assets/esri/core/workers/chunks/39577683e334eb4d904c.js +0 -1
- package/assets/esri/core/workers/chunks/39714837f9d3708e3806.js +0 -1
- package/assets/esri/core/workers/chunks/3fe357df92afa1bee70a.js +0 -1
- package/assets/esri/core/workers/chunks/4d3deeb0ebd0ce8c1215.js +0 -1
- package/assets/esri/core/workers/chunks/576bddc3fa7d91a7e5bd.js +0 -1
- package/assets/esri/core/workers/chunks/623d6710a4f800c622ce.js +0 -1
- package/assets/esri/core/workers/chunks/6782cc3feb713676d544.js +0 -1
- package/assets/esri/core/workers/chunks/6e7178de0b2c3d2f7e6b.js +0 -1
- package/assets/esri/core/workers/chunks/785a6c925f29bc962992.js +0 -1
- package/assets/esri/core/workers/chunks/78ce0b1af62435d8ebf4.js +0 -1
- package/assets/esri/core/workers/chunks/79d2baf392589588ef9b.js +0 -1
- package/assets/esri/core/workers/chunks/7bbdba52157da13a01fc.js +0 -1
- package/assets/esri/core/workers/chunks/7ec6be2bc0f354011e46.js +0 -1
- package/assets/esri/core/workers/chunks/84860b535a70ec448cfe.js +0 -1
- package/assets/esri/core/workers/chunks/9035d9e09a4e7cb94d37.js +0 -1
- package/assets/esri/core/workers/chunks/956b0fef7bc849415354.js +0 -1
- package/assets/esri/core/workers/chunks/9ab98321a4a7eaeeb018.js +0 -1
- package/assets/esri/core/workers/chunks/9cb7a68ff46e5c43e1d2.js +0 -1
- package/assets/esri/core/workers/chunks/a0f7f7f578521970c714.js +0 -1
- package/assets/esri/core/workers/chunks/a60eac45d3c65bd0216f.js +0 -1
- package/assets/esri/core/workers/chunks/aca5260f6984952a6e3d.js +0 -1
- package/assets/esri/core/workers/chunks/b05be356743fa5d24573.js +0 -1
- package/assets/esri/core/workers/chunks/ba6024465308c248170b.js +0 -1
- package/assets/esri/core/workers/chunks/d0983f808008920514f2.js +0 -1
- package/assets/esri/core/workers/chunks/dab832799bc06b0fec34.js +0 -1
- package/assets/esri/core/workers/chunks/e45d36aef2bc69ee9132.js +0 -1
- package/assets/esri/core/workers/chunks/e5bbd4cc5edbf7ab3624.js +0 -1
- package/assets/esri/core/workers/chunks/e700cf4d1f99291a4396.js +0 -1
- package/assets/esri/core/workers/chunks/f398a5cf33c3fd2522a5.js +0 -1
- package/assets/esri/core/workers/chunks/f4ee94a6cde4ea8837f1.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1681],{95401:(e,t,n)=>{n.d(t,{e:()=>l});var r,o,i,s=n(5732),a={exports:{}};r=a,o=function(){function e(e,n,o){o=o||2;var i,s,a,c,u,p,h,f=n&&n.length,g=f?n[0]*o:e.length,m=t(e,0,g,o,!0),d=[];if(!m||m.next===m.prev)return d;if(f&&(m=l(e,n,m,o)),e.length>80*o){i=a=e[0],s=c=e[1];for(var x=o;x<g;x+=o)(u=e[x])<i&&(i=u),(p=e[x+1])<s&&(s=p),u>a&&(a=u),p>c&&(c=p);h=0!==(h=Math.max(a-i,c-s))?1/h:0}return r(m,d,o,i,s,h),d}function t(e,t,n,r,o){var i,s;if(o===M(e,t,n,r)>0)for(i=t;i<n;i+=r)s=Z(i,e[i],e[i+1],s);else for(i=n-r;i>=t;i-=r)s=Z(i,e[i],e[i+1],s);if(s&&v(s,s.next)){var a=s.next;_(s),s=a}return s}function n(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{var o=r.prev;if(_(r),(r=t=o)===r.next)break;n=!0}}while(n||r!==t);return t}function r(e,t,l,c,u,p,h){if(e){!h&&p&&f(e,c,u,p);for(var g,m,d=e;e.prev!==e.next;)if(g=e.prev,m=e.next,p?i(e,c,u,p):o(e))t.push(g.i/l),t.push(e.i/l),t.push(m.i/l),_(e),e=m.next,d=m.next;else if((e=m)===d){h?1===h?r(e=s(n(e),t,l),t,l,c,u,p,2):2===h&&a(e,t,l,c,u,p):r(n(e),t,l,c,u,p,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(y(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(d(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&y(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(e,t,n,r){var o=e.prev,i=e,s=e.next;if(y(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,l=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,c=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,u=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,p=g(a,l,t,n,r),h=g(c,u,t,n,r),f=e.prevZ,m=e.nextZ;f&&f.z>=p&&m&&m.z<=h;){if(f!==e.prev&&f!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,m!==e.prev&&m!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;f&&f.z>=p;){if(f!==e.prev&&f!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;m&&m.z<=h;){if(m!==e.prev&&m!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function s(e,t,r){var o=e;do{var i=o.prev,s=o.next.next;!v(i,s)&&w(i,o,o.next,s)&&T(i,s)&&T(s,i)&&(t.push(i.i/r),t.push(o.i/r),t.push(s.i/r),_(o),_(o.next),o=e=s),o=o.next}while(o!==e);return n(o)}function a(e,t,o,i,s,a){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&x(l,c)){var u=C(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,t,o,i,s,a),void r(u,t,o,i,s,a)}c=c.next}l=l.next}while(l!==e)}function l(e,r,o,i){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=t(e,r[s]*i,s<a-1?r[s+1]*i:e.length,i,!1))===l.next&&(l.steiner=!0),u.push(m(l));for(u.sort(c),s=0;s<u.length;s++)o=n(o=p(u[s],o),o.next);return o}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function p(e,t){var r=function(e,t){var n,r=t,o=e.x,i=e.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(o===s)return n;var l,c=n,u=n.x,p=n.y,f=1/0;r=n;do{o>=r.x&&r.x>=u&&o!==r.x&&d(i<p?o:s,i,u,p,i<p?s:o,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(o-r.x),T(r,e)&&(l<f||l===f&&(r.x>n.x||r.x===n.x&&h(n,r)))&&(n=r,f=l)),r=r.next}while(r!==c);return n}(e,t);if(!r)return t;var o=C(r,e),i=n(r,r.next);let s=u(o);return n(s,s.next),i=u(i),u(t===r?i:t)}function h(e,t){return y(e.prev,e,t.prev)<0&&y(t.next,e,e.next)<0}function f(e,t,n,r){var o=e;do{null===o.z&&(o.z=g(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,s,a,l,c=1;do{for(n=e,e=null,i=null,s=0;n;){for(s++,r=n,a=0,t=0;t<c&&(a++,r=r.nextZ);t++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,c*=2}while(s>1)}(o)}function g(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function m(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function d(e,t,n,r,o,i,s,a){return(o-s)*(t-a)-(e-s)*(i-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function x(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&w(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(T(e,t)&&T(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(y(e.prev,e,t.prev)||y(e,t.prev,t))||v(e,t)&&y(e.prev,e,e.next)>0&&y(t.prev,t,t.next)>0)}function y(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,n,r){var o=A(y(e,t,n)),i=A(y(e,t,r)),s=A(y(n,r,e)),a=A(y(n,r,t));return o!==i&&s!==a||!(0!==o||!b(e,n,t))||!(0!==i||!b(e,r,t))||!(0!==s||!b(n,e,r))||!(0!==a||!b(n,t,r))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function A(e){return e>0?1:e<0?-1:0}function T(e,t){return y(e.prev,e,e.next)<0?y(e,t,e.next)>=0&&y(e,e.prev,t)>=0:y(e,t,e.prev)<0||y(e,e.next,t)<0}function C(e,t){var n=new S(e.i,e.x,e.y),r=new S(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function Z(e,t,n,r){var o=new S(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function _(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function S(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(e,t,n,r){for(var o=0,i=t,s=n-r;i<n;i+=r)o+=(e[s]-e[i])*(e[i+1]+e[s+1]),s=i;return o}return e.deviation=function(e,t,n,r){var o=t&&t.length,i=o?t[0]*n:e.length,s=Math.abs(M(e,0,i,n));if(o)for(var a=0,l=t.length;a<l;a++){var c=t[a]*n,u=a<l-1?t[a+1]*n:e.length;s-=Math.abs(M(e,c,u,n))}var p=0;for(a=0;a<r.length;a+=3){var h=r[a]*n,f=r[a+1]*n,g=r[a+2]*n;p+=Math.abs((e[h]-e[g])*(e[f+1]-e[h+1])-(e[h]-e[f])*(e[g+1]-e[h+1]))}return 0===s&&0===p?0:Math.abs((p-s)/s)},e.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var s=0;s<t;s++)n.vertices.push(e[o][i][s]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n},e},void 0!==(i=o())&&(r.exports=i);const l=(0,s.g)(a.exports)},24882:(e,t,n)=>{n.d(t,{$z:()=>s,KF:()=>u,mi:()=>o});var r=n(1533);function o(e){return(0,r.kJ)(e)?e.length<r.DB?e:i(e):e.length<r.DB?Array.from(e):e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:i(e)}function i(e){let t=!0;for(const n of e){if(n>=65536)return(0,r.kJ)(e)?new Uint32Array(e):e;n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}function s(e){return e<=r.DB?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const l=[0],c=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){if(1===e)return l;if(e<r.DB)return Array.from(new Uint16Array(c.buffer,0,e));if(e<c.length)return new Uint16Array(c.buffer,0,e);if(e>a.length){const t=Math.max(2*a.length,e);a=new Uint32Array(t);for(let e=0;e<a.length;e++)a[e]=e}return new Uint32Array(a.buffer,0,e)}new Uint8Array(65536)},62540:(e,t,n)=>{n.d(t,{Z:()=>y});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),p=n(75215),h=n(65542),f=n(60746),g=n(71630);const m="esri.geometry.support.MeshComponent",d=a.Z.getLogger(m);let x=r=class extends i.wq{static from(e){return(0,p.TJ)(r,e)}constructor(e){super(e),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,g.X)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},d)}castMaterial(e){return(0,p.TJ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?f.Z:h.Z,e)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(e,t){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals};return new r(n)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,o._)([(0,l.Cb)({json:{write:!0}})],x.prototype,"faces",void 0),(0,o._)([(0,c.p)("faces")],x.prototype,"castFaces",null),(0,o._)([(0,l.Cb)({type:h.Z,json:{write:!0}})],x.prototype,"material",void 0),(0,o._)([(0,c.p)("material")],x.prototype,"castMaterial",null),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],x.prototype,"shading",void 0),(0,o._)([(0,l.Cb)({type:Boolean})],x.prototype,"trustSourceNormals",void 0),x=r=(0,o._)([(0,u.j)(m)],x);const y=x},65542:(e,t,n)=>{n.d(t,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(96674),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011)),c=n(91024),u=n(80218);let p=r=class extends s.wq{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,o._)([(0,a.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"color",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"colorTexture",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"colorTextureTransform",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"normalTexture",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"normalTextureTransform",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaMode",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaCutoff",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"doubleSided",void 0),p=r=(0,o._)([(0,l.j)("esri.geometry.support.MeshMaterial")],p);const h=p},60746:(e,t,n)=>{n.d(t,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011)),l=n(65542),c=n(91024),u=n(80218);let p=r=class extends l.Z{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,o._)([(0,s.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"emissiveColor",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"emissiveTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"occlusionTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"metallic",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"roughness",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"metallicRoughnessTextureTransform",void 0),p=r=(0,o._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],p);const h=p},91024:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(43697);n(80442);let o=null,i=!0;function s(){return o||(o=document.createElement("canvas"),o.width=1,o.height=1),o}function a(e,t,n){return n||(n=s()),n.getContext("2d").createImageData(e,t)}var l,c=n(96674),u=n(5600),p=n(75215),h=(n(67676),n(71715)),f=n(52011),g=n(30556),m=n(25929);const d=new WeakMap;let x=0,y=l=class extends c.wq{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,m.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=o}else if(e instanceof HTMLCanvasElement){const r=e.getContext("2d").getImageData(0,0,e.width,e.height),o={type:"canvas-element",imageData:this._encodeImageData(r)};t[n]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,m.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=o}else if(e instanceof ImageData){const r={type:"image-data",imageData:this._encodeImageData(e)};t[n]=r}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),n=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===n)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(d.has(this.data)||d.set(this.data,++x),t(d.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=null!=this.url?this.url.length:0,null!=this.data){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new l(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const n=this.clone();return e.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return function(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(i)try{return new ImageData(e,t,n)}catch(e){i=!1}const o=a(t,n,void 0);return o.data.set(e,0),o}(n,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new l({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new l({data:e}):(0,p.TJ)(l,e)}};(0,r._)([(0,u.Cb)({type:String,json:{write:m.w}})],y.prototype,"url",null),(0,r._)([(0,u.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,u.Cb)()],y.prototype,"data",null),(0,r._)([(0,g.c)("data")],y.prototype,"writeData",null),(0,r._)([(0,h.r)("data")],y.prototype,"readData",null),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],y.prototype,"transparent",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],y.prototype,"wrap",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],y.prototype,"contentHash",null),y=l=(0,r._)([(0,f.j)("esri.geometry.support.MeshTexture")],y);const v=y},80218:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(43697),o=n(2368),i=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011));let l=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshTextureTransform")],l);const c=l},71630:(e,t,n)=>{n.d(t,{Q:()=>f,X:()=>m});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const p="esri.geometry.support.MeshVertexAttributes",h=a.Z.getLogger(p);let f=r=class extends i.wq{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return m(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},h)}castPosition(e){return e&&e instanceof Float32Array&&h.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),m(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},h)}castUv(e){return m(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},h)}castNormal(e){return m(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},h)}castTangent(e){return m(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},h)}clone(){const e={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(e)}clonePositional(){const e={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get memoryUsage(){let e=0;return e+=this.position.byteLength,null!=this.uv&&(e+=this.uv.byteLength),null!=this.normal&&(e+=this.normal.byteLength),null!=this.tangent&&(e+=this.tangent.byteLength),null!=this.color&&(e+=this.color.byteLength),e}};function g(e,t,n,r){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(r.error(o,`Invalid array length, expected a multiple of ${i}`),new n([])):e}function m(e,t,n,r,o){if(!e)return e;if(e instanceof t)return g(e,r,t,o);for(const i of n)if(e instanceof i)return g(new t(e),r,t,o);if(Array.isArray(e))return g(new t(e),r,t,o);{const r=n.map((e=>`'${e.name}'`));return o.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function d(e,t,n){t[n]=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"color",void 0),(0,o._)([(0,c.p)("color")],f.prototype,"castColor",null),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:d}})],f.prototype,"position",void 0),(0,o._)([(0,c.p)("position")],f.prototype,"castPosition",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"uv",void 0),(0,o._)([(0,c.p)("uv")],f.prototype,"castUv",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"normal",void 0),(0,o._)([(0,c.p)("normal")],f.prototype,"castNormal",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"tangent",void 0),(0,o._)([(0,c.p)("tangent")],f.prototype,"castTangent",null),f=r=(0,o._)([(0,u.j)(p)],f)},84470:(e,t,n)=>{n.d(t,{CP:()=>a,JG:()=>g,LL:()=>l,NZ:()=>c,fV:()=>m,vj:()=>x,yT:()=>v,zE:()=>y});var r=n(3172),o=n(67676),i=n(95330),s=n(2981);class a{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,o.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const n=await Promise.all(t.map((t=>t.toBlob(e))));return(0,i.k_)(e),new Blob(n)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,r.default)(this.partUrl,{responseType:"blob"});return(0,i.k_)(e),t}}function c(e){return function(e){return!!e&&(Array.isArray(e)?e.some(f):f(e))}(e?.source)}function u(e){return!!Array.isArray(e)&&e.every((e=>e instanceof a))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,h=/\.(gltf|glb)/i;function f(e){if(e instanceof File){const{type:t,name:n}=e;return p.test(t)||h.test(n)}return p.test(e.assetMimeType)||h.test(e.assetName)}function g(e,t){if(!e)return!1;const{source:n}=e;return function(e,t){return Array.isArray(e)?e.every((e=>d(e,t))):d(e,t)}(n,t)}function m(e,t){if(e===t)return!0;const{source:n}=e,{source:r}=t;if(n===r)return!0;if(u(n)&&u(r)){if(n.length!==r.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...n].sort(e),o=[...r].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(o[e]))return!1;return!0}return!1}function d(e,t){return e instanceof a&&e.isOnService(t)}function x(e,t){return e instanceof File?(0,s.Ow)(e.name,t)??(0,s.S0)(e.type,t):(0,s.S0)(e.assetMimeType,t)??(0,s.Ow)(e.assetName,t)}function y(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},47545:(e,t,n)=>{n.d(t,{d:()=>i});var r=n(22021),o=n(24882);function i(e,t,n){const i=Array.isArray(e),u=i?e.length/t:e.byteLength/(4*t),p=i?e:new Uint32Array(e,0,u*t),h=n?.minReduction??0,f=n?.originalIndices||null,g=f?f.length:0,m=n?.componentOffsets||null;let d=0;if(m)for(let e=0;e<m.length-1;e++){const t=m[e+1]-m[e];t>d&&(d=t)}else d=u;const x=Math.floor(1.1*d)+1;(null==c||c.length<2*x)&&(c=new Uint32Array((0,r.Sf)(2*x)));for(let e=0;e<2*x;e++)c[e]=0;let y=0;const v=!!m&&!!f,w=v?g:u;let b=(0,o.$z)(u);const A=new Uint32Array(g),T=1.96;let C=0!==h?Math.ceil(4*T*T/(h*h)*h*(1-h)):w,Z=1,_=m?m[1]:w;for(let e=0;e<w;e++){if(e===C){const t=1-y/e;if(t+T*Math.sqrt(t*(1-t)/e)<h)return null;C*=2}if(e===_){for(let e=0;e<2*x;e++)c[e]=0;if(f)for(let e=m[Z-1];e<m[Z];e++)A[e]=b[f[e]];_=m[++Z]}const n=v?f[e]:e,r=n*t,o=l(p,r,t);let i=o%x,a=y;for(;0!==c[2*i+1];){if(c[2*i]===o){const e=c[2*i+1]-1;if(s(p,r,e*t,t)){a=b[e];break}}i++,i>=x&&(i-=x)}a===y&&(c[2*i]=o,c[2*i+1]=n+1,y++),b[n]=a}if(0!==h&&1-y/u<h)return null;if(v){for(let e=m[Z-1];e<A.length;e++)A[e]=b[f[e]];b=(0,o.mi)(A)}const S=i?new Array(y):new Uint32Array(y*t);y=0;for(let e=0;e<w;e++)b[e]===y&&(a(p,(v?f[e]:e)*t,S,y*t,t),y++);if(f&&!v){const e=new Uint32Array(g);for(let t=0;t<e.length;t++)e[t]=b[f[t]];b=(0,o.mi)(e)}return{buffer:Array.isArray(S)?S:S.buffer,indices:b,uniqueCount:y}}function s(e,t,n,r){for(let o=0;o<r;o++)if(e[t+o]!==e[n+o])return!1;return!0}function a(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[t+i]}function l(e,t,n){let r=0;for(let o=0;o<n;o++)r=e[t+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null},91681:(e,t,n)=>{n.r(t),n.d(t,{assetMapFromAssetMapsJSON:()=>qe,extractMesh:()=>Ve,meshFeatureSetFromJSON:()=>Be});var r,o,i=n(38171),s=n(92604),a=n(30175),l=n(65617),c=n(6570),u=n(43697),p=n(20102),h=n(3920),f=n(83379),g=n(609),m=n(95330),d=n(17445),x=n(5600),y=(n(75215),n(67676),n(80442),n(52011)),v=n(9361),w=n(94139),b=n(38913),A=n(3709),T=n(62540),C=n(85872),Z=n(50567),_=n(84555),S=n(2674),M=n(71630),R=n(95401),F=n(86662),L=n(83025),j=n(24882),E=n(47545);function D(e,t,n){const o=e.length,i=new Array(o),s=new Array(o),a=new Array(o);let l=0,c=0,u=0,p=0;for(let t=0;t<o;++t)p+=e[t].length;const h=(0,L.bg)(3*p);let f=0;for(let p=o-1;p>=0;p--){const g=e[p],m=n===r.CCW_IS_HOLE&&P(g);if(m&&1!==o)i[l++]=g;else{let e=g.length;for(let t=0;t<l;++t)e+=i[t].length;const n={index:f,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};n.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:f,count:g.length}),f=m?U(g,g.length-1,-1,h,f,g.length,t):U(g,0,1,h,f,g.length,t);for(let e=0;e<l;++e){const r=i[e];n.holeIndices[e]=f,n.pathLengths[e+1]=r.length,r.length>0&&(a[u++]={index:f,count:r.length}),f=U(r,0,1,h,f,r.length,t)}l=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<l;++e){const n=i[e];n.length>0&&(a[u++]={index:f,count:n.length}),f=U(n,0,1,h,f,n.length,t)}return s.length=c,a.length=u,{position:h,polygons:s,outlines:a}}function U(e,t,n,r,o,i,s){o*=3;for(let a=0;a<i;++a){const i=e[t];r[o++]=i[0],r[o++]=i[1],r[o++]=s?i[2]:0,t+=n}return o/3}function P(e){return!(0,F.bu)(e,!1,!1)}(o=r||(r={}))[o.NONE=0]="NONE",o[o.CCW_IS_HOLE=1]="CCW_IS_HOLE";var O=n(66459);let N=null;function I(e,t){let n=1/0,r=1/0,o=1/0,i=-1/0,s=-1/0,a=-1/0;const l=e.length;let u=0;for(;u<l;){const t=e[u++],l=e[u++],c=e[u++];n=Math.min(n,t),r=Math.min(r,l),o=Math.min(o,c),i=Math.max(i,t),s=Math.max(s,l),a=Math.max(a,c)}return new c.Z({xmin:n,ymin:r,zmin:o,xmax:i,ymax:s,zmax:a,spatialReference:t})}var k=n(17896),z=n(44547),W=n(13442);const H="esri.geometry.support.meshUtils.centerAt";const $=(0,l.c)(),B=(0,l.c)(),V=(0,l.c)();var q=n(81271);function G(e){const t=(0,q.Yd)(e.url);return n=>{const r=(0,q.PF)(n,t,t),o=r?r.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??n}}function J(e){return Q.fromBlob(e)}const K=/^(model\/gltf\+json)|(model\/gltf-binary)$/,Y=/\.(gltf|glb)/i;function X(e){const t=new Map;let n=null;for(const{name:r,mimeType:o,source:i}of e)(null==n||K.test(o)||Y.test(r))&&(n=i.url),t.set(r,i.url),i.files.forEach(((e,n)=>t.set(n,e)));if(null==n)throw new p.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new Q(n,(()=>e.forEach((({source:e})=>e.dispose()))),t)}class Q{constructor(e,t=(()=>{}),n=new Map){this.url=e,this.dispose=t,this.files=n}static fromBlob(e){const t=URL.createObjectURL(e);return new Q(t,(()=>URL.revokeObjectURL(t)))}}var ee=n(2368),te=n(46791),ne=n(84470);let re=class extends ee.j{constructor(){super(),this.externalSources=new te.Z,this._explicitDisplaySource=null}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,ne.NZ)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every((t=>!(0,ne.fV)(t,e)))&&this.externalSources.add(e)}clearSources(){this.displaySource=null,this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,ne.JG)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(ne.NZ)}};(0,u._)([(0,x.Cb)()],re.prototype,"externalSources",void 0),(0,u._)([(0,x.Cb)()],re.prototype,"displaySource",null),(0,u._)([(0,x.Cb)()],re.prototype,"_implicitDisplaySource",null),(0,u._)([(0,x.Cb)()],re.prototype,"_explicitDisplaySource",void 0),re=(0,u._)([(0,y.j)("esri.geometry.support.meshUtils.Metadata")],re);var oe=n(21787),ie=n(46521),se=n(13598),ae=n(58995),le=n(56493);function ce(e,t){if(e)for(let n=0;n<e.length;n+=3)for(let r=0;r<3;r++)e[n+r]+=t[r]}const ue=(0,l.c)(),pe=(0,se.c)(),he=(0,ie.c)(),fe={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function ge(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null==t)return;const n="number"==typeof t?[t,t,t]:[null!=t.width?t.width:1,null!=t.depth?t.depth:1,null!=t.height?t.height:1];ye[0]=n[0],ye[4]=n[1],ye[8]=n[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)xe[n]=e.position[t+n];(0,k.t)(xe,xe,ye);for(let n=0;n<3;n++)e.position[t+n]=xe[n]}if(n[0]!==n[1]||n[1]!==n[2]){ye[0]=1/n[0],ye[4]=1/n[1],ye[8]=1/n[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)xe[n]=e.normal[t+n];(0,k.t)(xe,xe,ye),(0,k.n)(xe,xe);for(let n=0;n<3;n++)e.normal[t+n]=xe[n]}}}(e,n?.size);const{vertexAttributes:r,vertexSpace:o,transform:i}=(0,O.w1)(e,t,n);return{vertexAttributes:new M.Q({...r,uv:e.uv}),vertexSpace:o,transform:i,components:[new T.Z({faces:e.faces,material:n&&n.material||null})],spatialReference:t.spatialReference}}const me={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},de={south:0,east:1,north:2,west:3,up:4,down:5},xe=(0,l.c)(),ye=(0,ie.c)();var ve=n(52138);const we="esri.geometry.support.meshUtils.rotate";function be(e,t,n,r=l.Z){if(null!=e){(0,ve.d)(Ze,(0,A.WH)(t),(0,A.ZZ)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)Ae[n]=e[t+n]-r[n];(0,k.m)(Ae,Ae,Ze);for(let n=0;n<3;n++)e[t+n]=Ae[n]+r[n]}}}const Ae=(0,l.c)(),Te=(0,l.c)(),Ce=(0,A.Ue)(),Ze=(0,se.c)(),_e=(0,ie.c)(),Se=(0,l.c)(),Me="esri.geometry.support.meshUtils.scale";function Re(e,t,n=l.Z){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Fe[t]=e[r+t]-n[t];(0,k.g)(Fe,Fe,t);for(let t=0;t<3;t++)e[r+t]=Fe[t]+n[t]}}const Fe=(0,l.c)(),Le=(0,l.c)(),je=(0,l.c)();var Ee;const De="esri.geometry.Mesh",Ue={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:Z.Z,"georeferenced-relative":C.Z,local:_.Z}};let Pe=Ee=class extends((0,h.p)(f.Z.LoadableMixin((0,g.v)(v.Z)))){constructor(e){super(e),this.components=null,this.vertexSpace=new Z.Z,this.transform=null,this.metadata=new re,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new M.Q,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add((0,d.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:n,vertexSpace:r}=this,o=n.position;if(0===o.length||e&&0===e.length)return new c.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if("local"===r.type){const{_untransformedExtent:e,transform:n}=this;return function({xmin:e,xmax:t,ymin:n,ymax:r,zmin:o,zmax:i},s,a,l){o??=0,i??=0,N??=new Float64Array(24);const c=N;return c[0]=e,c[1]=n,c[2]=o,c[3]=e,c[4]=r,c[5]=o,c[6]=t,c[7]=r,c[8]=o,c[9]=t,c[10]=n,c[11]=o,c[12]=e,c[13]=n,c[14]=i,c[15]=e,c[16]=r,c[17]=i,c[18]=t,c[19]=r,c[20]=i,c[21]=t,c[22]=n,c[23]=i,(0,O.iV)(l,s,a,c,l,c),I(c,l)}(e,n,r,t)}if("georeferenced-relative"===r.type){const{transform:e}=this;return I((0,O.iV)(t,e,r,o,t),t)}return I(o,t)}get _untransformedExtent(){return I(this.vertexAttributes.position,this.spatialReference)}get anchor(){const{vertexSpace:e}=this;if(e.isRelative)return e.getOriginPoint(this.spatialReference);const{center:t,zmin:n}=this._transformedExtent;return new w.Z({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:e}=this;return e.isRelative?e.getOriginPoint(this.spatialReference):this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(T.Z.from(e)),this.notifyChange("components")):s.Z.getLogger(this).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.Z.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}else s.Z.getLogger(this).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,n,r){return(0,A.qw)(e,t,n,Ne),function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position||0===t[3])return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,W.A)(o,we,n);const r=n?.origin??e.origin;e.transform??=new S.Z,function(e,t,n,r){const o=t.origin,i=(0,k.s)(Ae,r.x,r.y,r.z??0),s=(0,k.b)(Ae,i,o);e.applyLocalInverse(s,Te),e.rotation=(0,A.qC)(e.rotation,n,(0,A.Ue)()),e.applyLocalInverse(s,s),(0,k.b)(s,s,Te),e.translation=(0,k.a)((0,l.c)(),e.translation,s)}(e.transform,o,t,r)}else{const o=n?.origin??e.origin;(0,W.h)(r,n)?function(e,t,n){const r=e.spatialReference,o=(0,ae.rS)(r),i=Se;(0,z.KC)(n,i,o)||(0,z.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,z.Bm)(o,i,Ze,o),(0,oe.f)(_e,Ze);const h=Ce;(0,k.t)((0,A.ZZ)(Ce),(0,A.ZZ)(t),_e),h[3]=t[3],(0,le.XO)(s,r,c),null!=a&&null!=u&&(0,le.Iz)(a,s,c,r,u),null!=l&&null!=p&&(0,le.wi)(l,s,c,r,p),be(c,h,3,i),(0,le.To)(c,s,r),null!=a&&null!=u&&(be(u,h,3),(0,le.Yk)(u,s,c,r,a)),null!=l&&null!=p&&(be(p,h,4),(0,le.M2)(p,s,c,r,l)),e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=Se;if(!(0,z.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,s.Z.getLogger(we).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}be(e.vertexAttributes.position,t,3,r),be(e.vertexAttributes.normal,t,3),be(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,o)}}(this,Ne,r),this}offset(e,t,n,r){return this.loaded?(Oe[0]=e,Oe[1]=t,Oe[2]=n,function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e;r.isRelative?((0,W.A)(r,"esri.geometry.support.meshUtils.offset",n),function(e,t){const n=e.origin;e.origin=(0,k.a)((0,l.c)(),n,t)}(r,t)):(0,W.h)(e.spatialReference,n)?function(e,t){const n=e.spatialReference,r=e.vertexAttributes.position,o=e.vertexAttributes.normal,i=e.vertexAttributes.tangent,s=new Float64Array(r.length),a=null!=o?new Float32Array(o.length):null,l=null!=i?new Float32Array(i.length):null,c=e.extent.center,u=ue;(0,z.Bm)(n,[c.x,c.y,c.z],pe,(0,ae.rS)(n)),(0,oe.f)(he,pe),(0,k.t)(u,t,he),(0,le.XO)(r,n,s),null!=o&&null!=a&&(0,le.Iz)(o,r,s,n,a),null!=i&&null!=l&&(0,le.wi)(i,r,s,n,l),ce(s,u),(0,le.To)(s,r,n),null!=o&&null!=a&&(0,le.Yk)(a,r,s,n,o),null!=i&&null!=l&&(0,le.M2)(l,r,s,n,i),e.vertexAttributesChanged()}(e,t):function(e,t){ce(e.vertexAttributes.position,t),e.vertexAttributesChanged()}(e,t)}(this,Oe,r),this):(s.Z.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,W.A)(o,Me,n);const r=n?.origin??e.origin;e.transform??=new S.Z,function(e,t,n,r){const o=t.origin,i=(0,k.s)(Fe,r.x,r.y,r.z),s=(0,k.b)(Fe,i,o);e.applyLocalInverse(s,Le);const a=(0,k.g)((0,l.c)(),e.scale,n);e.scale=a,e.applyLocalInverse(s,s),(0,k.b)(s,s,Le),e.translation=(0,k.a)((0,l.c)(),e.translation,s)}(e.transform,o,t,r)}else{const o=(0,W.h)(r,n),i=n?.origin??e.origin;o?function(e,t,n){const r=e.spatialReference,o=(0,ae.rS)(r),i=je;(0,z.KC)(n,i,o)||(0,z.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,le.XO)(s,r,c),null!=a&&null!=u&&(0,le.Iz)(a,s,c,r,u),null!=l&&null!=p&&(0,le.wi)(l,s,c,r,p),Re(c,t,i),(0,le.To)(c,s,r),null!=a&&null!=u&&(0,le.Yk)(u,s,c,r,a),null!=l&&null!=p&&(0,le.M2)(p,s,c,r,l),e.vertexAttributesChanged()}(e,t,i):function(e,t,n){const r=je;if(!(0,z.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,s.Z.getLogger(Me).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Re(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,i)}}(this,e,t),this):(s.Z.getLogger(this).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e,o=n?.origin??e.origin;r.isRelative?((0,W.A)(r,H,n),function(e,t,n){const{vertexSpace:r}=e;if(!r.isRelative)return;const o=B,i=$;if(!(0,z.KC)(t,i,e.spatialReference))return void s.Z.getLogger(H).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`);if(!(0,z.KC)(n,o,e.spatialReference)){const t=e.origin;o[0]=t.x,o[1]=t.y,o[2]=t.z,s.Z.getLogger(H).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const a=(0,k.b)(V,i,o),c=r.origin;r.origin=(0,k.a)((0,l.c)(),c,a)}(e,t,o)):(0,W.h)(e.spatialReference,n)?function(e,t,n){const r=(0,O.FF)(e.vertexAttributes,n,{geographic:!0}),{position:o,normal:i,tangent:s}=(0,O.iv)(r,t,{geographic:!0});e.vertexAttributes.position=o,e.vertexAttributes.normal=i,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=B,o=$;if((0,z.KC)(t,o,e.spatialReference)){if(!(0,z.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,s.Z.getLogger(H).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let o=0;o<3;o++)e[r+o]+=t[o]-n[o]})(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else s.Z.getLogger(H).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(e,t,o)}(this,e,t),this):(s.Z.getLogger(this).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){const{source:o}=t,{loadGLTFMesh:i}=await(0,m.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r),s=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new p.Z("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return X(e.map((e=>({name:e.name,mimeType:e.type,source:J(e)}))))}(e):async function(e,t){const n=await(0,m.WW)(e.map((async e=>{const n=await async function(e,t){const{parts:n}=e;if(1===n.length)return new Q(n[0].partUrl);const r=await e.toBlob(t);return(0,m.k_)(t),Q.fromBlob(r)}(e);return(0,m.k_)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}})));if((0,m.Hc)(t))throw n.forEach((e=>e.source.dispose())),(0,m.zE)();return X(n)}(e,t)}return J(e)}(o,r);(0,m.k_)(r);const a=i(new w.Z({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:G(s),useTransform:!0,signal:r?.signal});a.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:l,components:c}=await a;e.vertexAttributes=l,e.components=c}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,n=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,n)))}const n={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Ee(n)}cloneShallow(){return new Ee({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=n.e(7277).then(n.bind(n,7277)),r=this.load(),o=await Promise.all([t,r]),{toBinaryGLTF:i}=o[0];return i(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof w.Z))return s.Z.getLogger(De).error(".createBox()","expected location to be a Point instance"),null;const n=new Ee(ge(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=me,r=4*e.length,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,p=0;for(let r=0;r<e.length;r++){const h=e[r],f=l/3;for(const e of t)a[p++]=f+e;const g=h.corners;for(let e=0;e<4;e++){const t=g[e];let r=0;s[u++]=.25*n[e][0]+h.uvOrigin[0],s[u++]=h.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==h.axis[e]?(o[l++]=.5*h.axis[e],i[c++]=h.axis[e]):(o[l++]=.5*t[r++],i[c++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,o=de[t],i=6*o,s=new Array(6),a=new Array(r.length-6);let l=0,c=0;for(let e=0;e<r.length;e++)e>=i&&e<i+6?s[l++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),n=4*o*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new T.Z({faces:s,material:n.material}),new T.Z({faces:a})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof w.Z?new Ee(ge(function(e=0){const t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((t-1)*n*2*3);let l=0,c=0,u=0,p=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,h=Math.cos(r),f=Math.sin(r);xe[2]=f;const g=0===e||e===t,m=g?n-1:n;for(let r=0;r<=m;r++){const f=r/m*2*Math.PI;xe[0]=-Math.sin(f)*h,xe[1]=Math.cos(f)*h;for(let e=0;e<3;e++)o[l]=.5*xe[e],i[l]=xe[e],++l;s[c++]=(r+(g?.5:0))/n,s[c++]=e/t,0!==e&&r!==n&&(e!==t&&(a[u++]=p,a[u++]=p+1,a[u++]=p-n),1!==e&&(a[u++]=p,a[u++]=p-n,a[u++]=p-n-1)),p++}}return{position:o,normal:i,uv:s,faces:a}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(De).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof w.Z?new Ee(ge(function(e=0){const t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),o=new Float32Array(3*n),i=new Float32Array(2*n),s=new Uint32Array(4*t*3);let a=0,l=0,c=0,u=0,p=0;for(let e=0;e<=5;e++){const n=0===e||5===e,h=e<=1||e>=4,f=2===e||4===e,g=n?t-1:t;for(let m=0;m<=g;m++){const d=m/g*2*Math.PI,x=n?0:.5;xe[0]=x*Math.sin(d),xe[1]=x*-Math.cos(d),xe[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=xe[t],o[l++]=h?2===t?e<=1?1:-1:0:2===t?0:xe[t]/x;i[c++]=(m+(n?.5:0))/t,i[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,f||0===e||m===t||(5!==e&&(s[u++]=p,s[u++]=p+1,s[u++]=p-t),1!==e&&(s[u++]=p,s[u++]=p-t,s[u++]=p-t-1)),p++}}return{position:r,normal:o,uv:i,faces:s}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(De).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof w.Z))return s.Z.getLogger(De).error(".createPlane()","expected location to be a Point instance"),null;const n=t?.facing??"up",r=function(e,t){const n="number"==typeof t?t:null!=t?t.width:1,r="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,t?.size);return new Ee(ge(function(e){const t=fe.facingAxisOrderSwap[e],n=fe.position,r=fe.normal,o=new Float64Array(n.length),i=new Float32Array(r.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],c=Math.abs(l)-1,u=l>=0?1:-1;o[s]=n[e+c]*u,i[s]=r[e+c]*u,s++}}return{position:o,normal:i,uv:new Float32Array(fe.uv),faces:new Uint32Array(fe.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof b.Z))return s.Z.getLogger(De).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const n=function(e){const t=D(e.rings,e.hasZ,r.CCW_IS_HOLE),n=new Array;let o=0,i=0;for(const e of t.polygons){const r=e.count,s=e.index,a=(0,L.Rq)(t.position,3*s,3*r),l=e.holeIndices.map((e=>e-s)),c=(0,j.mi)((0,R.e)(a,l,3));n.push({position:a,faces:c}),o+=a.length,i+=c.length}const s=function(e,t,n){if(1===e.length)return e[0];const r=(0,L.bg)(t),o=new Array(n);let i=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)r[i++]=t.position[e];for(const e of t.faces)o[s++]=e+a;a=i/3}return{position:r,faces:(0,j.mi)(o)}}(n,o,i),a=Array.isArray(s.position)?(0,E.d)(s.position,3,{originalIndices:s.faces}):(0,E.d)(s.position.buffer,6,{originalIndices:s.faces});return s.position=(0,L.QZ)(new Float64Array(a.buffer)),s.faces=a.indices,s}(e);return new Ee({vertexAttributes:new M.Q({position:n.position}),components:[new T.Z({faces:n.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new Z.Z})}static async createFromGLTF(e,t,r){if(!(e instanceof w.Z))throw s.Z.getLogger(De).error(".createfromGLTF()","expected location to be a Point instance"),new p.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,m.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r);return new Ee(await o(e,t,r))}static async createFromFiles(e,t,n){if(!(e instanceof w.Z)){const e="Expected location to be a Point instance";throw s.Z.getLogger(De).error(".createFromFiles()",e),new p.Z("invalid-input",e)}const r=Ee.createWithExternalSource(e,t),o=n?.layer;if(!o){const e="A layer is needed to convert the files";throw s.Z.getLogger(De).error(".createFromFiles()",e),new p.Z("invalid-input",e)}const[i]=await o.uploadAssets([r],n);return i}static createWithExternalSource(e,t,n){const r=n?.extent??null,{x:o,y:i,z:s,spatialReference:a}=e,l=n?.transform?.clone()??new S.Z,c=n?.vertexSpace??new _.Z({origin:[o,i,s??0]}),u={source:t,extent:r},p=new re;return p.externalSources.push(u),new Ee({metadata:p,transform:l,vertexSpace:c,spatialReference:a})}static createIncomplete(e,t){const{x:n,y:r,z:o,spatialReference:i}=e,s=t?.transform?.clone()??new S.Z,a=t?.vertexSpace??new _.Z({origin:[n,r,o??0]}),l=new Ee({transform:s,vertexSpace:a,spatialReference:i});return l.addResolvingPromise(Promise.reject(new p.Z("mesh-incomplete","Mesh resources are not complete"))),l}};(0,u._)([(0,x.Cb)({type:[T.Z],json:{write:!0}})],Pe.prototype,"components",void 0),(0,u._)([(0,x.Cb)({nonNullable:!0,types:Ue,constructOnly:!0,json:{write:!0}})],Pe.prototype,"vertexSpace",void 0),(0,u._)([(0,x.Cb)({type:S.Z,json:{write:!0}})],Pe.prototype,"transform",void 0),(0,u._)([(0,x.Cb)({constructOnly:!0})],Pe.prototype,"metadata",void 0),(0,u._)([(0,x.Cb)()],Pe.prototype,"hasExtent",null),(0,u._)([(0,x.Cb)()],Pe.prototype,"_transformedExtent",null),(0,u._)([(0,x.Cb)()],Pe.prototype,"_untransformedExtent",null),(0,u._)([(0,x.Cb)()],Pe.prototype,"anchor",null),(0,u._)([(0,x.Cb)()],Pe.prototype,"origin",null),(0,u._)([(0,x.Cb)({readOnly:!0,json:{read:!1}})],Pe.prototype,"extent",null),(0,u._)([(0,x.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Pe.prototype,"hasZ",void 0),(0,u._)([(0,x.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Pe.prototype,"hasM",void 0),(0,u._)([(0,x.Cb)({type:M.Q,nonNullable:!0,json:{write:!0}})],Pe.prototype,"vertexAttributes",void 0),Pe=Ee=(0,u._)([(0,y.j)(De)],Pe);const Oe=(0,l.c)(),Ne=(0,A.Ue)(),Ie=Pe;var ke,ze,We=n(82971),He=n(2981),$e=n(74889);function Be(e,t,n){const r=n.features;n.features=[],delete n.geometryType;const o=$e.Z.fromJSON(n);if(o.geometryType="mesh",!n.assetMaps)return o;const s=qe(t,n.assetMaps),a=e.sourceSpatialReference??We.Z.WGS84,l=n.globalIdFieldName,{outFields:c}=e,u=null!=c&&c.length>0?(p=c.includes("*")?null:new Set(c),({attributes:e})=>{if(!e)return{};if(!p)return e;for(const t in e)p.has(t)||delete e[t];return e}):()=>({});var p;for(const e of r){const n=Ve(e,l,a,t,s);null!=n&&o.features.push(new i.Z({geometry:n,attributes:u(e)}))}return o}function Ve(e,t,n,r,o){const i=e.attributes[t],s=o.get(i);if(null==s||!e.geometry)return null;const{originPoint:a,originVector:u}=function({attributes:e},t,{transformFieldRoles:n}){const r=e[n.originX],o=e[n.originY],i=e[n.originZ];return{originPoint:new w.Z({x:r,y:o,z:i,spatialReference:t}),originVector:(0,l.f)(r,o,i)}}(e,n,r),p=c.Z.fromJSON(e.geometry);p.spatialReference=n;const h=function(e,{transformFieldRoles:t}){return new S.Z({translation:[e[t.translationX],-e[t.translationZ],e[t.translationY]],rotationAxis:[e[t.rotationX],e[t.rotationZ],e[t.rotationY]],rotationAngle:e[t.rotationDeg],scale:[e[t.scaleX],e[t.scaleY],e[t.scaleZ]]})}(e.attributes,r),f=s.projectVertices?new C.Z({origin:u}):new _.Z({origin:u}),g=function(e){const t=Array.from(e.files.values()),n=new Array;for(const e of t){if(e.status!==ke.COMPLETED)return null;const t=new Array;for(const n of e.parts){if(!n)return null;t.push(new ne.LL(n.url,n.hash))}n.push(new ne.CP(e.name,e.mimeType,t))}return n}(s);return g?Ie.createWithExternalSource(a,g,{extent:p,transform:h,vertexSpace:f}):Ie.createIncomplete(a,{extent:p,transform:h,vertexSpace:f})}function qe(e,t){const n=new Map;for(const r of t){const t=r.parentGlobalId;if(null==t)continue;const o=r.assetName,i=r.assetType,l=r.assetHash,c=r.assetURL,u=r.conversionStatus,p=r.seqNo,h=(0,He.d1)(i,e.supportedFormats);if(!h){s.Z.getLogger("esri.rest.support.meshFeatureSet").error("mesh-feature-set:unknown-format",`Service returned an asset of type ${i}, but it does not list it as a supported type`);continue}const f=(0,a.s1)(n,t,(()=>({projectVertices:Je(r.flags).projectVertices,files:new Map})));(0,a.s1)(f.files,o,(()=>({name:o,type:i,mimeType:h,status:Ge(u),parts:[]}))).parts[p]={hash:l,url:c}}return n}function Ge(e){switch(e){case"COMPLETED":case"SUBMITTED":return ke.COMPLETED;case"INPROGRESS":return ke.PENDING;default:return ke.FAILED}}function Je(e){return{projectVertices:e.includes("PROJECT_VERTICES")}}(ze=ke||(ke={}))[ze.FAILED=0]="FAILED",ze[ze.PENDING=1]="PENDING",ze[ze.COMPLETED=2]="COMPLETED"}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9059,5732],{92835:(e,t,i)=>{i.d(t,{Z:()=>g});var s,r=i(43697),n=i(96674),l=i(70586),a=i(35463),o=i(5600),h=(i(75215),i(67676),i(80442),i(71715)),u=i(52011),c=i(30556);let d=s=class extends n.wq{static get allTime(){return f}static get empty(){return p}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,i=null!=this.end?this.end.getTime():this.end,s=null!=e.start?e.start.getTime():e.start,r=null!=e.end?e.end.getTime():e.end;return t===s&&i===r}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,l.yw)(this.start,(t=>(0,a.JE)(t,e))),i=(0,l.yw)(this.end,(t=>{const i=(0,a.JE)(t,e);return t.getTime()===i.getTime()?i:(0,a.Nm)(i,1,e)}));return new s({start:t,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let l,a;if(r>=t&&r<=i?l=r:t>=r&&t<=n&&(l=t),i>=r&&i<=n?a=i:n>=t&&n<=i&&(a=n),null!=l&&null!=a&&!isNaN(l)&&!isNaN(a)){const e=new s;return e.start=l===-1/0?null:new Date(l),e.end=a===1/0?null:new Date(a),e}return s.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:r,end:n}=this;return null!=r&&(i.start=(0,a.Nm)(r,e,t)),null!=n&&(i.end=(0,a.Nm)(n,e,t)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return f.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:i})}};(0,r._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,r._)([(0,h.r)("end")],d.prototype,"readEnd",null),(0,r._)([(0,c.c)("end")],d.prototype,"writeEnd",null),(0,r._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,r._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,r._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,r._)([(0,h.r)("start")],d.prototype,"readStart",null),(0,r._)([(0,c.c)("start")],d.prototype,"writeStart",null),d=s=(0,r._)([(0,u.j)("esri.TimeExtent")],d);const f=new d,p=new d({start:void 0,end:void 0}),g=d},5732:(e,t,i)=>{i.d(t,{c:()=>s,g:()=>r});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},46791:(e,t,i)=>{i.d(t,{Z:()=>L});var s,r=i(43697),n=i(3894),l=i(32448),a=i(22974),o=i(70586),h=i(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(s||(s={}));var u,c=i(1654),d=i(75215),f=i(58971),p=i(5600),g=i(52421),m=i(52011),y=i(10661);const _=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),b=()=>{};function v(e){return e?e instanceof T?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function C(e,t,i,s){const r=Math.min(e.length-i,t.length-s);let n=0;for(;n<r&&e[i+n]===t[s+n];)n++;return n}function E(e,t,i,s){t&&t.forEach(((t,r,n)=>{e.push(t),E(e,i.call(s,t,r,n),i,s)}))}const A=new Set,M=new Set,D=new Set,I=new Map;let O=0,T=u=class extends l.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof u}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new y.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:O++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof u?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(s.ADD)||(this._splice(0,this.length,v(e)),this._emitAfterChanges(s.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=b,i.removed=!0,e.splice(e.indexOf(i),1)}}}return this._emitter.on(e,t)}once(e,t){const i=this.on(e,t);return{remove(){i.remove()}}}add(e,t){if((0,f.it)(this._observable),this._emitBeforeChanges(s.ADD))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(s.ADD),this}addMany(e,t=this._items.length){if((0,f.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(s.ADD))return this;const i=this.getNextIndex(t);return this._splice(i,0,v(e)),this._emitAfterChanges(s.ADD),this}at(e){if((0,f.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(s.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.map(a.d9)})}concat(...e){(0,f.it)(this._observable);const t=e.map(v);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const i=(0,o.j0)(this._splice(0,this.length)),r=i.length;for(let s=0;s<r;s++)e.call(t,i[s],s,i);this._emitAfterChanges(s.REMOVE)}every(e,t){return(0,f.it)(this._observable),this._items.every(e,t)}filter(e,t){let i;return(0,f.it)(this._observable),i=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:i})}find(e,t){return(0,f.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.it)(this._observable);const i=[];return E(i,this,e,t),new u(i)}forEach(e,t){return(0,f.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.it)(this._observable),this._items[e]}getNextIndex(e){(0,f.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.it)(this._observable);const i=this._items.map(e,t);return new u({items:i})}reorder(e,t=this.length-1){(0,f.it)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(s.MOVE))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(s.MOVE)}return e}}pop(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(s.REMOVE),e}push(...e){return(0,f.it)(this._observable),this._emitBeforeChanges(s.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(s.ADD)),this.length}reduce(e,t){(0,f.it)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,f.it)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,f.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(s.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(s.REMOVE),t}removeMany(e){if((0,f.it)(this._observable),!e||!e.length||this._emitBeforeChanges(s.REMOVE))return[];const t=e instanceof u?e.toArray():e,i=this._items,r=[],n=t.length;for(let e=0;e<n;e++){const s=t[e],n=i.indexOf(s);if(n>-1){const s=1+C(t,i,e+1,n+1),l=this._splice(n,s);l&&l.length>0&&r.push.apply(r,l),e+=s-1}}return this._emitAfterChanges(s.REMOVE),r}reverse(){if((0,f.it)(this._observable),this._emitBeforeChanges(s.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(s.MOVE),this}shift(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(s.REMOVE),e}slice(e=0,t=this.length){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.it)(this._observable),this._items.some(e,t)}sort(e){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.MOVE))return this;const t=(0,o.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(s.MOVE),this}splice(e,t,...i){(0,f.it)(this._observable);const r=(t?s.REMOVE:0)|(i.length?s.ADD:0);if(this._emitBeforeChanges(r))return[];const n=this._splice(e,t,i)||[];return this._emitAfterChanges(r),n}toArray(){return(0,f.it)(this._observable),this._items.slice()}toJSON(){return(0,f.it)(this._observable),this.toArray()}toLocaleString(){return(0,f.it)(this._observable),this._items.toLocaleString()}toString(){return(0,f.it)(this._observable),this._items.toString()}unshift(...e){return(0,f.it)(this._observable),!e.length||this._emitBeforeChanges(s.ADD)||(this._splice(0,0,e),this._emitAfterChanges(s.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const s=this._items,r=this.itemType;let n,l;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,c.Os)((()=>this._dispatchChange()))),t){if(l=s.splice(e,t),this.hasEventListener("before-remove")){const t=_.acquire();t.target=this,t.cancellable=!0;for(let i=0,r=l.length;i<r;i++)n=l[i],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(l.splice(i,1),s.splice(e,0,n),e+=1,i-=1,r-=1);_.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=_.acquire();e.target=this,e.cancellable=!1;const t=l.length;for(let i=0;i<t;i++)e.reset(l[i]),this.emit("after-remove",e);_.release(e)}}if(i&&i.length){if(r){const e=[];for(const t of i){const i=r.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),l=e===this.length;if(t||n){const r=_.acquire();r.target=this,r.cancellable=!0;const a=_.acquire();a.target=this,a.cancellable=!1;for(const o of i)t?(r.reset(o),this.emit("before-add",r),r.defaultPrevented||(l?s.push(o):s.splice(e++,0,o),this._set("length",s.length),n&&(a.reset(o),this.emit("after-add",a)))):(l?s.push(o):s.splice(e++,0,o),this._set("length",s.length),a.reset(o),this.emit("after-add",a));_.release(a),_.release(r)}else{if(l)for(const e of i)s.push(e);else s.splice(e,0,...i);this._set("length",s.length)}}return(i&&i.length||l&&l.length)&&this._notifyChangeEvent(i,l),l}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=_.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,_.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=_.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),_.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;A.clear(),M.clear(),D.clear();for(const{added:t,removed:i}of e){if(t)if(0===D.size&&0===M.size)for(const e of t)A.add(e);else for(const e of t)M.has(e)?(D.add(e),M.delete(e)):D.has(e)||A.add(e);if(i)if(0===D.size&&0===A.size)for(const e of i)M.add(e);else for(const e of i)A.has(e)?A.delete(e):(D.delete(e),M.add(e))}const i=n.Z.acquire();A.forEach((e=>{i.push(e)}));const s=n.Z.acquire();M.forEach((e=>{s.push(e)}));const r=this._items,l=t.items,a=n.Z.acquire();if(D.forEach((e=>{l.indexOf(e)!==r.indexOf(e)&&a.push(e)})),t.listeners&&(i.length||s.length||a.length)){const e={target:this,added:i,removed:s,moved:a},r=t.listeners.length;for(let i=0;i<r;i++){const s=t.listeners[i];s.removed||s.callback.call(this,e)}}n.Z.release(i),n.Z.release(s),n.Z.release(a)}A.clear(),M.clear(),D.clear()}};T.ofType=e=>{if(!e)return u;if(I.has(e))return I.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const s=e.typeMap[i].prototype.declaredClass;t?t+=` | ${s}`:t=s}let i=class extends u{};return(0,r._)([(0,g.c)({Type:e,ensureType:"function"==typeof e?(0,d.se)(e):(0,d.N7)(e)})],i.prototype,"itemType",void 0),i=(0,r._)([(0,m.j)(`esri.core.Collection<${t}>`)],i),I.set(e,i),i},(0,r._)([(0,p.Cb)()],T.prototype,"length",void 0),(0,r._)([(0,p.Cb)()],T.prototype,"items",null),T=u=(0,r._)([(0,m.j)("esri.core.Collection")],T);const L=T},57435:(e,t,i)=>{i.d(t,{Z:()=>h});var s=i(43697),r=i(46791),n=(i(20102),i(92604),i(26258),i(87538)),l=i(5600),a=i(52011);let o=class extends r.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,n.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const i of e)null!=i&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new r.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(i(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,l.Cb)()],o.prototype,"getCollections",void 0),(0,s._)([(0,l.Cb)()],o.prototype,"getChildrenFunction",void 0),(0,s._)([(0,l.Cb)()],o.prototype,"itemFilterFunction",void 0),o=(0,s._)([(0,a.j)("esri.core.CollectionFlattener")],o);const h=o},52421:(e,t,i)=>{function s(e){return(t,i)=>{t[i]=e}}i.d(t,{c:()=>s})},70921:(e,t,i)=>{i.d(t,{R:()=>n,Z:()=>r});var s=i(46791);function r(e,t,i=s.Z){return t||(t=new i),t===e||(t.removeAll(),(r=e)&&(Array.isArray(r)||"items"in r&&Array.isArray(r.items))?t.addMany(e):e&&t.add(e)),t;var r}function n(e){return e}},68668:(e,t,i)=>{i.d(t,{G:()=>l,w:()=>a});var s=i(66643),r=i(46791),n=i(83379);async function l(e,t){return await e.load(),a(e,t)}async function a(e,t){const i=[],l=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?l(...t):r.Z.isCollection(t)?t.forEach((e=>l(e))):n.Z.isLoadable(t)&&i.push(t))};t(l);let a=null;if(await(0,s.UI)(i,(async e=>{const t=await(0,s.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},17445:(e,t,i)=>{i.d(t,{N1:()=>d,YP:()=>o,Z_:()=>g,gx:()=>h,nn:()=>m,on:()=>c,tX:()=>y});var s=i(91460),r=i(50758),n=i(70586),l=i(95330),a=i(26258);function o(e,t,i={}){return u(e,t,i,f)}function h(e,t,i={}){return u(e,t,i,p)}function u(e,t,i={},s){let r=null;const l=i.once?(e,i)=>{s(e)&&((0,n.hw)(r),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(r=(0,a.aQ)(e,l,i.sync,i.equals),i.initial){const t=e();l(t,t)}return r}function c(e,t,i,l={}){let a=null,h=null,u=null;function c(){a&&h&&(h.remove(),l.onListenerRemove?.(a),a=null,h=null)}function d(e){l.once&&l.once&&(0,n.hw)(u),i(e)}const f=o(e,((e,i)=>{c(),(0,s.vT)(e)&&(a=e,h=(0,s.on)(e,t,d),l.onListenerAdd?.(e))}),{sync:l.sync,initial:!0});return u=(0,r.kB)((()=>{f.remove(),c()})),u}function d(e,t){return function(e,t,i){if((0,l.Hc)(i))return Promise.reject((0,l.zE)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function o(){a=(0,n.hw)(a)}return new Promise(((s,n)=>{a=(0,r.AL)([(0,l.fu)(i,(()=>{o(),n((0,l.zE)())})),u(e,(e=>{o(),s(e)}),{sync:!1,once:!0},t??f)])}))}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(87538);const g={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},35463:(e,t,i)=>{i.d(t,{JE:()=>l,Nm:()=>n,rJ:()=>a}),i(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},r={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,i){const s=new Date(e.getTime());if(t&&i){const e=r[i],{getter:n,setter:l,multiplier:a}=e;if("months"===i){const e=function(e,t){const i=new Date(e,t+1,1);return i.setDate(0),i.getDate()}(s.getFullYear(),s.getMonth()+t);s.getDate()>e&&s.setDate(e)}s[l](s[n]()+t*a)}return s}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,i){return 0===e?0:e*s[t]/s[i]}},40504:(e,t,i)=>{i.r(t),i.d(t,{default:()=>T});var s=i(43697),r=i(57435),n=i(68668),l=i(92604),a=i(16453),o=i(17445),h=i(5600),u=(i(75215),i(67676),i(80442),i(1153)),c=i(52011),d=i(30556),f=i(87085),p=i(71612),g=i(38009),m=i(16859),y=i(72965),_=i(87344),b=i(46791),v=i(70921),w=i(95330);function C(e,t,i){let s,r;if(e)for(let n=0,l=e.length;n<l;n++){if(s=e.at(n),s?.[t]===i)return s;if("group"===s?.type&&(r=C(s.layers,t,i),r))return r}}const E=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new b.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||l.Z.getLogger(this).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},i=e=>{e.parent=null,this.layerRemoved(e)};this.addHandles([this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>i(e.item)))])}destroy(){const e=this.layers.toArray();for(const t of e)t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,v.Z)(e,this._get("layers")))}add(e,t){const i=this.layers;if(t=i.getNextIndex(t),e instanceof f.Z){const s=e;s.parent===this?this.reorder(s,t):i.add(s,t)}else(0,w.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):l.Z.getLogger(this).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const i=this.layers;let s=i.getNextIndex(t);e.slice().forEach((e=>{e.parent!==this?(i.add(e,s),s+=1):this.reorder(e,s)}))}findLayerById(e){return C(this.layers,"id",e)}findLayerByUid(e){return C(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,s._)([(0,h.Cb)()],t.prototype,"layers",null),t=(0,s._)([(0,c.j)("esri.support.LayersMixin")],t),t};function A(e,t,i){if(e)for(let s=0,r=e.length;s<r;s++){const r=e.at(s);if(r[t]===i)return r;if("group"===r?.type){const e=A(r.tables,t,i);if(e)return e}}}const M=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new b.Z,this.addHandles([this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&l.Z.getLogger(this).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))])}destroy(){const e=this.tables.removeAll();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,v.Z)(e,this._get("tables")))}findTableById(e){return A(this.tables,"id",e)}findTableByUid(e){return A(this.tables,"uid",e)}};return(0,s._)([(0,h.Cb)()],t.prototype,"tables",null),t=(0,s._)([(0,c.j)("esri.support.TablesMixin")],t),t},D=Symbol("WebScene");var I=i(15650);let O=class extends((0,p.h)((0,y.M)((0,g.q)((0,m.I)(M(E((0,a.R)(f.Z)))))))){constructor(e){var t;super(e),this.allLayers=new r.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new r.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return!!t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group"}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles([(0,o.YP)((()=>{let e=this.parent;for(;e&&"parent"in e&&e.parent;)e=e.parent;return e&&D in e}),(e=>{const t="prevent-adding-tables";this.removeHandles(t),e&&(this.tables.removeAll(),this.addHandles((0,o.on)((()=>this.tables),"before-add",(e=>{e.preventDefault(),l.Z.getLogger(this).errorOnce("tables","Tables are not yet supported in a WebScene so they can't be added.")})),t))}),o.tX),(0,o.YP)((()=>this.visible),this._onVisibilityChange.bind(this),o.Z_)])}destroy(){this.allLayers.destroy(),this.allTables.destroy()}_writeLayers(e,t,i,s){const r=[];if(!e)return r;e.forEach((e=>{const t=(0,I.Nw)(e,s.webmap?s.webmap.getLayerJSONFromResourceInfo(e):null,s);null!=t&&t.layerType&&r.push(t)})),t.layers=r}set portalItem(e){this._set("portalItem",e)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"],layerModuleTypeMap:_.T},e)),Promise.resolve(this)}async loadAll(){return(0,n.G)(this,(e=>{e(this.layers,this.tables)}))}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this.hasHandles(e.uid)?console.error(`Layer readded to Grouplayer: uid=${e.uid}`):this.addHandles((0,o.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),o.Z_),e.uid)}layerRemoved(e){this.removeHandles(e.uid),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,u.vw)(this).initialized)return;const i=this.layers;let s=i.find((e=>e.visible));switch(e){case"exclusive":i.length&&!s&&(s=i.at(0),s.visible=!0),this._turnOffOtherLayers(s);break;case"inherited":i.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,s._)([(0,h.Cb)({readOnly:!0,dependsOn:[]})],O.prototype,"allLayers",void 0),(0,s._)([(0,h.Cb)({readOnly:!0})],O.prototype,"allTables",void 0),(0,s._)([(0,h.Cb)()],O.prototype,"fullExtent",void 0),(0,s._)([(0,h.Cb)({json:{read:!0,write:!0}})],O.prototype,"blendMode",void 0),(0,s._)([(0,h.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],O.prototype,"layers",void 0),(0,s._)([(0,d.c)("layers")],O.prototype,"_writeLayers",null),(0,s._)([(0,h.Cb)({type:["GroupLayer"]})],O.prototype,"operationalLayerType",void 0),(0,s._)([(0,h.Cb)({json:{origins:{"web-document":{read:!1,write:!1}}}})],O.prototype,"portalItem",null),(0,s._)([(0,h.Cb)()],O.prototype,"spatialReference",void 0),(0,s._)([(0,h.Cb)({json:{read:!1},readOnly:!0,value:"group"})],O.prototype,"type",void 0),(0,s._)([(0,h.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{type:["independent","exclusive"],write:(e,t,i)=>{"inherited"!==e&&(t[i]=e)}}}}})],O.prototype,"visibilityMode",null),O=(0,s._)([(0,c.j)("esri.layers.GroupLayer")],O);const T=O},16859:(e,t,i)=>{i.d(t,{I:()=>C});var s=i(43697),r=i(68773),n=i(40330),l=i(3172),a=i(66643),o=i(20102),h=i(92604),u=i(70586),c=i(95330),d=i(81271),f=i(5600),p=(i(75215),i(67676),i(80442),i(71715)),g=i(52011),m=i(30556),y=i(84230),_=i(48522),b=i(15235),v=i(86082),w=i(14661);const C=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new b.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:s}=await i.e(8062).then(i.bind(i,18062));return(0,c.k_)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||h.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!r.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:s},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=e===i.id;if(s&&i.portal.user)return(0,w.Ss)(i);let r,l;if(s)r=i.portal.url;else try{r=await(0,y.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!r||!(0,d.Zo)(r,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!l)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(s?await i.reload():(i=new b.default({id:e,portal:{url:r}}),await i.load(t)),i.portal.user)return(0,w.Ss)(i)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=E.credential===t?E.user:await this._fetchEditingUser(e);return E.credential=t,E.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const s=`${i.owningSystemUrl}/sharing/rest`,r=_.Z.getDefault();if(r&&r.loaded&&(0,d.Fv)(r.restUrl)===(0,d.Fv)(s))return r.user;const o=`${s}/community/self`,h=null!=e?e.signal:null,u=await(0,a.q6)((0,l.default)(o,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?v.default.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,s=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||_.Z.getDefault());return i&&s&&!(0,d.tm)(s.restUrl,i.restUrl)?(t.messages&&t.messages.push(new o.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,f.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,s._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,f.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,g.j)("esri.layers.mixins.PortalLayer")],t),t},E={credential:null,user:null}},15650:(e,t,i)=>{i.d(t,{Nw:()=>c});var s=i(20102),r=i(22974),n=i(78286),l=i(827),a=i(84230);const o=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),h=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","media","ogc-feature","route","subtype-group","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function u(e,t){"maxScale"in e&&(t.maxScale=(0,l.k)(e.maxScale)??void 0),"minScale"in e&&(t.minScale=(0,l.k)(e.minScale)??void 0)}function c(e,t,i){if(!("write"in e)||!e.write)return i&&i.messages&&i.messages.push(new s.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(function(e,t){if(t.restrictedWebMapWriting){const i=function(e){return"basemap"===e.layerContainerType?o:"operational-layers"===e.layerContainerType?h:null}(t);return null==i||i.has(e.type)&&!(0,a.rQ)(e)}return!0}(e,i)){const t={};return e.write(t,i)?t:null}return null!=t&&function(e,t){if(function(e,t){if(t)if((0,a.rQ)(e)){const i=(0,n.hS)("featureCollection.layers",t),s=i&&i[0]&&i[0].layerDefinition;s&&u(e,s)}else"stream"===e.type?u(e,t.layerDefinition=t.layerDefinition||{}):"group"!==e.type&&u(e,t)}(e,t),t&&("blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,l.k)(e.opacity)??void 0,t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type))if((0,a.rQ)(e)){const i=t.featureCollection;i&&(i.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,r.d9)(t)),t}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9059,5732],{92835:(e,t,i)=>{i.d(t,{Z:()=>g});var s,r=i(43697),n=i(96674),l=i(70586),a=i(35463),o=i(5600),h=(i(75215),i(67676),i(80442),i(71715)),u=i(52011),c=i(30556);let d=s=class extends n.wq{static get allTime(){return f}static get empty(){return p}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,i=null!=this.end?this.end.getTime():this.end,s=null!=e.start?e.start.getTime():e.start,r=null!=e.end?e.end.getTime():e.end;return t===s&&i===r}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,l.yw)(this.start,(t=>(0,a.JE)(t,e))),i=(0,l.yw)(this.end,(t=>{const i=(0,a.JE)(t,e);return t.getTime()===i.getTime()?i:(0,a.Nm)(i,1,e)}));return new s({start:t,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let l,a;if(r>=t&&r<=i?l=r:t>=r&&t<=n&&(l=t),i>=r&&i<=n?a=i:n>=t&&n<=i&&(a=n),null!=l&&null!=a&&!isNaN(l)&&!isNaN(a)){const e=new s;return e.start=l===-1/0?null:new Date(l),e.end=a===1/0?null:new Date(a),e}return s.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:r,end:n}=this;return null!=r&&(i.start=(0,a.Nm)(r,e,t)),null!=n&&(i.end=(0,a.Nm)(n,e,t)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return f.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:i})}};(0,r._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,r._)([(0,h.r)("end")],d.prototype,"readEnd",null),(0,r._)([(0,c.c)("end")],d.prototype,"writeEnd",null),(0,r._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,r._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,r._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,r._)([(0,h.r)("start")],d.prototype,"readStart",null),(0,r._)([(0,c.c)("start")],d.prototype,"writeStart",null),d=s=(0,r._)([(0,u.j)("esri.TimeExtent")],d);const f=new d,p=new d({start:void 0,end:void 0}),g=d},5732:(e,t,i)=>{i.d(t,{c:()=>s,g:()=>r});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},46791:(e,t,i)=>{i.d(t,{Z:()=>L});var s,r=i(43697),n=i(3894),l=i(32448),a=i(22974),o=i(70586),h=i(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(s||(s={}));var u,c=i(1654),d=i(75215),f=i(58971),p=i(5600),g=i(52421),m=i(52011),y=i(10661);const _=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),b=()=>{};function v(e){return e?e instanceof T?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function C(e,t,i,s){const r=Math.min(e.length-i,t.length-s);let n=0;for(;n<r&&e[i+n]===t[s+n];)n++;return n}function E(e,t,i,s){t&&t.forEach(((t,r,n)=>{e.push(t),E(e,i.call(s,t,r,n),i,s)}))}const A=new Set,M=new Set,D=new Set,I=new Map;let O=0,T=u=class extends l.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof u}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new y.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:O++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof u?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(s.ADD)||(this._splice(0,this.length,v(e)),this._emitAfterChanges(s.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=b,i.removed=!0,e.splice(e.indexOf(i),1)}}}return this._emitter.on(e,t)}once(e,t){const i=this.on(e,t);return{remove(){i.remove()}}}add(e,t){if((0,f.it)(this._observable),this._emitBeforeChanges(s.ADD))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(s.ADD),this}addMany(e,t=this._items.length){if((0,f.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(s.ADD))return this;const i=this.getNextIndex(t);return this._splice(i,0,v(e)),this._emitAfterChanges(s.ADD),this}at(e){if((0,f.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(s.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.map(a.d9)})}concat(...e){(0,f.it)(this._observable);const t=e.map(v);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const i=(0,o.j0)(this._splice(0,this.length)),r=i.length;for(let s=0;s<r;s++)e.call(t,i[s],s,i);this._emitAfterChanges(s.REMOVE)}every(e,t){return(0,f.it)(this._observable),this._items.every(e,t)}filter(e,t){let i;return(0,f.it)(this._observable),i=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:i})}find(e,t){return(0,f.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.it)(this._observable);const i=[];return E(i,this,e,t),new u(i)}forEach(e,t){return(0,f.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.it)(this._observable),this._items[e]}getNextIndex(e){(0,f.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.it)(this._observable);const i=this._items.map(e,t);return new u({items:i})}reorder(e,t=this.length-1){(0,f.it)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(s.MOVE))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(s.MOVE)}return e}}pop(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(s.REMOVE),e}push(...e){return(0,f.it)(this._observable),this._emitBeforeChanges(s.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(s.ADD)),this.length}reduce(e,t){(0,f.it)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,f.it)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,f.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(s.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(s.REMOVE),t}removeMany(e){if((0,f.it)(this._observable),!e||!e.length||this._emitBeforeChanges(s.REMOVE))return[];const t=e instanceof u?e.toArray():e,i=this._items,r=[],n=t.length;for(let e=0;e<n;e++){const s=t[e],n=i.indexOf(s);if(n>-1){const s=1+C(t,i,e+1,n+1),l=this._splice(n,s);l&&l.length>0&&r.push.apply(r,l),e+=s-1}}return this._emitAfterChanges(s.REMOVE),r}reverse(){if((0,f.it)(this._observable),this._emitBeforeChanges(s.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(s.MOVE),this}shift(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(s.REMOVE),e}slice(e=0,t=this.length){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.it)(this._observable),this._items.some(e,t)}sort(e){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.MOVE))return this;const t=(0,o.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(s.MOVE),this}splice(e,t,...i){(0,f.it)(this._observable);const r=(t?s.REMOVE:0)|(i.length?s.ADD:0);if(this._emitBeforeChanges(r))return[];const n=this._splice(e,t,i)||[];return this._emitAfterChanges(r),n}toArray(){return(0,f.it)(this._observable),this._items.slice()}toJSON(){return(0,f.it)(this._observable),this.toArray()}toLocaleString(){return(0,f.it)(this._observable),this._items.toLocaleString()}toString(){return(0,f.it)(this._observable),this._items.toString()}unshift(...e){return(0,f.it)(this._observable),!e.length||this._emitBeforeChanges(s.ADD)||(this._splice(0,0,e),this._emitAfterChanges(s.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const s=this._items,r=this.itemType;let n,l;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,c.Os)((()=>this._dispatchChange()))),t){if(l=s.splice(e,t),this.hasEventListener("before-remove")){const t=_.acquire();t.target=this,t.cancellable=!0;for(let i=0,r=l.length;i<r;i++)n=l[i],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(l.splice(i,1),s.splice(e,0,n),e+=1,i-=1,r-=1);_.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=_.acquire();e.target=this,e.cancellable=!1;const t=l.length;for(let i=0;i<t;i++)e.reset(l[i]),this.emit("after-remove",e);_.release(e)}}if(i&&i.length){if(r){const e=[];for(const t of i){const i=r.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),l=e===this.length;if(t||n){const r=_.acquire();r.target=this,r.cancellable=!0;const a=_.acquire();a.target=this,a.cancellable=!1;for(const o of i)t?(r.reset(o),this.emit("before-add",r),r.defaultPrevented||(l?s.push(o):s.splice(e++,0,o),this._set("length",s.length),n&&(a.reset(o),this.emit("after-add",a)))):(l?s.push(o):s.splice(e++,0,o),this._set("length",s.length),a.reset(o),this.emit("after-add",a));_.release(a),_.release(r)}else{if(l)for(const e of i)s.push(e);else s.splice(e,0,...i);this._set("length",s.length)}}return(i&&i.length||l&&l.length)&&this._notifyChangeEvent(i,l),l}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=_.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,_.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=_.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),_.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;A.clear(),M.clear(),D.clear();for(const{added:t,removed:i}of e){if(t)if(0===D.size&&0===M.size)for(const e of t)A.add(e);else for(const e of t)M.has(e)?(D.add(e),M.delete(e)):D.has(e)||A.add(e);if(i)if(0===D.size&&0===A.size)for(const e of i)M.add(e);else for(const e of i)A.has(e)?A.delete(e):(D.delete(e),M.add(e))}const i=n.Z.acquire();A.forEach((e=>{i.push(e)}));const s=n.Z.acquire();M.forEach((e=>{s.push(e)}));const r=this._items,l=t.items,a=n.Z.acquire();if(D.forEach((e=>{l.indexOf(e)!==r.indexOf(e)&&a.push(e)})),t.listeners&&(i.length||s.length||a.length)){const e={target:this,added:i,removed:s,moved:a},r=t.listeners.length;for(let i=0;i<r;i++){const s=t.listeners[i];s.removed||s.callback.call(this,e)}}n.Z.release(i),n.Z.release(s),n.Z.release(a)}A.clear(),M.clear(),D.clear()}};T.ofType=e=>{if(!e)return u;if(I.has(e))return I.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const s=e.typeMap[i].prototype.declaredClass;t?t+=` | ${s}`:t=s}let i=class extends u{};return(0,r._)([(0,g.c)({Type:e,ensureType:"function"==typeof e?(0,d.se)(e):(0,d.N7)(e)})],i.prototype,"itemType",void 0),i=(0,r._)([(0,m.j)(`esri.core.Collection<${t}>`)],i),I.set(e,i),i},(0,r._)([(0,p.Cb)()],T.prototype,"length",void 0),(0,r._)([(0,p.Cb)()],T.prototype,"items",null),T=u=(0,r._)([(0,m.j)("esri.core.Collection")],T);const L=T},57435:(e,t,i)=>{i.d(t,{Z:()=>h});var s=i(43697),r=i(46791),n=(i(20102),i(92604),i(26258),i(87538)),l=i(5600),a=i(52011);let o=class extends r.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,n.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const i of e)null!=i&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new r.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(i(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,l.Cb)()],o.prototype,"getCollections",void 0),(0,s._)([(0,l.Cb)()],o.prototype,"getChildrenFunction",void 0),(0,s._)([(0,l.Cb)()],o.prototype,"itemFilterFunction",void 0),o=(0,s._)([(0,a.j)("esri.core.CollectionFlattener")],o);const h=o},52421:(e,t,i)=>{function s(e){return(t,i)=>{t[i]=e}}i.d(t,{c:()=>s})},70921:(e,t,i)=>{i.d(t,{R:()=>n,Z:()=>r});var s=i(46791);function r(e,t,i=s.Z){return t||(t=new i),t===e||(t.removeAll(),(r=e)&&(Array.isArray(r)||"items"in r&&Array.isArray(r.items))?t.addMany(e):e&&t.add(e)),t;var r}function n(e){return e}},68668:(e,t,i)=>{i.d(t,{G:()=>l,w:()=>a});var s=i(66643),r=i(46791),n=i(83379);async function l(e,t){return await e.load(),a(e,t)}async function a(e,t){const i=[],l=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?l(...t):r.Z.isCollection(t)?t.forEach((e=>l(e))):n.Z.isLoadable(t)&&i.push(t))};t(l);let a=null;if(await(0,s.UI)(i,(async e=>{const t=await(0,s.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},17445:(e,t,i)=>{i.d(t,{N1:()=>d,YP:()=>o,Z_:()=>g,gx:()=>h,nn:()=>m,on:()=>c,tX:()=>y});var s=i(91460),r=i(50758),n=i(70586),l=i(95330),a=i(26258);function o(e,t,i={}){return u(e,t,i,f)}function h(e,t,i={}){return u(e,t,i,p)}function u(e,t,i={},s){let r=null;const l=i.once?(e,i)=>{s(e)&&((0,n.hw)(r),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(r=(0,a.aQ)(e,l,i.sync,i.equals),i.initial){const t=e();l(t,t)}return r}function c(e,t,i,l={}){let a=null,h=null,u=null;function c(){a&&h&&(h.remove(),l.onListenerRemove?.(a),a=null,h=null)}function d(e){l.once&&l.once&&(0,n.hw)(u),i(e)}const f=o(e,((e,i)=>{c(),(0,s.vT)(e)&&(a=e,h=(0,s.on)(e,t,d),l.onListenerAdd?.(e))}),{sync:l.sync,initial:!0});return u=(0,r.kB)((()=>{f.remove(),c()})),u}function d(e,t){return function(e,t,i){if((0,l.Hc)(i))return Promise.reject((0,l.zE)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function o(){a=(0,n.hw)(a)}return new Promise(((s,n)=>{a=(0,r.AL)([(0,l.fu)(i,(()=>{o(),n((0,l.zE)())})),u(e,(e=>{o(),s(e)}),{sync:!1,once:!0},t??f)])}))}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(87538);const g={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},35463:(e,t,i)=>{i.d(t,{JE:()=>l,Nm:()=>n,rJ:()=>a}),i(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},r={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,i){const s=new Date(e.getTime());if(t&&i){const e=r[i],{getter:n,setter:l,multiplier:a}=e;if("months"===i){const e=function(e,t){const i=new Date(e,t+1,1);return i.setDate(0),i.getDate()}(s.getFullYear(),s.getMonth()+t);s.getDate()>e&&s.setDate(e)}s[l](s[n]()+t*a)}return s}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,i){return 0===e?0:e*s[t]/s[i]}},40504:(e,t,i)=>{i.r(t),i.d(t,{default:()=>T});var s=i(43697),r=i(57435),n=i(68668),l=i(92604),a=i(16453),o=i(17445),h=i(5600),u=(i(75215),i(67676),i(80442),i(1153)),c=i(52011),d=i(30556),f=i(87085),p=i(71612),g=i(38009),m=i(16859),y=i(72965),_=i(87344),b=i(46791),v=i(70921),w=i(95330);function C(e,t,i){let s,r;if(e)for(let n=0,l=e.length;n<l;n++){if(s=e.at(n),s?.[t]===i)return s;if("group"===s?.type&&(r=C(s.layers,t,i),r))return r}}const E=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new b.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||l.Z.getLogger(this).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},i=e=>{e.parent=null,this.layerRemoved(e)};this.addHandles([this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>i(e.item)))])}destroy(){const e=this.layers.toArray();for(const t of e)t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,v.Z)(e,this._get("layers")))}add(e,t){const i=this.layers;if(t=i.getNextIndex(t),e instanceof f.Z){const s=e;s.parent===this?this.reorder(s,t):i.add(s,t)}else(0,w.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):l.Z.getLogger(this).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const i=this.layers;let s=i.getNextIndex(t);e.slice().forEach((e=>{e.parent!==this?(i.add(e,s),s+=1):this.reorder(e,s)}))}findLayerById(e){return C(this.layers,"id",e)}findLayerByUid(e){return C(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,s._)([(0,h.Cb)()],t.prototype,"layers",null),t=(0,s._)([(0,c.j)("esri.support.LayersMixin")],t),t};function A(e,t,i){if(e)for(let s=0,r=e.length;s<r;s++){const r=e.at(s);if(r[t]===i)return r;if("group"===r?.type){const e=A(r.tables,t,i);if(e)return e}}}const M=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new b.Z,this.addHandles([this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&l.Z.getLogger(this).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))])}destroy(){const e=this.tables.removeAll();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,v.Z)(e,this._get("tables")))}findTableById(e){return A(this.tables,"id",e)}findTableByUid(e){return A(this.tables,"uid",e)}};return(0,s._)([(0,h.Cb)()],t.prototype,"tables",null),t=(0,s._)([(0,c.j)("esri.support.TablesMixin")],t),t},D=Symbol("WebScene");var I=i(15650);let O=class extends((0,p.h)((0,y.M)((0,g.q)((0,m.I)(M(E((0,a.R)(f.Z)))))))){constructor(e){var t;super(e),this.allLayers=new r.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new r.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return!!t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group"}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles([(0,o.YP)((()=>{let e=this.parent;for(;e&&"parent"in e&&e.parent;)e=e.parent;return e&&D in e}),(e=>{const t="prevent-adding-tables";this.removeHandles(t),e&&(this.tables.removeAll(),this.addHandles((0,o.on)((()=>this.tables),"before-add",(e=>{e.preventDefault(),l.Z.getLogger(this).errorOnce("tables","Tables are not yet supported in a WebScene so they can't be added.")})),t))}),o.tX),(0,o.YP)((()=>this.visible),this._onVisibilityChange.bind(this),o.Z_)])}destroy(){this.allLayers.destroy(),this.allTables.destroy()}_writeLayers(e,t,i,s){const r=[];if(!e)return r;e.forEach((e=>{const t=(0,I.Nw)(e,s.webmap?s.webmap.getLayerJSONFromResourceInfo(e):null,s);null!=t&&t.layerType&&r.push(t)})),t.layers=r}set portalItem(e){this._set("portalItem",e)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"],layerModuleTypeMap:_.T},e)),Promise.resolve(this)}async loadAll(){return(0,n.G)(this,(e=>{e(this.layers,this.tables)}))}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this.hasHandles(e.uid)?console.error(`Layer readded to Grouplayer: uid=${e.uid}`):this.addHandles((0,o.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),o.Z_),e.uid)}layerRemoved(e){this.removeHandles(e.uid),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,u.vw)(this).initialized)return;const i=this.layers;let s=i.find((e=>e.visible));switch(e){case"exclusive":i.length&&!s&&(s=i.at(0),s.visible=!0),this._turnOffOtherLayers(s);break;case"inherited":i.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,s._)([(0,h.Cb)({readOnly:!0,dependsOn:[]})],O.prototype,"allLayers",void 0),(0,s._)([(0,h.Cb)({readOnly:!0})],O.prototype,"allTables",void 0),(0,s._)([(0,h.Cb)()],O.prototype,"fullExtent",void 0),(0,s._)([(0,h.Cb)({json:{read:!0,write:!0}})],O.prototype,"blendMode",void 0),(0,s._)([(0,h.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],O.prototype,"layers",void 0),(0,s._)([(0,d.c)("layers")],O.prototype,"_writeLayers",null),(0,s._)([(0,h.Cb)({type:["GroupLayer"]})],O.prototype,"operationalLayerType",void 0),(0,s._)([(0,h.Cb)({json:{origins:{"web-document":{read:!1,write:!1}}}})],O.prototype,"portalItem",null),(0,s._)([(0,h.Cb)()],O.prototype,"spatialReference",void 0),(0,s._)([(0,h.Cb)({json:{read:!1},readOnly:!0,value:"group"})],O.prototype,"type",void 0),(0,s._)([(0,h.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{type:["independent","exclusive"],write:(e,t,i)=>{"inherited"!==e&&(t[i]=e)}}}}})],O.prototype,"visibilityMode",null),O=(0,s._)([(0,c.j)("esri.layers.GroupLayer")],O);const T=O},16859:(e,t,i)=>{i.d(t,{I:()=>C});var s=i(43697),r=i(68773),n=i(40330),l=i(3172),a=i(66643),o=i(20102),h=i(92604),u=i(70586),c=i(95330),d=i(81271),f=i(5600),p=(i(75215),i(67676),i(80442),i(71715)),g=i(52011),m=i(30556),y=i(84230),_=i(48522),b=i(15235),v=i(86082),w=i(14661);const C=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new b.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:s}=await i.e(8062).then(i.bind(i,18062));return(0,c.k_)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||h.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!r.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:s},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=e===i.id;if(s&&i.portal.user)return(0,w.Ss)(i);let r,l;if(s)r=i.portal.url;else try{r=await(0,y.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!r||!(0,d.Zo)(r,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!l)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(s?await i.reload():(i=new b.default({id:e,portal:{url:r}}),await i.load(t)),i.portal.user)return(0,w.Ss)(i)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=E.credential===t?E.user:await this._fetchEditingUser(e);return E.credential=t,E.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const s=`${i.owningSystemUrl}/sharing/rest`,r=_.Z.getDefault();if(r&&r.loaded&&(0,d.Fv)(r.restUrl)===(0,d.Fv)(s))return r.user;const o=`${s}/community/self`,h=null!=e?e.signal:null,u=await(0,a.q6)((0,l.default)(o,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?v.default.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,s=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||_.Z.getDefault());return i&&s&&!(0,d.tm)(s.restUrl,i.restUrl)?(t.messages&&t.messages.push(new o.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,f.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,s._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,f.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,g.j)("esri.layers.mixins.PortalLayer")],t),t},E={credential:null,user:null}},15650:(e,t,i)=>{i.d(t,{Nw:()=>c});var s=i(20102),r=i(22974),n=i(78286),l=i(827),a=i(84230);const o=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),h=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","media","ogc-feature","route","stream","subtype-group","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function u(e,t){"maxScale"in e&&(t.maxScale=(0,l.k)(e.maxScale)??void 0),"minScale"in e&&(t.minScale=(0,l.k)(e.minScale)??void 0)}function c(e,t,i){if(!("write"in e)||!e.write)return i&&i.messages&&i.messages.push(new s.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(function(e,t){if(t.restrictedWebMapWriting){const i=function(e){return"basemap"===e.layerContainerType?o:"operational-layers"===e.layerContainerType?h:null}(t);return null==i||i.has(e.type)&&!(0,a.rQ)(e)}return!0}(e,i)){const t={};return e.write(t,i)?t:null}return null!=t&&function(e,t){if(function(e,t){if(t)if((0,a.rQ)(e)){const i=(0,n.hS)("featureCollection.layers",t),s=i&&i[0]&&i[0].layerDefinition;s&&u(e,s)}else"group"!==e.type&&u(e,t)}(e,t),t&&("blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,l.k)(e.opacity)??void 0,t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type))if((0,a.rQ)(e)){const i=t.featureCollection;i&&(i.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,r.d9)(t)),t}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8008,8062],{52104:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(96187);async function n(e,a){const t=await(0,r.T)(e,a);t.layers=t.layers.filter(i);const n={serviceJSON:t};if((t.currentVersion??0)<10.5)return n;const l=await(0,r.T)(e+"/layers",a);return n.layersJSON={layers:l.layers.filter(i),tables:l.tables},n}function i(e){return!e.type||"Feature Layer"===e.type}},87344:(e,a,t)=>{t.d(a,{T:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(8153)]).then(t.bind(t,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(8346),t.e(1423),t.e(4165),t.e(3887),t.e(7215),t.e(6017),t.e(773),t.e(9238),t.e(5590),t.e(7537),t.e(5825),t.e(223)]).then(t.bind(t,30223))).default,CSVLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(8346),t.e(1423),t.e(4165),t.e(3887),t.e(7215),t.e(6017),t.e(773),t.e(9238),t.e(9689)]).then(t.bind(t,45425))).default,DimensionLayer:async()=>(await Promise.all([t.e(163),t.e(9037),t.e(81)]).then(t.bind(t,40081))).default,ElevationLayer:async()=>(await Promise.all([t.e(163),t.e(8346),t.e(6486),t.e(1596)]).then(t.bind(t,65665))).default,FeatureLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(8346),t.e(1423),t.e(4165),t.e(3887),t.e(7215),t.e(6017),t.e(773),t.e(9238),t.e(2442)]).then(t.bind(t,19238))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(8346),t.e(1423),t.e(4165),t.e(3887),t.e(7215),t.e(3477)]).then(t.bind(t,23477))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(8024)]).then(t.bind(t,3723))).default,GroupLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9059)]).then(t.bind(t,40504))).default,ImageryLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(8346),t.e(4165),t.e(4599),t.e(6610),t.e(6885),t.e(1194)]).then(t.bind(t,90444))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(8346),t.e(6610),t.e(8681),t.e(6885),t.e(5913)]).then(t.bind(t,74878))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(163),t.e(7537),t.e(1537)]).then(t.bind(t,9310))).default,KMLLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(1423),t.e(2756)]).then(t.bind(t,42756))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(163),t.e(7316)]).then(t.bind(t,30690))).default,LinkChartLayer:async()=>(await Promise.all([t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(8346),t.e(1423),t.e(4165),t.e(3887),t.e(7215),t.e(1534),t.e(5261),t.e(4493)]).then(t.bind(t,28552))).default,MapImageLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(1423),t.e(4165),t.e(3887),t.e(6017),t.e(4599),t.e(6256),t.e(7374)]).then(t.bind(t,27374))).default,MapNotesLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(8346),t.e(1423),t.e(4165),t.e(3887),t.e(7215),t.e(6017),t.e(773),t.e(9238),t.e(5151)]).then(t.bind(t,62128))).default,MediaLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(4828)]).then(t.bind(t,57765))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(1423),t.e(4165),t.e(3887),t.e(7215),t.e(8068)]).then(t.bind(t,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9971),t.e(6237)]).then(t.bind(t,66237))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(8346),t.e(1423),t.e(4165),t.e(3887),t.e(7215),t.e(6017),t.e(773),t.e(9238),t.e(7741)]).then(t.bind(t,52781))).default,PointCloudLayer:async()=>(await Promise.all([t.e(163),t.e(1773),t.e(4266),t.e(237)]).then(t.bind(t,10608))).default,RouteLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(1423),t.e(153)]).then(t.bind(t,40153))).default,SceneLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(8346),t.e(1423),t.e(4165),t.e(3887),t.e(7215),t.e(6017),t.e(773),t.e(9238),t.e(5590),t.e(7537),t.e(5825),t.e(7476)]).then(t.bind(t,57476))).default,StreamLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(1423),t.e(4165),t.e(3887),t.e(7215),t.e(1724)]).then(t.bind(t,88387))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(1423),t.e(4165),t.e(3887),t.e(6017),t.e(773),t.e(8518),t.e(1231)]).then(t.bind(t,30359))).default,TileLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(1423),t.e(4165),t.e(3887),t.e(6017),t.e(4599),t.e(6486),t.e(6256),t.e(8636)]).then(t.bind(t,98636))).default,UnknownLayer:async()=>(await t.e(4166).then(t.bind(t,44166))).default,UnsupportedLayer:async()=>(await t.e(9296).then(t.bind(t,39296))).default,VectorTileLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(6486),t.e(4325),t.e(9805),t.e(5481)]).then(t.bind(t,94756))).default,VoxelLayer:async()=>(await Promise.all([t.e(163),t.e(1773),t.e(9037),t.e(8865)]).then(t.bind(t,28865))).default,WFSLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(9469),t.e(6082),t.e(8346),t.e(1423),t.e(4165),t.e(3887),t.e(7215),t.e(2653)]).then(t.bind(t,12653))).default,WMSLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9790),t.e(1773),t.e(2462)]).then(t.bind(t,25906))).default,WMTSLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9971),t.e(2594)]).then(t.bind(t,72594))).default,WebTileLayer:async()=>(await Promise.all([t.e(163),t.e(4609),t.e(9971)]).then(t.bind(t,16199))).default}},33516:(e,a,t)=>{t.d(a,{Y:()=>l,h:()=>i});var r=t(81271),n=t(48522);function i(e){return{origin:"portal-item",url:(0,r.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function l(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,r.mN)(e.itemUrl):null,portal:e.portal||n.Z.getDefault(),portalItem:e}}},18062:(e,a,t)=>{t.d(a,{$O:()=>b,Ok:()=>h,Q4:()=>g,XX:()=>S,load:()=>p});var r=t(20102),n=t(87085),i=t(66677),l=t(52104),s=t(48522),o=t(15235),c=t(33516),u=t(14661),y=t(40555),d=t(96187);async function p(e,a){const t=e.instance.portalItem;if(t&&t.id)return await t.load(a),function(e){const a=e.instance.portalItem;if(!a?.type||!e.supportedTypes.includes(a.type))throw new r.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:a?.type,expectedType:e.supportedTypes.join(", ")})}(e),async function(e,a){const t=e.instance,n=t.portalItem;if(!n)return;const{url:i,title:s}=n,o=(0,c.h)(n);if("group"===t.type)return t.read({title:s},o),async function(e,a){let t;const{portalItem:n}=e;if(!n)return;const i=n.type,s=a.layerModuleTypeMap,o=(0,u._$)(n,"Oriented Imagery Layer")??!1;switch(i){case"Feature Service":t=o?s.OrientedImageryLayer:s.FeatureLayer;break;case"Stream Service":t=s.StreamLayer;break;case"Scene Service":t=s.SceneLayer;break;case"Feature Collection":t=s.FeatureLayer;break;default:throw new r.Z("portal:unsupported-item-type-as-group",`The item type '${i}' is not supported as a 'IGroupLayer'`)}let[c,y]=await Promise.all([t(),L(a)]),p=()=>c;if("Feature Service"===i){if(y=n.url?await b(y,n.url):{},S(y).length){const e=s.SubtypeGroupLayer,a=await e();p=e=>"SubtypeGroupLayer"===e.layerType?a:c}return m(e,p,y,await async function(e){const{layersJSON:a}=await(0,l.V)(e);if(!a)return null;const t=[...a.layers,...a.tables];return e=>t.find((a=>a.id===e.id))}(n.url))}return g(y)>0?m(e,p,y):async function(e,a){const{portalItem:t}=e;if(!t?.url)return;const r=await(0,d.T)(t.url);r&&m(e,a,{layers:r.layers?.map(f),tables:r.tables?.map(f)})}(e,p)}(t,e);i&&t.read({url:i},o);const p=await L(e,a);return p&&t.read(p,o),t.resourceReferences={portalItem:n,paths:o.readResourcePaths??[]},"subtype-group"!==t.type&&t.read({title:s},o),(0,y.y)(t,o)}(e,a)}function f(e){return{id:e.id,name:e.name}}function m(e,a,t,l){let s=t.layers||[];const c=t.tables||[];if("Feature Collection"===e.portalItem?.type&&(s.forEach((e=>{"Table"===e?.layerDefinition?.type&&c.push(e)})),s=s.filter((e=>"Table"!==e?.layerDefinition?.type))),"coverage"in t){const a=function(e){const{coverage:a}=e;if(!a)return null;const t=new URL(a);if(a.toLowerCase().includes("item.html")){const e=t.searchParams.get("id"),a=t.origin;return n.Z.fromPortalItem({portalItem:new o.default({id:e,url:a})})}if((0,i.B5)(a))return n.Z.fromArcGISServerUrl({url:a});throw new r.Z("portal:oriented-imagery-layer-coverage","the provided coverage url couldn't be loaded as a layer")}(t);a&&e.add(a)}s.reverse().forEach((r=>{const n=l?.(r);if(n||!l){const i=w(e,a(r),t,r,n);e.add(i)}})),c.reverse().forEach((r=>{const n=l?.(r);if(n||!l){const i=w(e,a(r),t,r,n);e.tables.add(i)}}))}function w(e,a,t,r,n){const i=e.portalItem,l=new a({portalItem:i.clone(),layerId:r.id});if("sourceJSON"in l&&(l.sourceJSON=n),"subtype-group"!==l.type&&(l.sublayerTitleMode="service-name"),"Feature Collection"===i.type){const e={origin:"portal-item",portal:i.portal||s.Z.getDefault()};l.read(r,e);const a=t.showLegend;null!=a&&l.read({showLegend:a},e)}return l}async function L(e,a){if(!1===e.supportsData)return;const t=e.instance,r=t.portalItem;if(!r)return;let n=null;try{n=await r.fetchData("json",a)}catch(e){}if(function(e){return"stream"!==e.type&&"oriented-imagery"!==e.type&&"layerId"in e}(t)){let e=null,a=!0;if(n&&g(n)>0){if(null==t.layerId){const e=S(n);t.layerId="subtype-group"===t.type?e?.[0]:h(n)}e=function(e,a){const{layerId:t}=a,r=e.layers?.find((e=>e.id===t))||e.tables?.find((e=>e.id===t));return r&&function(e,a){return!("feature"===a.type&&"layerType"in e&&"SubtypeGroupLayer"===e.layerType||"subtype-group"===a.type&&!("layerType"in e))}(r,a)?r:null}(n,t),e&&(1===g(n)&&(a=!1),null!=n.showLegend&&(e.showLegend=n.showLegend))}return a&&"sublayerTitleMode"in t&&"service-name"!==t.sublayerTitleMode&&(t.sublayerTitleMode="item-title-and-service-name"),e}return n}async function b(e,a){if(null==e?.layers||null==e?.tables){const t=await(0,d.T)(a);(e=e||{}).layers=e.layers||t?.layers,e.tables=e.tables||t?.tables}return e}function h(e){const a=e.layers;if(a&&a.length)return a[0].id;const t=e.tables;return t&&t.length?t[0].id:null}function g(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function S(e){const a=[];return e?.layers?.forEach((e=>{"SubtypeGroupLayer"===e.layerType&&a.push(e.id)})),a}},28008:(e,a,t)=>{t.d(a,{fromItem:()=>u,v:()=>y});var r=t(20102),n=t(84230),i=t(87344),l=t(15235),s=t(18062),o=t(14661),c=t(96187);async function u(e){!e.portalItem||e.portalItem instanceof l.default||(e={...e,portalItem:new l.default(e.portalItem)});const a=await async function(e){return await e.load(),async function(e){const a=e.className,t=i.T[a];return{constructor:await t(),properties:e.properties}}(await y(e))}(e.portalItem);return new(0,a.constructor)({portalItem:e.portalItem,...a.properties})}async function y(e){switch(e.type){case"Map Service":return async function(e){return await async function(e){return(await(0,c.T)(e.url)).tileInfo}(e)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e);case"Feature Service":return async function(e){if((0,o._$)(e,"Oriented Imagery Layer"))return async function(e){return await e.load(),{className:"OrientedImageryLayer",properties:await e.fetchData()}}(e);const a=await d(e);if("object"==typeof a){const e={};return null!=a.id&&(e.layerId=a.id),{className:a.className||"FeatureLayer",properties:e}}return{className:"GroupLayer"}}(e);case"Feature Collection":return async function(e){await e.load();const a=(0,o._$)(e,"Map Notes"),t=(0,o._$)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,o._$)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,s.Q4)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Scene Service":return async function(e){const a=await d(e);if("object"==typeof a){const t={};let r;if(null!=a.id?(t.layerId=a.id,r=`${e.url}/layers/${a.id}`):r=e.url,e.typeKeywords?.length)for(const a of Object.keys(n.fb))if(e.typeKeywords.includes(a))return{className:n.fb[a]};const i=await(0,c.T)(r);return{className:n.fb[i?.layerType]||"SceneLayer",properties:t}}if(!1===a){const a=await(0,c.T)(e.url);return"Voxel"===a?.layerType?{className:"VoxelLayer"}:{className:"GroupLayer"}}return{className:"GroupLayer"}}(e);case"Image Service":return async function(e){await e.load();const a=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(a.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(a.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await e.fetchData(),r=t?.layerType;if("ArcGISTiledImageServiceLayer"===r)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===r)return{className:"ImageryLayer"};const n=await(0,c.T)(e.url),i=n.cacheType?.toLowerCase(),l=n.capabilities?.toLowerCase().includes("tilesonly");return"map"===i||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e);case"Stream Service":case"Feed":return{className:"StreamLayer"};case"Vector Tile Service":return{className:"VectorTileLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"CSV":return{className:"CSVLayer"};case"KML":return{className:"KMLLayer"};case"WFS":return{className:"WFSLayer"};case"WMTS":return{className:"WMTSLayer"};case"WMS":return{className:"WMSLayer"};default:throw new r.Z("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function d(e){const a=e.url;if(!a||/\/\d+$/.test(a))return{};await e.load();const t=await e.fetchData();if("Feature Service"===e.type){const e=p(await(0,s.$O)(t,a));if("object"==typeof e){const a=(0,s.XX)(t);e.className=null!=e.id&&a.includes(e.id)?"SubtypeGroupLayer":"FeatureLayer"}return e}return(0,s.Q4)(t)>0?p(t):p(await(0,c.T)(a))}function p(e){return 1===(0,s.Q4)(e)&&{id:(0,s.Ok)(e)}}},40555:(e,a,t)=>{t.d(a,{y:()=>l});var r=t(66643),n=t(95330),i=t(20941);async function l(e,a,t){const l=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(l&&"unique-value"===l.type&&l.styleOrigin){const s=await(0,r.q6)(l.populateFromStyle());if((0,n.k_)(t),!1===s.ok){const t=s.error;a&&a.messages&&a.messages.push(new i.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${t.message}`,{error:t,context:a})),e.clear("renderer",a?.origin)}}}},96187:(e,a,t)=>{t.d(a,{T:()=>n});var r=t(3172);async function n(e,a){const{data:t}=await(0,r.default)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6459],{21787:(t,e,n)=>{n.d(e,{a:()=>s,b:()=>l,e:()=>c,f:()=>o,i:()=>h,m:()=>u,s:()=>a,t:()=>i});var r=n(46851);function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function a(t,e,n,r,o,a,i,c,s,u){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=i,t[6]=c,t[7]=s,t[8]=u,t}function i(t,e){if(t===e){const n=e[1],r=e[2],o=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=o}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function c(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8],f=l*i-c*u,h=-l*a+c*s,p=u*a-i*s;let g=n*f+r*h+o*p;return g?(g=1/g,t[0]=f*g,t[1]=(-l*r+o*u)*g,t[2]=(c*r-o*i)*g,t[3]=h*g,t[4]=(l*n-o*s)*g,t[5]=(-c*n+o*a)*g,t[6]=p*g,t[7]=(-u*n+r*s)*g,t[8]=(i*n-r*a)*g,t):null}function s(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8];return t[0]=i*l-c*u,t[1]=o*u-r*l,t[2]=r*c-o*i,t[3]=c*s-a*l,t[4]=n*l-o*s,t[5]=o*a-n*c,t[6]=a*u-i*s,t[7]=r*s-n*u,t[8]=n*i-r*a,t}function u(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=n[0],p=n[1],g=n[2],y=n[3],M=n[4],d=n[5],m=n[6],b=n[7],A=n[8];return t[0]=h*r+p*i+g*u,t[1]=h*o+p*c+g*l,t[2]=h*a+p*s+g*f,t[3]=y*r+M*i+d*u,t[4]=y*o+M*c+d*l,t[5]=y*a+M*s+d*f,t[6]=m*r+b*i+A*u,t[7]=m*o+b*c+A*l,t[8]=m*a+b*s+A*f,t}function l(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8],f=e[9],h=e[10],p=e[11],g=e[12],y=e[13],M=e[14],d=e[15],m=n*c-r*i,b=n*s-o*i,A=n*u-a*i,P=r*s-o*c,v=r*u-a*c,w=o*u-a*s,_=l*y-f*g,x=l*M-h*g,F=l*d-p*g,S=f*M-h*y,T=f*d-p*y,C=h*d-p*M;let O=m*C-b*T+A*S+P*F-v*x+w*_;return O?(O=1/O,t[0]=(c*C-s*T+u*S)*O,t[1]=(s*F-i*C-u*x)*O,t[2]=(i*T-c*F+u*_)*O,t[3]=(o*T-r*C-a*S)*O,t[4]=(n*C-o*F+a*x)*O,t[5]=(r*F-n*T-a*_)*O,t[6]=(y*w-M*v+d*P)*O,t[7]=(M*A-g*w-d*b)*O,t[8]=(g*v-y*A+d*m)*O,t):null}function f(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function h(t){const e=(0,r.g)(),n=t[0],o=t[1],a=t[2],i=t[3],c=t[4],s=t[5],u=t[6],l=t[7],f=t[8];return Math.abs(1-(n*n+i*i+u*u))<=e&&Math.abs(1-(o*o+c*c+l*l))<=e&&Math.abs(1-(a*a+s*s+f*f))<=e}const p=u,g=f;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:s,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],r=t[2],o=t[3],a=t[4],i=t[5],c=t[6],s=t[7],u=t[8];return e*(u*a-i*s)+n*(-u*o+i*c)+r*(s*o-a*c)},equals:function(t,e){const n=t[0],o=t[1],a=t[2],i=t[3],c=t[4],s=t[5],u=t[6],l=t[7],f=t[8],h=e[0],p=e[1],g=e[2],y=e[3],M=e[4],d=e[5],m=e[6],b=e[7],A=e[8],P=(0,r.g)();return Math.abs(n-h)<=P*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(o-p)<=P*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-g)<=P*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(i-y)<=P*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(c-M)<=P*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(s-d)<=P*Math.max(1,Math.abs(s),Math.abs(d))&&Math.abs(u-m)<=P*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(l-b)<=P*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(f-A)<=P*Math.max(1,Math.abs(f),Math.abs(A))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:o,fromQuat:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=n+n,c=r+r,s=o+o,u=n*i,l=r*i,f=r*c,h=o*i,p=o*c,g=o*s,y=a*i,M=a*c,d=a*s;return t[0]=1-f-g,t[3]=l-d,t[6]=h+M,t[1]=l+d,t[4]=1-u-g,t[7]=p-y,t[2]=h-M,t[5]=p+y,t[8]=1-u-f,t},fromRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:c,isOrthoNormal:h,mul:p,multiply:u,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:l,normalFromMat4Legacy:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[4],i=e[5],c=e[6],s=e[8],u=e[9],l=e[10],f=l*i-c*u,h=-l*a+c*s,p=u*a-i*s,g=n*f+r*h+o*p;if(!g)return null;const y=1/g;return t[0]=f*y,t[1]=(-l*r+o*u)*y,t[2]=(c*r-o*i)*y,t[3]=h*y,t[4]=(l*n-o*s)*y,t[5]=(-c*n+o*a)*y,t[6]=p*y,t[7]=(-u*n+r*s)*y,t[8]=(i*n-r*a)*y,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=Math.sin(n),p=Math.cos(n);return t[0]=p*r+h*i,t[1]=p*o+h*c,t[2]=p*a+h*s,t[3]=p*i-h*r,t[4]=p*c-h*o,t[5]=p*s-h*a,t[6]=u,t[7]=l,t[8]=f,t},scale:function(t,e,n){const r=n[0],o=n[1],a=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t[6]=a*e[6],t[7]=a*e[7],t[8]=a*e[8],t},scaleByVec2:function(t,e,n){const r=n[0],o=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t},set:a,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:g,subtract:f,translate:function(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=n[0],p=n[1];return t[0]=r,t[1]=o,t[2]=a,t[3]=i,t[4]=c,t[5]=s,t[6]=h*r+p*i+u,t[7]=h*o+p*c+l,t[8]=h*a+p*s+f,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(t,e,n,r,o,a,i,c,s){return[t,e,n,r,o,a,i,c,s]}function a(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>a,c:()=>r,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,createView:a,fromValues:o},Symbol.toStringTag,{value:"Module"}))},13598:(t,e,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}function a(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>i,a:()=>a,b:()=>o,c:()=>r});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,createView:a,fromValues:function(t,e,n,r,o,a,i,c,s,u,l,f,h,p,g,y){return[t,e,n,r,o,a,i,c,s,u,l,f,h,p,g,y]}},Symbol.toStringTag,{value:"Module"}))},51305:(t,e,n)=>{n.d(e,{c:()=>p,g:()=>l,j:()=>T,k:()=>y,m:()=>f,s:()=>u});var r=n(46521),o=n(94961),a=n(65617),i=n(46851),c=n(17896),s=n(98766);function u(t,e,n){n*=.5;const r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function l(t,e){const n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>(0,i.g)()?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function f(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=n[0],s=n[1],u=n[2],l=n[3];return t[0]=r*l+i*c+o*u-a*s,t[1]=o*l+i*s+a*c-r*u,t[2]=a*l+i*u+r*s-o*c,t[3]=i*l-r*c-o*s-a*u,t}function h(t,e,n,r){const o=e[0],a=e[1],c=e[2],s=e[3];let u,l,f,h,p,g=n[0],y=n[1],M=n[2],d=n[3];return l=o*g+a*y+c*M+s*d,l<0&&(l=-l,g=-g,y=-y,M=-M,d=-d),1-l>(0,i.g)()?(u=Math.acos(l),f=Math.sin(u),h=Math.sin((1-r)*u)/f,p=Math.sin(r*u)/f):(h=1-r,p=r),t[0]=h*o+p*g,t[1]=h*a+p*y,t[2]=h*c+p*M,t[3]=h*s+p*d,t}function p(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function g(t,e){const n=e[0]+e[4]+e[8];let r;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let n=0;e[4]>e[0]&&(n=1),e[8]>e[3*n+n]&&(n=2);const o=(n+1)%3,a=(n+2)%3;r=Math.sqrt(e[3*n+n]-e[3*o+o]-e[3*a+a]+1),t[n]=.5*r,r=.5/r,t[3]=(e[3*o+a]-e[3*a+o])*r,t[o]=(e[3*o+n]+e[3*n+o])*r,t[a]=(e[3*a+n]+e[3*n+a])*r}return t}function y(t,e,n,r){const o=.5*Math.PI/180;e*=o,n*=o,r*=o;const a=Math.sin(e),i=Math.cos(e),c=Math.sin(n),s=Math.cos(n),u=Math.sin(r),l=Math.cos(r);return t[0]=a*s*l-i*c*u,t[1]=i*c*l+a*s*u,t[2]=i*s*u-a*c*l,t[3]=i*s*l+a*c*u,t}const M=s.c,d=s.s,m=s.a,b=f,A=s.b,P=s.d,v=s.l,w=s.e,_=w,x=s.f,F=x,S=s.n,T=s.g,C=s.h,O=(0,a.c)(),R=(0,a.f)(1,0,0),B=(0,a.f)(0,1,0),Z=(0,o.a)(),j=(0,o.a)(),V=(0,r.c)();Object.freeze(Object.defineProperty({__proto__:null,add:m,calculateW:function(t,e){const n=e[0],r=e[1],o=e[2];return t[0]=n,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-o*o)),t},conjugate:p,copy:M,dot:P,equals:C,exactEquals:T,fromEuler:y,fromMat3:g,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=n*n+r*r+o*o+a*a,c=i?1/i:0;return t[0]=-n*c,t[1]=-r*c,t[2]=-o*c,t[3]=a*c,t},len:_,length:w,lerp:v,mul:b,multiply:f,normalize:S,random:function(t){const e=i.R,n=e(),r=e(),o=e(),a=Math.sqrt(1-n),c=Math.sqrt(n);return t[0]=a*Math.sin(2*Math.PI*r),t[1]=a*Math.cos(2*Math.PI*r),t[2]=c*Math.sin(2*Math.PI*o),t[3]=c*Math.cos(2*Math.PI*o),t},rotateX:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s+i*c,t[1]=o*s+a*c,t[2]=a*s-o*c,t[3]=i*s-r*c,t},rotateY:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s-a*c,t[1]=o*s+i*c,t[2]=a*s+r*c,t[3]=i*s-o*c,t},rotateZ:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s+o*c,t[1]=o*s-r*c,t[2]=a*s+i*c,t[3]=i*s-a*c,t},rotationTo:function(t,e,n){const r=(0,c.e)(e,n);return r<-.999999?((0,c.f)(O,R,e),(0,c.u)(O)<1e-6&&(0,c.f)(O,B,e),(0,c.n)(O,O),u(t,O,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,c.f)(O,e,n),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+r,S(t,t))},scale:A,set:d,setAxes:function(t,e,n,r){const o=V;return o[0]=n[0],o[3]=n[1],o[6]=n[2],o[1]=r[0],o[4]=r[1],o[7]=r[2],o[2]=-e[0],o[5]=-e[1],o[8]=-e[2],S(t,g(t,o))},setAxisAngle:u,slerp:h,sqlerp:function(t,e,n,r,o,a){return h(Z,e,o,a),h(j,n,r,a),h(t,Z,j,2*a*(1-a)),t},sqrLen:F,squaredLength:x,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function r(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}function a(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>i,a:()=>r,b:()=>o,c:()=>a});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,createView:a,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},20773:(t,e,n)=>{n.d(e,{a:()=>c,b:()=>i,c:()=>o,d:()=>l,e:()=>s,n:()=>f,s:()=>u,t:()=>a});var r=n(72220);function o(t,e,n){a(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function a(t,e,n,o=3,a=o){if(t.length/o!==Math.ceil(e.length/a))return r.c.error("source and destination buffers need to have the same number of elements"),t;const i=t.length/o,c=n[0],s=n[1],u=n[2],l=n[4],f=n[5],h=n[6],p=n[8],g=n[9],y=n[10],M=n[12],d=n[13],m=n[14];let b=0,A=0;for(let n=0;n<i;n++){const n=e[b],r=e[b+1],i=e[b+2];t[A]=c*n+l*r+p*i+M,t[A+1]=s*n+f*r+g*i+d,t[A+2]=u*n+h*r+y*i+m,b+=a,A+=o}return t}function i(t,e,n){c(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function c(t,e,n,o=3,a=o){if(t.length/o!==Math.ceil(e.length/a))return void r.c.error("source and destination buffers need to have the same number of elements");const i=t.length/o,c=n[0],s=n[1],u=n[2],l=n[3],f=n[4],h=n[5],p=n[6],g=n[7],y=n[8];let M=0,d=0;for(let n=0;n<i;n++){const n=e[M],r=e[M+1],i=e[M+2];t[d]=c*n+l*r+p*i,t[d+1]=s*n+f*r+g*i,t[d+2]=u*n+h*r+y*i,M+=a,d+=o}}function s(t,e,n){u(t.typedBuffer,e,n,t.typedBufferStride)}function u(t,e,n,r=3){const o=Math.min(t.length/r,e.count),a=e.typedBuffer,i=e.typedBufferStride;let c=0,s=0;for(let e=0;e<o;e++)t[s]=n*a[c],t[s+1]=n*a[c+1],t[s+2]=n*a[c+2],c+=i,s+=r}function l(t,e){f(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function f(t,e,n=3,r=n){const o=Math.min(t.length/n,e.length/r);let a=0,i=0;for(let c=0;c<o;c++){const o=e[a],c=e[a+1],s=e[a+2],u=o*o+c*c+s*s;if(u>0){const e=1/Math.sqrt(u);t[i]=e*o,t[i+1]=e*c,t[i+2]=e*s}a+=r,i+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:f,normalizeView:l,scale:u,scaleView:s,shiftRight:function(t,e,n){const r=Math.min(t.count,e.count),o=t.typedBuffer,a=t.typedBufferStride,i=e.typedBuffer,c=e.typedBufferStride;let s=0,u=0;for(let t=0;t<r;t++)o[u]=i[s]>>n,o[u+1]=i[s+1]>>n,o[u+2]=i[s+2]>>n,s+=c,u+=a},transformMat3:c,transformMat3View:i,transformMat4:a,transformMat4View:o},Symbol.toStringTag,{value:"Module"}))},58995:(t,e,n)=>{n.d(e,{rS:()=>u});var r=n(2109),o=n(82971),a=n(8744);const i=new o.Z(r.kU),c=new o.Z(r.JL),s=new o.Z(r.mM);function u(t){return t&&((0,a.BZ)(t)||(0,a.fS)(t,c))?c:t&&((0,a.V2)(t)||(0,a.fS)(t,s))?s:i}new o.Z(r.pn)},83025:(t,e,n)=>{n.d(e,{QZ:()=>a,Rq:()=>i,bg:()=>o});var r=n(1533);function o(t,e=!1){return t<=r.DB?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function a(t){return((0,r.kJ)(t)?t.length:t.byteLength/8)<=r.DB?Array.from(t):new Float64Array(t)}function i(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}},85872:(t,e,n)=>{n.d(e,{Z:()=>h});var r=n(43697),o=n(2368),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(36030)),s=n(52011),u=n(65617),l=n(94139);let f=class extends((0,o.J)(a.wq)){constructor(t){super(t),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,u.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new l.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFormPoint({x:t,y:e,z:n}){this.origin=(0,u.f)(t,e,n??0)}};(0,r._)([(0,c.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],f.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],f.prototype,"origin",void 0),f=(0,r._)([(0,s.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],f);const h=f},50567:(t,e,n)=>{n.d(e,{Z:()=>u});var r=n(43697),o=n(2368),a=n(96674),i=(n(92604),n(75215),n(67676),n(80442),n(20102),n(36030)),c=n(52011);let s=class extends((0,o.J)(a.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,r._)([(0,i.J)({georeferenced:"georeferenced"},{readOnly:!0})],s.prototype,"type",void 0),s=(0,r._)([(0,c.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],s);const u=s},84555:(t,e,n)=>{n.d(e,{Z:()=>h});var r=n(43697),o=n(2368),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(36030)),s=n(52011),u=n(65617),l=n(94139);let f=class extends((0,o.J)(a.wq)){constructor(t){super(t),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,u.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new l.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFormPoint({x:t,y:e,z:n}){this.origin=(0,u.f)(t,e,n??0)}};(0,r._)([(0,c.J)({local:"local"},{readOnly:!0})],f.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],f.prototype,"origin",void 0),f=(0,r._)([(0,s.j)("esri.geometry.support.MeshLocalVertexSpace")],f);const h=f},2674:(t,e,n)=>{n.d(e,{Z:()=>d});var r,o=n(43697),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(52011)),s=n(52138),u=n(13598),l=n(51305),f=n(94961),h=n(17896),p=n(65617),g=n(3709);let y=r=class extends a.wq{constructor(t){super(t),this.translation=(0,p.c)(),this.rotationAxis=(0,p.g)(g.UP),this.rotationAngle=0,this.scale=(0,p.f)(1,1,1)}get rotation(){return(0,g.uT)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.a)((0,g.ZZ)(t)),this.rotationAngle=(0,g.EU)(t)}get localMatrix(){const t=(0,u.c)();return(0,l.s)(M,(0,g.ZZ)(this.rotation),(0,g.WH)(this.rotation)),(0,s.g)(t,M,this.translation,this.scale),t}get localMatrixInverse(){return(0,s.a)((0,u.c)(),this.localMatrix)}applyLocal(t,e){return(0,h.m)(e,t,this.localMatrix)}applyLocalInverse(t,e){return(0,h.m)(e,t,this.localMatrixInverse)}equals(t){return this===t||null!=t&&(0,s.h)(this.localMatrix,t.localMatrix)}clone(){const t={translation:(0,p.a)(this.translation),rotationAxis:(0,p.a)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,p.a)(this.scale)};return new r(t)}};(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"translation",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAxis",void 0),(0,o._)([(0,i.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAngle",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"scale",void 0),(0,o._)([(0,i.Cb)()],y.prototype,"rotation",null),(0,o._)([(0,i.Cb)()],y.prototype,"localMatrix",null),(0,o._)([(0,i.Cb)()],y.prototype,"localMatrixInverse",null),y=r=(0,o._)([(0,c.j)("esri.geometry.support.MeshTransform")],y);const M=(0,f.a)(),d=y},3709:(t,e,n)=>{n.d(e,{EU:()=>p,UP:()=>y,Ue:()=>s,WH:()=>g,ZZ:()=>h,qC:()=>l,qw:()=>f,uT:()=>u});var r=n(22021),o=n(51305),a=n(94961),i=n(17896),c=n(65617);function s(t=y){return[t[0],t[1],t[2],t[3]]}function u(t,e,n=s()){return(0,i.c)(n,t),n[3]=e,n}function l(t,e,n=s()){return(0,o.s)(M,t,g(t)),(0,o.s)(d,e,g(e)),(0,o.m)(M,d,M),function(t,e){return t[3]=e,t}(n,(0,r.BV)((0,o.g)(n,M)))}function f(t,e,n,r=s()){return u(c.d,t,m),u(c.e,e,b),u(c.U,n,A),l(m,b,m),l(m,A,r),r}function h(t){return t}function p(t){return t[3]}function g(t){return(0,r.Vl)(t[3])}const y=[0,0,1,0],M=(0,a.a)(),d=(0,a.a)(),m=(s(),s()),b=s(),A=s()},72220:(t,e,n)=>{n.d(e,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},13442:(t,e,n)=>{n.d(e,{A:()=>a,h:()=>o});var r=n(92604);function o(t,e){return t.isGeographic||t.isWebMercator&&(e?.geographic??!0)}function a(t,e,n){const o=!t.isGeoreferenced;null!=n?.geographic&&n.geographic!==o&&r.Z.getLogger(e).warnOnce(`Specifying the 'geographic' parameter (${n.geographic}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}},66459:(t,e,n)=>{n.d(e,{FF:()=>w,I5:()=>P,Yq:()=>_,iV:()=>x,iv:()=>A,w1:()=>v});var r=n(67900),o=n(46521),a=n(52138),i=n(13598),c=n(17896),s=n(65617),u=n(21787),l=n(44547),f=n(58995),h=n(83025),p=n(85872),g=n(50567),y=n(84555),M=n(2674),d=n(20773),m=n(13442),b=n(56493);function A(t,e,n){return(0,m.h)(e.spatialReference,n)?function(t,e,n){const r=e.spatialReference,o=C(e,n,Z),a=new Float64Array(t.position.length),i=function(t,e,n,r){(0,d.t)(r,t,e);const o=new Float64Array(t.length);return(0,b.To)(r,o,n)}(t.position,o,r,a),c=(0,u.b)(V,o);return{position:i,normal:F(i,a,t.normal,c,r),tangent:S(i,a,t.tangent,c,r)}}(t,e,n):function(t,e,n){const r=new Float64Array(t.position.length),o=t.position,a=e.x,i=e.y,c=e.z??0,s=B(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=o[t]*s+a,r[t+1]=o[t+1]*s+i,r[t+2]=o[t+2]*s+c;return{position:r,normal:t.normal,tangent:t.tangent}}(t,e,n)}function P(t,e,n,r){const{position:o,normal:a,tangent:c}=t;if(!e.isRelative)return{position:o,normal:a,tangent:c};const s=n?.localMatrix??i.I;return A({position:(0,d.t)(new Float64Array(o.length),o,s),normal:null!=a?(0,b.w9)(a,new Float32Array(a.length),s):null,tangent:null!=c?(0,b.VS)(c,new Float32Array(c.length),s):null},e.getOriginPoint(r),{geographic:!e.isGeoreferenced})}function v(t,e,n){if(n?.useTransform){const{position:r,normal:o,tangent:a}=t,{x:i,y:c,z:u}=e,l=(0,s.f)(i,c,u??0);return{vertexAttributes:{position:r,normal:o,tangent:a},vertexSpace:n.geographic??1?new y.Z({origin:l}):new p.Z({origin:l}),transform:new M.Z}}return{vertexAttributes:A(t,e,n),vertexSpace:new g.Z,transform:null}}function w(t,e,n){return(0,m.h)(e.spatialReference,n)?function(t,e,n){const r=e.spatialReference;C(e,n,Z);const o=(0,a.a)(j,Z),i=new Float64Array(t.position.length),c=function(t,e,n,r){const o=(0,b.XO)(t,e,r),a=new Float64Array(o.length);return(0,d.t)(a,o,n),a}(t.position,r,o,i),s=(0,u.b)(V,o);return{position:c,normal:O(t.normal,t.position,i,r,s),tangent:R(t.tangent,t.position,i,r,s)}}(t,e,n):T(t,e,n)}function _(t,e,n,r,o){if(!e.isRelative)return w(t,r,o);const{spatialReference:a}=r,i=P(t,e,n,a);return r.equals(e.getOriginPoint(a))?T(i,r,o):w(i,r,o)}function x(t,e,n,r,o){const u=n.isRelative?n.origin:s.Z,p=n.isRelative?e?.localMatrix??i.I:i.I;if(n.isGeoreferenced){const e=(0,a.j)(p,i.I)?(0,h.QZ)(r):(0,d.t)((0,h.bg)(r.length),r,p);if(!(0,c.k)(u,s.Z))for(let t=0;t<e.length;t+=3)e[t]+=u[0],e[t+1]+=u[1],e[t+2]+=u[2];return(0,l.CM)(e,t,0,e,o,0,e.length/3),e}const g=(0,f.rS)(t),y=(0,l.Up)(t,g)?g:t;(0,l.Bm)(t,u,Z,y),(0,a.m)(Z,Z,p);const M=(0,h.bg)(r.length);return(0,d.t)(M,r,Z),(0,l.CM)(M,y,0,M,o,0,M.length/3),M}function F(t,e,n,r,o){if(null==n)return null;const a=new Float32Array(n.length);return(0,d.a)(a,n,r),(0,b.Yk)(a,t,e,o,a),a}function S(t,e,n,r,o){if(null==n)return null;const a=new Float32Array(n.length);(0,d.a)(a,n,r,4);for(let t=3;t<a.length;t+=4)a[t]=n[t];return(0,b.M2)(a,t,e,o,a),a}function T(t,e,n){const r=new Float64Array(t.position.length),o=t.position,a=e.x,i=e.y,c=e.z??0,s=B(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=(o[t]-a)/s,r[t+1]=(o[t+1]-i)/s,r[t+2]=(o[t+2]-c)/s;return{position:r,normal:t.normal,tangent:t.tangent}}function C(t,e,n){(0,l.Bm)(t.spatialReference,[t.x,t.y,t.z??0],n,(0,f.rS)(t.spatialReference));const r=B(e?e.unit:null,t.spatialReference);return(0,a.k)(n,n,[r,r,r]),n}function O(t,e,n,r,o){if(null==t)return null;const a=(0,b.Iz)(t,e,n,r,new Float32Array(t.length));return(0,d.a)(a,a,o),a}function R(t,e,n,r,o){if(null==t)return null;const a=(0,b.wi)(t,e,n,r,new Float32Array(t.length));return(0,d.a)(a,a,o,4),a}function B(t,e){if(null==t)return 1;const n=(0,r.r6)(e);return 1/(0,r.En)(n,"meters",t)}const Z=(0,i.c)(),j=(0,i.c)(),V=(0,o.c)()},56493:(t,e,n)=>{n.d(e,{Iz:()=>M,M2:()=>w,To:()=>b,VS:()=>P,XO:()=>m,Yk:()=>d,w9:()=>A,wi:()=>v});var r=n(92604),o=n(21787),a=n(46521),i=n(13598),c=n(17896),s=n(65617),u=n(44547),l=n(58995),f=n(8744),h=n(40488),p=n(56481),g=n(20773);const y=r.Z.getLogger("esri.geometry.support.meshUtils.normalProjection");function M(t,e,n,r,o){return x(r)?(_(S.TO_PCPF,p.ct.fromTypedArray(t),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o)),o):(y.error("Cannot convert spatial reference to PCPF"),o)}function d(t,e,n,r,o){return x(r)?(_(S.FROM_PCPF,p.ct.fromTypedArray(t),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o)),o):(y.error("Cannot convert to spatial reference from PCPF"),o)}function m(t,e,n){return(0,u.CM)(t,e,0,n,(0,l.rS)(e),0,t.length/3),n}function b(t,e,n){return(0,u.CM)(t,(0,l.rS)(n),0,e,n,0,t.length/3),e}function A(t,e,n){return(0,o.b)(B,n),(0,g.a)(e,t,B),(0,o.i)(B)||(0,g.n)(e,e),e}function P(t,e,n){if((0,o.b)(B,n),(0,g.a)(e,t,B,4),(0,o.i)(B)||(0,g.n)(e,e,4),t!==e)for(let n=3;n<t.length;n+=4)e[n]=t[n];return e}function v(t,e,n,r,o){if(!x(r))return y.error("Cannot convert spatial reference to PCPF"),o;_(S.TO_PCPF,p.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function w(t,e,n,r,o){if(!x(r))return y.error("Cannot convert to spatial reference from PCPF"),o;_(S.FROM_PCPF,p.ct.fromTypedArray(t,16),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o,16));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function _(t,e,n,r,a,i){if(!e)return;const s=n.count,f=(0,l.rS)(a);if(F(a))for(let n=0;n<s;n++)r.getVec(n,C),e.getVec(n,O),(0,u.Bm)(f,C,R,f),(0,o.f)(B,R),t===S.FROM_PCPF&&(0,o.t)(B,B),(0,c.t)(O,O,B),i.setVec(n,O);else for(let a=0;a<s;a++){r.getVec(a,C),e.getVec(a,O),(0,u.Bm)(f,C,R,f),(0,o.f)(B,R);const s=(0,h.mZ)(n.get(a,1));let l=Math.cos(s);t===S.TO_PCPF&&(l=1/l),B[0]*=l,B[1]*=l,B[2]*=l,B[3]*=l,B[4]*=l,B[5]*=l,t===S.FROM_PCPF&&(0,o.t)(B,B),(0,c.t)(O,O,B),(0,c.n)(O,O),i.setVec(a,O)}return i}function x(t){return F(t)||function(t){return t.isWebMercator}(t)}function F(t){return t.isWGS84||(0,f.yW)(t)||(0,f.BZ)(t)||(0,f.V2)(t)}var S,T;(T=S||(S={}))[T.TO_PCPF=0]="TO_PCPF",T[T.FROM_PCPF=1]="FROM_PCPF";const C=(0,s.c)(),O=(0,s.c)(),R=(0,i.c)(),B=(0,a.c)()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6459],{21787:(t,e,n)=>{n.d(e,{a:()=>s,b:()=>l,e:()=>c,f:()=>o,i:()=>h,m:()=>u,s:()=>a,t:()=>i});var r=n(46851);function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function a(t,e,n,r,o,a,i,c,s,u){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=i,t[6]=c,t[7]=s,t[8]=u,t}function i(t,e){if(t===e){const n=e[1],r=e[2],o=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=o}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function c(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8],f=l*i-c*u,h=-l*a+c*s,p=u*a-i*s;let g=n*f+r*h+o*p;return g?(g=1/g,t[0]=f*g,t[1]=(-l*r+o*u)*g,t[2]=(c*r-o*i)*g,t[3]=h*g,t[4]=(l*n-o*s)*g,t[5]=(-c*n+o*a)*g,t[6]=p*g,t[7]=(-u*n+r*s)*g,t[8]=(i*n-r*a)*g,t):null}function s(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8];return t[0]=i*l-c*u,t[1]=o*u-r*l,t[2]=r*c-o*i,t[3]=c*s-a*l,t[4]=n*l-o*s,t[5]=o*a-n*c,t[6]=a*u-i*s,t[7]=r*s-n*u,t[8]=n*i-r*a,t}function u(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=n[0],p=n[1],g=n[2],y=n[3],M=n[4],d=n[5],m=n[6],b=n[7],A=n[8];return t[0]=h*r+p*i+g*u,t[1]=h*o+p*c+g*l,t[2]=h*a+p*s+g*f,t[3]=y*r+M*i+d*u,t[4]=y*o+M*c+d*l,t[5]=y*a+M*s+d*f,t[6]=m*r+b*i+A*u,t[7]=m*o+b*c+A*l,t[8]=m*a+b*s+A*f,t}function l(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8],f=e[9],h=e[10],p=e[11],g=e[12],y=e[13],M=e[14],d=e[15],m=n*c-r*i,b=n*s-o*i,A=n*u-a*i,P=r*s-o*c,v=r*u-a*c,w=o*u-a*s,_=l*y-f*g,x=l*M-h*g,F=l*d-p*g,S=f*M-h*y,T=f*d-p*y,C=h*d-p*M;let O=m*C-b*T+A*S+P*F-v*x+w*_;return O?(O=1/O,t[0]=(c*C-s*T+u*S)*O,t[1]=(s*F-i*C-u*x)*O,t[2]=(i*T-c*F+u*_)*O,t[3]=(o*T-r*C-a*S)*O,t[4]=(n*C-o*F+a*x)*O,t[5]=(r*F-n*T-a*_)*O,t[6]=(y*w-M*v+d*P)*O,t[7]=(M*A-g*w-d*b)*O,t[8]=(g*v-y*A+d*m)*O,t):null}function f(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function h(t){const e=(0,r.g)(),n=t[0],o=t[1],a=t[2],i=t[3],c=t[4],s=t[5],u=t[6],l=t[7],f=t[8];return Math.abs(1-(n*n+i*i+u*u))<=e&&Math.abs(1-(o*o+c*c+l*l))<=e&&Math.abs(1-(a*a+s*s+f*f))<=e}const p=u,g=f;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:s,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],r=t[2],o=t[3],a=t[4],i=t[5],c=t[6],s=t[7],u=t[8];return e*(u*a-i*s)+n*(-u*o+i*c)+r*(s*o-a*c)},equals:function(t,e){const n=t[0],o=t[1],a=t[2],i=t[3],c=t[4],s=t[5],u=t[6],l=t[7],f=t[8],h=e[0],p=e[1],g=e[2],y=e[3],M=e[4],d=e[5],m=e[6],b=e[7],A=e[8],P=(0,r.g)();return Math.abs(n-h)<=P*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(o-p)<=P*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-g)<=P*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(i-y)<=P*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(c-M)<=P*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(s-d)<=P*Math.max(1,Math.abs(s),Math.abs(d))&&Math.abs(u-m)<=P*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(l-b)<=P*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(f-A)<=P*Math.max(1,Math.abs(f),Math.abs(A))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:o,fromQuat:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=n+n,c=r+r,s=o+o,u=n*i,l=r*i,f=r*c,h=o*i,p=o*c,g=o*s,y=a*i,M=a*c,d=a*s;return t[0]=1-f-g,t[3]=l-d,t[6]=h+M,t[1]=l+d,t[4]=1-u-g,t[7]=p-y,t[2]=h-M,t[5]=p+y,t[8]=1-u-f,t},fromRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:c,isOrthoNormal:h,mul:p,multiply:u,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:l,normalFromMat4Legacy:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[4],i=e[5],c=e[6],s=e[8],u=e[9],l=e[10],f=l*i-c*u,h=-l*a+c*s,p=u*a-i*s,g=n*f+r*h+o*p;if(!g)return null;const y=1/g;return t[0]=f*y,t[1]=(-l*r+o*u)*y,t[2]=(c*r-o*i)*y,t[3]=h*y,t[4]=(l*n-o*s)*y,t[5]=(-c*n+o*a)*y,t[6]=p*y,t[7]=(-u*n+r*s)*y,t[8]=(i*n-r*a)*y,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=Math.sin(n),p=Math.cos(n);return t[0]=p*r+h*i,t[1]=p*o+h*c,t[2]=p*a+h*s,t[3]=p*i-h*r,t[4]=p*c-h*o,t[5]=p*s-h*a,t[6]=u,t[7]=l,t[8]=f,t},scale:function(t,e,n){const r=n[0],o=n[1],a=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t[6]=a*e[6],t[7]=a*e[7],t[8]=a*e[8],t},scaleByVec2:function(t,e,n){const r=n[0],o=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t},set:a,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:g,subtract:f,translate:function(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=n[0],p=n[1];return t[0]=r,t[1]=o,t[2]=a,t[3]=i,t[4]=c,t[5]=s,t[6]=h*r+p*i+u,t[7]=h*o+p*c+l,t[8]=h*a+p*s+f,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(t,e,n,r,o,a,i,c,s){return[t,e,n,r,o,a,i,c,s]}function a(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>a,c:()=>r,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,createView:a,fromValues:o},Symbol.toStringTag,{value:"Module"}))},13598:(t,e,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}function a(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>i,a:()=>a,b:()=>o,c:()=>r});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,createView:a,fromValues:function(t,e,n,r,o,a,i,c,s,u,l,f,h,p,g,y){return[t,e,n,r,o,a,i,c,s,u,l,f,h,p,g,y]}},Symbol.toStringTag,{value:"Module"}))},51305:(t,e,n)=>{n.d(e,{c:()=>p,g:()=>l,j:()=>T,k:()=>y,m:()=>f,s:()=>u});var r=n(46521),o=n(94961),a=n(65617),i=n(46851),c=n(17896),s=n(98766);function u(t,e,n){n*=.5;const r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function l(t,e){const n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>(0,i.g)()?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function f(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=n[0],s=n[1],u=n[2],l=n[3];return t[0]=r*l+i*c+o*u-a*s,t[1]=o*l+i*s+a*c-r*u,t[2]=a*l+i*u+r*s-o*c,t[3]=i*l-r*c-o*s-a*u,t}function h(t,e,n,r){const o=e[0],a=e[1],c=e[2],s=e[3];let u,l,f,h,p,g=n[0],y=n[1],M=n[2],d=n[3];return l=o*g+a*y+c*M+s*d,l<0&&(l=-l,g=-g,y=-y,M=-M,d=-d),1-l>(0,i.g)()?(u=Math.acos(l),f=Math.sin(u),h=Math.sin((1-r)*u)/f,p=Math.sin(r*u)/f):(h=1-r,p=r),t[0]=h*o+p*g,t[1]=h*a+p*y,t[2]=h*c+p*M,t[3]=h*s+p*d,t}function p(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function g(t,e){const n=e[0]+e[4]+e[8];let r;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let n=0;e[4]>e[0]&&(n=1),e[8]>e[3*n+n]&&(n=2);const o=(n+1)%3,a=(n+2)%3;r=Math.sqrt(e[3*n+n]-e[3*o+o]-e[3*a+a]+1),t[n]=.5*r,r=.5/r,t[3]=(e[3*o+a]-e[3*a+o])*r,t[o]=(e[3*o+n]+e[3*n+o])*r,t[a]=(e[3*a+n]+e[3*n+a])*r}return t}function y(t,e,n,r){const o=.5*Math.PI/180;e*=o,n*=o,r*=o;const a=Math.sin(e),i=Math.cos(e),c=Math.sin(n),s=Math.cos(n),u=Math.sin(r),l=Math.cos(r);return t[0]=a*s*l-i*c*u,t[1]=i*c*l+a*s*u,t[2]=i*s*u-a*c*l,t[3]=i*s*l+a*c*u,t}const M=s.c,d=s.s,m=s.a,b=f,A=s.b,P=s.d,v=s.l,w=s.e,_=w,x=s.f,F=x,S=s.n,T=s.g,C=s.h,O=(0,a.c)(),R=(0,a.f)(1,0,0),B=(0,a.f)(0,1,0),Z=(0,o.a)(),j=(0,o.a)(),V=(0,r.c)();Object.freeze(Object.defineProperty({__proto__:null,add:m,calculateW:function(t,e){const n=e[0],r=e[1],o=e[2];return t[0]=n,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-o*o)),t},conjugate:p,copy:M,dot:P,equals:C,exactEquals:T,fromEuler:y,fromMat3:g,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=n*n+r*r+o*o+a*a,c=i?1/i:0;return t[0]=-n*c,t[1]=-r*c,t[2]=-o*c,t[3]=a*c,t},len:_,length:w,lerp:v,mul:b,multiply:f,normalize:S,random:function(t){const e=i.R,n=e(),r=e(),o=e(),a=Math.sqrt(1-n),c=Math.sqrt(n);return t[0]=a*Math.sin(2*Math.PI*r),t[1]=a*Math.cos(2*Math.PI*r),t[2]=c*Math.sin(2*Math.PI*o),t[3]=c*Math.cos(2*Math.PI*o),t},rotateX:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s+i*c,t[1]=o*s+a*c,t[2]=a*s-o*c,t[3]=i*s-r*c,t},rotateY:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s-a*c,t[1]=o*s+i*c,t[2]=a*s+r*c,t[3]=i*s-o*c,t},rotateZ:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s+o*c,t[1]=o*s-r*c,t[2]=a*s+i*c,t[3]=i*s-a*c,t},rotationTo:function(t,e,n){const r=(0,c.e)(e,n);return r<-.999999?((0,c.f)(O,R,e),(0,c.u)(O)<1e-6&&(0,c.f)(O,B,e),(0,c.n)(O,O),u(t,O,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,c.f)(O,e,n),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+r,S(t,t))},scale:A,set:d,setAxes:function(t,e,n,r){const o=V;return o[0]=n[0],o[3]=n[1],o[6]=n[2],o[1]=r[0],o[4]=r[1],o[7]=r[2],o[2]=-e[0],o[5]=-e[1],o[8]=-e[2],S(t,g(t,o))},setAxisAngle:u,slerp:h,sqlerp:function(t,e,n,r,o,a){return h(Z,e,o,a),h(j,n,r,a),h(t,Z,j,2*a*(1-a)),t},sqrLen:F,squaredLength:x,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function r(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}function a(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>i,a:()=>r,b:()=>o,c:()=>a});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,createView:a,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},20773:(t,e,n)=>{n.d(e,{a:()=>c,b:()=>i,c:()=>o,d:()=>l,e:()=>s,n:()=>f,s:()=>u,t:()=>a});var r=n(72220);function o(t,e,n){a(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function a(t,e,n,o=3,a=o){if(t.length/o!==Math.ceil(e.length/a))return r.c.error("source and destination buffers need to have the same number of elements"),t;const i=t.length/o,c=n[0],s=n[1],u=n[2],l=n[4],f=n[5],h=n[6],p=n[8],g=n[9],y=n[10],M=n[12],d=n[13],m=n[14];let b=0,A=0;for(let n=0;n<i;n++){const n=e[b],r=e[b+1],i=e[b+2];t[A]=c*n+l*r+p*i+M,t[A+1]=s*n+f*r+g*i+d,t[A+2]=u*n+h*r+y*i+m,b+=a,A+=o}return t}function i(t,e,n){c(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function c(t,e,n,o=3,a=o){if(t.length/o!==Math.ceil(e.length/a))return void r.c.error("source and destination buffers need to have the same number of elements");const i=t.length/o,c=n[0],s=n[1],u=n[2],l=n[3],f=n[4],h=n[5],p=n[6],g=n[7],y=n[8];let M=0,d=0;for(let n=0;n<i;n++){const n=e[M],r=e[M+1],i=e[M+2];t[d]=c*n+l*r+p*i,t[d+1]=s*n+f*r+g*i,t[d+2]=u*n+h*r+y*i,M+=a,d+=o}}function s(t,e,n){u(t.typedBuffer,e,n,t.typedBufferStride)}function u(t,e,n,r=3){const o=Math.min(t.length/r,e.count),a=e.typedBuffer,i=e.typedBufferStride;let c=0,s=0;for(let e=0;e<o;e++)t[s]=n*a[c],t[s+1]=n*a[c+1],t[s+2]=n*a[c+2],c+=i,s+=r}function l(t,e){f(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function f(t,e,n=3,r=n){const o=Math.min(t.length/n,e.length/r);let a=0,i=0;for(let c=0;c<o;c++){const o=e[a],c=e[a+1],s=e[a+2],u=o*o+c*c+s*s;if(u>0){const e=1/Math.sqrt(u);t[i]=e*o,t[i+1]=e*c,t[i+2]=e*s}a+=r,i+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:f,normalizeView:l,scale:u,scaleView:s,shiftRight:function(t,e,n){const r=Math.min(t.count,e.count),o=t.typedBuffer,a=t.typedBufferStride,i=e.typedBuffer,c=e.typedBufferStride;let s=0,u=0;for(let t=0;t<r;t++)o[u]=i[s]>>n,o[u+1]=i[s+1]>>n,o[u+2]=i[s+2]>>n,s+=c,u+=a},transformMat3:c,transformMat3View:i,transformMat4:a,transformMat4View:o},Symbol.toStringTag,{value:"Module"}))},58995:(t,e,n)=>{n.d(e,{rS:()=>u});var r=n(2109),o=n(82971),a=n(8744);const i=new o.Z(r.kU),c=new o.Z(r.JL),s=new o.Z(r.mM);function u(t){return t&&((0,a.BZ)(t)||(0,a.fS)(t,c))?c:t&&((0,a.V2)(t)||(0,a.fS)(t,s))?s:i}new o.Z(r.pn)},83025:(t,e,n)=>{n.d(e,{JK:()=>c,QZ:()=>a,Rq:()=>i,bg:()=>o});var r=n(1533);function o(t,e=!1){return t<=r.DB?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function a(t){return((0,r.kJ)(t)?t.length:t.byteLength/8)<=r.DB?Array.from(t):new Float64Array(t)}function i(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function c(t,e){for(let n=0;n<e.length;++n)t[n]=e[n];return t}},85872:(t,e,n)=>{n.d(e,{Z:()=>h});var r=n(43697),o=n(2368),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(36030)),s=n(52011),u=n(65617),l=n(94139);let f=class extends((0,o.J)(a.wq)){constructor(t){super(t),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,u.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new l.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFormPoint({x:t,y:e,z:n}){this.origin=(0,u.f)(t,e,n??0)}};(0,r._)([(0,c.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],f.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],f.prototype,"origin",void 0),f=(0,r._)([(0,s.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],f);const h=f},50567:(t,e,n)=>{n.d(e,{Z:()=>u});var r=n(43697),o=n(2368),a=n(96674),i=(n(92604),n(75215),n(67676),n(80442),n(20102),n(36030)),c=n(52011);let s=class extends((0,o.J)(a.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,r._)([(0,i.J)({georeferenced:"georeferenced"},{readOnly:!0})],s.prototype,"type",void 0),s=(0,r._)([(0,c.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],s);const u=s},84555:(t,e,n)=>{n.d(e,{Z:()=>h});var r=n(43697),o=n(2368),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(36030)),s=n(52011),u=n(65617),l=n(94139);let f=class extends((0,o.J)(a.wq)){constructor(t){super(t),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,u.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new l.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFormPoint({x:t,y:e,z:n}){this.origin=(0,u.f)(t,e,n??0)}};(0,r._)([(0,c.J)({local:"local"},{readOnly:!0})],f.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],f.prototype,"origin",void 0),f=(0,r._)([(0,s.j)("esri.geometry.support.MeshLocalVertexSpace")],f);const h=f},2674:(t,e,n)=>{n.d(e,{Z:()=>d});var r,o=n(43697),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(52011)),s=n(52138),u=n(13598),l=n(51305),f=n(94961),h=n(17896),p=n(65617),g=n(3709);let y=r=class extends a.wq{constructor(t){super(t),this.translation=(0,p.c)(),this.rotationAxis=(0,p.g)(g.UP),this.rotationAngle=0,this.scale=(0,p.f)(1,1,1)}get rotation(){return(0,g.uT)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.a)((0,g.ZZ)(t)),this.rotationAngle=(0,g.EU)(t)}get localMatrix(){const t=(0,u.c)();return(0,l.s)(M,(0,g.ZZ)(this.rotation),(0,g.WH)(this.rotation)),(0,s.g)(t,M,this.translation,this.scale),t}get localMatrixInverse(){return(0,s.a)((0,u.c)(),this.localMatrix)}applyLocal(t,e){return(0,h.m)(e,t,this.localMatrix)}applyLocalInverse(t,e){return(0,h.m)(e,t,this.localMatrixInverse)}equals(t){return this===t||null!=t&&(0,s.h)(this.localMatrix,t.localMatrix)}clone(){const t={translation:(0,p.a)(this.translation),rotationAxis:(0,p.a)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,p.a)(this.scale)};return new r(t)}};(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"translation",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAxis",void 0),(0,o._)([(0,i.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAngle",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"scale",void 0),(0,o._)([(0,i.Cb)()],y.prototype,"rotation",null),(0,o._)([(0,i.Cb)()],y.prototype,"localMatrix",null),(0,o._)([(0,i.Cb)()],y.prototype,"localMatrixInverse",null),y=r=(0,o._)([(0,c.j)("esri.geometry.support.MeshTransform")],y);const M=(0,f.a)(),d=y},3709:(t,e,n)=>{n.d(e,{EU:()=>p,UP:()=>y,Ue:()=>s,WH:()=>g,ZZ:()=>h,qC:()=>l,qw:()=>f,uT:()=>u});var r=n(22021),o=n(51305),a=n(94961),i=n(17896),c=n(65617);function s(t=y){return[t[0],t[1],t[2],t[3]]}function u(t,e,n=s()){return(0,i.c)(n,t),n[3]=e,n}function l(t,e,n=s()){return(0,o.s)(M,t,g(t)),(0,o.s)(d,e,g(e)),(0,o.m)(M,d,M),function(t,e){return t[3]=e,t}(n,(0,r.BV)((0,o.g)(n,M)))}function f(t,e,n,r=s()){return u(c.d,t,m),u(c.e,e,b),u(c.U,n,A),l(m,b,m),l(m,A,r),r}function h(t){return t}function p(t){return t[3]}function g(t){return(0,r.Vl)(t[3])}const y=[0,0,1,0],M=(0,a.a)(),d=(0,a.a)(),m=(s(),s()),b=s(),A=s()},72220:(t,e,n)=>{n.d(e,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},13442:(t,e,n)=>{n.d(e,{A:()=>a,h:()=>o});var r=n(92604);function o(t,e){return t.isGeographic||t.isWebMercator&&(e?.geographic??!0)}function a(t,e,n){const o=!t.isGeoreferenced;null!=n?.geographic&&n.geographic!==o&&r.Z.getLogger(e).warnOnce(`Specifying the 'geographic' parameter (${n.geographic}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}},66459:(t,e,n)=>{n.d(e,{FF:()=>w,I5:()=>P,Yq:()=>_,iV:()=>x,iv:()=>A,w1:()=>v});var r=n(67900),o=n(46521),a=n(52138),i=n(13598),c=n(17896),s=n(65617),u=n(21787),l=n(44547),f=n(58995),h=n(83025),p=n(85872),g=n(50567),y=n(84555),M=n(2674),d=n(20773),m=n(13442),b=n(56493);function A(t,e,n){return(0,m.h)(e.spatialReference,n)?function(t,e,n){const r=e.spatialReference,o=C(e,n,Z),a=new Float64Array(t.position.length),i=function(t,e,n,r){(0,d.t)(r,t,e);const o=new Float64Array(t.length);return(0,b.To)(r,o,n)}(t.position,o,r,a),c=(0,u.b)(V,o);return{position:i,normal:F(i,a,t.normal,c,r),tangent:S(i,a,t.tangent,c,r)}}(t,e,n):function(t,e,n){const r=new Float64Array(t.position.length),o=t.position,a=e.x,i=e.y,c=e.z??0,s=B(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=o[t]*s+a,r[t+1]=o[t+1]*s+i,r[t+2]=o[t+2]*s+c;return{position:r,normal:t.normal,tangent:t.tangent}}(t,e,n)}function P(t,e,n,r){const{position:o,normal:a,tangent:c}=t;if(!e.isRelative)return{position:o,normal:a,tangent:c};const s=n?.localMatrix??i.I;return A({position:(0,d.t)(new Float64Array(o.length),o,s),normal:null!=a?(0,b.w9)(a,new Float32Array(a.length),s):null,tangent:null!=c?(0,b.VS)(c,new Float32Array(c.length),s):null},e.getOriginPoint(r),{geographic:!e.isGeoreferenced})}function v(t,e,n){if(n?.useTransform){const{position:r,normal:o,tangent:a}=t,{x:i,y:c,z:u}=e,l=(0,s.f)(i,c,u??0);return{vertexAttributes:{position:r,normal:o,tangent:a},vertexSpace:n.geographic??1?new y.Z({origin:l}):new p.Z({origin:l}),transform:new M.Z}}return{vertexAttributes:A(t,e,n),vertexSpace:new g.Z,transform:null}}function w(t,e,n){return(0,m.h)(e.spatialReference,n)?function(t,e,n){const r=e.spatialReference;C(e,n,Z);const o=(0,a.a)(j,Z),i=new Float64Array(t.position.length),c=function(t,e,n,r){const o=(0,b.XO)(t,e,r),a=new Float64Array(o.length);return(0,d.t)(a,o,n),a}(t.position,r,o,i),s=(0,u.b)(V,o);return{position:c,normal:O(t.normal,t.position,i,r,s),tangent:R(t.tangent,t.position,i,r,s)}}(t,e,n):T(t,e,n)}function _(t,e,n,r,o){if(!e.isRelative)return w(t,r,o);const{spatialReference:a}=r,i=P(t,e,n,a);return r.equals(e.getOriginPoint(a))?T(i,r,o):w(i,r,o)}function x(t,e,n,r,o,u){const p=n.isRelative?n.origin:s.Z,g=n.isRelative?e?.localMatrix??i.I:i.I;if(n.isGeoreferenced){const e=u??(0,h.bg)(r.length);if((0,a.j)(g,i.I)?(0,h.JK)(e,r):(0,d.t)(e,r,g),!(0,c.k)(p,s.Z)){const[t,n,r]=p;for(let o=0;o<e.length;o+=3)e[o]+=t,e[o+1]+=n,e[o+2]+=r}return(0,l.CM)(e,t,0,e,o,0,e.length/3),e}const y=(0,f.rS)(t),M=(0,l.Up)(t,y)?y:t;(0,l.Bm)(t,p,Z,M),(0,a.m)(Z,Z,g);const m=u??(0,h.bg)(r.length);return(0,d.t)(m,r,Z),(0,l.CM)(m,M,0,m,o,0,m.length/3),m}function F(t,e,n,r,o){if(null==n)return null;const a=new Float32Array(n.length);return(0,d.a)(a,n,r),(0,b.Yk)(a,t,e,o,a),a}function S(t,e,n,r,o){if(null==n)return null;const a=new Float32Array(n.length);(0,d.a)(a,n,r,4);for(let t=3;t<a.length;t+=4)a[t]=n[t];return(0,b.M2)(a,t,e,o,a),a}function T(t,e,n){const r=new Float64Array(t.position.length),o=t.position,a=e.x,i=e.y,c=e.z??0,s=B(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=(o[t]-a)/s,r[t+1]=(o[t+1]-i)/s,r[t+2]=(o[t+2]-c)/s;return{position:r,normal:t.normal,tangent:t.tangent}}function C(t,e,n){(0,l.Bm)(t.spatialReference,[t.x,t.y,t.z??0],n,(0,f.rS)(t.spatialReference));const r=B(e?e.unit:null,t.spatialReference);return(0,a.k)(n,n,[r,r,r]),n}function O(t,e,n,r,o){if(null==t)return null;const a=(0,b.Iz)(t,e,n,r,new Float32Array(t.length));return(0,d.a)(a,a,o),a}function R(t,e,n,r,o){if(null==t)return null;const a=(0,b.wi)(t,e,n,r,new Float32Array(t.length));return(0,d.a)(a,a,o,4),a}function B(t,e){if(null==t)return 1;const n=(0,r.r6)(e);return 1/(0,r.En)(n,"meters",t)}const Z=(0,i.c)(),j=(0,i.c)(),V=(0,o.c)()},56493:(t,e,n)=>{n.d(e,{Iz:()=>M,M2:()=>w,To:()=>b,VS:()=>P,XO:()=>m,Yk:()=>d,w9:()=>A,wi:()=>v});var r=n(92604),o=n(21787),a=n(46521),i=n(13598),c=n(17896),s=n(65617),u=n(44547),l=n(58995),f=n(8744),h=n(40488),p=n(56481),g=n(20773);const y=r.Z.getLogger("esri.geometry.support.meshUtils.normalProjection");function M(t,e,n,r,o){return x(r)?(_(S.TO_PCPF,p.ct.fromTypedArray(t),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o)),o):(y.error("Cannot convert spatial reference to PCPF"),o)}function d(t,e,n,r,o){return x(r)?(_(S.FROM_PCPF,p.ct.fromTypedArray(t),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o)),o):(y.error("Cannot convert to spatial reference from PCPF"),o)}function m(t,e,n){return(0,u.CM)(t,e,0,n,(0,l.rS)(e),0,t.length/3),n}function b(t,e,n){return(0,u.CM)(t,(0,l.rS)(n),0,e,n,0,t.length/3),e}function A(t,e,n){return(0,o.b)(B,n),(0,g.a)(e,t,B),(0,o.i)(B)||(0,g.n)(e,e),e}function P(t,e,n){if((0,o.b)(B,n),(0,g.a)(e,t,B,4),(0,o.i)(B)||(0,g.n)(e,e,4),t!==e)for(let n=3;n<t.length;n+=4)e[n]=t[n];return e}function v(t,e,n,r,o){if(!x(r))return y.error("Cannot convert spatial reference to PCPF"),o;_(S.TO_PCPF,p.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function w(t,e,n,r,o){if(!x(r))return y.error("Cannot convert to spatial reference from PCPF"),o;_(S.FROM_PCPF,p.ct.fromTypedArray(t,16),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o,16));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function _(t,e,n,r,a,i){if(!e)return;const s=n.count,f=(0,l.rS)(a);if(F(a))for(let n=0;n<s;n++)r.getVec(n,C),e.getVec(n,O),(0,u.Bm)(f,C,R,f),(0,o.f)(B,R),t===S.FROM_PCPF&&(0,o.t)(B,B),(0,c.t)(O,O,B),i.setVec(n,O);else for(let a=0;a<s;a++){r.getVec(a,C),e.getVec(a,O),(0,u.Bm)(f,C,R,f),(0,o.f)(B,R);const s=(0,h.mZ)(n.get(a,1));let l=Math.cos(s);t===S.TO_PCPF&&(l=1/l),B[0]*=l,B[1]*=l,B[2]*=l,B[3]*=l,B[4]*=l,B[5]*=l,t===S.FROM_PCPF&&(0,o.t)(B,B),(0,c.t)(O,O,B),(0,c.n)(O,O),i.setVec(a,O)}return i}function x(t){return F(t)||function(t){return t.isWebMercator}(t)}function F(t){return t.isWGS84||(0,f.yW)(t)||(0,f.BZ)(t)||(0,f.V2)(t)}var S,T;(T=S||(S={}))[T.TO_PCPF=0]="TO_PCPF",T[T.FROM_PCPF=1]="FROM_PCPF";const C=(0,s.c)(),O=(0,s.c)(),R=(0,i.c)(),B=(0,a.c)()}}]);
|