@arcgis/core 4.29.3 → 4.29.5
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{9f0c5822e9f2761054ea.js → 07ef6a6c4f3fce7508eb.js} +1 -1
- package/assets/esri/core/workers/chunks/47504e296bf82357f6bb.js +1 -0
- package/assets/esri/core/workers/chunks/5db9739e00f15613d1ea.js +1 -0
- package/assets/esri/core/workers/chunks/{b125ab84b7761e761734.js → 6ee0e9e56b80296570cb.js} +1 -1
- package/assets/esri/core/workers/chunks/994ca341d8711a4dd473.js +1 -0
- package/assets/esri/core/workers/chunks/{246cba9cd5cadba6be08.js → 9a8ab968ebb18480481d.js} +1 -1
- package/assets/esri/core/workers/chunks/ad9740559e8e45526796.js +1 -0
- package/assets/esri/core/workers/chunks/bd4cb6b02ed52b82ba56.js +1 -0
- package/assets/esri/core/workers/chunks/{712b5cabf4ea3dc8bf33.js → c34ec99627e7645fd218.js} +1 -1
- package/assets/esri/core/workers/chunks/c442480601f9a36e29b9.js +1 -0
- package/assets/esri/core/workers/chunks/c8ecaac448fddd120421.js +1 -0
- package/interfaces.d.ts +38 -50
- package/kernel.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/package.json +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToFeatureFactories.js +1 -1
- package/rest/print.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/urlUtils.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/ReshufflePlan.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/Buffer.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/Technique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/ProcessorTileMessageQueue.js +5 -0
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/layers/features/aggregation/GridCell.js +1 -1
- package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/ComputedExpression.js +1 -1
- package/views/2d/layers/features/support/DisplayIdGenerator.js +1 -1
- package/views/2d/layers/features/support/FeatureSetCache.js +5 -0
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/support/handleNoEngineError.js +5 -0
- package/views/MapView.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
- package/widgets/LayerList/support/layerListUtils.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/assets/esri/core/workers/chunks/7427d03e693f32a81377.js +0 -1
- package/assets/esri/core/workers/chunks/7a8bba91769ee18cc39f.js +0 -1
- package/assets/esri/core/workers/chunks/8044f34d295ec36aa3f1.js +0 -1
- package/assets/esri/core/workers/chunks/94d72650d556fd0eecc3.js +0 -1
- package/assets/esri/core/workers/chunks/a48201b109e9e9aab2d6.js +0 -1
- package/assets/esri/core/workers/chunks/ef3e6209e6ac6a56960b.js +0 -1
- package/assets/esri/core/workers/chunks/ff14214611e1e070235e.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9780,4828],{17012:(e,t,r)=>{r.d(t,{e:()=>l});var n,o,i,a=r(8528),s={exports:{}};n=s,o=function(){function e(e,r,o){o=o||2;var i,a,s,c,u,p,f,h=r&&r.length,g=h?r[0]*o:e.length,m=t(e,0,g,o,!0),y=[];if(!m||m.next===m.prev)return y;if(h&&(m=l(e,r,m,o)),e.length>80*o){i=s=e[0],a=c=e[1];for(var d=o;d<g;d+=o)(u=e[d])<i&&(i=u),(p=e[d+1])<a&&(a=p),u>s&&(s=u),p>c&&(c=p);f=0!==(f=Math.max(s-i,c-a))?1/f:0}return n(m,y,o,i,a,f),y}function t(e,t,r,n,o){var i,a;if(o===F(e,t,r,n)>0)for(i=t;i<r;i+=n)a=T(i,e[i],e[i+1],a);else for(i=r-n;i>=t;i-=n)a=T(i,e[i],e[i+1],a);if(a&&v(a,a.next)){var s=a.next;q(a),a=s}return a}function r(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==x(n.prev,n,n.next))n=n.next;else{var o=n.prev;if(q(n),(n=t=o)===n.next)break;r=!0}}while(r||n!==t);return t}function n(e,t,l,c,u,p,f){if(e){!f&&p&&h(e,c,u,p);for(var g,m,y=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),q(e),e=m.next,y=m.next;else if((e=m)===y){f?1===f?n(e=a(r(e),t,l),t,l,c,u,p,2):2===f&&s(e,t,l,c,u,p):n(r(e),t,l,c,u,p,1);break}}}function o(e){var t=e.prev,r=e,n=e.next;if(x(t,r,n)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(y(t.x,t.y,r.x,r.y,n.x,n.y,o.x,o.y)&&x(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(e,t,r,n){var o=e.prev,i=e,a=e.next;if(x(o,i,a)>=0)return!1;for(var s=o.x<i.x?o.x<a.x?o.x:a.x:i.x<a.x?i.x:a.x,l=o.y<i.y?o.y<a.y?o.y:a.y:i.y<a.y?i.y:a.y,c=o.x>i.x?o.x>a.x?o.x:a.x:i.x>a.x?i.x:a.x,u=o.y>i.y?o.y>a.y?o.y:a.y:i.y>a.y?i.y:a.y,p=g(s,l,t,r,n),f=g(c,u,t,r,n),h=e.prevZ,m=e.nextZ;h&&h.z>=p&&m&&m.z<=f;){if(h!==e.prev&&h!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,h.x,h.y)&&x(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,m!==e.prev&&m!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;h&&h.z>=p;){if(h!==e.prev&&h!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,h.x,h.y)&&x(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;m&&m.z<=f;){if(m!==e.prev&&m!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function a(e,t,n){var o=e;do{var i=o.prev,a=o.next.next;!v(i,a)&&w(i,o,o.next,a)&&_(i,a)&&_(a,i)&&(t.push(i.i/n),t.push(o.i/n),t.push(a.i/n),q(o),q(o.next),o=e=a),o=o.next}while(o!==e);return r(o)}function s(e,t,o,i,a,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&d(l,c)){var u=S(l,c);return l=r(l,l.next),u=r(u,u.next),n(l,t,o,i,a,s),void n(u,t,o,i,a,s)}c=c.next}l=l.next}while(l!==e)}function l(e,n,o,i){var a,s,l,u=[];for(a=0,s=n.length;a<s;a++)(l=t(e,n[a]*i,a<s-1?n[a+1]*i:e.length,i,!1))===l.next&&(l.steiner=!0),u.push(m(l));for(u.sort(c),a=0;a<u.length;a++)o=r(o=p(u[a],o),o.next);return o}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const r=t.next;if(r.prev===t||r===t||r===e)break;t=r}return t}function p(e,t){var n=function(e,t){var r,n=t,o=e.x,i=e.y,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=o&&s>a){if(a=s,s===o){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!r)return null;if(o===a)return r;var l,c=r,u=r.x,p=r.y,h=1/0;n=r;do{o>=n.x&&n.x>=u&&o!==n.x&&y(i<p?o:a,i,u,p,i<p?a:o,i,n.x,n.y)&&(l=Math.abs(i-n.y)/(o-n.x),_(n,e)&&(l<h||l===h&&(n.x>r.x||n.x===r.x&&f(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(e,t);if(!n)return t;var o=S(n,e),i=r(n,n.next);let a=u(o);return r(a,a.next),i=u(i),u(t===n?i:t)}function f(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function h(e,t,r,n){var o=e;do{null===o.z&&(o.z=g(o.x,o.y,t,r,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,r,n,o,i,a,s,l,c=1;do{for(r=e,e=null,i=null,a=0;r;){for(a++,n=r,s=0,t=0;t<c&&(s++,n=n.nextZ);t++);for(l=c;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(o=r,r=r.nextZ,s--):(o=n,n=n.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(a>1)}(o)}function g(e,t,r,n,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function m(e){var t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function y(e,t,r,n,o,i,a,s){return(o-a)*(t-s)-(e-a)*(i-s)>=0&&(e-a)*(n-s)-(r-a)*(t-s)>=0&&(r-a)*(i-s)-(o-a)*(n-s)>=0}function d(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&w(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(_(e,t)&&_(t,e)&&function(e,t){var r=e,n=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||v(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,r,n){var o=b(x(e,t,r)),i=b(x(e,t,n)),a=b(x(r,n,e)),s=b(x(r,n,t));return o!==i&&a!==s||!(0!==o||!A(e,r,t))||!(0!==i||!A(e,n,t))||!(0!==a||!A(r,e,n))||!(0!==s||!A(r,t,n))}function A(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function b(e){return e>0?1:e<0?-1:0}function _(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function S(e,t){var r=new M(e.i,e.x,e.y),n=new M(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function T(e,t,r,n){var o=new M(e,t,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function q(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 M(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function F(e,t,r,n){for(var o=0,i=t,a=r-n;i<r;i+=n)o+=(e[a]-e[i])*(e[i+1]+e[a+1]),a=i;return o}return e.deviation=function(e,t,r,n){var o=t&&t.length,i=o?t[0]*r:e.length,a=Math.abs(F(e,0,i,r));if(o)for(var s=0,l=t.length;s<l;s++){var c=t[s]*r,u=s<l-1?t[s+1]*r:e.length;a-=Math.abs(F(e,c,u,r))}var p=0;for(s=0;s<n.length;s+=3){var f=n[s]*r,h=n[s+1]*r,g=n[s+2]*r;p+=Math.abs((e[f]-e[g])*(e[h+1]-e[f+1])-(e[f]-e[h])*(e[g+1]-e[f+1]))}return 0===a&&0===p?0:Math.abs((p-a)/a)},e.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var a=0;a<t;a++)r.vertices.push(e[o][i][a]);o>0&&(n+=e[o-1].length,r.holes.push(n))}return r},e},void 0!==(i=o())&&(n.exports=i);const l=(0,a.g)(s.exports)},63316:(e,t,r)=>{r.d(t,{AD:()=>p,wV:()=>u});var n=r(2600),o=r(20744),i=r(10860),a=r(28176),s=r(49416);let l=null,c=!0;function u(e,t,r,n){if(!t||!r)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,r)}catch(e){c=!1}const o=function(e,t,r){return r||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),r=l),r.getContext("2d").createImageData(e,t)}(t,r,n);return o.data.set(e,0),o}async function p(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const r=(0,a.nV)(e);if(r?.isBase64)return{arrayBuffer:(0,s.K)(r.data),mediaType:r.mediaType};const o=await(0,n.c)(e,{responseType:"array-buffer",...t});return{arrayBuffer:o.data,mediaType:o.getHeader?.("Content-Type")??""}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:n}=await r.e(8560).then(r.bind(r,68560));if(e(l))return n(l,t)}if(u){const{isAnimatedPNG:e,parseApng:n}=await r.e(4464).then(r.bind(r,84464));if(e(l))return n(l,t)}return async function(e,t){const r=window.URL.createObjectURL(e);try{const{data:e}=await(0,n.c)(r,{...t,responseType:"image"});return e}catch(e){if(!(0,i.mA)(e))throw new o.c("invalid-image",`Could not fetch requested image at ${r}`);throw e}finally{window.URL.revokeObjectURL(r)}}(new Blob([l],{type:c}),t)}},39780:(e,t,r)=>{r.d(t,{c:()=>Xe});var n=r(41948),o=r(26832),i=r(20744),a=r(95800),s=r(66360),l=r(94804),c=r(10860),u=r(57896),p=r(1580),f=(r(9456),r(72052),r(12552)),h=r(62484),g=r(95247),m=r(50853),y=r(67776),d=r(7488),x=r(66952),v=r(43912);const w="Expected location to be a Point instance";class A extends i.c{constructor(){super("invalid-input:location",w)}}var b=r(51232),_=r(13708),S=r(41104),T=r(60003),q=r(21136),M=r(17012),F=r(82315),R=r(47452),C=r(15688),j=r(97143),L=r(77080),P=(r(60708),r(53648)),I=r(24296),k=r(98472),N=r(58632);r(89560),r(74376),r(71520),r(4636);const O=(0,N.Su)();function U(e,t,r,n,o,i,a){o*=3;for(let s=0;s<i;++s){const i=e[t];n[o++]=i[0],n[o++]=i[1],n[o++]=a?i[2]:0,t+=r}return o/3}function W(e,t,r){if(t){const t=function(e,t,r){const n=function(e,t,r,n){const o=(e=>!Array.isArray(e[0]))(t)?(e,r)=>t[3*e+r]:(e,r)=>t[e][r],i=n?(0,I.k8)(n)/(0,I.gl)(n):1;return(0,N.XX)(e,((e,t)=>(0,k.s)(e,o(t,0)*i,o(t,1)*i,o(t,2))),r)}(O,e,t,r)?(0,N.Oq)(O):[0,0,1];return Math.abs(n[2])>Math.cos((0,P.EF)(80))?F.k.Z:Math.abs(n[1])>Math.abs(n[0])?F.k.Y:F.k.X}(e,e.length-1,r);if(t===F.k.X)return!(0,R.K_)(e,F.k.Y,F.k.Z);if(t===F.k.Y)return!(0,R.K_)(e,F.k.X,F.k.Z)}return!(0,R.K_)(e,F.k.X,F.k.Y)}var E,D;(D=E||(E={}))[D.NONE=0]="NONE",D[D.CCW_IS_HOLE=1]="CCW_IS_HOLE";var $=r(77048),z=r(54828);let G=null;function B(e){if(0===e.length)return $.UN;const t=(0,$.Su)([Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,-Number.POSITIVE_INFINITY,-Number.POSITIVE_INFINITY,-Number.POSITIVE_INFINITY]);return(0,$.qe)(t,e),t}function Y(e,t){const[r,n,o,i,a,s]=B(e);return new g.c({xmin:r,ymin:n,zmin:o,xmax:i,ymax:a,zmax:s,spatialReference:t})}var Z=r(93184),H=r(71488);const V="esri.geometry.support.meshUtils.centerAt";const K=(0,h.Su)(),X=(0,h.Su)(),Q=(0,h.Su)();var J=r(28176);function ee(e){const t=(0,J.iu)(e.url);return r=>{const n=(0,J.SU)(r,t,t),o=n?n.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??r}}function te(e){return se.fromBlob(e,le(e.name,e.type))}const re=/^model\/gltf\+json$/,ne=/^model\/gltf-binary$/,oe=/\.gltf$/i,ie=/\.glb$/i;function ae(e){const t=new Map;let r,n=null;for(const{name:o,mimeType:i,source:a}of e)null===n&&(re.test(i)||oe.test(o)?(n=a.url,r="gltf"):(ne.test(i)||ie.test(o))&&(n=a.url,r="glb")),t.set(o,a.url),a.files.forEach(((e,r)=>t.set(r,e)));if(null==n)throw new i.c("mesh-load-external:missing-files","Missing files to load external mesh source");return new se(n,(()=>e.forEach((({source:e})=>e.dispose()))),t,r)}class se{constructor(e,t=(()=>{}),r=new Map,n){this.url=e,this.dispose=t,this.files=r,this.type=n}static fromBlob(e,t){const r=URL.createObjectURL(e);return new se(r,(()=>URL.revokeObjectURL(r)),void 0,t)}}function le(e,t){return re.test(t)||oe.test(e)?"gltf":ne.test(t)||oe.test(e)?"glb":void 0}var ce=r(3856),ue=r(2952),pe=r(54264);let fe=class extends ce.m{constructor(){super(),this.externalSources=new ue.c,this._explicitDisplaySource=null,this.addHandles((0,u.on)((()=>this.externalSources),"after-remove",(({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)}),{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,pe.Ud)(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,pe._o)(t,e)))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,pe.v_)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(pe.Ud)}};(0,n._)([(0,p.qq)()],fe.prototype,"externalSources",void 0),(0,n._)([(0,p.qq)()],fe.prototype,"displaySource",null),(0,n._)([(0,p.qq)()],fe.prototype,"_implicitDisplaySource",null),(0,n._)([(0,p.qq)()],fe.prototype,"_explicitDisplaySource",void 0),fe=(0,n._)([(0,f.c)("esri.geometry.support.meshUtils.Metadata")],fe);var he=r(68612);const ge={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 me(e,t,r){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null!=t){ve[0]=t[0],ve[4]=t[1],ve[8]=t[2];for(let t=0;t<e.position.length;t+=3){for(let r=0;r<3;r++)xe[r]=e.position[t+r];(0,k.t)(xe,xe,ve);for(let r=0;r<3;r++)e.position[t+r]=xe[r]}if(t[0]!==t[1]||t[1]!==t[2]){ve[0]=1/t[0],ve[4]=1/t[1],ve[8]=1/t[2];for(let t=0;t<e.normal.length;t+=3){for(let r=0;r<3;r++)xe[r]=e.normal[t+r];(0,k.t)(xe,xe,ve),(0,k.n)(xe,xe);for(let r=0;r<3;r++)e.normal[t+r]=xe[r]}}}}(e,function(e,t,r){const n=(0,z._0)(t,r);if(null==e&&1===n)return null;if(null==e)return[n,n,n];if("number"==typeof e){const t=e*n;return[t,t,t]}return[null!=e.width?e.width*n:n,null!=e.depth?e.depth*n:n,null!=e.height?e.height*n:n]}(r?.size,r?.unit,t.spatialReference));const{vertexAttributes:n,vertexSpace:o,transform:i}=(0,z.EX)(e,t,{vertexSpace:r?.vertexSpace,geographic:r?.geographic});return{vertexAttributes:new T.s({...n,uv:e.uv}),vertexSpace:o,transform:i,components:[new v.c({faces:e.faces,material:r?.material||null})],spatialReference:t.spatialReference}}const ye={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,h.Su)(),ve=(0,he.Su)();var we=r(77556),Ae=r(15008),be=r(87104),_e=r(41512),Se=r(2620),Te=r(82448),qe=r(51120),Me=r(38496);function Fe(e,t,{vertexSpace:r,spatialReference:n}){if("georeferenced"===r.type){const o=e;if(!(0,Z.M)(t,o,n))return!1;const{origin:i}=r;return(0,k.f)(e,o,i),!0}const o=(0,Te._s)(n),i=e;if(!(0,Z.M)(t,i,o))return!1;const{origin:a}=r,s=Re;if(!(0,qe.y)(n,a,s,o))return!1;const l=(0,Ae.S_)(Re,s);return null!=l&&((0,k.e)(e,i,l),!0)}const Re=(0,be.Su)(),Ce="esri.geometry.support.meshUtils.rotate";function je(e,t,r,n=h.cX){if(null!=e){(0,Ae.IT)(ke,(0,x.kX)(t),(0,x.Yz)(t));for(let t=0;t<e.length;t+=r){for(let r=0;r<3;r++)Le[r]=e[t+r]-n[r];(0,k.e)(Le,Le,ke);for(let r=0;r<3;r++)e[t+r]=Le[r]+n[r]}}}const Le=(0,h.Su)(),Pe=(0,be.Su)(),Ie=(0,x.Su)(),ke=(0,be.Su)(),Ne=(0,he.Su)(),Oe=(0,h.Su)(),Ue=(0,Se.Su)(),We="esri.geometry.support.meshUtils.scale";function Ee(e,t,r=h.cX){if(e)for(let n=0;n<e.length;n+=3){for(let t=0;t<3;t++)De[t]=e[n+t]-r[t];(0,k.h)(De,De,t);for(let t=0;t<3;t++)e[n+t]=De[t]+r[t]}}const De=(0,h.Su)(),$e=(0,h.Su)(),ze=(0,be.Su)(),Ge=(0,h.Su)();var Be;const Ye="esri.geometry.Mesh";function Ze(){return s.c.getLogger(Ye)}const He={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:b.c,local:_.c}};let Ve=Be=class extends(a.c.LoadableMixin((0,l.g)(m.c))){constructor(e){super(e),this.components=null,this.vertexSpace=new b.c,this.transform=null,this.metadata=new fe,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new T.s,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles((0,u.aE)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:r,vertexSpace:n}=this,o=r.position;if(0===o.length||e&&0===e.length)return new g.c({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if((0,q.k$)(n)){const{_untransformedBounds:e,transform:r}=this;return function([e,t,r,n,o,i],a,s,l){G??=new Float64Array(24);const c=G;return c[0]=e,c[1]=t,c[2]=r,c[3]=e,c[4]=o,c[5]=r,c[6]=n,c[7]=o,c[8]=r,c[9]=n,c[10]=t,c[11]=r,c[12]=e,c[13]=t,c[14]=i,c[15]=e,c[16]=o,c[17]=i,c[18]=n,c[19]=o,c[20]=i,c[21]=n,c[22]=t,c[23]=i,(0,z.project)({positions:c,transform:a,vertexSpace:s,inSpatialReference:l,outSpatialReference:l,outPositions:c}),Y(c,l)}(e,r,n,t)}return Y(o,t)}get _untransformedBounds(){return B(this.vertexAttributes.position)}get anchor(){const e=(0,q.mA)(this.vertexSpace,this.spatialReference);if(null!=e)return e;const{center:t,zmin:r}=this._transformedExtent;return new y.c({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get origin(){const e=(0,q.mA)(this.vertexSpace,this.spatialReference);return null!=e?e:this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(v.c.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}Ze().error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,r,n){return(0,x.GA)(e,t,r,Ke),function(e,t,r){if(!e.vertexAttributes?.position||0===t[3])return;const{spatialReference:n,vertexSpace:o}=e,i=r?.origin??e.anchor,a=r?.geographic,l=(0,H.QL)(Ce,o,n,a);(0,q._c)(e)?function(e,t,r){e.transform??=new S.c;const{vertexSpace:n,transform:o,spatialReference:i}=e,[a,l,c]=n.origin,u=new y.c({x:a,y:l,z:c,spatialReference:i}),p=Le;if(u.equals(r))(0,k.s)(p,0,0,0);else if(!Fe(p,r,e))return void s.c.getLogger(Ce).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh (wkid:${i.wkid}) ${n.type} vertex space. Projection may be possible after calling projection.load().`);(0,_e.yG)(Ue,(0,x.Yz)(t),(0,x.kX)(t));const f=(0,Ae.WP)(Pe,Ue,h.cX,h.Qw,p),{localMatrix:g}=o,m=(0,Ae.iW)(Pe,f,g);o.scale=(0,Ae.sx)((0,h.Su)(),m),(0,Ae.aU)(m,m,(0,k.i)(Le,o.scale)),o.rotation=(0,x.Gc)(m),o.translation=(0,Ae.Qy)((0,h.Su)(),m)}(e,t,i):l?function(e,t,r){const n=e.spatialReference,o=(0,Te._s)(n),i=Oe;(0,Z.M)(r,i,o)||(0,Z.M)(e.origin,i,o);const a=e.vertexAttributes.position,s=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(a.length),u=null!=s?new Float32Array(s.length):null,p=null!=l?new Float32Array(l.length):null;(0,qe.y)(o,i,ke,o),(0,we.kr)(Ne,ke);const f=Ie;(0,k.t)((0,x.Yz)(Ie),(0,x.Yz)(t),Ne),f[3]=t[3],(0,Me.K_)(a,n,c),null!=s&&null!=u&&(0,Me.cH)(s,a,c,n,u),null!=l&&null!=p&&(0,Me.GW)(l,a,c,n,p),je(c,f,3,i),(0,Me.o$)(c,a,n),null!=s&&null!=u&&(je(u,f,3),(0,Me.QP)(u,a,c,n,s)),null!=l&&null!=p&&(je(p,f,4),(0,Me.Cr)(p,a,c,n,l)),e.vertexAttributesChanged()}(e,t,i):function(e,t,r){const n=Oe;if(!(0,Z.M)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.c.getLogger(Ce).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}je(e.vertexAttributes.position,t,3,n),je(e.vertexAttributes.normal,t,3),je(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,i)}(this,Ke,n),this}offset(e,t,r){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:n,vertexAttributes:o}=this,i=o?.position;if(!i)return this;if((0,q.k$)(n)){const[o,i,a]=n.origin;n.origin=(0,h.WK)(o+e,i+t,a+r)}else{for(let n=0;n<i.length;n+=3)i[n]+=e,i[n+1]+=t,i[n+2]+=r;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")?(function(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:n,spatialReference:o}=e,i=r?.origin??e.anchor,a=r?.geographic,l=(0,H.QL)(We,n,o,a);(0,q._c)(e)?function(e,t,r){e.transform??=new S.c;const{vertexSpace:n,transform:o,spatialReference:i}=e,[a,l,c]=n.origin,u=new y.c({x:a,y:l,z:c,spatialReference:i}),p=De;if(u.equals(r))(0,k.s)(p,0,0,0);else if(!Fe(p,r,e))return void s.c.getLogger(We).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh (wkid:${i.wkid}) ${n.type} vertex space. Projection may be possible after calling projection.load().`);const f=(0,k.s)($e,t,t,t),g=(0,Ae.WP)(ze,Se.IJ,h.cX,f,p),{localMatrix:m}=o,d=(0,Ae.iW)(ze,g,m);o.scale=(0,Ae.sx)((0,h.Su)(),d),(0,Ae.aU)(d,d,(0,k.i)(De,o.scale)),o.rotation=(0,x.Gc)(d),o.translation=(0,Ae.Qy)((0,h.Su)(),d)}(e,t,i):l?function(e,t,r){const n=e.spatialReference,o=(0,Te._s)(n),i=Ge;(0,Z.M)(r,i,o)||(0,Z.M)(e.origin,i,o);const a=e.vertexAttributes.position,s=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(a.length),u=null!=s?new Float32Array(s.length):null,p=null!=l?new Float32Array(l.length):null;(0,Me.K_)(a,n,c),null!=s&&null!=u&&(0,Me.cH)(s,a,c,n,u),null!=l&&null!=p&&(0,Me.GW)(l,a,c,n,p),Ee(c,t,i),(0,Me.o$)(c,a,n),null!=s&&null!=u&&(0,Me.QP)(u,a,c,n,s),null!=l&&null!=p&&(0,Me.Cr)(p,a,c,n,l),e.vertexAttributesChanged()}(e,t,i):function(e,t,r){const n=Ge;if(!(0,Z.M)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.c.getLogger(We).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Ee(e.vertexAttributes.position,t,n),e.vertexAttributesChanged()}(e,t,i)}(this,e,t),this):this}centerAt(e,t){return this._checkIfLoaded("centerAt()")?(function(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:n}=e,o=r?.origin??e.anchor,i=r?.geographic,a=(0,H.QL)(V,n,o.spatialReference,i);(0,q.k$)(n)?function(e,t,r){const{vertexSpace:n}=e;if(!(0,q.k$)(n))return;const o=X,i=K;if(!(0,Z.M)(t,i,e.spatialReference))return void s.c.getLogger(V).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.M)(r,o,e.spatialReference)){const t=e.origin;o[0]=t.x,o[1]=t.y,o[2]=t.z,s.c.getLogger(V).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const a=(0,k.f)(Q,i,o);n.origin=(0,k.g)((0,h.Su)(),n.origin,a)}(e,t,o):a?function(e,t,r){const n=(0,z.qu)(e.vertexAttributes,r),{position:o,normal:i,tangent:a}=(0,z.mC)(n,t,!1);e.vertexAttributes.position=o,e.vertexAttributes.normal=i,e.vertexAttributes.tangent=a,e.vertexAttributesChanged()}(e,t,o):function(e,t,r){const n=X,o=K;if((0,Z.M)(t,o,e.spatialReference)){if(!(0,Z.M)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.c.getLogger(V).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(e,t,r){if(e)for(let n=0;n<e.length;n+=3)for(let o=0;o<3;o++)e[n+o]+=t[o]-r[o]})(e.vertexAttributes.position,o,n),e.vertexAttributesChanged()}else s.c.getLogger(V).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):this}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,n){const{source:o}=t,{loadGLTFMesh:a}=await(0,c.Yv)(Promise.all([r.e(8108),r.e(2818)]).then(r.bind(r,42818)),n),s=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new i.c("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return ae(e.map((e=>({name:e.name,mimeType:e.type,source:te(e)}))))}(e):async function(e,t){const r=await(0,c.Y3)(e.map((async e=>{const r=await async function(e,t){const{parts:r,assetMimeType:n,assetName:o}=e;if(1===r.length)return new se(r[0].partUrl);const i=await e.toBlob(t);return(0,c.wp)(t),se.fromBlob(i,le(o,n))}(e);return(0,c.wp)(t),{name:e.assetName,mimeType:e.assetMimeType,source:r}})));if((0,c.wv)(t))throw r.forEach((e=>e.source.dispose())),(0,c.Uh)();return ae(r)}(e,t)}return te(e)}(o,n);(0,c.wp)(n);const l=a(new y.c({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:ee(s),signal:n?.signal,expectedType:s.type});l.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:u,components:p}=await l;e.vertexAttributes=u,e.components=p}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,r=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,r)))}const r={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Be(r)}cloneShallow(){return new Be({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=r.e(4232).then(r.bind(r,4232)),n=this.load(),o=await Promise.all([t,n]),{toBinaryGLTF:i}=o[0];return i(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(Ze().error(e,"Mesh must be loaded before applying operations"),!1)}static createBox(e,t){if(!(e instanceof y.c))return Ze().error(".createBox()",w),null;const r=new Be(me(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:r}=ye,n=4*e.length,o=new Float64Array(3*n),i=new Float32Array(3*n),a=new Float32Array(2*n),s=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,p=0;for(let n=0;n<e.length;n++){const f=e[n],h=l/3;for(const e of t)s[p++]=h+e;const g=f.corners;for(let e=0;e<4;e++){const t=g[e];let n=0;a[u++]=.25*r[e][0]+f.uvOrigin[0],a[u++]=f.uvOrigin[1]-.25*r[e][1];for(let e=0;e<3;e++)0!==f.axis[e]?(o[l++]=.5*f.axis[e],i[c++]=f.axis[e]):(o[l++]=.5*t[n++],i[c++]=0)}}return{position:o,normal:i,uv:a,faces:s}}(),e,t));return t?.imageFace&&"all"!==t.imageFace?function(e,t){const r=e.components[0],n=r.faces,o=de[t],i=6*o,a=new Array(6),s=new Array(n.length-6);let l=0,c=0;for(let e=0;e<n.length;e++)e>=i&&e<i+6?a[l++]=n[e]:s[c++]=n[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),r=4*o*2,n=[0,1,1,1,1,0,0,0];for(let e=0;e<n.length;e++)t[r+e]=n[e];e.vertexAttributes.uv=t}return e.components=[new v.c({faces:a,material:r.material}),new v.c({faces:s})],e}(r,t.imageFace):r}static createSphere(e,t){return e instanceof y.c?new Be(me(function(e=0){const t=Math.round(8*2**e),r=2*t,n=(t-1)*(r+1)+2*r,o=new Float64Array(3*n),i=new Float32Array(3*n),a=new Float32Array(2*n),s=new Uint32Array((t-1)*r*2*3);let l=0,c=0,u=0,p=0;for(let e=0;e<=t;e++){const n=e/t*Math.PI+.5*Math.PI,f=Math.cos(n),h=Math.sin(n);xe[2]=h;const g=0===e||e===t,m=g?r-1:r;for(let n=0;n<=m;n++){const h=n/m*2*Math.PI;xe[0]=-Math.sin(h)*f,xe[1]=Math.cos(h)*f;for(let e=0;e<3;e++)o[l]=.5*xe[e],i[l]=xe[e],++l;a[c++]=(n+(g?.5:0))/r,a[c++]=e/t,0!==e&&n!==r&&(e!==t&&(s[u++]=p,s[u++]=p+1,s[u++]=p-r),1!==e&&(s[u++]=p,s[u++]=p-r,s[u++]=p-r-1)),p++}}return{position:o,normal:i,uv:a,faces:s}}(t?.densificationFactor||0),e,t)):(Ze().error(".createSphere()",w),null)}static createCylinder(e,t){return e instanceof y.c?new Be(me(function(e=0){const t=Math.round(16*2**e),r=4*(t+1)+2*t,n=new Float64Array(3*r),o=new Float32Array(3*r),i=new Float32Array(2*r),a=new Uint32Array(4*t*3);let s=0,l=0,c=0,u=0,p=0;for(let e=0;e<=5;e++){const r=0===e||5===e,f=e<=1||e>=4,h=2===e||4===e,g=r?t-1:t;for(let m=0;m<=g;m++){const y=m/g*2*Math.PI,d=r?0:.5;xe[0]=d*Math.sin(y),xe[1]=d*-Math.cos(y),xe[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)n[s++]=xe[t],o[l++]=f?2===t?e<=1?1:-1:0:2===t?0:xe[t]/d;i[c++]=(m+(r?.5:0))/t,i[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,h||0===e||m===t||(5!==e&&(a[u++]=p,a[u++]=p+1,a[u++]=p-t),1!==e&&(a[u++]=p,a[u++]=p-t,a[u++]=p-t-1)),p++}}return{position:n,normal:o,uv:i,faces:a}}(t?.densificationFactor||0),e,t)):(Ze().error(".createCylinder()",w),null)}static createPlane(e,t){if(!(e instanceof y.c))return Ze().error(".createPlane()",w),null;const r=t?.facing??"up",n=function(e,t){const r="number"==typeof t?t:null!=t?t.width:1,n="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:r,depth:n};case"north":case"south":return{width:r,height:n};case"east":case"west":return{depth:r,height:n}}}(r,t?.size);return new Be(me(function(e){const t=ge.facingAxisOrderSwap[e],r=ge.position,n=ge.normal,o=new Float64Array(r.length),i=new Float32Array(n.length);let a=0;for(let e=0;e<4;e++){const e=a;for(let s=0;s<3;s++){const l=t[s],c=Math.abs(l)-1,u=l>=0?1:-1;o[a]=r[e+c]*u,i[a]=n[e+c]*u,a++}}return{position:o,normal:i,uv:new Float32Array(ge.uv),faces:new Uint32Array(ge.faces),isPlane:!0}}(r),e,{...t,size:n}))}static createFromPolygon(e,t){if(!(e instanceof d.c))return Ze().error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;const r=function(e){const t=function(e,t,r,n){const o=e.length,i=new Array(o),a=new Array(o),s=new Array(o);let l=0,c=0,u=0,p=0;for(let t=0;t<o;++t)p+=e[t].length;const f=(0,C.Gg)(3*p);let h=0;for(let p=o-1;p>=0;p--){const g=e[p],m=r===E.CCW_IS_HOLE&&W(g,t,n);if(m&&1!==o)i[l++]=g;else{let e=g.length;for(let t=0;t<l;++t)e+=i[t].length;const r={index:h,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};r.pathLengths[0]=g.length,g.length>0&&(s[u++]={index:h,count:g.length}),h=m?U(g,g.length-1,-1,f,h,g.length,t):U(g,0,1,f,h,g.length,t);for(let e=0;e<l;++e){const n=i[e];r.holeIndices[e]=h,r.pathLengths[e+1]=n.length,n.length>0&&(s[u++]={index:h,count:n.length}),h=U(n,0,1,f,h,n.length,t)}l=0,r.count>0&&(a[c++]=r)}}for(let e=0;e<l;++e){const r=i[e];r.length>0&&(s[u++]={index:h,count:r.length}),h=U(r,0,1,f,h,r.length,t)}return a.length=c,s.length=u,{position:f,polygons:a,outlines:s}}(e.rings,e.hasZ,E.CCW_IS_HOLE,e.spatialReference),r=new Array;let n=0,o=0;for(const e of t.polygons){const i=e.count,a=e.index,s=(0,C.lL)(t.position,3*a,3*i),l=e.holeIndices.map((e=>e-a)),c=(0,j.Uv)((0,M.e)(s,l,3));r.push({position:s,faces:c}),n+=s.length,o+=c.length}const i=function(e,t,r){if(1===e.length)return e[0];const n=(0,C.Gg)(t),o=new Array(r);let i=0,a=0,s=0;for(const t of e){for(let e=0;e<t.position.length;e++)n[i++]=t.position[e];for(const e of t.faces)o[a++]=e+s;s=i/3}return{position:n,faces:(0,j.Uv)(o)}}(r,n,o),a=Array.isArray(i.position)?(0,L.g)(i.position,3,{originalIndices:i.faces}):(0,L.g)(i.position.buffer,6,{originalIndices:i.faces});return i.position=(0,C.cp)(new Float64Array(a.buffer)),i.faces=a.indices,i}(e);return new Be({vertexAttributes:new T.s({position:r.position}),components:[new v.c({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new b.c})}static async createFromGLTF(e,t,n){if(!(e instanceof y.c)){const e=new A;throw Ze().error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await(0,c.Yv)(Promise.all([r.e(8108),r.e(2818)]).then(r.bind(r,42818)),n);return new Be(await o(e,t,n))}static async createFromFiles(e,t,r){if((0,o.gx)(Ze(),"`Mesh.createFromFiles` is deprecated in favor of 'SceneLayer.convertMesh'",{replacement:"SceneLayer.convertMesh",version:"4.29"}),!(e instanceof y.c)){const e=new A;throw(e=>{Ze().error(".createFromFiles()",e.message)})(e),e}if(!r?.layer)throw new i.c("invalid:no-layer","SceneLayer required for file to mesh conversion.");return r.layer.convertMesh(t,{location:e,...r})}static createWithExternalSource(e,t,r){const n=r?.extent??null,{x:o,y:i,z:a,spatialReference:s}=e,l=r?.transform?.clone()??new S.c,c=(0,h.WK)(o,i,a??0),u=(0,q.mm)(r?.vertexSpace??(0,q.GF)(s),c),p={source:t,extent:n},f=new fe;return f.externalSources.push(p),new Be({metadata:f,transform:l,vertexSpace:u,spatialReference:s})}static createIncomplete(e,t){const{x:r,y:n,z:o,spatialReference:a}=e,s=t?.transform?.clone()??new S.c,l=(0,h.WK)(r,n,o??0),c=(0,q.mm)(t?.vertexSpace??(0,q.GF)(a),l),u=new Be({transform:s,vertexSpace:c,spatialReference:a});return u.addResolvingPromise(Promise.reject(new i.c("mesh-incomplete","Mesh resources are not complete"))),u}};(0,n._)([(0,p.qq)({type:[v.c],json:{write:!0}})],Ve.prototype,"components",void 0),(0,n._)([(0,p.qq)({nonNullable:!0,types:He,constructOnly:!0,json:{write:!0}})],Ve.prototype,"vertexSpace",void 0),(0,n._)([(0,p.qq)({type:S.c,json:{write:!0}})],Ve.prototype,"transform",void 0),(0,n._)([(0,p.qq)({constructOnly:!0})],Ve.prototype,"metadata",void 0),(0,n._)([(0,p.qq)()],Ve.prototype,"hasExtent",null),(0,n._)([(0,p.qq)()],Ve.prototype,"_transformedExtent",null),(0,n._)([(0,p.qq)()],Ve.prototype,"_untransformedBounds",null),(0,n._)([(0,p.qq)()],Ve.prototype,"anchor",null),(0,n._)([(0,p.qq)()],Ve.prototype,"origin",null),(0,n._)([(0,p.qq)({readOnly:!0,json:{read:!1}})],Ve.prototype,"extent",null),(0,n._)([(0,p.qq)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Ve.prototype,"hasZ",void 0),(0,n._)([(0,p.qq)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Ve.prototype,"hasM",void 0),(0,n._)([(0,p.qq)({type:T.s,nonNullable:!0,json:{write:!0}})],Ve.prototype,"vertexAttributes",void 0),Ve=Be=(0,n._)([(0,f.c)(Ye)],Ve);const Ke=(0,x.Su)(),Xe=Ve},15688:(e,t,r)=>{r.d(t,{Gg:()=>o,cp:()=>i,lL:()=>a,mw:()=>s,qW:()=>l});var n=r(72008);function o(e,t=!1){return e<=n._?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function i(e){return((0,n.c7)(e)?e.length:e.byteLength/8)<=n._?Array.from(e):new Float64Array(e)}function a(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function s(e,t){for(let r=0;r<t.length;++r)e[r]=t[r];return e}function l(e){return Array.isArray(e)?new Float64Array(e):e}},43912:(e,t,r)=>{r.d(t,{c:()=>y});var n,o=r(41948),i=r(40504),a=r(62088),s=r(66360),l=r(1580),c=r(33392),u=r(12552),p=r(53368),f=r(96344),h=r(70492),g=r(60003);let m=n=class extends i.am{static from(e){return(0,p.uY)(n,e)}constructor(e){super(e),this.faces=null,this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,g.c)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},s.c.getLogger(this))}castMaterial(e){return(0,p.uY)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?h.c:f.c,e)}clone(){return new n({faces:(0,a.ct)(this.faces),shading:this.shading,material:(0,a.ct)(this.material),trustSourceNormals:this.trustSourceNormals,name:this.name})}cloneWithDeduplication(e,t){const r={faces:(0,a.ct)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals,name:this.name};return new n(r)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,o._)([(0,l.qq)({json:{write:!0}})],m.prototype,"faces",void 0),(0,o._)([(0,c.W)("faces")],m.prototype,"castFaces",null),(0,o._)([(0,l.qq)({type:f.c,json:{write:!0}})],m.prototype,"material",void 0),(0,o._)([(0,c.W)("material")],m.prototype,"castMaterial",null),(0,o._)([(0,l.qq)()],m.prototype,"name",void 0),(0,o._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"shading",void 0),(0,o._)([(0,l.qq)({type:Boolean})],m.prototype,"trustSourceNormals",void 0),m=n=(0,o._)([(0,u.c)("esri.geometry.support.MeshComponent")],m);const y=m},51232:(e,t,r)=>{r.d(t,{c:()=>u});var n=r(41948),o=r(3856),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(9968)),l=r(12552);let c=class extends((0,o.q)(i.am)){constructor(e){super(e),this.type="georeferenced",this.origin=null}};(0,n._)([(0,s.G)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,n._)([(0,a.qq)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,n._)([(0,l.c)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c);const u=c},13708:(e,t,r)=>{r.d(t,{c:()=>p});var n=r(41948),o=r(3856),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(9968)),l=r(12552),c=r(62484);let u=class extends((0,o.q)(i.am)){constructor(e){super(e),this.type="local",this.origin=(0,c.Su)()}};(0,n._)([(0,s.G)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,n._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,n._)([(0,l.c)("esri.geometry.support.MeshLocalVertexSpace")],u);const p=u},96344:(e,t,r)=>{r.d(t,{c:()=>f});var n,o=r(41948),i=r(44728),a=r(40504),s=r(1580),l=(r(9456),r(66360),r(72052),r(12552)),c=r(7192),u=r(56160);let p=n=class extends a.am{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const r=null!=e?e.get(this):null;if(r)return r;const o=new n(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,o._)([(0,s.qq)({type:i.c,json:{write:!0}})],p.prototype,"color",void 0),(0,o._)([(0,s.qq)({type:c.c,json:{write:!0}})],p.prototype,"colorTexture",void 0),(0,o._)([(0,s.qq)({type:u.c,json:{write:!0}})],p.prototype,"colorTextureTransform",void 0),(0,o._)([(0,s.qq)({type:c.c,json:{write:!0}})],p.prototype,"normalTexture",void 0),(0,o._)([(0,s.qq)({type:u.c,json:{write:!0}})],p.prototype,"normalTextureTransform",void 0),(0,o._)([(0,s.qq)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaMode",void 0),(0,o._)([(0,s.qq)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaCutoff",void 0),(0,o._)([(0,s.qq)({nonNullable:!0,json:{write:!0}})],p.prototype,"doubleSided",void 0),p=n=(0,o._)([(0,l.c)("esri.geometry.support.MeshMaterial")],p);const f=p},70492:(e,t,r)=>{r.d(t,{c:()=>f});var n,o=r(41948),i=r(44728),a=r(1580),s=(r(9456),r(66360),r(72052),r(12552)),l=r(96344),c=r(7192),u=r(56160);let p=n=class extends l.c{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const r=null!=e?e.get(this):null;if(r)return r;const o=new n(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,o._)([(0,a.qq)({type:i.c,json:{write:!0}})],p.prototype,"emissiveColor",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],p.prototype,"emissiveTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],p.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],p.prototype,"occlusionTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],p.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"metallic",void 0),(0,o._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"roughness",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],p.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],p.prototype,"metallicRoughnessTextureTransform",void 0),p=n=(0,o._)([(0,s.c)("esri.geometry.support.MeshMaterialMetallicRoughness")],p);const f=p},7192:(e,t,r)=>{r.d(t,{c:()=>y});var n,o=r(41948),i=(r(9456),r(63316)),a=r(40504),s=r(1580),l=r(53368),c=(r(72052),r(33600)),u=r(12552),p=r(18996),f=r(91952);const h=new WeakMap;let g=0,m=n=class extends a.am{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,r,n){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,f.t)(e.src,n),crossOrigin:e.crossOrigin};t[r]=o}else if(e instanceof HTMLCanvasElement){const n=e.getContext("2d").getImageData(0,0,e.width,e.height),o={type:"canvas-element",imageData:this._encodeImageData(n)};t[r]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,f.t)(e.src,n),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[r]=o}else if(e instanceof ImageData){const n={type:"image-data",imageData:this._encodeImageData(e)};t[r]=n}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),r=document.createElement("canvas");return r.width=t.width,r.height=t.height,r.getContext("2d").putImageData(t,0,0),r}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),r=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===r)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(h.has(this.data)||h.set(this.data,++g),t(h.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 n(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const r=this.clone();return e.set(this,r),r}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let r=0;r<e.data.length;r++)t+=String.fromCharCode(e.data[r]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),r=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return(0,i.wV)(r,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new n({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new n({data:e}):(0,l.uY)(n,e)}};(0,o._)([(0,s.qq)({type:String,json:{write:f.w}})],m.prototype,"url",null),(0,o._)([(0,s.qq)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,s.qq)()],m.prototype,"data",null),(0,o._)([(0,p.G)("data")],m.prototype,"writeData",null),(0,o._)([(0,c.E)("data")],m.prototype,"readData",null),(0,o._)([(0,s.qq)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],m.prototype,"transparent",null),(0,o._)([(0,s.qq)({json:{write:!0}})],m.prototype,"wrap",void 0),(0,o._)([(0,s.qq)({readOnly:!0})],m.prototype,"contentHash",null),m=n=(0,o._)([(0,u.c)("esri.geometry.support.MeshTexture")],m);const y=m},56160:(e,t,r)=>{r.d(t,{c:()=>c});var n=r(41948),o=r(3856),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(12552));let l=class extends((0,o.q)(i.am)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,n._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,n._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,n._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,n._)([(0,s.c)("esri.geometry.support.MeshTextureTransform")],l);const c=l},41104:(e,t,r)=>{r.d(t,{c:()=>d});var n,o=r(41948),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(12552)),l=r(15008),c=r(87104),u=r(41512),p=r(2620),f=r(98472),h=r(62484),g=r(66952);let m=n=class extends i.am{constructor(e){super(e),this.translation=(0,h.Su)(),this.rotationAxis=(0,h.eu)(g.up),this.rotationAngle=0,this.scale=(0,h.WK)(1,1,1)}get rotation(){return(0,g.eE)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,h.ct)((0,g.Yz)(e)),this.rotationAngle=(0,g.i4)(e)}get localMatrix(){const e=(0,c.Su)();return(0,u.yG)(y,(0,g.Yz)(this.rotation),(0,g.kX)(this.rotation)),(0,l.um)(e,y,this.translation,this.scale),e}get localMatrixInverse(){return(0,l.S_)((0,c.Su)(),this.localMatrix)}applyLocal(e,t){return(0,f.e)(t,e,this.localMatrix)}applyLocalInverse(e,t){return(0,f.e)(t,e,this.localMatrixInverse)}equals(e){return this===e||null!=e&&(0,l.sF)(this.localMatrix,e.localMatrix)}clone(){const e={translation:(0,h.ct)(this.translation),rotationAxis:(0,h.ct)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,h.ct)(this.scale)};return new n(e)}};(0,o._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],m.prototype,"translation",void 0),(0,o._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],m.prototype,"rotationAxis",void 0),(0,o._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0}})],m.prototype,"rotationAngle",void 0),(0,o._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],m.prototype,"scale",void 0),(0,o._)([(0,a.qq)()],m.prototype,"rotation",null),(0,o._)([(0,a.qq)()],m.prototype,"localMatrix",null),(0,o._)([(0,a.qq)()],m.prototype,"localMatrixInverse",null),m=n=(0,o._)([(0,s.c)("esri.geometry.support.MeshTransform")],m);const y=(0,p.Su)(),d=m},60003:(e,t,r)=>{r.d(t,{c:()=>h,s:()=>p});var n,o=r(41948),i=r(40504),a=r(62088),s=r(66360),l=r(1580),c=r(33392),u=r(12552);let p=n=class extends i.am{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return h(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},s.c.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&s.c.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),h(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},s.c.getLogger(this))}castUv(e){return h(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},s.c.getLogger(this))}castNormal(e){return h(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},s.c.getLogger(this))}castTangent(e){return h(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},s.c.getLogger(this))}clone(){const e={position:(0,a.ct)(this.position),uv:(0,a.ct)(this.uv),normal:(0,a.ct)(this.normal),tangent:(0,a.ct)(this.tangent),color:(0,a.ct)(this.color)};return new n(e)}clonePositional(){const e={position:(0,a.ct)(this.position),normal:(0,a.ct)(this.normal),tangent:(0,a.ct)(this.tangent),uv:this.uv,color:this.color};return new n(e)}get memoryUsage(){let e=0;return e+=this.position.byteLength,null!=this.uv&&(e+=this.uv.byteLength),null!=this.normal&&(e+=this.normal.byteLength),null!=this.tangent&&(e+=this.tangent.byteLength),null!=this.color&&(e+=this.color.byteLength),e}};function f(e,t,r,n){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(n.error(o,`Invalid array length, expected a multiple of ${i}`),new r([])):e}function h(e,t,r,n,o){if(!e)return e;if(e instanceof t)return f(e,n,t,o);for(const i of r)if(e instanceof i)return f(new t(e),n,t,o);if(Array.isArray(e))return f(new t(e),n,t,o);{const n=r.map((e=>`'${e.name}'`));return o.error(`Failed to set property, expected one of ${n}, but got ${e.constructor.name}`),new t([])}}function g(e,t,r){t[r]=function(e){const t=new Array(e.length);for(let r=0;r<e.length;r++)t[r]=e[r];return t}(e)}(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"color",void 0),(0,o._)([(0,c.W)("color")],p.prototype,"castColor",null),(0,o._)([(0,l.qq)({nonNullable:!0,json:{write:g}})],p.prototype,"position",void 0),(0,o._)([(0,c.W)("position")],p.prototype,"castPosition",null),(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"uv",void 0),(0,o._)([(0,c.W)("uv")],p.prototype,"castUv",null),(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"normal",void 0),(0,o._)([(0,c.W)("normal")],p.prototype,"castNormal",null),(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"tangent",void 0),(0,o._)([(0,c.W)("tangent")],p.prototype,"castTangent",null),p=n=(0,o._)([(0,u.c)("esri.geometry.support.MeshVertexAttributes")],p)},66952:(e,t,r)=>{r.d(t,{GA:()=>h,Gc:()=>p,Su:()=>c,Yz:()=>g,eE:()=>u,i4:()=>m,kX:()=>y,up:()=>x});var n=r(53648),o=r(15008),i=r(41512),a=r(2620),s=r(98472),l=r(62484);function c(e=x){return[e[0],e[1],e[2],e[3]]}function u(e,t,r=c()){return(0,s.c)(r,e),r[3]=t,r}function p(e,t=c()){const r=(0,o.ir)(v,e);return d(t,(0,n.UB)((0,i.C0)(t,r))),t}function f(e,t,r=c()){return(0,i.yG)(v,e,y(e)),(0,i.yG)(w,t,y(t)),(0,i.iW)(v,w,v),d(r,(0,n.UB)((0,i.C0)(r,v)))}function h(e,t,r,n=c()){return u(l.UV,e,A),u(l.IR,t,b),u(l.wx,r,_),f(A,b,A),f(A,_,n),n}function g(e){return e}function m(e){return e[3]}function y(e){return(0,n.EF)(e[3])}function d(e,t){return e[3]=t,e}r(37008);const x=[0,0,1,0],v=(0,a.Su)(),w=(0,a.Su)(),A=(c(),c()),b=c(),_=c()},54264:(e,t,r)=>{r.d(t,{CT:()=>x,Ki:()=>d,Si:()=>s,Ud:()=>c,_o:()=>m,ai:()=>l,mK:()=>v,v_:()=>g});var n=r(2600),o=r(92400),i=r(10860),a=r(4048);class s{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,o.yK)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,i.wp)(e),new Blob(r)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,n.c)(this.partUrl,{responseType:"blob"});return(0,i.wp)(e),t}}function c(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function u(e){return!!Array.isArray(e)&&e.every((e=>e instanceof s))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return p.test(t)||f.test(r)}return p.test(e.assetMimeType)||f.test(e.assetName)}function g(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){if(Array.isArray(e)){const r=e;return r.length>0&&r.every((e=>y(e,t)))}return y(e,t)}(r,t)}function m(e,t){if(e===t)return!0;const{source:r}=e,{source:n}=t;if(r===n)return!0;if(u(r)&&u(n)){if(r.length!==n.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),o=[...n].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(o[e]))return!1;return!0}return!1}function y(e,t){return e instanceof s&&e.isOnService(t)}function d(e,t){return e instanceof File?(0,a.K0)(e,t):(0,a.me)(e.assetMimeType,t)??(0,a.If)(e.assetName,t)}function x(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},77080:(e,t,r)=>{r.d(t,{g:()=>i});var n=r(53648),o=r(97143);function i(e,t,r){const i=Array.isArray(e),u=i?e.length/t:e.byteLength/(4*t),p=i?e:new Uint32Array(e,0,u*t),f=r?.minReduction??0,h=r?.originalIndices||null,g=h?h.length:0,m=r?.componentOffsets||null;let y=0;if(m)for(let e=0;e<m.length-1;e++){const t=m[e+1]-m[e];t>y&&(y=t)}else y=u;const d=Math.floor(1.1*y)+1;(null==c||c.length<2*d)&&(c=new Uint32Array((0,n.w7)(2*d)));for(let e=0;e<2*d;e++)c[e]=0;let x=0;const v=!!m&&!!h,w=v?g:u;let A=(0,o.aw)(u);const b=new Uint32Array(g),_=1.96;let S=0!==f?Math.ceil(4*_*_/(f*f)*f*(1-f)):w,T=1,q=m?m[1]:w;for(let e=0;e<w;e++){if(e===S){const t=1-x/e;if(t+_*Math.sqrt(t*(1-t)/e)<f)return null;S*=2}if(e===q){for(let e=0;e<2*d;e++)c[e]=0;if(h)for(let e=m[T-1];e<m[T];e++)b[e]=A[h[e]];q=m[++T]}const r=v?h[e]:e,n=r*t,o=l(p,n,t);let i=o%d,s=x;for(;0!==c[2*i+1];){if(c[2*i]===o){const e=c[2*i+1]-1;if(a(p,n,e*t,t)){s=A[e];break}}i++,i>=d&&(i-=d)}s===x&&(c[2*i]=o,c[2*i+1]=r+1,x++),A[r]=s}if(0!==f&&1-x/u<f)return null;if(v){for(let e=m[T-1];e<b.length;e++)b[e]=A[h[e]];A=(0,o.Uv)(b)}const M=i?new Array(x):new Uint32Array(x*t);x=0;for(let e=0;e<w;e++)A[e]===x&&(s(p,(v?h[e]:e)*t,M,x*t,t),x++);if(h&&!v){const e=new Uint32Array(g);for(let t=0;t<e.length;t++)e[t]=A[h[t]];A=(0,o.Uv)(e)}return{buffer:Array.isArray(M)?M:M.buffer,indices:A,uniqueCount:x}}function a(e,t,r,n){for(let o=0;o<n;o++)if(e[t+o]!==e[r+o])return!1;return!0}function s(e,t,r,n,o){for(let i=0;i<o;i++)r[n+i]=e[t+i]}function l(e,t,r){let n=0;for(let o=0;o<r;o++)n=e[t+o]+n|0,n=n+(n<<11)+(n>>>2)|0;return n>>>0}let c=null},71488:(e,t,r)=>{r.d(t,{Kk:()=>s,QL:()=>l,yO:()=>a});var n=r(26832),o=r(66360),i=r(21136);function a(e,t){return e.isGeographic||e.isWebMercator&&(t??!0)}function s(e,t){switch(e.type){case"georeferenced":return t.isGeographic;case"local":return t.isGeographic||t.isWebMercator}}function l(e,t,r,a){if(void 0!==a){(0,n.O2)(o.c.getLogger(e),"option: geographic",{replacement:"use mesh vertexSpace and spatial reference to control how operations are performed",version:"4.29",warnOnce:!0});const s="local"===t.type;if(!(0,i.k$)(t)||a===s)return r.isGeographic||r.isWebMercator&&a;o.c.getLogger(e).warnOnce(`Specifying the 'geographic' parameter (${a}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}return s(t,r)}},54828:(e,t,r)=>{r.d(t,{CE:()=>A,EX:()=>_,_0:()=>P,_S:()=>b,iS:()=>T,mC:()=>M,project:()=>q,qu:()=>R});var n=r(24296),o=r(68612),i=r(15008),a=r(87104),s=r(98472),l=r(62484),c=r(77556),u=r(60074),p=r(82448),f=r(51120),h=r(62880),g=r(15688),m=r(41104),y=r(21136),d=r(48952),x=r(71488),v=r(38496);function w(e,t,r){return(0,x.yO)(t.spatialReference,r?.geographic)?M(e,t,!1,r):function(e,t,r){const n=new Float64Array(e.position.length),o=e.position,i=t.x,a=t.y,s=t.z??0,l=P(r?r.unit:null,t.spatialReference);for(let e=0;e<o.length;e+=3)n[e]=o[e]*l+i,n[e+1]=o[e+1]*l+a,n[e+2]=o[e+2]*l+s;return{position:n,normal:e.normal,tangent:e.tangent}}(e,t,r)}function A(e,t=a.IJ){const{position:r,normal:n,tangent:o}=e;return{position:(0,d.a)(new Float64Array(r.length),r,t),normal:null!=n?(0,v.W4)(n,new Float32Array(n.length),t):null,tangent:null!=o?(0,v.AT)(o,new Float32Array(o.length),t):null}}function b(e,t,r,n){const{position:o,normal:i,tangent:a}=e;if(!(0,y.k$)(t))return{position:o,normal:i,tangent:a};const s=(0,y.mA)(t,n);return w(A(e,r?.localMatrix),s,{geographic:"local"===t.type})}function _(e,t,r){const n=(0,y.Al)(t,r),o=t.spatialReference,i=(0,y.k$)(n);if(!i)return{vertexAttributes:w(e,t,r),vertexSpace:n,transform:null};const{position:a,normal:s,tangent:l}=e,c=(0,x.Kk)(n,o);switch(n.type){case"georeferenced":return c?{vertexAttributes:M(e,t,i,r),vertexSpace:n,transform:null}:{vertexAttributes:{position:a,normal:s,tangent:l},vertexSpace:n,transform:new m.c};case"local":return{vertexAttributes:{position:a,normal:s,tangent:l},vertexSpace:n,transform:new m.c}}}function S(e,t,r){return(0,x.yO)(t.spatialReference,r?.geographic)?R(e,t,r):F(e,t,r)}function T(e,t,r,n,o){if(!(0,y.k$)(t))return S(e,n,o);const{spatialReference:i}=n,a=b(e,t,r,i);return n.equals((0,y.mA)(t,i))?F(a,n,o):S(a,n,o)}function q({positions:e,transform:t,vertexSpace:r,inSpatialReference:n,outSpatialReference:o,outPositions:c,localMode:m}){const y=r.origin??l.cX,x=null!=r.origin?t?.localMatrix??a.IJ:a.IJ;if("georeferenced"===r.type){const t=c??(0,g.Gg)(e.length);if((0,i.yK)(x,a.IJ)?(0,g.mw)(t,e):(0,d.a)(t,e,x),!(0,s.j)(y,l.cX)){const[e,r,n]=y;for(let o=0;o<t.length;o+=3)t[o]+=e,t[o+1]+=r,t[o+2]+=n}return(0,h.projectBuffer)(t,n,0,t,o,0,t.length/3),t}let v=n;const w=(0,p._s)(n);v=o.isWebMercator&&m||!(0,u.canProjectWithoutEngine)(n,w)?v:w,(0,f.y)(n,y,I,v),(0,i.iW)(I,I,x);const A=c??(0,g.Gg)(e.length);return(0,d.a)(A,e,I),(0,h.projectBuffer)(A,v,0,A,o,0,A.length/3),A}function M(e,t,r,n){const o=t.spatialReference,i=C(t,n,I),a=new Float64Array(e.position.length),s=function(e,t,r,n){(0,d.a)(n,e,t);const o=new Float64Array(e.length);return(0,v.o$)(n,o,r)}(e.position,i,o,a),l=(0,c.yy)(N,i),u=function(e,t,r,n,o){if(null==r)return null;const i=new Float32Array(r.length);return(0,d.b)(i,r,n),(0,v.QP)(i,e,t,o,i),i}(s,a,e.normal,l,o),p=function(e,t,r,n,o){if(null==r)return null;const i=new Float32Array(r.length);(0,d.b)(i,r,n,4);for(let e=3;e<i.length;e+=4)i[e]=r[e];return(0,v.Cr)(i,e,t,o,i),i}(s,a,e.tangent,l,o);if(r){const{x:e,y:r,z:n}=t;(0,d.t)(s,s,[-e,-r,-(n??0)])}return{position:s,normal:u,tangent:p}}function F(e,t,r){const n=new Float64Array(e.position.length),o=e.position,i=t.x,a=t.y,s=t.z??0,l=P(r?r.unit:null,t.spatialReference);for(let e=0;e<o.length;e+=3)n[e]=(o[e]-i)/l,n[e+1]=(o[e+1]-a)/l,n[e+2]=(o[e+2]-s)/l;return{position:n,normal:e.normal,tangent:e.tangent}}function R(e,t,r){const n=t.spatialReference;C(t,r,I);const o=(0,i.S_)(k,I),a=new Float64Array(e.position.length),s=function(e,t,r,n){const o=(0,v.K_)(e,t,n),i=new Float64Array(o.length);return(0,d.a)(i,o,r),i}(e.position,n,o,a),l=(0,c.yy)(N,o);return{position:s,normal:j(e.normal,e.position,a,n,l),tangent:L(e.tangent,e.position,a,n,l)}}function C(e,t,r){(0,f.y)(e.spatialReference,[e.x,e.y,e.z??0],r,(0,p._s)(e.spatialReference));const n=P(t?t.unit:null,e.spatialReference);return(0,i.aU)(r,r,[n,n,n]),r}function j(e,t,r,n,o){if(null==e)return null;const i=(0,v.cH)(e,t,r,n,new Float32Array(e.length));return(0,d.b)(i,i,o),i}function L(e,t,r,n,o){if(null==e)return null;const i=(0,v.GW)(e,t,r,n,new Float32Array(e.length));return(0,d.b)(i,i,o,4),i}function P(e,t){if(null==e)return 1;const r=(0,n.eg)(t);return 1/(0,n.ck)(r,"meters",e)}const I=(0,a.Su)(),k=(0,a.Su)(),N=(0,o.Su)()},38496:(e,t,r)=>{r.d(t,{AT:()=>b,Cr:()=>S,GW:()=>_,K_:()=>v,QP:()=>x,W4:()=>A,cH:()=>d,o$:()=>w});var n=r(66360),o=r(77556),i=r(68612),a=r(87104),s=r(98472),l=r(62484),c=r(82448),u=r(51120),p=r(62880),f=r(60544),h=r(29120),g=r(71004),m=r(48952);const y=()=>n.c.getLogger("esri.geometry.support.meshUtils.normalProjection");function d(e,t,r,n,o){return q(n)?(T(F.TO_PCPF,g.Yj.fromTypedArray(e),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o)),o):(y().error("Cannot convert spatial reference to PCPF"),o)}function x(e,t,r,n,o){return q(n)?(T(F.FROM_PCPF,g.Yj.fromTypedArray(e),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o)),o):(y().error("Cannot convert to spatial reference from PCPF"),o)}function v(e,t,r){return(0,p.projectBuffer)(e,t,0,r,(0,c._s)(t),0,e.length/3),r}function w(e,t,r){return(0,p.projectBuffer)(e,(0,c._s)(r),0,t,r,0,e.length/3),t}function A(e,t,r){return(0,o.yy)(P,r),(0,m.b)(t,e,P),(0,o.QT)(P)||(0,m.n)(t,t),t}function b(e,t,r){if((0,o.yy)(P,r),(0,m.b)(t,e,P,4),(0,o.QT)(P)||(0,m.n)(t,t,4),e!==t)for(let r=3;r<e.length;r+=4)t[r]=e[r];return t}function _(e,t,r,n,o){if(!q(n))return y().error("Cannot convert spatial reference to PCPF"),o;T(F.TO_PCPF,g.Yj.fromTypedArray(e,4*Float32Array.BYTES_PER_ELEMENT),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let t=3;t<e.length;t+=4)o[t]=e[t];return o}function S(e,t,r,n,o){if(!q(n))return y().error("Cannot convert to spatial reference from PCPF"),o;T(F.FROM_PCPF,g.Yj.fromTypedArray(e,16),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o,16));for(let t=3;t<e.length;t+=4)o[t]=e[t];return o}function T(e,t,r,n,i,a){if(!t)return;const l=r.count,p=(0,c._s)(i);if(M(i))for(let r=0;r<l;r++)n.getVec(r,C),t.getVec(r,j),(0,u.y)(p,C,L,p),(0,o.kr)(P,L),e===F.FROM_PCPF&&(0,o.oL)(P,P),(0,s.t)(j,j,P),a.setVec(r,j);else for(let i=0;i<l;i++){n.getVec(i,C),t.getVec(i,j),(0,u.y)(p,C,L,p),(0,o.kr)(P,L);const l=(0,h.MB)(r.get(i,1));let c=Math.cos(l);e===F.TO_PCPF&&(c=1/c),P[0]*=c,P[1]*=c,P[2]*=c,P[3]*=c,P[4]*=c,P[5]*=c,e===F.FROM_PCPF&&(0,o.oL)(P,P),(0,s.t)(j,j,P),(0,s.n)(j,j),a.setVec(i,j)}return a}function q(e){return M(e)||function(e){return e.isWebMercator}(e)}function M(e){return e.isWGS84||(0,f.Ub)(e)||(0,f.qg)(e)||(0,f.UB)(e)}var F,R;(R=F||(F={}))[R.TO_PCPF=0]="TO_PCPF",R[R.FROM_PCPF=1]="FROM_PCPF";const C=(0,l.Su)(),j=(0,l.Su)(),L=(0,a.Su)(),P=(0,i.Su)()},21136:(e,t,r)=>{r.d(t,{Al:()=>g,GF:()=>m,_c:()=>f,k$:()=>p,mA:()=>h,mm:()=>y,wX:()=>u});var n=r(26832),o=r(66360),i=r(67776),a=r(51232),s=r(13708),l=r(48952);function c(){return o.c.getLogger("esri.geometry.Mesh")}function u(e){const{vertexSpace:t}=e;if(null!=t.origin)return e.clone();const{anchor:r}=e,n=r.clone(),o=new a.c({origin:[n.x,n.y,n.z]}),i=e.cloneWithVertexSpace(o),{position:s}=i.vertexAttributes;return i.vertexAttributes.position=(0,l.t)(new Float64Array(s.length),s,[-n.x,-n.y,-(n.z??0)]),i.vertexAttributesChanged(),i}function p(e){return null!=e.origin}function f(e){return p(e.vertexSpace)}function h(e,t){if(!p(e))return null;const[r,n,o]=e.origin;return new i.c({x:r,y:n,z:o,spatialReference:t})}function g(e,t){const{x:r,y:o,z:i,spatialReference:l}=e,u=[r,o,i??0];if(void 0!==t?.geographic){if((0,n.O2)(c(),"option: geographic",{replacement:"use vertexSpace option instead",version:"4.29",warnOnce:!0}),!t?.vertexSpace)return t?.geographic?new s.c({origin:u}):new a.c({origin:u});c().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")}if(!t?.vertexSpace)return l.isGeographic||l.isWebMercator?new s.c({origin:u}):new a.c({origin:u});switch(t.vertexSpace){case"local":return new s.c({origin:u});case"georeferenced":return new a.c({origin:u});case"georeferenced-absolute":return new a.c}}function m(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function y(e,t){return"local"===e?new s.c({origin:t}):new a.c({origin:t})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9780,4828],{17012:(e,t,r)=>{r.d(t,{e:()=>l});var n,o,i,a=r(8528),s={exports:{}};n=s,o=function(){function e(e,r,o){o=o||2;var i,a,s,c,u,p,f,h=r&&r.length,g=h?r[0]*o:e.length,m=t(e,0,g,o,!0),y=[];if(!m||m.next===m.prev)return y;if(h&&(m=l(e,r,m,o)),e.length>80*o){i=s=e[0],a=c=e[1];for(var d=o;d<g;d+=o)(u=e[d])<i&&(i=u),(p=e[d+1])<a&&(a=p),u>s&&(s=u),p>c&&(c=p);f=0!==(f=Math.max(s-i,c-a))?1/f:0}return n(m,y,o,i,a,f),y}function t(e,t,r,n,o){var i,a;if(o===F(e,t,r,n)>0)for(i=t;i<r;i+=n)a=T(i,e[i],e[i+1],a);else for(i=r-n;i>=t;i-=n)a=T(i,e[i],e[i+1],a);if(a&&v(a,a.next)){var s=a.next;q(a),a=s}return a}function r(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==x(n.prev,n,n.next))n=n.next;else{var o=n.prev;if(q(n),(n=t=o)===n.next)break;r=!0}}while(r||n!==t);return t}function n(e,t,l,c,u,p,f){if(e){!f&&p&&h(e,c,u,p);for(var g,m,y=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),q(e),e=m.next,y=m.next;else if((e=m)===y){f?1===f?n(e=a(r(e),t,l),t,l,c,u,p,2):2===f&&s(e,t,l,c,u,p):n(r(e),t,l,c,u,p,1);break}}}function o(e){var t=e.prev,r=e,n=e.next;if(x(t,r,n)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(y(t.x,t.y,r.x,r.y,n.x,n.y,o.x,o.y)&&x(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(e,t,r,n){var o=e.prev,i=e,a=e.next;if(x(o,i,a)>=0)return!1;for(var s=o.x<i.x?o.x<a.x?o.x:a.x:i.x<a.x?i.x:a.x,l=o.y<i.y?o.y<a.y?o.y:a.y:i.y<a.y?i.y:a.y,c=o.x>i.x?o.x>a.x?o.x:a.x:i.x>a.x?i.x:a.x,u=o.y>i.y?o.y>a.y?o.y:a.y:i.y>a.y?i.y:a.y,p=g(s,l,t,r,n),f=g(c,u,t,r,n),h=e.prevZ,m=e.nextZ;h&&h.z>=p&&m&&m.z<=f;){if(h!==e.prev&&h!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,h.x,h.y)&&x(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,m!==e.prev&&m!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;h&&h.z>=p;){if(h!==e.prev&&h!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,h.x,h.y)&&x(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;m&&m.z<=f;){if(m!==e.prev&&m!==e.next&&y(o.x,o.y,i.x,i.y,a.x,a.y,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function a(e,t,n){var o=e;do{var i=o.prev,a=o.next.next;!v(i,a)&&w(i,o,o.next,a)&&_(i,a)&&_(a,i)&&(t.push(i.i/n),t.push(o.i/n),t.push(a.i/n),q(o),q(o.next),o=e=a),o=o.next}while(o!==e);return r(o)}function s(e,t,o,i,a,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&d(l,c)){var u=S(l,c);return l=r(l,l.next),u=r(u,u.next),n(l,t,o,i,a,s),void n(u,t,o,i,a,s)}c=c.next}l=l.next}while(l!==e)}function l(e,n,o,i){var a,s,l,u=[];for(a=0,s=n.length;a<s;a++)(l=t(e,n[a]*i,a<s-1?n[a+1]*i:e.length,i,!1))===l.next&&(l.steiner=!0),u.push(m(l));for(u.sort(c),a=0;a<u.length;a++)o=r(o=p(u[a],o),o.next);return o}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const r=t.next;if(r.prev===t||r===t||r===e)break;t=r}return t}function p(e,t){var n=function(e,t){var r,n=t,o=e.x,i=e.y,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=o&&s>a){if(a=s,s===o){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!r)return null;if(o===a)return r;var l,c=r,u=r.x,p=r.y,h=1/0;n=r;do{o>=n.x&&n.x>=u&&o!==n.x&&y(i<p?o:a,i,u,p,i<p?a:o,i,n.x,n.y)&&(l=Math.abs(i-n.y)/(o-n.x),_(n,e)&&(l<h||l===h&&(n.x>r.x||n.x===r.x&&f(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(e,t);if(!n)return t;var o=S(n,e),i=r(n,n.next);let a=u(o);return r(a,a.next),i=u(i),u(t===n?i:t)}function f(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function h(e,t,r,n){var o=e;do{null===o.z&&(o.z=g(o.x,o.y,t,r,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,r,n,o,i,a,s,l,c=1;do{for(r=e,e=null,i=null,a=0;r;){for(a++,n=r,s=0,t=0;t<c&&(s++,n=n.nextZ);t++);for(l=c;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(o=r,r=r.nextZ,s--):(o=n,n=n.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(a>1)}(o)}function g(e,t,r,n,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function m(e){var t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function y(e,t,r,n,o,i,a,s){return(o-a)*(t-s)-(e-a)*(i-s)>=0&&(e-a)*(n-s)-(r-a)*(t-s)>=0&&(r-a)*(i-s)-(o-a)*(n-s)>=0}function d(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&w(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(_(e,t)&&_(t,e)&&function(e,t){var r=e,n=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||v(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,r,n){var o=b(x(e,t,r)),i=b(x(e,t,n)),a=b(x(r,n,e)),s=b(x(r,n,t));return o!==i&&a!==s||!(0!==o||!A(e,r,t))||!(0!==i||!A(e,n,t))||!(0!==a||!A(r,e,n))||!(0!==s||!A(r,t,n))}function A(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function b(e){return e>0?1:e<0?-1:0}function _(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function S(e,t){var r=new M(e.i,e.x,e.y),n=new M(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function T(e,t,r,n){var o=new M(e,t,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function q(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 M(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function F(e,t,r,n){for(var o=0,i=t,a=r-n;i<r;i+=n)o+=(e[a]-e[i])*(e[i+1]+e[a+1]),a=i;return o}return e.deviation=function(e,t,r,n){var o=t&&t.length,i=o?t[0]*r:e.length,a=Math.abs(F(e,0,i,r));if(o)for(var s=0,l=t.length;s<l;s++){var c=t[s]*r,u=s<l-1?t[s+1]*r:e.length;a-=Math.abs(F(e,c,u,r))}var p=0;for(s=0;s<n.length;s+=3){var f=n[s]*r,h=n[s+1]*r,g=n[s+2]*r;p+=Math.abs((e[f]-e[g])*(e[h+1]-e[f+1])-(e[f]-e[h])*(e[g+1]-e[f+1]))}return 0===a&&0===p?0:Math.abs((p-a)/a)},e.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var a=0;a<t;a++)r.vertices.push(e[o][i][a]);o>0&&(n+=e[o-1].length,r.holes.push(n))}return r},e},void 0!==(i=o())&&(n.exports=i);const l=(0,a.g)(s.exports)},63316:(e,t,r)=>{r.d(t,{AD:()=>p,wV:()=>u});var n=r(2600),o=r(20744),i=r(10860),a=r(28176),s=r(49416);let l=null,c=!0;function u(e,t,r,n){if(!t||!r)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,r)}catch(e){c=!1}const o=function(e,t,r){return r||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),r=l),r.getContext("2d").createImageData(e,t)}(t,r,n);return o.data.set(e,0),o}async function p(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const r=(0,a.nV)(e);if(r?.isBase64)return{arrayBuffer:(0,s.K)(r.data),mediaType:r.mediaType};const o=await(0,n.c)(e,{responseType:"array-buffer",...t});return{arrayBuffer:o.data,mediaType:o.getHeader?.("Content-Type")??""}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:n}=await r.e(8560).then(r.bind(r,68560));if(e(l))return n(l,t)}if(u){const{isAnimatedPNG:e,parseApng:n}=await r.e(4464).then(r.bind(r,84464));if(e(l))return n(l,t)}return async function(e,t){const r=window.URL.createObjectURL(e);try{const{data:e}=await(0,n.c)(r,{...t,responseType:"image"});return e}catch(e){if(!(0,i.mA)(e))throw new o.c("invalid-image",`Could not fetch requested image at ${r}`);throw e}finally{window.URL.revokeObjectURL(r)}}(new Blob([l],{type:c}),t)}},39780:(e,t,r)=>{r.d(t,{c:()=>Xe});var n=r(41948),o=r(26832),i=r(20744),a=r(95800),s=r(66360),l=r(94804),c=r(10860),u=r(57896),p=r(1580),f=(r(9456),r(72052),r(12552)),h=r(62484),g=r(95247),m=r(50853),y=r(67776),d=r(7488),x=r(66952),v=r(43912);const w="Expected location to be a Point instance";class A extends i.c{constructor(){super("invalid-input:location",w)}}var b=r(51232),_=r(13708),S=r(41104),T=r(82384),q=r(21136),M=r(17012),F=r(82315),R=r(47452),C=r(15688),j=r(97143),L=r(77080),P=(r(60708),r(53648)),I=r(24296),k=r(98472),N=r(58632);r(89560),r(74376),r(71520),r(4636);const O=(0,N.Su)();function U(e,t,r,n,o,i,a){o*=3;for(let s=0;s<i;++s){const i=e[t];n[o++]=i[0],n[o++]=i[1],n[o++]=a?i[2]:0,t+=r}return o/3}function W(e,t,r){if(t){const t=function(e,t,r){const n=function(e,t,r,n){const o=(e=>!Array.isArray(e[0]))(t)?(e,r)=>t[3*e+r]:(e,r)=>t[e][r],i=n?(0,I.k8)(n)/(0,I.gl)(n):1;return(0,N.XX)(e,((e,t)=>(0,k.s)(e,o(t,0)*i,o(t,1)*i,o(t,2))),r)}(O,e,t,r)?(0,N.Oq)(O):[0,0,1];return Math.abs(n[2])>Math.cos((0,P.EF)(80))?F.k.Z:Math.abs(n[1])>Math.abs(n[0])?F.k.Y:F.k.X}(e,e.length-1,r);if(t===F.k.X)return!(0,R.K_)(e,F.k.Y,F.k.Z);if(t===F.k.Y)return!(0,R.K_)(e,F.k.X,F.k.Z)}return!(0,R.K_)(e,F.k.X,F.k.Y)}var E,D;(D=E||(E={}))[D.NONE=0]="NONE",D[D.CCW_IS_HOLE=1]="CCW_IS_HOLE";var $=r(77048),z=r(54828);let G=null;function B(e){if(0===e.length)return $.UN;const t=(0,$.Su)([Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,-Number.POSITIVE_INFINITY,-Number.POSITIVE_INFINITY,-Number.POSITIVE_INFINITY]);return(0,$.qe)(t,e),t}function Y(e,t){const[r,n,o,i,a,s]=B(e);return new g.c({xmin:r,ymin:n,zmin:o,xmax:i,ymax:a,zmax:s,spatialReference:t})}var Z=r(93184),H=r(71488);const V="esri.geometry.support.meshUtils.centerAt";const K=(0,h.Su)(),X=(0,h.Su)(),Q=(0,h.Su)();var J=r(28176);function ee(e){const t=(0,J.iu)(e.url);return r=>{const n=(0,J.SU)(r,t,t),o=n?n.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??r}}function te(e){return se.fromBlob(e,le(e.name,e.type))}const re=/^model\/gltf\+json$/,ne=/^model\/gltf-binary$/,oe=/\.gltf$/i,ie=/\.glb$/i;function ae(e){const t=new Map;let r,n=null;for(const{name:o,mimeType:i,source:a}of e)null===n&&(re.test(i)||oe.test(o)?(n=a.url,r="gltf"):(ne.test(i)||ie.test(o))&&(n=a.url,r="glb")),t.set(o,a.url),a.files.forEach(((e,r)=>t.set(r,e)));if(null==n)throw new i.c("mesh-load-external:missing-files","Missing files to load external mesh source");return new se(n,(()=>e.forEach((({source:e})=>e.dispose()))),t,r)}class se{constructor(e,t=(()=>{}),r=new Map,n){this.url=e,this.dispose=t,this.files=r,this.type=n}static fromBlob(e,t){const r=URL.createObjectURL(e);return new se(r,(()=>URL.revokeObjectURL(r)),void 0,t)}}function le(e,t){return re.test(t)||oe.test(e)?"gltf":ne.test(t)||oe.test(e)?"glb":void 0}var ce=r(3856),ue=r(2952),pe=r(54264);let fe=class extends ce.m{constructor(){super(),this.externalSources=new ue.c,this._explicitDisplaySource=null,this.addHandles((0,u.on)((()=>this.externalSources),"after-remove",(({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)}),{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,pe.Ud)(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,pe._o)(t,e)))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,pe.v_)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(pe.Ud)}};(0,n._)([(0,p.qq)()],fe.prototype,"externalSources",void 0),(0,n._)([(0,p.qq)()],fe.prototype,"displaySource",null),(0,n._)([(0,p.qq)()],fe.prototype,"_implicitDisplaySource",null),(0,n._)([(0,p.qq)()],fe.prototype,"_explicitDisplaySource",void 0),fe=(0,n._)([(0,f.c)("esri.geometry.support.meshUtils.Metadata")],fe);var he=r(68612);const ge={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 me(e,t,r){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null!=t){ve[0]=t[0],ve[4]=t[1],ve[8]=t[2];for(let t=0;t<e.position.length;t+=3){for(let r=0;r<3;r++)xe[r]=e.position[t+r];(0,k.t)(xe,xe,ve);for(let r=0;r<3;r++)e.position[t+r]=xe[r]}if(t[0]!==t[1]||t[1]!==t[2]){ve[0]=1/t[0],ve[4]=1/t[1],ve[8]=1/t[2];for(let t=0;t<e.normal.length;t+=3){for(let r=0;r<3;r++)xe[r]=e.normal[t+r];(0,k.t)(xe,xe,ve),(0,k.n)(xe,xe);for(let r=0;r<3;r++)e.normal[t+r]=xe[r]}}}}(e,function(e,t,r){const n=(0,z._0)(t,r);if(null==e&&1===n)return null;if(null==e)return[n,n,n];if("number"==typeof e){const t=e*n;return[t,t,t]}return[null!=e.width?e.width*n:n,null!=e.depth?e.depth*n:n,null!=e.height?e.height*n:n]}(r?.size,r?.unit,t.spatialReference));const{vertexAttributes:n,vertexSpace:o,transform:i}=(0,z.EX)(e,t,{vertexSpace:r?.vertexSpace,geographic:r?.geographic});return{vertexAttributes:new T.s({...n,uv:e.uv}),vertexSpace:o,transform:i,components:[new v.c({faces:e.faces,material:r?.material||null})],spatialReference:t.spatialReference}}const ye={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,h.Su)(),ve=(0,he.Su)();var we=r(77556),Ae=r(15008),be=r(87104),_e=r(41512),Se=r(2620),Te=r(82448),qe=r(51120),Me=r(38496);function Fe(e,t,{vertexSpace:r,spatialReference:n}){if("georeferenced"===r.type){const o=e;if(!(0,Z.M)(t,o,n))return!1;const{origin:i}=r;return(0,k.f)(e,o,i),!0}const o=(0,Te._s)(n),i=e;if(!(0,Z.M)(t,i,o))return!1;const{origin:a}=r,s=Re;if(!(0,qe.y)(n,a,s,o))return!1;const l=(0,Ae.S_)(Re,s);return null!=l&&((0,k.e)(e,i,l),!0)}const Re=(0,be.Su)(),Ce="esri.geometry.support.meshUtils.rotate";function je(e,t,r,n=h.cX){if(null!=e){(0,Ae.IT)(ke,(0,x.kX)(t),(0,x.Yz)(t));for(let t=0;t<e.length;t+=r){for(let r=0;r<3;r++)Le[r]=e[t+r]-n[r];(0,k.e)(Le,Le,ke);for(let r=0;r<3;r++)e[t+r]=Le[r]+n[r]}}}const Le=(0,h.Su)(),Pe=(0,be.Su)(),Ie=(0,x.Su)(),ke=(0,be.Su)(),Ne=(0,he.Su)(),Oe=(0,h.Su)(),Ue=(0,Se.Su)(),We="esri.geometry.support.meshUtils.scale";function Ee(e,t,r=h.cX){if(e)for(let n=0;n<e.length;n+=3){for(let t=0;t<3;t++)De[t]=e[n+t]-r[t];(0,k.h)(De,De,t);for(let t=0;t<3;t++)e[n+t]=De[t]+r[t]}}const De=(0,h.Su)(),$e=(0,h.Su)(),ze=(0,be.Su)(),Ge=(0,h.Su)();var Be;const Ye="esri.geometry.Mesh";function Ze(){return s.c.getLogger(Ye)}const He={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:b.c,local:_.c}};let Ve=Be=class extends(a.c.LoadableMixin((0,l.g)(m.c))){constructor(e){super(e),this.components=null,this.vertexSpace=new b.c,this.transform=null,this.metadata=new fe,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new T.s,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles((0,u.aE)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:r,vertexSpace:n}=this,o=r.position;if(0===o.length||e&&0===e.length)return new g.c({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if((0,q.k$)(n)){const{_untransformedBounds:e,transform:r}=this;return function([e,t,r,n,o,i],a,s,l){G??=new Float64Array(24);const c=G;return c[0]=e,c[1]=t,c[2]=r,c[3]=e,c[4]=o,c[5]=r,c[6]=n,c[7]=o,c[8]=r,c[9]=n,c[10]=t,c[11]=r,c[12]=e,c[13]=t,c[14]=i,c[15]=e,c[16]=o,c[17]=i,c[18]=n,c[19]=o,c[20]=i,c[21]=n,c[22]=t,c[23]=i,(0,z.project)({positions:c,transform:a,vertexSpace:s,inSpatialReference:l,outSpatialReference:l,outPositions:c}),Y(c,l)}(e,r,n,t)}return Y(o,t)}get _untransformedBounds(){return B(this.vertexAttributes.position)}get anchor(){const e=(0,q.mA)(this.vertexSpace,this.spatialReference);if(null!=e)return e;const{center:t,zmin:r}=this._transformedExtent;return new y.c({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get origin(){const e=(0,q.mA)(this.vertexSpace,this.spatialReference);return null!=e?e:this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(v.c.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}Ze().error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,r,n){return(0,x.GA)(e,t,r,Ke),function(e,t,r){if(!e.vertexAttributes?.position||0===t[3])return;const{spatialReference:n,vertexSpace:o}=e,i=r?.origin??e.anchor,a=r?.geographic,l=(0,H.QL)(Ce,o,n,a);(0,q._c)(e)?function(e,t,r){e.transform??=new S.c;const{vertexSpace:n,transform:o,spatialReference:i}=e,[a,l,c]=n.origin,u=new y.c({x:a,y:l,z:c,spatialReference:i}),p=Le;if(u.equals(r))(0,k.s)(p,0,0,0);else if(!Fe(p,r,e))return void s.c.getLogger(Ce).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh (wkid:${i.wkid}) ${n.type} vertex space. Projection may be possible after calling projection.load().`);(0,_e.yG)(Ue,(0,x.Yz)(t),(0,x.kX)(t));const f=(0,Ae.WP)(Pe,Ue,h.cX,h.Qw,p),{localMatrix:g}=o,m=(0,Ae.iW)(Pe,f,g);o.scale=(0,Ae.sx)((0,h.Su)(),m),(0,Ae.aU)(m,m,(0,k.i)(Le,o.scale)),o.rotation=(0,x.Gc)(m),o.translation=(0,Ae.Qy)((0,h.Su)(),m)}(e,t,i):l?function(e,t,r){const n=e.spatialReference,o=(0,Te._s)(n),i=Oe;(0,Z.M)(r,i,o)||(0,Z.M)(e.origin,i,o);const a=e.vertexAttributes.position,s=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(a.length),u=null!=s?new Float32Array(s.length):null,p=null!=l?new Float32Array(l.length):null;(0,qe.y)(o,i,ke,o),(0,we.kr)(Ne,ke);const f=Ie;(0,k.t)((0,x.Yz)(Ie),(0,x.Yz)(t),Ne),f[3]=t[3],(0,Me.K_)(a,n,c),null!=s&&null!=u&&(0,Me.cH)(s,a,c,n,u),null!=l&&null!=p&&(0,Me.GW)(l,a,c,n,p),je(c,f,3,i),(0,Me.o$)(c,a,n),null!=s&&null!=u&&(je(u,f,3),(0,Me.QP)(u,a,c,n,s)),null!=l&&null!=p&&(je(p,f,4),(0,Me.Cr)(p,a,c,n,l)),e.vertexAttributesChanged()}(e,t,i):function(e,t,r){const n=Oe;if(!(0,Z.M)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.c.getLogger(Ce).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}je(e.vertexAttributes.position,t,3,n),je(e.vertexAttributes.normal,t,3),je(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,i)}(this,Ke,n),this}offset(e,t,r){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:n,vertexAttributes:o}=this,i=o?.position;if(!i)return this;if((0,q.k$)(n)){const[o,i,a]=n.origin;n.origin=(0,h.WK)(o+e,i+t,a+r)}else{for(let n=0;n<i.length;n+=3)i[n]+=e,i[n+1]+=t,i[n+2]+=r;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")?(function(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:n,spatialReference:o}=e,i=r?.origin??e.anchor,a=r?.geographic,l=(0,H.QL)(We,n,o,a);(0,q._c)(e)?function(e,t,r){e.transform??=new S.c;const{vertexSpace:n,transform:o,spatialReference:i}=e,[a,l,c]=n.origin,u=new y.c({x:a,y:l,z:c,spatialReference:i}),p=De;if(u.equals(r))(0,k.s)(p,0,0,0);else if(!Fe(p,r,e))return void s.c.getLogger(We).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh (wkid:${i.wkid}) ${n.type} vertex space. Projection may be possible after calling projection.load().`);const f=(0,k.s)($e,t,t,t),g=(0,Ae.WP)(ze,Se.IJ,h.cX,f,p),{localMatrix:m}=o,d=(0,Ae.iW)(ze,g,m);o.scale=(0,Ae.sx)((0,h.Su)(),d),(0,Ae.aU)(d,d,(0,k.i)(De,o.scale)),o.rotation=(0,x.Gc)(d),o.translation=(0,Ae.Qy)((0,h.Su)(),d)}(e,t,i):l?function(e,t,r){const n=e.spatialReference,o=(0,Te._s)(n),i=Ge;(0,Z.M)(r,i,o)||(0,Z.M)(e.origin,i,o);const a=e.vertexAttributes.position,s=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(a.length),u=null!=s?new Float32Array(s.length):null,p=null!=l?new Float32Array(l.length):null;(0,Me.K_)(a,n,c),null!=s&&null!=u&&(0,Me.cH)(s,a,c,n,u),null!=l&&null!=p&&(0,Me.GW)(l,a,c,n,p),Ee(c,t,i),(0,Me.o$)(c,a,n),null!=s&&null!=u&&(0,Me.QP)(u,a,c,n,s),null!=l&&null!=p&&(0,Me.Cr)(p,a,c,n,l),e.vertexAttributesChanged()}(e,t,i):function(e,t,r){const n=Ge;if(!(0,Z.M)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.c.getLogger(We).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Ee(e.vertexAttributes.position,t,n),e.vertexAttributesChanged()}(e,t,i)}(this,e,t),this):this}centerAt(e,t){return this._checkIfLoaded("centerAt()")?(function(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:n}=e,o=r?.origin??e.anchor,i=r?.geographic,a=(0,H.QL)(V,n,o.spatialReference,i);(0,q.k$)(n)?function(e,t,r){const{vertexSpace:n}=e;if(!(0,q.k$)(n))return;const o=X,i=K;if(!(0,Z.M)(t,i,e.spatialReference))return void s.c.getLogger(V).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.M)(r,o,e.spatialReference)){const t=e.origin;o[0]=t.x,o[1]=t.y,o[2]=t.z,s.c.getLogger(V).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const a=(0,k.f)(Q,i,o);n.origin=(0,k.g)((0,h.Su)(),n.origin,a)}(e,t,o):a?function(e,t,r){const n=(0,z.qu)(e.vertexAttributes,r),{position:o,normal:i,tangent:a}=(0,z.mC)(n,t,!1);e.vertexAttributes.position=o,e.vertexAttributes.normal=i,e.vertexAttributes.tangent=a,e.vertexAttributesChanged()}(e,t,o):function(e,t,r){const n=X,o=K;if((0,Z.M)(t,o,e.spatialReference)){if(!(0,Z.M)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.c.getLogger(V).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(e,t,r){if(e)for(let n=0;n<e.length;n+=3)for(let o=0;o<3;o++)e[n+o]+=t[o]-r[o]})(e.vertexAttributes.position,o,n),e.vertexAttributesChanged()}else s.c.getLogger(V).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):this}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,n){const{source:o}=t,{loadGLTFMesh:a}=await(0,c.Yv)(Promise.all([r.e(8108),r.e(2818)]).then(r.bind(r,42818)),n),s=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new i.c("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return ae(e.map((e=>({name:e.name,mimeType:e.type,source:te(e)}))))}(e):async function(e,t){const r=await(0,c.Y3)(e.map((async e=>{const r=await async function(e,t){const{parts:r,assetMimeType:n,assetName:o}=e;if(1===r.length)return new se(r[0].partUrl);const i=await e.toBlob(t);return(0,c.wp)(t),se.fromBlob(i,le(o,n))}(e);return(0,c.wp)(t),{name:e.assetName,mimeType:e.assetMimeType,source:r}})));if((0,c.wv)(t))throw r.forEach((e=>e.source.dispose())),(0,c.Uh)();return ae(r)}(e,t)}return te(e)}(o,n);(0,c.wp)(n);const l=a(new y.c({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:ee(s),signal:n?.signal,expectedType:s.type});l.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:u,components:p}=await l;e.vertexAttributes=u,e.components=p}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,r=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,r)))}const r={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Be(r)}cloneShallow(){return new Be({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=r.e(4232).then(r.bind(r,4232)),n=this.load(),o=await Promise.all([t,n]),{toBinaryGLTF:i}=o[0];return i(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(Ze().error(e,"Mesh must be loaded before applying operations"),!1)}static createBox(e,t){if(!(e instanceof y.c))return Ze().error(".createBox()",w),null;const r=new Be(me(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:r}=ye,n=4*e.length,o=new Float64Array(3*n),i=new Float32Array(3*n),a=new Float32Array(2*n),s=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,p=0;for(let n=0;n<e.length;n++){const f=e[n],h=l/3;for(const e of t)s[p++]=h+e;const g=f.corners;for(let e=0;e<4;e++){const t=g[e];let n=0;a[u++]=.25*r[e][0]+f.uvOrigin[0],a[u++]=f.uvOrigin[1]-.25*r[e][1];for(let e=0;e<3;e++)0!==f.axis[e]?(o[l++]=.5*f.axis[e],i[c++]=f.axis[e]):(o[l++]=.5*t[n++],i[c++]=0)}}return{position:o,normal:i,uv:a,faces:s}}(),e,t));return t?.imageFace&&"all"!==t.imageFace?function(e,t){const r=e.components[0],n=r.faces,o=de[t],i=6*o,a=new Array(6),s=new Array(n.length-6);let l=0,c=0;for(let e=0;e<n.length;e++)e>=i&&e<i+6?a[l++]=n[e]:s[c++]=n[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),r=4*o*2,n=[0,1,1,1,1,0,0,0];for(let e=0;e<n.length;e++)t[r+e]=n[e];e.vertexAttributes.uv=t}return e.components=[new v.c({faces:a,material:r.material}),new v.c({faces:s})],e}(r,t.imageFace):r}static createSphere(e,t){return e instanceof y.c?new Be(me(function(e=0){const t=Math.round(8*2**e),r=2*t,n=(t-1)*(r+1)+2*r,o=new Float64Array(3*n),i=new Float32Array(3*n),a=new Float32Array(2*n),s=new Uint32Array((t-1)*r*2*3);let l=0,c=0,u=0,p=0;for(let e=0;e<=t;e++){const n=e/t*Math.PI+.5*Math.PI,f=Math.cos(n),h=Math.sin(n);xe[2]=h;const g=0===e||e===t,m=g?r-1:r;for(let n=0;n<=m;n++){const h=n/m*2*Math.PI;xe[0]=-Math.sin(h)*f,xe[1]=Math.cos(h)*f;for(let e=0;e<3;e++)o[l]=.5*xe[e],i[l]=xe[e],++l;a[c++]=(n+(g?.5:0))/r,a[c++]=e/t,0!==e&&n!==r&&(e!==t&&(s[u++]=p,s[u++]=p+1,s[u++]=p-r),1!==e&&(s[u++]=p,s[u++]=p-r,s[u++]=p-r-1)),p++}}return{position:o,normal:i,uv:a,faces:s}}(t?.densificationFactor||0),e,t)):(Ze().error(".createSphere()",w),null)}static createCylinder(e,t){return e instanceof y.c?new Be(me(function(e=0){const t=Math.round(16*2**e),r=4*(t+1)+2*t,n=new Float64Array(3*r),o=new Float32Array(3*r),i=new Float32Array(2*r),a=new Uint32Array(4*t*3);let s=0,l=0,c=0,u=0,p=0;for(let e=0;e<=5;e++){const r=0===e||5===e,f=e<=1||e>=4,h=2===e||4===e,g=r?t-1:t;for(let m=0;m<=g;m++){const y=m/g*2*Math.PI,d=r?0:.5;xe[0]=d*Math.sin(y),xe[1]=d*-Math.cos(y),xe[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)n[s++]=xe[t],o[l++]=f?2===t?e<=1?1:-1:0:2===t?0:xe[t]/d;i[c++]=(m+(r?.5:0))/t,i[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,h||0===e||m===t||(5!==e&&(a[u++]=p,a[u++]=p+1,a[u++]=p-t),1!==e&&(a[u++]=p,a[u++]=p-t,a[u++]=p-t-1)),p++}}return{position:n,normal:o,uv:i,faces:a}}(t?.densificationFactor||0),e,t)):(Ze().error(".createCylinder()",w),null)}static createPlane(e,t){if(!(e instanceof y.c))return Ze().error(".createPlane()",w),null;const r=t?.facing??"up",n=function(e,t){const r="number"==typeof t?t:null!=t?t.width:1,n="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:r,depth:n};case"north":case"south":return{width:r,height:n};case"east":case"west":return{depth:r,height:n}}}(r,t?.size);return new Be(me(function(e){const t=ge.facingAxisOrderSwap[e],r=ge.position,n=ge.normal,o=new Float64Array(r.length),i=new Float32Array(n.length);let a=0;for(let e=0;e<4;e++){const e=a;for(let s=0;s<3;s++){const l=t[s],c=Math.abs(l)-1,u=l>=0?1:-1;o[a]=r[e+c]*u,i[a]=n[e+c]*u,a++}}return{position:o,normal:i,uv:new Float32Array(ge.uv),faces:new Uint32Array(ge.faces),isPlane:!0}}(r),e,{...t,size:n}))}static createFromPolygon(e,t){if(!(e instanceof d.c))return Ze().error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;const r=function(e){const t=function(e,t,r,n){const o=e.length,i=new Array(o),a=new Array(o),s=new Array(o);let l=0,c=0,u=0,p=0;for(let t=0;t<o;++t)p+=e[t].length;const f=(0,C.Gg)(3*p);let h=0;for(let p=o-1;p>=0;p--){const g=e[p],m=r===E.CCW_IS_HOLE&&W(g,t,n);if(m&&1!==o)i[l++]=g;else{let e=g.length;for(let t=0;t<l;++t)e+=i[t].length;const r={index:h,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};r.pathLengths[0]=g.length,g.length>0&&(s[u++]={index:h,count:g.length}),h=m?U(g,g.length-1,-1,f,h,g.length,t):U(g,0,1,f,h,g.length,t);for(let e=0;e<l;++e){const n=i[e];r.holeIndices[e]=h,r.pathLengths[e+1]=n.length,n.length>0&&(s[u++]={index:h,count:n.length}),h=U(n,0,1,f,h,n.length,t)}l=0,r.count>0&&(a[c++]=r)}}for(let e=0;e<l;++e){const r=i[e];r.length>0&&(s[u++]={index:h,count:r.length}),h=U(r,0,1,f,h,r.length,t)}return a.length=c,s.length=u,{position:f,polygons:a,outlines:s}}(e.rings,e.hasZ,E.CCW_IS_HOLE,e.spatialReference),r=new Array;let n=0,o=0;for(const e of t.polygons){const i=e.count,a=e.index,s=(0,C.lL)(t.position,3*a,3*i),l=e.holeIndices.map((e=>e-a)),c=(0,j.Uv)((0,M.e)(s,l,3));r.push({position:s,faces:c}),n+=s.length,o+=c.length}const i=function(e,t,r){if(1===e.length)return e[0];const n=(0,C.Gg)(t),o=new Array(r);let i=0,a=0,s=0;for(const t of e){for(let e=0;e<t.position.length;e++)n[i++]=t.position[e];for(const e of t.faces)o[a++]=e+s;s=i/3}return{position:n,faces:(0,j.Uv)(o)}}(r,n,o),a=Array.isArray(i.position)?(0,L.g)(i.position,3,{originalIndices:i.faces}):(0,L.g)(i.position.buffer,6,{originalIndices:i.faces});return i.position=(0,C.cp)(new Float64Array(a.buffer)),i.faces=a.indices,i}(e);return new Be({vertexAttributes:new T.s({position:r.position}),components:[new v.c({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new b.c})}static async createFromGLTF(e,t,n){if(!(e instanceof y.c)){const e=new A;throw Ze().error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await(0,c.Yv)(Promise.all([r.e(8108),r.e(2818)]).then(r.bind(r,42818)),n);return new Be(await o(e,t,n))}static async createFromFiles(e,t,r){if((0,o.gx)(Ze(),"`Mesh.createFromFiles` is deprecated in favor of 'SceneLayer.convertMesh'",{replacement:"SceneLayer.convertMesh",version:"4.29"}),!(e instanceof y.c)){const e=new A;throw(e=>{Ze().error(".createFromFiles()",e.message)})(e),e}if(!r?.layer)throw new i.c("invalid:no-layer","SceneLayer required for file to mesh conversion.");return r.layer.convertMesh(t,{location:e,...r})}static createWithExternalSource(e,t,r){const n=r?.extent??null,{x:o,y:i,z:a,spatialReference:s}=e,l=r?.transform?.clone()??new S.c,c=(0,h.WK)(o,i,a??0),u=(0,q.mm)(r?.vertexSpace??(0,q.GF)(s),c),p={source:t,extent:n},f=new fe;return f.externalSources.push(p),new Be({metadata:f,transform:l,vertexSpace:u,spatialReference:s})}static createIncomplete(e,t){const{x:r,y:n,z:o,spatialReference:a}=e,s=t?.transform?.clone()??new S.c,l=(0,h.WK)(r,n,o??0),c=(0,q.mm)(t?.vertexSpace??(0,q.GF)(a),l),u=new Be({transform:s,vertexSpace:c,spatialReference:a});return u.addResolvingPromise(Promise.reject(new i.c("mesh-incomplete","Mesh resources are not complete"))),u}};(0,n._)([(0,p.qq)({type:[v.c],json:{write:!0}})],Ve.prototype,"components",void 0),(0,n._)([(0,p.qq)({nonNullable:!0,types:He,constructOnly:!0,json:{write:!0}})],Ve.prototype,"vertexSpace",void 0),(0,n._)([(0,p.qq)({type:S.c,json:{write:!0}})],Ve.prototype,"transform",void 0),(0,n._)([(0,p.qq)({constructOnly:!0})],Ve.prototype,"metadata",void 0),(0,n._)([(0,p.qq)()],Ve.prototype,"hasExtent",null),(0,n._)([(0,p.qq)()],Ve.prototype,"_transformedExtent",null),(0,n._)([(0,p.qq)()],Ve.prototype,"_untransformedBounds",null),(0,n._)([(0,p.qq)()],Ve.prototype,"anchor",null),(0,n._)([(0,p.qq)()],Ve.prototype,"origin",null),(0,n._)([(0,p.qq)({readOnly:!0,json:{read:!1}})],Ve.prototype,"extent",null),(0,n._)([(0,p.qq)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Ve.prototype,"hasZ",void 0),(0,n._)([(0,p.qq)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Ve.prototype,"hasM",void 0),(0,n._)([(0,p.qq)({type:T.s,nonNullable:!0,json:{write:!0}})],Ve.prototype,"vertexAttributes",void 0),Ve=Be=(0,n._)([(0,f.c)(Ye)],Ve);const Ke=(0,x.Su)(),Xe=Ve},15688:(e,t,r)=>{r.d(t,{Gg:()=>o,cp:()=>i,lL:()=>a,mw:()=>s,qW:()=>l});var n=r(72008);function o(e,t=!1){return e<=n._?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function i(e){return((0,n.c7)(e)?e.length:e.byteLength/8)<=n._?Array.from(e):new Float64Array(e)}function a(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function s(e,t){for(let r=0;r<t.length;++r)e[r]=t[r];return e}function l(e){return Array.isArray(e)?new Float64Array(e):e}},43912:(e,t,r)=>{r.d(t,{c:()=>y});var n,o=r(41948),i=r(40504),a=r(62088),s=r(66360),l=r(1580),c=r(33392),u=r(12552),p=r(53368),f=r(96344),h=r(70492),g=r(82384);let m=n=class extends i.am{static from(e){return(0,p.uY)(n,e)}constructor(e){super(e),this.faces=null,this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,g.c)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},s.c.getLogger(this))}castMaterial(e){return(0,p.uY)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?h.c:f.c,e)}clone(){return new n({faces:(0,a.ct)(this.faces),shading:this.shading,material:(0,a.ct)(this.material),trustSourceNormals:this.trustSourceNormals,name:this.name})}cloneWithDeduplication(e,t){const r={faces:(0,a.ct)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals,name:this.name};return new n(r)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,o._)([(0,l.qq)({json:{write:!0}})],m.prototype,"faces",void 0),(0,o._)([(0,c.W)("faces")],m.prototype,"castFaces",null),(0,o._)([(0,l.qq)({type:f.c,json:{write:!0}})],m.prototype,"material",void 0),(0,o._)([(0,c.W)("material")],m.prototype,"castMaterial",null),(0,o._)([(0,l.qq)()],m.prototype,"name",void 0),(0,o._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"shading",void 0),(0,o._)([(0,l.qq)({type:Boolean})],m.prototype,"trustSourceNormals",void 0),m=n=(0,o._)([(0,u.c)("esri.geometry.support.MeshComponent")],m);const y=m},51232:(e,t,r)=>{r.d(t,{c:()=>u});var n=r(41948),o=r(3856),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(9968)),l=r(12552);let c=class extends((0,o.q)(i.am)){constructor(e){super(e),this.type="georeferenced",this.origin=null}};(0,n._)([(0,s.G)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,n._)([(0,a.qq)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,n._)([(0,l.c)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c);const u=c},13708:(e,t,r)=>{r.d(t,{c:()=>p});var n=r(41948),o=r(3856),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(9968)),l=r(12552),c=r(62484);let u=class extends((0,o.q)(i.am)){constructor(e){super(e),this.type="local",this.origin=(0,c.Su)()}};(0,n._)([(0,s.G)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,n._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,n._)([(0,l.c)("esri.geometry.support.MeshLocalVertexSpace")],u);const p=u},96344:(e,t,r)=>{r.d(t,{c:()=>f});var n,o=r(41948),i=r(44728),a=r(40504),s=r(1580),l=(r(9456),r(66360),r(72052),r(12552)),c=r(7192),u=r(56160);let p=n=class extends a.am{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const r=null!=e?e.get(this):null;if(r)return r;const o=new n(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,o._)([(0,s.qq)({type:i.c,json:{write:!0}})],p.prototype,"color",void 0),(0,o._)([(0,s.qq)({type:c.c,json:{write:!0}})],p.prototype,"colorTexture",void 0),(0,o._)([(0,s.qq)({type:u.c,json:{write:!0}})],p.prototype,"colorTextureTransform",void 0),(0,o._)([(0,s.qq)({type:c.c,json:{write:!0}})],p.prototype,"normalTexture",void 0),(0,o._)([(0,s.qq)({type:u.c,json:{write:!0}})],p.prototype,"normalTextureTransform",void 0),(0,o._)([(0,s.qq)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaMode",void 0),(0,o._)([(0,s.qq)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaCutoff",void 0),(0,o._)([(0,s.qq)({nonNullable:!0,json:{write:!0}})],p.prototype,"doubleSided",void 0),p=n=(0,o._)([(0,l.c)("esri.geometry.support.MeshMaterial")],p);const f=p},70492:(e,t,r)=>{r.d(t,{c:()=>f});var n,o=r(41948),i=r(44728),a=r(1580),s=(r(9456),r(66360),r(72052),r(12552)),l=r(96344),c=r(7192),u=r(56160);let p=n=class extends l.c{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const r=null!=e?e.get(this):null;if(r)return r;const o=new n(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,o._)([(0,a.qq)({type:i.c,json:{write:!0}})],p.prototype,"emissiveColor",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],p.prototype,"emissiveTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],p.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],p.prototype,"occlusionTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],p.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"metallic",void 0),(0,o._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"roughness",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],p.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],p.prototype,"metallicRoughnessTextureTransform",void 0),p=n=(0,o._)([(0,s.c)("esri.geometry.support.MeshMaterialMetallicRoughness")],p);const f=p},7192:(e,t,r)=>{r.d(t,{c:()=>y});var n,o=r(41948),i=(r(9456),r(63316)),a=r(40504),s=r(1580),l=r(53368),c=(r(72052),r(33600)),u=r(12552),p=r(18996),f=r(91952);const h=new WeakMap;let g=0,m=n=class extends a.am{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,r,n){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,f.t)(e.src,n),crossOrigin:e.crossOrigin};t[r]=o}else if(e instanceof HTMLCanvasElement){const n=e.getContext("2d").getImageData(0,0,e.width,e.height),o={type:"canvas-element",imageData:this._encodeImageData(n)};t[r]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,f.t)(e.src,n),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[r]=o}else if(e instanceof ImageData){const n={type:"image-data",imageData:this._encodeImageData(e)};t[r]=n}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),r=document.createElement("canvas");return r.width=t.width,r.height=t.height,r.getContext("2d").putImageData(t,0,0),r}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),r=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===r)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(h.has(this.data)||h.set(this.data,++g),t(h.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 n(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const r=this.clone();return e.set(this,r),r}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let r=0;r<e.data.length;r++)t+=String.fromCharCode(e.data[r]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),r=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return(0,i.wV)(r,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new n({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new n({data:e}):(0,l.uY)(n,e)}};(0,o._)([(0,s.qq)({type:String,json:{write:f.w}})],m.prototype,"url",null),(0,o._)([(0,s.qq)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,s.qq)()],m.prototype,"data",null),(0,o._)([(0,p.G)("data")],m.prototype,"writeData",null),(0,o._)([(0,c.E)("data")],m.prototype,"readData",null),(0,o._)([(0,s.qq)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],m.prototype,"transparent",null),(0,o._)([(0,s.qq)({json:{write:!0}})],m.prototype,"wrap",void 0),(0,o._)([(0,s.qq)({readOnly:!0})],m.prototype,"contentHash",null),m=n=(0,o._)([(0,u.c)("esri.geometry.support.MeshTexture")],m);const y=m},56160:(e,t,r)=>{r.d(t,{c:()=>c});var n=r(41948),o=r(3856),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(12552));let l=class extends((0,o.q)(i.am)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,n._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,n._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,n._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,n._)([(0,s.c)("esri.geometry.support.MeshTextureTransform")],l);const c=l},41104:(e,t,r)=>{r.d(t,{c:()=>d});var n,o=r(41948),i=r(40504),a=r(1580),s=(r(9456),r(66360),r(72052),r(12552)),l=r(15008),c=r(87104),u=r(41512),p=r(2620),f=r(98472),h=r(62484),g=r(66952);let m=n=class extends i.am{constructor(e){super(e),this.translation=(0,h.Su)(),this.rotationAxis=(0,h.eu)(g.up),this.rotationAngle=0,this.scale=(0,h.WK)(1,1,1)}get rotation(){return(0,g.eE)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,h.ct)((0,g.Yz)(e)),this.rotationAngle=(0,g.i4)(e)}get localMatrix(){const e=(0,c.Su)();return(0,u.yG)(y,(0,g.Yz)(this.rotation),(0,g.kX)(this.rotation)),(0,l.um)(e,y,this.translation,this.scale),e}get localMatrixInverse(){return(0,l.S_)((0,c.Su)(),this.localMatrix)}applyLocal(e,t){return(0,f.e)(t,e,this.localMatrix)}applyLocalInverse(e,t){return(0,f.e)(t,e,this.localMatrixInverse)}equals(e){return this===e||null!=e&&(0,l.sF)(this.localMatrix,e.localMatrix)}clone(){const e={translation:(0,h.ct)(this.translation),rotationAxis:(0,h.ct)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,h.ct)(this.scale)};return new n(e)}};(0,o._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],m.prototype,"translation",void 0),(0,o._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],m.prototype,"rotationAxis",void 0),(0,o._)([(0,a.qq)({type:Number,nonNullable:!0,json:{write:!0}})],m.prototype,"rotationAngle",void 0),(0,o._)([(0,a.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],m.prototype,"scale",void 0),(0,o._)([(0,a.qq)()],m.prototype,"rotation",null),(0,o._)([(0,a.qq)()],m.prototype,"localMatrix",null),(0,o._)([(0,a.qq)()],m.prototype,"localMatrixInverse",null),m=n=(0,o._)([(0,s.c)("esri.geometry.support.MeshTransform")],m);const y=(0,p.Su)(),d=m},82384:(e,t,r)=>{r.d(t,{c:()=>h,s:()=>p});var n,o=r(41948),i=r(40504),a=r(62088),s=r(66360),l=r(1580),c=r(33392),u=r(12552);let p=n=class extends i.am{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return h(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},s.c.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&s.c.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),h(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},s.c.getLogger(this))}castUv(e){return h(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},s.c.getLogger(this))}castNormal(e){return h(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},s.c.getLogger(this))}castTangent(e){return h(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},s.c.getLogger(this))}clone(){const e={position:(0,a.ct)(this.position),uv:(0,a.ct)(this.uv),normal:(0,a.ct)(this.normal),tangent:(0,a.ct)(this.tangent),color:(0,a.ct)(this.color)};return new n(e)}clonePositional(){const e={position:(0,a.ct)(this.position),normal:(0,a.ct)(this.normal),tangent:(0,a.ct)(this.tangent),uv:this.uv,color:this.color};return new n(e)}get memoryUsage(){let e=0;return e+=this.position.byteLength,null!=this.uv&&(e+=this.uv.byteLength),null!=this.normal&&(e+=this.normal.byteLength),null!=this.tangent&&(e+=this.tangent.byteLength),null!=this.color&&(e+=this.color.byteLength),e}};function f(e,t,r,n){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(n.error(o,`Invalid array length, expected a multiple of ${i}`),new r([])):e}function h(e,t,r,n,o){if(!e)return e;if(e instanceof t)return f(e,n,t,o);for(const i of r)if(e instanceof i)return f(new t(e),n,t,o);if(Array.isArray(e))return f(new t(e),n,t,o);{const n=r.map((e=>`'${e.name}'`));return o.error(`Failed to set property, expected one of ${n}, but got ${e.constructor.name}`),new t([])}}function g(e,t,r){t[r]=function(e){const t=new Array(e.length);for(let r=0;r<e.length;r++)t[r]=e[r];return t}(e)}(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"color",void 0),(0,o._)([(0,c.W)("color")],p.prototype,"castColor",null),(0,o._)([(0,l.qq)({nonNullable:!0,json:{write:g}})],p.prototype,"position",void 0),(0,o._)([(0,c.W)("position")],p.prototype,"castPosition",null),(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"uv",void 0),(0,o._)([(0,c.W)("uv")],p.prototype,"castUv",null),(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"normal",void 0),(0,o._)([(0,c.W)("normal")],p.prototype,"castNormal",null),(0,o._)([(0,l.qq)({json:{write:g}})],p.prototype,"tangent",void 0),(0,o._)([(0,c.W)("tangent")],p.prototype,"castTangent",null),p=n=(0,o._)([(0,u.c)("esri.geometry.support.MeshVertexAttributes")],p)},66952:(e,t,r)=>{r.d(t,{GA:()=>h,Gc:()=>p,Su:()=>c,Yz:()=>g,eE:()=>u,i4:()=>m,kX:()=>y,up:()=>x});var n=r(53648),o=r(15008),i=r(41512),a=r(2620),s=r(98472),l=r(62484);function c(e=x){return[e[0],e[1],e[2],e[3]]}function u(e,t,r=c()){return(0,s.c)(r,e),r[3]=t,r}function p(e,t=c()){const r=(0,o.ir)(v,e);return d(t,(0,n.UB)((0,i.C0)(t,r))),t}function f(e,t,r=c()){return(0,i.yG)(v,e,y(e)),(0,i.yG)(w,t,y(t)),(0,i.iW)(v,w,v),d(r,(0,n.UB)((0,i.C0)(r,v)))}function h(e,t,r,n=c()){return u(l.UV,e,A),u(l.IR,t,b),u(l.wx,r,_),f(A,b,A),f(A,_,n),n}function g(e){return e}function m(e){return e[3]}function y(e){return(0,n.EF)(e[3])}function d(e,t){return e[3]=t,e}r(37008);const x=[0,0,1,0],v=(0,a.Su)(),w=(0,a.Su)(),A=(c(),c()),b=c(),_=c()},54264:(e,t,r)=>{r.d(t,{CT:()=>x,Ki:()=>d,Si:()=>s,Ud:()=>c,_o:()=>m,ai:()=>l,mK:()=>v,v_:()=>g});var n=r(2600),o=r(92400),i=r(10860),a=r(4048);class s{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,o.yK)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,i.wp)(e),new Blob(r)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,n.c)(this.partUrl,{responseType:"blob"});return(0,i.wp)(e),t}}function c(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function u(e){return!!Array.isArray(e)&&e.every((e=>e instanceof s))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return p.test(t)||f.test(r)}return p.test(e.assetMimeType)||f.test(e.assetName)}function g(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){if(Array.isArray(e)){const r=e;return r.length>0&&r.every((e=>y(e,t)))}return y(e,t)}(r,t)}function m(e,t){if(e===t)return!0;const{source:r}=e,{source:n}=t;if(r===n)return!0;if(u(r)&&u(n)){if(r.length!==n.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),o=[...n].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(o[e]))return!1;return!0}return!1}function y(e,t){return e instanceof s&&e.isOnService(t)}function d(e,t){return e instanceof File?(0,a.K0)(e,t):(0,a.me)(e.assetMimeType,t)??(0,a.If)(e.assetName,t)}function x(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},77080:(e,t,r)=>{r.d(t,{g:()=>i});var n=r(53648),o=r(97143);function i(e,t,r){const i=Array.isArray(e),u=i?e.length/t:e.byteLength/(4*t),p=i?e:new Uint32Array(e,0,u*t),f=r?.minReduction??0,h=r?.originalIndices||null,g=h?h.length:0,m=r?.componentOffsets||null;let y=0;if(m)for(let e=0;e<m.length-1;e++){const t=m[e+1]-m[e];t>y&&(y=t)}else y=u;const d=Math.floor(1.1*y)+1;(null==c||c.length<2*d)&&(c=new Uint32Array((0,n.w7)(2*d)));for(let e=0;e<2*d;e++)c[e]=0;let x=0;const v=!!m&&!!h,w=v?g:u;let A=(0,o.aw)(u);const b=new Uint32Array(g),_=1.96;let S=0!==f?Math.ceil(4*_*_/(f*f)*f*(1-f)):w,T=1,q=m?m[1]:w;for(let e=0;e<w;e++){if(e===S){const t=1-x/e;if(t+_*Math.sqrt(t*(1-t)/e)<f)return null;S*=2}if(e===q){for(let e=0;e<2*d;e++)c[e]=0;if(h)for(let e=m[T-1];e<m[T];e++)b[e]=A[h[e]];q=m[++T]}const r=v?h[e]:e,n=r*t,o=l(p,n,t);let i=o%d,s=x;for(;0!==c[2*i+1];){if(c[2*i]===o){const e=c[2*i+1]-1;if(a(p,n,e*t,t)){s=A[e];break}}i++,i>=d&&(i-=d)}s===x&&(c[2*i]=o,c[2*i+1]=r+1,x++),A[r]=s}if(0!==f&&1-x/u<f)return null;if(v){for(let e=m[T-1];e<b.length;e++)b[e]=A[h[e]];A=(0,o.Uv)(b)}const M=i?new Array(x):new Uint32Array(x*t);x=0;for(let e=0;e<w;e++)A[e]===x&&(s(p,(v?h[e]:e)*t,M,x*t,t),x++);if(h&&!v){const e=new Uint32Array(g);for(let t=0;t<e.length;t++)e[t]=A[h[t]];A=(0,o.Uv)(e)}return{buffer:Array.isArray(M)?M:M.buffer,indices:A,uniqueCount:x}}function a(e,t,r,n){for(let o=0;o<n;o++)if(e[t+o]!==e[r+o])return!1;return!0}function s(e,t,r,n,o){for(let i=0;i<o;i++)r[n+i]=e[t+i]}function l(e,t,r){let n=0;for(let o=0;o<r;o++)n=e[t+o]+n|0,n=n+(n<<11)+(n>>>2)|0;return n>>>0}let c=null},71488:(e,t,r)=>{r.d(t,{Kk:()=>s,QL:()=>l,yO:()=>a});var n=r(26832),o=r(66360),i=r(21136);function a(e,t){return e.isGeographic||e.isWebMercator&&(t??!0)}function s(e,t){switch(e.type){case"georeferenced":return t.isGeographic;case"local":return t.isGeographic||t.isWebMercator}}function l(e,t,r,a){if(void 0!==a){(0,n.O2)(o.c.getLogger(e),"option: geographic",{replacement:"use mesh vertexSpace and spatial reference to control how operations are performed",version:"4.29",warnOnce:!0});const s="local"===t.type;if(!(0,i.k$)(t)||a===s)return r.isGeographic||r.isWebMercator&&a;o.c.getLogger(e).warnOnce(`Specifying the 'geographic' parameter (${a}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}return s(t,r)}},54828:(e,t,r)=>{r.d(t,{CE:()=>A,EX:()=>_,_0:()=>P,_S:()=>b,iS:()=>T,mC:()=>M,project:()=>q,qu:()=>R});var n=r(24296),o=r(68612),i=r(15008),a=r(87104),s=r(98472),l=r(62484),c=r(77556),u=r(60074),p=r(82448),f=r(51120),h=r(62880),g=r(15688),m=r(41104),y=r(21136),d=r(48952),x=r(71488),v=r(38496);function w(e,t,r){return(0,x.yO)(t.spatialReference,r?.geographic)?M(e,t,!1,r):function(e,t,r){const n=new Float64Array(e.position.length),o=e.position,i=t.x,a=t.y,s=t.z??0,l=P(r?r.unit:null,t.spatialReference);for(let e=0;e<o.length;e+=3)n[e]=o[e]*l+i,n[e+1]=o[e+1]*l+a,n[e+2]=o[e+2]*l+s;return{position:n,normal:e.normal,tangent:e.tangent}}(e,t,r)}function A(e,t=a.IJ){const{position:r,normal:n,tangent:o}=e;return{position:(0,d.a)(new Float64Array(r.length),r,t),normal:null!=n?(0,v.W4)(n,new Float32Array(n.length),t):null,tangent:null!=o?(0,v.AT)(o,new Float32Array(o.length),t):null}}function b(e,t,r,n){const{position:o,normal:i,tangent:a}=e;if(!(0,y.k$)(t))return{position:o,normal:i,tangent:a};const s=(0,y.mA)(t,n);return w(A(e,r?.localMatrix),s,{geographic:"local"===t.type})}function _(e,t,r){const n=(0,y.Al)(t,r),o=t.spatialReference,i=(0,y.k$)(n);if(!i)return{vertexAttributes:w(e,t,r),vertexSpace:n,transform:null};const{position:a,normal:s,tangent:l}=e,c=(0,x.Kk)(n,o);switch(n.type){case"georeferenced":return c?{vertexAttributes:M(e,t,i,r),vertexSpace:n,transform:null}:{vertexAttributes:{position:a,normal:s,tangent:l},vertexSpace:n,transform:new m.c};case"local":return{vertexAttributes:{position:a,normal:s,tangent:l},vertexSpace:n,transform:new m.c}}}function S(e,t,r){return(0,x.yO)(t.spatialReference,r?.geographic)?R(e,t,r):F(e,t,r)}function T(e,t,r,n,o){if(!(0,y.k$)(t))return S(e,n,o);const{spatialReference:i}=n,a=b(e,t,r,i);return n.equals((0,y.mA)(t,i))?F(a,n,o):S(a,n,o)}function q({positions:e,transform:t,vertexSpace:r,inSpatialReference:n,outSpatialReference:o,outPositions:c,localMode:m}){const y=r.origin??l.cX,x=null!=r.origin?t?.localMatrix??a.IJ:a.IJ;if("georeferenced"===r.type){const t=c??(0,g.Gg)(e.length);if((0,i.yK)(x,a.IJ)?(0,g.mw)(t,e):(0,d.a)(t,e,x),!(0,s.j)(y,l.cX)){const[e,r,n]=y;for(let o=0;o<t.length;o+=3)t[o]+=e,t[o+1]+=r,t[o+2]+=n}return(0,h.projectBuffer)(t,n,0,t,o,0,t.length/3),t}let v=n;const w=(0,p._s)(n);v=o.isWebMercator&&m||!(0,u.canProjectWithoutEngine)(n,w)?v:w,(0,f.y)(n,y,I,v),(0,i.iW)(I,I,x);const A=c??(0,g.Gg)(e.length);return(0,d.a)(A,e,I),(0,h.projectBuffer)(A,v,0,A,o,0,A.length/3),A}function M(e,t,r,n){const o=t.spatialReference,i=C(t,n,I),a=new Float64Array(e.position.length),s=function(e,t,r,n){(0,d.a)(n,e,t);const o=new Float64Array(e.length);return(0,v.o$)(n,o,r)}(e.position,i,o,a),l=(0,c.yy)(N,i),u=function(e,t,r,n,o){if(null==r)return null;const i=new Float32Array(r.length);return(0,d.b)(i,r,n),(0,v.QP)(i,e,t,o,i),i}(s,a,e.normal,l,o),p=function(e,t,r,n,o){if(null==r)return null;const i=new Float32Array(r.length);(0,d.b)(i,r,n,4);for(let e=3;e<i.length;e+=4)i[e]=r[e];return(0,v.Cr)(i,e,t,o,i),i}(s,a,e.tangent,l,o);if(r){const{x:e,y:r,z:n}=t;(0,d.t)(s,s,[-e,-r,-(n??0)])}return{position:s,normal:u,tangent:p}}function F(e,t,r){const n=new Float64Array(e.position.length),o=e.position,i=t.x,a=t.y,s=t.z??0,l=P(r?r.unit:null,t.spatialReference);for(let e=0;e<o.length;e+=3)n[e]=(o[e]-i)/l,n[e+1]=(o[e+1]-a)/l,n[e+2]=(o[e+2]-s)/l;return{position:n,normal:e.normal,tangent:e.tangent}}function R(e,t,r){const n=t.spatialReference;C(t,r,I);const o=(0,i.S_)(k,I),a=new Float64Array(e.position.length),s=function(e,t,r,n){const o=(0,v.K_)(e,t,n),i=new Float64Array(o.length);return(0,d.a)(i,o,r),i}(e.position,n,o,a),l=(0,c.yy)(N,o);return{position:s,normal:j(e.normal,e.position,a,n,l),tangent:L(e.tangent,e.position,a,n,l)}}function C(e,t,r){(0,f.y)(e.spatialReference,[e.x,e.y,e.z??0],r,(0,p._s)(e.spatialReference));const n=P(t?t.unit:null,e.spatialReference);return(0,i.aU)(r,r,[n,n,n]),r}function j(e,t,r,n,o){if(null==e)return null;const i=(0,v.cH)(e,t,r,n,new Float32Array(e.length));return(0,d.b)(i,i,o),i}function L(e,t,r,n,o){if(null==e)return null;const i=(0,v.GW)(e,t,r,n,new Float32Array(e.length));return(0,d.b)(i,i,o,4),i}function P(e,t){if(null==e)return 1;const r=(0,n.eg)(t);return 1/(0,n.ck)(r,"meters",e)}const I=(0,a.Su)(),k=(0,a.Su)(),N=(0,o.Su)()},38496:(e,t,r)=>{r.d(t,{AT:()=>b,Cr:()=>S,GW:()=>_,K_:()=>v,QP:()=>x,W4:()=>A,cH:()=>d,o$:()=>w});var n=r(66360),o=r(77556),i=r(68612),a=r(87104),s=r(98472),l=r(62484),c=r(82448),u=r(51120),p=r(62880),f=r(60544),h=r(29120),g=r(71004),m=r(48952);const y=()=>n.c.getLogger("esri.geometry.support.meshUtils.normalProjection");function d(e,t,r,n,o){return q(n)?(T(F.TO_PCPF,g.Yj.fromTypedArray(e),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o)),o):(y().error("Cannot convert spatial reference to PCPF"),o)}function x(e,t,r,n,o){return q(n)?(T(F.FROM_PCPF,g.Yj.fromTypedArray(e),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o)),o):(y().error("Cannot convert to spatial reference from PCPF"),o)}function v(e,t,r){return(0,p.projectBuffer)(e,t,0,r,(0,c._s)(t),0,e.length/3),r}function w(e,t,r){return(0,p.projectBuffer)(e,(0,c._s)(r),0,t,r,0,e.length/3),t}function A(e,t,r){return(0,o.yy)(P,r),(0,m.b)(t,e,P),(0,o.QT)(P)||(0,m.n)(t,t),t}function b(e,t,r){if((0,o.yy)(P,r),(0,m.b)(t,e,P,4),(0,o.QT)(P)||(0,m.n)(t,t,4),e!==t)for(let r=3;r<e.length;r+=4)t[r]=e[r];return t}function _(e,t,r,n,o){if(!q(n))return y().error("Cannot convert spatial reference to PCPF"),o;T(F.TO_PCPF,g.Yj.fromTypedArray(e,4*Float32Array.BYTES_PER_ELEMENT),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let t=3;t<e.length;t+=4)o[t]=e[t];return o}function S(e,t,r,n,o){if(!q(n))return y().error("Cannot convert to spatial reference from PCPF"),o;T(F.FROM_PCPF,g.Yj.fromTypedArray(e,16),g.Ax.fromTypedArray(t),g.Ax.fromTypedArray(r),n,g.Yj.fromTypedArray(o,16));for(let t=3;t<e.length;t+=4)o[t]=e[t];return o}function T(e,t,r,n,i,a){if(!t)return;const l=r.count,p=(0,c._s)(i);if(M(i))for(let r=0;r<l;r++)n.getVec(r,C),t.getVec(r,j),(0,u.y)(p,C,L,p),(0,o.kr)(P,L),e===F.FROM_PCPF&&(0,o.oL)(P,P),(0,s.t)(j,j,P),a.setVec(r,j);else for(let i=0;i<l;i++){n.getVec(i,C),t.getVec(i,j),(0,u.y)(p,C,L,p),(0,o.kr)(P,L);const l=(0,h.MB)(r.get(i,1));let c=Math.cos(l);e===F.TO_PCPF&&(c=1/c),P[0]*=c,P[1]*=c,P[2]*=c,P[3]*=c,P[4]*=c,P[5]*=c,e===F.FROM_PCPF&&(0,o.oL)(P,P),(0,s.t)(j,j,P),(0,s.n)(j,j),a.setVec(i,j)}return a}function q(e){return M(e)||function(e){return e.isWebMercator}(e)}function M(e){return e.isWGS84||(0,f.Ub)(e)||(0,f.qg)(e)||(0,f.UB)(e)}var F,R;(R=F||(F={}))[R.TO_PCPF=0]="TO_PCPF",R[R.FROM_PCPF=1]="FROM_PCPF";const C=(0,l.Su)(),j=(0,l.Su)(),L=(0,a.Su)(),P=(0,i.Su)()},21136:(e,t,r)=>{r.d(t,{Al:()=>g,GF:()=>m,_c:()=>f,k$:()=>p,mA:()=>h,mm:()=>y,wX:()=>u});var n=r(26832),o=r(66360),i=r(67776),a=r(51232),s=r(13708),l=r(48952);function c(){return o.c.getLogger("esri.geometry.Mesh")}function u(e){const{vertexSpace:t}=e;if(null!=t.origin)return e.clone();const{anchor:r}=e,n=r.clone(),o=new a.c({origin:[n.x,n.y,n.z]}),i=e.cloneWithVertexSpace(o),{position:s}=i.vertexAttributes;return i.vertexAttributes.position=(0,l.t)(new Float64Array(s.length),s,[-n.x,-n.y,-(n.z??0)]),i.vertexAttributesChanged(),i}function p(e){return null!=e.origin}function f(e){return p(e.vertexSpace)}function h(e,t){if(!p(e))return null;const[r,n,o]=e.origin;return new i.c({x:r,y:n,z:o,spatialReference:t})}function g(e,t){const{x:r,y:o,z:i,spatialReference:l}=e,u=[r,o,i??0];if(void 0!==t?.geographic){if((0,n.O2)(c(),"option: geographic",{replacement:"use vertexSpace option instead",version:"4.29",warnOnce:!0}),!t?.vertexSpace)return t?.geographic?new s.c({origin:u}):new a.c({origin:u});c().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")}if(!t?.vertexSpace)return l.isGeographic||l.isWebMercator?new s.c({origin:u}):new a.c({origin:u});switch(t.vertexSpace){case"local":return new s.c({origin:u});case"georeferenced":return new a.c({origin:u});case"georeferenced-absolute":return new a.c}}function m(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function y(e,t){return"local"===e?new s.c({origin:t}):new a.c({origin:t})}}}]);
|