@arcgis/core 4.27.0-rc.1 → 4.27.0-rc.3
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{a8565d1c676f3bfbcebb.js → 002fe1ec63ea33e6972d.js} +1 -1
- package/assets/esri/core/workers/chunks/{0610691a0c0d9fbbd6d2.js → 013de5c2955801b329b3.js} +1 -1
- package/assets/esri/core/workers/chunks/07163dcbb871f927a580.js +1 -0
- package/assets/esri/core/workers/chunks/0e46687004392c493c06.js +1 -0
- package/assets/esri/core/workers/chunks/0e65e00173b66c7fec2e.js +1 -0
- package/assets/esri/core/workers/chunks/1aa8dd317ecd3c41e0ea.js +1 -0
- package/assets/esri/core/workers/chunks/21328f3dd26abe84a10d.js +1 -0
- package/assets/esri/core/workers/chunks/28c67c98039503b62e6e.js +1 -0
- package/assets/esri/core/workers/chunks/2faa8f08f2fdaac3f4af.js +1 -0
- package/assets/esri/core/workers/chunks/{0407bf97ad621c89a734.js → 3160af63b860b52db389.js} +1 -1
- package/assets/esri/core/workers/chunks/3767b9e7660873b018c2.js +1 -0
- package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +1 -0
- package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +1 -0
- package/assets/esri/core/workers/chunks/471f6eba213412b82840.js +1 -0
- package/assets/esri/core/workers/chunks/4a4f14a3d8da270059c4.js +1 -0
- package/assets/esri/core/workers/chunks/{3e239bfad611985e50fb.js → 50f910797c17c3028521.js} +1 -1
- package/assets/esri/core/workers/chunks/{f339db2b599fa9585283.js → 5e6471dd2a08e66b47d0.js} +79 -81
- package/assets/esri/core/workers/chunks/642c5a93c0a454bdd115.js +1 -0
- package/assets/esri/core/workers/chunks/{14145959a3dab1437818.js → 6627f1bc9ee6b620e3aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{170bdbdb4e21bf91a17f.js → 6eaa7a51efde2dd4a5a4.js} +1 -1
- package/assets/esri/core/workers/chunks/{d8bd3f498b3fa8153404.js → 6f510f28526c73ab453c.js} +1 -1
- package/assets/esri/core/workers/chunks/{2bdc63395c7466ce1641.js → 7053c2f5a958d4c8629b.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c35c663528f710e8c78.js → 79cb672c85ea29e8484a.js} +1 -1
- package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +1 -0
- package/assets/esri/core/workers/chunks/83e3d104886b48f00397.js +1 -0
- package/assets/esri/core/workers/chunks/89001ee8d3f69fa03cc1.js +1 -0
- package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +1 -0
- package/assets/esri/core/workers/chunks/9472184ef1432fc55d6b.js +1 -0
- package/assets/esri/core/workers/chunks/{3c5a64a545272f148e93.js → 9621b7d8d951aa881686.js} +1 -1
- package/assets/esri/core/workers/chunks/a6ddf80eb324c35076e1.js +1 -0
- package/assets/esri/core/workers/chunks/a80a6267d88246ede5d3.js +1 -0
- package/assets/esri/core/workers/chunks/{b6e173eddaad4244cb5f.js → b31974524932e638df8c.js} +1 -1
- package/assets/esri/core/workers/chunks/{f505ebd4bd3bfb6c790d.js → b6a55fdfe16795ebf02c.js} +1 -1
- package/assets/esri/core/workers/chunks/bf9e1fde9f6b2b4f10c0.js +1 -0
- package/assets/esri/core/workers/chunks/cfa3b2b1e184681e9af4.js +1 -0
- package/assets/esri/core/workers/chunks/{92e7f224a80195e606d6.js → d4ba894a2583f3930a4f.js} +1 -1
- package/assets/esri/core/workers/chunks/d5dfd3d693d5e393a542.js +1 -0
- package/assets/esri/core/workers/chunks/dabd889e064c4e7807fa.js +1 -0
- package/assets/esri/core/workers/chunks/{74fd2059ddda9083cbcc.js → dc6c97a43d642eeaf477.js} +1 -1
- package/assets/esri/core/workers/chunks/{2154d395f405be3cd3ba.js → eca0c3d57b3a1e3a14ee.js} +1 -1
- package/assets/esri/core/workers/chunks/f35895e03c036d67b3ed.js +1 -0
- package/assets/esri/core/workers/chunks/f36697f6aac782007d1a.js +1 -0
- package/assets/esri/core/workers/chunks/f52054f27619a98b7bb7.js +1 -0
- package/assets/esri/core/workers/chunks/{c6efe2e04ea6a55bb6e3.js → f6e68befe2812b90b40d.js} +1 -1
- package/assets/esri/core/workers/chunks/fb7fe307a583b6a22218.js +1 -0
- package/assets/esri/core/workers/chunks/fbd3c78ee8e2219a6c7a.js +1 -0
- package/assets/esri/core/workers/chunks/ff42585e1b1d0c5497af.js +1 -0
- package/assets/esri/images/portal/livestreamvideolayer16.png +0 -0
- package/assets/esri/images/portal/{mediaservice16.png → videolayer16.png} +0 -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/_FeatureForm.scss +19 -2
- package/assets/esri/themes/base/widgets/_ScaleRangeSlider.scss +1 -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/ShadowCastAccumulate.glsl.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/meshVertexSpaceUtils.js +5 -0
- package/interfaces.d.ts +263 -31
- package/kernel.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/support/editableLayers.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/video/videoUtils.js +5 -0
- package/package.json +1 -1
- package/portal/PortalItem.js +1 -1
- package/request.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/requestUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/views/2d/layers/StreamLayerView2D.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/I3SMeshWorkerHandle.js +1 -1
- package/views/3d/layers/II3SMeshView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.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/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/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 +1 -1
- 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/webmap/initialViewPropertiesUtils.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.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/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/EditableInput.d.ts +2 -2
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.js +1 -1
- package/widgets/FeatureForm/css.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.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.d.ts +4 -0
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.d.ts +4 -0
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/ValuePicker/ValuePickerBaseComponent.js +1 -1
- package/widgets/ValuePicker.js +1 -1
- package/widgets/support/geolocationUtils.js +1 -1
- package/assets/esri/core/workers/chunks/07651ef8348f702d59ac.js +0 -1
- package/assets/esri/core/workers/chunks/0a02ac5628d1739372c6.js +0 -1
- package/assets/esri/core/workers/chunks/0fcb8d408696075338e2.js +0 -1
- package/assets/esri/core/workers/chunks/16e459b16bdd6e1a821b.js +0 -1
- package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +0 -1
- package/assets/esri/core/workers/chunks/39714837f9d3708e3806.js +0 -1
- package/assets/esri/core/workers/chunks/3ba2fcb9110230f8790c.js +0 -1
- package/assets/esri/core/workers/chunks/474d9b334812533bab36.js +0 -1
- package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +0 -1
- package/assets/esri/core/workers/chunks/5706edf45402dff279a6.js +0 -1
- package/assets/esri/core/workers/chunks/659b7bad7281c0e2aed3.js +0 -1
- package/assets/esri/core/workers/chunks/785a6c925f29bc962992.js +0 -1
- package/assets/esri/core/workers/chunks/90da1ed112b82712d0ef.js +0 -1
- package/assets/esri/core/workers/chunks/9326120c750799eb2d28.js +0 -1
- package/assets/esri/core/workers/chunks/99e0cec47e3ef72c1de4.js +0 -1
- package/assets/esri/core/workers/chunks/9c0e1e87790424f42d7e.js +0 -1
- package/assets/esri/core/workers/chunks/9e66af3b1c70cf25fb32.js +0 -1
- package/assets/esri/core/workers/chunks/a1c31bb8c12831539328.js +0 -1
- package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +0 -1
- package/assets/esri/core/workers/chunks/b5fc6f2044ed047c5afd.js +0 -1
- package/assets/esri/core/workers/chunks/c08e03165043df67c11b.js +0 -1
- package/assets/esri/core/workers/chunks/c26148d4bfab3b3dfab2.js +0 -1
- package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +0 -1
- package/assets/esri/core/workers/chunks/eeaf8010e38b65a101ac.js +0 -1
- package/assets/esri/core/workers/chunks/f235392c56063fbf89c6.js +0 -1
- package/assets/esri/core/workers/chunks/fdd0d3616c97e408b104.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7616],{95401:(e,t,r)=>{r.d(t,{e:()=>l});var n,o,i,s=r(5732),a={exports:{}};n=a,o=function(){function e(e,r,o){o=o||2;var i,s,a,c,u,p,h,f=r&&r.length,g=f?r[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,r,m,o)),e.length>80*o){i=a=e[0],s=c=e[1];for(var y=o;y<g;y+=o)(u=e[y])<i&&(i=u),(p=e[y+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 n(m,d,o,i,s,h),d}function t(e,t,r,n,o){var i,s;if(o===M(e,t,r,n)>0)for(i=t;i<r;i+=n)s=_(i,e[i],e[i+1],s);else for(i=r-n;i>=t;i-=n)s=_(i,e[i],e[i+1],s);if(s&&v(s,s.next)){var a=s.next;C(s),s=a}return s}function r(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==x(n.prev,n,n.next))n=n.next;else{var o=n.prev;if(C(n),(n=t=o)===n.next)break;r=!0}}while(r||n!==t);return t}function n(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),C(e),e=m.next,d=m.next;else if((e=m)===d){h?1===h?n(e=s(r(e),t,l),t,l,c,u,p,2):2===h&&a(e,t,l,c,u,p):n(r(e),t,l,c,u,p,1);break}}}function o(e){var t=e.prev,r=e,n=e.next;if(x(t,r,n)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(d(t.x,t.y,r.x,r.y,n.x,n.y,o.x,o.y)&&x(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(e,t,r,n){var o=e.prev,i=e,s=e.next;if(x(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,r,n),h=g(c,u,t,r,n),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)&&x(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)&&x(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)&&x(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)&&x(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function s(e,t,n){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/n),t.push(o.i/n),t.push(s.i/n),C(o),C(o.next),o=e=s),o=o.next}while(o!==e);return r(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&&y(l,c)){var u=Z(l,c);return l=r(l,l.next),u=r(u,u.next),n(l,t,o,i,s,a),void n(u,t,o,i,s,a)}c=c.next}l=l.next}while(l!==e)}function l(e,n,o,i){var s,a,l,u=[];for(s=0,a=n.length;s<a;s++)(l=t(e,n[s]*i,s<a-1?n[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=r(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 r=t.next;if(r.prev===t||r===t||r===e)break;t=r}return t}function p(e,t){var n=function(e,t){var r,n=t,o=e.x,i=e.y,s=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var a=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=o&&a>s){if(s=a,a===o){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!r)return null;if(o===s)return r;var l,c=r,u=r.x,p=r.y,f=1/0;n=r;do{o>=n.x&&n.x>=u&&o!==n.x&&d(i<p?o:s,i,u,p,i<p?s:o,i,n.x,n.y)&&(l=Math.abs(i-n.y)/(o-n.x),T(n,e)&&(l<f||l===f&&(n.x>r.x||n.x===r.x&&h(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}(e,t);if(!n)return t;var o=Z(n,e),i=r(n,n.next);let s=u(o);return r(s,s.next),i=u(i),u(t===n?i:t)}function h(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function f(e,t,r,n){var o=e;do{null===o.z&&(o.z=g(o.x,o.y,t,r,n)),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,r,n,o,i,s,a,l,c=1;do{for(r=e,e=null,i=null,s=0;r;){for(s++,n=r,a=0,t=0;t<c&&(a++,n=n.nextZ);t++);for(l=c;a>0||l>0&&n;)0!==a&&(0===l||!n||r.z<=n.z)?(o=r,r=r.nextZ,a--):(o=n,n=n.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(s>1)}(o)}function g(e,t,r,n,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function m(e){var t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function d(e,t,r,n,o,i,s,a){return(o-s)*(t-a)-(e-s)*(i-a)>=0&&(e-s)*(n-a)-(r-s)*(t-a)>=0&&(r-s)*(i-a)-(o-s)*(n-a)>=0}function y(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&w(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(T(e,t)&&T(t,e)&&function(e,t){var r=e,n=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||v(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,r,n){var o=A(x(e,t,r)),i=A(x(e,t,n)),s=A(x(r,n,e)),a=A(x(r,n,t));return o!==i&&s!==a||!(0!==o||!b(e,r,t))||!(0!==i||!b(e,n,t))||!(0!==s||!b(r,e,n))||!(0!==a||!b(r,t,n))}function b(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function A(e){return e>0?1:e<0?-1:0}function T(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function Z(e,t){var r=new S(e.i,e.x,e.y),n=new S(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function _(e,t,r,n){var o=new S(e,t,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function C(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,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(e,t,r,n){for(var o=0,i=t,s=r-n;i<r;i+=n)o+=(e[s]-e[i])*(e[i+1]+e[s+1]),s=i;return o}return e.deviation=function(e,t,r,n){var o=t&&t.length,i=o?t[0]*r:e.length,s=Math.abs(M(e,0,i,r));if(o)for(var a=0,l=t.length;a<l;a++){var c=t[a]*r,u=a<l-1?t[a+1]*r:e.length;s-=Math.abs(M(e,c,u,r))}var p=0;for(a=0;a<n.length;a+=3){var h=n[a]*r,f=n[a+1]*r,g=n[a+2]*r;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,r={vertices:[],holes:[],dimensions:t},n=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var s=0;s<t;s++)r.vertices.push(e[o][i][s]);o>0&&(n+=e[o-1].length,r.holes.push(n))}return r},e},void 0!==(i=o())&&(n.exports=i);const l=(0,s.g)(a.exports)},46521:(e,t,r)=>{function n(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,r,n,o,i,s,a,l){return[e,t,r,n,o,i,s,a,l]}function i(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>i,c:()=>n,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:n,createView:i,fromValues:o},Symbol.toStringTag,{value:"Module"}))},13598:(e,t,r)=>{function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}function i(e,t){return new Float64Array(e,t,16)}r.d(t,{I:()=>s,a:()=>i,b:()=>o,c:()=>n});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:n,createView:i,fromValues:function(e,t,r,n,o,i,s,a,l,c,u,p,h,f,g,m){return[e,t,r,n,o,i,s,a,l,c,u,p,h,f,g,m]}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function n(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function i(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>n,b:()=>o,c:()=>i});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:n,createView:i,fromValues:function(e,t,r,n){return[e,t,r,n]}},Symbol.toStringTag,{value:"Module"}))},83025:(e,t,r)=>{r.d(t,{JK:()=>a,QZ:()=>i,Rq:()=>s,bg:()=>o,mB:()=>l});var n=r(1533);function o(e,t=!1){return e<=n.DB?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function i(e){return((0,n.kJ)(e)?e.length:e.byteLength/8)<=n.DB?Array.from(e):new Float64Array(e)}function s(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function a(e,t){for(let r=0;r<t.length;++r)e[r]=t[r];return e}function l(e){return Array.isArray(e)?new Float64Array(e):e}},24882:(e,t,r)=>{r.d(t,{$z:()=>s,KF:()=>u,mi:()=>o});var n=r(1533);function o(e){return(0,n.kJ)(e)?e.length<n.DB?e:i(e):e.length<n.DB?Array.from(e):e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:i(e)}function i(e){let t=!0;for(const r of e){if(r>=65536)return(0,n.kJ)(e)?new Uint32Array(e):e;r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}function s(e){return e<=n.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<n.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,r)=>{r.d(t,{Z:()=>x});var n,o=r(43697),i=r(96674),s=r(22974),a=r(92604),l=r(5600),c=r(90578),u=r(52011),p=r(75215),h=r(65542),f=r(60746),g=r(71630);const m="esri.geometry.support.MeshComponent",d=a.Z.getLogger(m);let y=n=class extends i.wq{static from(e){return(0,p.TJ)(n,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 n({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(e,t){const r={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals};return new n(r)}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}})],y.prototype,"faces",void 0),(0,o._)([(0,c.p)("faces")],y.prototype,"castFaces",null),(0,o._)([(0,l.Cb)({type:h.Z,json:{write:!0}})],y.prototype,"material",void 0),(0,o._)([(0,c.p)("material")],y.prototype,"castMaterial",null),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"shading",void 0),(0,o._)([(0,l.Cb)({type:Boolean})],y.prototype,"trustSourceNormals",void 0),y=n=(0,o._)([(0,u.j)(m)],y);const x=y},85872:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(43697),o=r(2368),i=r(96674),s=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),l=r(52011),c=r(65617),u=r(94139);let p=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,c.c)()}getOriginPoint(e){const[t,r,n]=this.origin;return new u.Z({x:t,y:r,z:n,spatialReference:e})}setOriginFormPoint({x:e,y:t,z:r}){this.origin=(0,c.f)(e,t,r??0)}};(0,n._)([(0,a.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],p.prototype,"type",void 0),(0,n._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],p.prototype,"origin",void 0),p=(0,n._)([(0,l.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],p);const h=p},50567:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(43697),o=r(2368),i=r(96674),s=(r(92604),r(75215),r(67676),r(80442),r(20102),r(36030)),a=r(52011);let l=class extends((0,o.J)(i.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,n._)([(0,s.J)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),l=(0,n._)([(0,a.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l);const c=l},84555:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(43697),o=r(2368),i=r(96674),s=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),l=r(52011),c=r(65617),u=r(94139);let p=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,c.c)()}getOriginPoint(e){const[t,r,n]=this.origin;return new u.Z({x:t,y:r,z:n,spatialReference:e})}setOriginFormPoint({x:e,y:t,z:r}){this.origin=(0,c.f)(e,t,r??0)}};(0,n._)([(0,a.J)({local:"local"},{readOnly:!0})],p.prototype,"type",void 0),(0,n._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],p.prototype,"origin",void 0),p=(0,n._)([(0,l.j)("esri.geometry.support.MeshLocalVertexSpace")],p);const h=p},65542:(e,t,r)=>{r.d(t,{Z:()=>h});var n,o=r(43697),i=r(22303),s=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),c=r(91024),u=r(80218);let p=n=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 r=null!=e?e.get(this):null;if(r)return r;const o=new n(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=n=(0,o._)([(0,l.j)("esri.geometry.support.MeshMaterial")],p);const h=p},60746:(e,t,r)=>{r.d(t,{Z:()=>h});var n,o=r(43697),i=r(22303),s=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),l=r(65542),c=r(91024),u=r(80218);let p=n=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 r=null!=e?e.get(this):null;if(r)return r;const o=new n(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=n=(0,o._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],p);const h=p},91024:(e,t,r)=>{r.d(t,{Z:()=>v});var n=r(43697);r(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,r){return r||(r=s()),r.getContext("2d").createImageData(e,t)}var l,c=r(96674),u=r(5600),p=r(75215),h=(r(67676),r(71715)),f=r(52011),g=r(30556),m=r(25929);const d=new WeakMap;let y=0,x=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,r,n){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,m.t)(e.src,n),crossOrigin:e.crossOrigin};t[r]=o}else if(e instanceof HTMLCanvasElement){const n=e.getContext("2d").getImageData(0,0,e.width,e.height),o={type:"canvas-element",imageData:this._encodeImageData(n)};t[r]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,m.t)(e.src,n),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[r]=o}else if(e instanceof ImageData){const n={type:"image-data",imageData:this._encodeImageData(e)};t[r]=n}}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),r=document.createElement("canvas");return r.width=t.width,r.height=t.height,r.getContext("2d").putImageData(t,0,0),r}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(),r=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===r)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,++y),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 r=this.clone();return e.set(this,r),r}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let r=0;r<e.data.length;r++)t+=String.fromCharCode(e.data[r]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),r=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return function(e,t,r,n){if(!t||!r)throw new Error("Cannot construct image data without dimensions");if(i)try{return new ImageData(e,t,r)}catch(e){i=!1}const o=a(t,r,void 0);return o.data.set(e,0),o}(r,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,n._)([(0,u.Cb)({type:String,json:{write:m.w}})],x.prototype,"url",null),(0,n._)([(0,u.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,u.Cb)()],x.prototype,"data",null),(0,n._)([(0,g.c)("data")],x.prototype,"writeData",null),(0,n._)([(0,h.r)("data")],x.prototype,"readData",null),(0,n._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],x.prototype,"transparent",null),(0,n._)([(0,u.Cb)({json:{write:!0}})],x.prototype,"wrap",void 0),(0,n._)([(0,u.Cb)({readOnly:!0})],x.prototype,"contentHash",null),x=l=(0,n._)([(0,f.j)("esri.geometry.support.MeshTexture")],x);const v=x},80218:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(43697),o=r(2368),i=r(96674),s=r(5600),a=(r(75215),r(67676),r(80442),r(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,n._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,n._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,n._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,n._)([(0,a.j)("esri.geometry.support.MeshTextureTransform")],l);const c=l},71630:(e,t,r)=>{r.d(t,{Q:()=>f,X:()=>m});var n,o=r(43697),i=r(96674),s=r(22974),a=r(92604),l=r(5600),c=r(90578),u=r(52011);const p="esri.geometry.support.MeshVertexAttributes",h=a.Z.getLogger(p);let f=n=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 n(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 n(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,r,n){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(n.error(o,`Invalid array length, expected a multiple of ${i}`),new r([])):e}function m(e,t,r,n,o){if(!e)return e;if(e instanceof t)return g(e,n,t,o);for(const i of r)if(e instanceof i)return g(new t(e),n,t,o);if(Array.isArray(e))return g(new t(e),n,t,o);{const n=r.map((e=>`'${e.name}'`));return o.error(`Failed to set property, expected one of ${n}, but got ${e.constructor.name}`),new t([])}}function d(e,t,r){t[r]=function(e){const t=new Array(e.length);for(let r=0;r<e.length;r++)t[r]=e[r];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=n=(0,o._)([(0,u.j)(p)],f)},84470:(e,t,r)=>{r.d(t,{CP:()=>a,JG:()=>g,LL:()=>l,NZ:()=>c,fV:()=>m,vj:()=>y,yT:()=>v,zE:()=>x});var n=r(3172),o=r(67676),i=r(95330),s=r(2981);class a{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}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 r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,i.k_)(e),new Blob(r)}}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,n.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:r}=e;return p.test(t)||h.test(r)}return p.test(e.assetMimeType)||h.test(e.assetName)}function g(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){return Array.isArray(e)?e.every((e=>d(e,t))):d(e,t)}(r,t)}function m(e,t){if(e===t)return!0;const{source:r}=e,{source:n}=t;if(r===n)return!0;if(u(r)&&u(n)){if(r.length!==n.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),o=[...n].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 y(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 x(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},47545:(e,t,r)=>{r.d(t,{d:()=>i});var n=r(22021),o=r(24882);function i(e,t,r){const i=Array.isArray(e),u=i?e.length/t:e.byteLength/(4*t),p=i?e:new Uint32Array(e,0,u*t),h=r?.minReduction??0,f=r?.originalIndices||null,g=f?f.length:0,m=r?.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 y=Math.floor(1.1*d)+1;(null==c||c.length<2*y)&&(c=new Uint32Array((0,n.Sf)(2*y)));for(let e=0;e<2*y;e++)c[e]=0;let x=0;const v=!!m&&!!f,w=v?g:u;let b=(0,o.$z)(u);const A=new Uint32Array(g),T=1.96;let Z=0!==h?Math.ceil(4*T*T/(h*h)*h*(1-h)):w,_=1,C=m?m[1]:w;for(let e=0;e<w;e++){if(e===Z){const t=1-x/e;if(t+T*Math.sqrt(t*(1-t)/e)<h)return null;Z*=2}if(e===C){for(let e=0;e<2*y;e++)c[e]=0;if(f)for(let e=m[_-1];e<m[_];e++)A[e]=b[f[e]];C=m[++_]}const r=v?f[e]:e,n=r*t,o=l(p,n,t);let i=o%y,a=x;for(;0!==c[2*i+1];){if(c[2*i]===o){const e=c[2*i+1]-1;if(s(p,n,e*t,t)){a=b[e];break}}i++,i>=y&&(i-=y)}a===x&&(c[2*i]=o,c[2*i+1]=r+1,x++),b[r]=a}if(0!==h&&1-x/u<h)return null;if(v){for(let e=m[_-1];e<A.length;e++)A[e]=b[f[e]];b=(0,o.mi)(A)}const S=i?new Array(x):new Uint32Array(x*t);x=0;for(let e=0;e<w;e++)b[e]===x&&(a(p,(v?f[e]:e)*t,S,x*t,t),x++);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:x}}function s(e,t,r,n){for(let o=0;o<n;o++)if(e[t+o]!==e[r+o])return!1;return!0}function a(e,t,r,n,o){for(let i=0;i<o;i++)r[n+i]=e[t+i]}function l(e,t,r){let n=0;for(let o=0;o<r;o++)n=e[t+o]+n|0,n=n+(n<<11)+(n>>>2)|0;return n>>>0}let c=null},91681:(e,t,r)=>{r.r(t),r.d(t,{assetMapFromAssetMapsJSON:()=>Je,extractMesh:()=>$e,meshFeatureSetFromJSON:()=>Ve});var n,o,i=r(38171),s=r(92604),a=r(30175),l=r(65617),c=r(6570),u=r(43697),p=r(20102),h=r(3920),f=r(83379),g=r(609),m=r(95330),d=r(17445),y=r(5600),x=(r(75215),r(67676),r(80442),r(52011)),v=r(9361),w=r(94139),b=r(38913),A=r(3709),T=r(62540),Z=r(85872),_=r(50567),C=r(84555),S=r(2674),M=r(71630),R=r(95401),F=r(86662),j=r(83025),L=r(24882),E=r(47545);function D(e,t,r){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,j.bg)(3*p);let f=0;for(let p=o-1;p>=0;p--){const g=e[p],m=r===n.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 r={index:f,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};r.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:f,count:g.length}),f=m?O(g,g.length-1,-1,h,f,g.length,t):O(g,0,1,h,f,g.length,t);for(let e=0;e<l;++e){const n=i[e];r.holeIndices[e]=f,r.pathLengths[e+1]=n.length,n.length>0&&(a[u++]={index:f,count:n.length}),f=O(n,0,1,h,f,n.length,t)}l=0,r.count>0&&(s[c++]=r)}}for(let e=0;e<l;++e){const r=i[e];r.length>0&&(a[u++]={index:f,count:r.length}),f=O(r,0,1,h,f,r.length,t)}return s.length=c,a.length=u,{position:h,polygons:s,outlines:a}}function O(e,t,r,n,o,i,s){o*=3;for(let a=0;a<i;++a){const i=e[t];n[o++]=i[0],n[o++]=i[1],n[o++]=s?i[2]:0,t+=r}return o/3}function P(e){return!(0,F.bu)(e,!1,!1)}(o=n||(n={}))[o.NONE=0]="NONE",o[o.CCW_IS_HOLE=1]="CCW_IS_HOLE";var U=r(66459);let N=null;function I(e,t){let r=1/0,n=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++];r=Math.min(r,t),n=Math.min(n,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:r,ymin:n,zmin:o,xmax:i,ymax:s,zmax:a,spatialReference:t})}var z=r(17896),k=r(44547),W=r(13442);const H="esri.geometry.support.meshUtils.centerAt";const B=(0,l.c)(),V=(0,l.c)(),$=(0,l.c)();var J=r(81271);function q(e){const t=(0,J.Yd)(e.url);return r=>{const n=(0,J.PF)(r,t,t),o=n?n.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??r}}function G(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 r=null;for(const{name:n,mimeType:o,source:i}of e)(null==r||K.test(o)||Y.test(n))&&(r=i.url),t.set(n,i.url),i.files.forEach(((e,r)=>t.set(r,e)));if(null==r)throw new p.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new Q(r,(()=>e.forEach((({source:e})=>e.dispose()))),t)}class Q{constructor(e,t=(()=>{}),r=new Map){this.url=e,this.dispose=t,this.files=r}static fromBlob(e){const t=URL.createObjectURL(e);return new Q(t,(()=>URL.revokeObjectURL(t)))}}var ee=r(2368),te=r(46791),re=r(84470);let ne=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,re.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,re.fV)(t,e)))&&this.externalSources.add(e)}clearSources(){this.displaySource=null,this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,re.JG)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(re.NZ)}};(0,u._)([(0,y.Cb)()],ne.prototype,"externalSources",void 0),(0,u._)([(0,y.Cb)()],ne.prototype,"displaySource",null),(0,u._)([(0,y.Cb)()],ne.prototype,"_implicitDisplaySource",null),(0,u._)([(0,y.Cb)()],ne.prototype,"_explicitDisplaySource",void 0),ne=(0,u._)([(0,x.j)("esri.geometry.support.meshUtils.Metadata")],ne);var oe=r(21787),ie=r(46521),se=r(13598),ae=r(58995),le=r(56493);function ce(e,t){if(e)for(let r=0;r<e.length;r+=3)for(let n=0;n<3;n++)e[r+n]+=t[n]}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,r){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 r="number"==typeof t?[t,t,t]:[null!=t.width?t.width:1,null!=t.depth?t.depth:1,null!=t.height?t.height:1];xe[0]=r[0],xe[4]=r[1],xe[8]=r[2];for(let t=0;t<e.position.length;t+=3){for(let r=0;r<3;r++)ye[r]=e.position[t+r];(0,z.t)(ye,ye,xe);for(let r=0;r<3;r++)e.position[t+r]=ye[r]}if(r[0]!==r[1]||r[1]!==r[2]){xe[0]=1/r[0],xe[4]=1/r[1],xe[8]=1/r[2];for(let t=0;t<e.normal.length;t+=3){for(let r=0;r<3;r++)ye[r]=e.normal[t+r];(0,z.t)(ye,ye,xe),(0,z.n)(ye,ye);for(let r=0;r<3;r++)e.normal[t+r]=ye[r]}}}(e,r?.size);const{vertexAttributes:n,vertexSpace:o,transform:i}=(0,U.w1)(e,t,r);return{vertexAttributes:new M.Q({...n,uv:e.uv}),vertexSpace:o,transform:i,components:[new T.Z({faces:e.faces,material:r&&r.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},ye=(0,l.c)(),xe=(0,ie.c)();var ve=r(52138);const we="esri.geometry.support.meshUtils.rotate";function be(e,t,r,n=l.Z){if(null!=e){(0,ve.d)(_e,(0,A.WH)(t),(0,A.ZZ)(t));for(let t=0;t<e.length;t+=r){for(let r=0;r<3;r++)Ae[r]=e[t+r]-n[r];(0,z.m)(Ae,Ae,_e);for(let r=0;r<3;r++)e[t+r]=Ae[r]+n[r]}}}const Ae=(0,l.c)(),Te=(0,l.c)(),Ze=(0,A.Ue)(),_e=(0,se.c)(),Ce=(0,ie.c)(),Se=(0,l.c)(),Me="esri.geometry.support.meshUtils.scale";function Re(e,t,r=l.Z){if(e)for(let n=0;n<e.length;n+=3){for(let t=0;t<3;t++)Fe[t]=e[n+t]-r[t];(0,z.g)(Fe,Fe,t);for(let t=0;t<3;t++)e[n+t]=Fe[t]+r[t]}}const Fe=(0,l.c)(),je=(0,l.c)(),Le=(0,l.c)();var Ee;const De="esri.geometry.Mesh",Oe={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:_.Z,"georeferenced-relative":Z.Z,local:C.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,this.transform=null,this.metadata=new ne,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:r,vertexSpace:n}=this,o=r.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"===n.type){const{_untransformedExtent:e,transform:r}=this;return function({xmin:e,xmax:t,ymin:r,ymax:n,zmin:o,zmax:i},s,a,l){o??=0,i??=0,N??=new Float64Array(24);const c=N;return c[0]=e,c[1]=r,c[2]=o,c[3]=e,c[4]=n,c[5]=o,c[6]=t,c[7]=n,c[8]=o,c[9]=t,c[10]=r,c[11]=o,c[12]=e,c[13]=r,c[14]=i,c[15]=e,c[16]=n,c[17]=i,c[18]=t,c[19]=n,c[20]=i,c[21]=t,c[22]=r,c[23]=i,(0,U.project)(l,s,a,c,l,c),I(c,l)}(e,r,n,t)}if("georeferenced-relative"===n.type){const{transform:e}=this;return I((0,U.project)(t,e,n,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:r}=this._transformedExtent;return new w.Z({x:t.x,y:t.y,z:r,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,r,n){return(0,A.qw)(e,t,r,Ne),function(e,t,r){if(!e.vertexAttributes||!e.vertexAttributes.position||0===t[3])return;const{spatialReference:n,vertexSpace:o}=e;if(o.isRelative){(0,W.A)(o,we,r);const n=r?.origin??e.origin;e.transform??=new S.Z,function(e,t,r,n){const o=t.origin,i=(0,z.s)(Ae,n.x,n.y,n.z??0),s=(0,z.b)(Ae,i,o);e.applyLocalInverse(s,Te),e.rotation=(0,A.qC)(e.rotation,r,(0,A.Ue)()),e.applyLocalInverse(s,s),(0,z.b)(s,s,Te),e.translation=(0,z.a)((0,l.c)(),e.translation,s)}(e.transform,o,t,n)}else{const o=r?.origin??e.origin;(0,W.h)(n,r)?function(e,t,r){const n=e.spatialReference,o=(0,ae.rS)(n),i=Se;(0,k.KC)(r,i,o)||(0,k.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,k.Bm)(o,i,_e,o),(0,oe.f)(Ce,_e);const h=Ze;(0,z.t)((0,A.ZZ)(Ze),(0,A.ZZ)(t),Ce),h[3]=t[3],(0,le.XO)(s,n,c),null!=a&&null!=u&&(0,le.Iz)(a,s,c,n,u),null!=l&&null!=p&&(0,le.wi)(l,s,c,n,p),be(c,h,3,i),(0,le.To)(c,s,n),null!=a&&null!=u&&(be(u,h,3),(0,le.Yk)(u,s,c,n,a)),null!=l&&null!=p&&(be(p,h,4),(0,le.M2)(p,s,c,n,l)),e.vertexAttributesChanged()}(e,t,o):function(e,t,r){const n=Se;if(!(0,k.KC)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.Z.getLogger(we).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}be(e.vertexAttributes.position,t,3,n),be(e.vertexAttributes.normal,t,3),be(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,o)}}(this,Ne,n),this}offset(e,t,r,n){return this.loaded?(Ue[0]=e,Ue[1]=t,Ue[2]=r,function(e,t,r){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:n}=e;n.isRelative?((0,W.A)(n,"esri.geometry.support.meshUtils.offset",r),function(e,t){const r=e.origin;e.origin=(0,z.a)((0,l.c)(),r,t)}(n,t)):(0,W.h)(e.spatialReference,r)?function(e,t){const r=e.spatialReference,n=e.vertexAttributes.position,o=e.vertexAttributes.normal,i=e.vertexAttributes.tangent,s=new Float64Array(n.length),a=null!=o?new Float32Array(o.length):null,l=null!=i?new Float32Array(i.length):null,c=e.extent.center,u=ue;(0,k.Bm)(r,[c.x,c.y,c.z],pe,(0,ae.rS)(r)),(0,oe.f)(he,pe),(0,z.t)(u,t,he),(0,le.XO)(n,r,s),null!=o&&null!=a&&(0,le.Iz)(o,n,s,r,a),null!=i&&null!=l&&(0,le.wi)(i,n,s,r,l),ce(s,u),(0,le.To)(s,n,r),null!=o&&null!=a&&(0,le.Yk)(a,n,s,r,o),null!=i&&null!=l&&(0,le.M2)(l,n,s,r,i),e.vertexAttributesChanged()}(e,t):function(e,t){ce(e.vertexAttributes.position,t),e.vertexAttributesChanged()}(e,t)}(this,Ue,n),this):(s.Z.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(function(e,t,r){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{spatialReference:n,vertexSpace:o}=e;if(o.isRelative){(0,W.A)(o,Me,r);const n=r?.origin??e.origin;e.transform??=new S.Z,function(e,t,r,n){const o=t.origin,i=(0,z.s)(Fe,n.x,n.y,n.z),s=(0,z.b)(Fe,i,o);e.applyLocalInverse(s,je);const a=(0,z.g)((0,l.c)(),e.scale,r);e.scale=a,e.applyLocalInverse(s,s),(0,z.b)(s,s,je),e.translation=(0,z.a)((0,l.c)(),e.translation,s)}(e.transform,o,t,n)}else{const o=(0,W.h)(n,r),i=r?.origin??e.origin;o?function(e,t,r){const n=e.spatialReference,o=(0,ae.rS)(n),i=Le;(0,k.KC)(r,i,o)||(0,k.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,n,c),null!=a&&null!=u&&(0,le.Iz)(a,s,c,n,u),null!=l&&null!=p&&(0,le.wi)(l,s,c,n,p),Re(c,t,i),(0,le.To)(c,s,n),null!=a&&null!=u&&(0,le.Yk)(u,s,c,n,a),null!=l&&null!=p&&(0,le.M2)(p,s,c,n,l),e.vertexAttributesChanged()}(e,t,i):function(e,t,r){const n=Le;if(!(0,k.KC)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.Z.getLogger(Me).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Re(e.vertexAttributes.position,t,n),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,r){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:n}=e,o=r?.origin??e.origin;n.isRelative?((0,W.A)(n,H,r),function(e,t,r){const{vertexSpace:n}=e;if(!n.isRelative)return;const o=V,i=B;if(!(0,k.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,k.KC)(r,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:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const a=(0,z.b)($,i,o),c=n.origin;n.origin=(0,z.a)((0,l.c)(),c,a)}(e,t,o)):(0,W.h)(e.spatialReference,r)?function(e,t,r){const n=(0,U.FF)(e.vertexAttributes,r,{geographic:!0}),{position:o,normal:i,tangent:s}=(0,U.iv)(n,t,{geographic:!0});e.vertexAttributes.position=o,e.vertexAttributes.normal=i,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}(e,t,o):function(e,t,r){const n=V,o=B;if((0,k.KC)(t,o,e.spatialReference)){if(!(0,k.KC)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.Z.getLogger(H).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(e,t,r){if(e)for(let n=0;n<e.length;n+=3)for(let o=0;o<3;o++)e[n+o]+=t[o]-r[o]})(e.vertexAttributes.position,o,n),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,n){const{source:o}=t,{loadGLTFMesh:i}=await(0,m.Hl)(Promise.all([r.e(8598),r.e(8079)]).then(r.bind(r,78079)),n),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:G(e)}))))}(e):async function(e,t){const r=await(0,m.WW)(e.map((async e=>{const r=await async function(e,t){const{parts:r}=e;if(1===r.length)return new Q(r[0].partUrl);const n=await e.toBlob(t);return(0,m.k_)(t),Q.fromBlob(n)}(e);return(0,m.k_)(t),{name:e.assetName,mimeType:e.assetMimeType,source:r}})));if((0,m.Hc)(t))throw r.forEach((e=>e.source.dispose())),(0,m.zE)();return X(r)}(e,t)}return G(e)}(o,n);(0,m.k_)(n);const a=i(new w.Z({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:q(s),useTransform:!0,signal:n?.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,r=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,r)))}const r={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Ee(r)}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=r.e(7277).then(r.bind(r,7277)),n=this.load(),o=await Promise.all([t,n]),{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 r=new Ee(ge(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:r}=me,n=4*e.length,o=new Float64Array(3*n),i=new Float32Array(3*n),s=new Float32Array(2*n),a=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,p=0;for(let n=0;n<e.length;n++){const h=e[n],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 n=0;s[u++]=.25*r[e][0]+h.uvOrigin[0],s[u++]=h.uvOrigin[1]-.25*r[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[n++],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 r=e.components[0],n=r.faces,o=de[t],i=6*o,s=new Array(6),a=new Array(n.length-6);let l=0,c=0;for(let e=0;e<n.length;e++)e>=i&&e<i+6?s[l++]=n[e]:a[c++]=n[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),r=4*o*2,n=[0,1,1,1,1,0,0,0];for(let e=0;e<n.length;e++)t[r+e]=n[e];e.vertexAttributes.uv=t}return e.components=[new T.Z({faces:s,material:r.material}),new T.Z({faces:a})],e}(r,t.imageFace):r}static createSphere(e,t){return e instanceof w.Z?new Ee(ge(function(e=0){const t=Math.round(8*2**e),r=2*t,n=(t-1)*(r+1)+2*r,o=new Float64Array(3*n),i=new Float32Array(3*n),s=new Float32Array(2*n),a=new Uint32Array((t-1)*r*2*3);let l=0,c=0,u=0,p=0;for(let e=0;e<=t;e++){const n=e/t*Math.PI+.5*Math.PI,h=Math.cos(n),f=Math.sin(n);ye[2]=f;const g=0===e||e===t,m=g?r-1:r;for(let n=0;n<=m;n++){const f=n/m*2*Math.PI;ye[0]=-Math.sin(f)*h,ye[1]=Math.cos(f)*h;for(let e=0;e<3;e++)o[l]=.5*ye[e],i[l]=ye[e],++l;s[c++]=(n+(g?.5:0))/r,s[c++]=e/t,0!==e&&n!==r&&(e!==t&&(a[u++]=p,a[u++]=p+1,a[u++]=p-r),1!==e&&(a[u++]=p,a[u++]=p-r,a[u++]=p-r-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),r=4*(t+1)+2*t,n=new Float64Array(3*r),o=new Float32Array(3*r),i=new Float32Array(2*r),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 r=0===e||5===e,h=e<=1||e>=4,f=2===e||4===e,g=r?t-1:t;for(let m=0;m<=g;m++){const d=m/g*2*Math.PI,y=r?0:.5;ye[0]=y*Math.sin(d),ye[1]=y*-Math.cos(d),ye[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)n[a++]=ye[t],o[l++]=h?2===t?e<=1?1:-1:0:2===t?0:ye[t]/y;i[c++]=(m+(r?.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:n,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 r=t?.facing??"up",n=function(e,t){const r="number"==typeof t?t:null!=t?t.width:1,n="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:r,depth:n};case"north":case"south":return{width:r,height:n};case"east":case"west":return{depth:r,height:n}}}(r,t?.size);return new Ee(ge(function(e){const t=fe.facingAxisOrderSwap[e],r=fe.position,n=fe.normal,o=new Float64Array(r.length),i=new Float32Array(n.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]=r[e+c]*u,i[s]=n[e+c]*u,s++}}return{position:o,normal:i,uv:new Float32Array(fe.uv),faces:new Uint32Array(fe.faces),isPlane:!0}}(r),e,{...t,size:n}))}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 r=function(e){const t=D(e.rings,e.hasZ,n.CCW_IS_HOLE),r=new Array;let o=0,i=0;for(const e of t.polygons){const n=e.count,s=e.index,a=(0,j.Rq)(t.position,3*s,3*n),l=e.holeIndices.map((e=>e-s)),c=(0,L.mi)((0,R.e)(a,l,3));r.push({position:a,faces:c}),o+=a.length,i+=c.length}const s=function(e,t,r){if(1===e.length)return e[0];const n=(0,j.bg)(t),o=new Array(r);let i=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)n[i++]=t.position[e];for(const e of t.faces)o[s++]=e+a;a=i/3}return{position:n,faces:(0,L.mi)(o)}}(r,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,j.QZ)(new Float64Array(a.buffer)),s.faces=a.indices,s}(e);return new Ee({vertexAttributes:new M.Q({position:r.position}),components:[new T.Z({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new _.Z})}static async createFromGLTF(e,t,n){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([r.e(8598),r.e(8079)]).then(r.bind(r,78079)),n);return new Ee(await o(e,t,n))}static async createFromFiles(e,t,r){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 n=Ee.createWithExternalSource(e,t),o=r?.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([n],r);return i}static createWithExternalSource(e,t,r){const n=r?.extent??null,{x:o,y:i,z:s,spatialReference:a}=e,l=r?.transform?.clone()??new S.Z,c=r?.vertexSpace??new C.Z({origin:[o,i,s??0]}),u={source:t,extent:n},p=new ne;return p.externalSources.push(u),new Ee({metadata:p,transform:l,vertexSpace:c,spatialReference:a})}static createIncomplete(e,t){const{x:r,y:n,z:o,spatialReference:i}=e,s=t?.transform?.clone()??new S.Z,a=t?.vertexSpace??new C.Z({origin:[r,n,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,y.Cb)({type:[T.Z],json:{write:!0}})],Pe.prototype,"components",void 0),(0,u._)([(0,y.Cb)({nonNullable:!0,types:Oe,constructOnly:!0,json:{write:!0}})],Pe.prototype,"vertexSpace",void 0),(0,u._)([(0,y.Cb)({type:S.Z,json:{write:!0}})],Pe.prototype,"transform",void 0),(0,u._)([(0,y.Cb)({constructOnly:!0})],Pe.prototype,"metadata",void 0),(0,u._)([(0,y.Cb)()],Pe.prototype,"hasExtent",null),(0,u._)([(0,y.Cb)()],Pe.prototype,"_transformedExtent",null),(0,u._)([(0,y.Cb)()],Pe.prototype,"_untransformedExtent",null),(0,u._)([(0,y.Cb)()],Pe.prototype,"anchor",null),(0,u._)([(0,y.Cb)()],Pe.prototype,"origin",null),(0,u._)([(0,y.Cb)({readOnly:!0,json:{read:!1}})],Pe.prototype,"extent",null),(0,u._)([(0,y.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Pe.prototype,"hasZ",void 0),(0,u._)([(0,y.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Pe.prototype,"hasM",void 0),(0,u._)([(0,y.Cb)({type:M.Q,nonNullable:!0,json:{write:!0}})],Pe.prototype,"vertexAttributes",void 0),Pe=Ee=(0,u._)([(0,x.j)(De)],Pe);const Ue=(0,l.c)(),Ne=(0,A.Ue)(),Ie=Pe;var ze,ke,We=r(82971),He=r(2981),Be=r(74889);function Ve(e,t,r){const n=r.features;r.features=[],delete r.geometryType;const o=Be.Z.fromJSON(r);if(o.geometryType="mesh",!r.assetMaps)return o;const s=Je(t,r.assetMaps),a=e.sourceSpatialReference??We.Z.WGS84,l=r.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 n){const r=$e(e,l,a,t,s);null!=r&&o.features.push(new i.Z({geometry:r,attributes:u(e)}))}return o}function $e(e,t,r,n,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:r}){const n=e[r.originX],o=e[r.originY],i=e[r.originZ];return{originPoint:new w.Z({x:n,y:o,z:i,spatialReference:t}),originVector:(0,l.f)(n,o,i)}}(e,r,n),p=c.Z.fromJSON(e.geometry);p.spatialReference=r;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,n),f=s.projectVertices?new Z.Z({origin:u}):new C.Z({origin:u}),g=function(e){const t=Array.from(e.files.values()),r=new Array;for(const e of t){if(e.status!==ze.COMPLETED)return null;const t=new Array;for(const r of e.parts){if(!r)return null;t.push(new re.LL(r.url,r.hash))}r.push(new re.CP(e.name,e.mimeType,t))}return r}(s);return g?Ie.createWithExternalSource(a,g,{extent:p,transform:h,vertexSpace:f}):Ie.createIncomplete(a,{extent:p,transform:h,vertexSpace:f})}function Je(e,t){const r=new Map;for(const n of t){const t=n.parentGlobalId;if(null==t)continue;const o=n.assetName,i=n.assetType,l=n.assetHash,c=n.assetURL,u=n.conversionStatus,p=n.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)(r,t,(()=>({projectVertices:Ge(n.flags).projectVertices,files:new Map})));(0,a.s1)(f.files,o,(()=>({name:o,type:i,mimeType:h,status:qe(u),parts:[]}))).parts[p]={hash:l,url:c}}return r}function qe(e){switch(e){case"COMPLETED":case"SUBMITTED":return ze.COMPLETED;case"INPROGRESS":return ze.PENDING;default:return ze.FAILED}}function Ge(e){return{projectVertices:e.includes("PROJECT_VERTICES")}}(ke=ze||(ze={}))[ke.FAILED=0]="FAILED",ke[ke.PENDING=1]="PENDING",ke[ke.COMPLETED=2]="COMPLETED"}}]);
|