@arcgis/core 4.27.0-rc.1 → 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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{92e7f224a80195e606d6.js → 1f69fb9687de9ebfcf90.js} +1 -1
- package/assets/esri/core/workers/chunks/{0a02ac5628d1739372c6.js → 2b55295590b4a0503749.js} +1 -1
- package/assets/esri/core/workers/chunks/471f6eba213412b82840.js +1 -0
- package/assets/esri/core/workers/chunks/{f339db2b599fa9585283.js → 5e6471dd2a08e66b47d0.js} +79 -81
- package/assets/esri/core/workers/chunks/{474d9b334812533bab36.js → 6cd248d065f6d1616294.js} +1 -1
- package/assets/esri/core/workers/chunks/{d8bd3f498b3fa8153404.js → 6f510f28526c73ab453c.js} +1 -1
- package/assets/esri/core/workers/chunks/83e3d104886b48f00397.js +1 -0
- package/assets/esri/core/workers/chunks/{3c5a64a545272f148e93.js → 9621b7d8d951aa881686.js} +1 -1
- package/assets/esri/core/workers/chunks/{b6e173eddaad4244cb5f.js → b31974524932e638df8c.js} +1 -1
- 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/f35895e03c036d67b3ed.js +1 -0
- package/assets/esri/core/workers/chunks/{c6efe2e04ea6a55bb6e3.js → f6e68befe2812b90b40d.js} +1 -1
- 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/_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/meshVertexSpaceUtils.js +5 -0
- package/interfaces.d.ts +179 -31
- package/kernel.js +1 -1
- package/layers/VideoLayer.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/video/VideoController.js +1 -1
- package/layers/video/videoUtils.js +5 -0
- package/package.json +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/smartMapping/symbology/flow.js +1 -1
- package/statistics/utils.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/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/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/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/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/07651ef8348f702d59ac.js +0 -1
- package/assets/esri/core/workers/chunks/39714837f9d3708e3806.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/b5fc6f2044ed047c5afd.js +0 -1
|
@@ -1 +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(){let e=null;if(this.components){const t=new Map,n=new Map;e=this.components.map((e=>e.cloneWithDeduplication(t,n)))}const t={components:e,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:this.vertexSpace.clone(),transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Ee(t)}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)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
|
+
"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"}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4720,1444],{16306:(e,t,r)=>{r.d(t,{aX:()=>A});var a=r(68773),n=r(20102),s=r(92604),i=r(38913),o=r(58901),l=r(73913),d=r(8744),u=r(40488),p=(r(66577),r(3172)),c=r(33955),h=r(11282),f=r(81271);async function y(e,t,r){const a="string"==typeof e?(0,f.mN)(e):e,n=t[0].spatialReference,s=(0,c.Ji)(t[0]),i={...r,query:{...a.query,f:"json",sr:n.wkid??JSON.stringify(n),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:o}=await(0,p.default)(a.path+"/simplify",i);var l;return function(e,t,r){const a=(0,c.q9)(t);return e.map((e=>{const t=a.fromJSON(e);return t.spatialReference=r,t}))}(o.geometries,s,n)}const m=s.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function F(e,t,r){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof i.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new n.Z(e)}const r=(0,l.x3)(e),a=[];for(const e of r){const r=[];a.push(r),r.push([e[0][0],e[0][1]]);for(let a=0;a<e.length-1;a++){const n=e[a][0],s=e[a][1],i=e[a+1][0],o=e[a+1][1],l=Math.sqrt((i-n)*(i-n)+(o-s)*(o-s)),d=(o-s)/l,u=(i-n)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const a=e*t,i=u*a+n,o=d*a+s;r.push([i,o])}const e=(l+Math.floor(p-1)*t)/2,a=u*e+n,i=d*e+s;r.push([a,i])}r.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new i.Z({rings:a,spatialReference:e.spatialReference}):new o.Z({paths:a,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.Sx)(t,!0)}return r&&(e=(0,l.Sy)(e,r)),e}function w(e,t,r){if(Array.isArray(e)){const a=e[0];if(a>t){const r=(0,l.XZ)(a,t);e[0]=a+r*(-2*t)}else if(a<r){const t=(0,l.XZ)(a,r);e[0]=a+t*(-2*r)}}else{const a=e.x;if(a>t){const r=(0,l.XZ)(a,t);e=e.clone().offset(r*(-2*t),0)}else if(a<r){const t=(0,l.XZ)(a,r);e=e.clone().offset(t*(-2*r),0)}}return e}function I(e,t){let r=-1;for(let a=0;a<t.cutIndexes.length;a++){const n=t.cutIndexes[a],s=t.geometries[a],i=(0,l.x3)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const a=t[e][0];r=a>r?a:r}r=Number(r.toFixed(9));const a=-360*(0,l.XZ)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(a,0))}return!0}}))}if(n===r){if(g(e))for(const t of(0,l.x3)(s))e[n]=e[n].addRing(t);else if(b(e))for(const t of(0,l.x3)(s))e[n]=e[n].addPath(t)}else r=n,e[n]=s}return e}async function A(e,t,r){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??a.default.geometryServiceUrl;let s,f,g,b,Z,v,S,R,E=0;const x=[],$=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,f=(0,d.C5)(s),g=s.isWebMercator,v=g?102100:4326,b=l.UZ[v].maxX,Z=l.UZ[v].minX,S=l.UZ[v].plus180Line,R=l.UZ[v].minus180Line),f)if("mesh"===t.type)$.push(t);else if("point"===t.type)$.push(w(t.clone(),b,Z));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>w(e,b,Z))),$.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,f);$.push(e.rings?new i.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,l.XZ)(e.xmin,Z)*(2*b);let a=0===r?t.clone():(0,l.Sy)(t.clone(),r);e.offset(r,0),e.intersects(S)&&e.xmax!==b?(E=e.xmax>E?e.xmax:E,a=F(a,g),x.push(a),$.push("cut")):e.intersects(R)&&e.xmin!==Z?(E=e.xmax*(2*b)>E?e.xmax*(2*b):E,a=F(a,g,360),x.push(a),$.push("cut")):$.push(a)}else $.push(t.clone());else $.push(t);else $.push(t);let O=(0,l.XZ)(E,b),L=-90;const j=O,U=new o.Z;for(;O>0;){const e=360*O-180;U.addPath([[e,L],[e,-1*L]]),L*=-1,O--}if(x.length>0&&j>0){const t=I(x,await async function(e,t,r,a){const n=(0,h.en)(e),s=t[0].spatialReference,i={...a,query:{...n.query,f:"json",sr:JSON.stringify(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},o=await(0,p.default)(n.path+"/cut",i),{cutIndexes:l,geometries:d=[]}=o.data;return{cutIndexes:l,geometries:d.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(n,x,U,r)),a=[],s=[];for(let r=0;r<$.length;r++){const n=$[r];if("cut"!==n)s.push(n);else{const n=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&n.rings.length>=i.rings.length?(a.push(n),s.push("simplify")):s.push(g?(0,u.$)(n):n)}}if(!a.length)return s;const i=await y(n,a,r),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(g?(0,u.$)(i.shift()):i.shift())}return o}const k=[];for(let e=0;e<$.length;e++){const t=$[e];if("cut"!==t)k.push(t);else{const e=x.shift();k.push(!0===g?(0,u.$)(e):e)}}return k}},73913:(e,t,r)=>{r.d(t,{Sy:()=>l,UZ:()=>i,XZ:()=>o,x3:()=>d});var a=r(58901),n=r(82971),s=r(33955);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new a.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator}),minus180Line:new a.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new a.Z({paths:[[[180,-180],[180,180]]],spatialReference:n.Z.WGS84}),minus180Line:new a.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:n.Z.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=d(e);for(const e of r)for(const r of e)r[0]+=t;return e}function d(e){return(0,s.oU)(e)?e.rings:e.paths}},14720:(e,t,r)=>{r.d(t,{Ey:()=>b,applyEdits:()=>F,aw:()=>m,uploadAssets:()=>S});var a=r(38171),n=r(46791),s=r(20102),i=r(22974),o=r(92604),l=r(95330),d=r(81271),u=r(16306),p=r(66361),c=r(2981),h=r(84230);function f(e){return e&&null!=e.applyEdits}function y(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function m(e){return e.every(y)}function g(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function b(e){return e.every(g)}async function F(e,t,r,a={}){let d;if((0,p.lQ)(e)&&e.url)d=(0,p.jF)(e.url,e.layerId,"original-and-current-features"===a.returnServiceEditsOption);else{d=(0,l.hh)(),d.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:d.promise};e.emit("apply-edits",t)}try{const{results:l,edits:u}=await async function(e,t,r,a){if(await e.load(),!f(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,h.ln)(e))throw new s.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:l}=await async function(e,t,r){const a=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),i=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),l=null!=e.infoFor3D;if(!t||!a&&!i)throw new s.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");const d=(0,h.S1)(e);if(!d.data.isVersioned&&r?.gdbVersion)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!d.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!d.editing.supportsGlobalId&&r?.globalIdUsed)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!d.editing.supportsGlobalId&&i)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&i)throw new s.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const u={...r};if(null!=u.rollbackOnFailureEnabled||d.editing.supportsRollbackOnFailure||(u.rollbackOnFailureEnabled=!0),u.rollbackOnFailureEnabled||"original-and-current-features"!==u.returnServiceEditsOption||(!1===u.rollbackOnFailureEnabled&&o.Z.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true."),u.rollbackOnFailureEnabled=!0),!d.editing.supportsReturnServiceEditsInSourceSpatialReference&&u.returnServiceEditsInSourceSR)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(u.returnServiceEditsInSourceSR&&"original-and-current-features"!==u.returnServiceEditsOption)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p={...t};if(p.addFeatures=t&&n.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():p.addFeatures||[],p.updateFeatures=t&&n.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():p.updateFeatures||[],p.deleteFeatures=t&&n.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():p.deleteFeatures||[],p.addFeatures.length&&!d.operations.supportsAdd)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(p.updateFeatures.length&&!d.operations.supportsUpdate)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(p.deleteFeatures.length&&!d.operations.supportsDelete)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");p.addAttachments=p.addAttachments||[],p.updateAttachments=p.updateAttachments||[],p.deleteAttachments=p.deleteAttachments||[],p.addFeatures=p.addFeatures.map(Z),p.updateFeatures=p.updateFeatures.map(Z),p.addAssetFeatures=[];const f=r?.globalIdUsed||l;return p.addFeatures.forEach((t=>function(e,t,r){w(e,t,r)}(t,e,f))),p.updateFeatures.forEach((t=>function(e,t,r){w(e,t,r);const a=(0,h.S1)(t);if("geometry"in e&&null!=e.geometry&&!a?.editing.supportsGeometryUpdate)throw new s.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f))),p.deleteFeatures.forEach((t=>function(e,t,r){w(e,t,r)}(t,e,f))),p.addAttachments.forEach((t=>I(t,e))),p.updateAttachments.forEach((t=>I(t,e))),l&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,a=(0,c.S0)("model/gltf-binary",r.supportedFormats)??(0,c.Ow)("glb",r.supportedFormats);if(!a||!r.editFormats.includes(a))throw new s.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:n}=e;for(const t of e.addFeatures??[])v(t)&&n.push(t);for(const t of e.updateFeatures??[])v(t)&&n.push(t)}(p,e),{edits:await A(p),options:u}}(e,r,a);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,l)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,a),p=e=>e.filter((e=>!e.error)).map(i.d9),y={edits:u,addedFeatures:p(l.addFeatureResults),updatedFeatures:p(l.updateFeatureResults),deletedFeatures:p(l.deleteFeatureResults),addedAttachments:p(l.addAttachmentResults),updatedAttachments:p(l.updateAttachmentResults),deletedAttachments:p(l.deleteAttachmentResults),exceededTransferLimit:!1};return l.editedFeatureResults?.length&&(y.editedFeatures=l.editedFeatureResults),d.resolve(y),l}catch(e){throw d.reject(e),e}}function w(e,t,r){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,"Feature should have 'globalId' when 'globalIdUsed' is true");if(!("attributes"in e)&&!e.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new s.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new s.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function I(e,t){const{feature:r,attachment:a}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new s.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&a.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,d.sJ)(a.data);if(e&&!e.isBase64)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function A(e){const t=e.addFeatures??[],r=e.updateFeatures??[],a=t.concat(r).map((e=>e.geometry)),n=await(0,u.aX)(a),s=t.length,i=r.length;return n.slice(0,s).forEach(((e,r)=>t[r].geometry=e)),n.slice(s,s+i).forEach(((e,t)=>r[t].geometry=e)),e}function Z(e){const t=new a.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function v(e){return"mesh"===e?.geometry?.type}function S(e,t,r,a){if(!f(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,a)}},66361:(e,t,r)=>{r.d(t,{jF:()=>d,lQ:()=>c,o1:()=>h});var a=r(43697),n=r(32448),s=r(22974),i=r(95330),o=(r(92604),r(75215),r(20102),r(80442),r(52011));const l=new n.Z.EventEmitter;function d(e,t,r=!1){const a=(0,i.hh)();return r=null==t||r,l.emit("apply-edits",{serviceUrl:e,layerId:t,mayReceiveServiceEdits:r,result:a.promise}),a}const u="esri.layers.mixins.EditBusLayer",p=Symbol(u);function c(e){return null!=e&&"object"==typeof e&&p in e}const h=e=>{var t;let r=class extends e{constructor(...e){super(...e),this[t]=!0,this.when().then((()=>{this.own([l.on("apply-edits",(e=>{const{serviceUrl:t,layerId:r,mayReceiveServiceEdits:a,result:n}=e,i=t===this.url,o=null!=r&&null!=this.layerId&&r===this.layerId;if(!i||!o&&!a)return;const l=n.then((e=>{if(o&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,s.d9)(e)),e;const t=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(t){const{adds:r,updates:a,deletes:n}=t.editedFeatures,i={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:r?r.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:n?n.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:a?a.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,s.d9)(e.editedFeatures),exceededTransferLimit:!1};return this.emit("edits",i),i}return{edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,s.d9)(e.editedFeatures),exceededTransferLimit:!1}}));this.emit("apply-edits",{result:l})}))])}),(()=>{}))}};return t=p,r=(0,a._)([(0,o.j)(u)],r),r}},2981:(e,t,r)=>{r.d(t,{$6:()=>u,Ow:()=>s,S0:()=>n,d1:()=>i});const a=[["binary","application/octet-stream","bin",""]];function n(e,t){return l(function(e,t){return o(t).find((t=>d(t)===e))}(e,t))}function s(e,t){return l(function(e,t){const r=e.toLowerCase();return o(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>r.endsWith(e)))))}(e,t))}function i(e,t){return d(function(e,t){return o(t).find((t=>l(t)===e))}(e,t))}function o(e){return[...a,...e]}function l(e){return e?.[0]}function d(e){return e?.[1]}function u(e){return e.tables?.find((e=>"assetMaps"===e.role))}},11282:(e,t,r)=>{r.d(t,{cv:()=>o,en:()=>i,lA:()=>s}),r(68773),r(40330);var a=r(22974),n=r(81271);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,n.mN)(e):(0,a.d9)(e)}function o(e,t,r){const a={};for(const n in e){if("declaredClass"===n)continue;const s=e[n];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){a[n]=[];for(let e=0;e<s.length;e++)a[n][e]=o(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r&&r[n]);a[n]=t?e:JSON.stringify(e)}else a[n]=t?s:JSON.stringify(s);else a[n]=s}return a}r(71058)}}]);
|