@arcgis/core 4.33.0-next.20250502 → 4.33.0-next.20250504

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.
Files changed (69) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0219c3f9408d3fa3c9a0.js → 03ee9d0407c230b885ed.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{84f972d7851d982701a0.js → 1ca7e0d519ecbfe6976f.js} +1 -1
  4. package/assets/esri/core/workers/chunks/3fb25912b274f264c84e.js +1 -0
  5. package/assets/esri/core/workers/chunks/{9652cfd4668b95036c87.js → 532088a72c3ddc50f3be.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{653ff3e631fea8ad393a.js → a0db1f3ca29e34dfa16f.js} +12 -12
  7. package/assets/esri/core/workers/chunks/{581180668e0229dcdc14.js → bf190d672dcbaedc1a41.js} +1 -1
  8. package/assets/esri/geometry/support/pe-wasm.wasm +0 -0
  9. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +14 -1
  10. package/assets/esri/themes/base/widgets/_SelectionList.scss +34 -0
  11. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +6 -0
  12. package/assets/esri/themes/dark/main.css +1 -1
  13. package/assets/esri/themes/light/main.css +1 -1
  14. package/assets/esri/themes/light/view.css +1 -1
  15. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  16. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  17. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList.json +1 -1
  18. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_en.json +1 -1
  19. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar.json +1 -1
  20. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_en.json +1 -1
  21. package/chunks/pe-wasm.js +1 -1
  22. package/chunks/pe.js +1 -1
  23. package/geometry/coordinateFormatter.js +1 -1
  24. package/geometry/support/WKIDUnitConversion.js +1 -1
  25. package/package.json +1 -1
  26. package/support/revision.js +1 -1
  27. package/views/3d/interactive/Manipulator3D.js +1 -1
  28. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  29. package/views/3d/layers/DrapedSubView3D.js +1 -1
  30. package/views/3d/layers/I3SMeshView3D.js +1 -1
  31. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  32. package/views/3d/layers/MediaLayerView3D.js +1 -1
  33. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  34. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  35. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  36. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  37. package/views/3d/layers/graphics/pipeline/rendering/LodRenderer.js +1 -1
  38. package/views/3d/support/StreamTextureCollection.js +1 -1
  39. package/views/3d/support/TextureCollection.js +1 -1
  40. package/views/3d/webgl-engine/Stage.js +1 -1
  41. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  42. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  43. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  44. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  45. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  46. package/views/3d/webgl-engine/parts/Model.js +1 -1
  47. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  48. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  49. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  50. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +5 -0
  51. package/widgets/OrientedImageryViewer/components/ImageMeasurementWidget.js +1 -1
  52. package/widgets/OrientedImageryViewer/css.js +1 -1
  53. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  54. package/widgets/OrientedImageryViewer/mixins/SketchHandlerMixin.js +1 -1
  55. package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +5 -0
  56. package/widgets/OrientedImageryViewer/mixins/TriangulatedSketchHandlerMixin.js +5 -0
  57. package/widgets/OrientedImageryViewer.js +1 -1
  58. package/widgets/Sketch.js +1 -1
  59. package/widgets/support/SelectionList/LayerItem.js +1 -1
  60. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  61. package/widgets/support/SelectionList/VisibleElements.js +1 -1
  62. package/widgets/support/SelectionList.js +1 -1
  63. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  64. package/widgets/support/SelectionToolbar/VisibleElements.js +5 -0
  65. package/widgets/support/SelectionToolbar.js +1 -1
  66. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  67. package/assets/esri/core/workers/chunks/e3ef0451dcdc2e966628.js +0 -1
  68. package/views/3d/webgl-engine/lib/ContentObject.js +0 -5
  69. package/views/3d/webgl-engine/lib/ContentObjectType.js +0 -5
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6179],{3800:(e,t,r)=>{r.d(t,{Bz:()=>g,G:()=>v}),r(51850);var i=r(14314),o=r(31821),n=r(35818),a=r(69270),s=r(74333);class l extends s.n{constructor(e,t,r){super(e,"mat4",a.c.Draw,((r,i,o,n)=>r.setUniformMatrix4fv(e,t(i,o,n))),r)}}class c extends s.n{constructor(e,t,r){super(e,"mat4",a.c.Pass,((r,i,o)=>r.setUniformMatrix4fv(e,t(i,o))),r)}}var d=r(65786);function u(e){e.fragment.uniforms.add(new c("shadowMapMatrix",((e,t)=>t.shadowMap.getShadowMapMatrices(e.origin)),4)),m(e)}function h(e){e.fragment.uniforms.add(new l("shadowMapMatrix",((e,t)=>t.shadowMap.getShadowMapMatrices(e.origin)),4)),m(e)}function m(e){e.fragment.uniforms.add(new i.I("cascadeDistances",(e=>e.shadowMap.cascadeDistances)),new n.W("numCascades",(e=>e.shadowMap.numCascades))).code.add(o.H`const vec3 invalidShadowmapUVZ = vec3(0.0, 0.0, -1.0);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[432],{3800:(e,t,r)=>{r.d(t,{Bz:()=>g,G:()=>v}),r(51850);var i=r(14314),o=r(31821),n=r(35818),a=r(69270),s=r(74333);class l extends s.n{constructor(e,t,r){super(e,"mat4",a.c.Draw,((r,i,o,n)=>r.setUniformMatrix4fv(e,t(i,o,n))),r)}}class c extends s.n{constructor(e,t,r){super(e,"mat4",a.c.Pass,((r,i,o)=>r.setUniformMatrix4fv(e,t(i,o))),r)}}var d=r(65786);function u(e){e.fragment.uniforms.add(new c("shadowMapMatrix",((e,t)=>t.shadowMap.getShadowMapMatrices(e.origin)),4)),m(e)}function h(e){e.fragment.uniforms.add(new l("shadowMapMatrix",((e,t)=>t.shadowMap.getShadowMapMatrices(e.origin)),4)),m(e)}function m(e){e.fragment.uniforms.add(new i.I("cascadeDistances",(e=>e.shadowMap.cascadeDistances)),new n.W("numCascades",(e=>e.shadowMap.numCascades))).code.add(o.H`const vec3 invalidShadowmapUVZ = vec3(0.0, 0.0, -1.0);
2
2
  vec3 lightSpacePosition(vec3 _vpos, mat4 mat) {
3
3
  vec4 lv = mat * vec4(_vpos, 1.0);
4
4
  lv.xy /= lv.w;
@@ -138,7 +138,7 @@ return fallOffFunction(vv, vn, 0.1);
138
138
  A = (pow(A, 0.2) + 1.2 * A * A * A * A) / 2.2;
139
139
 
140
140
  fragOcclusion = A;
141
- `),e}function g(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const _=(0,o.vt)(),T=Object.freeze(Object.defineProperty({__proto__:null,build:v,getRadius:g},Symbol.toStringTag,{value:"Module"}))},16396:(e,t,r)=>{r.d(t,{ou:()=>c}),r(77690),r(29242),r(58083),r(9093);var i=r(38954),o=r(51850),n=r(97937),a=r(24151),s=r(57005);const l=new class{constructor(e=0){this.offset=e,this.sphere=(0,n.c)(),this.tmpVertex=(0,o.vt)()}applyToVertex(e,t,r){const o=this.objectTransform.transform,n=(0,i.i)(d,e,t,r),a=(0,i.t)(n,n,o),s=this.offset/(0,i.l)(a);(0,i.b)(a,a,a,s);const l=this.objectTransform.inverse;return(0,i.t)(this.tmpVertex,a,l),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,i.l)(e);(0,i.b)(e,e,e,r);const o=this.offset/(0,i.l)(t);(0,i.b)(t,t,t,o)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,i.l)((0,n.a)(e)),r=this.offset/t;return(0,i.b)((0,n.a)(this.sphere),(0,n.a)(e),(0,n.a)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};function c(e){return null!=e?(l.offset=e,l):null}new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,o.vt)(),this._tmpMbs=(0,n.c)(),this._tmpObb=new s.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,i.l)(e)}applyToVertex(e,t,r){const o=(0,i.i)(d,e,t,r),n=(0,i.i)(u,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,i.l)(n);return(0,i.b)(this._tmpVertex,o,n,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],o=e[2]+t,n=e[3],a=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(i),d=Math.abs(o),u=Math.abs(n),h=Math.abs(a),m=Math.abs(s),p=.5*(1+Math.sign(r*n))*Math.min(l,u),f=.5*(1+Math.sign(i*a))*Math.min(c,h),v=.5*(1+Math.sign(o*s))*Math.min(d,m),g=Math.max(l,u),_=Math.max(c,h),T=Math.max(d,m),x=Math.sqrt(p*p+f*f+v*v),E=Math.sign(l+r),b=Math.sign(c+i),A=Math.sign(d+o),S=Math.sign(u+n),M=Math.sign(h+a),w=Math.sign(m+s),C=this._totalOffset;if(x<C)return e[0]-=(1-E)*C,e[1]-=(1-b)*C,e[2]-=(1-A)*C,e[3]+=S*C,e[4]+=M*C,e[5]+=w*C,e;const R=C/Math.sqrt(g*g+_*_+T*T),I=C/x,O=I-R,N=-O;return e[0]+=r*(E*N+I),e[1]+=i*(b*N+I),e[2]+=o*(A*N+I),e[3]+=n*(S*O+R),e[4]+=a*(M*O+R),e[5]+=s*(w*O+R),e}applyToMbs(e){const t=(0,i.l)((0,n.a)(e)),r=this._totalOffset/t;return(0,i.b)((0,n.a)(this._tmpMbs),(0,n.a)(e),(0,n.a)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,s.gm)(e,this._totalOffset,this._totalOffset,a.RT.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,o.vt)()}applyToVertex(e,t,r){const o=(0,i.i)(d,e,t,r),n=(0,i.g)(u,o,this.localOrigin),a=this.offset/(0,i.l)(n);return(0,i.b)(this.tmpVertex,o,n,a),this.tmpVertex}applyToAabb(e){const t=h,r=m,i=p;for(let o=0;o<3;++o)t[o]=e[0+o]+this.localOrigin[o],r[o]=e[3+o]+this.localOrigin[o],i[o]=t[o];const o=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=o[t],e[t+3]=o[t];const n=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let o=0;o<3;++o)i[o]=e&1<<o?r[o]:t[o];n(i)}let a=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(a|=1<<e);if(0!==a&&7!==a)for(let e=0;e<8;++e)if(!(a&e)){for(let o=0;o<3;++o)i[o]=a&1<<o?0:e&1<<o?t[o]:r[o];n(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const d=(0,o.vt)(),u=(0,o.vt)(),h=(0,o.vt)(),m=(0,o.vt)(),p=(0,o.vt)()},17352:(e,t,r)=>{r.d(t,{b:()=>j,f:()=>x}),r(44208);var i=r(53966),o=r(34727),n=r(4341),a=r(58083),s=r(9093),l=r(38954),c=r(51850),d=r(19419),u=r(88582),h=r(11964),m=r(240),p=r(71351),f=r(44280),v=r(32114);const g=()=>i.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function _(e=H){return{plane:(0,m.vt)(e.plane),origin:(0,c.o8)(e.origin),basis1:(0,c.o8)(e.basis1),basis2:(0,c.o8)(e.basis2)}}function T(e,t=_()){return x(e.origin,e.basis1,e.basis2,t)}function x(e,t,r,i=_()){return(0,l.c)(i.origin,e),(0,l.c)(i.basis1,t),(0,l.c)(i.basis2,r),E(i),function(e,t){Math.abs((0,l.f)(e.basis1,e.basis2)/((0,l.l)(e.basis1)*(0,l.l)(e.basis2)))>1e-6&&g().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,l.f)(e.basis1,N(e)))>1e-6&&g().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,l.f)(N(e),e.origin)-e.plane[3])>1e-6&&g().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function E(e){(0,m.mR)(e.basis2,e.basis1,e.origin,e.plane)}function b(e,t,r){e!==r&&T(e,r);const i=(0,l.h)(v.rq.get(),N(e),t);return(0,l.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function A(e,t=_()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,l.i)(t.origin,e[0]+r,e[1]+i,0),(0,l.i)(t.basis1,r,0,0),(0,l.i)(t.basis2,0,i,0),(0,m.fA)(0,0,1,0,t.plane),t}function S(e,t,r){return!!(0,m.Ui)(e.plane,t,r)&&y(e,r)}function M(e,t,r){const i=F.get();D(e,t,i,F.get());let n=Number.POSITIVE_INFINITY;for(const a of z){const s=L(e,a,B.get()),c=v.rq.get();if((0,m.T7)(i,s,c)){const e=(0,l.o)(v.rq.get(),t.origin,c),i=Math.abs((0,o.XM)((0,l.f)(t.direction,e)));i<n&&(n=i,(0,l.c)(r,c))}}return n===Number.POSITIVE_INFINITY?w(e,t,r):r}function w(e,t,r){if(S(e,t,r))return r;const i=F.get(),o=F.get();D(e,t,i,o);let n=Number.POSITIVE_INFINITY;for(const a of z){const s=L(e,a,B.get()),c=v.rq.get();if((0,m.gv)(i,s,c)){const e=(0,p.kb)(t,c);if(!(0,m.Tj)(o,c))continue;e<n&&(n=e,(0,l.c)(r,c))}}return I(e,t.origin)<n&&C(e,t.origin,r),r}function C(e,t,r){const i=(0,m._I)(e.plane,t,v.rq.get()),o=(0,h.H6)(P(e,e.basis1),i,-1,1,v.rq.get()),n=(0,h.H6)(P(e,e.basis2),i,-1,1,v.rq.get());return(0,l.d)(r,(0,l.g)(v.rq.get(),o,n),e.origin),r}function R(e,t,r){const{origin:i,basis1:o,basis2:n}=e,a=(0,l.d)(v.rq.get(),t,i),s=(0,f.gr)(o,a),c=(0,f.gr)(n,a),d=(0,f.gr)(N(e),a);return(0,l.i)(r,s,c,d)}function I(e,t){const r=R(e,t,v.rq.get()),{basis1:i,basis2:o}=e,n=(0,l.l)(i),a=(0,l.l)(o),s=Math.max(Math.abs(r[0])-n,0),c=Math.max(Math.abs(r[1])-a,0),d=r[2];return s*s+c*c+d*d}function O(e,t){const r=-e.plane[3];return(0,f.gr)(N(e),t)-r}function N(e){return(0,m.Qj)(e.plane)}function y(e,t){const r=(0,l.d)(v.rq.get(),t,e.origin),i=(0,l.k)(e.basis1),o=(0,l.k)(e.basis2),n=(0,l.f)(e.basis1,r),a=(0,l.f)(e.basis2,r);return-n-i<0&&n-i<0&&-a-o<0&&a-o<0}function P(e,t){const r=B.get();return(0,l.c)(r.origin,e.origin),(0,l.c)(r.vector,t),r}function L(e,t,r){const{basis1:i,basis2:o,origin:n}=e,a=(0,l.h)(v.rq.get(),i,t.origin[0]),s=(0,l.h)(v.rq.get(),o,t.origin[1]);(0,l.g)(r.origin,a,s),(0,l.g)(r.origin,r.origin,n);const c=(0,l.h)(v.rq.get(),i,t.direction[0]),d=(0,l.h)(v.rq.get(),o,t.direction[1]);return(0,l.h)(r.vector,(0,l.g)(c,c,d),2),r}function D(e,t,r,i){const o=N(e);(0,m.mR)(o,t.direction,t.origin,r),(0,m.mR)((0,m.Qj)(r),o,t.origin,i)}const H={plane:(0,m.vt)(),origin:(0,c.fA)(0,0,0),basis1:(0,c.fA)(1,0,0),basis2:(0,c.fA)(0,1,0)},F=new n.I(m.vt),B=new n.I(h.vt),U=(0,c.vt)(),G=new n.I((()=>_())),z=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],V=(0,s.vt)(),W=(0,s.vt)(),j=Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,m.vt)(),this.origin=(0,c.vt)(),this.basis1=(0,c.vt)(),this.basis2=(0,c.vt)()}},altitudeAt:O,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case u._.X:(0,l.c)(r,e.basis1),(0,l.n)(r,r);break;case u._.Y:(0,l.c)(r,e.basis2),(0,l.n)(r,r);break;case u._.Z:(0,l.c)(r,N(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:w,closestPointOnSilhouette:M,copy:T,copyWithoutVerify:function(e,t){(0,l.c)(t.origin,e.origin),(0,l.c)(t.basis1,e.basis1),(0,l.c)(t.basis2,e.basis2),(0,m.C)(t.plane,e.plane)},create:_,distance:function(e,t){return Math.sqrt(I(e,t))},distance2:I,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of z){const o=L(e,i,B.get()),n=(0,h.kb)(o,t);n>r&&(r=n)}return Math.sqrt(r)},elevate:b,equals:function(e,t){return(0,l.p)(e.basis1,t.basis1)&&(0,l.p)(e.basis2,t.basis2)&&(0,l.p)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,m.Tj)(e.plane,t)&&y(e,t)},fromAABoundingRect:A,fromValues:x,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[o,n]=e.origin;return(0,d.fA)(o-r,n-i,o+r,n+i,t)},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,v.rq.get());return(0,l.g)(r,t.origin,(0,l.h)(v.rq.get(),t.direction,(0,l.j)(t.origin,i)/(0,l.l)(t.direction))),r},normal:N,projectPoint:C,projectPointLocal:R,rotate:function(e,t,r,i){return e!==i&&T(e,i),(0,a.$0)(W,t,r),(0,l.t)(i.basis1,e.basis1,W),(0,l.t)(i.basis2,e.basis2,W),E(i),i},setAltitudeAt:function(e,t,r,i){const o=O(e,t),n=(0,l.h)(U,N(e),r-o);return(0,l.g)(i,t,n),i},setExtent:function(e,t,r){return A(t,r),b(r,O(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&T(e,r),(0,a.B8)(V,t),(0,a.mg)(V,V),(0,l.t)(r.basis1,e.basis1,V),(0,l.t)(r.basis2,e.basis2,V),(0,l.t)((0,m.Qj)(r.plane),(0,m.Qj)(e.plane),V),(0,l.t)(r.origin,e.origin,t),(0,m.mP)(r.plane,r.plane,r.origin),r},up:H,updateUnboundedPlane:E,wrap:function(e,t,r){const i=G.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,m.LV)(0,0,0,0),E(i),i}},Symbol.toStringTag,{value:"Module"}))},20304:(e,t,r)=>{r.d(t,{m:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"float",i.c.Pass,((r,i,o)=>r.setUniform1f(e,t(i,o))))}}},20693:(e,t,r)=>{r.d(t,{yu:()=>p,Nz:()=>T,NB:()=>f,S7:()=>_});var i=r(58083),o=r(9093),n=r(38954),a=r(51850),s=r(23205),l=r(40710),c=r(33094),d=r(58029),u=r(69270),h=r(74333);class m extends h.n{constructor(e,t){super(e,"mat4",u.c.Draw,((r,i,o)=>r.setUniformMatrix4fv(e,t(i,o))))}}function p(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new l.W("cameraPosition",((e,t)=>(0,n.i)(g,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function f(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new d.F("proj",(e=>e.camera.projectionMatrix)),new m("view",((e,t)=>(0,i.Tl)(v,t.camera.viewMatrix,e.origin))),new l.W("localOrigin",(e=>e.origin)));const r=({camera:e})=>(0,n.i)(g,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11]);e.uniforms.add(new d.F("proj",(e=>e.camera.projectionMatrix)),new d.F("view",(e=>(0,i.Tl)(v,e.camera.viewMatrix,r(e)))),new s.d("localOrigin",(e=>r(e))))}const v=(0,o.vt)(),g=(0,a.vt)();function _(e){e.uniforms.add(new d.F("viewNormal",(e=>e.camera.viewInverseTransposeMatrix)))}function T(e){e.uniforms.add(new c.U("pixelRatio",(e=>e.camera.pixelRatio/e.overlayStretch)))}},21231:(e,t,r)=>{r.d(t,{g:()=>p});var i=r(49186),o=(r(44208),r(53966)),n=r(97768),a=r(74887),s=r(94656),l=r(63907),c=r(6625),d=r(67171),u=r(12541);class h extends d.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case l.H0.R16F:case l.H0.R32F:case l.H0.R8_SNORM:case l.H0.R8:this.pixelFormat=l.Ab.RED;break;case l.H0.R8I:case l.H0.R8UI:case l.H0.R16I:case l.H0.R16UI:case l.H0.R32I:case l.H0.R32UI:this.pixelFormat=l.Ab.RED_INTEGER}}static validate(e,t){return new h(e,t)}}const m=()=>o.A.getLogger("esri/views/webgl/Texture");let p=class e{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=c.d.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=h.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}this._descriptor.target===l.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,d.e)(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return null!==this._compressionAbortController}dispose(){this.abortCompression(),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.instanceCounter.decrement(l.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===l.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e,t){this._descriptor.compressionHandle=e,this._descriptor.compressionCallback=t}disableCompression(){this._descriptor.compressionHandle=null,this._descriptor.compressionCallback=null}setData(e){this.abortCompression(),!(0,u.Qp)(e)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in l.CQ&&(this._descriptor.internalFormat=void 0),this._setData(e),!(0,u.Qp)(e)&&this._descriptor.compressionHandle&&this._compressOnWorker(e)}updateData(t,r,o,n,a,s,l=0){s||m().error("An attempt to use uninitialized data!"),this._glName||m().error("An attempt to update uninitialized texture!");const c=this._descriptor;c.internalFormat=(0,u.mq)(c);const{context:d,pixelFormat:h,dataType:p,target:f,isImmutable:v}=c;if(v&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");const g=d.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||o<0||r+n>c.width||o+a>c.height)&&m().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:_}=d;l&&(n&&a||m().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),_.pixelStorei(_.UNPACK_SKIP_ROWS,l)),(0,u.Kv)(s)?_.texSubImage2D(f,t,r,o,n,a,h,p,s):(0,u.Qp)(s)?_.compressedTexSubImage2D(f,t,r,o,n,a,c.internalFormat,s.levels[t]):_.texSubImage2D(f,t,r,o,n,a,h,p,s),l&&_.pixelStorei(_.UNPACK_SKIP_ROWS,0),d.bindTexture(g,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,o,n,a,s,l,c){c||m().error("An attempt to use uninitialized data!"),this._glName||m().error("An attempt to update an uninitialized texture!");const d=this._descriptor;d.internalFormat=(0,u.mq)(d);const{context:h,pixelFormat:p,dataType:f,isImmutable:v,target:g}=d;if(v&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");(0,u.re)(g)||m().warn("Attempting to set 3D texture data on a non-3D texture");const _=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||o<0||n<0||r+a>d.width||o+s>d.height||n+l>d.depth)&&m().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:T}=h;if((0,u.Qp)(c))c=c.levels[t],T.compressedTexSubImage3D(g,t,r,o,n,a,s,l,d.internalFormat,c);else{const e=c;T.texSubImage3D(g,t,r,o,n,a,s,l,p,f,e)}h.bindTexture(_,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(0===t.width||0===t.height)return;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,(0,u.QE)(t)}t.samplingMode===l.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=l.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===l.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=l.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,(0,u.QE)(e)}e.samplingMode===l.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=l.Cj.LINEAR):e.samplingMode===l.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=l.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,(0,u.QE)(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1)}abortCompression(){this.isCompressing&&(this._compressionAbortController=(0,n.DC)(this._compressionAbortController))}_setData(t,r){const o=this._descriptor,n=o.context?.gl;if(!n)return;(0,s.Y2)(n),this._glName||(this._glName=n.createTexture(),o.context.instanceCounter.increment(l.vt.Texture,this)),(0,u.QE)(o);const a=o.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);o.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,s.Y2)(n);const c=r??o.target,d=(0,u.re)(c);if((0,u.Kv)(t))this._setDataFromTexImageSource(t,c);else{const{width:e,height:r,depth:a}=o;if(null==e||null==r)throw new i.A("texture:missing-size","Width and height must be specified!");if(d&&null==a)throw new i.A("texture:missing-depth","Depth must be specified!");if(o.internalFormat=(0,u.mq)(o),o.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,o.internalFormat,o.hasMipmap,e,r,a),(0,u.Qp)(t)){if(!(0,u.tl)(o.internalFormat))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(t,o.internalFormat,c)}else this._texImage(c,0,o.internalFormat,e,r,a,t),(0,s.Y2)(n),o.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),(0,s.Y2)(n),o.context.bindTexture(a,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=l.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=l.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_setDataFromTexImageSource(e,t){const{gl:r}=this._descriptor.context,i=this._descriptor;i.internalFormat=(0,u.mq)(i);const o=(0,u.re)(t),{width:n,height:a,depth:l}=(0,u.Eo)(e);i.width&&i.height,i.width||(i.width=n),i.height||(i.height=a),o&&i.depth,o&&(i.depth=l),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,n,a,l),this._texImage(t,0,i.internalFormat,n,a,l,e),(0,s.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,s.Y2)(r))}_setDataFromCompressedSource(e,t,r){const i=this._descriptor,{width:o,height:n,depth:a}=i,s=e.levels,c=(0,u.FV)(r,o,n,a),d=Math.min(c,s.length)-1;this._descriptor.context.gl.texParameteri(i.target,l.H3.MAX_LEVEL,d),this._forEachMipmapLevel(((e,i,o,n)=>{const a=s[Math.min(e,s.length-1)];this._compressedTexImage(r,e,t,i,o,n,a)}),d)}_texStorage(e,t,r,o,n,a){const{gl:s}=this._descriptor.context;if(!(0,u.tr)(t)&&!(0,u.CR)(t)&&!(0,u.QJ)(t))throw new i.A("texture:missing-format","Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?(0,u.FV)(e,o,n,a):1;if((0,u.re)(e)){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");s.texStorage3D(e,l,t,o,n,a)}else s.texStorage2D(e,l,t,o,n);this._wasImmutablyAllocated=!0}_texImage(e,t,r,o,n,a,s){const l=this._descriptor.context.gl,c=(0,u.re)(e),{isImmutable:d,pixelFormat:h,dataType:m}=this._descriptor;if(d){if(null!=s){const r=s;if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,o,n,a,h,m,r)}else l.texSubImage2D(e,t,0,0,o,n,h,m,r)}}else{const d=s;if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,o,n,a,0,h,m,d)}else l.texImage2D(e,t,r,o,n,0,h,m,d)}}_compressedTexImage(e,t,r,o,n,a,s){const l=this._descriptor.context.gl,c=(0,u.re)(e);if(this._descriptor.isImmutable){if(null!=s)if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,o,n,a,r,s)}else l.compressedTexSubImage2D(e,t,0,0,o,n,r,s)}else if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,o,n,a,0,s)}else l.compressedTexImage2D(e,t,r,o,n,0,s)}async _compressOnWorker(t){if(!e.compressionWorkerHandle||!e.compressionWorkerHandle.isCompressible(t))return;const r=!!this._descriptor.context.capabilities.compressedTextureETC,i=!!this._descriptor.context.capabilities.compressedTextureS3TC;if(r||i){const o=new AbortController;this._compressionAbortController=o;const n=this._descriptor.compressionHandle;n.increment();const s=this._descriptor.compressionCallback,l={data:await createImageBitmap(t,{imageOrientation:this.descriptor.flipped?"flipY":"none"}),width:t.width,height:t.height,premultiplyAlpha:this._descriptor.preMultiplyAlpha,hasMipmap:this._descriptor.hasMipmap,hasETC:!!r,hasS3TC:!!i};e.compressionWorkerHandle.invoke(l,this._compressionAbortController.signal).then((e=>{e&&this.isCompressing&&this.glName&&(this._descriptor.internalFormat=e.internalFormat,this._setData(e.compressedTexture),s?.()),o===this._compressionAbortController&&(this._compressionAbortController=null),n.decrement()})).catch((e=>{(0,a.zf)(e)||o!==this._compressionAbortController||(this._compressionAbortController=null),n.decrement()}))}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:o,depth:n,hasMipmap:a,target:s}=this._descriptor;const c=s===l.Ap.TEXTURE_3D;if(null==r||null==o||c&&null==n)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,o,n),a&&(1!==r||1!==o||c&&1!==n)&&!(i>=t);++i)r=Math.max(1,r>>1),o=Math.max(1,o>>1),c&&(n=Math.max(1,n>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,i=e.samplingMode;r===l.Cj.LINEAR_MIPMAP_NEAREST||r===l.Cj.LINEAR_MIPMAP_LINEAR?(r=l.Cj.LINEAR,e.hasMipmap||(i=l.Cj.LINEAR)):r!==l.Cj.NEAREST_MIPMAP_NEAREST&&r!==l.Cj.NEAREST_MIPMAP_LINEAR||(r=l.Cj.NEAREST,e.hasMipmap||(i=l.Cj.NEAREST)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,i)}_applyWrapMode(){const e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},22393:(e,t,r)=>{r.d(t,{c:()=>s});var i=r(31821);function o(e){e.code.add(i.H`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG) {
141
+ `),e}function g(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const _=(0,o.vt)(),T=Object.freeze(Object.defineProperty({__proto__:null,build:v,getRadius:g},Symbol.toStringTag,{value:"Module"}))},16396:(e,t,r)=>{r.d(t,{ou:()=>c}),r(77690),r(29242),r(58083),r(9093);var i=r(38954),o=r(51850),n=r(97937),a=r(24151),s=r(57005);const l=new class{constructor(e=0){this.offset=e,this.sphere=(0,n.c)(),this.tmpVertex=(0,o.vt)()}applyToVertex(e,t,r){const o=this.objectTransform.transform,n=(0,i.i)(d,e,t,r),a=(0,i.t)(n,n,o),s=this.offset/(0,i.l)(a);(0,i.b)(a,a,a,s);const l=this.objectTransform.inverse;return(0,i.t)(this.tmpVertex,a,l),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,i.l)(e);(0,i.b)(e,e,e,r);const o=this.offset/(0,i.l)(t);(0,i.b)(t,t,t,o)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,i.l)((0,n.a)(e)),r=this.offset/t;return(0,i.b)((0,n.a)(this.sphere),(0,n.a)(e),(0,n.a)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};function c(e){return null!=e?(l.offset=e,l):null}new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,o.vt)(),this._tmpMbs=(0,n.c)(),this._tmpObb=new s.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,i.l)(e)}applyToVertex(e,t,r){const o=(0,i.i)(d,e,t,r),n=(0,i.i)(u,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,i.l)(n);return(0,i.b)(this._tmpVertex,o,n,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],o=e[2]+t,n=e[3],a=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(i),d=Math.abs(o),u=Math.abs(n),h=Math.abs(a),m=Math.abs(s),p=.5*(1+Math.sign(r*n))*Math.min(l,u),f=.5*(1+Math.sign(i*a))*Math.min(c,h),v=.5*(1+Math.sign(o*s))*Math.min(d,m),g=Math.max(l,u),_=Math.max(c,h),T=Math.max(d,m),x=Math.sqrt(p*p+f*f+v*v),E=Math.sign(l+r),b=Math.sign(c+i),A=Math.sign(d+o),S=Math.sign(u+n),M=Math.sign(h+a),w=Math.sign(m+s),C=this._totalOffset;if(x<C)return e[0]-=(1-E)*C,e[1]-=(1-b)*C,e[2]-=(1-A)*C,e[3]+=S*C,e[4]+=M*C,e[5]+=w*C,e;const R=C/Math.sqrt(g*g+_*_+T*T),I=C/x,O=I-R,N=-O;return e[0]+=r*(E*N+I),e[1]+=i*(b*N+I),e[2]+=o*(A*N+I),e[3]+=n*(S*O+R),e[4]+=a*(M*O+R),e[5]+=s*(w*O+R),e}applyToMbs(e){const t=(0,i.l)((0,n.a)(e)),r=this._totalOffset/t;return(0,i.b)((0,n.a)(this._tmpMbs),(0,n.a)(e),(0,n.a)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,s.gm)(e,this._totalOffset,this._totalOffset,a.RT.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,o.vt)()}applyToVertex(e,t,r){const o=(0,i.i)(d,e,t,r),n=(0,i.g)(u,o,this.localOrigin),a=this.offset/(0,i.l)(n);return(0,i.b)(this.tmpVertex,o,n,a),this.tmpVertex}applyToAabb(e){const t=h,r=m,i=p;for(let o=0;o<3;++o)t[o]=e[0+o]+this.localOrigin[o],r[o]=e[3+o]+this.localOrigin[o],i[o]=t[o];const o=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=o[t],e[t+3]=o[t];const n=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let o=0;o<3;++o)i[o]=e&1<<o?r[o]:t[o];n(i)}let a=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(a|=1<<e);if(0!==a&&7!==a)for(let e=0;e<8;++e)if(!(a&e)){for(let o=0;o<3;++o)i[o]=a&1<<o?0:e&1<<o?t[o]:r[o];n(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const d=(0,o.vt)(),u=(0,o.vt)(),h=(0,o.vt)(),m=(0,o.vt)(),p=(0,o.vt)()},17352:(e,t,r)=>{r.d(t,{b:()=>j,f:()=>x}),r(44208);var i=r(53966),o=r(34727),n=r(4341),a=r(58083),s=r(9093),l=r(38954),c=r(51850),d=r(19419),u=r(88582),h=r(11964),m=r(240),p=r(71351),f=r(44280),v=r(32114);const g=()=>i.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function _(e=H){return{plane:(0,m.vt)(e.plane),origin:(0,c.o8)(e.origin),basis1:(0,c.o8)(e.basis1),basis2:(0,c.o8)(e.basis2)}}function T(e,t=_()){return x(e.origin,e.basis1,e.basis2,t)}function x(e,t,r,i=_()){return(0,l.c)(i.origin,e),(0,l.c)(i.basis1,t),(0,l.c)(i.basis2,r),E(i),function(e,t){Math.abs((0,l.f)(e.basis1,e.basis2)/((0,l.l)(e.basis1)*(0,l.l)(e.basis2)))>1e-6&&g().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,l.f)(e.basis1,N(e)))>1e-6&&g().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,l.f)(N(e),e.origin)-e.plane[3])>1e-6&&g().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function E(e){(0,m.mR)(e.basis2,e.basis1,e.origin,e.plane)}function b(e,t,r){e!==r&&T(e,r);const i=(0,l.h)(v.rq.get(),N(e),t);return(0,l.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function A(e,t=_()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,l.i)(t.origin,e[0]+r,e[1]+i,0),(0,l.i)(t.basis1,r,0,0),(0,l.i)(t.basis2,0,i,0),(0,m.fA)(0,0,1,0,t.plane),t}function S(e,t,r){return!!(0,m.Ui)(e.plane,t,r)&&y(e,r)}function M(e,t,r){const i=F.get();D(e,t,i,F.get());let n=Number.POSITIVE_INFINITY;for(const a of z){const s=L(e,a,B.get()),c=v.rq.get();if((0,m.T7)(i,s,c)){const e=(0,l.o)(v.rq.get(),t.origin,c),i=Math.abs((0,o.XM)((0,l.f)(t.direction,e)));i<n&&(n=i,(0,l.c)(r,c))}}return n===Number.POSITIVE_INFINITY?w(e,t,r):r}function w(e,t,r){if(S(e,t,r))return r;const i=F.get(),o=F.get();D(e,t,i,o);let n=Number.POSITIVE_INFINITY;for(const a of z){const s=L(e,a,B.get()),c=v.rq.get();if((0,m.gv)(i,s,c)){const e=(0,p.kb)(t,c);if(!(0,m.Tj)(o,c))continue;e<n&&(n=e,(0,l.c)(r,c))}}return I(e,t.origin)<n&&C(e,t.origin,r),r}function C(e,t,r){const i=(0,m._I)(e.plane,t,v.rq.get()),o=(0,h.H6)(P(e,e.basis1),i,-1,1,v.rq.get()),n=(0,h.H6)(P(e,e.basis2),i,-1,1,v.rq.get());return(0,l.d)(r,(0,l.g)(v.rq.get(),o,n),e.origin),r}function R(e,t,r){const{origin:i,basis1:o,basis2:n}=e,a=(0,l.d)(v.rq.get(),t,i),s=(0,f.gr)(o,a),c=(0,f.gr)(n,a),d=(0,f.gr)(N(e),a);return(0,l.i)(r,s,c,d)}function I(e,t){const r=R(e,t,v.rq.get()),{basis1:i,basis2:o}=e,n=(0,l.l)(i),a=(0,l.l)(o),s=Math.max(Math.abs(r[0])-n,0),c=Math.max(Math.abs(r[1])-a,0),d=r[2];return s*s+c*c+d*d}function O(e,t){const r=-e.plane[3];return(0,f.gr)(N(e),t)-r}function N(e){return(0,m.Qj)(e.plane)}function y(e,t){const r=(0,l.d)(v.rq.get(),t,e.origin),i=(0,l.k)(e.basis1),o=(0,l.k)(e.basis2),n=(0,l.f)(e.basis1,r),a=(0,l.f)(e.basis2,r);return-n-i<0&&n-i<0&&-a-o<0&&a-o<0}function P(e,t){const r=B.get();return(0,l.c)(r.origin,e.origin),(0,l.c)(r.vector,t),r}function L(e,t,r){const{basis1:i,basis2:o,origin:n}=e,a=(0,l.h)(v.rq.get(),i,t.origin[0]),s=(0,l.h)(v.rq.get(),o,t.origin[1]);(0,l.g)(r.origin,a,s),(0,l.g)(r.origin,r.origin,n);const c=(0,l.h)(v.rq.get(),i,t.direction[0]),d=(0,l.h)(v.rq.get(),o,t.direction[1]);return(0,l.h)(r.vector,(0,l.g)(c,c,d),2),r}function D(e,t,r,i){const o=N(e);(0,m.mR)(o,t.direction,t.origin,r),(0,m.mR)((0,m.Qj)(r),o,t.origin,i)}const H={plane:(0,m.vt)(),origin:(0,c.fA)(0,0,0),basis1:(0,c.fA)(1,0,0),basis2:(0,c.fA)(0,1,0)},F=new n.I(m.vt),B=new n.I(h.vt),G=(0,c.vt)(),U=new n.I((()=>_())),z=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],V=(0,s.vt)(),W=(0,s.vt)(),j=Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,m.vt)(),this.origin=(0,c.vt)(),this.basis1=(0,c.vt)(),this.basis2=(0,c.vt)()}},altitudeAt:O,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case u._.X:(0,l.c)(r,e.basis1),(0,l.n)(r,r);break;case u._.Y:(0,l.c)(r,e.basis2),(0,l.n)(r,r);break;case u._.Z:(0,l.c)(r,N(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:w,closestPointOnSilhouette:M,copy:T,copyWithoutVerify:function(e,t){(0,l.c)(t.origin,e.origin),(0,l.c)(t.basis1,e.basis1),(0,l.c)(t.basis2,e.basis2),(0,m.C)(t.plane,e.plane)},create:_,distance:function(e,t){return Math.sqrt(I(e,t))},distance2:I,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of z){const o=L(e,i,B.get()),n=(0,h.kb)(o,t);n>r&&(r=n)}return Math.sqrt(r)},elevate:b,equals:function(e,t){return(0,l.p)(e.basis1,t.basis1)&&(0,l.p)(e.basis2,t.basis2)&&(0,l.p)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,m.Tj)(e.plane,t)&&y(e,t)},fromAABoundingRect:A,fromValues:x,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[o,n]=e.origin;return(0,d.fA)(o-r,n-i,o+r,n+i,t)},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,v.rq.get());return(0,l.g)(r,t.origin,(0,l.h)(v.rq.get(),t.direction,(0,l.j)(t.origin,i)/(0,l.l)(t.direction))),r},normal:N,projectPoint:C,projectPointLocal:R,rotate:function(e,t,r,i){return e!==i&&T(e,i),(0,a.$0)(W,t,r),(0,l.t)(i.basis1,e.basis1,W),(0,l.t)(i.basis2,e.basis2,W),E(i),i},setAltitudeAt:function(e,t,r,i){const o=O(e,t),n=(0,l.h)(G,N(e),r-o);return(0,l.g)(i,t,n),i},setExtent:function(e,t,r){return A(t,r),b(r,O(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&T(e,r),(0,a.B8)(V,t),(0,a.mg)(V,V),(0,l.t)(r.basis1,e.basis1,V),(0,l.t)(r.basis2,e.basis2,V),(0,l.t)((0,m.Qj)(r.plane),(0,m.Qj)(e.plane),V),(0,l.t)(r.origin,e.origin,t),(0,m.mP)(r.plane,r.plane,r.origin),r},up:H,updateUnboundedPlane:E,wrap:function(e,t,r){const i=U.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,m.LV)(0,0,0,0),E(i),i}},Symbol.toStringTag,{value:"Module"}))},20304:(e,t,r)=>{r.d(t,{m:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"float",i.c.Pass,((r,i,o)=>r.setUniform1f(e,t(i,o))))}}},20693:(e,t,r)=>{r.d(t,{yu:()=>p,Nz:()=>T,NB:()=>f,S7:()=>_});var i=r(58083),o=r(9093),n=r(38954),a=r(51850),s=r(23205),l=r(40710),c=r(33094),d=r(58029),u=r(69270),h=r(74333);class m extends h.n{constructor(e,t){super(e,"mat4",u.c.Draw,((r,i,o)=>r.setUniformMatrix4fv(e,t(i,o))))}}function p(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new l.W("cameraPosition",((e,t)=>(0,n.i)(g,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function f(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new d.F("proj",(e=>e.camera.projectionMatrix)),new m("view",((e,t)=>(0,i.Tl)(v,t.camera.viewMatrix,e.origin))),new l.W("localOrigin",(e=>e.origin)));const r=({camera:e})=>(0,n.i)(g,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11]);e.uniforms.add(new d.F("proj",(e=>e.camera.projectionMatrix)),new d.F("view",(e=>(0,i.Tl)(v,e.camera.viewMatrix,r(e)))),new s.d("localOrigin",(e=>r(e))))}const v=(0,o.vt)(),g=(0,a.vt)();function _(e){e.uniforms.add(new d.F("viewNormal",(e=>e.camera.viewInverseTransposeMatrix)))}function T(e){e.uniforms.add(new c.U("pixelRatio",(e=>e.camera.pixelRatio/e.overlayStretch)))}},21231:(e,t,r)=>{r.d(t,{g:()=>p});var i=r(49186),o=(r(44208),r(53966)),n=r(97768),a=r(74887),s=r(94656),l=r(63907),c=r(6625),d=r(67171),u=r(12541);class h extends d.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case l.H0.R16F:case l.H0.R32F:case l.H0.R8_SNORM:case l.H0.R8:this.pixelFormat=l.Ab.RED;break;case l.H0.R8I:case l.H0.R8UI:case l.H0.R16I:case l.H0.R16UI:case l.H0.R32I:case l.H0.R32UI:this.pixelFormat=l.Ab.RED_INTEGER}}static validate(e,t){return new h(e,t)}}const m=()=>o.A.getLogger("esri/views/webgl/Texture");let p=class e{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=c.d.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=h.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}this._descriptor.target===l.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,d.e)(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return null!==this._compressionAbortController}dispose(){this.abortCompression(),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.instanceCounter.decrement(l.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===l.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e,t){this._descriptor.compressionHandle=e,this._descriptor.compressionCallback=t}disableCompression(){this._descriptor.compressionHandle=null,this._descriptor.compressionCallback=null}setData(e){this.abortCompression(),!(0,u.Qp)(e)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in l.CQ&&(this._descriptor.internalFormat=void 0),this._setData(e),!(0,u.Qp)(e)&&this._descriptor.compressionHandle&&this._compressOnWorker(e)}updateData(t,r,o,n,a,s,l=0){s||m().error("An attempt to use uninitialized data!"),this._glName||m().error("An attempt to update uninitialized texture!");const c=this._descriptor;c.internalFormat=(0,u.mq)(c);const{context:d,pixelFormat:h,dataType:p,target:f,isImmutable:v}=c;if(v&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");const g=d.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||o<0||r+n>c.width||o+a>c.height)&&m().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:_}=d;l&&(n&&a||m().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),_.pixelStorei(_.UNPACK_SKIP_ROWS,l)),(0,u.Kv)(s)?_.texSubImage2D(f,t,r,o,n,a,h,p,s):(0,u.Qp)(s)?_.compressedTexSubImage2D(f,t,r,o,n,a,c.internalFormat,s.levels[t]):_.texSubImage2D(f,t,r,o,n,a,h,p,s),l&&_.pixelStorei(_.UNPACK_SKIP_ROWS,0),d.bindTexture(g,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,o,n,a,s,l,c){c||m().error("An attempt to use uninitialized data!"),this._glName||m().error("An attempt to update an uninitialized texture!");const d=this._descriptor;d.internalFormat=(0,u.mq)(d);const{context:h,pixelFormat:p,dataType:f,isImmutable:v,target:g}=d;if(v&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");(0,u.re)(g)||m().warn("Attempting to set 3D texture data on a non-3D texture");const _=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||o<0||n<0||r+a>d.width||o+s>d.height||n+l>d.depth)&&m().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:T}=h;if((0,u.Qp)(c))c=c.levels[t],T.compressedTexSubImage3D(g,t,r,o,n,a,s,l,d.internalFormat,c);else{const e=c;T.texSubImage3D(g,t,r,o,n,a,s,l,p,f,e)}h.bindTexture(_,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(0===t.width||0===t.height)return;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,(0,u.QE)(t)}t.samplingMode===l.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=l.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===l.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=l.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,(0,u.QE)(e)}e.samplingMode===l.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=l.Cj.LINEAR):e.samplingMode===l.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=l.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,(0,u.QE)(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1)}abortCompression(){this.isCompressing&&(this._compressionAbortController=(0,n.DC)(this._compressionAbortController))}_setData(t,r){const o=this._descriptor,n=o.context?.gl;if(!n)return;(0,s.Y2)(n),this._glName||(this._glName=n.createTexture(),o.context.instanceCounter.increment(l.vt.Texture,this)),(0,u.QE)(o);const a=o.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);o.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,s.Y2)(n);const c=r??o.target,d=(0,u.re)(c);if((0,u.Kv)(t))this._setDataFromTexImageSource(t,c);else{const{width:e,height:r,depth:a}=o;if(null==e||null==r)throw new i.A("texture:missing-size","Width and height must be specified!");if(d&&null==a)throw new i.A("texture:missing-depth","Depth must be specified!");if(o.internalFormat=(0,u.mq)(o),o.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,o.internalFormat,o.hasMipmap,e,r,a),(0,u.Qp)(t)){if(!(0,u.tl)(o.internalFormat))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(t,o.internalFormat,c)}else this._texImage(c,0,o.internalFormat,e,r,a,t),(0,s.Y2)(n),o.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),(0,s.Y2)(n),o.context.bindTexture(a,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=l.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=l.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_setDataFromTexImageSource(e,t){const{gl:r}=this._descriptor.context,i=this._descriptor;i.internalFormat=(0,u.mq)(i);const o=(0,u.re)(t),{width:n,height:a,depth:l}=(0,u.Eo)(e);i.width&&i.height,i.width||(i.width=n),i.height||(i.height=a),o&&i.depth,o&&(i.depth=l),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,n,a,l),this._texImage(t,0,i.internalFormat,n,a,l,e),(0,s.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,s.Y2)(r))}_setDataFromCompressedSource(e,t,r){const i=this._descriptor,{width:o,height:n,depth:a}=i,s=e.levels,c=(0,u.FV)(r,o,n,a),d=Math.min(c,s.length)-1;this._descriptor.context.gl.texParameteri(i.target,l.H3.MAX_LEVEL,d),this._forEachMipmapLevel(((e,i,o,n)=>{const a=s[Math.min(e,s.length-1)];this._compressedTexImage(r,e,t,i,o,n,a)}),d)}_texStorage(e,t,r,o,n,a){const{gl:s}=this._descriptor.context;if(!(0,u.tr)(t)&&!(0,u.CR)(t)&&!(0,u.QJ)(t))throw new i.A("texture:missing-format","Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?(0,u.FV)(e,o,n,a):1;if((0,u.re)(e)){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");s.texStorage3D(e,l,t,o,n,a)}else s.texStorage2D(e,l,t,o,n);this._wasImmutablyAllocated=!0}_texImage(e,t,r,o,n,a,s){const l=this._descriptor.context.gl,c=(0,u.re)(e),{isImmutable:d,pixelFormat:h,dataType:m}=this._descriptor;if(d){if(null!=s){const r=s;if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,o,n,a,h,m,r)}else l.texSubImage2D(e,t,0,0,o,n,h,m,r)}}else{const d=s;if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,o,n,a,0,h,m,d)}else l.texImage2D(e,t,r,o,n,0,h,m,d)}}_compressedTexImage(e,t,r,o,n,a,s){const l=this._descriptor.context.gl,c=(0,u.re)(e);if(this._descriptor.isImmutable){if(null!=s)if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,o,n,a,r,s)}else l.compressedTexSubImage2D(e,t,0,0,o,n,r,s)}else if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,o,n,a,0,s)}else l.compressedTexImage2D(e,t,r,o,n,0,s)}async _compressOnWorker(t){if(!e.compressionWorkerHandle||!e.compressionWorkerHandle.isCompressible(t))return;const r=!!this._descriptor.context.capabilities.compressedTextureETC,i=!!this._descriptor.context.capabilities.compressedTextureS3TC;if(r||i){const o=new AbortController;this._compressionAbortController=o;const n=this._descriptor.compressionHandle;n.increment();const s=this._descriptor.compressionCallback,l={data:await createImageBitmap(t,{imageOrientation:this.descriptor.flipped?"flipY":"none"}),width:t.width,height:t.height,premultiplyAlpha:this._descriptor.preMultiplyAlpha,hasMipmap:this._descriptor.hasMipmap,hasETC:!!r,hasS3TC:!!i};e.compressionWorkerHandle.invoke(l,this._compressionAbortController.signal).then((e=>{e&&this.isCompressing&&this.glName&&(this._descriptor.internalFormat=e.internalFormat,this._setData(e.compressedTexture),s?.()),o===this._compressionAbortController&&(this._compressionAbortController=null),n.decrement()})).catch((e=>{(0,a.zf)(e)||o!==this._compressionAbortController||(this._compressionAbortController=null),n.decrement()}))}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:o,depth:n,hasMipmap:a,target:s}=this._descriptor;const c=s===l.Ap.TEXTURE_3D;if(null==r||null==o||c&&null==n)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,o,n),a&&(1!==r||1!==o||c&&1!==n)&&!(i>=t);++i)r=Math.max(1,r>>1),o=Math.max(1,o>>1),c&&(n=Math.max(1,n>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,i=e.samplingMode;r===l.Cj.LINEAR_MIPMAP_NEAREST||r===l.Cj.LINEAR_MIPMAP_LINEAR?(r=l.Cj.LINEAR,e.hasMipmap||(i=l.Cj.LINEAR)):r!==l.Cj.NEAREST_MIPMAP_NEAREST&&r!==l.Cj.NEAREST_MIPMAP_LINEAR||(r=l.Cj.NEAREST,e.hasMipmap||(i=l.Cj.NEAREST)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,i)}_applyWrapMode(){const e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},22393:(e,t,r)=>{r.d(t,{c:()=>s});var i=r(31821);function o(e){e.code.add(i.H`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG) {
142
142
  return ((1.0 - NdotNG) * ambientGround + (1.0 + NdotNG) * ambientSky) * 0.5;
143
143
  }`),e.code.add(i.H`float integratedRadiance(float cosTheta2, float roughness) {
144
144
  return (cosTheta2 - 1.0) / (cosTheta2 * (1.0 - roughness * roughness) - 1.0);
@@ -235,7 +235,7 @@ return (diffuseComponent + specularComponent);
235
235
  // multiply or tint (or something invalid)
236
236
  return allMixed;
237
237
  }
238
- `)}},28421:(e,t,r)=>{r.d(t,{J:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"float",i.c.Draw,((r,i,o)=>r.setUniform1f(e,t(i,o))))}}},28491:(e,t,r)=>{r.d(t,{D:()=>V,b:()=>z});var i=r(91829),o=r(46686),n=r(32680),a=r(49255),s=r(76591),l=r(76597),c=r(60864),d=r(96336),u=r(71955),h=r(53466),m=r(92700),p=r(72824),f=r(35640),v=r(40261),g=r(77695),_=r(85417),T=r(89390),x=r(98619),E=r(62602),b=r(22393),A=r(59469),S=r(3800),M=r(96598),w=r(51406),C=r(42398),R=r(58614),I=r(27950),O=r(20693),N=r(33079),y=r(71988),P=r(20304),L=r(31821),D=r(63761),H=r(10906),F=r(46540),B=r(60517),U=r(14113),G=r(49788);function z(e){const t=new U.N5,{attributes:r,vertex:z,fragment:V,varyings:W}=t,{output:j,normalType:k,offsetBackfaces:$,instancedColor:q,spherical:Y,receiveShadows:X,snowCover:Z,pbrMode:J,textureAlphaPremultiplied:K,instancedDoublePrecision:Q,hasVertexColors:ee,hasVertexTangents:te,hasColorTexture:re,hasNormalTexture:ie,hasNormalTextureTransform:oe,hasColorTextureTransform:ne,hasBloom:ae}=e;if((0,O.NB)(z,e),r.add(F.r.POSITION,"vec3"),W.add("vpos","vec3",{invariant:!0}),t.include(C.A,e),t.include(c.B,e),t.include(f.G,e),t.include(w.q2,e),!(0,a.RN)(j))return t.include(v.E,e),t;t.include(w.Sx,e),t.include(w.MU,e),t.include(w.O1,e),t.include(w.QM,e),(0,O.yu)(z,e),t.include(d.Y,e),t.include(l.d,e);const se=k===d.W.Attribute||k===d.W.Compressed;return se&&$&&t.include(n.M),t.include(g.W,e),t.include(p.Mh,e),q&&t.attributes.add(F.r.INSTANCECOLOR,"vec4"),W.add("vPositionLocal","vec3"),t.include(h.U,e),t.include(o.oD,e),t.include(u.K,e),t.include(m.c,e),z.uniforms.add(new y.E("externalColor",(e=>"ignore"===e.colorMixMode?i.Un:e.externalColor))),W.add("vcolorExt","vec4"),t.include(M.Z,e),z.main.add(L.H`
238
+ `)}},28421:(e,t,r)=>{r.d(t,{J:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"float",i.c.Draw,((r,i,o)=>r.setUniform1f(e,t(i,o))))}}},28491:(e,t,r)=>{r.d(t,{D:()=>V,b:()=>z});var i=r(91829),o=r(46686),n=r(32680),a=r(49255),s=r(76591),l=r(76597),c=r(60864),d=r(96336),u=r(71955),h=r(53466),m=r(92700),p=r(72824),f=r(35640),v=r(40261),g=r(77695),_=r(85417),T=r(89390),x=r(98619),E=r(62602),b=r(22393),A=r(59469),S=r(3800),M=r(96598),w=r(51406),C=r(42398),R=r(58614),I=r(27950),O=r(20693),N=r(33079),y=r(71988),P=r(20304),L=r(31821),D=r(63761),H=r(10906),F=r(46540),B=r(60517),G=r(14113),U=r(49788);function z(e){const t=new G.N5,{attributes:r,vertex:z,fragment:V,varyings:W}=t,{output:j,normalType:k,offsetBackfaces:$,instancedColor:q,spherical:Y,receiveShadows:X,snowCover:Z,pbrMode:J,textureAlphaPremultiplied:K,instancedDoublePrecision:Q,hasVertexColors:ee,hasVertexTangents:te,hasColorTexture:re,hasNormalTexture:ie,hasNormalTextureTransform:oe,hasColorTextureTransform:ne,hasBloom:ae}=e;if((0,O.NB)(z,e),r.add(F.r.POSITION,"vec3"),W.add("vpos","vec3",{invariant:!0}),t.include(C.A,e),t.include(c.B,e),t.include(f.G,e),t.include(w.q2,e),!(0,a.RN)(j))return t.include(v.E,e),t;t.include(w.Sx,e),t.include(w.MU,e),t.include(w.O1,e),t.include(w.QM,e),(0,O.yu)(z,e),t.include(d.Y,e),t.include(l.d,e);const se=k===d.W.Attribute||k===d.W.Compressed;return se&&$&&t.include(n.M),t.include(g.W,e),t.include(p.Mh,e),q&&t.attributes.add(F.r.INSTANCECOLOR,"vec4"),W.add("vPositionLocal","vec3"),t.include(h.U,e),t.include(o.oD,e),t.include(u.K,e),t.include(m.c,e),z.uniforms.add(new y.E("externalColor",(e=>"ignore"===e.colorMixMode?i.Un:e.externalColor))),W.add("vcolorExt","vec4"),t.include(M.Z,e),z.main.add(L.H`
239
239
  forwardNormalizedVertexColor();
240
240
  vcolorExt = externalColor;
241
241
  ${(0,L.If)(q,"vcolorExt *= instanceColor * 0.003921568627451;")}
@@ -261,7 +261,7 @@ return (diffuseComponent + specularComponent);
261
261
  forwardOcclusionUV();
262
262
  forwardMetallicRoughnessUV();
263
263
 
264
- if (vcolorExt.a < ${L.H.float(G.Q)}) {
264
+ if (vcolorExt.a < ${L.H.float(U.Q)}) {
265
265
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
266
266
  }
267
267
  `),t.include(T.kA,e),V.include(_.n,e),t.include(R.S,e),t.include(Q?S.G:S.Bz,e),V.include(s.HQ,e),t.include(B.z,e),(0,O.yu)(V,e),V.uniforms.add(z.uniforms.get("localOrigin"),new N.t("ambient",(e=>e.ambient)),new N.t("diffuse",(e=>e.diffuse)),new P.m("opacity",(e=>e.opacity)),new P.m("layerOpacity",(e=>e.layerOpacity))),re&&V.uniforms.add(new D.N("tex",(e=>e.texture))),t.include(A._Z,e),V.include(b.c,e),V.include(I.N),t.include(E.r,e),V.include(H.b,e),(0,T.a8)(V),(0,T.eU)(V),(0,x.O4)(V),V.main.add(L.H`
@@ -303,7 +303,7 @@ return (diffuseComponent + specularComponent);
303
303
  vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:L.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
304
304
  vec4 finalColor = vec4(shadedColor, opacity_);
305
305
  outputColorHighlightOID(finalColor, vpos, albedo ${(0,L.If)(Z,", snow")});
306
- `),t}const V=Object.freeze(Object.defineProperty({__proto__:null,build:z},Symbol.toStringTag,{value:"Module"}))},29920:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(3694),o=r(38954),n=r(51850),a=r(620);class s{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._children=void 0,(0,a.vA)(e.length>=1),(0,a.vA)(3===r.size||4===r.size);const{data:i,size:s,indices:c}=r;(0,a.vA)(c.length%this._numIndexPerPrimitive==0),(0,a.vA)(c.length>=e.length*this._numIndexPerPrimitive);const d=e.length;let u=s*c[this._numIndexPerPrimitive*e[0]];l.clear(),l.push(u);const h=(0,n.fA)(i[u],i[u+1],i[u+2]),m=(0,n.o8)(h);for(let t=0;t<d;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){u=s*c[r+e],l.push(u);let t=i[u];h[0]=Math.min(t,h[0]),m[0]=Math.max(t,m[0]),t=i[u+1],h[1]=Math.min(t,h[1]),m[1]=Math.max(t,m[1]),t=i[u+2],h[2]=Math.min(t,h[2]),m[2]=Math.max(t,m[2])}}this.bbMin=h,this.bbMax=m;const p=(0,o.m)((0,n.vt)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(m[0]-h[0],m[1]-h[1]),m[2]-h[2]);let f=this.radius*this.radius;for(let e=0;e<l.length;++e){u=l.at(e);const t=i[u]-p[0],r=i[u+1]-p[1],o=i[u+2]-p[2],n=t*t+r*r+o*o;if(n<=f)continue;const a=Math.sqrt(n),s=.5*(a-this.radius);this.radius=this.radius+s,f=this.radius*this.radius;const c=s/a;p[0]+=t*c,p[1]+=r*c,p[2]+=o*c}this.center=p,l.clear()}getChildren(){if(this._children||(0,o.s)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,o.m)((0,n.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let e=0;e<8;++e)i[e]=0;const{data:a,size:l,indices:c}=this.position;for(let o=0;o<t;++o){let t=0;const n=this._numIndexPerPrimitive*this.primitiveIndices[o];let s=l*c[n],d=a[s],u=a[s+1],h=a[s+2];for(let e=1;e<this._numIndexPerPrimitive;++e){s=l*c[n+e];const t=a[s],r=a[s+1],i=a[s+2];t<d&&(d=t),r<u&&(u=r),i<h&&(h=i)}d<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),r[o]=t,++i[t]}let d=0;for(let e=0;e<8;++e)i[e]>0&&++d;if(d<2)return;const u=new Array(8);for(let e=0;e<8;++e)u[e]=i[e]>0?new Uint32Array(i[e]):void 0;for(let e=0;e<8;++e)i[e]=0;for(let e=0;e<t;++e){const t=r[e];u[t][i[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==u[e]&&this._children.push(new s(u[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){l.prune()}}const l=new i.A({deallocator:null})},31006:(e,t,r)=>{r.d(t,{g:()=>G}),r(44208);var i=r(49186),o=r(65529),n=r(97768),a=r(74887),s=r(34275),l=r(84952),c=r(38969),d=r(99677),u=r(56058),h=r(89192),m=r(2741);let p;var f=r(92993),v=r(63907),g=r(21231),_=r(42293);let T=null,x=null;async function E(){return null==x&&(p??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,m.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),x=p,T=await x),x}function b(e,t,r,i,o){const n=(0,_.IB)(t?v.CQ.COMPRESSED_RGBA8_ETC2_EAC:v.CQ.COMPRESSED_RGB8_ETC2),a=o&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*n*a)}function A(e){return e.getNumImages()>=1&&!e.isUASTC()}function S(e){return e.getFaces()>=1&&e.isETC1S()}function M(e,t,r,i,o,n,a,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[f.n.ETC2_RGBA,v.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[f.n.ETC1_RGB,v.CQ.COMPRESSED_RGB8_ETC2]:c?i?[f.n.BC3_RGBA,v.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[f.n.BC1_RGB,v.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[f.n.RGBA32,v.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(a(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?v.Cj.LINEAR_MIPMAP_LINEAR:v.Cj.LINEAR,t.width=o,t.height=n,new g.g(e,t,{type:"compressed",levels:m})}var w,C=r(24326);class R{constructor(){this.id=(0,C.c)()}}!function(e){e[e.Layer=0]="Layer",e[e.Texture=1]="Texture",e[e.COUNT=2]="COUNT"}(w||(w={}));var I=r(53966);const O=()=>I.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function N(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const y=N("DXT1"),P=N("DXT3"),L=N("DXT5");function D(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function H(e,{maxPreferredTextureSize:t,maxTextureSize:r}){const i=Math.max(e.width,e.height),o=e.width*e.height,n=t*t;if(i<=r&&o<=n)return e;const a=Math.min(Math.sqrt(n/o),r/i);return F(e,D(Math.round(e.width*a),r),D(Math.round(e.height*a),r))}function F(e,t,r){if(e instanceof ImageData)return F(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const o=document.createElement("canvas");return o.width=t,o.height=r,o.getContext("2d").drawImage(e,0,0,o.width,o.height),o}var B=r(620),U=r(67171);class G extends R{constructor(e,t){super(),this._data=e,this.type=w.Texture,this.events=new o.A,this._parameters={...V,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,l.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=e.paused;if(e.src=e.src,t&&e.autoplay){const t=[];(0,c.i)(e,(e=>t.push(e))).then((()=>{e.play()})).finally((()=>t.forEach((e=>e.remove()))))}}}_startPreloadImageElement(e){(0,l.DB)(e.src)||(0,l.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new U.R;return t.wrapMode=this._parameters.wrap??v.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?v.Cj.LINEAR_MIPMAP_LINEAR:v.Cj.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture??this._emptyTexture}get loaded(){return null!=this._glTexture}get usedMemory(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return t.encoding===h.JS.KTX2_ENCODING?function(e,t){if(null==T)return e.byteLength;const r=new T.KTX2File(new Uint8Array(e)),i=S(r)?b(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===h.JS.BASIS_ENCODING?function(e,t){if(null==T)return e.byteLength;const r=new T.BasisFile(new Uint8Array(e)),i=A(r)?b(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?z(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._glTexture)return this._glTexture;const t=this._data;return null==t?(this._glTexture=new g.g(e,this._createDescriptor(e),null),this._glTexture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,s.mg)(t)&&this._parameters.encoding===h.JS.DDS_ENCODING?this._loadFromDDSData(e,t):(0,s.mw)(t)&&this._parameters.encoding===h.JS.DDS_ENCODING?this._loadFromDDSData(e,new Uint8Array(t)):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===h.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===h.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,s.mg)(t)?this._loadFromPixelData(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_update(e,t){return null==this._glTexture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return O().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return O().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let o,n;switch(i){case y:o=8,n=v.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case P:o=16,n=v.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case L:o=16,n=v.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return O().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],l=r[3];(3&s||3&l)&&(O().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=e.byteOffset+r[1]+4;const p=[];for(let t=0;t<a;++t)h=(s+3>>2)*(l+3>>2)*o,u=new Uint8Array(e.buffer,m,h),p.push(u),m+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:p},internalFormat:n,width:c,height:d}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:o,internalFormat:n,width:a,height:s}=i;return t.samplingMode=o.levels.length>1?v.Cj.LINEAR_MIPMAP_LINEAR:v.Cj.LINEAR,t.hasMipmap=o.levels.length>1,t.internalFormat=n,t.width=a,t.height=s,new g.g(e,t,o)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==T&&(T=await E());const i=new T.KTX2File(new Uint8Array(r));if(!S(i))return null;i.startTranscoding();const o=M(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==T&&(T=await E());const i=new T.BasisFile(new Uint8Array(r));if(!A(i))return null;i.startTranscoding();const o=M(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,B.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?v.Ab.LUMINANCE:3===this._parameters.components?v.Ab.RGB:v.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new g.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await(0,d.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,u.Sx)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((o,s)=>{const l=()=>{t.removeEventListener("loadeddata",c),t.removeEventListener("error",d),(0,n.xt)(u)},c=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(l(),o(this._loadFromImage(e,t)))},d=e=>{l(),s(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",c),t.addEventListener("error",d);const u=(0,a.u7)(r,(()=>d((0,a.NK)())))}))))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=H(r,e.parameters));const i=z(r);this._parameters.width=i.width,this._parameters.height=i.height;const o=this._createDescriptor(e);return o.pixelFormat=3===this._parameters.components?v.Ab.RGB:v.Ab.RGBA,o.width=i.width,o.height=i.height,o.compressionHandle=this._parameters.compressionHandle,o.compressionCallback=this._parameters.compressionCallback,this._glTexture=new g.g(e,o,r),this._emptyTexture=null,this.events.emit("loaded"),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._glTexture=(0,n.WD)(this._glTexture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function z(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const V={wrap:{s:v.pF.REPEAT,t:v.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},32680:(e,t,r)=>{r.d(t,{M:()=>o});var i=r(31821);function o(e){e.vertex.code.add(i.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
306
+ `),t}const V=Object.freeze(Object.defineProperty({__proto__:null,build:z},Symbol.toStringTag,{value:"Module"}))},29920:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(3694),o=r(38954),n=r(51850),a=r(620);class s{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._children=void 0,(0,a.vA)(e.length>=1),(0,a.vA)(3===r.size||4===r.size);const{data:i,size:s,indices:c}=r;(0,a.vA)(c.length%this._numIndexPerPrimitive==0),(0,a.vA)(c.length>=e.length*this._numIndexPerPrimitive);const d=e.length;let u=s*c[this._numIndexPerPrimitive*e[0]];l.clear(),l.push(u);const h=(0,n.fA)(i[u],i[u+1],i[u+2]),m=(0,n.o8)(h);for(let t=0;t<d;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){u=s*c[r+e],l.push(u);let t=i[u];h[0]=Math.min(t,h[0]),m[0]=Math.max(t,m[0]),t=i[u+1],h[1]=Math.min(t,h[1]),m[1]=Math.max(t,m[1]),t=i[u+2],h[2]=Math.min(t,h[2]),m[2]=Math.max(t,m[2])}}this.bbMin=h,this.bbMax=m;const p=(0,o.m)((0,n.vt)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(m[0]-h[0],m[1]-h[1]),m[2]-h[2]);let f=this.radius*this.radius;for(let e=0;e<l.length;++e){u=l.at(e);const t=i[u]-p[0],r=i[u+1]-p[1],o=i[u+2]-p[2],n=t*t+r*r+o*o;if(n<=f)continue;const a=Math.sqrt(n),s=.5*(a-this.radius);this.radius=this.radius+s,f=this.radius*this.radius;const c=s/a;p[0]+=t*c,p[1]+=r*c,p[2]+=o*c}this.center=p,l.clear()}getChildren(){if(this._children||(0,o.s)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,o.m)((0,n.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let e=0;e<8;++e)i[e]=0;const{data:a,size:l,indices:c}=this.position;for(let o=0;o<t;++o){let t=0;const n=this._numIndexPerPrimitive*this.primitiveIndices[o];let s=l*c[n],d=a[s],u=a[s+1],h=a[s+2];for(let e=1;e<this._numIndexPerPrimitive;++e){s=l*c[n+e];const t=a[s],r=a[s+1],i=a[s+2];t<d&&(d=t),r<u&&(u=r),i<h&&(h=i)}d<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),r[o]=t,++i[t]}let d=0;for(let e=0;e<8;++e)i[e]>0&&++d;if(d<2)return;const u=new Array(8);for(let e=0;e<8;++e)u[e]=i[e]>0?new Uint32Array(i[e]):void 0;for(let e=0;e<8;++e)i[e]=0;for(let e=0;e<t;++e){const t=r[e];u[t][i[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==u[e]&&this._children.push(new s(u[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){l.prune()}}const l=new i.A({deallocator:null})},32680:(e,t,r)=>{r.d(t,{M:()=>o});var i=r(31821);function o(e){e.vertex.code.add(i.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
307
307
  vec3 camToVert = posWorld - camPosWorld;
308
308
  bool isBackface = dot(camToVert, normalWorld) > 0.0;
309
309
  if (isBackface) {
@@ -499,7 +499,7 @@ outputHighlight(isHighlightOccluded());
499
499
  return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
500
500
  }`)}function d(e,t){const{vertex:r}=e;switch(t.output){case i.V.Color:case i.V.ColorEmission:if(t.receiveShadows)return s(e),void r.code.add(a.H`void forwardLinearDepth() { linearDepth = gl_Position.w; }`);break;case i.V.Shadow:case i.V.ShadowHighlight:case i.V.ShadowExcludeHighlight:case i.V.ViewshedShadow:return e.include(o.em,t),s(e),l(e),c(e),void r.code.add(a.H`void forwardLinearDepth() {
501
501
  linearDepth = calculateLinearDepth(nearFar, vPosition_view.z);
502
- }`)}r.code.add(a.H`void forwardLinearDepth() {}`)}},47286:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"vec2",i.c.Pass,((r,i,o)=>r.setUniform2fv(e,t(i,o))))}}},49788:(e,t,r)=>{r.d(t,{Q:()=>i});const i=1/255.5},51406:(e,t,r)=>{r.d(t,{MU:()=>c,O1:()=>d,QM:()=>u,Sx:()=>l,q2:()=>s});var i=r(29242),o=r(53466),n=r(31821),a=r(35644);function s(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new a.k("colorTextureTransformMatrix",(e=>e.colorTextureTransformMatrix??i.zK))).code.add(n.H`void forwardColorUV(){
502
+ }`)}r.code.add(a.H`void forwardLinearDepth() {}`)}},47286:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(69270),o=r(74333);class n extends o.n{constructor(e,t){super(e,"vec2",i.c.Pass,((r,i,o)=>r.setUniform2fv(e,t(i,o))))}}},48833:(e,t,r)=>{r.d(t,{g:()=>B}),r(44208);var i=r(49186),o=r(65529),n=r(97768),a=r(74887),s=r(34275),l=r(24326),c=r(84952),d=r(38969),u=r(99677),h=r(56058),m=r(89192),p=r(2741);let f;var v=r(92993),g=r(63907),_=r(21231),T=r(42293);let x=null,E=null;async function b(){return null==E&&(f??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,p.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),E=f,x=await E),E}function A(e,t,r,i,o){const n=(0,T.IB)(t?g.CQ.COMPRESSED_RGBA8_ETC2_EAC:g.CQ.COMPRESSED_RGB8_ETC2),a=o&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*n*a)}function S(e){return e.getNumImages()>=1&&!e.isUASTC()}function M(e){return e.getFaces()>=1&&e.isETC1S()}function w(e,t,r,i,o,n,a,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[v.n.ETC2_RGBA,g.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[v.n.ETC1_RGB,g.CQ.COMPRESSED_RGB8_ETC2]:c?i?[v.n.BC3_RGBA,g.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[v.n.BC1_RGB,g.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[v.n.RGBA32,g.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(a(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?g.Cj.LINEAR_MIPMAP_LINEAR:g.Cj.LINEAR,t.width=o,t.height=n,new _.g(e,t,{type:"compressed",levels:m})}var C=r(53966);const R=()=>C.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function I(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const O=I("DXT1"),N=I("DXT3"),y=I("DXT5");function P(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function L(e,{maxPreferredTextureSize:t,maxTextureSize:r}){const i=Math.max(e.width,e.height),o=e.width*e.height,n=t*t;if(i<=r&&o<=n)return e;const a=Math.min(Math.sqrt(n/o),r/i);return D(e,P(Math.round(e.width*a),r),P(Math.round(e.height*a),r))}function D(e,t,r){if(e instanceof ImageData)return D(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const o=document.createElement("canvas");return o.width=t,o.height=r,o.getContext("2d").drawImage(e,0,0,o.width,o.height),o}var H=r(620),F=r(67171);class B{constructor(e,t){this._data=e,this.id=(0,l.c)(),this.events=new o.A,this._parameters={...U,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=e.paused;if(e.src=e.src,t&&e.autoplay){const t=[];(0,d.i)(e,(e=>t.push(e))).then((()=>{e.play()})).finally((()=>t.forEach((e=>e.remove()))))}}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new F.R;return t.wrapMode=this._parameters.wrap??g.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?g.Cj.LINEAR_MIPMAP_LINEAR:g.Cj.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture??this._emptyTexture}get loaded(){return null!=this._glTexture}get usedMemory(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return t.encoding===m.JS.KTX2_ENCODING?function(e,t){if(null==x)return e.byteLength;const r=new x.KTX2File(new Uint8Array(e)),i=M(r)?A(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===m.JS.BASIS_ENCODING?function(e,t){if(null==x)return e.byteLength;const r=new x.BasisFile(new Uint8Array(e)),i=S(r)?A(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?G(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._glTexture)return this._glTexture;const t=this._data;return null==t?(this._glTexture=new _.g(e,this._createDescriptor(e),null),this._glTexture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,s.mg)(t)&&this._parameters.encoding===m.JS.DDS_ENCODING?this._loadFromDDSData(e,t):(0,s.mw)(t)&&this._parameters.encoding===m.JS.DDS_ENCODING?this._loadFromDDSData(e,new Uint8Array(t)):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===m.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===m.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,s.mg)(t)?this._loadFromPixelData(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_update(e,t){return null==this._glTexture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return R().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return R().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let o,n;switch(i){case O:o=8,n=g.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case N:o=16,n=g.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case y:o=16,n=g.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return R().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],l=r[3];(3&s||3&l)&&(R().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=e.byteOffset+r[1]+4;const p=[];for(let t=0;t<a;++t)h=(s+3>>2)*(l+3>>2)*o,u=new Uint8Array(e.buffer,m,h),p.push(u),m+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:p},internalFormat:n,width:c,height:d}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:o,internalFormat:n,width:a,height:s}=i;return t.samplingMode=o.levels.length>1?g.Cj.LINEAR_MIPMAP_LINEAR:g.Cj.LINEAR,t.hasMipmap=o.levels.length>1,t.internalFormat=n,t.width=a,t.height=s,new _.g(e,t,o)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==x&&(x=await b());const i=new x.KTX2File(new Uint8Array(r));if(!M(i))return null;i.startTranscoding();const o=w(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==x&&(x=await b());const i=new x.BasisFile(new Uint8Array(r));if(!S(i))return null;i.startTranscoding();const o=w(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,H.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?g.Ab.LUMINANCE:3===this._parameters.components?g.Ab.RGB:g.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new _.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await(0,u.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,h.Sx)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((o,s)=>{const l=()=>{t.removeEventListener("loadeddata",c),t.removeEventListener("error",d),(0,n.xt)(u)},c=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(l(),o(this._loadFromImage(e,t)))},d=e=>{l(),s(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",c),t.addEventListener("error",d);const u=(0,a.u7)(r,(()=>d((0,a.NK)())))}))))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=L(r,e.parameters));const i=G(r);this._parameters.width=i.width,this._parameters.height=i.height;const o=this._createDescriptor(e);return o.pixelFormat=3===this._parameters.components?g.Ab.RGB:g.Ab.RGBA,o.width=i.width,o.height=i.height,o.compressionHandle=this._parameters.compressionHandle,o.compressionCallback=this._parameters.compressionCallback,this._glTexture=new _.g(e,o,r),this._emptyTexture=null,this.events.emit("loaded"),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._glTexture=(0,n.WD)(this._glTexture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function G(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const U={wrap:{s:g.pF.REPEAT,t:g.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},49788:(e,t,r)=>{r.d(t,{Q:()=>i});const i=1/255.5},51406:(e,t,r)=>{r.d(t,{MU:()=>c,O1:()=>d,QM:()=>u,Sx:()=>l,q2:()=>s});var i=r(29242),o=r(53466),n=r(31821),a=r(35644);function s(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new a.k("colorTextureTransformMatrix",(e=>e.colorTextureTransformMatrix??i.zK))).code.add(n.H`void forwardColorUV(){
503
503
  colorUV = (colorTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
504
504
  }`)):e.vertex.code.add(n.H`void forwardColorUV(){}`)}function l(e,t){t.hasNormalTextureTransform&&t.textureCoordinateType!==o.I.None?(e.varyings.add("normalUV","vec2"),e.vertex.uniforms.add(new a.k("normalTextureTransformMatrix",(e=>e.normalTextureTransformMatrix??i.zK))).code.add(n.H`void forwardNormalUV(){
505
505
  normalUV = (normalTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
@@ -542,10 +542,10 @@ return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScal
542
542
  }`)}function l(e){e.uniforms.add(new n.t("screenSizePerspective",(e=>d(e.screenSizePerspective))))}function c(e){e.uniforms.add(new n.t("screenSizePerspectiveAlignment",(e=>d(e.screenSizePerspectiveAlignment||e.screenSizePerspective))))}function d(e){return(0,i.i)(u,e.parameters.divisor,e.parameters.offset,e.minScaleFactor)}const u=(0,o.vt)()},53466:(e,t,r)=>{r.d(t,{I:()=>i,U:()=>l});var i,o,n=r(21818),a=r(31821),s=r(46540);function l(e,t){switch(t.textureCoordinateType){case i.Default:return e.attributes.add(s.r.UV0,"vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(a.H`void forwardTextureCoordinates() { vuv0 = uv0; }`);case i.Atlas:return e.attributes.add(s.r.UV0,"vec2"),e.attributes.add(s.r.UVREGION,"vec4"),e.varyings.add("vuv0","vec2"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(a.H`void forwardTextureCoordinates() {
543
543
  vuv0 = uv0;
544
544
  vuvRegion = uvRegion;
545
- }`);default:(0,n.Xb)(t.textureCoordinateType);case i.None:return void e.vertex.code.add(a.H`void forwardTextureCoordinates() {}`);case i.COUNT:return}}(o=i||(i={}))[o.None=0]="None",o[o.Default=1]="Default",o[o.Atlas=2]="Atlas",o[o.COUNT=3]="COUNT"},57323:(e,t,r)=>{r.d(t,{R:()=>H,b:()=>D});var i=r(46686),o=r(32680),n=r(49255),a=r(76591),s=r(76597),l=r(60864),c=r(96336),d=r(71955),u=r(53466),h=r(92700),m=r(35640),p=r(40261),f=r(85417),v=r(89390),g=r(98619),_=r(22393),T=r(59469),x=r(3800),E=r(96598),b=r(42398),A=r(58614),S=r(27950),M=r(20693),w=r(33079),C=r(71988),R=r(20304),I=r(31821),O=r(63761),N=r(46540),y=r(60517),P=r(14113),L=r(49788);function D(e){const t=new P.N5,{attributes:r,vertex:D,fragment:H,varyings:F}=t,{output:B,offsetBackfaces:U,instancedColor:G,pbrMode:z,snowCover:V,spherical:W,hasBloom:j}=e,k=z===T.A9.Normal||z===T.A9.Schematic;if((0,M.NB)(D,e),r.add(N.r.POSITION,"vec3"),F.add("vpos","vec3",{invariant:!0}),t.include(b.A,e),t.include(l.B,e),t.include(m.G,e),t.include(E.Z,e),(0,n.RN)(B)&&((0,M.yu)(t.vertex,e),t.include(c.Y,e),t.include(s.d,e),U&&t.include(o.M),G&&t.attributes.add(N.r.INSTANCECOLOR,"vec4"),F.add("vNormalWorld","vec3"),F.add("localvpos","vec3",{invariant:!0}),t.include(u.U,e),t.include(i.oD,e),t.include(d.K,e),t.include(h.c,e),D.uniforms.add(new C.E("externalColor",(e=>e.externalColor))),F.add("vcolorExt","vec4"),D.main.add(I.H`
545
+ }`);default:(0,n.Xb)(t.textureCoordinateType);case i.None:return void e.vertex.code.add(a.H`void forwardTextureCoordinates() {}`);case i.COUNT:return}}(o=i||(i={}))[o.None=0]="None",o[o.Default=1]="Default",o[o.Atlas=2]="Atlas",o[o.COUNT=3]="COUNT"},57323:(e,t,r)=>{r.d(t,{R:()=>H,b:()=>D});var i=r(46686),o=r(32680),n=r(49255),a=r(76591),s=r(76597),l=r(60864),c=r(96336),d=r(71955),u=r(53466),h=r(92700),m=r(35640),p=r(40261),f=r(85417),v=r(89390),g=r(98619),_=r(22393),T=r(59469),x=r(3800),E=r(96598),b=r(42398),A=r(58614),S=r(27950),M=r(20693),w=r(33079),C=r(71988),R=r(20304),I=r(31821),O=r(63761),N=r(46540),y=r(60517),P=r(14113),L=r(49788);function D(e){const t=new P.N5,{attributes:r,vertex:D,fragment:H,varyings:F}=t,{output:B,offsetBackfaces:G,instancedColor:U,pbrMode:z,snowCover:V,spherical:W,hasBloom:j}=e,k=z===T.A9.Normal||z===T.A9.Schematic;if((0,M.NB)(D,e),r.add(N.r.POSITION,"vec3"),F.add("vpos","vec3",{invariant:!0}),t.include(b.A,e),t.include(l.B,e),t.include(m.G,e),t.include(E.Z,e),(0,n.RN)(B)&&((0,M.yu)(t.vertex,e),t.include(c.Y,e),t.include(s.d,e),G&&t.include(o.M),U&&t.attributes.add(N.r.INSTANCECOLOR,"vec4"),F.add("vNormalWorld","vec3"),F.add("localvpos","vec3",{invariant:!0}),t.include(u.U,e),t.include(i.oD,e),t.include(d.K,e),t.include(h.c,e),D.uniforms.add(new C.E("externalColor",(e=>e.externalColor))),F.add("vcolorExt","vec4"),D.main.add(I.H`
546
546
  forwardNormalizedVertexColor();
547
547
  vcolorExt = externalColor;
548
- ${(0,I.If)(G,"vcolorExt *= instanceColor * 0.003921568627451;")}
548
+ ${(0,I.If)(U,"vcolorExt *= instanceColor * 0.003921568627451;")}
549
549
  vcolorExt *= vvColor();
550
550
  vcolorExt *= getSymbolColor();
551
551
  forwardColorMixMode();
@@ -563,7 +563,7 @@ vuvRegion = uvRegion;
563
563
  forwardTextureCoordinates();
564
564
 
565
565
  gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
566
- ${(0,I.If)(U,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
566
+ ${(0,I.If)(G,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
567
567
  `)),(0,n.RN)(B)){const{hasColorTexture:r,hasColorTextureTransform:i,receiveShadows:o}=e;t.include(v.kA,e),H.include(f.n,e),t.include(A.S,e),t.include(e.instancedDoublePrecision?x.G:x.Bz,e),H.include(a.HQ,e),t.include(y.z,e),(0,M.yu)(H,e),(0,g.Gc)(H),(0,v.a8)(H),(0,v.eU)(H),H.uniforms.add(D.uniforms.get("localOrigin"),D.uniforms.get("view"),new w.t("ambient",(e=>e.ambient)),new w.t("diffuse",(e=>e.diffuse)),new R.m("opacity",(e=>e.opacity)),new R.m("layerOpacity",(e=>e.layerOpacity))),r&&H.uniforms.add(new O.N("tex",(e=>e.texture))),t.include(T._Z,e),H.include(_.c,e),H.include(S.N),(0,g.O4)(H),H.main.add(I.H`
568
568
  discardBySlice(vpos);
569
569
  discardByTerrainDepth();
@@ -792,14 +792,14 @@ return dot(rgba, RGBA4_2_FLOAT_FACTORS);
792
792
  }`)}},82048:(e,t,r)=>{r.d(t,{c:()=>n});var i=r(31821),o=r(46540);function n(e,t=!0){e.attributes.add(o.r.POSITION,"vec2"),t&&e.varyings.add("uv","vec2"),e.vertex.main.add(i.H`
793
793
  gl_Position = vec4(position, 0.0, 1.0);
794
794
  ${t?i.H`uv = position * 0.5 + vec2(0.5);`:""}
795
- `)}},85417:(e,t,r)=>{r.d(t,{n:()=>te});var i,o,n,a=r(31821),s=r(12791),l=r(90237),c=r(34727),d=r(97768),u=r(36708),h=r(78659),m=r(10107),p=(r(44208),r(53966),r(87811),r(40608)),f=r(37585);r(9093),r(48353),r(9762),(n=i||(i={})).OPAQUE="opaque-color",n.TRANSPARENT="transparent-color",n.COMPOSITE="composite-color",n.FINAL="final-color",function(e){e.SSAO="ssao",e.LASERLINES="laserline-color",e.ANTIALIASING="aa-color",e.HIGHLIGHTS="highlight-color",e.MAGNIFIER="magnifier-color",e.OCCLUDED="occluded-color",e.VIEWSHED="viewshed-color",e.OPAQUE_ENVIRONMENT="opaque-environment-color",e.TRANSPARENT_ENVIRONMENT="transparent-environment-color",e.FOCUSAREA="focusarea",e.FOCUSAREA_COLOR="focusarea-color"}(o||(o={}));var v=r(69622),g=r(49186),_=r(89192);let T=class extends v.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=i.COMPOSITE,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([(0,u.wB)((()=>this.view.ready),(e=>{e&&this.view.stage?.renderer.addRenderNode(this)}),u.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new g.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return t.fbo?.initializeAndBind(),t}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){e===_.C7.UPDATE&&this.view.stage?.renderView.requestRender(e),this._dirty=!0}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find((({name:e})=>e===this.produces));try{return this.render(e)}finally{this._frameBuffer=null}}};(0,l._)([(0,m.MZ)({constructOnly:!0})],T.prototype,"view",void 0),(0,l._)([(0,m.MZ)({constructOnly:!0})],T.prototype,"consumes",void 0),(0,l._)([(0,m.MZ)()],T.prototype,"produces",void 0),(0,l._)([(0,m.MZ)({readOnly:!0})],T.prototype,"techniques",null),T=(0,l._)([(0,p.$)("esri.views.3d.webgl.RenderNode")],T);const x=T;var E=r(63907);r(42293);var b,A,S,M,w=r(67171),C=r(12541);(M=b||(b={}))[M.R8UNORM=0]="R8UNORM",M[M.R8UINT=1]="R8UINT",M[M.RG8UNORM=2]="RG8UNORM",M[M.RG8UINT=3]="RG8UINT",M[M.RGBA4UNORM=4]="RGBA4UNORM",M[M.RGBA8UNORM=5]="RGBA8UNORM",M[M.RGBA8UNORM_MIPMAP=6]="RGBA8UNORM_MIPMAP",M[M.R16FLOAT=7]="R16FLOAT",M[M.RGBA16FLOAT=8]="RGBA16FLOAT",M[M.R32FLOAT=9]="R32FLOAT",M[M.COUNT=10]="COUNT",function(e){e[e.DEPTH16=10]="DEPTH16",e[e.COUNT=11]="COUNT"}(A||(A={})),function(e){e[e.DEPTH24_STENCIL8=11]="DEPTH24_STENCIL8"}(S||(S={}));const R=new w.R;R.pixelFormat=E.Ab.RED,R.internalFormat=E.H0.R8,R.wrapMode=E.pF.CLAMP_TO_EDGE;const I=new w.R;I.pixelFormat=E.Ab.RED_INTEGER,I.internalFormat=E.H0.R8UI,I.wrapMode=E.pF.CLAMP_TO_EDGE,I.samplingMode=E.Cj.NEAREST;const O=new w.R;O.pixelFormat=E.Ab.RG,O.internalFormat=E.H0.RG8,O.wrapMode=E.pF.CLAMP_TO_EDGE;const N=new w.R;N.pixelFormat=E.Ab.RG_INTEGER,N.internalFormat=E.H0.RG8UI,N.wrapMode=E.pF.CLAMP_TO_EDGE,N.samplingMode=E.Cj.NEAREST;const y=new w.R;y.internalFormat=E.H0.RGBA4,y.dataType=E.ld.UNSIGNED_SHORT_4_4_4_4,y.wrapMode=E.pF.CLAMP_TO_EDGE;(new w.R).wrapMode=E.pF.CLAMP_TO_EDGE;const P=new w.R;P.wrapMode=E.pF.CLAMP_TO_EDGE,P.samplingMode=E.Cj.LINEAR_MIPMAP_LINEAR,P.hasMipmap=!0,P.maxAnisotropy=8;const L=new w.R;L.pixelFormat=E.Ab.RED,L.dataType=E.ld.HALF_FLOAT,L.internalFormat=E.H0.R16F,L.samplingMode=E.Cj.NEAREST;const D=new w.R;D.dataType=E.ld.HALF_FLOAT,D.internalFormat=E.H0.RGBA16F,D.wrapMode=E.pF.CLAMP_TO_EDGE;const H=new w.R;H.pixelFormat=E.Ab.RED,H.dataType=E.ld.FLOAT,H.internalFormat=E.H0.R32F,H.samplingMode=E.Cj.NEAREST,b.R8UNORM,b.R8UINT,b.RG8UNORM,b.RG8UINT,b.RGBA4UNORM,b.RGBA8UNORM,b.RGBA8UNORM_MIPMAP,b.R16FLOAT,b.RGBA16FLOAT,b.R32FLOAT,b.COUNT;const F={[E.SB.DEPTH_COMPONENT16]:E.ld.UNSIGNED_SHORT,[E.SB.DEPTH_COMPONENT24]:E.ld.UNSIGNED_INT,[E.SB.DEPTH_COMPONENT32F]:E.ld.FLOAT,[E.iE.DEPTH24_STENCIL8]:E.ld.UNSIGNED_INT_24_8,[E.iE.DEPTH32F_STENCIL8]:E.ld.FLOAT_32_UNSIGNED_INT_24_8_REV};A.DEPTH16,new class{constructor(e,t=0,r=t){this.internalFormat=e,this.width=t,this.height=r,this.multisampled=!1,this.samples=1}}(E.SB.DEPTH_COMPONENT16),A.COUNT,S.DEPTH24_STENCIL8,function(e){const t=new w.R;t.pixelFormat=(0,C.CR)(e)?E.j7.DEPTH_COMPONENT:E.j7.DEPTH_STENCIL,t.dataType=F[e],t.samplingMode=E.Cj.NEAREST,t.wrapMode=E.pF.CLAMP_TO_EDGE,t.internalFormat=e,t.hasMipmap=!1,t.isImmutable=!0}(E.iE.DEPTH24_STENCIL8);var B=r(97220),U=r(98958),G=r(95774),z=r(90644);class V extends U.w{constructor(e,t){super(e,t,new B.$(G.S,(()=>r.e(9384).then(r.bind(r,59384)))))}initializePipeline(){return(0,z.Ey)({colorWrite:z.kn})}}var W=r(48163),j=r(65786);class k extends j.Y{constructor(){super(...arguments),this.projScale=1}}class $ extends k{constructor(){super(...arguments),this.intensity=1}}class q extends j.Y{}class Y extends q{constructor(){super(...arguments),this.blurSize=(0,W.vt)()}}var X=r(15581);class Z extends U.w{constructor(e,t){super(e,t,new B.$(X.S,(()=>r.e(191).then(r.bind(r,90191)))))}initializePipeline(){return(0,z.Ey)({colorWrite:z.kn})}}var J=r(21231);const K=2;let Q=class extends x{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=o.SSAO,this.isEnabled=()=>!1,this._enableTime=(0,h.l5)(0),this._passParameters=new $,this._drawParameters=new Y}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),(e=>e.charCodeAt(0))),t=new w.R;t.wrapMode=E.pF.CLAMP_TO_EDGE,t.pixelFormat=E.Ab.RGB,t.wrapMode=E.pF.REPEAT,t.hasMipmap=!0,t.width=32,t.height=32,this._passParameters.noiseTexture=new J.g(this.renderingContext,t,e),this.techniques.precompile(Z),this.techniques.precompile(V),this.addHandles((0,u.wB)((()=>this.isEnabled()),(()=>this._enableTime=(0,h.l5)(0))))}destroy(){this._passParameters.noiseTexture=(0,d.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find((({name:e})=>"normals"===e)),r=t?.getTexture(),i=t?.getTexture(E.nI);if(!r||!i)return;const n=this.techniques.get(Z),a=this.techniques.get(V);if(!n.compiled||!a.compiled)return this._enableTime=(0,h.l5)(performance.now()),void this.requestRender(_.C7.UPDATE);0===this._enableTime&&(this._enableTime=(0,h.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,d=this.bindParameters,u=d.camera,m=u.relativeElevation,p=(0,c.qE)((5e5-m)/2e5,0,1),v=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,g=v*p;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/u.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*ee/(0,X.g)(u)**6*g;const T=u.fullViewport[2],x=u.fullViewport[3],A=this.fboCache.acquire(T,x,"ssao input",b.RG8UNORM);s.bindFramebuffer(A.fbo),s.setViewport(0,0,T,x),s.bindTechnique(n,d,this._passParameters,this._drawParameters),s.screen.draw();const S=Math.round(T/K),M=Math.round(x/K),w=this.fboCache.acquire(S,M,"ssao blur",b.R8UNORM);s.bindFramebuffer(w.fbo),this._drawParameters.colorTexture=A.getTexture(),(0,f.hZ)(this._drawParameters.blurSize,0,K/x),s.bindTechnique(a,d,this._passParameters,this._drawParameters),s.setViewport(0,0,S,M),s.screen.draw(),A.release();const C=this.fboCache.acquire(S,M,o.SSAO,b.R8UNORM);return s.bindFramebuffer(C.fbo),s.setViewport(0,0,T,x),s.setClearColor(1,1,1,0),s.clear(E.NV.COLOR),this._drawParameters.colorTexture=w.getTexture(),(0,f.hZ)(this._drawParameters.blurSize,K/T,0),s.bindTechnique(a,d,this._passParameters,this._drawParameters),s.setViewport(0,0,S,M),s.screen.draw(),s.setViewport4fv(u.fullViewport),w.release(),v<1&&this.requestRender(_.C7.UPDATE),C}};(0,l._)([(0,m.MZ)()],Q.prototype,"consumes",void 0),(0,l._)([(0,m.MZ)()],Q.prototype,"produces",void 0),(0,l._)([(0,m.MZ)({constructOnly:!0})],Q.prototype,"isEnabled",void 0),Q=(0,l._)([(0,p.$)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],Q);const ee=.5;function te(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new s.x("ssaoTex",(e=>e.ssao?.getTexture()))),e.constants.add("blurSizePixelsInverse","float",1/K),e.code.add(a.H`float evaluateAmbientOcclusionInverse() {
795
+ `)}},85417:(e,t,r)=>{r.d(t,{n:()=>te});var i,o,n,a=r(31821),s=r(12791),l=r(90237),c=r(34727),d=r(97768),u=r(36708),h=r(78659),m=r(10107),p=(r(44208),r(53966),r(87811),r(40608)),f=r(37585);r(9093),r(48353),r(9762),(n=i||(i={})).OPAQUE="opaque-color",n.TRANSPARENT="transparent-color",n.COMPOSITE="composite-color",n.FINAL="final-color",function(e){e.SSAO="ssao",e.LASERLINES="laserline-color",e.ANTIALIASING="aa-color",e.HIGHLIGHTS="highlight-color",e.MAGNIFIER="magnifier-color",e.OCCLUDED="occluded-color",e.VIEWSHED="viewshed-color",e.OPAQUE_ENVIRONMENT="opaque-environment-color",e.TRANSPARENT_ENVIRONMENT="transparent-environment-color",e.FOCUSAREA="focusarea",e.FOCUSAREA_COLOR="focusarea-color"}(o||(o={}));var v=r(69622),g=r(49186),_=r(89192);let T=class extends v.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=i.COMPOSITE,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([(0,u.wB)((()=>this.view.ready),(e=>{e&&this.view.stage?.renderer.addRenderNode(this)}),u.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new g.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return t.fbo?.initializeAndBind(),t}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){e===_.C7.UPDATE&&this.view.stage?.renderView.requestRender(e),this._dirty=!0}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find((({name:e})=>e===this.produces));try{return this.render(e)}finally{this._frameBuffer=null}}};(0,l._)([(0,m.MZ)({constructOnly:!0})],T.prototype,"view",void 0),(0,l._)([(0,m.MZ)({constructOnly:!0})],T.prototype,"consumes",void 0),(0,l._)([(0,m.MZ)()],T.prototype,"produces",void 0),(0,l._)([(0,m.MZ)({readOnly:!0})],T.prototype,"techniques",null),T=(0,l._)([(0,p.$)("esri.views.3d.webgl.RenderNode")],T);const x=T;var E=r(63907);r(42293);var b,A,S,M,w=r(67171),C=r(12541);(M=b||(b={}))[M.R8UNORM=0]="R8UNORM",M[M.R8UINT=1]="R8UINT",M[M.RG8UNORM=2]="RG8UNORM",M[M.RG8UINT=3]="RG8UINT",M[M.RGBA4UNORM=4]="RGBA4UNORM",M[M.RGBA8UNORM=5]="RGBA8UNORM",M[M.RGBA8UNORM_MIPMAP=6]="RGBA8UNORM_MIPMAP",M[M.R16FLOAT=7]="R16FLOAT",M[M.RGBA16FLOAT=8]="RGBA16FLOAT",M[M.R32FLOAT=9]="R32FLOAT",M[M.COUNT=10]="COUNT",function(e){e[e.DEPTH16=10]="DEPTH16",e[e.COUNT=11]="COUNT"}(A||(A={})),function(e){e[e.DEPTH24_STENCIL8=11]="DEPTH24_STENCIL8"}(S||(S={}));const R=new w.R;R.pixelFormat=E.Ab.RED,R.internalFormat=E.H0.R8,R.wrapMode=E.pF.CLAMP_TO_EDGE;const I=new w.R;I.pixelFormat=E.Ab.RED_INTEGER,I.internalFormat=E.H0.R8UI,I.wrapMode=E.pF.CLAMP_TO_EDGE,I.samplingMode=E.Cj.NEAREST;const O=new w.R;O.pixelFormat=E.Ab.RG,O.internalFormat=E.H0.RG8,O.wrapMode=E.pF.CLAMP_TO_EDGE;const N=new w.R;N.pixelFormat=E.Ab.RG_INTEGER,N.internalFormat=E.H0.RG8UI,N.wrapMode=E.pF.CLAMP_TO_EDGE,N.samplingMode=E.Cj.NEAREST;const y=new w.R;y.internalFormat=E.H0.RGBA4,y.dataType=E.ld.UNSIGNED_SHORT_4_4_4_4,y.wrapMode=E.pF.CLAMP_TO_EDGE;(new w.R).wrapMode=E.pF.CLAMP_TO_EDGE;const P=new w.R;P.wrapMode=E.pF.CLAMP_TO_EDGE,P.samplingMode=E.Cj.LINEAR_MIPMAP_LINEAR,P.hasMipmap=!0,P.maxAnisotropy=8;const L=new w.R;L.pixelFormat=E.Ab.RED,L.dataType=E.ld.HALF_FLOAT,L.internalFormat=E.H0.R16F,L.samplingMode=E.Cj.NEAREST;const D=new w.R;D.dataType=E.ld.HALF_FLOAT,D.internalFormat=E.H0.RGBA16F,D.wrapMode=E.pF.CLAMP_TO_EDGE;const H=new w.R;H.pixelFormat=E.Ab.RED,H.dataType=E.ld.FLOAT,H.internalFormat=E.H0.R32F,H.samplingMode=E.Cj.NEAREST,b.R8UNORM,b.R8UINT,b.RG8UNORM,b.RG8UINT,b.RGBA4UNORM,b.RGBA8UNORM,b.RGBA8UNORM_MIPMAP,b.R16FLOAT,b.RGBA16FLOAT,b.R32FLOAT,b.COUNT;const F={[E.SB.DEPTH_COMPONENT16]:E.ld.UNSIGNED_SHORT,[E.SB.DEPTH_COMPONENT24]:E.ld.UNSIGNED_INT,[E.SB.DEPTH_COMPONENT32F]:E.ld.FLOAT,[E.iE.DEPTH24_STENCIL8]:E.ld.UNSIGNED_INT_24_8,[E.iE.DEPTH32F_STENCIL8]:E.ld.FLOAT_32_UNSIGNED_INT_24_8_REV};A.DEPTH16,new class{constructor(e,t=0,r=t){this.internalFormat=e,this.width=t,this.height=r,this.multisampled=!1,this.samples=1}}(E.SB.DEPTH_COMPONENT16),A.COUNT,S.DEPTH24_STENCIL8,function(e){const t=new w.R;t.pixelFormat=(0,C.CR)(e)?E.j7.DEPTH_COMPONENT:E.j7.DEPTH_STENCIL,t.dataType=F[e],t.samplingMode=E.Cj.NEAREST,t.wrapMode=E.pF.CLAMP_TO_EDGE,t.internalFormat=e,t.hasMipmap=!1,t.isImmutable=!0}(E.iE.DEPTH24_STENCIL8);var B=r(97220),G=r(98958),U=r(95774),z=r(90644);class V extends G.w{constructor(e,t){super(e,t,new B.$(U.S,(()=>r.e(9384).then(r.bind(r,59384)))))}initializePipeline(){return(0,z.Ey)({colorWrite:z.kn})}}var W=r(48163),j=r(65786);class k extends j.Y{constructor(){super(...arguments),this.projScale=1}}class $ extends k{constructor(){super(...arguments),this.intensity=1}}class q extends j.Y{}class Y extends q{constructor(){super(...arguments),this.blurSize=(0,W.vt)()}}var X=r(15581);class Z extends G.w{constructor(e,t){super(e,t,new B.$(X.S,(()=>r.e(191).then(r.bind(r,90191)))))}initializePipeline(){return(0,z.Ey)({colorWrite:z.kn})}}var J=r(21231);const K=2;let Q=class extends x{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=o.SSAO,this.isEnabled=()=>!1,this._enableTime=(0,h.l5)(0),this._passParameters=new $,this._drawParameters=new Y}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),(e=>e.charCodeAt(0))),t=new w.R;t.wrapMode=E.pF.CLAMP_TO_EDGE,t.pixelFormat=E.Ab.RGB,t.wrapMode=E.pF.REPEAT,t.hasMipmap=!0,t.width=32,t.height=32,this._passParameters.noiseTexture=new J.g(this.renderingContext,t,e),this.techniques.precompile(Z),this.techniques.precompile(V),this.addHandles((0,u.wB)((()=>this.isEnabled()),(()=>this._enableTime=(0,h.l5)(0))))}destroy(){this._passParameters.noiseTexture=(0,d.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find((({name:e})=>"normals"===e)),r=t?.getTexture(),i=t?.getTexture(E.nI);if(!r||!i)return;const n=this.techniques.get(Z),a=this.techniques.get(V);if(!n.compiled||!a.compiled)return this._enableTime=(0,h.l5)(performance.now()),void this.requestRender(_.C7.UPDATE);0===this._enableTime&&(this._enableTime=(0,h.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,d=this.bindParameters,u=d.camera,m=u.relativeElevation,p=(0,c.qE)((5e5-m)/2e5,0,1),v=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,g=v*p;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/u.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*ee/(0,X.g)(u)**6*g;const T=u.fullViewport[2],x=u.fullViewport[3],A=this.fboCache.acquire(T,x,"ssao input",b.RG8UNORM);s.bindFramebuffer(A.fbo),s.setViewport(0,0,T,x),s.bindTechnique(n,d,this._passParameters,this._drawParameters),s.screen.draw();const S=Math.round(T/K),M=Math.round(x/K),w=this.fboCache.acquire(S,M,"ssao blur",b.R8UNORM);s.bindFramebuffer(w.fbo),this._drawParameters.colorTexture=A.getTexture(),(0,f.hZ)(this._drawParameters.blurSize,0,K/x),s.bindTechnique(a,d,this._passParameters,this._drawParameters),s.setViewport(0,0,S,M),s.screen.draw(),A.release();const C=this.fboCache.acquire(S,M,o.SSAO,b.R8UNORM);return s.bindFramebuffer(C.fbo),s.setViewport(0,0,T,x),s.setClearColor(1,1,1,0),s.clear(E.NV.COLOR),this._drawParameters.colorTexture=w.getTexture(),(0,f.hZ)(this._drawParameters.blurSize,K/T,0),s.bindTechnique(a,d,this._passParameters,this._drawParameters),s.setViewport(0,0,S,M),s.screen.draw(),s.setViewport4fv(u.fullViewport),w.release(),v<1&&this.requestRender(_.C7.UPDATE),C}};(0,l._)([(0,m.MZ)()],Q.prototype,"consumes",void 0),(0,l._)([(0,m.MZ)()],Q.prototype,"produces",void 0),(0,l._)([(0,m.MZ)({constructOnly:!0})],Q.prototype,"isEnabled",void 0),Q=(0,l._)([(0,p.$)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],Q);const ee=.5;function te(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new s.x("ssaoTex",(e=>e.ssao?.getTexture()))),e.constants.add("blurSizePixelsInverse","float",1/K),e.code.add(a.H`float evaluateAmbientOcclusionInverse() {
796
796
  vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
797
797
  return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
798
798
  }
799
799
  float evaluateAmbientOcclusion() {
800
800
  return 1.0 - evaluateAmbientOcclusionInverse();
801
801
  }`)):e.code.add(a.H`float evaluateAmbientOcclusionInverse() { return 1.0; }
802
- float evaluateAmbientOcclusion() { return 0.0; }`)}},87170:(e,t,r)=>{r.d(t,{V:()=>w});var i=r(24326),o=r(9093),n=r(38954),a=r(97146),s=r(57917),l=r(29920),c=r(51850),d=r(4341),u=r(11964);function h(e,t,r){return(0,n.d)(m,t,e),(0,n.d)(p,r,e),.5*(0,n.l)((0,n.e)(m,m,p))}r(32114),new d.I(u.vt),new d.I((()=>{return e?{p0:(0,c.o8)(e.p0),p1:(0,c.o8)(e.p1),p2:(0,c.o8)(e.p2)}:{p0:(0,c.vt)(),p1:(0,c.vt)(),p2:(0,c.vt)()};var e}));const m=(0,c.vt)(),p=(0,c.vt)(),f=(0,c.vt)(),v=(0,c.vt)(),g=(0,c.vt)(),_=(0,c.vt)();var T=r(75039),x=r(89192);class E{constructor(){this.uid=(0,i.c)()}}class b extends E{constructor(e){super(),this.highlightName=e,this.channel=x.Mg.Highlight}}var A=r(620),S=r(46540),M=r(94656);class w{constructor(e,t,r=null,o=T.d.Mesh,n=null,s=-1){this.material=e,this.mapPositions=r,this.type=o,this.objectAndLayerIdColor=n,this.edgeIndicesLength=s,this.highlights=new Set,this._highlightOptionsCounts=new Map,this.id=(0,i.c)(),this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[e,r]of t)this._attributes.set(e,{...r,indices:(0,a.Dg)(r.indices)}),e===S.r.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(e).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new w(e.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);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}get attributes(){return this._attributes}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:(0,s.S)(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r?this._attributes.set(e,{...r,exclusive:!0,data:t}):(0,M.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get indexCount(){const e=this._attributes.values().next().value?.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===T.d.Mesh?this._computeAttachmentOriginTriangles(e):this.type===T.d.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,n.t)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:o}=e;(0,n.i)(t,0,0,0),(0,n.i)(_,0,0,0);let a=0,s=0;for(let e=0;e<o.length-2;e+=3){const l=o[e]*r,c=o[e+1]*r,d=o[e+2]*r;(0,n.i)(f,i[l],i[l+1],i[l+2]),(0,n.i)(v,i[c],i[c+1],i[c+2]),(0,n.i)(g,i[d],i[d+1],i[d+2]);const u=h(f,v,g);u?((0,n.g)(f,f,v),(0,n.g)(f,f,g),(0,n.h)(f,f,1/3*u),(0,n.g)(t,t,f),a+=u):((0,n.g)(_,_,f),(0,n.g)(_,_,v),(0,n.g)(_,_,g),s+=3)}return!(0===s&&0===a||(0!==a?((0,n.h)(t,t,1/a),0):0===s||((0,n.h)(t,_,1/s),0)))}(this.attributes.get(S.r.POSITION),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get(S.r.POSITION);return function(e,t,r){if(!e)return!1;(0,n.i)(r,0,0,0),(0,n.i)(_,0,0,0);let i=0,o=0;const{size:a,data:s,indices:l}=e,c=l.length-1,d=c+(t?2:0);for(let e=0;e<d;e+=2){const t=e<c?e+1:0,d=l[e<c?e:c]*a,u=l[t]*a;f[0]=s[d],f[1]=s[d+1],f[2]=s[d+2],v[0]=s[u],v[1]=s[u+1],v[2]=s[u+2],(0,n.h)(f,(0,n.g)(f,f,v),.5);const h=(0,n.F)(f,v);h>0?((0,n.g)(r,r,(0,n.h)(f,f,h)),i+=h):0===i&&((0,n.g)(_,_,f),o++)}return 0!==i?((0,n.h)(r,r,1/i),!0):0!==o&&((0,n.h)(r,_,1/o),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:o}=e;(0,n.i)(t,0,0,0);let a=-1,s=0;for(let e=0;e<o.length;e++){const n=o[e]*r;a!==n&&(t[0]+=i[n],t[1]+=i[n+1],t[2]+=i[n+2],s++),a=n}return s>1&&(0,n.h)(t,t,1/s),s>0}(this.attributes.get(S.r.POSITION),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(S.r.POSITION);if(!e||0===e.indices.length)return null;const t=this.type===T.d.Mesh?3:1;(0,A.vA)(e.indices.length%t==0,"Indexing error: "+e.indices.length+" not divisible by "+t);const r=(0,a.tM)(e.indices.length/t);return new l.j(r,t,e)}get transformation(){return this._transformation??o.zK}set transformation(e){this._transformation=e&&e!==o.zK?(0,o.o8)(e):null}get highlightNames(){return this._highlightOptionsCounts}get hasHighlights(){return this._highlightOptionsCounts.size>0}foreachHighlightOptions(e){this._highlightOptionsCounts.forEach(((t,r)=>e(r)))}allocateIdAndHighlight(e){const t=new b(e);return this.addHighlight(t)}addHighlight(e){this.highlights.add(e);const{highlightName:t}=e,r=(this._highlightOptionsCounts.get(t)??0)+1;return this._highlightOptionsCounts.set(t,r),e}removeHighlight(e){if(this.highlights.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts.get(t)??0;r<=1?this._highlightOptionsCounts.delete(t):this._highlightOptionsCounts.set(t,r-1)}}}},88076:(e,t,r)=>{r.d(t,{$U:()=>ve,fs:()=>_e,ty:()=>Te});var i=r(38954),o=r(51850),n=r(67222),a=r(24151),s=r(1843),l=r(49255),c=r(96336),d=r(22911),u=r(62602),h=r(59469),m=r(16943),p=r(89192),f=r(25634),v=r(11725),g=r(33524),_=r(70328),T=r(75039),x=r(620),E=r(46540);class b{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const A=(0,_.vt)();function S(e,t,r,o,n,a){if(!e.visible)return;const s=(0,i.a)(B,o,r),l=(e,t,r)=>{a(e,r,t,!1)},c=new b(!1,t.options.normalRequired);if(e.boundingInfo){(0,x.vA)(e.type===T.d.Mesh);const i=t.tolerance;w(e.boundingInfo,r,s,i,n,c,l)}else{const t=e.attributes.get(E.r.POSITION),o=t.indices;!function(e,t,r,o,n,a,s,l,c,d){const u=t,h=U,m=Math.abs(u[0]),p=Math.abs(u[1]),f=Math.abs(u[2]),v=m>=p?m>=f?0:2:p>=f?1:2,g=v,_=u[g]<0?2:1,T=(v+_)%3,x=(v+(3-_))%3,E=u[T]/u[g],b=u[x]/u[g],A=1/u[g],S=I,M=O,w=N,{normalRequired:C}=c;for(let t=r;t<o;++t){const r=3*t,o=s*n[r];(0,i.i)(h[0],a[o+0],a[o+1],a[o+2]);const c=s*n[r+1];(0,i.i)(h[1],a[c+0],a[c+1],a[c+2]);const u=s*n[r+2];(0,i.i)(h[2],a[u+0],a[u+1],a[u+2]),l&&((0,i.c)(h[0],l.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.c)(h[1],l.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.c)(h[2],l.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.a)(S,h[0],e),(0,i.a)(M,h[1],e),(0,i.a)(w,h[2],e);const m=S[T]-E*S[g],p=S[x]-b*S[g],f=M[T]-E*M[g],v=M[x]-b*M[g],_=w[T]-E*w[g],R=w[x]-b*w[g],I=_*v-R*f,O=m*R-p*_,N=f*p-v*m;if((I<0||O<0||N<0)&&(I>0||O>0||N>0))continue;const y=I+O+N;if(0===y)continue;const L=I*(A*S[g])+O*(A*M[g])+N*(A*w[g]);if(L*Math.sign(y)<0)continue;const D=L/y;D>=0&&d(D,t,C?P(h):null)}}(r,s,0,o.length/3,o,t.data,t.stride,n,c,l)}}const M=(0,o.vt)();function w(e,t,r,o,n,a,s){if(null==e)return;const l=function(e,t){return(0,i.i)(t,1/e[0],1/e[1],1/e[2])}(r,M);if((0,_.Ne)(A,e.bbMin),(0,_.vI)(A,e.bbMax),null!=n&&n.applyToAabb(A),function(e,t,r,i){return function(e,t,r,i){const o=(e[0]-i-t[0])*r[0],n=(e[3]+i-t[0])*r[0];let a=Math.min(o,n),s=Math.max(o,n);const l=(e[1]-i-t[1])*r[1],c=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(a=Math.max(a,Math.min(l,c)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(A,t,l,o)){const{primitiveIndices:i,position:l}=e,c=i?i.length:l.indices.length/3;if(c>H){const i=e.getChildren();if(void 0!==i){for(const e of i)w(e,t,r,o,n,a,s);return}}!function(e,t,r,i,o,n,a,s,l,c,d){const u=e[0],h=e[1],m=e[2],p=t[0],f=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*o[r];let c=n[i],_=n[i+1],T=n[i+2];const x=a*o[r+1];let E=n[x],b=n[x+1],A=n[x+2];const S=a*o[r+2];let M=n[S],w=n[S+1],R=n[S+2];null!=l&&([c,_,T]=l.applyToVertex(c,_,T,e),[E,b,A]=l.applyToVertex(E,b,A,e),[M,w,R]=l.applyToVertex(M,w,R,e));const I=E-c,O=b-_,N=A-T,P=M-c,L=w-_,D=R-T,H=f*D-L*v,B=v*P-D*p,U=p*L-P*f,G=I*H+O*B+N*U;if(Math.abs(G)<=F)continue;const z=u-c,V=h-_,W=m-T,j=z*H+V*B+W*U;if(G>0){if(j<0||j>G)continue}else if(j>0||j<G)continue;const k=V*N-O*W,$=W*I-N*z,q=z*O-I*V,Y=p*k+f*$+v*q;if(G>0){if(Y<0||j+Y>G)continue}else if(Y>0||j+Y<G)continue;const X=(P*k+L*$+D*q)/G;X>=0&&d(X,t,g?y(I,O,N,P,L,D,C):null)}}(t,r,0,c,l.indices,l.data,l.stride,i,n,a,s)}}const C=(0,o.vt)();function R(e,t,r,i,o,n,a,s){const l=e[0],c=e[1],d=e[2],u=t[0],h=t[1],m=t[2];for(let e=r;e<i;++e){const t=3*e,r=t+1,i=t+2,p=n*t,f=o[p],v=o[p+1],g=o[p+2],_=n*r,T=n*i,x=o[_]-f,E=o[_+1]-v,b=o[_+2]-g,A=o[T]-f,S=o[T+1]-v,M=o[T+2]-g,w=h*M-S*m,R=m*A-M*u,I=u*S-A*h,O=x*w+E*R+b*I;if(Math.abs(O)<=F)continue;const N=l-f,P=c-v,L=d-g,D=N*w+P*R+L*I;if(O>0){if(D<0||D>O)continue}else if(D>0||D<O)continue;const H=P*b-E*L,B=L*x-b*N,U=N*E-x*P,G=u*H+h*B+m*U;if(O>0){if(G<0||D+G>O)continue}else if(G>0||D+G<O)continue;const z=(A*H+S*B+M*U)/O;z>=0&&s(z,e,a?y(x,E,b,A,S,M,C):null)}}const I=(0,o.vt)(),O=(0,o.vt)(),N=(0,o.vt)();function y(e,t,r,o,n,a,s){return(0,i.i)(L,e,t,r),(0,i.i)(D,o,n,a),(0,i.e)(s,L,D),(0,i.n)(s,s),s}function P(e){return(0,i.a)(L,e[1],e[0]),(0,i.a)(D,e[2],e[0]),(0,i.e)(C,L,D),(0,i.n)(C,C),C}const L=(0,o.vt)(),D=(0,o.vt)(),H=1e3,F=1e-7,B=(0,o.vt)(),U=[(0,o.vt)(),(0,o.vt)(),(0,o.vt)()];var G=r(13464),z=r(16396),V=r(13030),W=r(59907);class j{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.get(E.r.POSITION).indices.length}write(e,t,r,i,o,n){return(0,W.SA)(r,i,this.vertexBufferLayout,e,t,o,n)}intersect(e,t,r,o,n,a,s){const l=this.vertexBufferLayout.createView(e).getField(E.r.POSITION,V.xs);if(null==l)return;const c=(0,i.a)(k,a,n),d=l.count/3,u=o.options.normalRequired;R(n,c,0,d,l.typedBuffer,l.typedBufferStride,u,((e,t,r)=>{s(e,r,t,!1)}))}}const k=(0,o.vt)();var $=r(43616),q=r(91829),Y=r(72824),X=r(97220),Z=r(98958),J=r(63907);J.MT.LESS,J.MT.ALWAYS;const K={mask:255},Q={function:{func:J.MT.ALWAYS,ref:p.dd.OutlineVisualElementMask,mask:p.dd.OutlineVisualElementMask},operation:{fail:J.eA.KEEP,zFail:J.eA.KEEP,zPass:J.eA.ZERO}},ee={function:{func:J.MT.ALWAYS,ref:p.dd.OutlineVisualElementMask,mask:p.dd.OutlineVisualElementMask},operation:{fail:J.eA.KEEP,zFail:J.eA.KEEP,zPass:J.eA.REPLACE}};J.MT.EQUAL,p.dd.OutlineVisualElementMask,p.dd.OutlineVisualElementMask,J.eA.KEEP,J.eA.KEEP,J.eA.KEEP,J.MT.NOTEQUAL,p.dd.OutlineVisualElementMask,p.dd.OutlineVisualElementMask,J.eA.KEEP,J.eA.KEEP,J.eA.KEEP;var te=r(74810),re=r(28491),ie=r(90644),oe=r(49788);class ne extends Y.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=te.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=p.s2.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveStrength=0,this.emissiveSource=n.YJ.Color,this.emissiveBaseColor=o.uY,this.instancedDoublePrecision=!1,this.normalType=c.W.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,o.CN)(.2,.2,.2),this.diffuse=(0,o.CN)(.8,.8,.8),this.externalColor=(0,q.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,o.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=p.it.Less,this.textureAlphaMode=p.sf.Blend,this.textureAlphaCutoff=oe.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=v.m$.Occlude,this.isDecoration=!1}}Y.gy;class ae extends Z.w{constructor(e,t,i=new X.$(re.D,(()=>r.e(5141).then(r.bind(r,5141))))){super(e,t,i),this.type="DefaultMaterialTechnique"}_makePipeline(e,t){const{oitPass:r,output:i,transparent:o,cullFace:n,customDepthTest:a,hasOccludees:s}=e;return(0,ie.Ey)({blending:(0,l.RN)(i)&&o?(0,g.Yf)(r):null,culling:le(e)?(0,ie.Xt)(n):null,depthTest:{func:(0,g.K_)(r,se(a))},depthWrite:(0,g.z5)(e),drawBuffers:i===l.V.Depth?{buffers:[J.Hr.NONE]}:(0,g.m6)(r,i),colorWrite:ie.kn,stencilWrite:s?K:null,stencilTest:s?t?ee:Q:null,polygonOffset:(0,g.mE)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function se(e){return e===p.it.Lequal?J.MT.LEQUAL:J.MT.LESS}function le(e){return e.cullFace!==p.s2.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}var ce=r(90237),de=r(53466),ue=r(51976),he=r(35256);class me extends he.E{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=p.sf.Opaque,this.doubleSidedMode=u.W.None,this.pbrMode=h.A9.Disabled,this.cullFace=p.s2.None,this.normalType=c.W.Attribute,this.customDepthTest=p.it.Less,this.emissionSource=d.ZX.None,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.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasBloom=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===d.ZX.Texture||this.hasOcclusionTexture||this.hasNormalTexture?de.I.Default:de.I.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,ce._)([(0,ue.W)({count:p.sf.COUNT})],me.prototype,"alphaDiscardMode",void 0),(0,ce._)([(0,ue.W)({count:u.W.COUNT})],me.prototype,"doubleSidedMode",void 0),(0,ce._)([(0,ue.W)({count:h.A9.COUNT})],me.prototype,"pbrMode",void 0),(0,ce._)([(0,ue.W)({count:p.s2.COUNT})],me.prototype,"cullFace",void 0),(0,ce._)([(0,ue.W)({count:c.W.COUNT})],me.prototype,"normalType",void 0),(0,ce._)([(0,ue.W)({count:p.it.COUNT})],me.prototype,"customDepthTest",void 0),(0,ce._)([(0,ue.W)({count:d.ZX.COUNT})],me.prototype,"emissionSource",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasVertexColors",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasSymbolColors",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasVerticalOffset",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasColorTexture",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasMetallicRoughnessTexture",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasOcclusionTexture",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasNormalTexture",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasScreenSizePerspective",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasVertexTangents",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasOccludees",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"instancedDoublePrecision",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasModelTransformation",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"offsetBackfaces",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"vvSize",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"vvColor",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"receiveShadows",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"receiveAmbientOcclusion",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"textureAlphaPremultiplied",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"instanced",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"instancedColor",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"writeDepth",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"transparent",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"enableOffset",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"terrainDepthTest",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"cullAboveTerrain",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"snowCover",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasBloom",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasColorTextureTransform",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasEmissionTextureTransform",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasNormalTextureTransform",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasOcclusionTextureTransform",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasMetallicRoughnessTextureTransform",void 0);var pe=r(57323);class fe extends ae{constructor(e,t){super(e,t,new X.$(pe.R,(()=>r.e(9933).then(r.bind(r,39933))))),this.type="RealisticTreeTechnique"}}class ve extends v.im{constructor(e,t){super(e,_e),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[G.N.OPAQUE_MATERIAL,e=>((0,l.iq)(e)||(0,l.PJ)(e))&&!this.transparent],[G.N.TRANSPARENT_MATERIAL,e=>((0,l.iq)(e)||(0,l.PJ)(e))&&this.transparent&&this.parameters.writeDepth],[G.N.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>((0,l.XY)(e)||(0,l.PJ)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=function(e){const t=(0,s.BP)().vec3f(E.r.POSITION);return e.normalType===c.W.Compressed?t.vec2i16(E.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(E.r.NORMAL),e.hasVertexTangents&&t.vec4f(E.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f16(E.r.UV0),e.hasVertexColors&&t.vec4u8(E.r.COLOR),e.hasSymbolColors&&t.vec4u8(E.r.SYMBOLCOLOR),(0,m.E)()&&t.vec4u8(E.r.OLIDCOLOR),t}(this.parameters),this._configuration=new me(t.spherical)}isVisibleForOutput(e){return e!==l.V.Shadow&&e!==l.V.ShadowExcludeHighlight&&e!==l.V.ShadowHighlight||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t?1:i[3])>=oe.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,i.p)(this.parameters.emissiveBaseColor,o.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(this.parameters.emissiveSource===n.YJ.Emissive&&this._hasEmissiveBase||this.parameters.emissiveSource===n.YJ.Color)}getConfiguration(e,t){const{parameters:r,_configuration:i}=this,{treeRendering:o,doubleSided:a,doubleSidedType:s}=r;return super.getConfiguration(e,t,this._configuration),i.hasNormalTexture=!o&&!!r.normalTextureId,i.hasColorTexture=!!r.textureId,i.hasVertexTangents=!o&&r.hasVertexTangents,i.instanced=r.isInstanced,i.instancedDoublePrecision=r.instancedDoublePrecision,i.vvSize=!!r.vvSize,i.hasVerticalOffset=null!=r.verticalOffset,i.hasScreenSizePerspective=null!=r.screenSizePerspective,i.hasSlicePlane=r.hasSlicePlane,i.alphaDiscardMode=r.textureAlphaMode,i.normalType=o?c.W.Attribute:r.normalType,i.transparent=this.transparent,i.writeDepth=r.writeDepth,i.customDepthTest=r.customDepthTest??p.it.Less,i.hasOccludees=t.hasOccludees,i.cullFace=r.hasSlicePlane?p.s2.None:r.cullFace,i.cullAboveTerrain=t.cullAboveTerrain,i.hasModelTransformation=!o&&null!=r.modelTransformation,i.hasVertexColors=r.hasVertexColors,i.hasSymbolColors=r.hasSymbolColors,i.doubleSidedMode=o?u.W.WindingOrder:a&&"normal"===s?u.W.View:a&&"winding-order"===s?u.W.WindingOrder:u.W.None,i.instancedColor=r.hasInstancedColor,(0,l.RN)(e)?(i.terrainDepthTest=t.terrainDepthTest,i.receiveShadows=r.receiveShadows,i.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao):(i.terrainDepthTest=!1,i.receiveShadows=i.receiveAmbientOcclusion=!1),i.vvColor=!!r.vvColor,i.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,i.pbrMode=r.usePBR?r.isSchematic?h.A9.Schematic:h.A9.Normal:h.A9.Disabled,i.hasMetallicRoughnessTexture=!o&&!!r.metallicRoughnessTextureId,i.emissionSource=o?d.ZX.None:null!=r.emissiveTextureId&&r.emissiveSource===n.YJ.Emissive?d.ZX.Texture:r.usePBR?r.emissiveSource===n.YJ.Emissive?d.ZX.EmissiveColor:d.ZX.SymbolColor:d.ZX.None,i.hasOcclusionTexture=!o&&!!r.occlusionTextureId,i.offsetBackfaces=!(!this.transparent||!r.offsetTransparentBackfaces),i.oitPass=t.oitPass,i.enableOffset=t.camera.relativeElevation<g.xt,i.snowCover=t.snowCover,i.hasBloom=(0,l.LG)(e),i.hasColorTextureTransform=!!r.colorTextureTransformMatrix,i.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,i.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,i.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,i.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,i}intersect(e,t,r,o,n,s){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.i)(Me,t[12],t[13],t[14]);let s=null;switch(r.viewingMode){case a.RT.Global:s=(0,i.n)(Ae,Me);break;case a.RT.Local:s=(0,i.c)(Ae,be)}let l=0;const c=(0,i.d)(we,Me,e.eye),d=(0,i.l)(c),u=(0,i.h)(c,c,1/d);let h=null;this.parameters.screenSizePerspective&&(h=(0,i.f)(s,u)),l+=(0,$.kE)(e,d,this.parameters.verticalOffset,h??0,this.parameters.screenSizePerspective),(0,i.h)(s,s,l),(0,i.q)(Se,s,r.transform.inverseRotation),o=(0,i.d)(xe,o,Se),n=(0,i.d)(Ee,n,Se)}S(e,r,o,n,(0,z.ou)(r.verticalOffset),s)}createGLMaterial(e){return new ge(e)}createBufferWriter(){return new j(this._vertexBufferLayout)}get transparent(){return Te(this.parameters)}}class ge extends f.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.i)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?fe:ae,e)}}class _e extends ne{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}}function Te(e){const{drivenOpacity:t,opacity:r,externalColor:[i,o,n,a],layerOpacity:s,texture:l,textureId:c,textureAlphaMode:d,colorMixMode:u}=e;return t||r<1&&"replace"!==u||a<1&&"ignore"!==u||s<1||(null!=l||null!=c)&&d!==p.sf.Opaque&&d!==p.sf.Mask&&"replace"!==u}const xe=(0,o.vt)(),Ee=(0,o.vt)(),be=(0,o.fA)(0,0,1),Ae=(0,o.vt)(),Se=(0,o.vt)(),Me=(0,o.vt)(),we=(0,o.vt)()},89192:(e,t,r)=>{var i,o,n,a,s,l,c,d;r.d(t,{Am:()=>a,C7:()=>n,JS:()=>d,Mg:()=>l,dd:()=>s,it:()=>o,s2:()=>i,sf:()=>c}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(o||(o={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(n||(n={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(a||(a={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(s||(s={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee"}(l||(l={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(c||(c={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(d||(d={}))},89390:(e,t,r)=>{r.d(t,{kA:()=>w,a8:()=>S,eU:()=>M});var i=r(40876),o=(r(44208),r(38954)),n=r(51850),a=r(87317),s=r(91829),l=r(59469),c=r(23205),d=r(14314),u=r(31821);function h(e,t){const r=e.fragment,i=void 0!==t.lightingSphericalHarmonicsOrder?t.lightingSphericalHarmonicsOrder:2;0===i?(r.uniforms.add(new c.d("lightingAmbientSH0",(({lighting:e})=>(0,o.i)(m,e.sh.r[0],e.sh.g[0],e.sh.b[0])))),r.code.add(u.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
802
+ float evaluateAmbientOcclusion() { return 0.0; }`)}},87170:(e,t,r)=>{r.d(t,{V:()=>w});var i=r(24326),o=r(9093),n=r(38954),a=r(97146),s=r(57917),l=r(29920),c=r(51850),d=r(4341),u=r(11964);function h(e,t,r){return(0,n.d)(m,t,e),(0,n.d)(p,r,e),.5*(0,n.l)((0,n.e)(m,m,p))}r(32114),new d.I(u.vt),new d.I((()=>{return e?{p0:(0,c.o8)(e.p0),p1:(0,c.o8)(e.p1),p2:(0,c.o8)(e.p2)}:{p0:(0,c.vt)(),p1:(0,c.vt)(),p2:(0,c.vt)()};var e}));const m=(0,c.vt)(),p=(0,c.vt)(),f=(0,c.vt)(),v=(0,c.vt)(),g=(0,c.vt)(),_=(0,c.vt)();var T=r(75039),x=r(89192);class E{constructor(){this.uid=(0,i.c)()}}class b extends E{constructor(e){super(),this.highlightName=e,this.channel=x.Mg.Highlight}}var A=r(620),S=r(46540),M=r(94656);class w{constructor(e,t,r=null,o=T.d.Mesh,n=null,s=-1){this.material=e,this.mapPositions=r,this.type=o,this.objectAndLayerIdColor=n,this.edgeIndicesLength=s,this.highlights=new Set,this._highlightOptionsCounts=new Map,this.id=(0,i.c)(),this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[e,r]of t)this._attributes.set(e,{...r,indices:(0,a.Dg)(r.indices)}),e===S.r.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(e).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new w(e.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);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}get attributes(){return this._attributes}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:(0,s.S)(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r?this._attributes.set(e,{...r,exclusive:!0,data:t}):(0,M.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get indexCount(){const e=this._attributes.values().next().value?.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===T.d.Mesh?this._computeAttachmentOriginTriangles(e):this.type===T.d.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,n.t)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:o}=e;(0,n.i)(t,0,0,0),(0,n.i)(_,0,0,0);let a=0,s=0;for(let e=0;e<o.length-2;e+=3){const l=o[e]*r,c=o[e+1]*r,d=o[e+2]*r;(0,n.i)(f,i[l],i[l+1],i[l+2]),(0,n.i)(v,i[c],i[c+1],i[c+2]),(0,n.i)(g,i[d],i[d+1],i[d+2]);const u=h(f,v,g);u?((0,n.g)(f,f,v),(0,n.g)(f,f,g),(0,n.h)(f,f,1/3*u),(0,n.g)(t,t,f),a+=u):((0,n.g)(_,_,f),(0,n.g)(_,_,v),(0,n.g)(_,_,g),s+=3)}return!(0===s&&0===a||(0!==a?((0,n.h)(t,t,1/a),0):0===s||((0,n.h)(t,_,1/s),0)))}(this.attributes.get(S.r.POSITION),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get(S.r.POSITION);return function(e,t,r){if(!e)return!1;(0,n.i)(r,0,0,0),(0,n.i)(_,0,0,0);let i=0,o=0;const{size:a,data:s,indices:l}=e,c=l.length-1,d=c+(t?2:0);for(let e=0;e<d;e+=2){const t=e<c?e+1:0,d=l[e<c?e:c]*a,u=l[t]*a;f[0]=s[d],f[1]=s[d+1],f[2]=s[d+2],v[0]=s[u],v[1]=s[u+1],v[2]=s[u+2],(0,n.h)(f,(0,n.g)(f,f,v),.5);const h=(0,n.F)(f,v);h>0?((0,n.g)(r,r,(0,n.h)(f,f,h)),i+=h):0===i&&((0,n.g)(_,_,f),o++)}return 0!==i?((0,n.h)(r,r,1/i),!0):0!==o&&((0,n.h)(r,_,1/o),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:o}=e;(0,n.i)(t,0,0,0);let a=-1,s=0;for(let e=0;e<o.length;e++){const n=o[e]*r;a!==n&&(t[0]+=i[n],t[1]+=i[n+1],t[2]+=i[n+2],s++),a=n}return s>1&&(0,n.h)(t,t,1/s),s>0}(this.attributes.get(S.r.POSITION),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(S.r.POSITION);if(!e||0===e.indices.length)return null;const t=this.type===T.d.Mesh?3:1;(0,A.vA)(e.indices.length%t==0,"Indexing error: "+e.indices.length+" not divisible by "+t);const r=(0,a.tM)(e.indices.length/t);return new l.j(r,t,e)}get transformation(){return this._transformation??o.zK}set transformation(e){this._transformation=e&&e!==o.zK?(0,o.o8)(e):null}get highlightNames(){return this._highlightOptionsCounts}get hasHighlights(){return this._highlightOptionsCounts.size>0}foreachHighlightOptions(e){this._highlightOptionsCounts.forEach(((t,r)=>e(r)))}allocateIdAndHighlight(e){const t=new b(e);return this.addHighlight(t)}addHighlight(e){this.highlights.add(e);const{highlightName:t}=e,r=(this._highlightOptionsCounts.get(t)??0)+1;return this._highlightOptionsCounts.set(t,r),e}removeHighlight(e){if(this.highlights.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts.get(t)??0;r<=1?this._highlightOptionsCounts.delete(t):this._highlightOptionsCounts.set(t,r-1)}}}},88076:(e,t,r)=>{r.d(t,{$U:()=>ve,fs:()=>_e,ty:()=>Te});var i=r(38954),o=r(51850),n=r(67222),a=r(24151),s=r(1843),l=r(49255),c=r(96336),d=r(22911),u=r(62602),h=r(59469),m=r(16943),p=r(89192),f=r(25634),v=r(11725),g=r(33524),_=r(70328),T=r(75039),x=r(620),E=r(46540);class b{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const A=(0,_.vt)();function S(e,t,r,o,n,a){if(!e.visible)return;const s=(0,i.a)(B,o,r),l=(e,t,r)=>{a(e,r,t,!1)},c=new b(!1,t.options.normalRequired);if(e.boundingInfo){(0,x.vA)(e.type===T.d.Mesh);const i=t.tolerance;w(e.boundingInfo,r,s,i,n,c,l)}else{const t=e.attributes.get(E.r.POSITION),o=t.indices;!function(e,t,r,o,n,a,s,l,c,d){const u=t,h=G,m=Math.abs(u[0]),p=Math.abs(u[1]),f=Math.abs(u[2]),v=m>=p?m>=f?0:2:p>=f?1:2,g=v,_=u[g]<0?2:1,T=(v+_)%3,x=(v+(3-_))%3,E=u[T]/u[g],b=u[x]/u[g],A=1/u[g],S=I,M=O,w=N,{normalRequired:C}=c;for(let t=r;t<o;++t){const r=3*t,o=s*n[r];(0,i.i)(h[0],a[o+0],a[o+1],a[o+2]);const c=s*n[r+1];(0,i.i)(h[1],a[c+0],a[c+1],a[c+2]);const u=s*n[r+2];(0,i.i)(h[2],a[u+0],a[u+1],a[u+2]),l&&((0,i.c)(h[0],l.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.c)(h[1],l.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.c)(h[2],l.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.a)(S,h[0],e),(0,i.a)(M,h[1],e),(0,i.a)(w,h[2],e);const m=S[T]-E*S[g],p=S[x]-b*S[g],f=M[T]-E*M[g],v=M[x]-b*M[g],_=w[T]-E*w[g],R=w[x]-b*w[g],I=_*v-R*f,O=m*R-p*_,N=f*p-v*m;if((I<0||O<0||N<0)&&(I>0||O>0||N>0))continue;const y=I+O+N;if(0===y)continue;const L=I*(A*S[g])+O*(A*M[g])+N*(A*w[g]);if(L*Math.sign(y)<0)continue;const D=L/y;D>=0&&d(D,t,C?P(h):null)}}(r,s,0,o.length/3,o,t.data,t.stride,n,c,l)}}const M=(0,o.vt)();function w(e,t,r,o,n,a,s){if(null==e)return;const l=function(e,t){return(0,i.i)(t,1/e[0],1/e[1],1/e[2])}(r,M);if((0,_.Ne)(A,e.bbMin),(0,_.vI)(A,e.bbMax),null!=n&&n.applyToAabb(A),function(e,t,r,i){return function(e,t,r,i){const o=(e[0]-i-t[0])*r[0],n=(e[3]+i-t[0])*r[0];let a=Math.min(o,n),s=Math.max(o,n);const l=(e[1]-i-t[1])*r[1],c=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(a=Math.max(a,Math.min(l,c)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(A,t,l,o)){const{primitiveIndices:i,position:l}=e,c=i?i.length:l.indices.length/3;if(c>H){const i=e.getChildren();if(void 0!==i){for(const e of i)w(e,t,r,o,n,a,s);return}}!function(e,t,r,i,o,n,a,s,l,c,d){const u=e[0],h=e[1],m=e[2],p=t[0],f=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*o[r];let c=n[i],_=n[i+1],T=n[i+2];const x=a*o[r+1];let E=n[x],b=n[x+1],A=n[x+2];const S=a*o[r+2];let M=n[S],w=n[S+1],R=n[S+2];null!=l&&([c,_,T]=l.applyToVertex(c,_,T,e),[E,b,A]=l.applyToVertex(E,b,A,e),[M,w,R]=l.applyToVertex(M,w,R,e));const I=E-c,O=b-_,N=A-T,P=M-c,L=w-_,D=R-T,H=f*D-L*v,B=v*P-D*p,G=p*L-P*f,U=I*H+O*B+N*G;if(Math.abs(U)<=F)continue;const z=u-c,V=h-_,W=m-T,j=z*H+V*B+W*G;if(U>0){if(j<0||j>U)continue}else if(j>0||j<U)continue;const k=V*N-O*W,$=W*I-N*z,q=z*O-I*V,Y=p*k+f*$+v*q;if(U>0){if(Y<0||j+Y>U)continue}else if(Y>0||j+Y<U)continue;const X=(P*k+L*$+D*q)/U;X>=0&&d(X,t,g?y(I,O,N,P,L,D,C):null)}}(t,r,0,c,l.indices,l.data,l.stride,i,n,a,s)}}const C=(0,o.vt)();function R(e,t,r,i,o,n,a,s){const l=e[0],c=e[1],d=e[2],u=t[0],h=t[1],m=t[2];for(let e=r;e<i;++e){const t=3*e,r=t+1,i=t+2,p=n*t,f=o[p],v=o[p+1],g=o[p+2],_=n*r,T=n*i,x=o[_]-f,E=o[_+1]-v,b=o[_+2]-g,A=o[T]-f,S=o[T+1]-v,M=o[T+2]-g,w=h*M-S*m,R=m*A-M*u,I=u*S-A*h,O=x*w+E*R+b*I;if(Math.abs(O)<=F)continue;const N=l-f,P=c-v,L=d-g,D=N*w+P*R+L*I;if(O>0){if(D<0||D>O)continue}else if(D>0||D<O)continue;const H=P*b-E*L,B=L*x-b*N,G=N*E-x*P,U=u*H+h*B+m*G;if(O>0){if(U<0||D+U>O)continue}else if(U>0||D+U<O)continue;const z=(A*H+S*B+M*G)/O;z>=0&&s(z,e,a?y(x,E,b,A,S,M,C):null)}}const I=(0,o.vt)(),O=(0,o.vt)(),N=(0,o.vt)();function y(e,t,r,o,n,a,s){return(0,i.i)(L,e,t,r),(0,i.i)(D,o,n,a),(0,i.e)(s,L,D),(0,i.n)(s,s),s}function P(e){return(0,i.a)(L,e[1],e[0]),(0,i.a)(D,e[2],e[0]),(0,i.e)(C,L,D),(0,i.n)(C,C),C}const L=(0,o.vt)(),D=(0,o.vt)(),H=1e3,F=1e-7,B=(0,o.vt)(),G=[(0,o.vt)(),(0,o.vt)(),(0,o.vt)()];var U=r(13464),z=r(16396),V=r(13030),W=r(59907);class j{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.get(E.r.POSITION).indices.length}write(e,t,r,i,o,n){return(0,W.SA)(r,i,this.vertexBufferLayout,e,t,o,n)}intersect(e,t,r,o,n,a,s){const l=this.vertexBufferLayout.createView(e).getField(E.r.POSITION,V.xs);if(null==l)return;const c=(0,i.a)(k,a,n),d=l.count/3,u=o.options.normalRequired;R(n,c,0,d,l.typedBuffer,l.typedBufferStride,u,((e,t,r)=>{s(e,r,t,!1)}))}}const k=(0,o.vt)();var $=r(43616),q=r(91829),Y=r(72824),X=r(97220),Z=r(98958),J=r(63907);J.MT.LESS,J.MT.ALWAYS;const K={mask:255},Q={function:{func:J.MT.ALWAYS,ref:p.dd.OutlineVisualElementMask,mask:p.dd.OutlineVisualElementMask},operation:{fail:J.eA.KEEP,zFail:J.eA.KEEP,zPass:J.eA.ZERO}},ee={function:{func:J.MT.ALWAYS,ref:p.dd.OutlineVisualElementMask,mask:p.dd.OutlineVisualElementMask},operation:{fail:J.eA.KEEP,zFail:J.eA.KEEP,zPass:J.eA.REPLACE}};J.MT.EQUAL,p.dd.OutlineVisualElementMask,p.dd.OutlineVisualElementMask,J.eA.KEEP,J.eA.KEEP,J.eA.KEEP,J.MT.NOTEQUAL,p.dd.OutlineVisualElementMask,p.dd.OutlineVisualElementMask,J.eA.KEEP,J.eA.KEEP,J.eA.KEEP;var te=r(74810),re=r(28491),ie=r(90644),oe=r(49788);class ne extends Y.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=te.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=p.s2.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveStrength=0,this.emissiveSource=n.YJ.Color,this.emissiveBaseColor=o.uY,this.instancedDoublePrecision=!1,this.normalType=c.W.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,o.CN)(.2,.2,.2),this.diffuse=(0,o.CN)(.8,.8,.8),this.externalColor=(0,q.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,o.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=p.it.Less,this.textureAlphaMode=p.sf.Blend,this.textureAlphaCutoff=oe.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=v.m$.Occlude,this.isDecoration=!1}}Y.gy;class ae extends Z.w{constructor(e,t,i=new X.$(re.D,(()=>r.e(5141).then(r.bind(r,5141))))){super(e,t,i),this.type="DefaultMaterialTechnique"}_makePipeline(e,t){const{oitPass:r,output:i,transparent:o,cullFace:n,customDepthTest:a,hasOccludees:s}=e;return(0,ie.Ey)({blending:(0,l.RN)(i)&&o?(0,g.Yf)(r):null,culling:le(e)?(0,ie.Xt)(n):null,depthTest:{func:(0,g.K_)(r,se(a))},depthWrite:(0,g.z5)(e),drawBuffers:i===l.V.Depth?{buffers:[J.Hr.NONE]}:(0,g.m6)(r,i),colorWrite:ie.kn,stencilWrite:s?K:null,stencilTest:s?t?ee:Q:null,polygonOffset:(0,g.mE)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function se(e){return e===p.it.Lequal?J.MT.LEQUAL:J.MT.LESS}function le(e){return e.cullFace!==p.s2.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}var ce=r(90237),de=r(53466),ue=r(51976),he=r(35256);class me extends he.E{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=p.sf.Opaque,this.doubleSidedMode=u.W.None,this.pbrMode=h.A9.Disabled,this.cullFace=p.s2.None,this.normalType=c.W.Attribute,this.customDepthTest=p.it.Less,this.emissionSource=d.ZX.None,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.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasBloom=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===d.ZX.Texture||this.hasOcclusionTexture||this.hasNormalTexture?de.I.Default:de.I.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,ce._)([(0,ue.W)({count:p.sf.COUNT})],me.prototype,"alphaDiscardMode",void 0),(0,ce._)([(0,ue.W)({count:u.W.COUNT})],me.prototype,"doubleSidedMode",void 0),(0,ce._)([(0,ue.W)({count:h.A9.COUNT})],me.prototype,"pbrMode",void 0),(0,ce._)([(0,ue.W)({count:p.s2.COUNT})],me.prototype,"cullFace",void 0),(0,ce._)([(0,ue.W)({count:c.W.COUNT})],me.prototype,"normalType",void 0),(0,ce._)([(0,ue.W)({count:p.it.COUNT})],me.prototype,"customDepthTest",void 0),(0,ce._)([(0,ue.W)({count:d.ZX.COUNT})],me.prototype,"emissionSource",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasVertexColors",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasSymbolColors",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasVerticalOffset",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasColorTexture",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasMetallicRoughnessTexture",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasOcclusionTexture",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasNormalTexture",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasScreenSizePerspective",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasVertexTangents",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasOccludees",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"instancedDoublePrecision",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasModelTransformation",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"offsetBackfaces",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"vvSize",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"vvColor",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"receiveShadows",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"receiveAmbientOcclusion",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"textureAlphaPremultiplied",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"instanced",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"instancedColor",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"writeDepth",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"transparent",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"enableOffset",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"terrainDepthTest",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"cullAboveTerrain",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"snowCover",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasBloom",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasColorTextureTransform",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasEmissionTextureTransform",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasNormalTextureTransform",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasOcclusionTextureTransform",void 0),(0,ce._)([(0,ue.W)()],me.prototype,"hasMetallicRoughnessTextureTransform",void 0);var pe=r(57323);class fe extends ae{constructor(e,t){super(e,t,new X.$(pe.R,(()=>r.e(9933).then(r.bind(r,39933))))),this.type="RealisticTreeTechnique"}}class ve extends v.im{constructor(e,t){super(e,_e),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[U.N.OPAQUE_MATERIAL,e=>((0,l.iq)(e)||(0,l.PJ)(e))&&!this.transparent],[U.N.TRANSPARENT_MATERIAL,e=>((0,l.iq)(e)||(0,l.PJ)(e))&&this.transparent&&this.parameters.writeDepth],[U.N.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>((0,l.XY)(e)||(0,l.PJ)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=function(e){const t=(0,s.BP)().vec3f(E.r.POSITION);return e.normalType===c.W.Compressed?t.vec2i16(E.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(E.r.NORMAL),e.hasVertexTangents&&t.vec4f(E.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f16(E.r.UV0),e.hasVertexColors&&t.vec4u8(E.r.COLOR),e.hasSymbolColors&&t.vec4u8(E.r.SYMBOLCOLOR),(0,m.E)()&&t.vec4u8(E.r.OLIDCOLOR),t}(this.parameters),this._configuration=new me(t.spherical)}isVisibleForOutput(e){return e!==l.V.Shadow&&e!==l.V.ShadowExcludeHighlight&&e!==l.V.ShadowHighlight||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t?1:i[3])>=oe.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,i.p)(this.parameters.emissiveBaseColor,o.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(this.parameters.emissiveSource===n.YJ.Emissive&&this._hasEmissiveBase||this.parameters.emissiveSource===n.YJ.Color)}getConfiguration(e,t){const{parameters:r,_configuration:i}=this,{treeRendering:o,doubleSided:a,doubleSidedType:s}=r;return super.getConfiguration(e,t,this._configuration),i.hasNormalTexture=!o&&!!r.normalTextureId,i.hasColorTexture=!!r.textureId,i.hasVertexTangents=!o&&r.hasVertexTangents,i.instanced=r.isInstanced,i.instancedDoublePrecision=r.instancedDoublePrecision,i.vvSize=!!r.vvSize,i.hasVerticalOffset=null!=r.verticalOffset,i.hasScreenSizePerspective=null!=r.screenSizePerspective,i.hasSlicePlane=r.hasSlicePlane,i.alphaDiscardMode=r.textureAlphaMode,i.normalType=o?c.W.Attribute:r.normalType,i.transparent=this.transparent,i.writeDepth=r.writeDepth,i.customDepthTest=r.customDepthTest??p.it.Less,i.hasOccludees=t.hasOccludees,i.cullFace=r.hasSlicePlane?p.s2.None:r.cullFace,i.cullAboveTerrain=t.cullAboveTerrain,i.hasModelTransformation=!o&&null!=r.modelTransformation,i.hasVertexColors=r.hasVertexColors,i.hasSymbolColors=r.hasSymbolColors,i.doubleSidedMode=o?u.W.WindingOrder:a&&"normal"===s?u.W.View:a&&"winding-order"===s?u.W.WindingOrder:u.W.None,i.instancedColor=r.hasInstancedColor,(0,l.RN)(e)?(i.terrainDepthTest=t.terrainDepthTest,i.receiveShadows=r.receiveShadows,i.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao):(i.terrainDepthTest=!1,i.receiveShadows=i.receiveAmbientOcclusion=!1),i.vvColor=!!r.vvColor,i.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,i.pbrMode=r.usePBR?r.isSchematic?h.A9.Schematic:h.A9.Normal:h.A9.Disabled,i.hasMetallicRoughnessTexture=!o&&!!r.metallicRoughnessTextureId,i.emissionSource=o?d.ZX.None:null!=r.emissiveTextureId&&r.emissiveSource===n.YJ.Emissive?d.ZX.Texture:r.usePBR?r.emissiveSource===n.YJ.Emissive?d.ZX.EmissiveColor:d.ZX.SymbolColor:d.ZX.None,i.hasOcclusionTexture=!o&&!!r.occlusionTextureId,i.offsetBackfaces=!(!this.transparent||!r.offsetTransparentBackfaces),i.oitPass=t.oitPass,i.enableOffset=t.camera.relativeElevation<g.xt,i.snowCover=t.snowCover,i.hasBloom=(0,l.LG)(e),i.hasColorTextureTransform=!!r.colorTextureTransformMatrix,i.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,i.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,i.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,i.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,i}intersect(e,t,r,o,n,s){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.i)(Me,t[12],t[13],t[14]);let s=null;switch(r.viewingMode){case a.RT.Global:s=(0,i.n)(Ae,Me);break;case a.RT.Local:s=(0,i.c)(Ae,be)}let l=0;const c=(0,i.d)(we,Me,e.eye),d=(0,i.l)(c),u=(0,i.h)(c,c,1/d);let h=null;this.parameters.screenSizePerspective&&(h=(0,i.f)(s,u)),l+=(0,$.kE)(e,d,this.parameters.verticalOffset,h??0,this.parameters.screenSizePerspective),(0,i.h)(s,s,l),(0,i.q)(Se,s,r.transform.inverseRotation),o=(0,i.d)(xe,o,Se),n=(0,i.d)(Ee,n,Se)}S(e,r,o,n,(0,z.ou)(r.verticalOffset),s)}createGLMaterial(e){return new ge(e)}createBufferWriter(){return new j(this._vertexBufferLayout)}get transparent(){return Te(this.parameters)}}class ge extends f.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.i)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?fe:ae,e)}}class _e extends ne{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}}function Te(e){const{drivenOpacity:t,opacity:r,externalColor:[i,o,n,a],layerOpacity:s,texture:l,textureId:c,textureAlphaMode:d,colorMixMode:u}=e;return t||r<1&&"replace"!==u||a<1&&"ignore"!==u||s<1||(null!=l||null!=c)&&d!==p.sf.Opaque&&d!==p.sf.Mask&&"replace"!==u}const xe=(0,o.vt)(),Ee=(0,o.vt)(),be=(0,o.fA)(0,0,1),Ae=(0,o.vt)(),Se=(0,o.vt)(),Me=(0,o.vt)(),we=(0,o.vt)()},89192:(e,t,r)=>{var i,o,n,a,s,l,c,d;r.d(t,{Am:()=>a,C7:()=>n,JS:()=>d,Mg:()=>l,dd:()=>s,it:()=>o,s2:()=>i,sf:()=>c}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(o||(o={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(n||(n={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(a||(a={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(s||(s={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee"}(l||(l={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(c||(c={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(d||(d={}))},89390:(e,t,r)=>{r.d(t,{kA:()=>w,a8:()=>S,eU:()=>M});var i=r(40876),o=(r(44208),r(38954)),n=r(51850),a=r(87317),s=r(91829),l=r(59469),c=r(23205),d=r(14314),u=r(31821);function h(e,t){const r=e.fragment,i=void 0!==t.lightingSphericalHarmonicsOrder?t.lightingSphericalHarmonicsOrder:2;0===i?(r.uniforms.add(new c.d("lightingAmbientSH0",(({lighting:e})=>(0,o.i)(m,e.sh.r[0],e.sh.g[0],e.sh.b[0])))),r.code.add(u.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
803
803
  vec3 ambientLight = 0.282095 * lightingAmbientSH0;
804
804
  return ambientLight * (1.0 - ambientOcclusion);
805
805
  }`)):1===i?(r.uniforms.add(new d.I("lightingAmbientSH_R",(({lighting:e})=>(0,a.s)(p,e.sh.r[0],e.sh.r[1],e.sh.r[2],e.sh.r[3]))),new d.I("lightingAmbientSH_G",(({lighting:e})=>(0,a.s)(p,e.sh.g[0],e.sh.g[1],e.sh.g[2],e.sh.g[3]))),new d.I("lightingAmbientSH_B",(({lighting:e})=>(0,a.s)(p,e.sh.b[0],e.sh.b[1],e.sh.b[2],e.sh.b[3])))),r.code.add(u.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
@@ -942,7 +942,7 @@ vec3 specularComponent = specularityTerrain * specularColor * mainLightRadianceC
942
942
  vec3 outColorLinear = outDiffColor + specularComponent;
943
943
  vec3 outColor = pow(outColorLinear, vec3(INV_GAMMA_SRGB));
944
944
  return outColor;
945
- }`);default:case l.A9.COUNT:}}(0,n.vt)()},89786:(e,t,r)=>{function i(e){const t=.3183098861837907;e.constants.add("PI","float",3.141592653589793),e.constants.add("LIGHT_NORMALIZATION","float",t),e.constants.add("INV_PI","float",t),e.constants.add("HALF_PI","float",1.570796326794897),e.constants.add("TWO_PI","float",6.28318530717958)}r.d(t,{p:()=>i})},90644:(e,t,r)=>{r.d(t,{Ey:()=>A,RC:()=>s,T8:()=>l,Uy:()=>h,Xt:()=>u,kn:()=>m,p3:()=>a});var i=r(89192),o=r(63907);function n(e,t,r=o.Tb.ADD,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function a(e,t,r,i,n=o.Tb.ADD,a=o.Tb.ADD,s=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:a,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}}n(o.dn.ZERO,o.dn.ONE_MINUS_SRC_ALPHA),n(o.dn.ONE,o.dn.ZERO),n(o.dn.ONE,o.dn.ONE);const s=n(o.dn.ONE,o.dn.ONE_MINUS_SRC_ALPHA),l=a(o.dn.SRC_ALPHA,o.dn.ONE,o.dn.ONE_MINUS_SRC_ALPHA,o.dn.ONE_MINUS_SRC_ALPHA),c={face:o.Y7.BACK,mode:o.Ac.CCW},d={face:o.Y7.FRONT,mode:o.Ac.CCW},u=e=>e===i.s2.Back?c:e===i.s2.Front?d:null,h={zNear:0,zFar:1},m={r:!0,g:!0,b:!0,a:!0};function p(e){return w.intern(e)}function f(e){return R.intern(e)}function v(e){return O.intern(e)}function g(e){return y.intern(e)}function _(e){return L.intern(e)}function T(e){return H.intern(e)}function x(e){return B.intern(e)}function E(e){return G.intern(e)}function b(e){return V.intern(e)}function A(e){return j.intern(e)}class S{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function M(e){return"["+e.join(",")+"]"}const w=new S(C,(e=>({__tag:"Blending",...e})));function C(e){return e?M([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const R=new S(I,(e=>({__tag:"Culling",...e})));function I(e){return e?M([e.face,e.mode]):null}const O=new S(N,(e=>({__tag:"PolygonOffset",...e})));function N(e){return e?M([e.factor,e.units]):null}const y=new S(P,(e=>({__tag:"DepthTest",...e})));function P(e){return e?M([e.func]):null}const L=new S(D,(e=>({__tag:"StencilTest",...e})));function D(e){return e?M([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const H=new S(F,(e=>({__tag:"DepthWrite",...e})));function F(e){return e?M([e.zNear,e.zFar]):null}const B=new S(U,(e=>({__tag:"ColorWrite",...e})));function U(e){return e?M([e.r,e.g,e.b,e.a]):null}const G=new S(z,(e=>({__tag:"StencilWrite",...e})));function z(e){return e?M([e.mask]):null}const V=new S(W,(e=>({__tag:"DrawBuffers",...e})));function W(e){return e?M(e.buffers):null}const j=new S((function(e){return e?M([C(e.blending),I(e.culling),N(e.polygonOffset),P(e.depthTest),D(e.stencilTest),F(e.depthWrite),U(e.colorWrite),z(e.stencilWrite),W(e.drawBuffers)]):null}),(e=>({blending:p(e.blending),culling:f(e.culling),polygonOffset:v(e.polygonOffset),depthTest:g(e.depthTest),stencilTest:_(e.stencilTest),depthWrite:T(e.depthWrite),colorWrite:x(e.colorWrite),stencilWrite:E(e.stencilWrite),drawBuffers:b(e.drawBuffers)})))},92700:(e,t,r)=>{r.d(t,{c:()=>n});var i=r(31821),o=r(46540);function n(e,t){t.hasVertexColors?(e.attributes.add(o.r.COLOR,"vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(i.H`void forwardVertexColor() { vColor = color; }`),e.vertex.code.add(i.H`void forwardNormalizedVertexColor() { vColor = color * 0.003921568627451; }`)):e.vertex.code.add(i.H`void forwardVertexColor() {}
945
+ }`);default:case l.A9.COUNT:}}(0,n.vt)()},89786:(e,t,r)=>{function i(e){const t=.3183098861837907;e.constants.add("PI","float",3.141592653589793),e.constants.add("LIGHT_NORMALIZATION","float",t),e.constants.add("INV_PI","float",t),e.constants.add("HALF_PI","float",1.570796326794897),e.constants.add("TWO_PI","float",6.28318530717958)}r.d(t,{p:()=>i})},90644:(e,t,r)=>{r.d(t,{Ey:()=>A,RC:()=>s,T8:()=>l,Uy:()=>h,Xt:()=>u,kn:()=>m,p3:()=>a});var i=r(89192),o=r(63907);function n(e,t,r=o.Tb.ADD,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function a(e,t,r,i,n=o.Tb.ADD,a=o.Tb.ADD,s=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:a,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}}n(o.dn.ZERO,o.dn.ONE_MINUS_SRC_ALPHA),n(o.dn.ONE,o.dn.ZERO),n(o.dn.ONE,o.dn.ONE);const s=n(o.dn.ONE,o.dn.ONE_MINUS_SRC_ALPHA),l=a(o.dn.SRC_ALPHA,o.dn.ONE,o.dn.ONE_MINUS_SRC_ALPHA,o.dn.ONE_MINUS_SRC_ALPHA),c={face:o.Y7.BACK,mode:o.Ac.CCW},d={face:o.Y7.FRONT,mode:o.Ac.CCW},u=e=>e===i.s2.Back?c:e===i.s2.Front?d:null,h={zNear:0,zFar:1},m={r:!0,g:!0,b:!0,a:!0};function p(e){return w.intern(e)}function f(e){return R.intern(e)}function v(e){return O.intern(e)}function g(e){return y.intern(e)}function _(e){return L.intern(e)}function T(e){return H.intern(e)}function x(e){return B.intern(e)}function E(e){return U.intern(e)}function b(e){return V.intern(e)}function A(e){return j.intern(e)}class S{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function M(e){return"["+e.join(",")+"]"}const w=new S(C,(e=>({__tag:"Blending",...e})));function C(e){return e?M([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const R=new S(I,(e=>({__tag:"Culling",...e})));function I(e){return e?M([e.face,e.mode]):null}const O=new S(N,(e=>({__tag:"PolygonOffset",...e})));function N(e){return e?M([e.factor,e.units]):null}const y=new S(P,(e=>({__tag:"DepthTest",...e})));function P(e){return e?M([e.func]):null}const L=new S(D,(e=>({__tag:"StencilTest",...e})));function D(e){return e?M([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const H=new S(F,(e=>({__tag:"DepthWrite",...e})));function F(e){return e?M([e.zNear,e.zFar]):null}const B=new S(G,(e=>({__tag:"ColorWrite",...e})));function G(e){return e?M([e.r,e.g,e.b,e.a]):null}const U=new S(z,(e=>({__tag:"StencilWrite",...e})));function z(e){return e?M([e.mask]):null}const V=new S(W,(e=>({__tag:"DrawBuffers",...e})));function W(e){return e?M(e.buffers):null}const j=new S((function(e){return e?M([C(e.blending),I(e.culling),N(e.polygonOffset),P(e.depthTest),D(e.stencilTest),F(e.depthWrite),G(e.colorWrite),z(e.stencilWrite),W(e.drawBuffers)]):null}),(e=>({blending:p(e.blending),culling:f(e.culling),polygonOffset:v(e.polygonOffset),depthTest:g(e.depthTest),stencilTest:_(e.stencilTest),depthWrite:T(e.depthWrite),colorWrite:x(e.colorWrite),stencilWrite:E(e.stencilWrite),drawBuffers:b(e.drawBuffers)})))},92700:(e,t,r)=>{r.d(t,{c:()=>n});var i=r(31821),o=r(46540);function n(e,t){t.hasVertexColors?(e.attributes.add(o.r.COLOR,"vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(i.H`void forwardVertexColor() { vColor = color; }`),e.vertex.code.add(i.H`void forwardNormalizedVertexColor() { vColor = color * 0.003921568627451; }`)):e.vertex.code.add(i.H`void forwardVertexColor() {}
946
946
  void forwardNormalizedVertexColor() {}`)}},92993:(e,t,r)=>{var i;r.d(t,{n:()=>i}),function(e){e[e.ETC1_RGB=0]="ETC1_RGB",e[e.ETC2_RGBA=1]="ETC2_RGBA",e[e.BC1_RGB=2]="BC1_RGB",e[e.BC3_RGBA=3]="BC3_RGBA",e[e.BC4_R=4]="BC4_R",e[e.BC5_RG=5]="BC5_RG",e[e.BC7_M6_RGB=6]="BC7_M6_RGB",e[e.BC7_M5_RGBA=7]="BC7_M5_RGBA",e[e.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",e[e.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",e[e.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",e[e.ATC_RGB=11]="ATC_RGB",e[e.ATC_RGBA=12]="ATC_RGBA",e[e.FXT1_RGB=17]="FXT1_RGB",e[e.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",e[e.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",e[e.ETC2_EAC_R11=20]="ETC2_EAC_R11",e[e.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",e[e.RGBA32=13]="RGBA32",e[e.RGB565=14]="RGB565",e[e.BGR565=15]="BGR565",e[e.RGBA4444=16]="RGBA4444"}(i||(i={}))},94656:(e,t,r)=>{r.d(t,{Y2:()=>d,en:()=>c});var i=r(49186),o=r(44208),n=r(53966),a=r(63907);const s=()=>n.A.getLogger("esri.views.webgl.checkWebGLError"),l=!!(0,o.A)("enable-feature:webgl-debug");function c(){return l}function d(e){if(c()){const t=e.getError();if(t){const e=function(e){switch(e){case a.bh.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case a.bh.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case a.bh.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case a.bh.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case a.bh.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case a.bh.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(t),r=(new Error).stack;s().error(new i.A("webgl-error","WebGL error occurred",{message:e,stack:r}))}}}},95774:(e,t,r)=>{r.d(t,{S:()=>m,b:()=>h});var i=r(82048),o=r(52540),n=r(68259),a=r(20304),s=r(31821),l=r(15976),c=r(63761),d=r(14113);const u=4;function h(){const e=new d.N5,t=e.fragment;e.include(i.c);const r=(u+1)/2,h=1/(2*r*r);return t.include(o.E),t.uniforms.add(new c.N("depthMap",(e=>e.depthTexture)),new l.o("tex",(e=>e.colorTexture)),new n.t("blurSize",(e=>e.blurSize)),new a.m("projScale",((e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale}))),t.code.add(s.H`
947
947
  void blurFunction(vec2 uv, float r, float center_d, float sharpness, inout float wTotal, inout float bTotal) {
948
948
  float c = texture(tex, uv).r;
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5404],{95404:(e,r,t)=>{t.d(r,{computeObjectLayerResourceSize:()=>u}),t(78888);var i=t(49186),o=t(66344),n=t(51850),s=t(70328),l=t(8887);let c=new o.q(50);async function u(e,r=null){if(!e.isPrimitive){const r=e.resource?.href;if(!r)throw new i.A("symbol:invalid-resource","The symbol does not have a valid resource");const o=c.get(r);if(void 0!==o)return o;const{fetch:l}=await Promise.all([t.e(6213),t.e(3030),t.e(2944),t.e(9899),t.e(6179),t.e(1349)]).then(t.bind(t,64304)),u=await l(r,{disableTextures:!0,spherical:!0}),a=(0,s.Ej)(u.referenceBoundingBox,(0,n.vt)());return c.put(r,a),a}if(!e.resource?.primitive)throw new i.A("symbol:invalid-resource","The symbol does not have a valid resource");const o=(0,s.vt)((0,l.Fq)(e.resource.primitive));if(null!=r)for(let e=0;e<o.length;e++)o[e]*=r;return(0,s.Ej)(o,(0,n.vt)())}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5404],{95404:(e,r,t)=>{t.d(r,{computeObjectLayerResourceSize:()=>u}),t(78888);var i=t(49186),o=t(66344),n=t(51850),s=t(70328),l=t(8887);let c=new o.q(50);async function u(e,r=null){if(!e.isPrimitive){const r=e.resource?.href;if(!r)throw new i.A("symbol:invalid-resource","The symbol does not have a valid resource");const o=c.get(r);if(void 0!==o)return o;const{fetch:l}=await Promise.all([t.e(6213),t.e(3030),t.e(2944),t.e(9899),t.e(432),t.e(1349)]).then(t.bind(t,64304)),u=await l(r,{disableTextures:!0,spherical:!0}),a=(0,s.Ej)(u.referenceBoundingBox,(0,n.vt)());return c.put(r,a),a}if(!e.resource?.primitive)throw new i.A("symbol:invalid-resource","The symbol does not have a valid resource");const o=(0,s.vt)((0,l.Fq)(e.resource.primitive));if(null!=r)for(let e=0;e<o.length;e++)o[e]*=r;return(0,s.Ej)(o,(0,n.vt)())}}}]);
@@ -60,7 +60,7 @@
60
60
  }
61
61
 
62
62
  @mixin orientedImageryViewer() {
63
- .esri-imagery-viewer {
63
+ .esri-image-viewer {
64
64
  width: 100%;
65
65
  height: 100%;
66
66
  }
@@ -238,6 +238,19 @@
238
238
  inset-inline: var(--calcite-spacing-md);
239
239
  }
240
240
 
241
+ &-container-measurement {
242
+ display: flex;
243
+ flex: none;
244
+ flex-grow: 1;
245
+ align-self: stretch;
246
+ order: 1;
247
+ border-top: var(--calcite-border-width-sm) solid var(--calcite-color-border-3);
248
+ border-radius: 0 0 var(--calcite-corner-radius-round) var(--calcite-corner-radius-round);
249
+ background: var(--calcite-color-foreground-1);
250
+ width: 100%;
251
+ height: 50%;
252
+ }
253
+
241
254
  @keyframes rotateOrientedImageryNavigationTool {
242
255
  0% {
243
256
  transform: rotate(var(--oi-navigation-tool-rotation-from, 0deg));
@@ -8,6 +8,40 @@
8
8
  &__container {
9
9
  display: flex;
10
10
  overflow: auto;
11
+
12
+ &[scale] {
13
+ calcite-panel {
14
+ .esri-selection-list__count-text {
15
+ &:not(:first-child) {
16
+ padding-top: 0;
17
+ }
18
+ }
19
+ }
20
+ }
21
+
22
+ &[scale="s"] {
23
+ .esri-selection-list__count-text,
24
+ .esri-selection-list__layer-dropdown {
25
+ padding: var(--calcite-spacing-sm);
26
+ font-size: var(--calcite-font-size-sm);
27
+ }
28
+ }
29
+
30
+ &[scale="m"] {
31
+ .esri-selection-list__count-text,
32
+ .esri-selection-list__layer-dropdown {
33
+ padding: var(--calcite-spacing-md);
34
+ font-size: var(--calcite-font-size-md);
35
+ }
36
+ }
37
+
38
+ &[scale="l"] {
39
+ .esri-selection-list__count-text,
40
+ .esri-selection-list__layer-dropdown {
41
+ padding: var(--calcite-spacing-lg);
42
+ font-size: var(--calcite-font-size-lg);
43
+ }
44
+ }
11
45
  }
12
46
 
13
47
  .esri-selection-list__list-item__feature-icon {
@@ -6,6 +6,12 @@
6
6
  flex: 1 1 0;
7
7
  width: 100%;
8
8
  height: 100%;
9
+
10
+ calcite-chip {
11
+ display: flex;
12
+ align-self: center;
13
+ margin-inline: var(--calcite-spacing-xxs);
14
+ }
9
15
  }
10
16
 
11
17
  .esri-selection-toolbar__container {