@arcgis/core 6.0.0-next.56 → 6.0.0-next.57
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/00c227bcecc28fe278bb.js +1 -0
- package/assets/esri/core/workers/chunks/{88df1b8b295d3aed649f.js → 10499abb7678e95d9f05.js} +1 -1
- package/assets/esri/core/workers/chunks/1afc8820c283ef785729.js +1 -0
- package/assets/esri/core/workers/chunks/1c874f86bfd0963aa3d2.js +1 -0
- package/assets/esri/core/workers/chunks/2a84c9a81ec2bed3d4e5.js +1 -0
- package/assets/esri/core/workers/chunks/2f31766bc0f9d1d70c5a.js +1 -0
- package/assets/esri/core/workers/chunks/35109db6a6be66f895f7.js +1 -0
- package/assets/esri/core/workers/chunks/373b140f92eda3857f82.js +1 -0
- package/assets/esri/core/workers/chunks/38bba952c38af5a150e7.js +1 -0
- package/assets/esri/core/workers/chunks/3aea09191b737dc1de70.js +1 -0
- package/assets/esri/core/workers/chunks/3fc4b7d0ee460fc96176.js +1 -0
- package/assets/esri/core/workers/chunks/457bd1bd37c67b61efe8.js +1 -0
- package/assets/esri/core/workers/chunks/601d668e70c5d72fe58c.js +1 -0
- package/assets/esri/core/workers/chunks/651e33be8bb3995d749f.js +1 -0
- package/assets/esri/core/workers/chunks/721f43554b9654481de7.js +1 -0
- package/assets/esri/core/workers/chunks/75274ac3ddf7c45f47d7.js +1 -0
- package/assets/esri/core/workers/chunks/80d1267606383ae537f2.js +1 -0
- package/assets/esri/core/workers/chunks/8920d0b11951b57d6a66.js +1 -0
- package/assets/esri/core/workers/chunks/92d97e0fcc20dd5f5ac4.js +1 -0
- package/assets/esri/core/workers/chunks/9ca84fa9423654061d05.js +1 -0
- package/assets/esri/core/workers/chunks/9e372af03d62fa5ad10e.js +1 -0
- package/assets/esri/core/workers/chunks/b10c534cbe311d17b7d5.js +1 -0
- package/assets/esri/core/workers/chunks/{dfa1b0308e5e82d1ddfe.js → be0133fa63c5d6545a7f.js} +1 -1
- package/assets/esri/core/workers/chunks/cb0e3614b78c78040662.js +1 -0
- package/assets/esri/core/workers/chunks/d22e3b5d836dffdf91cc.js +1 -0
- package/assets/esri/core/workers/chunks/e0341def2d81e679a200.js +1 -0
- package/assets/esri/core/workers/chunks/e42e9dd3c933f5f864ab.js +1 -0
- package/assets/esri/core/workers/chunks/f4fcf87da4495584223d.js +1 -0
- package/assets/esri/core/workers/chunks/f989588dfdbb69056491.js +1 -0
- package/assets/esri/core/workers/chunks/fc5b920f9756e11c2f88.js +1 -0
- package/chunks/Component.glsl.js +1 -0
- package/chunks/GlobalIllumination.glsl.js +12 -11
- package/chunks/GlobalIlluminationBlur.glsl.js +6 -4
- package/chunks/Terrain.glsl.js +24 -23
- package/chunks/Water.glsl.js +24 -23
- package/config.js +1 -1
- package/core/memoryEstimations.js +1 -1
- package/interfaces.d.ts +0 -1
- package/kernel.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/graphics/transferFeatures.js +1 -1
- package/layers/support/fieldUtils.d.ts +129 -57
- package/layers/support/fieldUtils.js +1 -1
- package/networks/Network.js +1 -1
- package/networks/support/TopologyValidationJobInfo.js +1 -1
- package/package.json +2 -2
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/support/Tiles3DBVH.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/GroundAndIMSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/lastFrameUniforms.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +15 -12
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/globalIlluminationUniforms.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/getWaterColor.glsl.js +89 -0
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/assets/esri/core/workers/chunks/193a73a2c7f4f8482c21.js +0 -1
- package/assets/esri/core/workers/chunks/20acb6f3ed5140b6c6c6.js +0 -1
- package/assets/esri/core/workers/chunks/2d4788be418a4e5f6606.js +0 -1
- package/assets/esri/core/workers/chunks/333140b18aeb5a50b654.js +0 -1
- package/assets/esri/core/workers/chunks/4761cd436abceee858bf.js +0 -1
- package/assets/esri/core/workers/chunks/4de08ead94660025075b.js +0 -1
- package/assets/esri/core/workers/chunks/56f227e1a9e51d1fd742.js +0 -1
- package/assets/esri/core/workers/chunks/5bd451c7db17ee8f0315.js +0 -1
- package/assets/esri/core/workers/chunks/5c34d49a6c9cc34b7626.js +0 -1
- package/assets/esri/core/workers/chunks/62ddd3a82864e26f009a.js +0 -1
- package/assets/esri/core/workers/chunks/703373f529c1c334cfad.js +0 -1
- package/assets/esri/core/workers/chunks/733c32d8091427d84de7.js +0 -1
- package/assets/esri/core/workers/chunks/860552f49f17de2f3353.js +0 -1
- package/assets/esri/core/workers/chunks/9b727f45dfea84357b57.js +0 -1
- package/assets/esri/core/workers/chunks/a05a2c2aaf0c288f9681.js +0 -1
- package/assets/esri/core/workers/chunks/ab76170c374fd67ce8cd.js +0 -1
- package/assets/esri/core/workers/chunks/aebd12488b4004e207a3.js +0 -1
- package/assets/esri/core/workers/chunks/c7b1c6d57603fa385c54.js +0 -1
- package/assets/esri/core/workers/chunks/cd8181600623e18f511c.js +0 -1
- package/assets/esri/core/workers/chunks/cef537fa9705dd1cf685.js +0 -1
- package/assets/esri/core/workers/chunks/d33403d578fbeecaf844.js +0 -1
- package/assets/esri/core/workers/chunks/ddbfa664e69612295785.js +0 -1
- package/assets/esri/core/workers/chunks/ded81c504bf44806ca7d.js +0 -1
- package/assets/esri/core/workers/chunks/e0466387b2ab54d706ca.js +0 -1
- package/assets/esri/core/workers/chunks/ee70be138831cc2a0f56.js +0 -1
- package/assets/esri/core/workers/chunks/efd6ea0966f60ab19520.js +0 -1
- package/assets/esri/core/workers/chunks/f23c4fd014126ea7abc6.js +0 -1
- package/assets/esri/core/workers/chunks/f6e40f3faf0c80cf1b3a.js +0 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +0 -70
|
@@ -218,7 +218,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
218
218
|
vec2 uvOffset = uv + rf * blurSize;
|
|
219
219
|
blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
|
|
220
220
|
}
|
|
221
|
-
fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>o,f:()=>a,n:()=>n});var i=r(34275);function n(e,t){o(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r=2,n=r){let o=t.length/2,a=0,s=0;if(!(0,i.iu)(t)||(0,i.dk)(t)){for(let i=0;i<o;++i)e[a]=t[s],e[a+1]=t[s+1],a+=r,s+=n;return}let l=(0,i.a3)(t);if((0,i.JI)(t))for(let i=0;i<o;++i)e[a]=Math.max(t[s]/l,-1),e[a+1]=Math.max(t[s+1]/l,-1),a+=r,s+=n;else for(let i=0;i<o;++i)e[a]=t[s]/l,e[a+1]=t[s+1]/l,a+=r,s+=n}function a(e,t,r,i){let n=e.typedBuffer,o=e.typedBufferStride,a=i?.count??e.count,s=(i?.dstIndex??0)*o;for(let e=0;e<a;++e)n[s]=t,n[s+1]=r,s+=o}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:o,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>d,b:()=>s,c:()=>n,d:()=>a,e:()=>h,f:()=>u,l:()=>c,n:()=>f,t:()=>o}),r(44208);var i=r(72727);function n(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[4],f=r[5],m=r[6],p=r[8],v=r[9],g=r[10],x=r[12],_=r[13],b=r[14],y=0,w=0;for(let r=0;r<l;r++){let r=t[y],i=t[y+1],a=t[y+2];e[w]=c*r+h*i+p*a+x,e[w+1]=u*r+f*i+v*a+_,e[w+2]=d*r+m*i+g*a+b,y+=o,w+=n}return e}function a(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=0,_=0;for(let r=0;r<l;r++){let r=t[x],i=t[x+1],a=t[x+2];e[_]=c*r+h*i+p*a,e[_+1]=u*r+f*i+v*a,e[_+2]=d*r+m*i+g*a,x+=o,_+=n}}function l(e,t,r,i=3,n=i){let o=Math.min(e.length/i,t.length/n),a=0,s=0;for(let l=0;l<o;l++)e[s]=r*t[a],e[s+1]=r*t[a+1],e[s+2]=r*t[a+2],a+=n,s+=i;return e}function c(e,t,r,i){u(e.typedBuffer,t.typedBuffer,r,i,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r,i,n=3,o=n){let a=Math.min(e.length/n,t.length/o),s=0,l=0,c=1/2.2;for(let u=0;u<a;u++)e[l]=i*(r*t[s])**c,e[l+1]=i*(r*t[s+1])**c,e[l+2]=i*(r*t[s+2])**c,s+=o,l+=n}function d(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=0,u=0;for(let i=0;i<l;i++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=o,u+=n;return e}function h(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,r=3,i=r){let n=Math.min(e.length/r,t.length/i),o=0,a=0;for(let s=0;s<n;s++){let n=t[o],s=t[o+1],l=t[o+2],c=n*n+s*s+l*l;if(c>0){let t=1/Math.sqrt(c);e[a]=t*n,e[a+1]=t*s,e[a+2]=t*l}o+=i,a+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:f,normalizeView:h,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){let i=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,l=0,c=0;for(let e=0;e<i;e++)n[c]=a[l]>>r,n[c+1]=a[l+1]>>r,n[c+2]=a[l+2]>>r,l+=s,c+=o},transformMat3:s,transformMat3View:a,transformMat4:o,transformMat4View:n,translate:d},Symbol.toStringTag,{value:"Module"}))},50867(e,t,r){r.d(t,{a:()=>n,b:()=>c,l:()=>l,n:()=>a,t:()=>o}),r(44208);var i=r(72727);function n(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,n=4,o=n){let a=(0,i.k)(e.length,n,4),s=(0,i.k)(t.length,o,4),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=0,_=0;for(let r=0;r<l;r++){let r=t[x],i=t[x+1],a=t[x+2],s=t[x+3];e[_]=c*r+h*i+p*a,e[_+1]=u*r+f*i+v*a,e[_+2]=d*r+m*i+g*a,e[_+3]=s,x+=o,_+=n}}function a(e,t){let r=Math.min(e.count,t.count),i=e.typedBuffer,n=e.typedBufferStride,o=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){let t=e*n,r=e*a,s=o[r],l=o[r+1],c=o[r+2],u=s*s+l*l+c*c;if(u>0){let e=1/Math.sqrt(u);i[t]=e*s,i[t+1]=e*l,i[t+2]=e*c}}}function s(e,t,r,i=4){let n=Math.min(e.length/i,t.count),o=t.typedBuffer,a=t.typedBufferStride,s=0,l=0;for(let t=0;t<n;t++)e[l]=r*o[s],e[l+1]=r*o[s+1],e[l+2]=r*o[s+2],e[l+3]=r*o[s+3],s+=a,l+=i}function l(e,t,r,i){c(e.typedBuffer,t,r,i,e.typedBufferStride)}function c(e,t,r,i,n=4){let o=Math.min(e.length/n,t.count),a=t.typedBuffer,s=t.typedBufferStride,l=0,c=0,u=1/2.2;for(let t=0;t<o;t++)e[c]=i*(r*a[l])**u,e[c+1]=i*(r*a[l+1])**u,e[c+2]=i*(r*a[l+2])**u,e[c+3]=i*r*a[l+3],l+=s,c+=n}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:l,normalize:a,scale:s,scaleView:function(e,t,r){s(e.typedBuffer,t,r,e.typedBufferStride)},transformMat3:o,transformMat3View:n,transformMat4:function(e,t,r,n=4,o=n){let a=(0,i.k)(e.length,n,4),s=(0,i.k)(t.length,o,4),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=r[9],_=r[10],b=r[11],y=r[12],w=r[13],M=r[14],T=r[15],S=0,C=0;for(let r=0;r<l;r++){let r=t[S],i=t[S+1],a=t[S+2],s=t[S+3];e[C]=c*r+f*i+g*a+y*s,e[C+1]=u*r+m*i+x*a+w*s,e[C+2]=d*r+p*i+_*a+M*s,e[C+3]=h*r+v*i+b*a+T*s,S+=o,C+=n}},transformMat4View:function(e,t,r){let n=e.typedBuffer,o=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,l=(0,i.k)(n.length,o,4),c=(0,i.k)(a.length,s,4),u=Math.min(l,c),d=r[0],h=r[1],f=r[2],m=r[3],p=r[4],v=r[5],g=r[6],x=r[7],_=r[8],b=r[9],y=r[10],w=r[11],M=r[12],T=r[13],S=r[14],C=r[15];for(let e=0;e<u;e++){let t=e*o,r=e*s,i=a[r],l=a[r+1],c=a[r+2],u=a[r+3];n[t]=d*i+p*l+_*c+M*u,n[t+1]=h*i+v*l+b*c+T*u,n[t+2]=f*i+g*l+y*c+S*u,n[t+3]=m*i+x*l+w*c+C*u}}},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+a(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,i,n=0,o=!1){return(i-=n)<t?i+=a(e,t-i):i>r&&(i-=a(e,i-r)),o&&i===r&&(i=t),i+n}function a(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360));r.d(t,["ie",0,l,"uC",0,s])},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){let[r,o]=e.split(".",2),a=/^\s*\d+\s*$/;if(!r?.match||!a.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!o?.match||!a.test(o)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new n(parseInt(r,10),parseInt(o,10),t)}}},61473(e,t,r){function i(e){return e||=globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function n(e,t){return e?(t||=globalThis.location.hostname,t?null!=t.match(o)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(a)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e):null}r.d(t,{EM:()=>n,b5:()=>i});const o=/^devext\.arcgis\.com$/,a=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,a,/^jsapps\.esri\.com$/,s,l]},18370(e,t,r){r.d(t,{z:()=>n});class i{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function n(e){return new i(e)}},88340(e,t,r){function i(){return new Float32Array(2)}function n(e,t){let r=new Float32Array(2);return r[0]=e,r[1]=t,r}function o(){return i()}function a(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{Un:()=>u,fA:()=>n,uY:()=>c,vt:()=>i});const c=o(),u=a(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){let t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,fromValues:n,ones:a,unitX:s,unitY:l,zeros:o},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{JY:()=>f,Qf:()=>l,Qh:()=>a,lM:()=>o,ro:()=>c,rq:()=>u});var i=r(44208),n=r(34275);function o(e){if(!e)return 0;let t=d;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let r=h;for(let i=0;i<t;i++)r+=s(e[i]);return r}(e);let t=d;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?a(e):d;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+c(t),0)}function c(e,t=16){return e?(0,n.iu)(e)?e.byteLength+m:Array.isArray(e)?u(e,t):0:0}function u(e,t){return h+e.length*t}const d=32,h=16,f=(0,i.A)("ios")||!(0,i.A)("chrome")&&!(0,i.A)("opr")?8:4,m=145},65806(e,t,r){r.d(t,{g:()=>a});var i=r(51850),n=r(99917),o=r(9762);function a(e,t,r,i){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,o.projectBuffer)(s,e.spatialReference,0,t,r,0);let a=(0,n.tryProject)(e,r,i);return!!a&&(t[0]=a.x,t[1]=a.y,t[2]=a.z??0,!0)}const s=(0,i.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var i=r(99917),n=r(16930),o=r(9762),a=r(65806);function s(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,i.canProjectWithoutEngine)(t,n)?(0,o.projectBuffer)(e,t,0,r,n,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,a.g)(l,r,n)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},97146(e,t,r){r.d(t,{Dg:()=>o,lc:()=>d,my:()=>a,tM:()=>h,uW:()=>n});var i=r(34275);function n(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let r=!0,n=!0;return e.some((e,t)=>(r&&=0===e,n&&=e===t,!r&&!n)),r?function(e){if(1===e)return c;if(e<1024)return Array(e).fill(0);if(e>l.length){let t=Math.max(2*l.length,e);l=new Uint8Array(t)}return new Uint8Array(l.buffer,0,e)}(e.length):n?h(e.length):(0,i.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(let r of e){if(r>=65536)return(0,i.iu)(e)?e:new Uint32Array(e);r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function a(e,t=e){return e<=1024?Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}let s=f(131072),l=new Uint8Array(65536);const c=[0],u=(()=>{let e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function d(e){if(e===c)return!0;if(!(0,i.iu)(e))return!1;let{buffer:t}=e;return t===u.buffer||t===s.buffer||t===l.buffer}function h(e){return 1===e?c:e<1024?function(e){let t=Array(e).fill(0);for(let r=0;r<e;r++)t[r]=r;return t}(e):e<u.length?new Uint16Array(u.buffer,0,e):(e>s.length&&(s=f(Math.max(2*s.length,e))),new Uint32Array(s.buffer,0,e))}function f(e){let t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}},72727(e,t,r){function i(e,t,r){if(t<=0)return 0;let i=e-r;return i<0?0:Math.floor(i/t)+1}r.d(t,{k:()=>i}),r(53966)},65720(e,t,r){r.d(t,{C:()=>g,vt:()=>p,Qy:()=>v,ui:()=>x,ST:()=>T,bU:()=>C,pw:()=>M,m7:()=>_,ZU:()=>b,GH:()=>w,Pi:()=>y,LJ:()=>S,c8:()=>I});var i=r(58083),n=r(35522),o=r(51850),a=r(78955),s=r(91829),l=r(4341),c=r(70328),u=r(71351);function d(e){return e?{ray:(0,u.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,u.vt)(),c0:0,c1:Number.MAX_VALUE}}new l.I(()=>d());var h=r(27921);function f(e,t,r,i){let{t0:n,t1:o}=i,a=(0,h.mN)(e,t),s=(0,h.mN)(e,r);if(a>=0&&s>=0)return!1;if(a<0&&s>=0){let e=-a/(s-a);if(e<n)return!1;e<o&&(o=e)}else if(a>=0&&s<0){let e=a/(a-s);if(e>o)return!1;e>n&&(n=e)}return i.t0=n,i.t1=o,!0}var m=r(32114);function p(e){return e?[(0,h.vt)(e[0]),(0,h.vt)(e[1]),(0,h.vt)(e[2]),(0,h.vt)(e[3]),(0,h.vt)(e[4]),(0,h.vt)(e[5])]:[(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)()]}function v(){return[(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)()]}function g(e,t){for(let r=0;r<O;r++)(0,h.C)(e[r],t[r]);return e}function x(e,t,r,o=F){let s=(0,i.lw)(m.Rc.get(),t,e);(0,i.B8)(s,s);for(let e=0;e<P;++e){let t=(0,a.Z0)(m.Km.get(),D[e],s);(0,n.hZ)(o[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}var l,c;l=r,c=o,(0,h.Cr)(c[4],c[0],c[3],l[0]),(0,h.Cr)(c[1],c[5],c[6],l[1]),(0,h.Cr)(c[4],c[5],c[1],l[2]),(0,h.Cr)(c[3],c[2],c[6],l[3]),(0,h.Cr)(c[0],c[1],c[2],l[4]),(0,h.Cr)(c[5],c[4],c[7],l[5])}function _(e,t){return b(e,t.center,t.radius)}function b(e,t,r){for(let i=0;i<O;i++){let n=e[i];if(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]>=r)return!1}return!0}function y(e,t,r){for(let i of E)if((0,h.wE)(e[i],t,r))return!0;return!1}function w(e,t,r){let i=(0,c.gX)(t,B),o=(0,c.VL)(t)/2,a=(0,c.yr)(t)/2,s=(0,c.uJ)(t)/2;return r?function(e,t,r,i,o,a){let s=(0,n.Z0)(N,t,a);for(let t=0;t<O;t++){let n=e[t];if(n[0]*s[0]+n[1]*s[1]+n[2]*s[2]+n[3]-(Math.abs(n[0]*a[0]+n[1]*a[1]+n[2]*a[2])*r+Math.abs(n[0]*a[4]+n[1]*a[5]+n[2]*a[6])*i+Math.abs(n[0]*a[8]+n[1]*a[9]+n[2]*a[10])*o)>0)return!1}return!0}(e,i,o,a,s,r):function(e,t,r,i,n){for(let o=0;o<O;o++){let a=e[o];if(a[0]*t[0]+a[1]*t[1]+a[2]*t[2]+a[3]-(Math.abs(a[0])*r+Math.abs(a[1])*i+Math.abs(a[2])*n)>0)return!1}return!0}(e,i,o,a,s)}function M(e,t){return A(e,function(e,t=d()){return(0,u.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,R.get()))}function T(e,t,r){return A(e,function(e,t,r=d()){let i=(0,n.Bw)(e.vector);return(0,u.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,R.get()))}function S(e,t,r){return function(e,t,r,i){let n={t0:0,t1:1};for(let o of t)if(!f(e[o],r,i,n))return!1;return n.t0<n.t1}(e,E,t,r)}function C(e,t){for(let r=0;r<O;r++)if((0,h.mN)(e[r],t)>0)return!1;return!0}function A(e,t){for(let r=0;r<O;r++)if(!(0,h.$Q)(e[r],t))return!1;return!0}const E=[0,1,2,3,5],I={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},O=6,P=8,D=[(0,s.fA)(-1,-1,-1,1),(0,s.fA)(1,-1,-1,1),(0,s.fA)(1,1,-1,1),(0,s.fA)(-1,1,-1,1),(0,s.fA)(-1,-1,1,1),(0,s.fA)(1,-1,1,1),(0,s.fA)(1,1,1,1),(0,s.fA)(-1,1,1,1)],R=new l.I(d),F=v(),B=(0,o.vt)(),N=(0,o.vt)()},11964(e,t,r){r.d(t,{Cr:()=>u,LV:()=>c,_I:()=>d,vt:()=>l});var i=r(35522),n=r(51850),o=r(34727),a=r(4341),s=r(32114);function l(e){return e?{origin:(0,n.o8)(e.origin),vector:(0,n.o8)(e.vector)}:{origin:(0,n.vt)(),vector:(0,n.vt)()}}function c(e,t){let r=h.get();return r.origin=e,r.vector=t,r}function u(e,t,r=l()){return(0,i.C)(r.origin,e),(0,i.Re)(r.vector,t,e),r}function d(e,t,r){return function(e,t,r,n,a){let{vector:l,origin:c}=e,u=(0,i.Re)(s.rq.get(),t,c),d=(0,i.Om)(l,u)/(0,i.m3)(l);return(0,i.hs)(a,l,(0,o.qE)(d,0,1)),(0,i.WQ)(a,a,e.origin)}(e,t,0,0,r)}(0,n.vt)(),(0,n.vt)();const h=new a.I(()=>l())},52039(e,t,r){r.d(t,{O7:()=>h,Y_:()=>m,el:()=>c});var i=r(69052),n=(r(49186),r(18370)),o=r(17676),a=(r(5443),r(39829)),s=(r(82799),r(16930)),l=(r(80754),r(21325));async function c(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let i=null;for(let t of e)i??=t?.spatialReference;if(!i)return e;let n=(0,l.Vp)(i);if(!n)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(n);return["xmin"in t?t:new a.A(t)]}let[s,c]=n.valid,h=!1;for(let t of e){if(!t)continue;if("point"===t.type){h||=t.x>=c,h||=t.x<=s;continue}let{extent:e}=t;if(null==e){h=!0;break}h||=e.xmin>=c,h||=e.xmin<=s,h||=e.xmax>=c,h||=e.xmax<=s}if(!h)return e;let[{foldInto360Range:f},m]=await(0,o.qr)(Promise.all([u.getImportPromise(),d.getImportPromise()]),r),p=m.fromSpatialReference(i);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=m.fromGeometry(e),r=m.toGeometry(f(t,p),i);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const u=(0,n.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),d=(0,n.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function h(e,t,r){let i=(0,l.Vp)(r);if(null==i)return e;let[n,o]=i.valid,a=2*o,s=0,c=0;t>o?s=Math.ceil(Math.abs(t-o)/a):t<n&&(s=-Math.ceil(Math.abs(t-n)/a)),e>o?c=Math.ceil(Math.abs(e-o)/a):e<n&&(c=-Math.ceil(Math.abs(e-n)/a));let u=e+(s-c)*a,d=u-t;return d>o?u-=a:d<n&&(u+=a),u}function f(e){let t=(0,l.Vp)(e);if(null==t)return null;let[r,n]=t.valid;return new i.hr(r,n)}const m=f(s.A.WGS84);f(s.A.WebMercator)},48295(e,t,r){r.d(t,{BU:()=>u,Ui:()=>s,cq:()=>c,k3:()=>d,rb:()=>h});var i=r(35522),n=r(51850),o=r(4341),a=r(11964);function s(e,t,r){let{direction:n,origin:o}=t,{p0:a,p1:s,p2:l}=e,c=s[0]-a[0],u=s[1]-a[1],d=s[2]-a[2],h=l[0]-a[0],f=l[1]-a[1],m=l[2]-a[2],p=n[1]*m-f*n[2],v=n[2]*h-m*n[0],g=n[0]*f-h*n[1],x=c*p+u*v+d*g;if(x>-1e-5&&x<1e-5)return!1;let _=1/x,b=o[0]-a[0],y=o[1]-a[1],w=o[2]-a[2],M=_*(b*p+y*v+w*g);if(M<0||M>1)return!1;let T=y*d-u*w,S=w*c-d*b,C=b*u-c*y,A=_*(n[0]*T+n[1]*S+n[2]*C);if(A<0||M+A>1)return!1;if(r){let e=_*(h*T+f*S+m*C);(0,i.hs)(r,n,e),(0,i.WQ)(r,o,r)}return!0}function l(e,t,r){let[i,n]=e,[o,a]=t,[s,l]=r;return.5*((o-i)*(l-n)-(a-n)*(s-i))}function c(e,t,r,i,n=0){let o=l(i,e,t),a=l(i,t,r),s=l(i,r,e);return!((o<-n||a<-n||s<-n)&&(o>n||a>n||s>n))}function u(e,t,r){return(0,i.Re)(f,t,e),(0,i.Re)(m,r,e),.5*(0,i.Bw)((0,i.$A)(f,f,m))}function d(e,t,r,n,o){(0,i.jb)(f,n,r),(0,i.jb)(p,o,r),(0,i.jb)(m,t,r);let a=(0,i.Om)(f,m),s=(0,i.Om)(p,m);if(a<=0&&s<=0)return void(0,i.C)(e,r);(0,i.jb)(m,t,n);let l=(0,i.Om)(f,m),c=(0,i.Om)(p,m);if(l>=0&&c<=l)return void(0,i.C)(e,n);let u=a*c-l*s;if(u<=0&&a>=0&&l<=0)return void(0,i.Ln)(e,r,f,a/(a-l));(0,i.jb)(m,t,o);let d=(0,i.Om)(f,m),h=(0,i.Om)(p,m);if(h>=0&&d<=h)return void(0,i.C)(e,o);let v=d*s-a*h;if(v<=0&&s>=0&&h<=0)return void(0,i.Ln)(e,r,p,s/(s-h));let g=l*h-d*c;if(g<=0&&c-l>=0&&d-h>=0)return(0,i.jb)(m,o,n),void(0,i.Ln)(e,n,m,(c-l)/(c-l+(d-h)));let x=1/(g+v+u);(0,i.C)(e,r),(0,i.Ln)(e,e,f,v*x),(0,i.Ln)(e,e,p,u*x)}function h(e,t,r,n){(0,i.jb)(f,r,t),(0,i.jb)(m,n,t),(0,i.$A)(e,f,m);let o=(0,i.Bw)(e);return 0!==o&&((0,i.hs)(e,e,1/o),!0)}r(32114),new o.I(a.vt),new o.I(()=>{return e?{p0:(0,n.o8)(e.p0),p1:(0,n.o8)(e.p1),p2:(0,n.o8)(e.p2)}:{p0:(0,n.vt)(),p1:(0,n.vt)(),p2:(0,n.vt)()};var e});const f=(0,n.vt)(),m=(0,n.vt)(),p=(0,n.vt)()},21015(e,t,r){r.d(t,{R:()=>l});var i=r(60999),n=r(49186),o=r(17676),a=r(84952),s=r(78888);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,a.DB)(e)?((0,o.Te)(t),(0,a.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);let a=await(0,i.Ke)((0,s.A)(t,{responseType:e,...r}));if(a.ok)return a.value.data;throw(0,o.QP)(a.error),new n.A("gltf-loader-request-error",`Request for resource failed: ${a.error}`)}}},84498(e,t,r){r.d(t,{x:()=>a});var i=r(34275),n=r(97146),o=r(63907);function a(e,t){switch(t){case o.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,i.mg)(e)?new Uint16Array(e):e}(e);case o.WR.TRIANGLE_STRIP:return function(e){let t="number"==typeof e?e:e.length;if(t<3)return[];let r=t-2,i=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(i[e++]=t,i[e++]=t+1,i[e++]=t+2):(i[e++]=t+1,i[e++]=t,i[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(i[t++]=e[n],i[t++]=e[n+1],i[t++]=e[n+2]):(i[t++]=e[n+1],i[t++]=e[n],i[t++]=e[n+2])}return i}(e);case o.WR.TRIANGLE_FAN:return function(e){let t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array;let r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)i[e++]=0,i[e++]=t+1,i[e++]=t+2;return i}let n=e[0],o=e[1],a=0;for(let t=0;t<r;++t){let r=e[t+2];i[a++]=n,i[a++]=o,i[a++]=r,o=r}return i}(e)}}},51530(e,t,r){r.d(t,{KB:()=>a,Xi:()=>n,pn:()=>s,x3:()=>o});var i=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function o(e){return"encoded-mesh-texture"===e?.type}async function a(e){let t=await new Blob([e]).text();return JSON.parse(t)}async function s(e,t){if("image/ktx2"===t)return new n(e);let r=new Blob([e],{type:t}),o=URL.createObjectURL(r);switch(t){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}let a=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{let r=()=>{n(),e(a)},i=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(o),a.removeEventListener("load",r),a.removeEventListener("error",i)};a.addEventListener("load",r),a.addEventListener("error",i),a.src=o});try{a.src=o,await a.decode()}catch{}return URL.revokeObjectURL(o),a}},47143(e,t,r){r.d(t,{fetch:()=>Or});var i=r(40876),n=r(61473),o=r(77690),a=r(29242),s=r(58083),l=r(9093),c=r(48163),u=r(35522),d=r(51850),h=r(34727),f=r(70328),m=r(13030),p=r(73354),v=r(50867),g=r(43609);function x(e,t=!1){return e<=1024?t?Array(e).fill(0):Array(e):new Float32Array(e)}var _=r(21015),b=r(84498),y=r(51530),w=r(88340);function M(e){if(null==e)return null;let t=null==e.offset?w.uY:e.offset,r=null==e.rotation?0:e.rotation,i=null==e.scale?w.Un:e.scale,n=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,a.fA)(i[0],0,0,0,i[1],0,0,0,1),c=(0,a.vt)();return(0,o.lw)(c,s,l),(0,o.lw)(c,n,c),c}var T=r(46610),S=r(69397),C=r(97146),A=r(94656),E=r(34275);function I(e){if(e.length<1024)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,E.LW)(e)?Float16Array.from(e):(0,E.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return(0,E.vZ)(e)?Float32Array.from(e):Uint32Array.from(e);default:return Float64Array.from(e)}}var O=r(15142),P=r(28540),D=r(620);class R{constructor(e,t,r,i){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this._readPosition=r,this._notifyMemoryChange=i,this._children=void 0,(0,D.vA)(e.length>=1);let n=e.length;z.clear();let o=(0,f.Ie)();for(let i=0;i<n;++i){let n=t*e[i];for(let e=0;e<t;++e){let t=n+e;z.push(t),(0,f.iT)(o,r(F,t))}}this.box=o;let a=new P.i,s=(0,f.gX)(o,a.center),l=.5*Math.max((0,f.VL)(o),(0,f.yr)(o),(0,f.uJ)(o)),c=l*l;for(let e=0;e<z.length;++e){let t=r(F,z.at(e)),i=(0,u.Re)(t,t,s),n=(0,u.uE)(i);if(n<=c)continue;let o=Math.sqrt(n),a=.5*(o-l);l+=a,c=l*l;let d=a/o;(0,u.Ln)(s,s,i,d)}a.radius=l,this.sphere=a,z.clear()}get usedMemory(){let e=88+(0,S.rq)(this.box,8)+32+16+(0,S.rq)(this.sphere.center,8)+function(e){return(0,E.iu)(e)?145+((0,C.lc)(e)?0:e.byteLength):(0,C.lc)(e)?0:(0,S.rq)(e,S.JY)}(this.primitiveIndices),t=this._children;if(t){e+=(0,S.rq)(t,8);for(let r of t)e+=r.usedMemory}return e}get children(){if(this._children)return this._children;let e=this.box;if((0,f.TF)(e)<=1)return;let{_readPosition:t,_numIndexPerPrimitive:r,primitiveIndices:i}=this,n=(0,f.gX)(e,F),o=i.length,a=new Uint8Array(o),s=[0,0,0,0,0,0,0,0];for(let e=0;e<o;++e){let o=r*i[e],l=t(B,o);for(let e=1;e<r;++e)(0,u.jk)(l,l,t(N,o+e));let c=+(l[0]<n[0])|(l[1]<n[1]?2:0)|(l[2]<n[2]?4:0);a[e]=c,++s[c]}let l=0;for(let e=0;e<8;++e)s[e]>0&&++l;if(l<2)return;let c=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0];for(let e=0;e<8;++e)s[e]>0&&(c[e]=new Uint32Array(s[e]));s.fill(0);for(let e=0;e<o;++e){let t=a[e];c[t][s[t]++]=i[e]}let d=[];for(let e=0;e<8;++e){let i=c[e];void 0!==i&&d.push(new R(i,r,t,this._notifyMemoryChange))}return this._children=d,this._notifyMemoryChange?.((0,S.rq)(d,8)+d.reduce((e,t)=>e+t.usedMemory,0)),d}static prune(){z.prune()}}const F=(0,d.vt)(),B=(0,d.vt)(),N=(0,d.vt)(),z=new O.A({deallocator:null});var L=r(24326);class H{constructor(e){this.id=(0,L.c)(),this.type=0,this._attributes=new Map;for(let[t,r]of e)this._attributes.set(t,{...r,indices:(0,C.Dg)(r.indices)})}get attributes(){return this._attributes}}class V{constructor(){this.uid=(0,L.c)()}}class U extends V{constructor(e){super(),this.highlightName=e,this.channel=0}}class j extends H{get usedMemoryExcludingBuffers(){return this._usedMemory+this._primitivePositionIndicesMemory+(this._boundingInfo?.usedMemory??0)}get _primitivePositionIndicesMemory(){let e=this._vertexPositionIndicesCache;return e&&e!==this.positionAttribute?.indices?(0,S.ro)(e,S.JY):0}computeBufferMemory(e){let t=e.arrayMemory(this.mapPositions)+e.arrayMemory(this.drawIndices,S.JY,!0);for(let r of this.attributes.values())t+=e.arrayMemory(r.data)+e.arrayMemory(r.indices,S.JY,!0);return t}constructor(e,t,r=null,i=-1,n,o){super(t),this.material=e,this.mapPositions=r,this.edgeIndicesLength=i,this.baseGeometry=n,this.drawIndices=o,this._usedMemory=0,this._readPrimitivePosition=null,this._vertexPositionIndicesCache=void 0,this._transformation=void 0,this.localOrigin=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0,this._boundingInfo=null,(0,D.vA)((e?.useIndexing??!1)===(null!=o),"Material index requirement and Geometry must match"),this.edgeIndicesLength<0&&(this.edgeIndicesLength=this.indexCount)}get readPrimitivePosition(){return this._readPrimitivePosition??=function(e,t){let{data:r,indices:i,size:n,stride:o}=e;return(0,D.vA)(2===n||3===n||4===n,"Position attribute must have 2, 3 or 4 components"),2===n?null==t?(e,t)=>{let n=i[t]*o;return e[0]=r[n],e[1]=r[n+1],e[2]=-2,e}:(e,n)=>{let a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=-2,e}:null==t?function(e,t,r){return(i,n)=>{let o=t[n]*r;return i[0]=e[o],i[1]=e[o+1],i[2]=e[o+2],i}}(r,i,o):(e,n)=>{let a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=r[a+2],e}}(this.positionAttribute,this.drawIndices),this._readPrimitivePosition}_invalidateReadPrimitivePosition(){this._readPrimitivePosition=null}instantiate(e={}){let t=new j(e.material||this.material,[],this.mapPositions,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)}),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:I(t.data)},this._attributes.set(e,t),"position"===e&&this._invalidateReadPrimitivePosition()),t}setAttributeData(e,t){let r=this._attributes.get(e);r?(this._attributes.set(e,{...r,exclusive:!0,data:t}),"position"===e&&this._invalidateReadPrimitivePosition()):(0,A.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get primitivePositionIndices(){if(void 0!==this._vertexPositionIndicesCache)return this._vertexPositionIndicesCache;this._vertexPositionIndicesCache=this._computePrimitivePositionIndices();let e=this._primitivePositionIndicesMemory;return e&&this.notifyMemoryChange?.(e),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){let{drawIndices:e}=this,t=this.positionAttribute;if(null!=e&&null!=t){let r=Array(e.length).fill(0);for(let i=0;i<e.length;i++)r[i]=t.indices[e[i]];return r}return t?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){return(this.drawIndices??this.positionAttribute?.indices)?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo||(this._boundingInfo=this._calculateBoundingInfo(),this._boundingInfo&&this.notifyMemoryChange?.(this._boundingInfo.usedMemory)),this._boundingInfo}computeAttachmentOrigin(e){return!!this.material.computeAttachmentOrigin(e,this.readPrimitivePosition,this.indexCount)&&(null!=this._transformation&&(0,u.Z0)(e,e,this._transformation),!0)}invalidateBoundingInfo(){let e=this._primitivePositionIndicesMemory+(this._boundingInfo?.usedMemory??0);this._boundingInfo=null,this._vertexPositionIndicesCache=void 0,e&&this.notifyMemoryChange?.(-e)}_calculateBoundingInfo(){let e=this.positionAttribute,t=this.indexCount;if(!e||0===t)return null;let r=this.material.primitiveVertexCount;(0,D.vA)(t%r===0,"Indexing error: "+t+" not divisible by "+r);let i=(0,C.tM)(t/r);return new R(i,r,this.readPrimitivePosition,e=>this.notifyMemoryChange?.(e))}get transformation(){return this._transformation??l.zK}set transformation(e){this._transformation=e&&e!==l.zK?(0,l.o8)(e):null}get highlights(){return this._highlights||G}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}forEachHighlightOption(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){let t=new U(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);let{highlightName:t}=e,r=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,r),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){let{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const G=new Set;var k=r(76200),W=r(49788),$=r(49255),Z=r(97768),q=r(17676),Y=r(65786);class X{constructor(e){this._material=e.material,this._techniques=e.techniques}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(t))}ensureResources(e){return 2}}class K extends X{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,Z.Gz)(this._texture),this._textureNormal=(0,Z.Gz)(this._textureNormal),this._textureEmissive=(0,Z.Gz)(this._textureEmissive),this._textureOcclusion=(0,Z.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,Z.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new Q(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){(null==this._texture||e!==this._texture.id)&&(this._texture=(0,Z.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);let r=this._textures.acquire(e);(0,q.$X)(r)?(++this._numLoading,r.then(e=>{this._disposed?((0,Z.Gz)(e),t(null)):t(e)}).finally(()=>--this._numLoading)):t(r)}}class J extends Y.Y{constructor(e=null){super(),this.textureEmissive=e}}class Q extends J{constructor(e,t,r,i,n,o,a){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.normalScale=o,this.normalTextureTransformMatrix=a}}var ee=r(19245),te=r(48295);const re=(0,d.vt)(),ie=(0,d.vt)(),ne=(0,d.vt)(),oe=(0,d.vt)();class ae{constructor(e,t){this.id=(0,L.c)(),this.supportsEdges=!1,this.primitiveVertexCount=3,this._renderPriority=0,this._parameters=new t,(0,ee.MB)(this._parameters,e),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,ee.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get emissions(){return 0}getConfiguration(e){return this.updateConfiguration(e),this._configuration}updateConfiguration(e){this._configuration.output=e.output,this._configuration.hasEmission=e.hasEmission&&(0,$._o)(e.output),this._configuration.hasHighlightMixTexture=10===e.output&&null!=e.highlightMixTexture,this._configuration.useFloatBlend=e.useFloatBlend.value,this._configuration.emissionDimmingPass=e.transparentWithoutDepthEmissionDimmingPass&&(0,$._o)(e.output)}computeAttachmentOrigin(e,t,r){return function(e,t,r){if(r<=0)return!1;(0,u.hZ)(e,0,0,0),(0,u.hZ)(oe,0,0,0);let i=0,n=0;for(let o=0;o<r;++o){let r=3*o;t(re,r),t(ie,r+1),t(ne,r+2);let a=(0,te.BU)(re,ie,ne);a?((0,u.WQ)(re,re,ie),(0,u.WQ)(re,re,ne),(0,u.hs)(re,re,1/3*a),(0,u.WQ)(e,e,re),i+=a):((0,u.WQ)(oe,oe,re),(0,u.WQ)(oe,oe,ie),(0,u.WQ)(oe,oe,ne),n+=3)}return!(0===n&&0===i||(0===i?0===n||((0,u.hs)(e,oe,1/n),0):((0,u.hs)(e,e,1/i),0)))}(e,t,r/3)}getPrimitivePositionCount(e,t){return(t??e).indexCount}}Y.Y;var se=r(58682),le=r(90629),ce=r(65720),ue=r(27921),de=r(19419),he=r(11964);function fe(e,t){return e.isRectangle?(0,de.Uc)(e.bounds,t):function(e,t){return pe(e[0],e[1],t)}(t,e.points)}function me(e,t,r,i){let n=Math.min(t[0],r[0],i[0]),o=Math.min(t[1],r[1],i[1]),a=Math.max(t[0],r[0],i[0]),s=Math.max(t[1],r[1],i[1]);if(!function(e,t){if(!(0,de.HY)(e.bounds,t))return!1;if(e.isRectangle)return!0;for(let r of e.points)if((0,de.Uc)(t,r))return!0;if(function(e,t){let r=e[0],i=e[1],n=e[2],o=e[3];return pe(r,i,t)||pe(n,i,t)||pe(n,o,t)||pe(r,o,t)}(t,e.points))return!0;for(let r=0;r<e.points.length;r++)if(ve(e.points[r],r===e.points.length-1?e.points[0]:e.points[r+1],t))return!0;return!1}(e,(0,de.fA)(n,o,a,s,we)))return!1;if(fe(e,t)||fe(e,r)||fe(e,i))return!0;for(let n of e.points)if((0,te.cq)(t,r,i,n,Me))return!0;for(let n=0;n<e.points.length;n++){let o=e.points[n],a=e.points[(n+1)%e.points.length];if(xe(t,r,o,a)||xe(r,i,o,a)||xe(i,t,o,a))return!0}return!1}function pe(e,t,r){let i=!1;for(let n=0,o=r.length-1;n<r.length;o=n++){let a=r[n],s=r[o];a[1]>t!=s[1]>t&&e<(s[0]-a[0])*(t-a[1])/(s[1]-a[1])+a[0]&&(i=!i)}return i}function ve(e,t,r){let i=r[0],n=r[1],o=r[2],a=r[3],s=e[0],l=e[1],c=t[0],u=t[1];return!(s<i&&c<i||s>o&&c>o||l<n&&u<n||l>a&&u>a)&&(!(!(0,de.Rj)(r,s,l)&&!(0,de.Rj)(r,c,u))||ge(e,t,i,n,o,n)||ge(e,t,o,n,o,a)||ge(e,t,o,a,i,a)||ge(e,t,i,a,i,n))}function ge(e,t,r,i,n,o){let a=_e(e[0],e[1],t[0],t[1],r,i),s=_e(e[0],e[1],t[0],t[1],n,o),l=_e(r,i,n,o,e[0],e[1]),c=_e(r,i,n,o,t[0],t[1]);return a!==s&&l!==c||0===a&&be(e,t,r,i)||0===s&&be(e,t,n,o)||0===l&&ye(r,i,n,o,e[0],e[1])||0===c&&ye(r,i,n,o,t[0],t[1])}function xe(e,t,r,i){return ge(e,t,r[0],r[1],i[0],i[1])}function _e(e,t,r,i,n,o){let a=(i-t)*(n-r)-(r-e)*(o-i);return Math.abs(a)<=Me?0:Math.sign(a)}function be(e,t,r,i){return ye(e[0],e[1],t[0],t[1],r,i)}function ye(e,t,r,i,n,o){return n>=Math.min(e,r)-Me&&n<=Math.max(e,r)+Me&&o>=Math.min(t,i)-Me&&o<=Math.max(t,i)+Me}const we=(0,de.vt)(),Me=((0,le.r_)(),(0,le.r_)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,he.vt)(),1e-9);class Te{constructor(e){this.type=e,this.distance=1/0,this.renderDistance=1/0,this.primitiveIndex=0,this.hasNormal=!1,this.point=(0,d.vt)(),this.normal=(0,d.vt)()}reset(){this.distance=1/0,this.renderDistance=1/0,this.hasNormal=!1}update(e,t,r,i,n=e){this.distance=e,this.renderDistance=n,this.primitiveIndex=t,(0,u.C)(this.point,r),this.hasNormal=null!=i,null!=i&&(0,u.C)(this.normal,i)}updateIfCloserFromValues(e,t,r,i,n=e){n<this.renderDistance&&this.update(e,t,r,i,n)}updateIfCloser(e){let{distance:t,renderDistance:r,primitiveIndex:i,point:n,normal:o}=e;this.updateIfCloserFromValues(t,i,n,e.hasNormal?o:null,r)}get valid(){return Number.isFinite(this.distance)}}function Se(e,t,r,i,n){if(!e.visible)return null;let o,a=new Te(4);o=e.boundingInfo?Ae(e.readPrimitivePosition,e.boundingInfo,t,r,i,n):Ce(t,r,i,0,e.faceCount,e.readPrimitivePosition,n,null,0);for(let e of o)a.updateIfCloser(e);return a.valid?a:null}function*Ce(e,t,r,i,n,o,a,s=null,l=0){if(null==e.camera)return;let{camera:c,screenPolygonPrimitiveProcessor:d}=e;for(let e=i;e<n;++e){let i=(s?.[e]??e)+l,n=null==s?i:e,h=3*i;Ee(De[0],o,h+0,a,n,t),Ee(De[1],o,h+1,a,n,t),Ee(De[2],o,h+2,a,n,t);let f,m=Le;Ve.reset();let p=Re;for(let e of d.processTriangle(De))Ie(r,e,c,p)&&(Oe(c.eye,p,ze),f??=(0,te.rb)(Le,De[0],De[1],De[2]),Ve.updateIfCloserFromValues((0,u.Io)(c.eye,ze),i,ze,f?m:null));Ve.valid&&(yield Ve)}}function*Ae(e,t,r,i,n,o){let a;if(null==o?a=(0,ce.GH)(n.broadPhaseFrustum,t.box,i):((0,f.C)(Pe,t.box),o.applyToAabb(Pe),a=(0,ce.GH)(n.broadPhaseFrustum,Pe,i)),!a)return;let{primitiveIndices:s}=t,l=s.length;if(l>1e3){let a=t.children;if(void 0!==a){for(let t of a)yield*Ae(e,t,r,i,n,o);return}}yield*Ce(r,i,n,0,l,e,o,s,0)}function Ee(e,t,r,i,n,o){let[a,s,l]=t(e,r);null==i?(0,u.hZ)(e,a,s,l):i.applyToVertex(e,a,s,l,n),o&&(0,u.Z0)(e,e,o)}function Ie(e,t,r,i){if(i.length=0,(0,ue.H)(r.frustum[4],t,()=>i.pushNew()),i.length<3)return!1;let n=Fe,o=Be,a=Ne;r.projectToScreen(i.data[0],n),r.projectToScreen(i.data[1],o);for(let t=2;t<i.length;t++){if(r.projectToScreen(i.data[t],a),me(e,n,o,a))return!0;let s=o;o=a,a=s}return!1}function Oe(e,t,r){let i=1/0,n=t.at(0);for(let o=1;o<t.length-1;o++){(0,te.k3)(He,e,n,t.at(o),t.at(o+1));let a=(0,u.hG)(e,He);a<i&&(i=a,(0,u.C)(r,He))}}const Pe=(0,f.vt)(),De=[(0,d.vt)(),(0,d.vt)(),(0,d.vt)()],Re=new O.A({allocator:e=>e??(0,d.vt)()}),Fe=(0,le.gs)(),Be=(0,le.gs)(),Ne=(0,le.gs)(),ze=(0,d.vt)(),Le=(0,d.vt)(),He=(0,d.vt)(),Ve=new Te(4);var Ue=r(16396),je=r(32198),Ge=r(91429),ke=r(91829),We=r(90644),$e=r(4431),Ze=r(1843),qe=(r(31821),r(35644),r(96336),r(87757));class Ye extends qe.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,a.vt)()}}qe.EM;var Xe=r(13840),Ke=r(42958),Je=r(16943);r(4576),r(66289);var Qe=r(56372),et=r(65529),tt=r(32728);class rt{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",m.Eq),this.color=e.getField("instanceColor",m.XP),this.olidColor=e.getField("instanceOlidColor",m.XP),this.state=e.getField("state",m.SL),this.lodLevel=e.getField("lodLevel",m.SL)}}let it=class extends Qe.A{constructor(e,t){super(e),this.events=new et.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return ot(nt.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=ut,this._buffer=this._layout.createBuffer(this._capacity),this._view=new rt(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();let e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){let t=this._view.state;(0,D.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){let t=this._view.state;(0,D.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){let t=this._view,r=at,i=st;t.localTransform.getMat(e,lt),t.globalTransform.getMat(e,ct);let n=(0,s.lw)(ct,ct,lt);(0,u.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,o.z0)(i,n),t.model.setMat(e,i);let a=(0,tt.wp)(at,n);a.sort(),t.modelScaleFactors.set(e,0,a[1]),t.modelScaleFactors.set(e,1,a[2]),(0,o.B8)(i,i),(0,o.mg)(i,i),t.modelNormal.setMat(e,i),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){let r=this._view;r.model.getMat(e,st),r.modelOrigin.getVec(e,at),t[0]=st[0],t[1]=st[1],t[2]=st[2],t[3]=0,t[4]=st[3],t[5]=st[4],t[6]=st[5],t[7]=0,t[8]=st[6],t[9]=st[7],t[10]=st[8],t[11]=0,t[12]=at[0],t[13]=at[1],t[14]=at[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(at,this,e),t*=Math.max(at[0],at[1],at[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(at,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(at[0],at[1],at[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){let{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){let t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){let t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){let r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){let r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(ut,Math.floor(1.5*this._capacity)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new rt(this._buffer)}_findSlot(){let e=this._view.state,t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,je.Cg)([(0,Ge.MZ)({constructOnly:!0})],it.prototype,"shaderTransformation",void 0),(0,je.Cg)([(0,Ge.MZ)()],it.prototype,"_size",void 0),(0,je.Cg)([(0,Ge.MZ)({readOnly:!0})],it.prototype,"size",null),it=(0,je.Cg)([(0,Ge.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],it);const nt=(0,Ze.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function ot(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Je.E)()&&e.vec4u8("instanceOlidColor"),e}const at=(0,d.vt)(),st=(0,a.vt)(),lt=(0,l.vt)(),ct=(0,l.vt)(),ut=64,dt=(0,Ze.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal"),ht=(0,We.p3)(1,0,1,771);function ft(e,t=!1,r=!1){if(r)return We.uR;switch(e){case 0:return t?We.RC:We.T8;case 1:return ht;default:return null}}function mt(e){if(e.draped)return null;switch(e.output){case 0:case 2:default:return e.writeDepth?We.Uy:null;case 1:return null}}function pt(e,t=513){return{func:(0,$._$)(e)?515:t}}(0,ke._Y)();const vt={mask:255},gt=(0,We.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:0}),xt=(0,We.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:7681});(0,We.nk)(2,2,{compare:514,fail:7680,zFail:7680,zPass:7680}),(0,We.nk)(2,2,{compare:517,fail:7680,zFail:7680,zPass:7680});var _t=r(74810);const bt=Ct(-1),yt=Ct(1),wt=bt,Mt=[];Mt[0]=null,Mt[1]=yt,Mt[2]=bt,Mt[3]=Ct(-2),Mt[4]=Ct(-3);const Tt=Mt.map(e=>function(e,t){return t?{factor:e.factor+t.factor,units:e.units+t.units}:e}(wt,e));function St({output:e,enableOITOffset:t,polygonOffset:r}){return(0,$._$)(e)&&t?Tt[r]:Mt[r]}function Ct(e){return{factor:+e,units:2*e}}Mt[1]=yt;var At=r(28491);class Et extends Ye{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=_t.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=d.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.shadingEnabled=!0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.pretransformedNormals=!1,this.ambient=(0,d.CN)(.2,.2,.2),this.diffuse=(0,d.CN)(.8,.8,.8),this.externalColor=(0,ke.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=W.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}let It=class extends Ke.w{constructor(e,t){let i=(0,$e.U)(Rt(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat((0,$e.U)(function(e){return ot(dt.clone(),e)}(t)))),super(e,t,i),this.shader=new Xe.r(At.D,()=>r.e(5141).then(()=>r(5141))),this.ignoreUnused=!0}_makePipeline(e,t){let{output:r,transparent:i,cullFace:n,customDepthTest:o,hasOccludees:a}=e;return(0,We.Ey)({blending:i?ft(r,!1,e.emissionDimmingPass):null,culling:Pt(e)?(0,We.Xt)(n):null,depthTest:pt(r,Ot(o)),depthWrite:mt(e),colorWrite:We.kn,stencilWrite:a?vt:null,stencilTest:a?t?xt:gt:null,polygonOffset:St(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,r){return r?this._occludeePipelineState:super.getPipeline(e,t,r)}};function Ot(e){switch(e){case 1:return 515;case 0:case 4:return 513;case 2:return 516;case 3:return 514}}function Pt(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Dt(e){return e.hasNormalTexture&&e.hasVertexTangents}function Rt(e){let t=(0,Ze.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),Dt(e)&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Je.E)()&&t.vec4u8("olidColor"),t}It=(0,je.Cg)([(0,Ge.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],It);var Ft=r(51976),Bt=r(34711);class Nt extends Bt.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,je.Cg)([(0,Ft.W)()],Nt.prototype,"hasHighlightMixTexture",void 0),(0,je.Cg)([(0,Ft.W)()],Nt.prototype,"emissionDimmingPass",void 0);class zt extends Nt{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}(0,je.Cg)([(0,Ft.W)({count:5})],zt.prototype,"polygonOffset",void 0),(0,je.Cg)([(0,Ft.W)()],zt.prototype,"transparent",void 0),(0,je.Cg)([(0,Ft.W)()],zt.prototype,"enableOITOffset",void 0);class Lt extends zt{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1,this.renderOccluded=!1}get textureCoordinateType(){return+!!this.hasTextures}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}}(0,je.Cg)([(0,Ft.W)({count:4})],Lt.prototype,"alphaDiscardMode",void 0),(0,je.Cg)([(0,Ft.W)({count:3})],Lt.prototype,"doubleSidedMode",void 0),(0,je.Cg)([(0,Ft.W)({count:8})],Lt.prototype,"pbrMode",void 0),(0,je.Cg)([(0,Ft.W)({count:3})],Lt.prototype,"cullFace",void 0),(0,je.Cg)([(0,Ft.W)({count:3})],Lt.prototype,"normalType",void 0),(0,je.Cg)([(0,Ft.W)({count:4})],Lt.prototype,"customDepthTest",void 0),(0,je.Cg)([(0,Ft.W)({count:8})],Lt.prototype,"emissionSource",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasVertexColors",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasSymbolColors",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasVerticalOffset",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasColorTexture",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasMetallicRoughnessTexture",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasOcclusionTexture",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasNormalTexture",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasScreenSizePerspective",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasVertexTangents",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasOccludees",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"instanced",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"instancedDoublePrecision",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasModelTransformation",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"offsetBackfaces",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasVVSize",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasVVColor",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"receiveShadows",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasShadowHighlights",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"receiveAmbientOcclusion",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"receiveGlobalIllumination",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"textureAlphaPremultiplied",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"instancedFeatureAttribute",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"instancedColor",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"writeDepth",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"snowCover",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasColorTextureTransform",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasEmissionTextureTransform",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasNormalTextureTransform",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasOcclusionTextureTransform",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasMetallicRoughnessTextureTransform",void 0);var Ht=r(57323);let Vt=class extends It{constructor(){super(...arguments),this.shader=new Xe.r(Ht.R,()=>r.e(9933).then(()=>r(39933)))}};Vt=(0,je.Cg)([(0,Ge.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],Vt);var Ut=r(56529);class jt extends Ft.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,je.Cg)([(0,Ft.W)()],jt.prototype,"receiveShadows",void 0);class Gt extends Ut.D5{constructor(){super(...arguments),this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1}}(0,je.Cg)([(0,Ft.W)()],Gt.prototype,"receiveAmbientOcclusion",void 0),(0,je.Cg)([(0,Ft.W)()],Gt.prototype,"receiveGlobalIllumination",void 0);var kt=r(10614);function Wt(e,t,r){let{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length;r*=a;for(let e=0;e<s;++e){let t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=a}}function $t(e,t,r,i=1){let{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){let t=3*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}else for(let e=0;e<l;++e){let t=3*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}}function Zt(e,t,r,i,n=1){let{data:o,indices:a}=e,s=r.typedBuffer,l=r.typedBufferStride,c=a.length;if(i*=l,t===o.length&&4===t){s[i]=o[0],s[i+1]=o[1],s[i+2]=o[2],s[i+3]=o[3];let e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,a=e[i/=4];i+=t;let u=c*n;for(let r=1;r<u;++r)e[i]=a,i+=t}else if(1===n){if(4===t){for(let e=0;e<c;++e){let t=4*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}return}for(let e=0;e<c;++e){let t=3*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}}else if(4===t)for(let e=0;e<c;++e){let t=4*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}else for(let e=0;e<c;++e){let t=3*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}}const qt=(0,d.vt)();function Yt(e,t,r,i,n,o,a=!1){switch(e){case"position":{(0,D.vA)(3===t.size);let i=n.getField(e,m.xs);(0,D.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void $t(e,r,i,n);let{data:o,indices:a}=e,l=r.typedBuffer,c=r.typedBufferStride,u=a.length,d=t[0],h=t[1],f=t[2],m=t[4],p=t[5],v=t[6],g=t[8],x=t[9],_=t[10],b=t[12],y=t[13],w=t[14];i*=c;let M=0,T=0,S=0,C=(0,s.tZ)(t)?e=>{M=o[e]+b,T=o[e+1]+y,S=o[e+2]+w}:e=>{let t=o[e],r=o[e+1],i=o[e+2];M=d*t+m*r+g*i+b,T=h*t+p*r+x*i+y,S=f*t+v*r+_*i+w};if(1===n)for(let e=0;e<u;++e)C(3*a[e]),l[i]=M,l[i+1]=T,l[i+2]=S,i+=c;else for(let e=0;e<u;++e){C(3*a[e]);for(let e=0;e<n;++e)l[i]=M,l[i+1]=T,l[i+2]=S,i+=c}}(t,r,i,o);break}case"normal":{(0,D.vA)(3===t.size);let r=n.getField(e,m.xs);(0,D.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void $t(e,r,i,n);let{data:o,indices:a}=e,l=t,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=l[0],f=l[1],m=l[2],p=l[4],v=l[5],g=l[6],x=l[8],_=l[9],b=l[10],y=!(0,s.ut)(l),w=1e-6,M=.999999;i*=u;let T=0,S=0,C=0,A=(0,s.tZ)(l)?e=>{T=o[e],S=o[e+1],C=o[e+2]}:e=>{let t=o[e],r=o[e+1],i=o[e+2];T=h*t+p*r+x*i,S=f*t+v*r+_*i,C=m*t+g*r+b*i};if(1===n)if(y)for(let e=0;e<d;++e){A(3*a[e]);let t=T*T+S*S+C*C;if(t<M&&t>w){let e=1/Math.sqrt(t);c[i]=T*e,c[i+1]=S*e,c[i+2]=C*e}else c[i]=T,c[i+1]=S,c[i+2]=C;i+=u}else for(let e=0;e<d;++e)A(3*a[e]),c[i]=T,c[i+1]=S,c[i+2]=C,i+=u;else for(let e=0;e<d;++e){if(A(3*a[e]),y){let e=T*T+S*S+C*C;if(e<M&&e>w){let t=1/Math.sqrt(e);T*=t,S*=t,C*=t}}for(let e=0;e<n;++e)c[i]=T,c[i+1]=S,c[i+2]=C,i+=u}}(t,i,r,o);break}case"normalCompressed":if(!a){(0,D.vA)(2===t.size);let r=n.getField(e,m.mJ);(0,D.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i){if(!t||(0,s.tZ)(t))return void Wt(e,r,i);let{data:n,indices:o}=e,a=t,l=r.typedBuffer,c=r.typedBufferStride,u=o.length;i*=c;for(let e=0;e<u;++e){(0,kt.Tz)(qt,n,o[e]);let[t,r,s]=qt;(0,kt.aT)(l,e,a[0]*t+a[4]*r+a[8]*s,a[1]*t+a[5]*r+a[9]*s,a[2]*t+a[6]*r+a[10]*s,c,i)}}(t,i,r,o);break}case"profileRight":case"profileUp":{(0,D.vA)(2===t.size);let r=n.getField(e,m.mJ);(0,D.vA)(!!r,`No buffer view for ${e}`),Wt(t,r,o);break}case"uv0":{(0,D.vA)(2===t.size);let r=n.getField(e,m.ZD)??n.getField(e,m.gH);(0,D.vA)(!!r,`No buffer view for ${e}`),Wt(t,r,o);break}case"uvi":{(0,D.vA)(2===t.size);let r=n.getField(e,m.mJ);(0,D.vA)(!!r,`No buffer view for ${e}`),Wt(t,r,o);break}case"color":case"symbolColor":{let r=n.getField(e,m.XP);(0,D.vA)(!!r,`No buffer view for ${e}`),(0,D.vA)(3===t.size||4===t.size),Zt(t,t.size,r,o);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{let r=n.getField(e,m.Y$)??n.getField(e,m.Y$);(0,D.vA)(!!r,`No buffer view for ${e}`),(0,D.vA)(1===t.size),function(e,t,r){let{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length,l=i[0];r*=a;for(let e=0;e<s;++e)o[r]=l,r+=a}(t,r,o);break}case"tangent":{(0,D.vA)(4===t.size);let i=n.getField(e,m.Eq);(0,D.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void function(e,t,r,i=1){let{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){let t=4*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}else for(let e=0;e<l;++e){let t=4*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}}(e,r,i,n);let{data:o,indices:a}=e,l=t,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=l[0],f=l[1],m=l[2],p=l[4],v=l[5],g=l[6],x=l[8],_=l[9],b=l[10],y=!(0,s.ut)(l),w=1e-6,M=.999999;if(i*=u,1===n)for(let e=0;e<d;++e){let t=4*a[e],r=o[t],n=o[t+1],s=o[t+2],l=o[t+3],d=h*r+p*n+x*s,T=f*r+v*n+_*s,S=m*r+g*n+b*s;if(y){let e=d*d+T*T+S*S;if(e<M&&e>w){let t=1/Math.sqrt(e);d*=t,T*=t,S*=t}}c[i]=d,c[i+1]=T,c[i+2]=S,c[i+3]=l,i+=u}else for(let e=0;e<d;++e){let t=4*a[e],r=o[t],s=o[t+1],l=o[t+2],d=o[t+3],T=h*r+p*s+x*l,S=f*r+v*s+_*l,C=m*r+g*s+b*l;if(y){let e=T*T+S*S+C*C;if(e<M&&e>w){let t=1/Math.sqrt(e);T*=t,S*=t,C*=t}}for(let e=0;e<n;++e)c[i]=T,c[i+1]=S,c[i+2]=C,c[i+3]=d,i+=u}}(t,r,i,o);break}case"olidColor":(0,D.vA)(4===t.size),Zt(t,4,n.getField(e,m.XP),o)}}class Xt{constructor(e,t=!1){this.layout=e,this._preTransformedNormals=t}elementCount(e){return e.get("position").indices.length}write(e,t,r,i){i&&function(e,t,r,i,n,o=!1){let{buffer:a,offset:s}=n;for(let n of t.fields.keys()){let t=e.get(n),l=t?.indices;t&&l&&Yt(n,t,r,i,a,s,o)}}(r,this.layout,e,t,i,this._preTransformedNormals)}}function Kt(e,t){return Qt.output=+!!e.transparent,Qt.polygonOffset=e.polygonOffset,Qt.enableOITOffset=function(e,t){return(0,$._$)(e)&&t.relativeElevation<5e5}(Qt.output,t),St(Qt)}function Jt({units:e,factor:t},r,i,n){let o=tr*e;return i+((n?1-Math.abs((0,u.Om)(r,n)):0)*t*er+o)}const Qt=new zt,er=2e-5,tr=2e-6,rr=(0,d.vt)();class ir extends ae{constructor(e,t){super(e,or),this.materialType="default",this.supportsEdges=!0,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[2,e=>(0,$.uw)(e)&&!this.transparent],[4,e=>(0,$.uw)(e)&&this.transparent]]),this._configuration=new Lt(t)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){let{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=W.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,u.t2)(this.parameters.emissiveBaseColor,d.uY)}get emissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);let{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;let{treeRendering:i,doubleSided:n,doubleSidedType:o}=t;r.hasVertexTangents=Dt(t),r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=i?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!i&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=i?2:n&&"normal"===o?1:n&&"winding-order"===o?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,function(e,t,r,i=!0){i&&(0,$._o)(t.output)&&r.shadingEnabled?(e.receiveShadows=r.receiveShadows&&t.shadowMap.enabled,e.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(e,t),e.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao,e.receiveGlobalIllumination=r.receiveAmbientOcclusion&&t.globalIlluminationEnabled):e.receiveShadows=e.hasShadowHighlights=e.receiveAmbientOcclusion=e.receiveGlobalIllumination=!1}(r,e,t),r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.unlit?7:t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersectRay(e,t,r,i,n,o){let a=this._getMaterialVerticalOffset(t,r);null!=a&&(i=(0,u.Re)(ar,i,a),n=(0,u.Re)(sr,n,a)),o=function(e,t,r,i,n){let o=Kt(t,r);if(!o)return e;let a=(0,u.oW)(rr,n,i);return(t,r,i,n)=>e(t,Jt(o,a,r,i),i,n)}(o,this._configuration,r.camera,i,n),(0,se.Uy)(e,r,i,n,(0,Ue.ou)(r.verticalOffset),o)}intersectScreenPolygon(e,t,r,i){return function(e,t,r){return null==e?null:(e.renderDistance=function(e,t,r,i,n){let o=Kt(r,i);return o?Jt(o,(0,u.oW)(rr,n,i.eye),e,t):e}(e.renderDistance,e.hasNormal?e.normal:null,t,r,e.point),e)}(Se(e,r,t,i,this._createScreenPolygonVertexDisplacement(t,r)),this._configuration,r.camera)}createGLMaterial(e){return new nr(e)}createBufferWriter(){return new Xt(Rt(this.parameters),this.parameters.pretransformedNormals)}get transparent(){let{drivenOpacity:e,opacity:t,externalColor:r,layerOpacity:i,texture:n,textureId:o,textureAlphaMode:a,colorMixMode:s}=this.parameters,l=r[3];return e||t<1&&"replace"!==s||l<1&&"ignore"!==s||i<1||(null!=n||null!=o)&&1!==a&&2!==a&&"replace"!==s}_createScreenPolygonVertexDisplacement(e,t){let r=this._getMaterialVerticalOffset(e,t);return null==r?null:{applyToVertex:(e,t,i,n)=>(e[0]=t+r[0],e[1]=i+r[1],e[2]=n+r[2],e),applyToAabb:e=>((0,f.Ne)(e,(0,u.WQ)(fr,(0,f.pg)(e,fr),r)),(0,f.vI)(e,(0,u.WQ)(fr,(0,f.Lu)(e,fr),r)),e)}}_getMaterialVerticalOffset(e,t){if(null==this.parameters.verticalOffset)return null;let r=t.camera;(0,u.hZ)(ur,e[12],e[13],e[14]);let i=t.isGlobal?(0,u.S8)(cr,ur):(0,u.C)(cr,lr),n=(0,u.Re)(dr,ur,r.eye),o=(0,u.Bw)(n),a=(0,u.hs)(n,n,1/o),s=null;this.parameters.screenSizePerspective&&(s=(0,u.Om)(i,a));let l=(0,ee.kE)(r,o,this.parameters.verticalOffset,s??0,this.parameters.screenSizePerspective,null);return(0,u.hs)(i,i,l),(0,u.ei)(hr,i,t.transform.inverseRotation)}}class nr extends K{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});let t=this._material.parameters;this.updateTexture(t.textureId);let r=e.camera.viewInverseTransposeMatrix;return(0,u.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?Vt:It,e)}}class or extends Et{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1,this.unlit=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissionSource(){return null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const ar=(0,d.vt)(),sr=(0,d.vt)(),lr=(0,d.fA)(0,0,1),cr=(0,d.vt)(),ur=(0,d.vt)(),dr=(0,d.vt)(),hr=(0,d.vt)(),fr=(0,d.vt)();class mr{constructor(){this.geometries=[],this.materials=[],this.textures=[]}}class pr{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new mr,this.numberOfVertices=0}}var vr=r(60999),gr=r(49186),xr=r(53966);class _r{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(let t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){let i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){let r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){let r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(let e of this._outer)yield e}*values(){for(let e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(let[e,t]of this._outer)for(let[r,i]of t)yield[e,r,i]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,i)=>e(t,r,i)))}clone(){let e=new _r;return this.forAll((t,r,i)=>e.set(r,i,t)),e}}var br=r(46140),yr=r(78888),wr=r(31217);const Mr=()=>xr.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class Tr{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function Sr(e){let t=e.params,r=t.topology,i=!0;switch(t.vertexAttributes||(Mr().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{let e=t.faces;if(e){if(t.vertexAttributes)for(let r in t.vertexAttributes){let t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(Mr().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(Mr().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(Mr().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else Mr().warn("Indexed geometries must specify faces"),i=!1;break}default:Mr().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(Mr().warn("Geometry requires material"),i=!1);let n=e.params.vertexAttributes;for(let e in n)n[e].values||(Mr().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function Cr(e){let t=(0,f.Ie)();return e.forEach(e=>{let r=e.boundingInfo;null!=r&&(0,f.RF)(t,r.box)}),t}function Ar(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function Er(e){let t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Ir=new br.A(1,2,"wosr");async function Or(e,t){let o,a=function(e){let t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null==t[4]?null:Number(t[4])}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?"wosr":"unknown",url:e,specifiedLodIndex:null}}((0,n.EM)(e));if("wosr"===a.fileType){let e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){let r=await async function(e,t){let r=await(0,vr.Ke)((0,yr.A)(e,t));if(r.ok)return r.value.data;(0,q.QP)(r.error),function(e){throw new gr.A("request:wosr",`Request for object resource failed: ${e}`)}(r.error)}(e,t),i=await async function(e,t){let r=[];for(let i in e){let n=e[i],o=n.images[0].data;if(!o){Mr().warn("Externally referenced texture data is not yet supported");continue}let a=n.encoding+";base64,"+o,s="/textureDefinitions/"+i,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==Ar(l)},u=t?.disableTextures?Promise.resolve(null):(0,wr.D)(a,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}let i=await Promise.all(r),n={};for(let e of i)n[e.refId]=e;return n}(r.textureDefinitions??{},t),n=0;for(let e in i)if(i.hasOwnProperty(e)){let t=i[e];n+=t?.image?t.image.width*t.image.height*4:0}return new Tr(r,i,n+(0,S.Qh)(r))}(a.url,t)),{engineResources:r,referenceBoundingBox:i}=function(e,t){let r=[],i=[],n=[],o=new _r,a=e.resource,s=br.A.parse(a.version||"1.0","wosr");Ir.validate(s);let l=a.model.name,c=a.model.geometries,u=a.materialDefinitions??{},h=e.textures,f=0,m=new Map;for(let e=0;e<c.length;e++){let a=c[e];if(!Sr(a))continue;let s=Er(a),l=a.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===a.params.topology)return null;let t=a.params.faces;for(let r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(let e in l){let t=l[e],r=t.values,i=v(e)??(0,C.tM)(x);p.push([e,new T.n(r,i,t.valuesPerElement,!0)])}let _=s.texture,b=h&&h[_];if(b&&!m.has(_)){let{image:e,parameters:t}=b,r=new k.h(e,t);i.push(r),m.set(_,r)}let y=m.get(_),w=y?y.id:void 0,M=s.material,S=o.get(M,_);if(null==S){let e=u[M.slice(M.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);let r=b?Ar(b.alphaChannelUsage):void 0,i={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:w,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:b?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),S=new ir(i,t.spherical),o.set(M,_,S)}n.push(S);let A=new j(S,p);f+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(A)}return{engineResources:[{name:l,stageResources:{textures:i,materials:n,geometries:r},pivotOffset:a.model.pivotOffset,numberOfVertices:f,lodThreshold:null}],referenceBoundingBox:Cr(r)}}(e,t);return{lods:r,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}if(t.cache)o=await t.cache.loadGLTF(a.url,t,!!t.usePBR,!!t.useEmissive);else{let{loadGLTF:e}=await r.e(1698).then(()=>r(51698));o=await e(new _.R,a.url,t,t.usePBR,t.useEmissive)}let{engineResources:h,referenceBoundingBox:p}=function(e,t,r){let n=e.model,o=e.meta,a=n.meta?.ESRI_proxyEllipsoid,h=o.isEsriSymbolResource&&null!=a&&"EsriRealisticTreesStyle"===o.ESRI_webstyle;h&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){let i=e.model.lods[r];for(let n of i.parts){let i=n.attributes.normal;if(null==i)return;let o=n.attributes.position,a=o.count,c=(0,d.vt)(),h=(0,d.vt)(),f=(0,d.vt)(),p=new Float32Array(4*a),v=new Float32Array(3*a),g=(0,s.B8)((0,l.vt)(),n.transform),x=0,_=0;for(let s=0;s<a;s++){o.getVec(s,h),i.getVec(s,c),(0,u.Z0)(h,h,n.transform),(0,u.Re)(f,h,t.center),(0,u.Qr)(f,f,t.radius);let a=f[2],l=(0,u.Bw)(f),d=Math.min(.45+.55*l*l,1)**2.2;(0,u.Qr)(f,f,t.radius),null!==g&&(0,u.Z0)(f,f,g),(0,u.S8)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(a>-1?(0,u.Cc)(f,f,c,.2):(0,u.Cc)(f,f,c,Math.min(-4*a-3.8,1))),v[x]=f[0],v[x+1]=f[1],v[x+2]=f[2],x+=3,p[_]=d,p[_+1]=d,p[_+2]=d,p[_+3]=1,_+=4}n.attributes.normal=new m.xs(v.buffer),n.attributes.color=new m.Eq(p.buffer)}}}(e,a));let p=!!t.usePBR,v=o.isEsriSymbolResource?{usePBR:p,isSchematic:!1,treeRendering:h,mrrFactors:_t.SY}:{usePBR:p,isSchematic:!1,treeRendering:!1,mrrFactors:_t.mb},g={...t.materialParameters,treeRendering:h},x=[],_=new Map,b=new Map,w=n.lods.length,T=(0,f.Ie)();return n.lods.forEach((e,o)=>{let a=!0===t.skipHighLods&&(w>1&&0===o||w>3&&1===o)||!1===t.skipHighLods&&null!=r&&o!==r;if(a&&0!==o)return;let s=new pr(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{let r=a?new ir({},t.spherical):function(e,t,r,n,o,a,s,l,u){let h=e.materials.get(t.material);if(null==h)return null;let{normal:f,color:m,texCoord0:p,tangent:v}=t.attributes,g=t.material+(f?"_normal":"")+(m?"_color":"")+(p?"_texCoord0":"")+(v?"_tangent":""),x=null!=t.attributes.texCoord0,_=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(h.alphaMode);if(!a.has(g)){if(x){let t=(t,r=!1,i=!1)=>{if(null!=t&&!s.has(t)){let n=e.textures.get(t);if(n){let e=n.data,o=r&&!(0,y.x3)(e)?l.compressionOptions:void 0;s.set(t,new k.h((0,y.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,y.x3)(e)&&i,encoding:(0,y.x3)(e)?e.encoding:void 0,compressionOptions:o}))}}},r=1!==b&&!u;t(h.colorTexture,r,1!==b),t(h.normalTexture),t(h.occlusionTexture,!0),t(h.emissiveTexture),t(h.metallicRoughnessTexture,!0)}let r=(0,i.xV)(h.color[0]),f=(0,i.xV)(h.color[1]),m=(0,i.xV)(h.color[2]),p=null!=h.colorTexture&&x?s.get(h.colorTexture):null,v=(0,_t.Jr)(h),w=null==h.normalTextureTransform?.scale?c.Un:h.normalTextureTransform?.scale;a.set(g,new ir({...n,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:h.alphaCutoff,diffuse:[r,f,m],ambient:[r,f,m],opacity:"OPAQUE"===h.alphaMode?1:h.opacity,doubleSided:h.doubleSided,doubleSidedType:"winding-order",cullFace:h.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:_?0:2,castShadows:!0,receiveShadows:h.receiveShadows,receiveAmbientOcclusion:h.receiveAmbientOcclusion,unlit:h.unlit,textureId:p?.id,colorMixMode:h.colorMixMode,normalTextureId:null!=h.normalTexture&&x?s.get(h.normalTexture).id:void 0,textureAlphaPremultiplied:null!=p&&!!p.parameters.preMultiplyAlpha,occlusionTextureId:null!=h.occlusionTexture&&x?s.get(h.occlusionTexture).id:void 0,emissiveTextureId:null!=h.emissiveTexture&&x&&!h.unlit?s.get(h.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=h.metallicRoughnessTexture&&x?s.get(h.metallicRoughnessTexture).id:void 0,emissiveBaseColor:h.unlit?d.uY:[h.emissiveFactor[0],h.emissiveFactor[1],h.emissiveFactor[2]],emissiveStrengthKHR:null==h.emissiveStrengthKHR?1:h.emissiveStrengthKHR,emissiveStrengthFromSymbol:null==o.emissiveStrengthFromSymbol?void 0:o.emissiveStrengthFromSymbol,mrrFactors:v?_t.Bt:[h.metallicFactor,h.roughnessFactor,n.mrrFactors[2]],isSchematic:v,colorTextureTransformMatrix:M(h.colorTextureTransform),normalTextureTransformMatrix:M(h.normalTextureTransform),normalScale:[w[0],w[1]],occlusionTextureTransformMatrix:M(h.occlusionTextureTransform),emissiveTextureTransformMatrix:M(h.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:M(h.metallicRoughnessTextureTransform),...o},l.spherical))}let w=a.get(g);if(r.stageResources.materials.push(w),x){let e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(h.colorTexture),e(h.normalTexture),e(h.occlusionTexture),e(h.emissiveTexture),e(h.metallicRoughnessTexture)}return w}(n,e,s,v,g,_,b,t,h),{geometry:l,vertexCount:u}=Pr(e,r??new ir({},t.spherical)),m=l.boundingInfo;null!=m&&0===o&&(0,f.RF)(T,m.box),null!=r&&(s.stageResources.geometries.push(l),s.numberOfVertices+=u)}),a||x.push(s)}),{engineResources:x,referenceBoundingBox:T}}(o,t,a.specifiedLodIndex);return{lods:h,referenceBoundingBox:p,isEsriSymbolResource:o.meta.isEsriSymbolResource,isWosr:!1}}function Pr(e,t){let r=e.attributes.position.count,i=(0,b.x)(e.indices||r,e.primitiveType),n=x(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.position;(0,p.t)(n,a,e.transform,3,s);let l=[["position",new T.n(n,i,3,!0)]];if(null!=e.attributes.normal){let t=x(3*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.normal;(0,o.Ge)(Dr,e.transform),(0,p.b)(t,n,Dr,3,a),(0,h.or)(Dr)&&(0,p.n)(t,t),l.push(["normal",new T.n(t,i,3,!0)])}if(null!=e.attributes.tangent){let t=x(4*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.tangent;(0,o.z0)(Dr,e.transform),(0,v.t)(t,n,Dr,4,a),(0,h.or)(Dr)&&(0,p.n)(t,t,4),l.push(["tangent",new T.n(t,i,4,!0)])}if(null!=e.attributes.texCoord0){let t=x(2*r),{typedBuffer:n,typedBufferStride:o}=e.attributes.texCoord0;(0,g.a)(t,n,2,o),l.push(["uv0",new T.n(t,i,2,!0)])}let c=e.attributes.color;if(null!=c){let t=new Uint8Array(4*r);4===c.elementCount?c instanceof m.Eq?(0,v.b)(t,c,1,255):(c instanceof m.XP||c instanceof m.Uz)&&(0,v.b)(t,c,1/255,255):(t.fill(255),c instanceof m.xs?(0,p.f)(t,c.typedBuffer,1,255,4,c.typedBufferStride):(e.attributes.color instanceof m.eI||e.attributes.color instanceof m.nS)&&(0,p.f)(t,c.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),l.push(["color",new T.n(t,i,4,!0)])}return{geometry:new j(t,l),vertexCount:r}}const Dr=(0,a.vt)()},26857(e,t,r){var i=r(32198),n=r(56372),o=r(91429);let a=class extends n.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.OCCLUSION_QUERY_DEBUG_PIXEL=!1,this.ENABLE_OPTIMIZATIONS=!0,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.UPDATING=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1,this.FLOW_GLOBAL_SCALE_THRESHOLD=null}};(0,i.Cg)([(0,o.MZ)()],a.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LABELS_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"SHOW_POI",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OCCLUSION_QUERY_DEBUG_PIXEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"ENABLE_OPTIMIZATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"UPDATING",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LINE_WIREFRAMES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FLOW_GLOBAL_SCALE_THRESHOLD",void 0),a=(0,i.Cg)([(0,o.$K)("esri.views.3d.support.debugFlags")],a);const s=new a;r.d(t,["b",0,s])},46686(e,t,r){r.d(t,{A7:()=>o,Y0:()=>n});var i=r(29941);class n extends i.v{constructor(e){super(),this.spherical=e,this.draped=!1}}function o(e){(function(e){e.varyings.add("linearDepth","float",{invariant:!0})})(e),e.vertex.code.add("void forwardLinearDepth(float _linearDepth) { linearDepth = _linearDepth; }")}},32680(e,t,r){r.d(t,{M:()=>n});var i=r(31821);function n(e){e.vertex.code.add(i.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
|
|
221
|
+
fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>o,f:()=>a,n:()=>n});var i=r(34275);function n(e,t){o(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r=2,n=r){let o=t.length/2,a=0,s=0;if(!(0,i.iu)(t)||(0,i.dk)(t)){for(let i=0;i<o;++i)e[a]=t[s],e[a+1]=t[s+1],a+=r,s+=n;return}let l=(0,i.a3)(t);if((0,i.JI)(t))for(let i=0;i<o;++i)e[a]=Math.max(t[s]/l,-1),e[a+1]=Math.max(t[s+1]/l,-1),a+=r,s+=n;else for(let i=0;i<o;++i)e[a]=t[s]/l,e[a+1]=t[s+1]/l,a+=r,s+=n}function a(e,t,r,i){let n=e.typedBuffer,o=e.typedBufferStride,a=i?.count??e.count,s=(i?.dstIndex??0)*o;for(let e=0;e<a;++e)n[s]=t,n[s+1]=r,s+=o}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:o,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>d,b:()=>s,c:()=>n,d:()=>a,e:()=>h,f:()=>u,l:()=>c,n:()=>f,t:()=>o}),r(44208);var i=r(72727);function n(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[4],f=r[5],m=r[6],p=r[8],v=r[9],g=r[10],x=r[12],_=r[13],b=r[14],y=0,w=0;for(let r=0;r<l;r++){let r=t[y],i=t[y+1],a=t[y+2];e[w]=c*r+h*i+p*a+x,e[w+1]=u*r+f*i+v*a+_,e[w+2]=d*r+m*i+g*a+b,y+=o,w+=n}return e}function a(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=0,_=0;for(let r=0;r<l;r++){let r=t[x],i=t[x+1],a=t[x+2];e[_]=c*r+h*i+p*a,e[_+1]=u*r+f*i+v*a,e[_+2]=d*r+m*i+g*a,x+=o,_+=n}}function l(e,t,r,i=3,n=i){let o=Math.min(e.length/i,t.length/n),a=0,s=0;for(let l=0;l<o;l++)e[s]=r*t[a],e[s+1]=r*t[a+1],e[s+2]=r*t[a+2],a+=n,s+=i;return e}function c(e,t,r,i){u(e.typedBuffer,t.typedBuffer,r,i,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r,i,n=3,o=n){let a=Math.min(e.length/n,t.length/o),s=0,l=0,c=1/2.2;for(let u=0;u<a;u++)e[l]=i*(r*t[s])**c,e[l+1]=i*(r*t[s+1])**c,e[l+2]=i*(r*t[s+2])**c,s+=o,l+=n}function d(e,t,r,n=3,o=n){let a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=0,u=0;for(let i=0;i<l;i++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=o,u+=n;return e}function h(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,r=3,i=r){let n=Math.min(e.length/r,t.length/i),o=0,a=0;for(let s=0;s<n;s++){let n=t[o],s=t[o+1],l=t[o+2],c=n*n+s*s+l*l;if(c>0){let t=1/Math.sqrt(c);e[a]=t*n,e[a+1]=t*s,e[a+2]=t*l}o+=i,a+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:f,normalizeView:h,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){let i=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,l=0,c=0;for(let e=0;e<i;e++)n[c]=a[l]>>r,n[c+1]=a[l+1]>>r,n[c+2]=a[l+2]>>r,l+=s,c+=o},transformMat3:s,transformMat3View:a,transformMat4:o,transformMat4View:n,translate:d},Symbol.toStringTag,{value:"Module"}))},50867(e,t,r){r.d(t,{a:()=>n,b:()=>c,l:()=>l,n:()=>a,t:()=>o}),r(44208);var i=r(72727);function n(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,n=4,o=n){let a=(0,i.k)(e.length,n,4),s=(0,i.k)(t.length,o,4),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=0,_=0;for(let r=0;r<l;r++){let r=t[x],i=t[x+1],a=t[x+2],s=t[x+3];e[_]=c*r+h*i+p*a,e[_+1]=u*r+f*i+v*a,e[_+2]=d*r+m*i+g*a,e[_+3]=s,x+=o,_+=n}}function a(e,t){let r=Math.min(e.count,t.count),i=e.typedBuffer,n=e.typedBufferStride,o=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){let t=e*n,r=e*a,s=o[r],l=o[r+1],c=o[r+2],u=s*s+l*l+c*c;if(u>0){let e=1/Math.sqrt(u);i[t]=e*s,i[t+1]=e*l,i[t+2]=e*c}}}function s(e,t,r,i=4){let n=Math.min(e.length/i,t.count),o=t.typedBuffer,a=t.typedBufferStride,s=0,l=0;for(let t=0;t<n;t++)e[l]=r*o[s],e[l+1]=r*o[s+1],e[l+2]=r*o[s+2],e[l+3]=r*o[s+3],s+=a,l+=i}function l(e,t,r,i){c(e.typedBuffer,t,r,i,e.typedBufferStride)}function c(e,t,r,i,n=4){let o=Math.min(e.length/n,t.count),a=t.typedBuffer,s=t.typedBufferStride,l=0,c=0,u=1/2.2;for(let t=0;t<o;t++)e[c]=i*(r*a[l])**u,e[c+1]=i*(r*a[l+1])**u,e[c+2]=i*(r*a[l+2])**u,e[c+3]=i*r*a[l+3],l+=s,c+=n}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:l,normalize:a,scale:s,scaleView:function(e,t,r){s(e.typedBuffer,t,r,e.typedBufferStride)},transformMat3:o,transformMat3View:n,transformMat4:function(e,t,r,n=4,o=n){let a=(0,i.k)(e.length,n,4),s=(0,i.k)(t.length,o,4),l=Math.min(a,s),c=r[0],u=r[1],d=r[2],h=r[3],f=r[4],m=r[5],p=r[6],v=r[7],g=r[8],x=r[9],_=r[10],b=r[11],y=r[12],w=r[13],M=r[14],T=r[15],S=0,C=0;for(let r=0;r<l;r++){let r=t[S],i=t[S+1],a=t[S+2],s=t[S+3];e[C]=c*r+f*i+g*a+y*s,e[C+1]=u*r+m*i+x*a+w*s,e[C+2]=d*r+p*i+_*a+M*s,e[C+3]=h*r+v*i+b*a+T*s,S+=o,C+=n}},transformMat4View:function(e,t,r){let n=e.typedBuffer,o=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,l=(0,i.k)(n.length,o,4),c=(0,i.k)(a.length,s,4),u=Math.min(l,c),d=r[0],h=r[1],f=r[2],m=r[3],p=r[4],v=r[5],g=r[6],x=r[7],_=r[8],b=r[9],y=r[10],w=r[11],M=r[12],T=r[13],S=r[14],C=r[15];for(let e=0;e<u;e++){let t=e*o,r=e*s,i=a[r],l=a[r+1],c=a[r+2],u=a[r+3];n[t]=d*i+p*l+_*c+M*u,n[t+1]=h*i+v*l+b*c+T*u,n[t+2]=f*i+g*l+y*c+S*u,n[t+3]=m*i+x*l+w*c+C*u}}},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+a(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,i,n=0,o=!1){return(i-=n)<t?i+=a(e,t-i):i>r&&(i-=a(e,i-r)),o&&i===r&&(i=t),i+n}function a(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360));r.d(t,["ie",0,l,"uC",0,s])},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){let[r,o]=e.split(".",2),a=/^\s*\d+\s*$/;if(!r?.match||!a.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!o?.match||!a.test(o)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new n(parseInt(r,10),parseInt(o,10),t)}}},61473(e,t,r){function i(e){return e||=globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function n(e,t){return e?(t||=globalThis.location.hostname,t?null!=t.match(o)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(a)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e):null}r.d(t,{EM:()=>n,b5:()=>i});const o=/^devext\.arcgis\.com$/,a=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,a,/^jsapps\.esri\.com$/,s,l]},18370(e,t,r){r.d(t,{z:()=>n});class i{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function n(e){return new i(e)}},88340(e,t,r){function i(){return new Float32Array(2)}function n(e,t){let r=new Float32Array(2);return r[0]=e,r[1]=t,r}function o(){return i()}function a(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{Un:()=>u,fA:()=>n,uY:()=>c,vt:()=>i});const c=o(),u=a(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){let t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,fromValues:n,ones:a,unitX:s,unitY:l,zeros:o},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{JY:()=>f,Qf:()=>l,Qh:()=>a,lM:()=>o,ro:()=>c,rq:()=>u});var i=r(44208),n=r(34275);function o(e){if(!e)return 0;let t=d;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function a(e){if(!e)return 0;if(Array.isArray(e))return function(e){let t=h;for(let r of e)t+=s(r);return t}(e);if(ArrayBuffer.isView(e)&&"length"in e&&"number"==typeof e.length&&e.length>0)return e.byteLength+m;let t=d;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?a(e):d;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+c(t),0)}function c(e,t=16){return e?(0,n.iu)(e)?e.byteLength+m:Array.isArray(e)?u(e,t):0:0}function u(e,t){return h+e.length*t}const d=32,h=16,f=(0,i.A)("ios")||!(0,i.A)("chrome")&&!(0,i.A)("opr")?8:4,m=145},65806(e,t,r){r.d(t,{g:()=>a});var i=r(51850),n=r(99917),o=r(9762);function a(e,t,r,i){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,o.projectBuffer)(s,e.spatialReference,0,t,r,0);let a=(0,n.tryProject)(e,r,i);return!!a&&(t[0]=a.x,t[1]=a.y,t[2]=a.z??0,!0)}const s=(0,i.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var i=r(99917),n=r(16930),o=r(9762),a=r(65806);function s(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,i.canProjectWithoutEngine)(t,n)?(0,o.projectBuffer)(e,t,0,r,n,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,a.g)(l,r,n)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},97146(e,t,r){r.d(t,{Dg:()=>o,lc:()=>d,my:()=>a,tM:()=>h,uW:()=>n});var i=r(34275);function n(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let r=!0,n=!0;return e.some((e,t)=>(r&&=0===e,n&&=e===t,!r&&!n)),r?function(e){if(1===e)return c;if(e<1024)return Array(e).fill(0);if(e>l.length){let t=Math.max(2*l.length,e);l=new Uint8Array(t)}return new Uint8Array(l.buffer,0,e)}(e.length):n?h(e.length):(0,i.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(let r of e){if(r>=65536)return(0,i.iu)(e)?e:new Uint32Array(e);r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function a(e,t=e){return e<=1024?Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}let s=f(131072),l=new Uint8Array(65536);const c=[0],u=(()=>{let e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function d(e){if(e===c)return!0;if(!(0,i.iu)(e))return!1;let{buffer:t}=e;return t===u.buffer||t===s.buffer||t===l.buffer}function h(e){return 1===e?c:e<1024?function(e){let t=Array(e).fill(0);for(let r=0;r<e;r++)t[r]=r;return t}(e):e<u.length?new Uint16Array(u.buffer,0,e):(e>s.length&&(s=f(Math.max(2*s.length,e))),new Uint32Array(s.buffer,0,e))}function f(e){let t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}},72727(e,t,r){function i(e,t,r){if(t<=0)return 0;let i=e-r;return i<0?0:Math.floor(i/t)+1}r.d(t,{k:()=>i}),r(53966)},65720(e,t,r){r.d(t,{C:()=>g,vt:()=>p,Qy:()=>v,ui:()=>x,ST:()=>T,bU:()=>C,pw:()=>M,m7:()=>_,ZU:()=>b,GH:()=>w,Pi:()=>y,LJ:()=>S,c8:()=>I});var i=r(58083),n=r(35522),o=r(51850),a=r(78955),s=r(91829),l=r(4341),c=r(70328),u=r(71351);function d(e){return e?{ray:(0,u.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,u.vt)(),c0:0,c1:Number.MAX_VALUE}}new l.I(()=>d());var h=r(27921);function f(e,t,r,i){let{t0:n,t1:o}=i,a=(0,h.mN)(e,t),s=(0,h.mN)(e,r);if(a>=0&&s>=0)return!1;if(a<0&&s>=0){let e=-a/(s-a);if(e<n)return!1;e<o&&(o=e)}else if(a>=0&&s<0){let e=a/(a-s);if(e>o)return!1;e>n&&(n=e)}return i.t0=n,i.t1=o,!0}var m=r(32114);function p(e){return e?[(0,h.vt)(e[0]),(0,h.vt)(e[1]),(0,h.vt)(e[2]),(0,h.vt)(e[3]),(0,h.vt)(e[4]),(0,h.vt)(e[5])]:[(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)()]}function v(){return[(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)()]}function g(e,t){for(let r=0;r<O;r++)(0,h.C)(e[r],t[r]);return e}function x(e,t,r,o=F){let s=(0,i.lw)(m.Rc.get(),t,e);(0,i.B8)(s,s);for(let e=0;e<P;++e){let t=(0,a.Z0)(m.Km.get(),D[e],s);(0,n.hZ)(o[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}var l,c;l=r,c=o,(0,h.Cr)(c[4],c[0],c[3],l[0]),(0,h.Cr)(c[1],c[5],c[6],l[1]),(0,h.Cr)(c[4],c[5],c[1],l[2]),(0,h.Cr)(c[3],c[2],c[6],l[3]),(0,h.Cr)(c[0],c[1],c[2],l[4]),(0,h.Cr)(c[5],c[4],c[7],l[5])}function _(e,t){return b(e,t.center,t.radius)}function b(e,t,r){for(let i=0;i<O;i++){let n=e[i];if(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]>=r)return!1}return!0}function y(e,t,r){for(let i of E)if((0,h.wE)(e[i],t,r))return!0;return!1}function w(e,t,r){let i=(0,c.gX)(t,B),o=(0,c.VL)(t)/2,a=(0,c.yr)(t)/2,s=(0,c.uJ)(t)/2;return r?function(e,t,r,i,o,a){let s=(0,n.Z0)(N,t,a);for(let t=0;t<O;t++){let n=e[t];if(n[0]*s[0]+n[1]*s[1]+n[2]*s[2]+n[3]-(Math.abs(n[0]*a[0]+n[1]*a[1]+n[2]*a[2])*r+Math.abs(n[0]*a[4]+n[1]*a[5]+n[2]*a[6])*i+Math.abs(n[0]*a[8]+n[1]*a[9]+n[2]*a[10])*o)>0)return!1}return!0}(e,i,o,a,s,r):function(e,t,r,i,n){for(let o=0;o<O;o++){let a=e[o];if(a[0]*t[0]+a[1]*t[1]+a[2]*t[2]+a[3]-(Math.abs(a[0])*r+Math.abs(a[1])*i+Math.abs(a[2])*n)>0)return!1}return!0}(e,i,o,a,s)}function M(e,t){return A(e,function(e,t=d()){return(0,u.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,R.get()))}function T(e,t,r){return A(e,function(e,t,r=d()){let i=(0,n.Bw)(e.vector);return(0,u.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,R.get()))}function S(e,t,r){return function(e,t,r,i){let n={t0:0,t1:1};for(let o of t)if(!f(e[o],r,i,n))return!1;return n.t0<n.t1}(e,E,t,r)}function C(e,t){for(let r=0;r<O;r++)if((0,h.mN)(e[r],t)>0)return!1;return!0}function A(e,t){for(let r=0;r<O;r++)if(!(0,h.$Q)(e[r],t))return!1;return!0}const E=[0,1,2,3,5],I={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},O=6,P=8,D=[(0,s.fA)(-1,-1,-1,1),(0,s.fA)(1,-1,-1,1),(0,s.fA)(1,1,-1,1),(0,s.fA)(-1,1,-1,1),(0,s.fA)(-1,-1,1,1),(0,s.fA)(1,-1,1,1),(0,s.fA)(1,1,1,1),(0,s.fA)(-1,1,1,1)],R=new l.I(d),F=v(),B=(0,o.vt)(),N=(0,o.vt)()},11964(e,t,r){r.d(t,{Cr:()=>u,LV:()=>c,_I:()=>d,vt:()=>l});var i=r(35522),n=r(51850),o=r(34727),a=r(4341),s=r(32114);function l(e){return e?{origin:(0,n.o8)(e.origin),vector:(0,n.o8)(e.vector)}:{origin:(0,n.vt)(),vector:(0,n.vt)()}}function c(e,t){let r=h.get();return r.origin=e,r.vector=t,r}function u(e,t,r=l()){return(0,i.C)(r.origin,e),(0,i.Re)(r.vector,t,e),r}function d(e,t,r){return function(e,t,r,n,a){let{vector:l,origin:c}=e,u=(0,i.Re)(s.rq.get(),t,c),d=(0,i.Om)(l,u)/(0,i.m3)(l);return(0,i.hs)(a,l,(0,o.qE)(d,0,1)),(0,i.WQ)(a,a,e.origin)}(e,t,0,0,r)}(0,n.vt)(),(0,n.vt)();const h=new a.I(()=>l())},52039(e,t,r){r.d(t,{O7:()=>h,Y_:()=>m,el:()=>c});var i=r(69052),n=(r(49186),r(18370)),o=r(17676),a=(r(5443),r(39829)),s=(r(82799),r(16930)),l=(r(80754),r(21325));async function c(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let i=null;for(let t of e)i??=t?.spatialReference;if(!i)return e;let n=(0,l.Vp)(i);if(!n)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(n);return["xmin"in t?t:new a.A(t)]}let[s,c]=n.valid,h=!1;for(let t of e){if(!t)continue;if("point"===t.type){h||=t.x>=c,h||=t.x<=s;continue}let{extent:e}=t;if(null==e){h=!0;break}h||=e.xmin>=c,h||=e.xmin<=s,h||=e.xmax>=c,h||=e.xmax<=s}if(!h)return e;let[{foldInto360Range:f},m]=await(0,o.qr)(Promise.all([u.getImportPromise(),d.getImportPromise()]),r),p=m.fromSpatialReference(i);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=m.fromGeometry(e),r=m.toGeometry(f(t,p),i);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const u=(0,n.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),d=(0,n.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function h(e,t,r){let i=(0,l.Vp)(r);if(null==i)return e;let[n,o]=i.valid,a=2*o,s=0,c=0;t>o?s=Math.ceil(Math.abs(t-o)/a):t<n&&(s=-Math.ceil(Math.abs(t-n)/a)),e>o?c=Math.ceil(Math.abs(e-o)/a):e<n&&(c=-Math.ceil(Math.abs(e-n)/a));let u=e+(s-c)*a,d=u-t;return d>o?u-=a:d<n&&(u+=a),u}function f(e){let t=(0,l.Vp)(e);if(null==t)return null;let[r,n]=t.valid;return new i.hr(r,n)}const m=f(s.A.WGS84);f(s.A.WebMercator)},48295(e,t,r){r.d(t,{BU:()=>u,Ui:()=>s,cq:()=>c,k3:()=>d,rb:()=>h});var i=r(35522),n=r(51850),o=r(4341),a=r(11964);function s(e,t,r){let{direction:n,origin:o}=t,{p0:a,p1:s,p2:l}=e,c=s[0]-a[0],u=s[1]-a[1],d=s[2]-a[2],h=l[0]-a[0],f=l[1]-a[1],m=l[2]-a[2],p=n[1]*m-f*n[2],v=n[2]*h-m*n[0],g=n[0]*f-h*n[1],x=c*p+u*v+d*g;if(x>-1e-5&&x<1e-5)return!1;let _=1/x,b=o[0]-a[0],y=o[1]-a[1],w=o[2]-a[2],M=_*(b*p+y*v+w*g);if(M<0||M>1)return!1;let T=y*d-u*w,S=w*c-d*b,C=b*u-c*y,A=_*(n[0]*T+n[1]*S+n[2]*C);if(A<0||M+A>1)return!1;if(r){let e=_*(h*T+f*S+m*C);(0,i.hs)(r,n,e),(0,i.WQ)(r,o,r)}return!0}function l(e,t,r){let[i,n]=e,[o,a]=t,[s,l]=r;return.5*((o-i)*(l-n)-(a-n)*(s-i))}function c(e,t,r,i,n=0){let o=l(i,e,t),a=l(i,t,r),s=l(i,r,e);return!((o<-n||a<-n||s<-n)&&(o>n||a>n||s>n))}function u(e,t,r){return(0,i.Re)(f,t,e),(0,i.Re)(m,r,e),.5*(0,i.Bw)((0,i.$A)(f,f,m))}function d(e,t,r,n,o){(0,i.jb)(f,n,r),(0,i.jb)(p,o,r),(0,i.jb)(m,t,r);let a=(0,i.Om)(f,m),s=(0,i.Om)(p,m);if(a<=0&&s<=0)return void(0,i.C)(e,r);(0,i.jb)(m,t,n);let l=(0,i.Om)(f,m),c=(0,i.Om)(p,m);if(l>=0&&c<=l)return void(0,i.C)(e,n);let u=a*c-l*s;if(u<=0&&a>=0&&l<=0)return void(0,i.Ln)(e,r,f,a/(a-l));(0,i.jb)(m,t,o);let d=(0,i.Om)(f,m),h=(0,i.Om)(p,m);if(h>=0&&d<=h)return void(0,i.C)(e,o);let v=d*s-a*h;if(v<=0&&s>=0&&h<=0)return void(0,i.Ln)(e,r,p,s/(s-h));let g=l*h-d*c;if(g<=0&&c-l>=0&&d-h>=0)return(0,i.jb)(m,o,n),void(0,i.Ln)(e,n,m,(c-l)/(c-l+(d-h)));let x=1/(g+v+u);(0,i.C)(e,r),(0,i.Ln)(e,e,f,v*x),(0,i.Ln)(e,e,p,u*x)}function h(e,t,r,n){(0,i.jb)(f,r,t),(0,i.jb)(m,n,t),(0,i.$A)(e,f,m);let o=(0,i.Bw)(e);return 0!==o&&((0,i.hs)(e,e,1/o),!0)}r(32114),new o.I(a.vt),new o.I(()=>{return e?{p0:(0,n.o8)(e.p0),p1:(0,n.o8)(e.p1),p2:(0,n.o8)(e.p2)}:{p0:(0,n.vt)(),p1:(0,n.vt)(),p2:(0,n.vt)()};var e});const f=(0,n.vt)(),m=(0,n.vt)(),p=(0,n.vt)()},21015(e,t,r){r.d(t,{R:()=>l});var i=r(60999),n=r(49186),o=r(17676),a=r(84952),s=r(78888);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,a.DB)(e)?((0,o.Te)(t),(0,a.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);let a=await(0,i.Ke)((0,s.A)(t,{responseType:e,...r}));if(a.ok)return a.value.data;throw(0,o.QP)(a.error),new n.A("gltf-loader-request-error",`Request for resource failed: ${a.error}`)}}},84498(e,t,r){r.d(t,{x:()=>a});var i=r(34275),n=r(97146),o=r(63907);function a(e,t){switch(t){case o.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,i.mg)(e)?new Uint16Array(e):e}(e);case o.WR.TRIANGLE_STRIP:return function(e){let t="number"==typeof e?e:e.length;if(t<3)return[];let r=t-2,i=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(i[e++]=t,i[e++]=t+1,i[e++]=t+2):(i[e++]=t+1,i[e++]=t,i[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(i[t++]=e[n],i[t++]=e[n+1],i[t++]=e[n+2]):(i[t++]=e[n+1],i[t++]=e[n],i[t++]=e[n+2])}return i}(e);case o.WR.TRIANGLE_FAN:return function(e){let t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array;let r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)i[e++]=0,i[e++]=t+1,i[e++]=t+2;return i}let n=e[0],o=e[1],a=0;for(let t=0;t<r;++t){let r=e[t+2];i[a++]=n,i[a++]=o,i[a++]=r,o=r}return i}(e)}}},51530(e,t,r){r.d(t,{KB:()=>a,Xi:()=>n,pn:()=>s,x3:()=>o});var i=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function o(e){return"encoded-mesh-texture"===e?.type}async function a(e){let t=await new Blob([e]).text();return JSON.parse(t)}async function s(e,t){if("image/ktx2"===t)return new n(e);let r=new Blob([e],{type:t}),o=URL.createObjectURL(r);switch(t){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}let a=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{let r=()=>{n(),e(a)},i=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(o),a.removeEventListener("load",r),a.removeEventListener("error",i)};a.addEventListener("load",r),a.addEventListener("error",i),a.src=o});try{a.src=o,await a.decode()}catch{}return URL.revokeObjectURL(o),a}},47143(e,t,r){r.d(t,{fetch:()=>Or});var i=r(40876),n=r(61473),o=r(77690),a=r(29242),s=r(58083),l=r(9093),c=r(48163),u=r(35522),d=r(51850),h=r(34727),f=r(70328),m=r(13030),p=r(73354),v=r(50867),g=r(43609);function x(e,t=!1){return e<=1024?t?Array(e).fill(0):Array(e):new Float32Array(e)}var _=r(21015),b=r(84498),y=r(51530),w=r(88340);function M(e){if(null==e)return null;let t=null==e.offset?w.uY:e.offset,r=null==e.rotation?0:e.rotation,i=null==e.scale?w.Un:e.scale,n=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,a.fA)(i[0],0,0,0,i[1],0,0,0,1),c=(0,a.vt)();return(0,o.lw)(c,s,l),(0,o.lw)(c,n,c),c}var T=r(46610),S=r(69397),C=r(97146),A=r(94656),E=r(34275);function I(e){if(e.length<1024)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,E.LW)(e)?Float16Array.from(e):(0,E.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return(0,E.vZ)(e)?Float32Array.from(e):Uint32Array.from(e);default:return Float64Array.from(e)}}var O=r(15142),P=r(28540),D=r(620);class R{constructor(e,t,r,i){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this._readPosition=r,this._notifyMemoryChange=i,this._children=void 0,(0,D.vA)(e.length>=1);let n=e.length;z.clear();let o=(0,f.Ie)();for(let i=0;i<n;++i){let n=t*e[i];for(let e=0;e<t;++e){let t=n+e;z.push(t),(0,f.iT)(o,r(F,t))}}this.box=o;let a=new P.i,s=(0,f.gX)(o,a.center),l=.5*Math.max((0,f.VL)(o),(0,f.yr)(o),(0,f.uJ)(o)),c=l*l;for(let e=0;e<z.length;++e){let t=r(F,z.at(e)),i=(0,u.Re)(t,t,s),n=(0,u.uE)(i);if(n<=c)continue;let o=Math.sqrt(n),a=.5*(o-l);l+=a,c=l*l;let d=a/o;(0,u.Ln)(s,s,i,d)}a.radius=l,this.sphere=a,z.clear()}get usedMemory(){let e=88+(0,S.rq)(this.box,8)+32+16+(0,S.rq)(this.sphere.center,8)+function(e){return(0,E.iu)(e)?145+((0,C.lc)(e)?0:e.byteLength):(0,C.lc)(e)?0:(0,S.rq)(e,S.JY)}(this.primitiveIndices),t=this._children;if(t){e+=(0,S.rq)(t,8);for(let r of t)e+=r.usedMemory}return e}get children(){if(this._children)return this._children;let e=this.box;if((0,f.TF)(e)<=1)return;let{_readPosition:t,_numIndexPerPrimitive:r,primitiveIndices:i}=this,n=(0,f.gX)(e,F),o=i.length,a=new Uint8Array(o),s=[0,0,0,0,0,0,0,0];for(let e=0;e<o;++e){let o=r*i[e],l=t(B,o);for(let e=1;e<r;++e)(0,u.jk)(l,l,t(N,o+e));let c=+(l[0]<n[0])|(l[1]<n[1]?2:0)|(l[2]<n[2]?4:0);a[e]=c,++s[c]}let l=0;for(let e=0;e<8;++e)s[e]>0&&++l;if(l<2)return;let c=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0];for(let e=0;e<8;++e)s[e]>0&&(c[e]=new Uint32Array(s[e]));s.fill(0);for(let e=0;e<o;++e){let t=a[e];c[t][s[t]++]=i[e]}let d=[];for(let e=0;e<8;++e){let i=c[e];void 0!==i&&d.push(new R(i,r,t,this._notifyMemoryChange))}return this._children=d,this._notifyMemoryChange?.((0,S.rq)(d,8)+d.reduce((e,t)=>e+t.usedMemory,0)),d}static prune(){z.prune()}}const F=(0,d.vt)(),B=(0,d.vt)(),N=(0,d.vt)(),z=new O.A({deallocator:null});var L=r(24326);class H{constructor(e){this.id=(0,L.c)(),this.type=0,this._attributes=new Map;for(let[t,r]of e)this._attributes.set(t,{...r,indices:(0,C.Dg)(r.indices)})}get attributes(){return this._attributes}}class V{constructor(){this.uid=(0,L.c)()}}class U extends V{constructor(e){super(),this.highlightName=e,this.channel=0}}class j extends H{get usedMemoryExcludingBuffers(){return this._usedMemory+this._primitivePositionIndicesMemory+(this._boundingInfo?.usedMemory??0)}get _primitivePositionIndicesMemory(){let e=this._vertexPositionIndicesCache;return e&&e!==this.positionAttribute?.indices?(0,S.ro)(e,S.JY):0}computeBufferMemory(e){let t=e.arrayMemory(this.mapPositions)+e.arrayMemory(this.drawIndices,S.JY,!0);for(let r of this.attributes.values())t+=e.arrayMemory(r.data)+e.arrayMemory(r.indices,S.JY,!0);return t}constructor(e,t,r=null,i=-1,n,o){super(t),this.material=e,this.mapPositions=r,this.edgeIndicesLength=i,this.baseGeometry=n,this.drawIndices=o,this._usedMemory=0,this._readPrimitivePosition=null,this._vertexPositionIndicesCache=void 0,this._transformation=void 0,this.localOrigin=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0,this._boundingInfo=null,(0,D.vA)((e?.useIndexing??!1)===(null!=o),"Material index requirement and Geometry must match"),this.edgeIndicesLength<0&&(this.edgeIndicesLength=this.indexCount)}get readPrimitivePosition(){return this._readPrimitivePosition??=function(e,t){let{data:r,indices:i,size:n,stride:o}=e;return(0,D.vA)(2===n||3===n||4===n,"Position attribute must have 2, 3 or 4 components"),2===n?null==t?(e,t)=>{let n=i[t]*o;return e[0]=r[n],e[1]=r[n+1],e[2]=-2,e}:(e,n)=>{let a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=-2,e}:null==t?function(e,t,r){return(i,n)=>{let o=t[n]*r;return i[0]=e[o],i[1]=e[o+1],i[2]=e[o+2],i}}(r,i,o):(e,n)=>{let a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=r[a+2],e}}(this.positionAttribute,this.drawIndices),this._readPrimitivePosition}_invalidateReadPrimitivePosition(){this._readPrimitivePosition=null}instantiate(e={}){let t=new j(e.material||this.material,[],this.mapPositions,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)}),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:I(t.data)},this._attributes.set(e,t),"position"===e&&this._invalidateReadPrimitivePosition()),t}setAttributeData(e,t){let r=this._attributes.get(e);r?(this._attributes.set(e,{...r,exclusive:!0,data:t}),"position"===e&&this._invalidateReadPrimitivePosition()):(0,A.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get primitivePositionIndices(){if(void 0!==this._vertexPositionIndicesCache)return this._vertexPositionIndicesCache;this._vertexPositionIndicesCache=this._computePrimitivePositionIndices();let e=this._primitivePositionIndicesMemory;return e&&this.notifyMemoryChange?.(e),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){let{drawIndices:e}=this,t=this.positionAttribute;if(null!=e&&null!=t){let r=Array(e.length).fill(0);for(let i=0;i<e.length;i++)r[i]=t.indices[e[i]];return r}return t?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){return(this.drawIndices??this.positionAttribute?.indices)?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo||(this._boundingInfo=this._calculateBoundingInfo(),this._boundingInfo&&this.notifyMemoryChange?.(this._boundingInfo.usedMemory)),this._boundingInfo}computeAttachmentOrigin(e){return!!this.material.computeAttachmentOrigin(e,this.readPrimitivePosition,this.indexCount)&&(null!=this._transformation&&(0,u.Z0)(e,e,this._transformation),!0)}invalidateBoundingInfo(){let e=this._primitivePositionIndicesMemory+(this._boundingInfo?.usedMemory??0);this._boundingInfo=null,this._vertexPositionIndicesCache=void 0,e&&this.notifyMemoryChange?.(-e)}_calculateBoundingInfo(){let e=this.positionAttribute,t=this.indexCount;if(!e||0===t)return null;let r=this.material.primitiveVertexCount;(0,D.vA)(t%r===0,"Indexing error: "+t+" not divisible by "+r);let i=(0,C.tM)(t/r);return new R(i,r,this.readPrimitivePosition,e=>this.notifyMemoryChange?.(e))}get transformation(){return this._transformation??l.zK}set transformation(e){this._transformation=e&&e!==l.zK?(0,l.o8)(e):null}get highlights(){return this._highlights||G}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}forEachHighlightOption(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){let t=new U(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);let{highlightName:t}=e,r=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,r),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){let{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const G=new Set;var k=r(76200),W=r(49788),$=r(49255),Z=r(97768),q=r(17676),Y=r(65786);class X{constructor(e){this._material=e.material,this._techniques=e.techniques}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(t))}ensureResources(e){return 2}}class K extends X{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,Z.Gz)(this._texture),this._textureNormal=(0,Z.Gz)(this._textureNormal),this._textureEmissive=(0,Z.Gz)(this._textureEmissive),this._textureOcclusion=(0,Z.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,Z.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new Q(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){(null==this._texture||e!==this._texture.id)&&(this._texture=(0,Z.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);let r=this._textures.acquire(e);(0,q.$X)(r)?(++this._numLoading,r.then(e=>{this._disposed?((0,Z.Gz)(e),t(null)):t(e)}).finally(()=>--this._numLoading)):t(r)}}class J extends Y.Y{constructor(e=null){super(),this.textureEmissive=e}}class Q extends J{constructor(e,t,r,i,n,o,a){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.normalScale=o,this.normalTextureTransformMatrix=a}}var ee=r(19245),te=r(48295);const re=(0,d.vt)(),ie=(0,d.vt)(),ne=(0,d.vt)(),oe=(0,d.vt)();class ae{constructor(e,t){this.id=(0,L.c)(),this.supportsEdges=!1,this.primitiveVertexCount=3,this._renderPriority=0,this._parameters=new t,(0,ee.MB)(this._parameters,e),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,ee.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get emissions(){return 0}getConfiguration(e){return this.updateConfiguration(e),this._configuration}updateConfiguration(e){this._configuration.output=e.output,this._configuration.hasEmission=e.hasEmission&&(0,$._o)(e.output),this._configuration.hasHighlightMixTexture=10===e.output&&null!=e.highlightMixTexture,this._configuration.useFloatBlend=e.useFloatBlend.value,this._configuration.emissionDimmingPass=e.transparentWithoutDepthEmissionDimmingPass&&(0,$._o)(e.output)}computeAttachmentOrigin(e,t,r){return function(e,t,r){if(r<=0)return!1;(0,u.hZ)(e,0,0,0),(0,u.hZ)(oe,0,0,0);let i=0,n=0;for(let o=0;o<r;++o){let r=3*o;t(re,r),t(ie,r+1),t(ne,r+2);let a=(0,te.BU)(re,ie,ne);a?((0,u.WQ)(re,re,ie),(0,u.WQ)(re,re,ne),(0,u.hs)(re,re,1/3*a),(0,u.WQ)(e,e,re),i+=a):((0,u.WQ)(oe,oe,re),(0,u.WQ)(oe,oe,ie),(0,u.WQ)(oe,oe,ne),n+=3)}return!(0===n&&0===i||(0===i?0===n||((0,u.hs)(e,oe,1/n),0):((0,u.hs)(e,e,1/i),0)))}(e,t,r/3)}getPrimitivePositionCount(e,t){return(t??e).indexCount}}Y.Y;var se=r(58682),le=r(90629),ce=r(65720),ue=r(27921),de=r(19419),he=r(11964);function fe(e,t){return e.isRectangle?(0,de.Uc)(e.bounds,t):function(e,t){return pe(e[0],e[1],t)}(t,e.points)}function me(e,t,r,i){let n=Math.min(t[0],r[0],i[0]),o=Math.min(t[1],r[1],i[1]),a=Math.max(t[0],r[0],i[0]),s=Math.max(t[1],r[1],i[1]);if(!function(e,t){if(!(0,de.HY)(e.bounds,t))return!1;if(e.isRectangle)return!0;for(let r of e.points)if((0,de.Uc)(t,r))return!0;if(function(e,t){let r=e[0],i=e[1],n=e[2],o=e[3];return pe(r,i,t)||pe(n,i,t)||pe(n,o,t)||pe(r,o,t)}(t,e.points))return!0;for(let r=0;r<e.points.length;r++)if(ve(e.points[r],r===e.points.length-1?e.points[0]:e.points[r+1],t))return!0;return!1}(e,(0,de.fA)(n,o,a,s,we)))return!1;if(fe(e,t)||fe(e,r)||fe(e,i))return!0;for(let n of e.points)if((0,te.cq)(t,r,i,n,Me))return!0;for(let n=0;n<e.points.length;n++){let o=e.points[n],a=e.points[(n+1)%e.points.length];if(xe(t,r,o,a)||xe(r,i,o,a)||xe(i,t,o,a))return!0}return!1}function pe(e,t,r){let i=!1;for(let n=0,o=r.length-1;n<r.length;o=n++){let a=r[n],s=r[o];a[1]>t!=s[1]>t&&e<(s[0]-a[0])*(t-a[1])/(s[1]-a[1])+a[0]&&(i=!i)}return i}function ve(e,t,r){let i=r[0],n=r[1],o=r[2],a=r[3],s=e[0],l=e[1],c=t[0],u=t[1];return!(s<i&&c<i||s>o&&c>o||l<n&&u<n||l>a&&u>a)&&(!(!(0,de.Rj)(r,s,l)&&!(0,de.Rj)(r,c,u))||ge(e,t,i,n,o,n)||ge(e,t,o,n,o,a)||ge(e,t,o,a,i,a)||ge(e,t,i,a,i,n))}function ge(e,t,r,i,n,o){let a=_e(e[0],e[1],t[0],t[1],r,i),s=_e(e[0],e[1],t[0],t[1],n,o),l=_e(r,i,n,o,e[0],e[1]),c=_e(r,i,n,o,t[0],t[1]);return a!==s&&l!==c||0===a&&be(e,t,r,i)||0===s&&be(e,t,n,o)||0===l&&ye(r,i,n,o,e[0],e[1])||0===c&&ye(r,i,n,o,t[0],t[1])}function xe(e,t,r,i){return ge(e,t,r[0],r[1],i[0],i[1])}function _e(e,t,r,i,n,o){let a=(i-t)*(n-r)-(r-e)*(o-i);return Math.abs(a)<=Me?0:Math.sign(a)}function be(e,t,r,i){return ye(e[0],e[1],t[0],t[1],r,i)}function ye(e,t,r,i,n,o){return n>=Math.min(e,r)-Me&&n<=Math.max(e,r)+Me&&o>=Math.min(t,i)-Me&&o<=Math.max(t,i)+Me}const we=(0,de.vt)(),Me=((0,le.r_)(),(0,le.r_)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,he.vt)(),1e-9);class Te{constructor(e){this.type=e,this.distance=1/0,this.renderDistance=1/0,this.primitiveIndex=0,this.hasNormal=!1,this.point=(0,d.vt)(),this.normal=(0,d.vt)()}reset(){this.distance=1/0,this.renderDistance=1/0,this.hasNormal=!1}update(e,t,r,i,n=e){this.distance=e,this.renderDistance=n,this.primitiveIndex=t,(0,u.C)(this.point,r),this.hasNormal=null!=i,null!=i&&(0,u.C)(this.normal,i)}updateIfCloserFromValues(e,t,r,i,n=e){n<this.renderDistance&&this.update(e,t,r,i,n)}updateIfCloser(e){let{distance:t,renderDistance:r,primitiveIndex:i,point:n,normal:o}=e;this.updateIfCloserFromValues(t,i,n,e.hasNormal?o:null,r)}get valid(){return Number.isFinite(this.distance)}}function Se(e,t,r,i,n){if(!e.visible)return null;let o,a=new Te(4);o=e.boundingInfo?Ae(e.readPrimitivePosition,e.boundingInfo,t,r,i,n):Ce(t,r,i,0,e.faceCount,e.readPrimitivePosition,n,null,0);for(let e of o)a.updateIfCloser(e);return a.valid?a:null}function*Ce(e,t,r,i,n,o,a,s=null,l=0){if(null==e.camera)return;let{camera:c,screenPolygonPrimitiveProcessor:d}=e;for(let e=i;e<n;++e){let i=(s?.[e]??e)+l,n=null==s?i:e,h=3*i;Ee(De[0],o,h+0,a,n,t),Ee(De[1],o,h+1,a,n,t),Ee(De[2],o,h+2,a,n,t);let f,m=Le;Ve.reset();let p=Re;for(let e of d.processTriangle(De))Ie(r,e,c,p)&&(Oe(c.eye,p,ze),f??=(0,te.rb)(Le,De[0],De[1],De[2]),Ve.updateIfCloserFromValues((0,u.Io)(c.eye,ze),i,ze,f?m:null));Ve.valid&&(yield Ve)}}function*Ae(e,t,r,i,n,o){let a;if(null==o?a=(0,ce.GH)(n.broadPhaseFrustum,t.box,i):((0,f.C)(Pe,t.box),o.applyToAabb(Pe),a=(0,ce.GH)(n.broadPhaseFrustum,Pe,i)),!a)return;let{primitiveIndices:s}=t,l=s.length;if(l>1e3){let a=t.children;if(void 0!==a){for(let t of a)yield*Ae(e,t,r,i,n,o);return}}yield*Ce(r,i,n,0,l,e,o,s,0)}function Ee(e,t,r,i,n,o){let[a,s,l]=t(e,r);null==i?(0,u.hZ)(e,a,s,l):i.applyToVertex(e,a,s,l,n),o&&(0,u.Z0)(e,e,o)}function Ie(e,t,r,i){if(i.length=0,(0,ue.H)(r.frustum[4],t,()=>i.pushNew()),i.length<3)return!1;let n=Fe,o=Be,a=Ne;r.projectToScreen(i.data[0],n),r.projectToScreen(i.data[1],o);for(let t=2;t<i.length;t++){if(r.projectToScreen(i.data[t],a),me(e,n,o,a))return!0;let s=o;o=a,a=s}return!1}function Oe(e,t,r){let i=1/0,n=t.at(0);for(let o=1;o<t.length-1;o++){(0,te.k3)(He,e,n,t.at(o),t.at(o+1));let a=(0,u.hG)(e,He);a<i&&(i=a,(0,u.C)(r,He))}}const Pe=(0,f.vt)(),De=[(0,d.vt)(),(0,d.vt)(),(0,d.vt)()],Re=new O.A({allocator:e=>e??(0,d.vt)()}),Fe=(0,le.gs)(),Be=(0,le.gs)(),Ne=(0,le.gs)(),ze=(0,d.vt)(),Le=(0,d.vt)(),He=(0,d.vt)(),Ve=new Te(4);var Ue=r(16396),je=r(32198),Ge=r(91429),ke=r(91829),We=r(90644),$e=r(4431),Ze=r(1843),qe=(r(31821),r(35644),r(96336),r(87757));class Ye extends qe.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,a.vt)()}}qe.EM;var Xe=r(13840),Ke=r(42958),Je=r(16943);r(4576),r(66289);var Qe=r(56372),et=r(65529),tt=r(32728);class rt{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",m.Eq),this.color=e.getField("instanceColor",m.XP),this.olidColor=e.getField("instanceOlidColor",m.XP),this.state=e.getField("state",m.SL),this.lodLevel=e.getField("lodLevel",m.SL)}}let it=class extends Qe.A{constructor(e,t){super(e),this.events=new et.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return ot(nt.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=ut,this._buffer=this._layout.createBuffer(this._capacity),this._view=new rt(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();let e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){let t=this._view.state;(0,D.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){let t=this._view.state;(0,D.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){let t=this._view,r=at,i=st;t.localTransform.getMat(e,lt),t.globalTransform.getMat(e,ct);let n=(0,s.lw)(ct,ct,lt);(0,u.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,o.z0)(i,n),t.model.setMat(e,i);let a=(0,tt.wp)(at,n);a.sort(),t.modelScaleFactors.set(e,0,a[1]),t.modelScaleFactors.set(e,1,a[2]),(0,o.B8)(i,i),(0,o.mg)(i,i),t.modelNormal.setMat(e,i),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){let r=this._view;r.model.getMat(e,st),r.modelOrigin.getVec(e,at),t[0]=st[0],t[1]=st[1],t[2]=st[2],t[3]=0,t[4]=st[3],t[5]=st[4],t[6]=st[5],t[7]=0,t[8]=st[6],t[9]=st[7],t[10]=st[8],t[11]=0,t[12]=at[0],t[13]=at[1],t[14]=at[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(at,this,e),t*=Math.max(at[0],at[1],at[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(at,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(at[0],at[1],at[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){let{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){let t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){let t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){let r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){let r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(ut,Math.floor(1.5*this._capacity)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new rt(this._buffer)}_findSlot(){let e=this._view.state,t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,je.Cg)([(0,Ge.MZ)({constructOnly:!0})],it.prototype,"shaderTransformation",void 0),(0,je.Cg)([(0,Ge.MZ)()],it.prototype,"_size",void 0),(0,je.Cg)([(0,Ge.MZ)({readOnly:!0})],it.prototype,"size",null),it=(0,je.Cg)([(0,Ge.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],it);const nt=(0,Ze.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function ot(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Je.E)()&&e.vec4u8("instanceOlidColor"),e}const at=(0,d.vt)(),st=(0,a.vt)(),lt=(0,l.vt)(),ct=(0,l.vt)(),ut=64,dt=(0,Ze.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal"),ht=(0,We.p3)(1,0,1,771);function ft(e,t=!1,r=!1){if(r)return We.uR;switch(e){case 0:return t?We.RC:We.T8;case 1:return ht;default:return null}}function mt(e){if(e.draped)return null;switch(e.output){case 0:case 2:default:return e.writeDepth?We.Uy:null;case 1:return null}}function pt(e,t=513){return{func:(0,$._$)(e)?515:t}}(0,ke._Y)();const vt={mask:255},gt=(0,We.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:0}),xt=(0,We.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:7681});(0,We.nk)(2,2,{compare:514,fail:7680,zFail:7680,zPass:7680}),(0,We.nk)(2,2,{compare:517,fail:7680,zFail:7680,zPass:7680});var _t=r(74810);const bt=Ct(-1),yt=Ct(1),wt=bt,Mt=[];Mt[0]=null,Mt[1]=yt,Mt[2]=bt,Mt[3]=Ct(-2),Mt[4]=Ct(-3);const Tt=Mt.map(e=>function(e,t){return t?{factor:e.factor+t.factor,units:e.units+t.units}:e}(wt,e));function St({output:e,enableOITOffset:t,polygonOffset:r}){return(0,$._$)(e)&&t?Tt[r]:Mt[r]}function Ct(e){return{factor:+e,units:2*e}}Mt[1]=yt;var At=r(28491);class Et extends Ye{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=_t.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=d.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.shadingEnabled=!0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.pretransformedNormals=!1,this.ambient=(0,d.CN)(.2,.2,.2),this.diffuse=(0,d.CN)(.8,.8,.8),this.externalColor=(0,ke.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=W.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}let It=class extends Ke.w{constructor(e,t){let i=(0,$e.U)(Rt(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat((0,$e.U)(function(e){return ot(dt.clone(),e)}(t)))),super(e,t,i),this.shader=new Xe.r(At.D,()=>r.e(5141).then(()=>r(5141))),this.ignoreUnused=!0}_makePipeline(e,t){let{output:r,transparent:i,cullFace:n,customDepthTest:o,hasOccludees:a}=e;return(0,We.Ey)({blending:i?ft(r,!1,e.emissionDimmingPass):null,culling:Pt(e)?(0,We.Xt)(n):null,depthTest:pt(r,Ot(o)),depthWrite:mt(e),colorWrite:We.kn,stencilWrite:a?vt:null,stencilTest:a?t?xt:gt:null,polygonOffset:St(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,r){return r?this._occludeePipelineState:super.getPipeline(e,t,r)}};function Ot(e){switch(e){case 1:return 515;case 0:case 4:return 513;case 2:return 516;case 3:return 514}}function Pt(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Dt(e){return e.hasNormalTexture&&e.hasVertexTangents}function Rt(e){let t=(0,Ze.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),Dt(e)&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Je.E)()&&t.vec4u8("olidColor"),t}It=(0,je.Cg)([(0,Ge.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],It);var Ft=r(51976),Bt=r(34711);class Nt extends Bt.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,je.Cg)([(0,Ft.W)()],Nt.prototype,"hasHighlightMixTexture",void 0),(0,je.Cg)([(0,Ft.W)()],Nt.prototype,"emissionDimmingPass",void 0);class zt extends Nt{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}(0,je.Cg)([(0,Ft.W)({count:5})],zt.prototype,"polygonOffset",void 0),(0,je.Cg)([(0,Ft.W)()],zt.prototype,"transparent",void 0),(0,je.Cg)([(0,Ft.W)()],zt.prototype,"enableOITOffset",void 0);class Lt extends zt{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1,this.renderOccluded=!1}get textureCoordinateType(){return+!!this.hasTextures}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}}(0,je.Cg)([(0,Ft.W)({count:4})],Lt.prototype,"alphaDiscardMode",void 0),(0,je.Cg)([(0,Ft.W)({count:3})],Lt.prototype,"doubleSidedMode",void 0),(0,je.Cg)([(0,Ft.W)({count:8})],Lt.prototype,"pbrMode",void 0),(0,je.Cg)([(0,Ft.W)({count:3})],Lt.prototype,"cullFace",void 0),(0,je.Cg)([(0,Ft.W)({count:3})],Lt.prototype,"normalType",void 0),(0,je.Cg)([(0,Ft.W)({count:4})],Lt.prototype,"customDepthTest",void 0),(0,je.Cg)([(0,Ft.W)({count:8})],Lt.prototype,"emissionSource",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasVertexColors",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasSymbolColors",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasVerticalOffset",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasColorTexture",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasMetallicRoughnessTexture",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasOcclusionTexture",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasNormalTexture",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasScreenSizePerspective",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasVertexTangents",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasOccludees",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"instanced",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"instancedDoublePrecision",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasModelTransformation",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"offsetBackfaces",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasVVSize",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasVVColor",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"receiveShadows",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasShadowHighlights",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"receiveAmbientOcclusion",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"receiveGlobalIllumination",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"textureAlphaPremultiplied",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"instancedFeatureAttribute",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"instancedColor",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"writeDepth",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"snowCover",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasColorTextureTransform",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasEmissionTextureTransform",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasNormalTextureTransform",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasOcclusionTextureTransform",void 0),(0,je.Cg)([(0,Ft.W)()],Lt.prototype,"hasMetallicRoughnessTextureTransform",void 0);var Ht=r(57323);let Vt=class extends It{constructor(){super(...arguments),this.shader=new Xe.r(Ht.R,()=>r.e(9933).then(()=>r(39933)))}};Vt=(0,je.Cg)([(0,Ge.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],Vt);var Ut=r(56529);class jt extends Ft.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,je.Cg)([(0,Ft.W)()],jt.prototype,"receiveShadows",void 0);class Gt extends Ut.D5{constructor(){super(...arguments),this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1}}(0,je.Cg)([(0,Ft.W)()],Gt.prototype,"receiveAmbientOcclusion",void 0),(0,je.Cg)([(0,Ft.W)()],Gt.prototype,"receiveGlobalIllumination",void 0);var kt=r(10614);function Wt(e,t,r){let{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length;r*=a;for(let e=0;e<s;++e){let t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=a}}function $t(e,t,r,i=1){let{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){let t=3*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}else for(let e=0;e<l;++e){let t=3*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}}function Zt(e,t,r,i,n=1){let{data:o,indices:a}=e,s=r.typedBuffer,l=r.typedBufferStride,c=a.length;if(i*=l,t===o.length&&4===t){s[i]=o[0],s[i+1]=o[1],s[i+2]=o[2],s[i+3]=o[3];let e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,a=e[i/=4];i+=t;let u=c*n;for(let r=1;r<u;++r)e[i]=a,i+=t}else if(1===n){if(4===t){for(let e=0;e<c;++e){let t=4*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}return}for(let e=0;e<c;++e){let t=3*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}}else if(4===t)for(let e=0;e<c;++e){let t=4*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}else for(let e=0;e<c;++e){let t=3*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}}const qt=(0,d.vt)();function Yt(e,t,r,i,n,o,a=!1){switch(e){case"position":{(0,D.vA)(3===t.size);let i=n.getField(e,m.xs);(0,D.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void $t(e,r,i,n);let{data:o,indices:a}=e,l=r.typedBuffer,c=r.typedBufferStride,u=a.length,d=t[0],h=t[1],f=t[2],m=t[4],p=t[5],v=t[6],g=t[8],x=t[9],_=t[10],b=t[12],y=t[13],w=t[14];i*=c;let M=0,T=0,S=0,C=(0,s.tZ)(t)?e=>{M=o[e]+b,T=o[e+1]+y,S=o[e+2]+w}:e=>{let t=o[e],r=o[e+1],i=o[e+2];M=d*t+m*r+g*i+b,T=h*t+p*r+x*i+y,S=f*t+v*r+_*i+w};if(1===n)for(let e=0;e<u;++e)C(3*a[e]),l[i]=M,l[i+1]=T,l[i+2]=S,i+=c;else for(let e=0;e<u;++e){C(3*a[e]);for(let e=0;e<n;++e)l[i]=M,l[i+1]=T,l[i+2]=S,i+=c}}(t,r,i,o);break}case"normal":{(0,D.vA)(3===t.size);let r=n.getField(e,m.xs);(0,D.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void $t(e,r,i,n);let{data:o,indices:a}=e,l=t,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=l[0],f=l[1],m=l[2],p=l[4],v=l[5],g=l[6],x=l[8],_=l[9],b=l[10],y=!(0,s.ut)(l),w=1e-6,M=.999999;i*=u;let T=0,S=0,C=0,A=(0,s.tZ)(l)?e=>{T=o[e],S=o[e+1],C=o[e+2]}:e=>{let t=o[e],r=o[e+1],i=o[e+2];T=h*t+p*r+x*i,S=f*t+v*r+_*i,C=m*t+g*r+b*i};if(1===n)if(y)for(let e=0;e<d;++e){A(3*a[e]);let t=T*T+S*S+C*C;if(t<M&&t>w){let e=1/Math.sqrt(t);c[i]=T*e,c[i+1]=S*e,c[i+2]=C*e}else c[i]=T,c[i+1]=S,c[i+2]=C;i+=u}else for(let e=0;e<d;++e)A(3*a[e]),c[i]=T,c[i+1]=S,c[i+2]=C,i+=u;else for(let e=0;e<d;++e){if(A(3*a[e]),y){let e=T*T+S*S+C*C;if(e<M&&e>w){let t=1/Math.sqrt(e);T*=t,S*=t,C*=t}}for(let e=0;e<n;++e)c[i]=T,c[i+1]=S,c[i+2]=C,i+=u}}(t,i,r,o);break}case"normalCompressed":if(!a){(0,D.vA)(2===t.size);let r=n.getField(e,m.mJ);(0,D.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i){if(!t||(0,s.tZ)(t))return void Wt(e,r,i);let{data:n,indices:o}=e,a=t,l=r.typedBuffer,c=r.typedBufferStride,u=o.length;i*=c;for(let e=0;e<u;++e){(0,kt.Tz)(qt,n,o[e]);let[t,r,s]=qt;(0,kt.aT)(l,e,a[0]*t+a[4]*r+a[8]*s,a[1]*t+a[5]*r+a[9]*s,a[2]*t+a[6]*r+a[10]*s,c,i)}}(t,i,r,o);break}case"profileRight":case"profileUp":{(0,D.vA)(2===t.size);let r=n.getField(e,m.mJ);(0,D.vA)(!!r,`No buffer view for ${e}`),Wt(t,r,o);break}case"uv0":{(0,D.vA)(2===t.size);let r=n.getField(e,m.ZD)??n.getField(e,m.gH);(0,D.vA)(!!r,`No buffer view for ${e}`),Wt(t,r,o);break}case"uvi":{(0,D.vA)(2===t.size);let r=n.getField(e,m.mJ);(0,D.vA)(!!r,`No buffer view for ${e}`),Wt(t,r,o);break}case"color":case"symbolColor":{let r=n.getField(e,m.XP);(0,D.vA)(!!r,`No buffer view for ${e}`),(0,D.vA)(3===t.size||4===t.size),Zt(t,t.size,r,o);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{let r=n.getField(e,m.Y$)??n.getField(e,m.Y$);(0,D.vA)(!!r,`No buffer view for ${e}`),(0,D.vA)(1===t.size),function(e,t,r){let{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length,l=i[0];r*=a;for(let e=0;e<s;++e)o[r]=l,r+=a}(t,r,o);break}case"tangent":{(0,D.vA)(4===t.size);let i=n.getField(e,m.Eq);(0,D.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void function(e,t,r,i=1){let{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){let t=4*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}else for(let e=0;e<l;++e){let t=4*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}}(e,r,i,n);let{data:o,indices:a}=e,l=t,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=l[0],f=l[1],m=l[2],p=l[4],v=l[5],g=l[6],x=l[8],_=l[9],b=l[10],y=!(0,s.ut)(l),w=1e-6,M=.999999;if(i*=u,1===n)for(let e=0;e<d;++e){let t=4*a[e],r=o[t],n=o[t+1],s=o[t+2],l=o[t+3],d=h*r+p*n+x*s,T=f*r+v*n+_*s,S=m*r+g*n+b*s;if(y){let e=d*d+T*T+S*S;if(e<M&&e>w){let t=1/Math.sqrt(e);d*=t,T*=t,S*=t}}c[i]=d,c[i+1]=T,c[i+2]=S,c[i+3]=l,i+=u}else for(let e=0;e<d;++e){let t=4*a[e],r=o[t],s=o[t+1],l=o[t+2],d=o[t+3],T=h*r+p*s+x*l,S=f*r+v*s+_*l,C=m*r+g*s+b*l;if(y){let e=T*T+S*S+C*C;if(e<M&&e>w){let t=1/Math.sqrt(e);T*=t,S*=t,C*=t}}for(let e=0;e<n;++e)c[i]=T,c[i+1]=S,c[i+2]=C,c[i+3]=d,i+=u}}(t,r,i,o);break}case"olidColor":(0,D.vA)(4===t.size),Zt(t,4,n.getField(e,m.XP),o)}}class Xt{constructor(e,t=!1){this.layout=e,this._preTransformedNormals=t}elementCount(e){return e.get("position").indices.length}write(e,t,r,i){i&&function(e,t,r,i,n,o=!1){let{buffer:a,offset:s}=n;for(let n of t.fields.keys()){let t=e.get(n),l=t?.indices;t&&l&&Yt(n,t,r,i,a,s,o)}}(r,this.layout,e,t,i,this._preTransformedNormals)}}function Kt(e,t){return Qt.output=+!!e.transparent,Qt.polygonOffset=e.polygonOffset,Qt.enableOITOffset=function(e,t){return(0,$._$)(e)&&t.relativeElevation<5e5}(Qt.output,t),St(Qt)}function Jt({units:e,factor:t},r,i,n){let o=tr*e;return i+((n?1-Math.abs((0,u.Om)(r,n)):0)*t*er+o)}const Qt=new zt,er=2e-5,tr=2e-6,rr=(0,d.vt)();class ir extends ae{constructor(e,t){super(e,or),this.materialType="default",this.supportsEdges=!0,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[2,e=>(0,$.uw)(e)&&!this.transparent],[4,e=>(0,$.uw)(e)&&this.transparent]]),this._configuration=new Lt(t)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){let{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=W.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,u.t2)(this.parameters.emissiveBaseColor,d.uY)}get emissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);let{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;let{treeRendering:i,doubleSided:n,doubleSidedType:o}=t;r.hasVertexTangents=Dt(t),r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=i?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!i&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=i?2:n&&"normal"===o?1:n&&"winding-order"===o?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,function(e,t,r,i=!0){i&&(0,$._o)(t.output)&&r.shadingEnabled?(e.receiveShadows=r.receiveShadows&&t.shadowMap.enabled,e.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(e,t),e.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao,e.receiveGlobalIllumination=r.receiveAmbientOcclusion&&t.globalIlluminationEnabled):e.receiveShadows=e.hasShadowHighlights=e.receiveAmbientOcclusion=e.receiveGlobalIllumination=!1}(r,e,t),r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.unlit?7:t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersectRay(e,t,r,i,n,o){let a=this._getMaterialVerticalOffset(t,r);null!=a&&(i=(0,u.Re)(ar,i,a),n=(0,u.Re)(sr,n,a)),o=function(e,t,r,i,n){let o=Kt(t,r);if(!o)return e;let a=(0,u.oW)(rr,n,i);return(t,r,i,n)=>e(t,Jt(o,a,r,i),i,n)}(o,this._configuration,r.camera,i,n),(0,se.Uy)(e,r,i,n,(0,Ue.ou)(r.verticalOffset),o)}intersectScreenPolygon(e,t,r,i){return function(e,t,r){return null==e?null:(e.renderDistance=function(e,t,r,i,n){let o=Kt(r,i);return o?Jt(o,(0,u.oW)(rr,n,i.eye),e,t):e}(e.renderDistance,e.hasNormal?e.normal:null,t,r,e.point),e)}(Se(e,r,t,i,this._createScreenPolygonVertexDisplacement(t,r)),this._configuration,r.camera)}createGLMaterial(e){return new nr(e)}createBufferWriter(){return new Xt(Rt(this.parameters),this.parameters.pretransformedNormals)}get transparent(){let{drivenOpacity:e,opacity:t,externalColor:r,layerOpacity:i,texture:n,textureId:o,textureAlphaMode:a,colorMixMode:s}=this.parameters,l=r[3];return e||t<1&&"replace"!==s||l<1&&"ignore"!==s||i<1||(null!=n||null!=o)&&1!==a&&2!==a&&"replace"!==s}_createScreenPolygonVertexDisplacement(e,t){let r=this._getMaterialVerticalOffset(e,t);return null==r?null:{applyToVertex:(e,t,i,n)=>(e[0]=t+r[0],e[1]=i+r[1],e[2]=n+r[2],e),applyToAabb:e=>((0,f.Ne)(e,(0,u.WQ)(fr,(0,f.pg)(e,fr),r)),(0,f.vI)(e,(0,u.WQ)(fr,(0,f.Lu)(e,fr),r)),e)}}_getMaterialVerticalOffset(e,t){if(null==this.parameters.verticalOffset)return null;let r=t.camera;(0,u.hZ)(ur,e[12],e[13],e[14]);let i=t.isGlobal?(0,u.S8)(cr,ur):(0,u.C)(cr,lr),n=(0,u.Re)(dr,ur,r.eye),o=(0,u.Bw)(n),a=(0,u.hs)(n,n,1/o),s=null;this.parameters.screenSizePerspective&&(s=(0,u.Om)(i,a));let l=(0,ee.kE)(r,o,this.parameters.verticalOffset,s??0,this.parameters.screenSizePerspective,null);return(0,u.hs)(i,i,l),(0,u.ei)(hr,i,t.transform.inverseRotation)}}class nr extends K{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});let t=this._material.parameters;this.updateTexture(t.textureId);let r=e.camera.viewInverseTransposeMatrix;return(0,u.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?Vt:It,e)}}class or extends Et{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1,this.unlit=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissionSource(){return null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const ar=(0,d.vt)(),sr=(0,d.vt)(),lr=(0,d.fA)(0,0,1),cr=(0,d.vt)(),ur=(0,d.vt)(),dr=(0,d.vt)(),hr=(0,d.vt)(),fr=(0,d.vt)();class mr{constructor(){this.geometries=[],this.materials=[],this.textures=[]}}class pr{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new mr,this.numberOfVertices=0}}var vr=r(60999),gr=r(49186),xr=r(53966);class _r{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(let t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){let i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){let r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){let r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(let e of this._outer)yield e}*values(){for(let e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(let[e,t]of this._outer)for(let[r,i]of t)yield[e,r,i]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,i)=>e(t,r,i)))}clone(){let e=new _r;return this.forAll((t,r,i)=>e.set(r,i,t)),e}}var br=r(46140),yr=r(78888),wr=r(31217);const Mr=()=>xr.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class Tr{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function Sr(e){let t=e.params,r=t.topology,i=!0;switch(t.vertexAttributes||(Mr().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{let e=t.faces;if(e){if(t.vertexAttributes)for(let r in t.vertexAttributes){let t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(Mr().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(Mr().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(Mr().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else Mr().warn("Indexed geometries must specify faces"),i=!1;break}default:Mr().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(Mr().warn("Geometry requires material"),i=!1);let n=e.params.vertexAttributes;for(let e in n)n[e].values||(Mr().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function Cr(e){let t=(0,f.Ie)();return e.forEach(e=>{let r=e.boundingInfo;null!=r&&(0,f.RF)(t,r.box)}),t}function Ar(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function Er(e){let t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Ir=new br.A(1,2,"wosr");async function Or(e,t){let o,a=function(e){let t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null==t[4]?null:Number(t[4])}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?"wosr":"unknown",url:e,specifiedLodIndex:null}}((0,n.EM)(e));if("wosr"===a.fileType){let e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){let r=await async function(e,t){let r=await(0,vr.Ke)((0,yr.A)(e,t));if(r.ok)return r.value.data;(0,q.QP)(r.error),function(e){throw new gr.A("request:wosr",`Request for object resource failed: ${e}`)}(r.error)}(e,t),i=await async function(e,t){let r=[];for(let i in e){let n=e[i],o=n.images[0].data;if(!o){Mr().warn("Externally referenced texture data is not yet supported");continue}let a=n.encoding+";base64,"+o,s="/textureDefinitions/"+i,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==Ar(l)},u=t?.disableTextures?Promise.resolve(null):(0,wr.D)(a,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}let i=await Promise.all(r),n={};for(let e of i)n[e.refId]=e;return n}(r.textureDefinitions??{},t),n=0;for(let e in i)if(i.hasOwnProperty(e)){let t=i[e];n+=t?.image?t.image.width*t.image.height*4:0}return new Tr(r,i,n+(0,S.Qh)(r))}(a.url,t)),{engineResources:r,referenceBoundingBox:i}=function(e,t){let r=[],i=[],n=[],o=new _r,a=e.resource,s=br.A.parse(a.version||"1.0","wosr");Ir.validate(s);let l=a.model.name,c=a.model.geometries,u=a.materialDefinitions??{},h=e.textures,f=0,m=new Map;for(let e=0;e<c.length;e++){let a=c[e];if(!Sr(a))continue;let s=Er(a),l=a.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===a.params.topology)return null;let t=a.params.faces;for(let r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(let e in l){let t=l[e],r=t.values,i=v(e)??(0,C.tM)(x);p.push([e,new T.n(r,i,t.valuesPerElement,!0)])}let _=s.texture,b=h&&h[_];if(b&&!m.has(_)){let{image:e,parameters:t}=b,r=new k.h(e,t);i.push(r),m.set(_,r)}let y=m.get(_),w=y?y.id:void 0,M=s.material,S=o.get(M,_);if(null==S){let e=u[M.slice(M.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);let r=b?Ar(b.alphaChannelUsage):void 0,i={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:w,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:b?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),S=new ir(i,t.spherical),o.set(M,_,S)}n.push(S);let A=new j(S,p);f+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(A)}return{engineResources:[{name:l,stageResources:{textures:i,materials:n,geometries:r},pivotOffset:a.model.pivotOffset,numberOfVertices:f,lodThreshold:null}],referenceBoundingBox:Cr(r)}}(e,t);return{lods:r,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}if(t.cache)o=await t.cache.loadGLTF(a.url,t,!!t.usePBR,!!t.useEmissive);else{let{loadGLTF:e}=await r.e(1698).then(()=>r(51698));o=await e(new _.R,a.url,t,t.usePBR,t.useEmissive)}let{engineResources:h,referenceBoundingBox:p}=function(e,t,r){let n=e.model,o=e.meta,a=n.meta?.ESRI_proxyEllipsoid,h=o.isEsriSymbolResource&&null!=a&&"EsriRealisticTreesStyle"===o.ESRI_webstyle;h&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){let i=e.model.lods[r];for(let n of i.parts){let i=n.attributes.normal;if(null==i)return;let o=n.attributes.position,a=o.count,c=(0,d.vt)(),h=(0,d.vt)(),f=(0,d.vt)(),p=new Float32Array(4*a),v=new Float32Array(3*a),g=(0,s.B8)((0,l.vt)(),n.transform),x=0,_=0;for(let s=0;s<a;s++){o.getVec(s,h),i.getVec(s,c),(0,u.Z0)(h,h,n.transform),(0,u.Re)(f,h,t.center),(0,u.Qr)(f,f,t.radius);let a=f[2],l=(0,u.Bw)(f),d=Math.min(.45+.55*l*l,1)**2.2;(0,u.Qr)(f,f,t.radius),null!==g&&(0,u.Z0)(f,f,g),(0,u.S8)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(a>-1?(0,u.Cc)(f,f,c,.2):(0,u.Cc)(f,f,c,Math.min(-4*a-3.8,1))),v[x]=f[0],v[x+1]=f[1],v[x+2]=f[2],x+=3,p[_]=d,p[_+1]=d,p[_+2]=d,p[_+3]=1,_+=4}n.attributes.normal=new m.xs(v.buffer),n.attributes.color=new m.Eq(p.buffer)}}}(e,a));let p=!!t.usePBR,v=o.isEsriSymbolResource?{usePBR:p,isSchematic:!1,treeRendering:h,mrrFactors:_t.SY}:{usePBR:p,isSchematic:!1,treeRendering:!1,mrrFactors:_t.mb},g={...t.materialParameters,treeRendering:h},x=[],_=new Map,b=new Map,w=n.lods.length,T=(0,f.Ie)();return n.lods.forEach((e,o)=>{let a=!0===t.skipHighLods&&(w>1&&0===o||w>3&&1===o)||!1===t.skipHighLods&&null!=r&&o!==r;if(a&&0!==o)return;let s=new pr(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{let r=a?new ir({},t.spherical):function(e,t,r,n,o,a,s,l,u){let h=e.materials.get(t.material);if(null==h)return null;let{normal:f,color:m,texCoord0:p,tangent:v}=t.attributes,g=t.material+(f?"_normal":"")+(m?"_color":"")+(p?"_texCoord0":"")+(v?"_tangent":""),x=null!=t.attributes.texCoord0,_=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(h.alphaMode);if(!a.has(g)){if(x){let t=(t,r=!1,i=!1)=>{if(null!=t&&!s.has(t)){let n=e.textures.get(t);if(n){let e=n.data,o=r&&!(0,y.x3)(e)?l.compressionOptions:void 0;s.set(t,new k.h((0,y.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,y.x3)(e)&&i,encoding:(0,y.x3)(e)?e.encoding:void 0,compressionOptions:o}))}}},r=1!==b&&!u;t(h.colorTexture,r,1!==b),t(h.normalTexture),t(h.occlusionTexture,!0),t(h.emissiveTexture),t(h.metallicRoughnessTexture,!0)}let r=(0,i.xV)(h.color[0]),f=(0,i.xV)(h.color[1]),m=(0,i.xV)(h.color[2]),p=null!=h.colorTexture&&x?s.get(h.colorTexture):null,v=(0,_t.Jr)(h),w=null==h.normalTextureTransform?.scale?c.Un:h.normalTextureTransform?.scale;a.set(g,new ir({...n,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:h.alphaCutoff,diffuse:[r,f,m],ambient:[r,f,m],opacity:"OPAQUE"===h.alphaMode?1:h.opacity,doubleSided:h.doubleSided,doubleSidedType:"winding-order",cullFace:h.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:_?0:2,castShadows:!0,receiveShadows:h.receiveShadows,receiveAmbientOcclusion:h.receiveAmbientOcclusion,unlit:h.unlit,textureId:p?.id,colorMixMode:h.colorMixMode,normalTextureId:null!=h.normalTexture&&x?s.get(h.normalTexture).id:void 0,textureAlphaPremultiplied:null!=p&&!!p.parameters.preMultiplyAlpha,occlusionTextureId:null!=h.occlusionTexture&&x?s.get(h.occlusionTexture).id:void 0,emissiveTextureId:null!=h.emissiveTexture&&x&&!h.unlit?s.get(h.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=h.metallicRoughnessTexture&&x?s.get(h.metallicRoughnessTexture).id:void 0,emissiveBaseColor:h.unlit?d.uY:[h.emissiveFactor[0],h.emissiveFactor[1],h.emissiveFactor[2]],emissiveStrengthKHR:null==h.emissiveStrengthKHR?1:h.emissiveStrengthKHR,emissiveStrengthFromSymbol:null==o.emissiveStrengthFromSymbol?void 0:o.emissiveStrengthFromSymbol,mrrFactors:v?_t.Bt:[h.metallicFactor,h.roughnessFactor,n.mrrFactors[2]],isSchematic:v,colorTextureTransformMatrix:M(h.colorTextureTransform),normalTextureTransformMatrix:M(h.normalTextureTransform),normalScale:[w[0],w[1]],occlusionTextureTransformMatrix:M(h.occlusionTextureTransform),emissiveTextureTransformMatrix:M(h.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:M(h.metallicRoughnessTextureTransform),...o},l.spherical))}let w=a.get(g);if(r.stageResources.materials.push(w),x){let e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(h.colorTexture),e(h.normalTexture),e(h.occlusionTexture),e(h.emissiveTexture),e(h.metallicRoughnessTexture)}return w}(n,e,s,v,g,_,b,t,h),{geometry:l,vertexCount:u}=Pr(e,r??new ir({},t.spherical)),m=l.boundingInfo;null!=m&&0===o&&(0,f.RF)(T,m.box),null!=r&&(s.stageResources.geometries.push(l),s.numberOfVertices+=u)}),a||x.push(s)}),{engineResources:x,referenceBoundingBox:T}}(o,t,a.specifiedLodIndex);return{lods:h,referenceBoundingBox:p,isEsriSymbolResource:o.meta.isEsriSymbolResource,isWosr:!1}}function Pr(e,t){let r=e.attributes.position.count,i=(0,b.x)(e.indices||r,e.primitiveType),n=x(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.position;(0,p.t)(n,a,e.transform,3,s);let l=[["position",new T.n(n,i,3,!0)]];if(null!=e.attributes.normal){let t=x(3*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.normal;(0,o.Ge)(Dr,e.transform),(0,p.b)(t,n,Dr,3,a),(0,h.or)(Dr)&&(0,p.n)(t,t),l.push(["normal",new T.n(t,i,3,!0)])}if(null!=e.attributes.tangent){let t=x(4*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.tangent;(0,o.z0)(Dr,e.transform),(0,v.t)(t,n,Dr,4,a),(0,h.or)(Dr)&&(0,p.n)(t,t,4),l.push(["tangent",new T.n(t,i,4,!0)])}if(null!=e.attributes.texCoord0){let t=x(2*r),{typedBuffer:n,typedBufferStride:o}=e.attributes.texCoord0;(0,g.a)(t,n,2,o),l.push(["uv0",new T.n(t,i,2,!0)])}let c=e.attributes.color;if(null!=c){let t=new Uint8Array(4*r);4===c.elementCount?c instanceof m.Eq?(0,v.b)(t,c,1,255):(c instanceof m.XP||c instanceof m.Uz)&&(0,v.b)(t,c,1/255,255):(t.fill(255),c instanceof m.xs?(0,p.f)(t,c.typedBuffer,1,255,4,c.typedBufferStride):(e.attributes.color instanceof m.eI||e.attributes.color instanceof m.nS)&&(0,p.f)(t,c.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),l.push(["color",new T.n(t,i,4,!0)])}return{geometry:new j(t,l),vertexCount:r}}const Dr=(0,a.vt)()},26857(e,t,r){var i=r(32198),n=r(56372),o=r(91429);let a=class extends n.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.OCCLUSION_QUERY_DEBUG_PIXEL=!1,this.ENABLE_OPTIMIZATIONS=!0,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.UPDATING=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1,this.FLOW_GLOBAL_SCALE_THRESHOLD=null}};(0,i.Cg)([(0,o.MZ)()],a.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LABELS_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"SHOW_POI",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OCCLUSION_QUERY_DEBUG_PIXEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"ENABLE_OPTIMIZATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"UPDATING",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LINE_WIREFRAMES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FLOW_GLOBAL_SCALE_THRESHOLD",void 0),a=(0,i.Cg)([(0,o.$K)("esri.views.3d.support.debugFlags")],a);const s=new a;r.d(t,["b",0,s])},46686(e,t,r){r.d(t,{A7:()=>o,Y0:()=>n});var i=r(29941);class n extends i.v{constructor(e){super(),this.spherical=e,this.draped=!1}}function o(e){(function(e){e.varyings.add("linearDepth","float",{invariant:!0})})(e),e.vertex.code.add("void forwardLinearDepth(float _linearDepth) { linearDepth = _linearDepth; }")}},32680(e,t,r){r.d(t,{M:()=>n});var i=r(31821);function n(e){e.vertex.code.add(i.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
|
|
222
222
|
vec3 camToVert = posWorld - camPosWorld;
|
|
223
223
|
bool isBackface = dot(camToVert, normalWorld) > 0.0;
|
|
224
224
|
if (isBackface) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[9078],{32198(e,t,r){function n(e,t,r,n){var s,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function s(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,s;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(s=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}r.d(t,{Cg:()=>n,hk:()=>a,mS:()=>s}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function a(e){function t(t){e.error=e.hasError?new i(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function s(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(s);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(s,function(e){return t(e),s()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},9093(e,t,r){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}r.d(t,{o8:()=>s,vt:()=>n});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:s,create:n,fromValues:function(e,t,r,n,s,i,a,o,l,u,h,c,p,f,d,g){return[e,t,r,n,s,i,a,o,l,u,h,c,p,f,d,g]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["zK",0,i])},35522(e,t,r){r.d(t,{$A:()=>k,Bw:()=>i,C:()=>a,Cc:()=>P,DI:()=>v,Il:()=>L,Io:()=>_,Ln:()=>m,Om:()=>S,Qr:()=>c,Re:()=>u,S8:()=>w,T9:()=>g,WQ:()=>l,Z0:()=>I,_S:()=>f,aI:()=>V,ei:()=>T,fw:()=>q,gL:()=>A,hG:()=>M,hZ:()=>o,hs:()=>y,jb:()=>F,jk:()=>d,lo:()=>O,lw:()=>h,m3:()=>b,oW:()=>E,t2:()=>G,tn:()=>p,uE:()=>j,ze:()=>x});var n=r(51850),s=r(34304);function i(e){let t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function o(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}function l(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function h(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function p(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function f(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function d(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function g(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function y(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function m(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}function _(e,t){let r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2];return Math.sqrt(r*r+n*n+s*s)}function M(e,t){let r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2];return r*r+n*n+s*s}function b(e){let t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function x(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function v(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function w(e,t=e){let r=t[0],n=t[1],s=t[2],i=r*r+n*n+s*s;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i),e}function S(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function k(e,t,r){let n=t[0],s=t[1],i=t[2],a=r[0],o=r[1],l=r[2];return e[0]=s*l-i*o,e[1]=i*a-n*l,e[2]=n*o-s*a,e}function P(e,t,r,n){let s=t[0],i=t[1],a=t[2];return e[0]=s+n*(r[0]-s),e[1]=i+n*(r[1]-i),e[2]=a+n*(r[2]-a),e}function I(e,t,r){let n=t[0],s=t[1],i=t[2];return e[0]=r[0]*n+r[4]*s+r[8]*i+r[12],e[1]=r[1]*n+r[5]*s+r[9]*i+r[13],e[2]=r[2]*n+r[6]*s+r[10]*i+r[14],e}function T(e,t,r){let n=t[0],s=t[1],i=t[2];return e[0]=n*r[0]+s*r[3]+i*r[6],e[1]=n*r[1]+s*r[4]+i*r[7],e[2]=n*r[2]+s*r[5]+i*r[8],e}function A(e,t,r){return q(e,t,r[0],r[1],r[2],r[3])}function q(e,t,r,n,s,i){let a=t[0],o=t[1],l=t[2],u=n*l-s*o,h=s*a-r*l,c=r*o-n*a,p=n*c-s*h,f=s*u-r*c,d=r*h-n*u,g=2*i;return e[0]=a+u*g+2*p,e[1]=o+h*g+2*f,e[2]=l+c*g+2*d,e}const R=(0,n.vt)(),C=(0,n.vt)();function G(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function V(e,t){if(e===t)return!0;let r=e[0],n=e[1],i=e[2],a=t[0],o=t[1],l=t[2],u=(0,s.FD)();return Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-l)<=u*Math.max(1,Math.abs(i),Math.abs(l))}function E(e,t,r){let n=r[0]-t[0],s=r[1]-t[1],i=r[2]-t[2],a=n*n+s*s+i*i;return a>0?(a=1/Math.sqrt(a),e[0]=n*a,e[1]=s*a,e[2]=i*a,e):(e[0]=0,e[1]=0,e[2]=0,e)}const F=u,D=h,U=c,Z=_,O=M,L=i,j=b;Object.freeze(Object.defineProperty({__proto__:null,abs:p,add:l,angle:function(e,t){w(R,e),w(C,t);let r=S(R,C);return r>1?0:r<-1?Math.PI:Math.acos(r)},applyTranslation:function(e,t,r){return e[0]=t[0]+r[12],e[1]=t[1]+r[13],e[2]=t[2]+r[14],e},bezier:function(e,t,r,n,s,i){let a=1-i,o=a*a,l=i*i,u=o*a,h=3*i*o,c=3*l*a,p=l*i;return e[0]=t[0]*u+r[0]*h+n[0]*c+s[0]*p,e[1]=t[1]*u+r[1]*h+n[1]*c+s[1]*p,e[2]=t[2]*u+r[2]*h+n[2]*c+s[2]*p,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,r=1){return e[0]=Math.min(Math.max(e[0],t),r),e[1]=Math.min(Math.max(e[1],t),r),e[2]=Math.min(Math.max(e[2],t),r),e},copy:a,cross:k,crossAndNormalize:function(e,t,r){let n=t[0],s=t[1],i=t[2],a=r[0],o=r[1],l=r[2],u=s*l-i*o,h=i*a-n*l,c=n*o-s*a,p=Math.sqrt(u*u+h*h+c*c);return e[0]=u/p,e[1]=h/p,e[2]=c/p,e},direction:E,dist:Z,distance:_,div:U,divide:c,dot:S,equals:V,exactEquals:G,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,r,n,s,i){let a=i*i,o=a*(2*i-3)+1,l=a*(i-2)+i,u=a*(i-1),h=a*(3-2*i);return e[0]=t[0]*o+r[0]*l+n[0]*u+s[0]*h,e[1]=t[1]*o+r[1]*l+n[1]*u+s[1]*h,e[2]=t[2]*o+r[2]*l+n[2]*u+s[2]*h,e},inverse:v,len:L,length:i,lerp:P,max:g,min:d,mul:D,multiply:h,negate:x,normalize:w,random:function(e,t=1){let r=s.Ov,n=2*r()*Math.PI,i=2*r()-1,a=Math.sqrt(1-i*i)*t;return e[0]=Math.cos(n)*a,e[1]=Math.sin(n)*a,e[2]=i*t,e},rotateX:function(e,t,r,n){let s=[],i=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],i[0]=s[0],i[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),i[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e},rotateY:function(e,t,r,n){let s=[],i=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],i[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),i[1]=s[1],i[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e},rotateZ:function(e,t,r,n){let s=[],i=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],i[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),i[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),i[2]=s[2],e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:y,scaleAndAdd:m,scaleTo:function(e,t){return y(e,e,t/L(e))},set:o,sign:f,sqrDist:O,sqrLen:j,squaredDistance:M,squaredLength:b,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:F,subtract:u,transformMat3:T,transformMat4:I,transformMat4Z:function(e,t){return t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]},transformQuat:A,transformQuatValues:q},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{JY:()=>f,Qf:()=>l,Qh:()=>a,lM:()=>i,ro:()=>u,rq:()=>h});var n=r(44208),s=r(34275);function i(e){if(!e)return 0;let t=c;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r],!1));return t}function a(e){if(!e)return 0;if(Array.isArray(e))return function(e){let t=p;for(let r of e)t+=o(r);return t}(e);if(ArrayBuffer.isView(e)&&"length"in e&&"number"==typeof e.length&&e.length>0)return e.byteLength+d;let t=c;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?a(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+u(t),0)}function u(e,t=16){return e?(0,s.iu)(e)?e.byteLength+d:Array.isArray(e)?h(e,t):0:0}function h(e,t){return p+e.length*t}const c=32,p=16,f=(0,n.A)("ios")||!(0,n.A)("chrome")&&!(0,n.A)("opr")?8:4,d=145},51624(e,t,r){r.d(t,{A:()=>u});var n=r(44208),s=r(69397),i=r(93687);const a=4294967296,o=new TextDecoder("utf-8"),l=(0,n.A)("safari")||(0,n.A)("ios")?6:(0,n.A)("ff")?12:32;class u{constructor(e,t,r=0,n=e?.byteLength??0){this._tag=0,this._dataType=99,this._init(e,t,r,n)}[Symbol.dispose](){this.release()}_init(e,t,r,n){this._data=e,this._dataView=t,this._pos=r,this._end=n}get usedMemory(){return 64+(0,s.Qf)(this._data)}asUnsafe(){return this}clone(){return new u(this._data,this._dataView,this._pos,this._end)}clonePooled(){return u.constructPooled(this._data,this._dataView,this._pos,this._end)}static constructPooled(e,t,r=0,n=e?.byteLength??0){let s=u.pool.acquire();return s._init(e,t,r,n),s}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;let t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;let e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128||(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)||(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)||(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)||(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128))return e;throw Error("Varint overflow")}getPackedEnd(){let e=this.getUInt32();return this._pos+e}getUInt64(){return this._decodeVarint()}getSInt32(){let e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){let e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){let e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*a;return this._skip(8),r}getSFixed64(){let e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*a;return this._skip(8),r}getDouble(){let e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){let e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){let e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){let e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){let e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){let e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,n){let s=this.getMessage(),i=e(s,t,r,n);return s.release(),i}processMessage(e){let t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){let e=this._getLength(),t=u.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){u.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw Error("Invalid data type!")}}skipToEnd(){for(;this.next();)this.skip()}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){let e=this._data,t=this._pos,r=0,n=0;if(this._end-t>=10){if(n=e[t++],r|=127&n,128&n&&(n=e[t++],r|=(127&n)<<7,128&n&&(n=e[t++],r|=(127&n)<<14,128&n&&(n=e[t++],r|=(127&n)<<21,128&n&&(n=e[t++],r+=268435456*(127&n),128&n&&(n=e[t++],r+=34359738368*(127&n),128&n&&(n=e[t++],r+=4398046511104*(127&n),128&n&&(n=e[t++],r+=562949953421312*(127&n),128&n&&(n=e[t++],r+=72057594037927940*(127&n),128&n&&(n=e[t++],r+=0x8000000000000000*(127&n),128&n))))))))))throw Error("Varint too long!")}else{let s=1;for(;t!==this._end&&(n=e[t],128&n);)++t,r+=(127&n)*s,s*=128;if(t===this._end)throw Error("Varint overrun!");++t,r+=n*s}return this._pos=t,r}_decodeSVarint(){let e,t=this._data,r=0,n=0,s=1&t[this._pos];if(n=t[this._pos++],r|=127&n,!(128&n&&(n=t[this._pos++],r|=(127&n)<<7,128&n)&&(n=t[this._pos++],r|=(127&n)<<14,128&n)&&(n=t[this._pos++],r|=(127&n)<<21,128&n)&&(n=t[this._pos++],r+=268435456*(127&n),128&n)&&(n=t[this._pos++],r+=34359738368*(127&n),128&n)&&(n=t[this._pos++],r+=4398046511104*(127&n),128&n)))return s?-(r+1)/2:r/2;if(e=BigInt(r),n=t[this._pos++],e+=562949953421312n*BigInt(127&n),!(128&n&&(n=t[this._pos++],e+=72057594037927936n*BigInt(127&n),128&n)&&(n=t[this._pos++],e+=9223372036854775808n*BigInt(127&n),128&n)))return Number(s?-(e+1n)/2n:e/2n);throw Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>l){let n=e.subarray(t,r);return o.decode(n)}let n="",s="";for(let i=t;i<r;++i){let t=e[i];128&t?s+="%"+t.toString(16):(n+=decodeURIComponent(s)+String.fromCharCode(t),s="")}return s.length&&(n+=decodeURIComponent(s)),n}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}static{this.pool=new i.A(()=>new u(null,null),void 0,e=>{e._data=null,e._dataView=null})}}},48526(e,t,r){var n,s=r(32198),i=r(91429),a=r(4576),o=r(4718),l=r(5443),u=r(91075),h=r(86738),c=r(16930),p=r(90634),f=r(47610),d=r(56993),g=r(43937);let y=n=class extends u.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:r,hasZ:n,spatialReference:s}=e;switch(t??=[],t?.at(0)?.length){case 4:n??=!0,r??=!0;break;case 3:n??=!0!==r,r??=!n;break;default:n??=!1,r??=!1}return s??=c.A.WGS84,{...e,hasM:r,hasZ:n,points:t,spatialReference:s}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let e=(0,p.ge)(this);return e?new l.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,o.o8)(this.points)}clone(){let{points:e,spatialReference:t,hasM:r,hasZ:s}=this;return new n({points:(0,o.o8)(e),spatialReference:t.clone(),hasM:r,hasZ:s})}equals(e){if(this===e)return!0;if(null==e)return!1;let t=this.spatialReference,r=e.spatialReference;return!(null!=t!=(null!=r)||null!=t&&null!=r&&!t.equals(r))&&(0,a.aI)(this.points,e.points,f.v6)}addPoint(e){return(0,d.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;let t=this.points[e],r={x:t[0],y:t[1],spatialReference:this.spatialReference},n=2;return this.hasZ&&(r.z=t[2],n=3),this.hasM&&(r.m=t[n]),new h.A(r)}removePoint(e){if(!this._validateInputs(e))return null;let[t,r,n,s]=this.points.splice(e,1)[0],i=new h.A({x:t,y:r,z:n,m:s,spatialReference:this.spatialReference});return this.notifyChange("points"),i}setPoint(e,t){return this._validateInputs(e)&&((0,d.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points")),this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,s.Cg)([(0,i.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,s.Cg)([(0,i.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,s.Cg)([(0,i.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],y.prototype,"points",void 0),(0,s.Cg)([(0,g.K)("points")],y.prototype,"writePoints",null),y=n=(0,s.Cg)([(0,i.$K)("esri.geometry.Multipoint")],y);const m=y;y.prototype.toJSON.isDefaultToJSON=!0,r.d(t,["A",0,m])},82799(e,t,r){var n,s=r(32198),i=r(91429),a=r(4718),o=r(5443),l=r(91075),u=r(86738),h=r(16930),c=r(90634),p=r(56993),f=r(43937);let d=n=class extends l.A{constructor(e){super(function(e){if(!e)return;let{paths:t,hasM:r,hasZ:n,spatialReference:s}=e;switch(t??=[],function(e){return"number"==typeof e[0]?.[0]}(t)&&(t=[t]),t[0]?.[0]?.length){case 4:n??=!0,r??=!0;break;case 3:n??=!0!==r,r??=!n;break;default:n??=!1,r??=!1}return s??=h.A.WGS84,{...e,hasM:r,hasZ:n,paths:t,spatialReference:s}}(e)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(e,t){t.curvePaths=(0,a.o8)(e)}get extent(){let e=(0,c.Z3)(this),{spatialReference:t}=this;return e?new o.A({...e,spatialReference:t}):null}writePaths(e,t){t.paths=(0,a.o8)(this.paths)}addPath(e){if(!e)return;let t=this.paths,r=t.length;if(function(e){return!Array.isArray(e[0])}(e)){let n=[];for(let t=0,r=e.length;t<r;t++)n[t]=e[t].toArray();t[r]=n}else t[r]=e.slice();return this.notifyChange("paths"),this}clone(){let e=new n;return e.spatialReference=this.spatialReference,e.paths=(0,a.o8)(this.paths),e.curvePaths=(0,a.o8)(this.curvePaths),e.hasZ=this.hasZ,e.hasM=this.hasM,e}getPoint(e,t){if(!this._validateInputs(e,t))return null;let r=this.paths[e][t],n=this.hasZ,s=this.hasM;return n&&!s?new u.A({x:r[0],y:r[1],z:r[2],spatialReference:this.spatialReference}):s&&!n?new u.A({x:r[0],y:r[1],m:r[2],spatialReference:this.spatialReference}):n&&s?new u.A({x:r[0],y:r[1],z:r[2],m:r[3],spatialReference:this.spatialReference}):new u.A({x:r[0],y:r[1],spatialReference:this.spatialReference})}insertPoint(e,t,r){return this._validateInputs(e,t,!0)&&((0,p.h)(this,r),Array.isArray(r)||(r=r.toArray()),this.paths[e].splice(t,0,r),this.notifyChange("paths")),this}removePath(e){if(!this._validateInputs(e,null))return null;let t=this.paths.splice(e,1)[0],r=this.spatialReference,n=t.map(e=>new u.A({x:e[0],y:e[1],z:e[2],m:e[3],spatialReference:r}));return this.notifyChange("paths"),n}removePoint(e,t){if(!this._validateInputs(e,t))return null;let[r,n,s,i]=this.paths[e].splice(t,1)[0],a=new u.A({x:r,y:n,z:s,m:i,spatialReference:this.spatialReference});return this.notifyChange("paths"),a}setPoint(e,t,r){return this._validateInputs(e,t)&&((0,p.h)(this,r),Array.isArray(r)||(r=r.toArray()),this.paths[e][t]=r,this.notifyChange("paths")),this}_validateInputs(e,t,r=!1){if(null==e||e<0||e>=this.paths.length)return!1;if(null!=t){let n=this.paths[e];if(r&&(t<0||t>n.length)||!r&&(t<0||t>=n.length))return!1}return!0}toJSON(e){return this.write({},e)}};(0,s.Cg)([(0,i.MZ)({readOnly:!0})],d.prototype,"cache",null),(0,s.Cg)([(0,i.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],d.prototype,"curvePaths",void 0),(0,s.Cg)([(0,f.K)("curvePaths")],d.prototype,"writeCurvePaths",null),(0,s.Cg)([(0,i.MZ)({readOnly:!0})],d.prototype,"extent",null),(0,s.Cg)([(0,i.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],d.prototype,"paths",void 0),(0,s.Cg)([(0,f.K)("paths")],d.prototype,"writePaths",null),d=n=(0,s.Cg)([(0,i.$K)("esri.geometry.Polyline")],d);const g=d;d.prototype.toJSON.isDefaultToJSON=!0,r.d(t,["A",0,g])},4197(e,t,r){r.d(t,{Vj:()=>a,cj:()=>i,jh:()=>s});var n=r(9093);function s(e){return e<=1024?Array(e).fill(0):new Float64Array(e)}function i(e){return[...e]}function a(e){let t=(0,n.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},70328(e,t,r){r.d(t,{BI:()=>T,C:()=>a,DC:()=>p,Dg:()=>d,Ej:()=>b,Ie:()=>P,Jt:()=>I,Lu:()=>v,Ne:()=>w,RF:()=>c,TF:()=>_,VL:()=>g,aI:()=>q,fA:()=>o,gE:()=>u,gX:()=>M,hZ:()=>k,iT:()=>f,is:()=>A,pg:()=>x,qv:()=>R,uJ:()=>m,vI:()=>S,vY:()=>l,v_:()=>C,vt:()=>i,w1:()=>h,yr:()=>y}),r(35522);var n=r(5443),s=(r(19419),r(4197));function i(e=C){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t){for(let r=0;r<6;r++)e[r]=t[r];return e}function o(e,t,r,n,s,a,o=i()){return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o[4]=s,o[5]=a,o}function l(e,t=i()){return function(e,t,r,n=i()){return k(n,R),function(e,t,r=0,n=t.length/3){let s=e[0],i=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)s=Math.min(s,t[r+3*e]),i=Math.min(i,t[r+3*e+1]),a=Math.min(a,t[r+3*e+2]),o=Math.max(o,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=s,e[1]=i,e[2]=a,e[3]=o,e[4]=l,e[5]=u}(n,e,t,r),n}(e,0,e.length/3,t)}function u(e,t=(0,s.jh)(24)){let[r,n,i,a,o,l]=e;return t[0]=r,t[1]=n,t[2]=i,t[3]=r,t[4]=n,t[5]=l,t[6]=r,t[7]=o,t[8]=i,t[9]=r,t[10]=o,t[11]=l,t[12]=a,t[13]=n,t[14]=i,t[15]=a,t[16]=n,t[17]=l,t[18]=a,t[19]=o,t[20]=i,t[21]=a,t[22]=o,t[23]=l,t}function h(e,t){return isFinite(e[2])||isFinite(e[5])?new n.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}):new n.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t,r=e){r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.min(e[2],t[2]),r[3]=Math.max(e[3],t[3]),r[4]=Math.max(e[4],t[4]),r[5]=Math.max(e[5],t[5])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function f(e,[t,r,n]){d(e,t,r,n)}function d(e,t,r,n){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],r),e[2]=Math.min(e[2],n),e[3]=Math.max(e[3],t),e[4]=Math.max(e[4],r),e[5]=Math.max(e[5],n)}function g(e){return e[0]>=e[3]?0:e[3]-e[0]}function y(e){return e[1]>=e[4]?0:e[4]-e[1]}function m(e){return e[2]>=e[5]?0:e[5]-e[2]}function _(e){let t=g(e),r=m(e),n=y(e);return t*t+r*r+n*n}function M(e,t=[0,0,0]){return t[0]=e[0]+g(e)/2,t[1]=e[1]+y(e)/2,t[2]=e[2]+m(e)/2,t}function b(e,t=[0,0,0]){return t[0]=g(e),t[1]=y(e),t[2]=m(e),t}function x(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function v(e,t){return t[0]=e[3],t[1]=e[4],t[2]=e[5],t}function w(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function S(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function k(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function P(e){return e?k(e,R):i(R)}function I(e,t){return e[0]=t[0],e[1]=t[1],e[2]=-1/0,e[3]=t[2],e[4]=t[3],e[5]=1/0,e}function T(e,t,r,n,s){return e[0]=t,e[1]=r,e[2]=-1/0,e[3]=n,e[4]=s,e[5]=1/0,e}function A(e){return 6===e.length}function q(e,t,r){if(null==e||null==t)return e===t;if(!A(e)||!A(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const R=[1/0,1/0,1/0,-1/0,-1/0,-1/0],C=[0,0,0,0,0,0];i()},50498(e,t,r){var n=r(66552),s=r(5443),i=r(91075),a=r(48526),o=r(86738),l=r(39829),u=r(82799);const h=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),p={base:i.A,key:"type",typeMap:{extent:s.A,multipoint:a.A,point:o.A,polyline:u.A,polygon:l.A}},f=new n.J({esriGeometryBezier3Curve:"cubic-bezier",esriGeometryCircularArc:"circular-arc",esriGeometryEllipticArc:"elliptic-arc"},{ignoreUnknown:!0});r.d(t,["Ye",0,c,"gy",0,h,"iI",0,f,"yR",0,p])},62815(e,t,r){r.d(t,{N:()=>o,d:()=>l});var n=r(86211),s=r(73941),i=r(52006),a=r(21325);function o(e,t,r){let n=l(t,r);if(1!==n)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,n);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(let r of e.curvePaths)for(let e of r){let r=(0,i.yP)(e);r.length>2&&(r[2]*=t)}if(e.paths)for(let r of e.paths)for(let e of r)e.length>2&&(e[2]*=t)}}(e,n);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(let r of e.curveRings)for(let e of r){let r=(0,i.yP)(e);r.length>2&&(r[2]*=t)}if(e.rings)for(let r of e.rings)for(let e of r)e.length>2&&(e[2]*=t)}}(e,n);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(let r of e.points)r.length>2&&(r[2]*=t)}(e,n);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,n);default:return}}function l(e,t){return null==e||null==t||(0,a.aI)(e,t)||(0,s.xP)(e)||(0,s.xP)(t)?1:(0,n.G9)(e)/(0,n.G9)(t)}},53655(e,t,r){r.d(t,{SH:()=>G,ae:()=>T,cn:()=>g});var n=r(32198),s=r(49186),i=r(51624),a=r(50498);const o=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],l=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],u="sqlTypeBigInt.sqlTypeBinary.sqlTypeBit.sqlTypeChar.sqlTypeDate.sqlTypeDecimal.sqlTypeDouble.sqlTypeFloat.sqlTypeGeometry.sqlTypeGUID.sqlTypeInteger.sqlTypeLongNVarchar.sqlTypeLongVarbinary.sqlTypeLongVarchar.sqlTypeNChar.sqlTypeNVarchar.sqlTypeOther.sqlTypeReal.sqlTypeSmallInt.sqlTypeSqlXml.sqlTypeTime.sqlTypeTimestamp.sqlTypeTimestamp2.sqlTypeTinyInt.sqlTypeVarbinary.sqlTypeVarchar".split("."),h=["upperLeft","lowerLeft"];function c(e,t){return t[e.getEnum()]}function p(e,t){e.featureSet.geometryType=e.usesShortGeometryTypes?a.gy.fromJSON(t):t}function f(e,t=e.featureSet.geometryType){return e.usesShortGeometryTypes?a.gy.toJSON(t):t}function d(e){let t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function g(e){let t=e.asUnsafe(),r={type:l[0]};for(;t.next();)switch(t.tag()){case 1:r.name=t.getString();break;case 2:r.type=c(t,l);break;case 3:r.alias=t.getString();break;case 4:r.sqlType=c(t,u);break;case 5:default:t.skip();break;case 6:r.defaultValue=t.getString()}return r}function y(e){let t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.name=r.getString();break;case 2:t.isSystemMaintained=r.getBool();break;default:r.skip()}return t}let m=[];function _(e,t,r){let n=f(t),s=0,i=e.asUnsafe();for(;i.next();)switch(i.tag()){case 1:1===r?n=c(i,o):i.skip();continue;case 2:for(let e=i.getPackedEnd();i.pos()<e;)m[s++]=i.getUInt32();continue;case 3:s>0?(m.length=s,null!=t.geometry(r,n,m)&&(m=[])):t.geometry(r,n,[]);for(let e=i.getPackedEnd();i.pos()<e;)t.coord(i.getSInt64());continue;default:i.skip()}}function M(e,t){let r=[],n=e.asUnsafe();for(;n.next();)if(3===n.tag())for(let e=n.getPackedEnd();n.pos()<e;)r.push(n.getSInt64());else n.skip();t.centroid(r)}let b=[],x=[],v=[];function w(e,t){let r={stack:[],error:void 0,hasError:!1};try{let s=0,i=m,a=0,o=e.asUnsafe(),l=(0,n.mS)(r,o.clonePooled().asUnsafe(),!1);for(;o.next();)switch(o.tag()){case 2:for(let u=o.getPackedEnd();o.pos()<u;)i[s++]=o.getUInt32();continue;case 3:if(!("curvedGeometry"in t))throw Error(`Tried to parse curved geometry in a ${t.constructor.name}, which doesn't support them.`);o.processMessageWithArgs(S,a++);continue;case 4:{let h=o.getUInt32(),c=o.pos()+h;if(0===a||0===s||0===h){o.move(c);continue}i.length=s,v.length=x.length=a,t.curvedGeometry(f(t),i,x,v);let{hasZ:p,hasM:d}=t.featureSet,g=[],y=[0,0];function _(){for(let e=0;e<y.length;++e)g[e]=y[e],y[e]=o.getSInt64()}p&&y.push(0),d&&y.push(0);let M=[0,0],w=[0,0],k=M,P=M,I=0;for(let T=0;T<s;++T){_(),g.fill(0),t.startCurvedPart(y);for(let A=I+i[T];I<A;++I){let q=x[I],R=v[I];switch(q){case 0:for(let C=0;C<R;++C)_(),y[0]+=g[0],y[1]+=g[1],t.lineSegment(g,y);continue;case 1:for(let G=0;G<R;++G)_(),k[0]=o.getSInt64(),k[1]=o.getSInt64(),t.circularArcSegment(g,y,k);continue;case 2:for(let V=0;V<R;++V)_(),M[0]=o.getSInt64(),M[1]=o.getSInt64(),w[0]=o.getSInt64(),w[1]=o.getSInt64(),t.bezierSegment(g,y,M,w);continue;case 3:if(l.move(b[I]),l.getUInt32()<7*R)throw Error("Not implemented: compressed full circle encoding");for(let E=0;E<R;++E){_(),P[0]=l.getDouble(),P[1]=l.getDouble();let F=l.getDouble(),D=l.getDouble(),U=l.getDouble(),Z=l.getDouble(),O=l.getDouble();t.ellipticArcSegment(g,y,P,F,D,U,Z,O)}continue}}t.finishCurvedPart(y)}continue}default:o.skip()}}catch(L){r.error=L,r.hasError=!0}finally{(0,n.hk)(r)}}function S(e,t){let r=e.asUnsafe(),n=0,s=0,i=0;for(;r.next();)switch(r.tag()){case 1:n=r.getEnum();continue;case 2:s=r.getUInt32();continue;case 3:i=r.pos(),r.skip();continue;default:r.skip()}if(3===n&&0===i)throw Error("An elliptic arc segment set did not include a parameters array");x[t]=n,v[t]=s,b[t]=i}function k(e,t){t.feature();let r=t.featureSet.features.at(-1),n=0,{fields:s}=t.featureSet;for(;e.next();)switch(e.tag()){case 1:if(null==s)throw Error("A Feature had attributes but the FeatureResult didn't include any fields");r.attributes[s[n++].name]=e.processMessage(d);continue;case 2:e.processMessageWithArgs(_,t,0);continue;case 4:e.processMessageWithArgs(M,t);continue;case 7:e.processMessageWithArgs(w,t);continue;case 11:r.distance=e.getDouble();continue;default:e.skip();continue}t.finishFeature?.()}function P(e){let t=[1,1,1,1],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function I(e){let t=[0,0,0,0],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function T(e){let t={originPosition:h[0]},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.originPosition=c(r,h);break;case 2:t.scale=r.processMessage(P);break;case 3:t.translate=r.processMessage(I);break;default:r.skip()}return t}function A(e){let t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.shapeAreaFieldName=r.getString();break;case 2:t.shapeLengthFieldName=r.getString();break;case 3:t.units=r.getString();break;default:r.skip()}return t}function q(e){let t={};for(;e.next();)switch(e.tag()){case 1:t.wkid=e.getUInt32();break;case 5:t.wkt=e.getString();break;case 2:t.latestWkid=e.getUInt32();break;case 3:t.vcsWkid=e.getUInt32();break;case 4:t.latestVcsWkid=e.getUInt32();break;default:e.skip()}return t}function R(e,t){let r=e.asUnsafe();if(t.featureSet.features.length=0,"features"===t.parseOnly?.type){let e=t.parseOnly.indices.values(),n=0,s=e.next().value;for(;r.next();)15!==r.tag()||n++!==s?r.skip():(s=e.next().value,r.processMessageWithArgs(k,t));return}let n=!1;for("metadata"===t.parseOnly?.type&&(n=!0,t.parseOnly.featureCount=0),p(t,"esriGeometryPoint");r.next();)switch(r.tag()){case 1:t.idField(r.getString());continue;case 3:t.featureSet.globalIdFieldName=r.getString();continue;case 4:t.featureSet.geohashFieldName=r.getString();continue;case 5:t.featureSet.geometryProperties=r.processMessage(A);continue;case 7:p(t,c(r,o));continue;case 8:t.featureSet.spatialReference=r.processMessageWithArgs(q);continue;case 10:t.featureSet.hasZ=r.getBool();continue;case 11:t.featureSet.hasM=r.getBool();continue;case 12:t.featureSet.transform=r.processMessage(T);continue;case 9:t.featureSet.exceededTransferLimit=r.getBool();continue;case 13:t.featureSet.fields??=[],t.featureSet.fields.push(r.processMessage(g));continue;case 15:if(n){++t.parseOnly.featureCount,r.skip();continue}r.processMessageWithArgs(k,t);continue;case 2:t.idField(r.processMessage(y));continue;default:r.skip()}}function C(e,t,r){let n=-1;for(;e.next();)switch(e.tag()){case 4:n=e.pos(),e.skip();continue;case 1:e.processMessageWithArgs(R,t);continue;default:e.skip()}if(-1!==n){if(!t.queryGeometry()){let r=e.pos();e.move(n),e.processMessageWithArgs(_,t,1),e.move(r)}r.queryGeometryType=t.queryGeometryType(),r.queryGeometry=t.queryGeometry()}t.finish(),r.featureResult=t.featureSet}function G(e,t){let r={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(r,{[Symbol.dispose](){m=[],b=[],x=[],v=[]}},!1);try{let r={stack:[],error:void 0,hasError:!1};try{let s,a=(0,n.mS)(r,i.A.constructPooled(new Uint8Array(e),new DataView(e)),!1);for(;a.next();)2===a.tag()?(s={},a.processMessageWithArgs(C,t,s)):a.skip();return s}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}catch(e){throw new s.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}},63746(e,t,r){function n(e){return class{constructor(){for(let t of e)this[t]=null}}}function s(e,t=1){let{transform:r,hasZ:n,hasM:s}=e;if(null==r)return n&&1!==t?e=>{e[2]*=t}:null;let[i,a]=function(e,t,r,n){let{scale:s,translate:i,originPosition:a}=e;return"upperLeft"===a&&(s=s.map((e,t)=>1===t?-e:e)),t&&(s=s.map((e,t)=>2===t?e*n:e),i=i.map((e,t)=>2===t?e*n:e)),!t&&r&&(s=s.filter((e,t)=>2!==t),i=i.filter((e,t)=>2!==t)),[s,i]}(r,n,s,t),o=e.hasZ?3:2;return e=>{for(let t=0;t<e.length&&(t!==o||0!==e[t]);++t)e[t]=e[t]*i[t]+a[t]}}r.d(t,{M:()=>s,_:()=>n})},66208(e,t,r){r.d(t,{m:()=>s});var n=r(53655);function s(e,t){let{featureResult:r}=(0,n.SH)(e,t);return r}},39078(e,t,r){r.r(t),r.d(t,{default:()=>c});var n=r(24326),s=r(62815);r(69397),r(16930),r(70328),r(19419),r(50498),r(44208),r(34727),r(21325);class i{constructor(e,t,r){this.uid=e,this.geometry=t,this.attributes=r,this.visible=!0,this.objectId=null,this.centroid=null}}class a{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null,this.missingAttributes=null}}var o=r(63746);class l{constructor(e){this._options=e,this.featureSet=new a,this.usesShortGeometryTypes=!0,this.transferList=[],this.coordinates=[],this._queryGeometryType=null,this._queryGeometry=null,this._queryCoordinates=null,this.parseOnly=null,this.missingAttributes=[],this._transformInPlace=null,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._coords=null,this._coordinateIndex=0,this._partIndex=0,this._partEnd=0,this._vertex=[],this._i=0,this._finishVertex=null}queryGeometryType(){return this._queryGeometryType}queryGeometry(){return this._queryGeometry}queryCoordinates(){return this._queryCoordinates}idField(e){"string"==typeof e&&(this.featureSet.objectIdFieldName=e)}finish(){this._options.applyTransform&&(this.featureSet.transform=null)}_setVertexTransformer(){let{sourceSpatialReference:e}=this._options,{spatialReference:t,hasZ:r}=this.featureSet,n=r?(0,s.d)(e,t):1;this._transformInPlace??=(0,o.M)(this.featureSet,n)}feature(){this._attributesClass??=(0,o._)(this.featureSet.fields?.map(e=>e.name)??[]),this.featureSet.features.push(new i((0,n.c)(),null,new this._attributesClass)),this.coordinates.push(null),this._options.applyTransform&&this._setVertexTransformer()}finishFeature(){let{maxStringAttributeLength:e,maxStringAttributeFields:t}=this._options,{attributes:r}=this.featureSet.features.at(-1),n=r[this.featureSet.objectIdFieldName];!function(e,t,r,n){if(t?.size&&null!=r&&e)for(let s in e){if(!t.has(s))continue;let i=e[s];"string"==typeof i&&i.length>r&&(n(s),e[s]="")}}(r,t,e,e=>{null!=n&&this.missingAttributes.push({objectId:n,attribute:e})})}_createPoint(){let{hasZ:e,hasM:t}=this.featureSet,r={type:"point",x:0,y:0,spatialReference:null,hasZ:e,hasM:t};return e&&(r.z=0),t&&(r.m=0),r}centroid(e){let{hasZ:t,hasM:r}=this.featureSet,n={type:"point",x:0,y:0,spatialReference:null,hasZ:t,hasM:r};[n.x,n.y]=e,t&&(n.z=e[2]),r&&(n.m=e.at(-1)),this.featureSet.features.at(-1).centroid=n}geometry(e,t,r){this._previousX=this._previousY=0,this._lengths=r;let{hasZ:n,hasM:s}=this.featureSet;n??=!1,s??=!1,this._vertex=[0,0],n&&this._vertex.push(0),s&&this._vertex.push(0);let i,a=null;switch(t){case"esriGeometryPoint":this._point=this._createPoint(),i=this._point,this._finishVertex=n?s?l._finishVertexPointXYZM:l._finishVertexPointXYZ:s?l._finishVertexPointXYM:l._finishVertexPointXY;break;case"esriGeometryMultipoint":this._createPackedCoordinates(r),a={coords:this._coords,lengths:r.slice()},i={type:"multipoint",points:null,spatialReference:null,hasZ:n,hasM:s};break;case"esriGeometryPolyline":case"esriGeometryPolygon":this._createPackedCoordinates(r),a={coords:this._coords,lengths:r.slice()},i="esriGeometryPolygon"===t?{type:"polygon",rings:null,spatialReference:null,hasZ:n,hasM:s}:{type:"polyline",paths:null,spatialReference:null,hasZ:n,hasM:s}}1===e?(this._queryGeometry=i,this._queryCoordinates=a,this._queryGeometryType=t,this._options.applyTransform||this._setVertexTransformer()):(this.featureSet.features.at(-1).geometry=i,this.coordinates[this.coordinates.length-1]=a)}_createPackedCoordinates(e){let t=this._vertex.length;for(this._coords=new Float64Array(e.reduce((e,t)=>e+t,0)*t),this._coordinateIndex=this._partIndex=0,this._partEnd=(e[0]??0)*t;0===this._partEnd&&++this._partIndex<e.length;)this._partEnd+=e[this._partIndex]*t;this._finishVertex=l._finishVertexPacked,this.transferList.push(this._coords.buffer)}coord(e){let t=this._vertex;t[this._i++]=e,this._i<t.length||(this._i=0,this._transformInPlace&&(t[0]+=this._previousX,t[1]+=this._previousY,[this._previousX,this._previousY]=t,this._transformInPlace(t)),this._finishVertex(this))}static _finishVertexPointXY({_point:e,_vertex:t}){[e.x,e.y]=t}static _finishVertexPointXYZ({_point:e,_vertex:t}){[e.x,e.y,e.z]=t}static _finishVertexPointXYM({_point:e,_vertex:t}){[e.x,e.y,e.m]=t}static _finishVertexPointXYZM({_point:e,_vertex:t}){[e.x,e.y,e.z,e.m]=t}static _finishVertexPacked(e){let{_vertex:t,_coords:r,_lengths:n}=e;if(r.set(t,e._coordinateIndex),e._coordinateIndex+=t.length,e._coordinateIndex===e._partEnd)for(e._previousX=e._previousY=0;e._coordinateIndex===e._partEnd&&++e._partIndex<n.length;)e._partEnd+=n[e._partIndex]*t.length}}var u=r(66208);class h{parseFeatureQuery(e){let t=new l(e.options),r=(0,u.m)(e.buffer,t);r.missingAttributes=t.missingAttributes;let n={featureSet:r,coordinates:t.coordinates,queryGeometry:t.queryGeometry()??null,queryCoordinates:t.queryCoordinates()??null};return Promise.resolve({result:n,transferList:t.transferList})}}function c(){return new h}}}]);
|