@arcgis/core 4.31.0-next.20240821 → 4.31.0-next.20240822
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{9443b9ec03f25c723c2c.js → 06d328c8aad32c52de97.js} +1 -1
- package/assets/esri/core/workers/chunks/203afe6dd0461d4bd774.js +278 -0
- package/assets/esri/core/workers/chunks/{cd9f48dcee2a1fc261ed.js → c5214a47690c594903d1.js} +25 -25
- package/assets/esri/themes/base/widgets/_Grid.scss +0 -8
- package/assets/esri/themes/base/widgets/_Print.scss +13 -15
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/Print/t9n/Print.json +1 -1
- package/assets/esri/widgets/Print/t9n/Print_en.json +1 -1
- package/chunks/ComponentShader.glsl.js +29 -29
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/chunks/Path.glsl.js +22 -17
- package/exports/csv.js +1 -1
- package/interfaces.d.ts +37 -9
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/support/highlightGroupUtils.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +3 -3
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +8 -8
- package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/Print/CustomTemplate.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Print/TemplateOptions.js +1 -1
- package/widgets/Print/utils.js +5 -0
- package/widgets/Print.js +1 -1
- package/widgets/support/exportUtils.js +1 -1
- package/assets/esri/core/workers/chunks/e5474bcde5b8fa037b56.js +0 -278
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[473],{28491:(e,t,r)=>{r.d(t,{D:()=>D,b:()=>
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[473],{28491:(e,t,r)=>{r.d(t,{D:()=>D,b:()=>V});var o=r(46686),n=r(32680),i=r(49255),a=r(76591),s=r(76597),l=r(82991),c=r(96336),d=r(10764),u=r(39014),h=r(53466),f=r(92700),m=r(72824),p=r(35640),v=r(40261),g=r(77695),x=r(3452),b=r(74081),y=r(98619),M=r(51343),T=r(62602),w=r(22393),_=r(59469),S=r(25618),A=r(51406),C=r(42398),O=r(35093),I=r(11955),E=r(27950),R=r(20693),P=r(33079),N=r(71988),B=r(20304),H=r(2597),L=r(85977),z=r(63761),F=r(46540),G=r(60517);function V(e){const t=new L.N5,{vertex:r,fragment:V,varyings:D}=t,{output:j,normalType:W,offsetBackfaces:U,instancedColor:q,spherical:k,receiveShadows:Y,snowCover:$,pbrMode:Z}=e,{multipassEnabled:X,textureAlphaPremultiplied:J,instancedDoublePrecision:K,hasVertexColors:Q,hasVertexTangents:ee}=e,{hasColorTexture:te,hasNormalTexture:re,hasNormalTextureTransform:oe,hasColorTextureTransform:ne}=e;if((0,R.NB)(r,e),t.include(d.I),D.add("vpos","vec3"),t.include(C.A,e),t.include(l.BK,e),t.include(p.G,e),t.include(A.q2,e),!(0,i.RN)(j))return t.include(v.E,e),t;t.include(A.Sx,e),t.include(A.MU,e),t.include(A.O1,e),t.include(A.QM,e),(0,R.yu)(r,e),t.include(c.Y,e),t.include(s.d,e);const ie=W===c.W.Attribute||W===c.W.Compressed;return ie&&U&&t.include(n.M),t.include(g.W,e),t.include(m.Mh,e),q&&t.attributes.add(F.r.INSTANCECOLOR,"vec4"),D.add("vPositionLocal","vec3"),t.include(h.U,e),t.include(o.oD,e),t.include(u.K,e),t.include(f.c,e),r.uniforms.add(new N.E("externalColor",(e=>e.externalColor))),D.add("vcolorExt","vec4"),X&&D.add("depth","float"),r.main.add(H.H`
|
|
2
2
|
forwardNormalizedVertexColor();
|
|
3
3
|
vcolorExt = externalColor;
|
|
4
4
|
${(0,H.If)(q,"vcolorExt *= instanceColor * 0.003921568627451;")}
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
${ie&&U?"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);":""}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
${(0,H.If)(
|
|
22
|
+
${(0,H.If)(X,"depth = (view * vec4(vpos, 1.0)).z;")}
|
|
23
23
|
forwardLinearDepth();
|
|
24
24
|
forwardTextureCoordinates();
|
|
25
25
|
forwardColorUV();
|
|
26
26
|
forwardNormalUV();
|
|
27
27
|
forwardEmissiveUV();
|
|
28
28
|
forwardOcclusionUV();
|
|
29
|
-
forwardMetallicRoughnessUV();`),t.include(b.kA,e),t.include(x.n,e),t.include(I.S,e),t.include(K?S.G:S.Bz,e),t.include(M.Q,e),t.include(a.HQ,e),t.include(
|
|
29
|
+
forwardMetallicRoughnessUV();`),t.include(b.kA,e),t.include(x.n,e),t.include(I.S,e),t.include(K?S.G:S.Bz,e),t.include(M.Q,e),t.include(a.HQ,e),t.include(G.z,e),(0,R.yu)(V,e),V.uniforms.add(r.uniforms.get("localOrigin"),new P.t("ambient",(e=>e.ambient)),new P.t("diffuse",(e=>e.diffuse)),new B.m("opacity",(e=>e.opacity)),new B.m("layerOpacity",(e=>e.layerOpacity))),te&&V.uniforms.add(new z.N("tex",(e=>e.texture))),t.include(_._Z,e),t.include(w.c,e),V.include(E.N),t.include(T.r,e),(0,b.a8)(V),(0,b.eU)(V),(0,y.O4)(V),V.main.add(H.H`
|
|
30
30
|
discardBySlice(vpos);
|
|
31
|
-
${(0,H.If)(
|
|
31
|
+
${(0,H.If)(X,"terrainDepthTest(depth);")}
|
|
32
32
|
${te?H.H`
|
|
33
33
|
vec4 texColor = texture(tex, ${ne?"colorUV":"vuv0"});
|
|
34
34
|
${(0,H.If)(J,"texColor.rgb /= texColor.a;")}
|
|
@@ -58,22 +58,22 @@
|
|
|
58
58
|
|
|
59
59
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
60
60
|
|
|
61
|
-
${
|
|
61
|
+
${Z===_.A9.Normal||Z===_.A9.Schematic?H.H`
|
|
62
62
|
float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
63
63
|
${(0,H.If)($,H.H`mrr = mix(mrr, vec3(0.0, 1.0, 0.04), snow);`)}
|
|
64
64
|
vec4 emission = ${$?"mix(getEmissions(), vec4(0.0), snow)":"getEmissions()"};
|
|
65
65
|
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:H.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
66
66
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
67
67
|
outputColorHighlightOID(finalColor, vpos);
|
|
68
|
-
`),t}const D=Object.freeze(Object.defineProperty({__proto__:null,build:
|
|
68
|
+
`),t}const D=Object.freeze(Object.defineProperty({__proto__:null,build:V},Symbol.toStringTag,{value:"Module"}))},57323:(e,t,r)=>{r.d(t,{R:()=>z,b:()=>L});var o=r(46686),n=r(32680),i=r(49255),a=r(76591),s=r(76597),l=r(82991),c=r(96336),d=r(10764),u=r(39014),h=r(53466),f=r(92700),m=r(35640),p=r(40261),v=r(3452),g=r(74081),x=r(98619),b=r(51343),y=r(22393),M=r(59469),T=r(25618),w=r(42398),_=r(35093),S=r(11955),A=r(27950),C=r(20693),O=r(33079),I=r(71988),E=r(20304),R=r(2597),P=r(85977),N=r(63761),B=r(46540),H=r(60517);function L(e){const t=new P.N5,{vertex:r,fragment:L,varyings:z}=t,{output:F,offsetBackfaces:G,instancedColor:V,multipassEnabled:D,pbrMode:j,snowCover:W,spherical:U}=e,q=j===M.A9.Normal||j===M.A9.Schematic;if((0,C.NB)(r,e),t.include(d.I),z.add("vpos","vec3"),t.include(w.A,e),t.include(l.BK,e),t.include(m.G,e),F===i.V.Color&&((0,C.yu)(t.vertex,e),t.include(c.Y,e),t.include(s.d,e),G&&t.include(n.M),V&&t.attributes.add(B.r.INSTANCECOLOR,"vec4"),z.add("vNormalWorld","vec3"),z.add("localvpos","vec3"),D&&z.add("depth","float"),t.include(h.U,e),t.include(o.oD,e),t.include(u.K,e),t.include(f.c,e),r.uniforms.add(new I.E("externalColor",(e=>e.externalColor))),z.add("vcolorExt","vec4"),r.main.add(R.H`
|
|
69
69
|
forwardNormalizedVertexColor();
|
|
70
70
|
vcolorExt = externalColor;
|
|
71
|
-
${(0,
|
|
71
|
+
${(0,R.If)(V,"vcolorExt *= instanceColor * 0.003921568627451;")}
|
|
72
72
|
vcolorExt *= vvColor();
|
|
73
73
|
vcolorExt *= getSymbolColor();
|
|
74
74
|
forwardColorMixMode();
|
|
75
75
|
|
|
76
|
-
if (vcolorExt.a < ${
|
|
76
|
+
if (vcolorExt.a < ${R.H.float(_.Q)}) {
|
|
77
77
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
78
78
|
} else {
|
|
79
79
|
vpos = getVertexInLocalOriginSpace();
|
|
@@ -82,15 +82,15 @@
|
|
|
82
82
|
vNormalWorld = dpNormal(vvLocalNormal(normalModel()));
|
|
83
83
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
84
84
|
gl_Position = transformPosition(proj, view, vpos);
|
|
85
|
-
${(0,
|
|
85
|
+
${(0,R.If)(G,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
|
|
86
86
|
}
|
|
87
|
-
${(0,
|
|
87
|
+
${(0,R.If)(D,"depth = (view * vec4(vpos, 1.0)).z;")}
|
|
88
88
|
forwardLinearDepth();
|
|
89
|
-
forwardTextureCoordinates();`)),
|
|
89
|
+
forwardTextureCoordinates();`)),F===i.V.Color){const{hasColorTexture:o,hasColorTextureTransform:n,receiveShadows:i}=e;t.include(g.kA,e),t.include(v.n,e),t.include(S.S,e),t.include(e.instancedDoublePrecision?T.G:T.Bz,e),t.include(b.Q,e),t.include(a.HQ,e),t.include(H.z,e),(0,C.yu)(t.fragment,e),(0,x.Gc)(L),(0,g.a8)(L),(0,g.eU)(L),L.uniforms.add(r.uniforms.get("localOrigin"),r.uniforms.get("view"),new O.t("ambient",(e=>e.ambient)),new O.t("diffuse",(e=>e.diffuse)),new E.m("opacity",(e=>e.opacity)),new E.m("layerOpacity",(e=>e.layerOpacity))),o&&L.uniforms.add(new N.N("tex",(e=>e.texture))),t.include(M._Z,e),t.include(y.c,e),L.include(A.N),(0,x.O4)(L),L.main.add(R.H`
|
|
90
90
|
discardBySlice(vpos);
|
|
91
|
-
${(0,
|
|
91
|
+
${(0,R.If)(D,"terrainDepthTest(depth);")}
|
|
92
92
|
vec4 texColor = ${o?`texture(tex, ${n?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
|
93
|
-
${(0,
|
|
93
|
+
${(0,R.If)(o,`${(0,R.If)(e.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
|
|
94
94
|
vec3 viewDirection = normalize(vpos - cameraPosition);
|
|
95
95
|
applyPBRFactors();
|
|
96
96
|
float ssao = evaluateAmbientOcclusionInverse();
|
|
@@ -100,11 +100,11 @@
|
|
|
100
100
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
101
101
|
float shadow = ${i?"readShadowMap(vpos, linearDepth)":U?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
|
|
102
102
|
vec3 matColor = max(ambient, diffuse);
|
|
103
|
-
${e.hasVertexColors?
|
|
104
|
-
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:
|
|
103
|
+
${e.hasVertexColors?R.H`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
|
|
104
|
+
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:R.H`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
|
|
105
105
|
float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));`}
|
|
106
|
-
${(0,
|
|
107
|
-
${
|
|
106
|
+
${(0,R.If)(W,"albedo = mix(albedo, vec3(1), 0.9);")}
|
|
107
|
+
${R.H`vec3 shadingNormal = normalize(vNormalWorld);
|
|
108
108
|
albedo *= 1.2;
|
|
109
109
|
vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
|
|
110
110
|
float alignmentLightView = clamp(dot(viewForward, -mainLightDirection), 0.0, 1.0);
|
|
@@ -112,11 +112,11 @@
|
|
|
112
112
|
float treeRadialFalloff = vColor.r;
|
|
113
113
|
float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
|
|
114
114
|
additionalLight += backLightFactor * mainLightIntensity;`}
|
|
115
|
-
${(0,
|
|
116
|
-
${q?
|
|
117
|
-
${(0,
|
|
115
|
+
${(0,R.If)(q,`vec3 normalGround = ${U?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};`)}
|
|
116
|
+
${q?R.H`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
117
|
+
${(0,R.If)(W,R.H`mrr = vec3(0.0, 1.0, 0.04);`)}
|
|
118
118
|
vec4 emission = ${W?"vec4(0.0)":"getEmissions()"};
|
|
119
|
-
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:
|
|
119
|
+
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:R.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
120
120
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
121
121
|
outputColorHighlightOID(finalColor, vpos);`)}return t.include(p.E,e),t}const z=Object.freeze(Object.defineProperty({__proto__:null,build:L},Symbol.toStringTag,{value:"Module"}))},15581:(e,t,r)=>{r.d(t,{S:()=>g,b:()=>m,g:()=>p});var o=r(37585),n=r(48163),i=r(82048),a=r(52540),s=r(34845),l=r(47286),c=r(20304),d=r(2597),u=r(85977),h=r(63761);const f=16;function m(){const e=new u.N5,t=e.fragment;return e.include(i.c),e.include(s.Ir),t.include(a.E),t.uniforms.add(new c.m("radius",((e,t)=>p(t.camera)))).code.add(d.H`vec3 sphere[16] = vec3[16](
|
|
122
122
|
vec3(0.186937, 0.0, 0.0),
|
|
@@ -221,7 +221,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
221
221
|
vec2 uvOffset = uv + rf * blurSize;
|
|
222
222
|
blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
|
|
223
223
|
}
|
|
224
|
-
fragBlur = b / w_total;`),e}const m=Object.freeze(Object.defineProperty({__proto__:null,build:f},Symbol.toStringTag,{value:"Module"}))},76412:(e,t,r)=>{r.d(t,{c:()=>p,d:()=>x,f:()=>M,g:()=>y,h:()=>b,k:()=>C,o:()=>B}),r(44208),r(53966);var o=r(34727),n=r(58083),i=r(38954),a=r(51850),s=r(87317),l=r(91829),c=r(34304),d=r(88582),u=r(71351),h=r(44280),f=r(32114);const m=p();function p(){return(0,l.vt)()}const v=s.e,g=s.e;function x(e,t){return(0,s.c)(t,e)}function b(e){return e[3]}function y(e){return e}function M(e,t,r,o){return(0,l.fA)(e,t,r,o)}function T(e,t,r){if(null==t)return!1;if(!_(e,t,w))return!1;let{t0:o,t1:n}=w;if((o<0||n<o&&n>0)&&(o=n),o<0)return!1;if(r){const{origin:e,direction:n}=t;r[0]=e[0]+n[0]*o,r[1]=e[1]+n[1]*o,r[2]=e[2]+n[2]*o}return!0}const w={t0:0,t1:0};function _(e,t,r){const{origin:o,direction:n}=t,i=S;i[0]=o[0]-e[0],i[1]=o[1]-e[1],i[2]=o[2]-e[2];const a=n[0]*n[0]+n[1]*n[1]+n[2]*n[2];if(0===a)return!1;const s=2*(n[0]*i[0]+n[1]*i[1]+n[2]*i[2]),l=s*s-4*a*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-e[3]*e[3]);if(l<0)return!1;const c=Math.sqrt(l);return r.t0=(-s-c)/(2*a),r.t1=(-s+c)/(2*a),!0}const S=(0,a.vt)();function C(e,t){return T(e,t,null)}function A(e,t,r){const o=f.rq.get(),a=f.Rc.get();(0,i.b)(o,t.origin,t.direction);const s=b(e);(0,i.b)(r,o,t.origin),(0,i.j)(r,r,1/(0,i.l)(r)*s);const l=I(e,t.origin),c=(0,h.g7)(t.origin,r);return(0,n.$0)(a,c+l,o),(0,i.h)(r,r,a),r}function O(e,t,r){const o=(0,i.f)(f.rq.get(),t,e),n=(0,i.j)(f.rq.get(),o,e[3]/(0,i.l)(o));return(0,i.g)(r,n,e)}function I(e,t){const r=(0,i.f)(f.rq.get(),t,e),n=(0,i.l)(r),a=b(e),s=a+Math.abs(a-n);return(0,o.XM)(a/s)}const E=(0,a.vt)();function P(e,t,r,n){const a=(0,i.f)(E,t,e);switch(r){case d._.X:{const e=(0,o.jU)(a,E)[2];return(0,i.s)(n,-Math.sin(e),Math.cos(e),0)}case d._.Y:{const e=(0,o.jU)(a,E),t=e[1],r=e[2],s=Math.sin(t);return(0,i.s)(n,-s*Math.cos(r),-s*Math.sin(r),Math.cos(t))}case d._.Z:return(0,i.n)(n,a);default:return}}function R(e,t){const r=(0,i.f)(N,t,e);return(0,i.l)(r)-e[3]}function B(e,t){const r=(0,i.a)(e,t),o=b(e);return r<=o*o}const N=(0,a.vt)(),H=p();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:m,altitudeAt:R,angleToSilhouette:I,axisAt:P,cameraFrustumCoverage:function(e,t,r,o){const n=b(e),i=n*n,a=t+.5*Math.PI,s=r*r+i-2*Math.cos(a)*r*n,l=Math.sqrt(s),c=s-i;if(c<=0)return.5;const d=Math.sqrt(c),u=Math.acos(d/l)-Math.asin(n/(l/Math.sin(a)));return Math.min(1,(u+.5*o)/o)},clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,r){return T(e,t,r)?r:((0,u.oC)(t,e,r),O(e,r,r))},closestPointOnSilhouette:A,containsPoint:B,copy:x,create:p,distanceToSilhouette:function(e,t){const r=(0,i.f)(f.rq.get(),t,e),o=(0,i.q)(r),n=e[3]*e[3];return Math.sqrt(Math.abs(o-n))},elevate:function(e,t,r){return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=e[3]+t,r},equals:g,exactEquals:v,fromCenterAndRadius:function(e,t){return(0,l.fA)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:M,getCenter:y,getExtent:function(e,t){return t},getRadius:b,intersectLine:function(e,t,r){const o=(0,u.Cr)(t,r);if(!_(e,o,w))return[];const{origin:n,direction:s}=o,{t0:l,t1:d}=w,h=t=>{const r=(0,a.vt)();return(0,i.r)(r,n,s,t),O(e,r,r)};return Math.abs(l-d)<(0,c.FD)()?[h(l)]:[h(l),h(d)]},intersectRay:T,intersectRayClosestSilhouette:function(e,t,r){if(T(e,t,r))return r;const o=A(e,t,f.rq.get());return(0,i.g)(r,t.origin,(0,i.j)(f.rq.get(),t.direction,(0,i.p)(t.origin,o)/(0,i.l)(t.direction))),r},intersectsRay:C,projectPoint:O,setAltitudeAt:function(e,t,r,o){const n=R(e,t),a=P(e,t,d._.Z,N),s=(0,i.j)(N,a,r-n);return(0,i.g)(o,t,s)},setExtent:function(e,t,r){return e!==r&&x(e,r),r},tmpSphere:H,union:function(e,t,r=(0,l.vt)()){const o=(0,i.p)(e,t),n=e[3],a=t[3];return o+a<n?((0,s.c)(r,e),r):o+n<a?((0,s.c)(r,t),r):((0,i.o)(r,e,t,(o+a-n)/(2*o)),r[3]=(o+n+a)/2,r)},wrap:function(e){return e}},Symbol.toStringTag,{value:"Module"}))},43609:(e,t,r)=>{r.d(t,{a:()=>i,f:()=>a,n:()=>n});var o=r(34275);function n(e,t){i(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r=2,n=r){const i=t.length/2;let a=0,s=0;if((0,o.cy)(t)||(0,o.dk)(t)){for(let o=0;o<i;++o)e[a]=t[s],e[a+1]=t[s+1],a+=r,s+=n;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<i;++o)e[a]=Math.max(t[s]/l,-1),e[a+1]=Math.max(t[s+1]/l,-1),a+=r,s+=n;else for(let o=0;o<i;++o)e[a]=t[s]/l,e[a+1]=t[s+1]/l,a+=r,s+=n}function a(e,t,r,o){const n=e.typedBuffer,i=e.typedBufferStride,a=o?.count??e.count;let s=(o?.dstIndex??0)*i;for(let e=0;e<a;++e)n[s]=t,n[s+1]=r,s+=i}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:i,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354:(e,t,r)=>{function o(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,o=3,n=o){if(e.length/o!==Math.ceil(t.length/n))return e;const i=e.length/o,a=r[0],s=r[1],l=r[2],c=r[4],d=r[5],u=r[6],h=r[8],f=r[9],m=r[10],p=r[12],v=r[13],g=r[14];let x=0,b=0;for(let r=0;r<i;r++){const r=t[x],i=t[x+1],y=t[x+2];e[b]=a*r+c*i+h*y+p,e[b+1]=s*r+d*i+f*y+v,e[b+2]=l*r+u*i+m*y+g,x+=n,b+=o}return e}function i(e,t,r){a(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r,o=3,n=o){if(e.length/o!==Math.ceil(t.length/n))return;const i=e.length/o,a=r[0],s=r[1],l=r[2],c=r[3],d=r[4],u=r[5],h=r[6],f=r[7],m=r[8];let p=0,v=0;for(let r=0;r<i;r++){const r=t[p],i=t[p+1],g=t[p+2];e[v]=a*r+c*i+h*g,e[v+1]=s*r+d*i+f*g,e[v+2]=l*r+u*i+m*g,p+=n,v+=o}}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o=3,n=o){const i=Math.min(e.length/o,t.length/n);let a=0,s=0;for(let l=0;l<i;l++)e[s]=r*t[a],e[s+1]=r*t[a+1],e[s+2]=r*t[a+2],a+=n,s+=o;return e}function c(e,t,r,o=3,n=o){const i=e.length/o;if(i!==Math.ceil(t.length/n))return e;let a=0,s=0;for(let l=0;l<i;l++)e[s]=t[a]+r[0],e[s+1]=t[a+1]+r[1],e[s+2]=t[a+2]+r[2],a+=n,s+=o;return e}function d(e,t){u(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r=3,o=r){const n=Math.min(e.length/r,t.length/o);let i=0,a=0;for(let s=0;s<n;s++){const n=t[i],s=t[i+1],l=t[i+2],c=n*n+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[a]=t*n,e[a+1]=t*s,e[a+2]=t*l}i+=o,a+=r}}r.d(t,{a:()=>n,b:()=>c,c:()=>i,d:()=>o,e:()=>d,f:()=>l,n:()=>u,s:()=>s,t:()=>a}),r(44208),r(53966),Object.freeze(Object.defineProperty({__proto__:null,normalize:u,normalizeView:d,scale:l,scaleView:s,shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),n=e.typedBuffer,i=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)n[c]=a[l]>>r,n[c+1]=a[l+1]>>r,n[c+2]=a[l+2]>>r,l+=s,c+=i},transformMat3:a,transformMat3View:i,transformMat4:n,transformMat4View:o,translate:c},Symbol.toStringTag,{value:"Module"}))},51737:(e,t,r)=>{function o(e,t){n(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r=3,o=r){const n=t.length/o;let i=0,a=0;for(let s=0;s<n;++s)e[i]=t[a],e[i+1]=t[a+1],e[i+2]=t[a+2],i+=r,a+=o}function i(e,t,r,o,n){const i=e.typedBuffer,a=e.typedBufferStride,s=n?.count??e.count;let l=(n?.dstIndex??0)*a;for(let e=0;e<s;++e)i[l]=t,i[l+1]=r,i[l+2]=o,l+=a}r.d(t,{a:()=>o,c:()=>n,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,copy:n,copyView:o,fill:i},Symbol.toStringTag,{value:"Module"}))},65686:(e,t,r)=>{r.d(t,{a:()=>n,b:()=>l,n:()=>a,s:()=>s,t:()=>i}),r(44208);var o=r(53966);function n(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,o=4,n=o){if(e.length/o!=t.length/n)return;const i=e.length/o,a=r[0],s=r[1],l=r[2],c=r[3],d=r[4],u=r[5],h=r[6],f=r[7],m=r[8];let p=0,v=0;for(let r=0;r<i;r++){const r=t[p],i=t[p+1],g=t[p+2],x=t[p+3];e[v]=a*r+c*i+h*g,e[v+1]=s*r+d*i+f*g,e[v+2]=l*r+u*i+m*g,e[v+3]=x,p+=n,v+=o}}function a(e,t){const r=Math.min(e.count,t.count),o=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){const t=e*n,r=e*a,s=i[r],l=i[r+1],c=i[r+2],d=s*s+l*l+c*c;if(d>0){const e=1/Math.sqrt(d);o[t]=e*s,o[t+1]=e*l,o[t+2]=e*c}}}function s(e,t,r){l(e.typedBuffer,t,r,e.typedBufferStride)}function l(e,t,r,o=4){const n=Math.min(e.length/o,t.count),i=t.typedBuffer,a=t.typedBufferStride;let s=0,l=0;for(let t=0;t<n;t++)e[l]=r*i[s],e[l+1]=r*i[s+1],e[l+2]=r*i[s+2],e[l+3]=r*i[s+3],s+=a,l+=o}Object.freeze(Object.defineProperty({__proto__:null,normalize:a,scale:l,scaleView:s,transformMat3:i,transformMat3View:n,transformMat4:function(e,t,r,n=4,i=n){if(e.length/n!=t.length/i)return void o.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const a=e.length/n,s=r[0],l=r[1],c=r[2],d=r[3],u=r[4],h=r[5],f=r[6],m=r[7],p=r[8],v=r[9],g=r[10],x=r[11],b=r[12],y=r[13],M=r[14],T=r[15];let w=0,_=0;for(let r=0;r<a;r++){const r=t[w],o=t[w+1],a=t[w+2],S=t[w+3];e[_]=s*r+u*o+p*a+b*S,e[_+1]=l*r+h*o+v*a+y*S,e[_+2]=c*r+f*o+g*a+M*S,e[_+3]=d*r+m*o+x*a+T*S,w+=i,_+=n}},transformMat4View:function(e,t,r){if(e.count!==t.count)return;const o=e.count,n=r[0],i=r[1],a=r[2],s=r[3],l=r[4],c=r[5],d=r[6],u=r[7],h=r[8],f=r[9],m=r[10],p=r[11],v=r[12],g=r[13],x=r[14],b=r[15],y=e.typedBuffer,M=e.typedBufferStride,T=t.typedBuffer,w=t.typedBufferStride;for(let e=0;e<o;e++){const t=e*M,r=e*w,o=T[r],_=T[r+1],S=T[r+2],C=T[r+3];y[t]=n*o+l*_+h*S+v*C,y[t+1]=i*o+c*_+f*S+g*C,y[t+2]=a*o+d*_+m*S+x*C,y[t+3]=s*o+u*_+p*S+b*C}}},Symbol.toStringTag,{value:"Module"}))},78358:(e,t,r)=>{function o(e,t){n(e.typedBuffer,t,e.typedBufferStride)}function n(e,t,r=4){const o=t.typedBuffer,n=t.typedBufferStride,i=t.count;let a=0,s=0;for(let t=0;t<i;++t)e[a]=o[s],e[a+1]=o[s+1],e[a+2]=o[s+2],e[a+3]=o[s+3],a+=r,s+=n}function i(e,t,r,o,n,i){const a=e.typedBuffer,s=e.typedBufferStride,l=i?.count??e.count;let c=(i?.dstIndex??0)*s;for(let e=0;e<l;++e)a[c]=t,a[c+1]=r,a[c+2]=o,a[c+3]=n,c+=s}r.d(t,{a:()=>n,c:()=>o,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,copy:n,copyView:o,fill:i},Symbol.toStringTag,{value:"Module"}))},4341:(e,t,r)=>{r.d(t,{I:()=>n});var o=r(26390);class n{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,o.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,i));e++)this._items.push(this._allocator())}}const i=1024},46140:(e,t,r)=>{r.d(t,{R:()=>n});var o=r(49186);let n=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[n,i]=t.split("."),a=/^\s*\d+\s*$/;if(!n?.match||!a.test(n))throw new o.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!i?.match||!a.test(i))throw new o.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const s=parseInt(n,10),l=parseInt(i,10);return new e(s,l,r)}}},61473:(e,t,r)=>{function o(e){return e=e||globalThis.location.hostname,c.some((t=>null!=e?.match(t)))}function n(e,t){return e&&(t=t||globalThis.location.hostname)?null!=t.match(i)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(a)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e}r.d(t,{EM:()=>n,b5:()=>o});const i=/^devext\.arcgis\.com$/,a=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,i,a,/^jsapps\.esri\.com$/,s,l]},88340:(e,t,r)=>{function o(){return new Float32Array(2)}function n(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function i(){return o()}function a(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{Un:()=>d,fA:()=>n,uY:()=>c,vt:()=>o});const c=i(),d=a(),u=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:u,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,createView:function(e,t){return new Float32Array(e,t,2)},fromValues:n,ones:a,unitX:s,unitY:l,zeros:i},Symbol.toStringTag,{value:"Module"}))},11868:(e,t,r)=>{r.d(t,{oe:()=>n});var o=r(34275);function n(e,t=!1){return e<=o.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}},71351:(e,t,r)=>{r.d(t,{Cr:()=>d,LV:()=>c,kb:()=>u,oC:()=>h,vt:()=>s}),r(4576);var o=r(4341),n=r(38954),i=r(51850),a=r(32114);function s(e){return e?l((0,i.o8)(e.origin),(0,i.o8)(e.direction)):l((0,i.vt)(),(0,i.vt)())}function l(e,t){return{origin:e,direction:t}}function c(e,t){const r=f.get();return r.origin=e,r.direction=t,r}function d(e,t,r=s()){return(0,n.c)(r.origin,e),(0,n.f)(r.direction,t,e),r}function u(e,t){const r=(0,n.b)(a.rq.get(),(0,n.n)(a.rq.get(),e.direction),(0,n.f)(a.rq.get(),t,e.origin));return(0,n.m)(r,r)}function h(e,t,r){const o=(0,n.m)(e.direction,(0,n.f)(r,t,e.origin));return(0,n.g)(r,e.origin,(0,n.j)(r,e.direction,o)),r}const f=new o.I((()=>s()));(0,i.vt)()},21015:(e,t,r)=>{r.d(t,{R:()=>l});var o=r(78888),n=r(60999),i=r(49186),a=r(74887),s=r(84952);class l{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,a.Te)(t),(0,s.lJ)(e)):this._load("binary",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){if(null==this._streamDataRequester)return(await(0,o.A)(t,{responseType:c[e]})).data;const s=await(0,n.Ke)(this._streamDataRequester.request(t,e,r));if(!0===s.ok)return s.value;throw(0,a.QP)(s.error),new i.A("",`Request for resource failed: ${s.error}`)}}const c={image:"image",binary:"array-buffer",json:"json","image+type":void 0}},84498:(e,t,r)=>{r.d(t,{x:()=>a});var o=r(34275),n=r(97146),i=r(63907);function a(e,t){switch(t){case i.WR.TRIANGLES:return"number"==typeof(r=e)?(0,n.tM)(r):(0,o.mg)(r)?new Uint16Array(r):r;case i.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(o[t++]=e[n],o[t++]=e[n+1],o[t++]=e[n+2]):(o[t++]=e[n+1],o[t++]=e[n],o[t++]=e[n+2])}return o}(e);case i.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const n=e[0];let i=e[1],a=0;for(let t=0;t<r;++t){const r=e[t+2];o[a++]=n,o[a++]=i,o[a++]=r,i=r}return o}(e)}var r}},51530:(e,t,r)=>{r.d(t,{KB:()=>s,Xi:()=>i,pn:()=>l,x3:()=>a});var o=r(44208),n=r(89192);class i{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=n.JS.KTX2_ENCODING}}function a(e){return"encoded-mesh-texture"===e?.type}async function s(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function l(e,t){if(t===n.JS.KTX2_ENCODING)return new i(e);const r=new Blob([e],{type:t}),a=URL.createObjectURL(r),s=new Image;if((0,o.A)("esri-iPhone"))return new Promise(((e,t)=>{const r=()=>{n(),e(s)},o=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(a),s.removeEventListener("load",r),s.removeEventListener("error",o)};s.addEventListener("load",r),s.addEventListener("error",o),s.src=a}));try{s.src=a,await s.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(a),s}},2701:(e,t,r)=>{r.d(t,{fetch:()=>Ft});var o=r(61473),n=r(34727),i=r(77690),a=r(29242),s=r(58083),l=r(9093),c=r(48163),d=r(38954),u=r(51850),h=r(70328),f=r(11868),m=r(13030),p=r(73354),v=r(65686),g=r(43609),x=r(51737),b=r(78358),y=r(21015),M=r(84498),T=r(51530),w=r(88340);function _(e){if(null==e)return null;const t=null!=e.offset?e.offset:w.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:w.Un,n=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,a.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,a.vt)();return(0,i.lw)(c,s,l),(0,i.lw)(c,n,c),c}class S{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new S,this.numberOfVertices=0}}var A=r(78888),O=r(60999),I=r(86805),E=r(49186),P=r(53966),R=r(81139),B=r(74887),N=r(46140),H=r(97146),L=r(99677),z=r(46610),V=r(89192),F=r(34275);function G(e){if(e.length<F.y9)return Array.from(e);if((0,F.cy)(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,F.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}var D=r(3694),j=r(620);class W{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._children=void 0,(0,j.vA)(e.length>=1),(0,j.vA)(3===r.size||4===r.size);const{data:o,size:n,indices:i}=r;(0,j.vA)(i.length%this._numIndexPerPrimitive==0),(0,j.vA)(i.length>=e.length*this._numIndexPerPrimitive);const a=e.length;let s=n*i[this._numIndexPerPrimitive*e[0]];U.clear(),U.push(s);const l=(0,u.fA)(o[s],o[s+1],o[s+2]),c=(0,u.o8)(l);for(let t=0;t<a;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){s=n*i[r+e],U.push(s);let t=o[s];l[0]=Math.min(t,l[0]),c[0]=Math.max(t,c[0]),t=o[s+1],l[1]=Math.min(t,l[1]),c[1]=Math.max(t,c[1]),t=o[s+2],l[2]=Math.min(t,l[2]),c[2]=Math.max(t,c[2])}}this.bbMin=l,this.bbMax=c;const h=(0,d.o)((0,u.vt)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(c[0]-l[0],c[1]-l[1]),c[2]-l[2]);let f=this.radius*this.radius;for(let e=0;e<U.length;++e){s=U.at(e);const t=o[s]-h[0],r=o[s+1]-h[1],n=o[s+2]-h[2],i=t*t+r*r+n*n;if(i<=f)continue;const a=Math.sqrt(i),l=.5*(a-this.radius);this.radius=this.radius+l,f=this.radius*this.radius;const c=l/a;h[0]+=t*c,h[1]+=r*c,h[2]+=n*c}this.center=h,U.clear()}getChildren(){if(this._children||(0,d.a)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,d.o)((0,u.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),o=new Array(8);for(let e=0;e<8;++e)o[e]=0;const{data:n,size:i,indices:a}=this.position;for(let s=0;s<t;++s){let t=0;const l=this._numIndexPerPrimitive*this.primitiveIndices[s];let c=i*a[l],d=n[c],u=n[c+1],h=n[c+2];for(let e=1;e<this._numIndexPerPrimitive;++e){c=i*a[l+e];const t=n[c],r=n[c+1],o=n[c+2];t<d&&(d=t),r<u&&(u=r),o<h&&(h=o)}d<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),r[s]=t,++o[t]}let s=0;for(let e=0;e<8;++e)o[e]>0&&++s;if(s<2)return;const l=new Array(8);for(let e=0;e<8;++e)l[e]=o[e]>0?new Uint32Array(o[e]):void 0;for(let e=0;e<8;++e)o[e]=0;for(let e=0;e<t;++e){const t=r[e];l[t][o[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==l[e]&&this._children.push(new W(l[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){U.prune()}}const U=new D.A({deallocator:null});var q=r(69720),k=r(96672),Y=r(4341),$=r(11964);function X(e,t,r){return(0,d.f)(Z,t,e),(0,d.f)(J,r,e),.5*(0,d.l)((0,d.b)(Z,Z,J))}r(32114),new Y.I($.vt),new Y.I((()=>{return e?{p0:(0,u.o8)(e.p0),p1:(0,u.o8)(e.p1),p2:(0,u.o8)(e.p2)}:{p0:(0,u.vt)(),p1:(0,u.vt)(),p2:(0,u.vt)()};var e}));const Z=(0,u.vt)(),J=(0,u.vt)(),K=(0,u.vt)(),Q=(0,u.vt)(),ee=(0,u.vt)(),te=(0,u.vt)();var re=r(24326);class oe{constructor(e){this.channel=e,this.id=(0,re.c)()}}var ne=r(46540);r(28449),(0,u.vt)(),new Float32Array(6);class ie extends q.J{constructor(e,t,r=null,o=k.X.Mesh,n=null,i=-1){super(),this.material=e,this.mapPositions=r,this.type=o,this.objectAndLayerIdColor=n,this.edgeIndicesLength=i,this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[e,r]of t)this._attributes.set(e,{...r,indices:(0,H.Dg)(r.indices)}),e===ne.r.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(e).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new ie(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:G(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})}get indexCount(){const e=this._attributes.values().next().value.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===k.X.Mesh?this._computeAttachmentOriginTriangles(e):this.type===k.X.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,d.h)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:r,data:o,indices:n}=e;(0,d.s)(t,0,0,0),(0,d.s)(te,0,0,0);let i=0,a=0;for(let e=0;e<n.length-2;e+=3){const s=n[e]*r,l=n[e+1]*r,c=n[e+2]*r;(0,d.s)(K,o[s],o[s+1],o[s+2]),(0,d.s)(Q,o[l],o[l+1],o[l+2]),(0,d.s)(ee,o[c],o[c+1],o[c+2]);const u=X(K,Q,ee);u?((0,d.g)(K,K,Q),(0,d.g)(K,K,ee),(0,d.j)(K,K,1/3*u),(0,d.g)(t,t,K),i+=u):((0,d.g)(te,te,K),(0,d.g)(te,te,Q),(0,d.g)(te,te,ee),a+=3)}return!(0===a&&0===i||(0!==i?((0,d.j)(t,t,1/i),0):0===a||((0,d.j)(t,te,1/a),0)))}(this.attributes.get(ne.r.POSITION),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get(ne.r.POSITION);return function(e,t,r){if(!e)return!1;(0,d.s)(r,0,0,0),(0,d.s)(te,0,0,0);let o=0,n=0;const{size:i,data:a,indices:s}=e,l=s.length-1,c=l+(t?2:0);for(let e=0;e<c;e+=2){const t=e<l?e+1:0,c=s[e<l?e:l]*i,u=s[t]*i;K[0]=a[c],K[1]=a[c+1],K[2]=a[c+2],Q[0]=a[u],Q[1]=a[u+1],Q[2]=a[u+2],(0,d.j)(K,(0,d.g)(K,K,Q),.5);const h=(0,d.F)(K,Q);h>0?((0,d.g)(r,r,(0,d.j)(K,K,h)),o+=h):0===o&&((0,d.g)(te,te,K),n++)}return 0!==o?((0,d.j)(r,r,1/o),!0):0!==n&&((0,d.j)(r,te,1/n),!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:o,indices:n}=e;(0,d.s)(t,0,0,0);let i=-1,a=0;for(let e=0;e<n.length;e++){const s=n[e]*r;i!==s&&(t[0]+=o[s],t[1]+=o[s+1],t[2]+=o[s+2],a++),i=s}return a>1&&(0,d.j)(t,t,1/a),a>0}(this.attributes.get(ne.r.POSITION),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(ne.r.POSITION);if(!e||0===e.indices.length)return null;const t=this.type===k.X.Mesh?3:1;(0,j.vA)(e.indices.length%t==0,"Indexing error: "+e.indices.length+" not divisible by "+t);const r=(0,H.tM)(e.indices.length/t);return new W(r,t,e)}get transformation(){return this._transformation??l.zK}set transformation(e){this._transformation=e&&e!==l.zK?(0,l.o8)(e):null}addHighlight(){const e=new oe(V.Mg.Highlight);return this.highlights=function(e,t){return null==e&&(e=[]),e.push(t),e}(this.highlights,e),e}removeHighlight(e){this.highlights=function(e,t){if(null==e)return null;const r=e.filter((e=>e!==t));return 0===r.length?null:r}(this.highlights,e)}}var ae=r(76844),se=r(44208),le=r(24151),ce=r(1843),de=r(49255),ue=r(96336),he=r(22911),fe=r(62602),me=r(59469),pe=r(35093),ve=r(25634),ge=r(14903),xe=r(33524);class be{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const ye=(0,h.vt)();function Me(e,t,r,o,n,i){if(!e.visible)return;const a=(0,d.z)(Ne,o,r),s=(e,t,r)=>{i(e,r,t,!1)},l=new be(!1,t.options.normalRequired);if(e.boundingInfo){(0,j.vA)(e.type===k.X.Mesh);const o=t.tolerance;we(e.boundingInfo,r,a,o,n,l,s)}else{const t=e.attributes.get(ne.r.POSITION),o=t.indices;!function(e,t,r,o,n,i,a,s,l,c){const u=t,h=He,f=Math.abs(u[0]),m=Math.abs(u[1]),p=Math.abs(u[2]),v=f>=m?f>=p?0:2:m>=p?1:2,g=v,x=u[g]<0?2:1,b=(v+x)%3,y=(v+(3-x))%3,M=u[b]/u[g],T=u[y]/u[g],w=1/u[g],_=Se,S=Ce,C=Ae,{normalRequired:A}=l;for(let t=r;t<o;++t){const r=3*t,o=a*n[r];(0,d.s)(h[0],i[o+0],i[o+1],i[o+2]);const l=a*n[r+1];(0,d.s)(h[1],i[l+0],i[l+1],i[l+2]);const u=a*n[r+2];(0,d.s)(h[2],i[u+0],i[u+1],i[u+2]),s&&((0,d.c)(h[0],s.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,d.c)(h[1],s.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,d.c)(h[2],s.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,d.z)(_,h[0],e),(0,d.z)(S,h[1],e),(0,d.z)(C,h[2],e);const f=_[b]-M*_[g],m=_[y]-T*_[g],p=S[b]-M*S[g],v=S[y]-T*S[g],x=C[b]-M*C[g],O=C[y]-T*C[g],I=x*v-O*p,E=f*O-m*x,P=p*m-v*f;if((I<0||E<0||P<0)&&(I>0||E>0||P>0))continue;const R=I+E+P;if(0===R)continue;const B=I*(w*_[g])+E*(w*S[g])+P*(w*C[g]);if(B*Math.sign(R)<0)continue;const N=B/R;N>=0&&c(N,t,A?Ie(h):null)}}(r,a,0,o.length/3,o,t.data,t.stride,n,l,s)}}const Te=(0,u.vt)();function we(e,t,r,o,n,i,a){if(null==e)return;const s=function(e,t){return(0,d.s)(t,1/e[0],1/e[1],1/e[2])}(r,Te);if((0,h.Ne)(ye,e.bbMin),(0,h.vI)(ye,e.bbMax),null!=n&&n.applyToAabb(ye),function(e,t,r,o){return function(e,t,r,o){const n=(e[0]-o-t[0])*r[0],i=(e[3]+o-t[0])*r[0];let a=Math.min(n,i),s=Math.max(n,i);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-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]-o-t[2])*r[2],u=(e[5]+o-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,o)}(ye,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>Re){const s=e.getChildren();if(void 0!==s){for(const e of s)we(e,t,r,o,n,i,a);return}}!function(e,t,r,o,n,i,a,s,l,c,d){const u=e[0],h=e[1],f=e[2],m=t[0],p=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=a*n[r];let c=i[o],x=i[o+1],b=i[o+2];const y=a*n[r+1];let M=i[y],T=i[y+1],w=i[y+2];const _=a*n[r+2];let S=i[_],C=i[_+1],A=i[_+2];null!=l&&([c,x,b]=l.applyToVertex(c,x,b,e),[M,T,w]=l.applyToVertex(M,T,w,e),[S,C,A]=l.applyToVertex(S,C,A,e));const O=M-c,I=T-x,E=w-b,P=S-c,R=C-x,B=A-b,N=p*B-R*v,H=v*P-B*m,L=m*R-P*p,z=O*N+I*H+E*L;if(Math.abs(z)<=Be)continue;const V=u-c,F=h-x,G=f-b,D=V*N+F*H+G*L;if(z>0){if(D<0||D>z)continue}else if(D>0||D<z)continue;const j=F*E-I*G,W=G*O-E*V,U=V*I-O*F,q=m*j+p*W+v*U;if(z>0){if(q<0||D+q>z)continue}else if(q>0||D+q<z)continue;const k=(P*j+R*W+B*U)/z;k>=0&&d(k,t,g?Oe(O,I,E,P,R,B,_e):null)}}(t,r,0,c,l.indices,l.data,l.stride,s,n,i,a)}}const _e=(0,u.vt)();const Se=(0,u.vt)(),Ce=(0,u.vt)(),Ae=(0,u.vt)();function Oe(e,t,r,o,n,i,a){return(0,d.s)(Ee,e,t,r),(0,d.s)(Pe,o,n,i),(0,d.b)(a,Ee,Pe),(0,d.n)(a,a),a}function Ie(e){return(0,d.z)(Ee,e[1],e[0]),(0,d.z)(Pe,e[2],e[0]),(0,d.b)(_e,Ee,Pe),(0,d.n)(_e,_e),_e}const Ee=(0,u.vt)(),Pe=(0,u.vt)(),Re=1e3,Be=1e-7,Ne=(0,u.vt)(),He=[(0,u.vt)(),(0,u.vt)(),(0,u.vt)()];var Le=r(13464),ze=r(76412),Ve=r(57005);const Fe=new class{constructor(e=0){this.offset=e,this.sphere=(0,ze.c)(),this.tmpVertex=(0,u.vt)()}applyToVertex(e,t,r){const o=this.objectTransform.transform,n=(0,d.s)(Ge,e,t,r),i=(0,d.h)(n,n,o),a=this.offset/(0,d.l)(i);(0,d.r)(i,i,i,a);const s=this.objectTransform.inverse;return(0,d.h)(this.tmpVertex,i,s),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,d.l)(e);(0,d.r)(e,e,e,r);const o=this.offset/(0,d.l)(t);(0,d.r)(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,d.l)((0,ze.g)(e)),r=this.offset/t;return(0,d.r)((0,ze.g)(this.sphere),(0,ze.g)(e),(0,ze.g)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,u.vt)(),this._tmpMbs=(0,ze.c)(),this._tmpObb=new Ve.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,d.l)(e)}applyToVertex(e,t,r){const o=(0,d.s)(Ge,e,t,r),n=(0,d.s)(De,e,t,r+this.componentLocalOriginLength),i=this._totalOffset/(0,d.l)(n);return(0,d.r)(this._tmpVertex,o,n,i),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],o=e[1],n=e[2]+t,i=e[3],a=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(o),d=Math.abs(n),u=Math.abs(i),h=Math.abs(a),f=Math.abs(s),m=.5*(1+Math.sign(r*i))*Math.min(l,u),p=.5*(1+Math.sign(o*a))*Math.min(c,h),v=.5*(1+Math.sign(n*s))*Math.min(d,f),g=Math.max(l,u),x=Math.max(c,h),b=Math.max(d,f),y=Math.sqrt(m*m+p*p+v*v),M=Math.sign(l+r),T=Math.sign(c+o),w=Math.sign(d+n),_=Math.sign(u+i),S=Math.sign(h+a),C=Math.sign(f+s),A=this._totalOffset;if(y<A)return e[0]-=(1-M)*A,e[1]-=(1-T)*A,e[2]-=(1-w)*A,e[3]+=_*A,e[4]+=S*A,e[5]+=C*A,e;const O=A/Math.sqrt(g*g+x*x+b*b),I=A/y,E=I-O,P=-E;return e[0]+=r*(M*P+I),e[1]+=o*(T*P+I),e[2]+=n*(w*P+I),e[3]+=i*(_*E+O),e[4]+=a*(S*E+O),e[5]+=s*(C*E+O),e}applyToMbs(e){const t=(0,d.l)((0,ze.g)(e)),r=this._totalOffset/t;return(0,d.r)((0,ze.g)(this._tmpMbs),(0,ze.g)(e),(0,ze.g)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,Ve.gm)(e,this._totalOffset,this._totalOffset,le.RT.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,u.vt)()}applyToVertex(e,t,r){const o=(0,d.s)(Ge,e,t,r),n=(0,d.g)(De,o,this.localOrigin),i=this.offset/(0,d.l)(n);return(0,d.r)(this.tmpVertex,o,n,i),this.tmpVertex}applyToAabb(e){const t=je,r=We,o=Ue;for(let n=0;n<3;++n)t[n]=e[0+n]+this.localOrigin[n],r[n]=e[3+n]+this.localOrigin[n],o[n]=t[n];const n=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=n[t],e[t+3]=n[t];const i=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 n=0;n<3;++n)o[n]=e&1<<n?r[n]:t[n];i(o)}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 n=0;n<3;++n)o[n]=a&1<<n?0:e&1<<n?t[n]:r[n];i(o)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const Ge=(0,u.vt)(),De=(0,u.vt)(),je=(0,u.vt)(),We=(0,u.vt)(),Ue=(0,u.vt)();var qe=r(59907);class ke{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.get(ne.r.POSITION).indices.length}write(e,t,r,o,n,i){(0,qe.SA)(r,o,this.vertexBufferLayout,e,t,n,i)}}var Ye=r(43616),$e=r(91829),Xe=r(53466),Ze=r(72824),Je=r(97220),Ke=r(84867),Qe=r(39341),et=r(34886),tt=r(63907);tt.MT.LESS,tt.MT.ALWAYS;const rt={mask:255},ot={function:{func:tt.MT.ALWAYS,ref:V.dd.OutlineVisualElementMask,mask:V.dd.OutlineVisualElementMask},operation:{fail:tt.eA.KEEP,zFail:tt.eA.KEEP,zPass:tt.eA.ZERO}},nt={function:{func:tt.MT.ALWAYS,ref:V.dd.OutlineVisualElementMask,mask:V.dd.OutlineVisualElementMask},operation:{fail:tt.eA.KEEP,zFail:tt.eA.KEEP,zPass:tt.eA.REPLACE}};tt.MT.EQUAL,V.dd.OutlineVisualElementMask,V.dd.OutlineVisualElementMask,tt.eA.KEEP,tt.eA.KEEP,tt.eA.KEEP,tt.MT.NOTEQUAL,V.dd.OutlineVisualElementMask,V.dd.OutlineVisualElementMask,tt.eA.KEEP,tt.eA.KEEP,tt.eA.KEEP;var it=r(14327);const at=[1,1,.5],st=[0,.6,.2],lt=[0,1,.2];var ct=r(28491),dt=r(90644);class ut extends Ze.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=(0,u.ci)(at),this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=V.s2.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=u.uY,this.instancedDoublePrecision=!1,this.normalType=ue.W.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.shadowMappingEnabled=!1,this.ambient=(0,u.fA)(.2,.2,.2),this.diffuse=(0,u.fA)(.8,.8,.8),this.externalColor=(0,$e.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,u.vt)(),this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=V.it.Less,this.textureAlphaMode=V.sf.Blend,this.textureAlphaCutoff=pe.Q,this.textureAlphaPremultiplied=!1,this.hasOccludees=!1,this.renderOccluded=ge.m$.Occlude,this.isDecoration=!1}}Ze.gy;class ht extends Ke.w{constructor(e,t,r){t.spherical=e.viewingMode===le.RT.Global,t.doublePrecisionRequiresObfuscation=e.rctx.driverTest.doublePrecisionRequiresObfuscation.result,t.textureCoordinateType=t.hasColorTexture||t.hasMetallicRoughnessTexture||t.emissionSource===he.ZX.Texture||t.hasOcclusionTexture||t.hasNormalTexture?Xe.I.Default:Xe.I.None,t.objectAndLayerIdColorInstanced=t.instanced,super(e,t,r)}initializeProgram(e){return this._initializeProgram(e,ht.shader)}_initializeProgram(e,t){return new et.B(e.rctx,t.get().build(this.configuration),Qe.D)}_makePipeline(e,t){const{output:r,transparent:o,cullFace:n,customDepthTest:i,writeDepth:a,hasOccludees:s,enableOffset:l}=this.configuration,c=e===it.y.NONE,d=e===it.y.FrontFace;return(0,dt.Ey)({blending:r!==de.V.Color&&r!==de.V.ColorEmission||!o?null:(0,xe.Yf)(e),culling:mt(this.configuration)?(0,dt.Xt)(n):null,depthTest:{func:(0,xe.K_)(e,ft(i))},depthWrite:(c||d)&&a?dt.kn:null,drawBuffers:r===de.V.Depth?{buffers:[tt.Hr.NONE]}:(0,xe.m6)(e,r),colorWrite:dt.wE,stencilWrite:s?rt:null,stencilTest:s?t?nt:ot:null,polygonOffset:c||d?null:(0,xe.aB)(l)})}initializePipeline(){return this._occludeePipelineState=this._makePipeline(this.configuration.transparencyPassType,!0),this._makePipeline(this.configuration.transparencyPassType,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function ft(e){return e===V.it.Lequal?tt.MT.LEQUAL:tt.MT.LESS}function mt(e){return e.cullFace!==V.s2.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}ht.shader=new Je.$(ct.D,(()=>r.e(5141).then(r.bind(r,5141))));var pt=r(90237),vt=r(99769),gt=r(99550);class xt extends gt.E{constructor(){super(...arguments),this.output=de.V.Color,this.alphaDiscardMode=V.sf.Opaque,this.doubleSidedMode=fe.W.None,this.pbrMode=me.A9.Disabled,this.cullFace=V.s2.None,this.transparencyPassType=it.y.NONE,this.normalType=ue.W.Attribute,this.textureCoordinateType=Xe.I.None,this.customDepthTest=V.it.Less,this.emissionSource=he.ZX.None,this.spherical=!1,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.multipassEnabled=!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.objectAndLayerIdColorInstanced=!1,this.instancedDoublePrecision=!1,this.doublePrecisionRequiresObfuscation=!1,this.writeDepth=!0,this.transparent=!1,this.discardInvisibleFragments=!1,this.enableOffset=!0,this.cullAboveGround=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1}}(0,pt._)([(0,vt.W)({count:de.V.COUNT})],xt.prototype,"output",void 0),(0,pt._)([(0,vt.W)({count:V.sf.COUNT})],xt.prototype,"alphaDiscardMode",void 0),(0,pt._)([(0,vt.W)({count:fe.W.COUNT})],xt.prototype,"doubleSidedMode",void 0),(0,pt._)([(0,vt.W)({count:me.A9.COUNT})],xt.prototype,"pbrMode",void 0),(0,pt._)([(0,vt.W)({count:V.s2.COUNT})],xt.prototype,"cullFace",void 0),(0,pt._)([(0,vt.W)({count:it.y.COUNT})],xt.prototype,"transparencyPassType",void 0),(0,pt._)([(0,vt.W)({count:ue.W.COUNT})],xt.prototype,"normalType",void 0),(0,pt._)([(0,vt.W)({count:Xe.I.COUNT})],xt.prototype,"textureCoordinateType",void 0),(0,pt._)([(0,vt.W)({count:V.it.COUNT})],xt.prototype,"customDepthTest",void 0),(0,pt._)([(0,vt.W)({count:he.ZX.COUNT})],xt.prototype,"emissionSource",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"spherical",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasVertexColors",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasSymbolColors",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasVerticalOffset",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasSlicePlane",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasSliceHighlight",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasColorTexture",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasMetallicRoughnessTexture",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasOcclusionTexture",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasNormalTexture",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasScreenSizePerspective",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasVertexTangents",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasOccludees",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"multipassEnabled",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasModelTransformation",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"offsetBackfaces",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"vvSize",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"vvColor",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"receiveShadows",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"receiveAmbientOcclusion",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"textureAlphaPremultiplied",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"instanced",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"instancedColor",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"objectAndLayerIdColorInstanced",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"instancedDoublePrecision",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"doublePrecisionRequiresObfuscation",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"writeDepth",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"transparent",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"discardInvisibleFragments",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"enableOffset",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"cullAboveGround",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"snowCover",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasColorTextureTransform",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasEmissionTextureTransform",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasNormalTextureTransform",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasOcclusionTextureTransform",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasMetallicRoughnessTextureTransform",void 0),(0,pt._)([(0,vt.W)({constValue:!1})],xt.prototype,"occlusionPass",void 0),(0,pt._)([(0,vt.W)({constValue:!0})],xt.prototype,"hasVvInstancing",void 0),(0,pt._)([(0,vt.W)({constValue:!1})],xt.prototype,"useCustomDTRExponentForWater",void 0),(0,pt._)([(0,vt.W)({constValue:!0})],xt.prototype,"useFillLights",void 0);var bt=r(57323);class yt extends ht{constructor(e,t,r){t.hasMetallicRoughnessTexture=!1,t.emissionSource=he.ZX.None,t.hasOcclusionTexture=!1,t.hasNormalTexture=!1,t.hasModelTransformation=!1,t.normalType=ue.W.Attribute,t.doubleSidedMode=fe.W.WindingOrder,t.hasVertexTangents=!1,super(e,t,r)}initializeProgram(e){return this._initializeProgram(e,yt.shader)}}yt.shader=new Je.$(bt.R,(()=>r.e(9933).then(r.bind(r,39933))));class Mt extends ge.im{constructor(e){super(e,wt),this._configuration=new xt,this.supportsEdges=!0,this.produces=new Map([[Le.N.OPAQUE_MATERIAL,e=>(e===de.V.ColorEmission||(0,de.XY)(e)||(0,de.PJ)(e))&&!this.parameters.transparent],[Le.N.TRANSPARENT_MATERIAL,e=>(e===de.V.ColorEmission||(0,de.XY)(e)||(0,de.PJ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[Le.N.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,e=>((0,de.XY)(e)||(0,de.PJ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=function(e){const t=(0,ce.BP)().vec3f(ne.r.POSITION);return e.normalType===ue.W.Compressed?t.vec2i16(ne.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(ne.r.NORMAL),e.hasVertexTangents&&t.vec4f(ne.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(ne.r.UV0),e.hasVertexColors&&t.vec4u8(ne.r.COLOR),e.hasSymbolColors&&t.vec4u8(ne.r.SYMBOLCOLOR),(0,se.A)("enable-feature:objectAndLayerId-rendering")&&t.vec4u8(ne.r.OBJECTANDLAYERIDCOLOR),t}(this.parameters)}isVisibleForOutput(e){return e!==de.V.Shadow&&e!==de.V.ShadowExcludeHighlight&&e!==de.V.ShadowHighlight||this.parameters.castShadows}get visible(){const e=this.parameters;if(e.layerOpacity<pe.Q)return!1;const{hasInstancedColor:t,hasVertexColors:r,hasSymbolColors:o,vvColor:n}=e,i=t||n||o,a="replace"===e.colorMixMode,s=e.opacity>=pe.Q;if(r&&i)return a||s;const l=e.externalColor&&e.externalColor[3]>=pe.Q;return r?a?l:s:i?a||s:a?l:s}get hasEmissions(){return!!this.parameters.emissiveTextureId||!(0,d.e)(this.parameters.emissiveFactor,u.uY)}getConfiguration(e,t){return this._configuration.output=e,this._configuration.hasNormalTexture=!!this.parameters.normalTextureId,this._configuration.hasColorTexture=!!this.parameters.textureId,this._configuration.hasVertexTangents=this.parameters.hasVertexTangents,this._configuration.instanced=this.parameters.isInstanced,this._configuration.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasSliceHighlight=this.parameters.hasSliceHighlight,this._configuration.alphaDiscardMode=this.parameters.textureAlphaMode,this._configuration.normalType=this.parameters.normalType,this._configuration.transparent=this.parameters.transparent,this._configuration.discardInvisibleFragments=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,null!=this.parameters.customDepthTest&&(this._configuration.customDepthTest=this.parameters.customDepthTest),this._configuration.hasOccludees=this.parameters.hasOccludees,this._configuration.cullFace=this.parameters.hasSlicePlane?V.s2.None:this.parameters.cullFace,this._configuration.multipassEnabled=t.multipassEnabled,this._configuration.cullAboveGround=t.multipassTerrain.cullAboveGround,this._configuration.hasModelTransformation=null!=this.parameters.modelTransformation,e!==de.V.Color&&e!==de.V.ColorEmission||(this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.hasSymbolColors=this.parameters.hasSymbolColors,this.parameters.treeRendering?this._configuration.doubleSidedMode=fe.W.WindingOrder:this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?fe.W.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?fe.W.WindingOrder:fe.W.None,this._configuration.instancedColor=this.parameters.hasInstancedColor,this._configuration.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this._configuration.receiveAmbientOcclusion=this.parameters.receiveAmbientOcclusion&&null!=t.ssao,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this._configuration.pbrMode=this.parameters.usePBR?this.parameters.isSchematic?me.A9.Schematic:me.A9.Normal:me.A9.Disabled,this._configuration.hasMetallicRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this._configuration.emissionSource=null!=this.parameters.emissiveTextureId?he.ZX.Texture:this.parameters.usePBR&&!this.parameters.isSchematic?he.ZX.Value:he.ZX.None,this._configuration.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this._configuration.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this._configuration.transparencyPassType=t.transparencyPassType,this._configuration.enableOffset=t.camera.relativeElevation<xe.xt,this._configuration.snowCover=this.hasSnowCover(t),this._configuration.hasColorTextureTransform=!!this.parameters.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!this.parameters.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!this.parameters.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!this.parameters.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!this.parameters.metallicRoughnessTextureTransformMatrix),this._configuration}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}intersect(e,t,r,o,n,i){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,d.s)(It,t[12],t[13],t[14]);let i=null;switch(r.viewingMode){case le.RT.Global:i=(0,d.n)(At,It);break;case le.RT.Local:i=(0,d.c)(At,Ct)}let a=0;const s=(0,d.f)(Et,It,e.eye),l=(0,d.l)(s),c=(0,d.j)(s,s,1/l);let u=null;this.parameters.screenSizePerspective&&(u=(0,d.m)(i,c)),a+=(0,Ye.kE)(e,l,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective),(0,d.j)(i,i,a),(0,d.t)(Ot,i,r.transform.inverseRotation),o=(0,d.f)(_t,o,Ot),n=(0,d.f)(St,n,Ot)}var a;Me(e,r,o,n,null!=(a=r.verticalOffset)?(Fe.offset=a,Fe):null,i)}createGLMaterial(e){return new Tt(e)}createBufferWriter(){return new ke(this._vertexBufferLayout)}}class Tt extends ve.m8{constructor(e){super({...e,...e.material.parameters})}_updateShadowState(e){e.shadowMap.enabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMap.enabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.hasOccludees&&this._material.setParameters({hasOccludees:e.hasOccludees})}beginSlot(e){this._output!==de.V.Color&&this._output!==de.V.ColorEmission||(this._updateShadowState(e),this._updateOccludeeState(e));const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.s)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.ensureTechnique(t.treeRendering?yt:ht,e)}}class wt extends ut{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}}const _t=(0,u.vt)(),St=(0,u.vt)(),Ct=(0,u.fA)(0,0,1),At=(0,u.vt)(),Ot=(0,u.vt)(),It=(0,u.vt)(),Et=(0,u.vt)(),Pt=()=>P.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");function Rt(e){throw new E.A("",`Request for object resource failed: ${e}`)}function Bt(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(Pt().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(Pt().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(Pt().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(Pt().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else Pt().warn("Indexed geometries must specify faces"),o=!1;break}default:Pt().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(Pt().warn("Geometry requires material"),o=!1);const n=e.params.vertexAttributes;for(const e in n)n[e].values||(Pt().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function Nt(e){const t=(0,h.Ie)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,h.iT)(t,r.bbMin),(0,h.iT)(t,r.bbMax))})),t}function Ht(e){switch(e){case"mask":return V.sf.Mask;case"maskAndTransparency":return V.sf.MaskBlend;case"none":return V.sf.Opaque;default:return V.sf.Blend}}function Lt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const zt=new N.R(1,2,"wosr");var Vt=r(61765);async function Ft(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,o.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=t?.streamDataRequester;if(r)return async function(e,t,r){const o=await(0,O.Ke)(t.request(e,"json",r));if(!0===o.ok)return o.value;(0,B.QP)(o.error),Rt(o.error.details.url)}(e,r,t);const o=await(0,O.Ke)((0,A.A)(e,t));if(!0===o.ok)return o.value.data;(0,B.QP)(o.error),Rt(o.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const n=e[o],i=n.images[0].data;if(!i){Pt().warn("Externally referenced texture data is not yet supported");continue}const a=n.encoding+";base64,"+i,s="/textureDefinitions/"+o,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:tt.pF.REPEAT,t:tt.pF.REPEAT},preMultiplyAlpha:Ht(l)!==V.sf.Opaque},d=t?.disableTextures?Promise.resolve(null):(0,L.D)(a,t);r.push(d.then((e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l}))))}const o=await Promise.all(r),n={};for(const e of o)n[e.refId]=e;return n}(r.textureDefinitions??{},t);let n=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];n+=t?.image?t.image.width*t.image.height*4:0}return{resource:r,textures:o,size:n+(0,I.iL)(r)}}(a.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,n=new Array,i=new R.O,a=e.resource,s=N.R.parse(a.version||"1.0","wosr");zt.validate(s);const l=a.model.name,c=a.model.geometries,d=a.materialDefinitions??{},h=e.textures;let f=0;const m=new Map;for(let e=0;e<c.length;e++){const a=c[e];if(!Bt(a))continue;const s=Lt(a),l=a.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===a.params.topology)return null;const t=a.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l[ne.r.POSITION],x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,H.tM)(x);p.push([e,new z.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,y=h&&h[b];if(y&&!m.has(b)){const{image:e,parameters:t}=y,r=new ae.g(e,t);o.push(r),m.set(b,r)}const M=m.get(b),T=M?M.id:void 0,w=s.material;let _=i.get(w,b);if(null==_){const e=d[w.slice(w.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y&&y.alphaChannelUsage,o=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,n=y?Ht(y.alphaChannelUsage):void 0,a={ambient:(0,u.ci)(e.diffuse),diffuse:(0,u.ci)(e.diffuse),opacity:1-(e.transparency||0),transparent:o,textureAlphaMode:n,textureAlphaCutoff:.33,textureId:T,initTextureTransparent:!0,doubleSided:!0,cullFace:V.s2.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(a,t.materialParameters),_=new Mt(a),i.set(w,b,_)}n.push(_);const S=new ie(_,p);f+=p.find((e=>e[0]===ne.r.POSITION))?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:l,stageResources:{textures:o,materials:n,geometries:r},pivotOffset:a.model.pivotOffset,numberOfVertices:f,lodThreshold:null}],referenceBoundingBox:Nt(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let w;if(t.cache)w=await t.cache.loadGLTF(a.url,t,!!t.usePBR);else{const{loadGLTF:e}=await r.e(4399).then(r.bind(r,4399));w=await e(new y.R(t.streamDataRequester),a.url,t,t.usePBR)}const S=w.model.meta?.ESRI_proxyEllipsoid,E=w.meta.isEsriSymbolResource&&null!=S&&"EsriRealisticTreesStyle"===w.meta.ESRI_webstyle;E&&!w.customMeta.esriTreeRendering&&(w.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const o=e.model.lods[r];for(const n of o.parts){const o=n.attributes.normal;if(null==o)return;const i=n.attributes.position,a=i.count,c=(0,u.vt)(),h=(0,u.vt)(),f=(0,u.vt)(),p=new Uint8Array(4*a),v=new Float64Array(3*a),g=(0,s.B8)((0,l.vt)(),n.transform);let x=0,b=0;for(let s=0;s<a;s++){i.getVec(s,h),o.getVec(s,c),(0,d.h)(h,h,n.transform),(0,d.f)(f,h,t.center),(0,d.D)(f,f,t.radius);const a=f[2],l=(0,d.l)(f),u=Math.min(.45+.55*l*l,1);(0,d.D)(f,f,t.radius),null!==g&&(0,d.h)(f,f,g),(0,d.n)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.o)(f,f,c,a>-1?.2:Math.min(-4*a-3.8,1)),v[x]=f[0],v[x+1]=f[1],v[x+2]=f[2],x+=3,p[b]=255*u,p[b+1]=255*u,p[b+2]=255*u,p[b+3]=255,b+=4}n.attributes.normal=new m.xs(v),n.attributes.color=new m.XP(p)}}}(w,S));const P=!!t.usePBR,F=w.meta.isEsriSymbolResource?{usePBR:P,isSchematic:!1,treeRendering:E,mrrFactors:[...lt]}:{usePBR:P,isSchematic:!1,treeRendering:!1,mrrFactors:[...at]},G={...t.materialParameters,treeRendering:E},{engineResources:D,referenceBoundingBox:j}=function(e,t,r,o){const a=e.model,s=new Array,l=new Map,y=new Map,w=a.lods.length,S=(0,h.Ie)();return a.lods.forEach(((e,A)=>{const O=!0===o.skipHighLods&&(w>1&&0===A||w>3&&1===A)||!1===o.skipHighLods&&null!=o.singleLodIndex&&A!==o.singleLodIndex;if(O&&0!==A)return;const I=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const o=O?new Mt({}):function(e,t,r,o,n,i,a){const s=t.material+(t.attributes.normal?"_normal":"")+(t.attributes.color?"_color":"")+(t.attributes.texCoord0?"_texCoord0":"")+(t.attributes.tangent?"_tangent":""),l=e.materials.get(t.material),h=null!=t.attributes.texCoord0,f=null!=t.attributes.normal;if(null==l)return null;const m=function(e){switch(e){case"BLEND":return V.sf.Blend;case"MASK":return V.sf.Mask;case"OPAQUE":case null:case void 0:return V.sf.Opaque}}(l.alphaMode);if(!i.has(s)){if(h){const t=(t,r=!1)=>{if(null!=t&&!a.has(t)){const o=e.textures.get(t);if(null!=o){const e=o.data;a.set(t,new ae.g((0,T.x3)(e)?e.data:e,{...o.parameters,preMultiplyAlpha:!(0,T.x3)(e)&&r,encoding:(0,T.x3)(e)&&null!=e.encoding?e.encoding:void 0}))}}};t(l.textureColor,m!==V.sf.Opaque),t(l.textureNormal),t(l.textureOcclusion),t(l.textureEmissive),t(l.textureMetallicRoughness)}const r=l.color[0]**(1/Vt.T),p=l.color[1]**(1/Vt.T),v=l.color[2]**(1/Vt.T),g=l.emissiveFactor[0]**(1/Vt.T),x=l.emissiveFactor[1]**(1/Vt.T),b=l.emissiveFactor[2]**(1/Vt.T),y=null!=l.textureColor&&h?a.get(l.textureColor):null,M=function({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:o,emissiveTexture:n,emissiveFactor:i,occlusionTexture:a}){return null==e&&null==t&&null==n&&(null==i||(0,d.e)(i,u.uY))&&null==a&&(null==o||1===o)&&(null==r||1===r)}({normalTexture:l.textureNormal,metallicRoughnessTexture:l.textureMetallicRoughness,metallicFactor:l.metallicFactor,roughnessFactor:l.roughnessFactor,emissiveTexture:l.textureEmissive,emissiveFactor:l.emissiveFactor,occlusionTexture:l.textureOcclusion}),w=null!=l.normalTextureTransform?.scale?l.normalTextureTransform?.scale:c.Un;i.set(s,new Mt({...o,transparent:m===V.sf.Blend,customDepthTest:V.it.Lequal,textureAlphaMode:m,textureAlphaCutoff:l.alphaCutoff,diffuse:[r,p,v],ambient:[r,p,v],opacity:l.opacity,doubleSided:l.doubleSided,doubleSidedType:"winding-order",cullFace:l.doubleSided?V.s2.None:V.s2.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:f?ue.W.Attribute:ue.W.ScreenDerivative,castShadows:!0,receiveShadows:l.receiveShadows,receiveAmbientOcclusion:l.receiveAmbientOcclustion,textureId:null!=y?y.id:void 0,colorMixMode:l.colorMixMode,normalTextureId:null!=l.textureNormal&&h?a.get(l.textureNormal).id:void 0,textureAlphaPremultiplied:null!=y&&!!y.parameters.preMultiplyAlpha,occlusionTextureId:null!=l.textureOcclusion&&h?a.get(l.textureOcclusion).id:void 0,emissiveTextureId:null!=l.textureEmissive&&h?a.get(l.textureEmissive).id:void 0,metallicRoughnessTextureId:null!=l.textureMetallicRoughness&&h?a.get(l.textureMetallicRoughness).id:void 0,emissiveFactor:[g,x,b],mrrFactors:M?[...st]:[l.metallicFactor,l.roughnessFactor,o.mrrFactors[2]],isSchematic:M,colorTextureTransformMatrix:_(l.colorTextureTransform),normalTextureTransformMatrix:_(l.normalTextureTransform),scale:[w[0],w[1]],occlusionTextureTransformMatrix:_(l.occlusionTextureTransform),emissiveTextureTransformMatrix:_(l.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:_(l.metallicRoughnessTextureTransform),...n}))}const p=i.get(s);if(r.stageResources.materials.push(p),h){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(l.textureColor),e(l.textureNormal),e(l.textureOcclusion),e(l.textureEmissive),e(l.textureMetallicRoughness)}return p}(a,e,I,t,r,l,y),{geometry:s,vertexCount:w}=function(e,t){const r=e.attributes.position.count,o=(0,M.x)(e.indices||r,e.primitiveType),a=(0,f.oe)(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,p.a)(a,s,e.transform,3,l);const c=[[ne.r.POSITION,new z.n(a,o,3,!0)]];if(null!=e.attributes.normal){const t=(0,f.oe)(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;(0,i.Ge)(Gt,e.transform),(0,p.t)(t,a,Gt,3,s),(0,n.or)(Gt)&&(0,p.n)(t,t),c.push([ne.r.NORMAL,new z.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=(0,f.oe)(4*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.tangent;(0,i.z0)(Gt,e.transform),(0,v.t)(t,a,Gt,4,s),(0,n.or)(Gt)&&(0,p.n)(t,t,4),c.push([ne.r.TANGENT,new z.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,f.oe)(2*r),{typedBuffer:n,typedBufferStride:i}=e.attributes.texCoord0;(0,g.a)(t,n,2,i),c.push([ne.r.UV0,new z.n(t,o,2,!0)])}const d=e.attributes.color;if(null!=d){const t=new Uint8Array(4*r);4===d.elementCount?d instanceof m.Eq?(0,v.b)(t,d,255):d instanceof m.XP?(0,b.a)(t,d):d instanceof m.Uz&&(0,v.b)(t,d,1/256):(t.fill(255),d instanceof m.xs?(0,p.f)(t,d.typedBuffer,255,4,d.typedBufferStride):e.attributes.color instanceof m.eI?(0,x.c)(t,d.typedBuffer,4,e.attributes.color.typedBufferStride):e.attributes.color instanceof m.nS&&(0,p.f)(t,d.typedBuffer,1/256,4,d.typedBufferStride)),c.push([ne.r.COLOR,new z.n(t,o,4,!0)])}return{geometry:new ie(t,c),vertexCount:r}}(e,null!=o?o:new Mt({})),C=s.boundingInfo;null!=C&&0===A&&((0,h.iT)(S,C.bbMin),(0,h.iT)(S,C.bbMax)),null!=o&&(I.stageResources.geometries.push(s),I.numberOfVertices+=w)})),O||s.push(I)})),{engineResources:s,referenceBoundingBox:S}}(w,F,G,t.skipHighLods&&null==a.specifiedLodIndex?{skipHighLods:!0}:{skipHighLods:!1,singleLodIndex:a.specifiedLodIndex});return{lods:D,referenceBoundingBox:j,isEsriSymbolResource:w.meta.isEsriSymbolResource,isWosr:!1}}const Gt=(0,a.vt)()},66104:(e,t,r)=>{var o,n;r.d(t,{k5:()=>o}),r(34727),(n=o||(o={}))[n.Multiply=1]="Multiply",n[n.Ignore=2]="Ignore",n[n.Replace=3]="Replace",n[n.Tint=4]="Tint"},42583:(e,t,r)=>{r.d(t,{A:()=>i});var o=r(66104),n=r(2597);function i(e){e.vertex.code.add(n.H`
|
|
224
|
+
fragBlur = b / w_total;`),e}const m=Object.freeze(Object.defineProperty({__proto__:null,build:f},Symbol.toStringTag,{value:"Module"}))},76412:(e,t,r)=>{r.d(t,{c:()=>p,d:()=>x,f:()=>M,g:()=>y,h:()=>b,k:()=>A,o:()=>N}),r(44208),r(53966);var o=r(34727),n=r(58083),i=r(38954),a=r(51850),s=r(87317),l=r(91829),c=r(34304),d=r(88582),u=r(71351),h=r(44280),f=r(32114);const m=p();function p(){return(0,l.vt)()}const v=s.e,g=s.e;function x(e,t){return(0,s.c)(t,e)}function b(e){return e[3]}function y(e){return e}function M(e,t,r,o){return(0,l.fA)(e,t,r,o)}function T(e,t,r){if(null==t)return!1;if(!_(e,t,w))return!1;let{t0:o,t1:n}=w;if((o<0||n<o&&n>0)&&(o=n),o<0)return!1;if(r){const{origin:e,direction:n}=t;r[0]=e[0]+n[0]*o,r[1]=e[1]+n[1]*o,r[2]=e[2]+n[2]*o}return!0}const w={t0:0,t1:0};function _(e,t,r){const{origin:o,direction:n}=t,i=S;i[0]=o[0]-e[0],i[1]=o[1]-e[1],i[2]=o[2]-e[2];const a=n[0]*n[0]+n[1]*n[1]+n[2]*n[2];if(0===a)return!1;const s=2*(n[0]*i[0]+n[1]*i[1]+n[2]*i[2]),l=s*s-4*a*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-e[3]*e[3]);if(l<0)return!1;const c=Math.sqrt(l);return r.t0=(-s-c)/(2*a),r.t1=(-s+c)/(2*a),!0}const S=(0,a.vt)();function A(e,t){return T(e,t,null)}function C(e,t,r){const o=f.rq.get(),a=f.Rc.get();(0,i.b)(o,t.origin,t.direction);const s=b(e);(0,i.b)(r,o,t.origin),(0,i.j)(r,r,1/(0,i.l)(r)*s);const l=I(e,t.origin),c=(0,h.g7)(t.origin,r);return(0,n.$0)(a,c+l,o),(0,i.h)(r,r,a),r}function O(e,t,r){const o=(0,i.f)(f.rq.get(),t,e),n=(0,i.j)(f.rq.get(),o,e[3]/(0,i.l)(o));return(0,i.g)(r,n,e)}function I(e,t){const r=(0,i.f)(f.rq.get(),t,e),n=(0,i.l)(r),a=b(e),s=a+Math.abs(a-n);return(0,o.XM)(a/s)}const E=(0,a.vt)();function R(e,t,r,n){const a=(0,i.f)(E,t,e);switch(r){case d._.X:{const e=(0,o.jU)(a,E)[2];return(0,i.s)(n,-Math.sin(e),Math.cos(e),0)}case d._.Y:{const e=(0,o.jU)(a,E),t=e[1],r=e[2],s=Math.sin(t);return(0,i.s)(n,-s*Math.cos(r),-s*Math.sin(r),Math.cos(t))}case d._.Z:return(0,i.n)(n,a);default:return}}function P(e,t){const r=(0,i.f)(B,t,e);return(0,i.l)(r)-e[3]}function N(e,t){const r=(0,i.a)(e,t),o=b(e);return r<=o*o}const B=(0,a.vt)(),H=p();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:m,altitudeAt:P,angleToSilhouette:I,axisAt:R,cameraFrustumCoverage:function(e,t,r,o){const n=b(e),i=n*n,a=t+.5*Math.PI,s=r*r+i-2*Math.cos(a)*r*n,l=Math.sqrt(s),c=s-i;if(c<=0)return.5;const d=Math.sqrt(c),u=Math.acos(d/l)-Math.asin(n/(l/Math.sin(a)));return Math.min(1,(u+.5*o)/o)},clear:function(e){e[0]=e[1]=e[2]=e[3]=0},closestPoint:function(e,t,r){return T(e,t,r)?r:((0,u.oC)(t,e,r),O(e,r,r))},closestPointOnSilhouette:C,containsPoint:N,copy:x,create:p,distanceToSilhouette:function(e,t){const r=(0,i.f)(f.rq.get(),t,e),o=(0,i.q)(r),n=e[3]*e[3];return Math.sqrt(Math.abs(o-n))},elevate:function(e,t,r){return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=e[3]+t,r},equals:g,exactEquals:v,fromCenterAndRadius:function(e,t){return(0,l.fA)(e[0],e[1],e[2],t)},fromRadius:function(e,t){return e[0]=e[1]=e[2]=0,e[3]=t,e},fromValues:M,getCenter:y,getExtent:function(e,t){return t},getRadius:b,intersectLine:function(e,t,r){const o=(0,u.Cr)(t,r);if(!_(e,o,w))return[];const{origin:n,direction:s}=o,{t0:l,t1:d}=w,h=t=>{const r=(0,a.vt)();return(0,i.r)(r,n,s,t),O(e,r,r)};return Math.abs(l-d)<(0,c.FD)()?[h(l)]:[h(l),h(d)]},intersectRay:T,intersectRayClosestSilhouette:function(e,t,r){if(T(e,t,r))return r;const o=C(e,t,f.rq.get());return(0,i.g)(r,t.origin,(0,i.j)(f.rq.get(),t.direction,(0,i.p)(t.origin,o)/(0,i.l)(t.direction))),r},intersectsRay:A,projectPoint:O,setAltitudeAt:function(e,t,r,o){const n=P(e,t),a=R(e,t,d._.Z,B),s=(0,i.j)(B,a,r-n);return(0,i.g)(o,t,s)},setExtent:function(e,t,r){return e!==r&&x(e,r),r},tmpSphere:H,union:function(e,t,r=(0,l.vt)()){const o=(0,i.p)(e,t),n=e[3],a=t[3];return o+a<n?((0,s.c)(r,e),r):o+n<a?((0,s.c)(r,t),r):((0,i.o)(r,e,t,(o+a-n)/(2*o)),r[3]=(o+n+a)/2,r)},wrap:function(e){return e}},Symbol.toStringTag,{value:"Module"}))},43609:(e,t,r)=>{r.d(t,{a:()=>i,f:()=>a,n:()=>n});var o=r(34275);function n(e,t){i(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r=2,n=r){const i=t.length/2;let a=0,s=0;if((0,o.cy)(t)||(0,o.dk)(t)){for(let o=0;o<i;++o)e[a]=t[s],e[a+1]=t[s+1],a+=r,s+=n;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<i;++o)e[a]=Math.max(t[s]/l,-1),e[a+1]=Math.max(t[s+1]/l,-1),a+=r,s+=n;else for(let o=0;o<i;++o)e[a]=t[s]/l,e[a+1]=t[s+1]/l,a+=r,s+=n}function a(e,t,r,o){const n=e.typedBuffer,i=e.typedBufferStride,a=o?.count??e.count;let s=(o?.dstIndex??0)*i;for(let e=0;e<a;++e)n[s]=t,n[s+1]=r,s+=i}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:i,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354:(e,t,r)=>{function o(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,o=3,n=o){if(e.length/o!==Math.ceil(t.length/n))return e;const i=e.length/o,a=r[0],s=r[1],l=r[2],c=r[4],d=r[5],u=r[6],h=r[8],f=r[9],m=r[10],p=r[12],v=r[13],g=r[14];let x=0,b=0;for(let r=0;r<i;r++){const r=t[x],i=t[x+1],y=t[x+2];e[b]=a*r+c*i+h*y+p,e[b+1]=s*r+d*i+f*y+v,e[b+2]=l*r+u*i+m*y+g,x+=n,b+=o}return e}function i(e,t,r){a(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r,o=3,n=o){if(e.length/o!==Math.ceil(t.length/n))return;const i=e.length/o,a=r[0],s=r[1],l=r[2],c=r[3],d=r[4],u=r[5],h=r[6],f=r[7],m=r[8];let p=0,v=0;for(let r=0;r<i;r++){const r=t[p],i=t[p+1],g=t[p+2];e[v]=a*r+c*i+h*g,e[v+1]=s*r+d*i+f*g,e[v+2]=l*r+u*i+m*g,p+=n,v+=o}}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o=3,n=o){const i=Math.min(e.length/o,t.length/n);let a=0,s=0;for(let l=0;l<i;l++)e[s]=r*t[a],e[s+1]=r*t[a+1],e[s+2]=r*t[a+2],a+=n,s+=o;return e}function c(e,t,r,o=3,n=o){const i=e.length/o;if(i!==Math.ceil(t.length/n))return e;let a=0,s=0;for(let l=0;l<i;l++)e[s]=t[a]+r[0],e[s+1]=t[a+1]+r[1],e[s+2]=t[a+2]+r[2],a+=n,s+=o;return e}function d(e,t){u(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r=3,o=r){const n=Math.min(e.length/r,t.length/o);let i=0,a=0;for(let s=0;s<n;s++){const n=t[i],s=t[i+1],l=t[i+2],c=n*n+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[a]=t*n,e[a+1]=t*s,e[a+2]=t*l}i+=o,a+=r}}r.d(t,{a:()=>n,b:()=>c,c:()=>i,d:()=>o,e:()=>d,f:()=>l,n:()=>u,s:()=>s,t:()=>a}),r(44208),r(53966),Object.freeze(Object.defineProperty({__proto__:null,normalize:u,normalizeView:d,scale:l,scaleView:s,shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),n=e.typedBuffer,i=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)n[c]=a[l]>>r,n[c+1]=a[l+1]>>r,n[c+2]=a[l+2]>>r,l+=s,c+=i},transformMat3:a,transformMat3View:i,transformMat4:n,transformMat4View:o,translate:c},Symbol.toStringTag,{value:"Module"}))},51737:(e,t,r)=>{function o(e,t){n(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r=3,o=r){const n=t.length/o;let i=0,a=0;for(let s=0;s<n;++s)e[i]=t[a],e[i+1]=t[a+1],e[i+2]=t[a+2],i+=r,a+=o}function i(e,t,r,o,n){const i=e.typedBuffer,a=e.typedBufferStride,s=n?.count??e.count;let l=(n?.dstIndex??0)*a;for(let e=0;e<s;++e)i[l]=t,i[l+1]=r,i[l+2]=o,l+=a}r.d(t,{a:()=>o,c:()=>n,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,copy:n,copyView:o,fill:i},Symbol.toStringTag,{value:"Module"}))},65686:(e,t,r)=>{r.d(t,{a:()=>n,b:()=>l,n:()=>a,s:()=>s,t:()=>i}),r(44208);var o=r(53966);function n(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,o=4,n=o){if(e.length/o!=t.length/n)return;const i=e.length/o,a=r[0],s=r[1],l=r[2],c=r[3],d=r[4],u=r[5],h=r[6],f=r[7],m=r[8];let p=0,v=0;for(let r=0;r<i;r++){const r=t[p],i=t[p+1],g=t[p+2],x=t[p+3];e[v]=a*r+c*i+h*g,e[v+1]=s*r+d*i+f*g,e[v+2]=l*r+u*i+m*g,e[v+3]=x,p+=n,v+=o}}function a(e,t){const r=Math.min(e.count,t.count),o=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){const t=e*n,r=e*a,s=i[r],l=i[r+1],c=i[r+2],d=s*s+l*l+c*c;if(d>0){const e=1/Math.sqrt(d);o[t]=e*s,o[t+1]=e*l,o[t+2]=e*c}}}function s(e,t,r){l(e.typedBuffer,t,r,e.typedBufferStride)}function l(e,t,r,o=4){const n=Math.min(e.length/o,t.count),i=t.typedBuffer,a=t.typedBufferStride;let s=0,l=0;for(let t=0;t<n;t++)e[l]=r*i[s],e[l+1]=r*i[s+1],e[l+2]=r*i[s+2],e[l+3]=r*i[s+3],s+=a,l+=o}Object.freeze(Object.defineProperty({__proto__:null,normalize:a,scale:l,scaleView:s,transformMat3:i,transformMat3View:n,transformMat4:function(e,t,r,n=4,i=n){if(e.length/n!=t.length/i)return void o.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const a=e.length/n,s=r[0],l=r[1],c=r[2],d=r[3],u=r[4],h=r[5],f=r[6],m=r[7],p=r[8],v=r[9],g=r[10],x=r[11],b=r[12],y=r[13],M=r[14],T=r[15];let w=0,_=0;for(let r=0;r<a;r++){const r=t[w],o=t[w+1],a=t[w+2],S=t[w+3];e[_]=s*r+u*o+p*a+b*S,e[_+1]=l*r+h*o+v*a+y*S,e[_+2]=c*r+f*o+g*a+M*S,e[_+3]=d*r+m*o+x*a+T*S,w+=i,_+=n}},transformMat4View:function(e,t,r){if(e.count!==t.count)return;const o=e.count,n=r[0],i=r[1],a=r[2],s=r[3],l=r[4],c=r[5],d=r[6],u=r[7],h=r[8],f=r[9],m=r[10],p=r[11],v=r[12],g=r[13],x=r[14],b=r[15],y=e.typedBuffer,M=e.typedBufferStride,T=t.typedBuffer,w=t.typedBufferStride;for(let e=0;e<o;e++){const t=e*M,r=e*w,o=T[r],_=T[r+1],S=T[r+2],A=T[r+3];y[t]=n*o+l*_+h*S+v*A,y[t+1]=i*o+c*_+f*S+g*A,y[t+2]=a*o+d*_+m*S+x*A,y[t+3]=s*o+u*_+p*S+b*A}}},Symbol.toStringTag,{value:"Module"}))},78358:(e,t,r)=>{function o(e,t){n(e.typedBuffer,t,e.typedBufferStride)}function n(e,t,r=4){const o=t.typedBuffer,n=t.typedBufferStride,i=t.count;let a=0,s=0;for(let t=0;t<i;++t)e[a]=o[s],e[a+1]=o[s+1],e[a+2]=o[s+2],e[a+3]=o[s+3],a+=r,s+=n}function i(e,t,r,o,n,i){const a=e.typedBuffer,s=e.typedBufferStride,l=i?.count??e.count;let c=(i?.dstIndex??0)*s;for(let e=0;e<l;++e)a[c]=t,a[c+1]=r,a[c+2]=o,a[c+3]=n,c+=s}r.d(t,{a:()=>n,c:()=>o,f:()=>i}),Object.freeze(Object.defineProperty({__proto__:null,copy:n,copyView:o,fill:i},Symbol.toStringTag,{value:"Module"}))},4341:(e,t,r)=>{r.d(t,{I:()=>n});var o=r(26390);class n{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,o.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,i));e++)this._items.push(this._allocator())}}const i=1024},46140:(e,t,r)=>{r.d(t,{R:()=>n});var o=r(49186);let n=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[n,i]=t.split("."),a=/^\s*\d+\s*$/;if(!n?.match||!a.test(n))throw new o.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!i?.match||!a.test(i))throw new o.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const s=parseInt(n,10),l=parseInt(i,10);return new e(s,l,r)}}},61473:(e,t,r)=>{function o(e){return e=e||globalThis.location.hostname,c.some((t=>null!=e?.match(t)))}function n(e,t){return e&&(t=t||globalThis.location.hostname)?null!=t.match(i)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(a)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e}r.d(t,{EM:()=>n,b5:()=>o});const i=/^devext\.arcgis\.com$/,a=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,i,a,/^jsapps\.esri\.com$/,s,l]},88340:(e,t,r)=>{function o(){return new Float32Array(2)}function n(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function i(){return o()}function a(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{Un:()=>d,fA:()=>n,uY:()=>c,vt:()=>o});const c=i(),d=a(),u=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:u,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,createView:function(e,t){return new Float32Array(e,t,2)},fromValues:n,ones:a,unitX:s,unitY:l,zeros:i},Symbol.toStringTag,{value:"Module"}))},11868:(e,t,r)=>{r.d(t,{oe:()=>n});var o=r(34275);function n(e,t=!1){return e<=o.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}},71351:(e,t,r)=>{r.d(t,{Cr:()=>d,LV:()=>c,kb:()=>u,oC:()=>h,vt:()=>s}),r(4576);var o=r(4341),n=r(38954),i=r(51850),a=r(32114);function s(e){return e?l((0,i.o8)(e.origin),(0,i.o8)(e.direction)):l((0,i.vt)(),(0,i.vt)())}function l(e,t){return{origin:e,direction:t}}function c(e,t){const r=f.get();return r.origin=e,r.direction=t,r}function d(e,t,r=s()){return(0,n.c)(r.origin,e),(0,n.f)(r.direction,t,e),r}function u(e,t){const r=(0,n.b)(a.rq.get(),(0,n.n)(a.rq.get(),e.direction),(0,n.f)(a.rq.get(),t,e.origin));return(0,n.m)(r,r)}function h(e,t,r){const o=(0,n.m)(e.direction,(0,n.f)(r,t,e.origin));return(0,n.g)(r,e.origin,(0,n.j)(r,e.direction,o)),r}const f=new o.I((()=>s()));(0,i.vt)()},21015:(e,t,r)=>{r.d(t,{R:()=>l});var o=r(78888),n=r(60999),i=r(49186),a=r(74887),s=r(84952);class l{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,a.Te)(t),(0,s.lJ)(e)):this._load("binary",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){if(null==this._streamDataRequester)return(await(0,o.A)(t,{responseType:c[e]})).data;const s=await(0,n.Ke)(this._streamDataRequester.request(t,e,r));if(!0===s.ok)return s.value;throw(0,a.QP)(s.error),new i.A("",`Request for resource failed: ${s.error}`)}}const c={image:"image",binary:"array-buffer",json:"json","image+type":void 0}},84498:(e,t,r)=>{r.d(t,{x:()=>a});var o=r(34275),n=r(97146),i=r(63907);function a(e,t){switch(t){case i.WR.TRIANGLES:return"number"==typeof(r=e)?(0,n.tM)(r):(0,o.mg)(r)?new Uint16Array(r):r;case i.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(o[t++]=e[n],o[t++]=e[n+1],o[t++]=e[n+2]):(o[t++]=e[n+1],o[t++]=e[n],o[t++]=e[n+2])}return o}(e);case i.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const n=e[0];let i=e[1],a=0;for(let t=0;t<r;++t){const r=e[t+2];o[a++]=n,o[a++]=i,o[a++]=r,i=r}return o}(e)}var r}},51530:(e,t,r)=>{r.d(t,{KB:()=>s,Xi:()=>i,pn:()=>l,x3:()=>a});var o=r(44208),n=r(89192);class i{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=n.JS.KTX2_ENCODING}}function a(e){return"encoded-mesh-texture"===e?.type}async function s(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function l(e,t){if(t===n.JS.KTX2_ENCODING)return new i(e);const r=new Blob([e],{type:t}),a=URL.createObjectURL(r),s=new Image;if((0,o.A)("esri-iPhone"))return new Promise(((e,t)=>{const r=()=>{n(),e(s)},o=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(a),s.removeEventListener("load",r),s.removeEventListener("error",o)};s.addEventListener("load",r),s.addEventListener("error",o),s.src=a}));try{s.src=a,await s.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(a),s}},2701:(e,t,r)=>{r.d(t,{fetch:()=>Gt});var o=r(61473),n=r(34727),i=r(77690),a=r(29242),s=r(58083),l=r(9093),c=r(48163),d=r(38954),u=r(51850),h=r(70328),f=r(11868),m=r(13030),p=r(73354),v=r(65686),g=r(43609),x=r(51737),b=r(78358),y=r(21015),M=r(84498),T=r(51530),w=r(88340);function _(e){if(null==e)return null;const t=null!=e.offset?e.offset:w.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:w.Un,n=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,a.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,a.vt)();return(0,i.lw)(c,s,l),(0,i.lw)(c,n,c),c}class S{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class A{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new S,this.numberOfVertices=0}}var C=r(78888),O=r(60999),I=r(86805),E=r(49186),R=r(53966),P=r(81139),N=r(74887),B=r(46140),H=r(97146),L=r(99677),z=r(46610),F=r(89192),G=r(34275);function V(e){if(e.length<G.y9)return Array.from(e);if((0,G.cy)(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,G.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}var D=r(3694),j=r(620);class W{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._children=void 0,(0,j.vA)(e.length>=1),(0,j.vA)(3===r.size||4===r.size);const{data:o,size:n,indices:i}=r;(0,j.vA)(i.length%this._numIndexPerPrimitive==0),(0,j.vA)(i.length>=e.length*this._numIndexPerPrimitive);const a=e.length;let s=n*i[this._numIndexPerPrimitive*e[0]];U.clear(),U.push(s);const l=(0,u.fA)(o[s],o[s+1],o[s+2]),c=(0,u.o8)(l);for(let t=0;t<a;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){s=n*i[r+e],U.push(s);let t=o[s];l[0]=Math.min(t,l[0]),c[0]=Math.max(t,c[0]),t=o[s+1],l[1]=Math.min(t,l[1]),c[1]=Math.max(t,c[1]),t=o[s+2],l[2]=Math.min(t,l[2]),c[2]=Math.max(t,c[2])}}this.bbMin=l,this.bbMax=c;const h=(0,d.o)((0,u.vt)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(c[0]-l[0],c[1]-l[1]),c[2]-l[2]);let f=this.radius*this.radius;for(let e=0;e<U.length;++e){s=U.at(e);const t=o[s]-h[0],r=o[s+1]-h[1],n=o[s+2]-h[2],i=t*t+r*r+n*n;if(i<=f)continue;const a=Math.sqrt(i),l=.5*(a-this.radius);this.radius=this.radius+l,f=this.radius*this.radius;const c=l/a;h[0]+=t*c,h[1]+=r*c,h[2]+=n*c}this.center=h,U.clear()}getChildren(){if(this._children||(0,d.a)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,d.o)((0,u.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),o=new Array(8);for(let e=0;e<8;++e)o[e]=0;const{data:n,size:i,indices:a}=this.position;for(let s=0;s<t;++s){let t=0;const l=this._numIndexPerPrimitive*this.primitiveIndices[s];let c=i*a[l],d=n[c],u=n[c+1],h=n[c+2];for(let e=1;e<this._numIndexPerPrimitive;++e){c=i*a[l+e];const t=n[c],r=n[c+1],o=n[c+2];t<d&&(d=t),r<u&&(u=r),o<h&&(h=o)}d<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),r[s]=t,++o[t]}let s=0;for(let e=0;e<8;++e)o[e]>0&&++s;if(s<2)return;const l=new Array(8);for(let e=0;e<8;++e)l[e]=o[e]>0?new Uint32Array(o[e]):void 0;for(let e=0;e<8;++e)o[e]=0;for(let e=0;e<t;++e){const t=r[e];l[t][o[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==l[e]&&this._children.push(new W(l[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){U.prune()}}const U=new D.A({deallocator:null});var q=r(69720),k=r(96672),Y=r(4341),$=r(11964);function Z(e,t,r){return(0,d.f)(X,t,e),(0,d.f)(J,r,e),.5*(0,d.l)((0,d.b)(X,X,J))}r(32114),new Y.I($.vt),new Y.I((()=>{return e?{p0:(0,u.o8)(e.p0),p1:(0,u.o8)(e.p1),p2:(0,u.o8)(e.p2)}:{p0:(0,u.vt)(),p1:(0,u.vt)(),p2:(0,u.vt)()};var e}));const X=(0,u.vt)(),J=(0,u.vt)(),K=(0,u.vt)(),Q=(0,u.vt)(),ee=(0,u.vt)(),te=(0,u.vt)();var re=r(24326);class oe{constructor(e){this.channel=e,this.id=(0,re.c)()}}var ne=r(46540);r(28449),(0,u.vt)(),new Float32Array(6);class ie extends q.J{constructor(e,t,r=null,o=k.X.Mesh,n=null,i=-1){super(),this.material=e,this.mapPositions=r,this.type=o,this.objectAndLayerIdColor=n,this.edgeIndicesLength=i,this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[e,r]of t)this._attributes.set(e,{...r,indices:(0,H.Dg)(r.indices)}),e===ne.r.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(e).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new ie(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:V(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})}get indexCount(){const e=this._attributes.values().next().value.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===k.X.Mesh?this._computeAttachmentOriginTriangles(e):this.type===k.X.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,d.h)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:r,data:o,indices:n}=e;(0,d.s)(t,0,0,0),(0,d.s)(te,0,0,0);let i=0,a=0;for(let e=0;e<n.length-2;e+=3){const s=n[e]*r,l=n[e+1]*r,c=n[e+2]*r;(0,d.s)(K,o[s],o[s+1],o[s+2]),(0,d.s)(Q,o[l],o[l+1],o[l+2]),(0,d.s)(ee,o[c],o[c+1],o[c+2]);const u=Z(K,Q,ee);u?((0,d.g)(K,K,Q),(0,d.g)(K,K,ee),(0,d.j)(K,K,1/3*u),(0,d.g)(t,t,K),i+=u):((0,d.g)(te,te,K),(0,d.g)(te,te,Q),(0,d.g)(te,te,ee),a+=3)}return!(0===a&&0===i||(0!==i?((0,d.j)(t,t,1/i),0):0===a||((0,d.j)(t,te,1/a),0)))}(this.attributes.get(ne.r.POSITION),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get(ne.r.POSITION);return function(e,t,r){if(!e)return!1;(0,d.s)(r,0,0,0),(0,d.s)(te,0,0,0);let o=0,n=0;const{size:i,data:a,indices:s}=e,l=s.length-1,c=l+(t?2:0);for(let e=0;e<c;e+=2){const t=e<l?e+1:0,c=s[e<l?e:l]*i,u=s[t]*i;K[0]=a[c],K[1]=a[c+1],K[2]=a[c+2],Q[0]=a[u],Q[1]=a[u+1],Q[2]=a[u+2],(0,d.j)(K,(0,d.g)(K,K,Q),.5);const h=(0,d.F)(K,Q);h>0?((0,d.g)(r,r,(0,d.j)(K,K,h)),o+=h):0===o&&((0,d.g)(te,te,K),n++)}return 0!==o?((0,d.j)(r,r,1/o),!0):0!==n&&((0,d.j)(r,te,1/n),!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:o,indices:n}=e;(0,d.s)(t,0,0,0);let i=-1,a=0;for(let e=0;e<n.length;e++){const s=n[e]*r;i!==s&&(t[0]+=o[s],t[1]+=o[s+1],t[2]+=o[s+2],a++),i=s}return a>1&&(0,d.j)(t,t,1/a),a>0}(this.attributes.get(ne.r.POSITION),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(ne.r.POSITION);if(!e||0===e.indices.length)return null;const t=this.type===k.X.Mesh?3:1;(0,j.vA)(e.indices.length%t==0,"Indexing error: "+e.indices.length+" not divisible by "+t);const r=(0,H.tM)(e.indices.length/t);return new W(r,t,e)}get transformation(){return this._transformation??l.zK}set transformation(e){this._transformation=e&&e!==l.zK?(0,l.o8)(e):null}addHighlight(){const e=new oe(F.Mg.Highlight);return this.highlights=function(e,t){return null==e&&(e=[]),e.push(t),e}(this.highlights,e),e}removeHighlight(e){this.highlights=function(e,t){if(null==e)return null;const r=e.filter((e=>e!==t));return 0===r.length?null:r}(this.highlights,e)}}var ae=r(76844),se=r(44208),le=r(24151),ce=r(1843),de=r(49255),ue=r(96336),he=r(22911),fe=r(62602),me=r(59469),pe=r(35093),ve=r(25634),ge=r(14903),xe=r(33524);class be{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const ye=(0,h.vt)();function Me(e,t,r,o,n,i){if(!e.visible)return;const a=(0,d.z)(Be,o,r),s=(e,t,r)=>{i(e,r,t,!1)},l=new be(!1,t.options.normalRequired);if(e.boundingInfo){(0,j.vA)(e.type===k.X.Mesh);const o=t.tolerance;we(e.boundingInfo,r,a,o,n,l,s)}else{const t=e.attributes.get(ne.r.POSITION),o=t.indices;!function(e,t,r,o,n,i,a,s,l,c){const u=t,h=He,f=Math.abs(u[0]),m=Math.abs(u[1]),p=Math.abs(u[2]),v=f>=m?f>=p?0:2:m>=p?1:2,g=v,x=u[g]<0?2:1,b=(v+x)%3,y=(v+(3-x))%3,M=u[b]/u[g],T=u[y]/u[g],w=1/u[g],_=Se,S=Ae,A=Ce,{normalRequired:C}=l;for(let t=r;t<o;++t){const r=3*t,o=a*n[r];(0,d.s)(h[0],i[o+0],i[o+1],i[o+2]);const l=a*n[r+1];(0,d.s)(h[1],i[l+0],i[l+1],i[l+2]);const u=a*n[r+2];(0,d.s)(h[2],i[u+0],i[u+1],i[u+2]),s&&((0,d.c)(h[0],s.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,d.c)(h[1],s.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,d.c)(h[2],s.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,d.z)(_,h[0],e),(0,d.z)(S,h[1],e),(0,d.z)(A,h[2],e);const f=_[b]-M*_[g],m=_[y]-T*_[g],p=S[b]-M*S[g],v=S[y]-T*S[g],x=A[b]-M*A[g],O=A[y]-T*A[g],I=x*v-O*p,E=f*O-m*x,R=p*m-v*f;if((I<0||E<0||R<0)&&(I>0||E>0||R>0))continue;const P=I+E+R;if(0===P)continue;const N=I*(w*_[g])+E*(w*S[g])+R*(w*A[g]);if(N*Math.sign(P)<0)continue;const B=N/P;B>=0&&c(B,t,C?Ie(h):null)}}(r,a,0,o.length/3,o,t.data,t.stride,n,l,s)}}const Te=(0,u.vt)();function we(e,t,r,o,n,i,a){if(null==e)return;const s=function(e,t){return(0,d.s)(t,1/e[0],1/e[1],1/e[2])}(r,Te);if((0,h.Ne)(ye,e.bbMin),(0,h.vI)(ye,e.bbMax),null!=n&&n.applyToAabb(ye),function(e,t,r,o){return function(e,t,r,o){const n=(e[0]-o-t[0])*r[0],i=(e[3]+o-t[0])*r[0];let a=Math.min(n,i),s=Math.max(n,i);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-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]-o-t[2])*r[2],u=(e[5]+o-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,o)}(ye,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>Pe){const s=e.getChildren();if(void 0!==s){for(const e of s)we(e,t,r,o,n,i,a);return}}!function(e,t,r,o,n,i,a,s,l,c,d){const u=e[0],h=e[1],f=e[2],m=t[0],p=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=a*n[r];let c=i[o],x=i[o+1],b=i[o+2];const y=a*n[r+1];let M=i[y],T=i[y+1],w=i[y+2];const _=a*n[r+2];let S=i[_],A=i[_+1],C=i[_+2];null!=l&&([c,x,b]=l.applyToVertex(c,x,b,e),[M,T,w]=l.applyToVertex(M,T,w,e),[S,A,C]=l.applyToVertex(S,A,C,e));const O=M-c,I=T-x,E=w-b,R=S-c,P=A-x,N=C-b,B=p*N-P*v,H=v*R-N*m,L=m*P-R*p,z=O*B+I*H+E*L;if(Math.abs(z)<=Ne)continue;const F=u-c,G=h-x,V=f-b,D=F*B+G*H+V*L;if(z>0){if(D<0||D>z)continue}else if(D>0||D<z)continue;const j=G*E-I*V,W=V*O-E*F,U=F*I-O*G,q=m*j+p*W+v*U;if(z>0){if(q<0||D+q>z)continue}else if(q>0||D+q<z)continue;const k=(R*j+P*W+N*U)/z;k>=0&&d(k,t,g?Oe(O,I,E,R,P,N,_e):null)}}(t,r,0,c,l.indices,l.data,l.stride,s,n,i,a)}}const _e=(0,u.vt)();const Se=(0,u.vt)(),Ae=(0,u.vt)(),Ce=(0,u.vt)();function Oe(e,t,r,o,n,i,a){return(0,d.s)(Ee,e,t,r),(0,d.s)(Re,o,n,i),(0,d.b)(a,Ee,Re),(0,d.n)(a,a),a}function Ie(e){return(0,d.z)(Ee,e[1],e[0]),(0,d.z)(Re,e[2],e[0]),(0,d.b)(_e,Ee,Re),(0,d.n)(_e,_e),_e}const Ee=(0,u.vt)(),Re=(0,u.vt)(),Pe=1e3,Ne=1e-7,Be=(0,u.vt)(),He=[(0,u.vt)(),(0,u.vt)(),(0,u.vt)()];var Le=r(13464),ze=r(76412),Fe=r(57005);const Ge=new class{constructor(e=0){this.offset=e,this.sphere=(0,ze.c)(),this.tmpVertex=(0,u.vt)()}applyToVertex(e,t,r){const o=this.objectTransform.transform,n=(0,d.s)(Ve,e,t,r),i=(0,d.h)(n,n,o),a=this.offset/(0,d.l)(i);(0,d.r)(i,i,i,a);const s=this.objectTransform.inverse;return(0,d.h)(this.tmpVertex,i,s),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,d.l)(e);(0,d.r)(e,e,e,r);const o=this.offset/(0,d.l)(t);(0,d.r)(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,d.l)((0,ze.g)(e)),r=this.offset/t;return(0,d.r)((0,ze.g)(this.sphere),(0,ze.g)(e),(0,ze.g)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,u.vt)(),this._tmpMbs=(0,ze.c)(),this._tmpObb=new Fe.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,d.l)(e)}applyToVertex(e,t,r){const o=(0,d.s)(Ve,e,t,r),n=(0,d.s)(De,e,t,r+this.componentLocalOriginLength),i=this._totalOffset/(0,d.l)(n);return(0,d.r)(this._tmpVertex,o,n,i),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],o=e[1],n=e[2]+t,i=e[3],a=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(o),d=Math.abs(n),u=Math.abs(i),h=Math.abs(a),f=Math.abs(s),m=.5*(1+Math.sign(r*i))*Math.min(l,u),p=.5*(1+Math.sign(o*a))*Math.min(c,h),v=.5*(1+Math.sign(n*s))*Math.min(d,f),g=Math.max(l,u),x=Math.max(c,h),b=Math.max(d,f),y=Math.sqrt(m*m+p*p+v*v),M=Math.sign(l+r),T=Math.sign(c+o),w=Math.sign(d+n),_=Math.sign(u+i),S=Math.sign(h+a),A=Math.sign(f+s),C=this._totalOffset;if(y<C)return e[0]-=(1-M)*C,e[1]-=(1-T)*C,e[2]-=(1-w)*C,e[3]+=_*C,e[4]+=S*C,e[5]+=A*C,e;const O=C/Math.sqrt(g*g+x*x+b*b),I=C/y,E=I-O,R=-E;return e[0]+=r*(M*R+I),e[1]+=o*(T*R+I),e[2]+=n*(w*R+I),e[3]+=i*(_*E+O),e[4]+=a*(S*E+O),e[5]+=s*(A*E+O),e}applyToMbs(e){const t=(0,d.l)((0,ze.g)(e)),r=this._totalOffset/t;return(0,d.r)((0,ze.g)(this._tmpMbs),(0,ze.g)(e),(0,ze.g)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,Fe.gm)(e,this._totalOffset,this._totalOffset,le.RT.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,u.vt)()}applyToVertex(e,t,r){const o=(0,d.s)(Ve,e,t,r),n=(0,d.g)(De,o,this.localOrigin),i=this.offset/(0,d.l)(n);return(0,d.r)(this.tmpVertex,o,n,i),this.tmpVertex}applyToAabb(e){const t=je,r=We,o=Ue;for(let n=0;n<3;++n)t[n]=e[0+n]+this.localOrigin[n],r[n]=e[3+n]+this.localOrigin[n],o[n]=t[n];const n=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=n[t],e[t+3]=n[t];const i=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 n=0;n<3;++n)o[n]=e&1<<n?r[n]:t[n];i(o)}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 n=0;n<3;++n)o[n]=a&1<<n?0:e&1<<n?t[n]:r[n];i(o)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const Ve=(0,u.vt)(),De=(0,u.vt)(),je=(0,u.vt)(),We=(0,u.vt)(),Ue=(0,u.vt)();var qe=r(59907);class ke{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.get(ne.r.POSITION).indices.length}write(e,t,r,o,n,i){(0,qe.SA)(r,o,this.vertexBufferLayout,e,t,n,i)}}var Ye=r(43616),$e=r(91829),Ze=r(53466),Xe=r(72824),Je=r(97220),Ke=r(84867),Qe=r(39341),et=r(34886),tt=r(63907);tt.MT.LESS,tt.MT.ALWAYS;const rt={mask:255},ot={function:{func:tt.MT.ALWAYS,ref:F.dd.OutlineVisualElementMask,mask:F.dd.OutlineVisualElementMask},operation:{fail:tt.eA.KEEP,zFail:tt.eA.KEEP,zPass:tt.eA.ZERO}},nt={function:{func:tt.MT.ALWAYS,ref:F.dd.OutlineVisualElementMask,mask:F.dd.OutlineVisualElementMask},operation:{fail:tt.eA.KEEP,zFail:tt.eA.KEEP,zPass:tt.eA.REPLACE}};tt.MT.EQUAL,F.dd.OutlineVisualElementMask,F.dd.OutlineVisualElementMask,tt.eA.KEEP,tt.eA.KEEP,tt.eA.KEEP,tt.MT.NOTEQUAL,F.dd.OutlineVisualElementMask,F.dd.OutlineVisualElementMask,tt.eA.KEEP,tt.eA.KEEP,tt.eA.KEEP;var it=r(14327);const at=[1,1,.5],st=[0,.6,.2],lt=[0,1,.2];var ct=r(28491),dt=r(90644);class ut extends Xe.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=(0,u.ci)(at),this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=F.s2.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=u.uY,this.instancedDoublePrecision=!1,this.normalType=ue.W.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.shadowMappingEnabled=!1,this.ambient=(0,u.fA)(.2,.2,.2),this.diffuse=(0,u.fA)(.8,.8,.8),this.externalColor=(0,$e.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,u.vt)(),this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=F.it.Less,this.textureAlphaMode=F.sf.Blend,this.textureAlphaCutoff=pe.Q,this.textureAlphaPremultiplied=!1,this.hasOccludees=!1,this.renderOccluded=ge.m$.Occlude,this.isDecoration=!1}}Xe.gy;class ht extends Ke.w{constructor(e,t,r){t.spherical=e.viewingMode===le.RT.Global,t.doublePrecisionRequiresObfuscation=e.rctx.driverTest.doublePrecisionRequiresObfuscation.result,t.textureCoordinateType=t.hasColorTexture||t.hasMetallicRoughnessTexture||t.emissionSource===he.ZX.Texture||t.hasOcclusionTexture||t.hasNormalTexture?Ze.I.Default:Ze.I.None,t.objectAndLayerIdColorInstanced=t.instanced,super(e,t,r)}initializeProgram(e){return this._initializeProgram(e,ht.shader)}_initializeProgram(e,t){return new et.B(e.rctx,t.get().build(this.configuration),Qe.D)}_makePipeline(e,t){const{output:r,transparent:o,cullFace:n,customDepthTest:i,writeDepth:a,hasOccludees:s,enableOffset:l}=this.configuration,c=e===it.y.NONE,d=e===it.y.FrontFace;return(0,dt.Ey)({blending:(0,de.RN)(r)&&o?(0,xe.Yf)(e):null,culling:mt(this.configuration)?(0,dt.Xt)(n):null,depthTest:{func:(0,xe.K_)(e,ft(i))},depthWrite:(c||d)&&a?dt.kn:null,drawBuffers:r===de.V.Depth?{buffers:[tt.Hr.NONE]}:(0,xe.m6)(e,r),colorWrite:dt.wE,stencilWrite:s?rt:null,stencilTest:s?t?nt:ot:null,polygonOffset:c||d?null:(0,xe.aB)(l)})}initializePipeline(){return this._occludeePipelineState=this._makePipeline(this.configuration.transparencyPassType,!0),this._makePipeline(this.configuration.transparencyPassType,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function ft(e){return e===F.it.Lequal?tt.MT.LEQUAL:tt.MT.LESS}function mt(e){return e.cullFace!==F.s2.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}ht.shader=new Je.$(ct.D,(()=>r.e(5141).then(r.bind(r,5141))));var pt=r(90237),vt=r(99769),gt=r(99550);class xt extends gt.E{constructor(){super(...arguments),this.output=de.V.Color,this.alphaDiscardMode=F.sf.Opaque,this.doubleSidedMode=fe.W.None,this.pbrMode=me.A9.Disabled,this.cullFace=F.s2.None,this.transparencyPassType=it.y.NONE,this.normalType=ue.W.Attribute,this.textureCoordinateType=Ze.I.None,this.customDepthTest=F.it.Less,this.emissionSource=he.ZX.None,this.spherical=!1,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.multipassEnabled=!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.objectAndLayerIdColorInstanced=!1,this.instancedDoublePrecision=!1,this.doublePrecisionRequiresObfuscation=!1,this.writeDepth=!0,this.transparent=!1,this.discardInvisibleFragments=!1,this.enableOffset=!0,this.cullAboveGround=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1}}(0,pt._)([(0,vt.W)({count:de.V.COUNT})],xt.prototype,"output",void 0),(0,pt._)([(0,vt.W)({count:F.sf.COUNT})],xt.prototype,"alphaDiscardMode",void 0),(0,pt._)([(0,vt.W)({count:fe.W.COUNT})],xt.prototype,"doubleSidedMode",void 0),(0,pt._)([(0,vt.W)({count:me.A9.COUNT})],xt.prototype,"pbrMode",void 0),(0,pt._)([(0,vt.W)({count:F.s2.COUNT})],xt.prototype,"cullFace",void 0),(0,pt._)([(0,vt.W)({count:it.y.COUNT})],xt.prototype,"transparencyPassType",void 0),(0,pt._)([(0,vt.W)({count:ue.W.COUNT})],xt.prototype,"normalType",void 0),(0,pt._)([(0,vt.W)({count:Ze.I.COUNT})],xt.prototype,"textureCoordinateType",void 0),(0,pt._)([(0,vt.W)({count:F.it.COUNT})],xt.prototype,"customDepthTest",void 0),(0,pt._)([(0,vt.W)({count:he.ZX.COUNT})],xt.prototype,"emissionSource",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"spherical",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasVertexColors",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasSymbolColors",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasVerticalOffset",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasSlicePlane",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasSliceHighlight",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasColorTexture",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasMetallicRoughnessTexture",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasOcclusionTexture",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasNormalTexture",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasScreenSizePerspective",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasVertexTangents",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasOccludees",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"multipassEnabled",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasModelTransformation",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"offsetBackfaces",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"vvSize",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"vvColor",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"receiveShadows",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"receiveAmbientOcclusion",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"textureAlphaPremultiplied",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"instanced",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"instancedColor",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"objectAndLayerIdColorInstanced",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"instancedDoublePrecision",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"doublePrecisionRequiresObfuscation",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"writeDepth",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"transparent",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"discardInvisibleFragments",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"enableOffset",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"cullAboveGround",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"snowCover",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasColorTextureTransform",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasEmissionTextureTransform",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasNormalTextureTransform",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasOcclusionTextureTransform",void 0),(0,pt._)([(0,vt.W)()],xt.prototype,"hasMetallicRoughnessTextureTransform",void 0),(0,pt._)([(0,vt.W)({constValue:!1})],xt.prototype,"occlusionPass",void 0),(0,pt._)([(0,vt.W)({constValue:!0})],xt.prototype,"hasVvInstancing",void 0),(0,pt._)([(0,vt.W)({constValue:!1})],xt.prototype,"useCustomDTRExponentForWater",void 0),(0,pt._)([(0,vt.W)({constValue:!0})],xt.prototype,"useFillLights",void 0);var bt=r(57323);class yt extends ht{constructor(e,t,r){t.hasMetallicRoughnessTexture=!1,t.emissionSource=he.ZX.None,t.hasOcclusionTexture=!1,t.hasNormalTexture=!1,t.hasModelTransformation=!1,t.normalType=ue.W.Attribute,t.doubleSidedMode=fe.W.WindingOrder,t.hasVertexTangents=!1,super(e,t,r)}initializeProgram(e){return this._initializeProgram(e,yt.shader)}}yt.shader=new Je.$(bt.R,(()=>r.e(9933).then(r.bind(r,39933))));class Mt extends ge.im{constructor(e){super(e,wt),this._configuration=new xt,this.supportsEdges=!0,this.produces=new Map([[Le.N.OPAQUE_MATERIAL,e=>((0,de.iq)(e)||(0,de.PJ)(e))&&!this.parameters.transparent],[Le.N.TRANSPARENT_MATERIAL,e=>((0,de.iq)(e)||(0,de.PJ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[Le.N.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,e=>((0,de.XY)(e)||(0,de.PJ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=function(e){const t=(0,ce.BP)().vec3f(ne.r.POSITION);return e.normalType===ue.W.Compressed?t.vec2i16(ne.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(ne.r.NORMAL),e.hasVertexTangents&&t.vec4f(ne.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(ne.r.UV0),e.hasVertexColors&&t.vec4u8(ne.r.COLOR),e.hasSymbolColors&&t.vec4u8(ne.r.SYMBOLCOLOR),(0,se.A)("enable-feature:objectAndLayerId-rendering")&&t.vec4u8(ne.r.OBJECTANDLAYERIDCOLOR),t}(this.parameters)}isVisibleForOutput(e){return e!==de.V.Shadow&&e!==de.V.ShadowExcludeHighlight&&e!==de.V.ShadowHighlight||this.parameters.castShadows}get visible(){const e=this.parameters;if(e.layerOpacity<pe.Q)return!1;const{hasInstancedColor:t,hasVertexColors:r,hasSymbolColors:o,vvColor:n}=e,i=t||n||o,a="replace"===e.colorMixMode,s=e.opacity>=pe.Q;if(r&&i)return a||s;const l=e.externalColor&&e.externalColor[3]>=pe.Q;return r?a?l:s:i?a||s:a?l:s}get hasEmissions(){return!!this.parameters.emissiveTextureId||!(0,d.e)(this.parameters.emissiveFactor,u.uY)}getConfiguration(e,t){return this._configuration.output=e,this._configuration.hasNormalTexture=!!this.parameters.normalTextureId,this._configuration.hasColorTexture=!!this.parameters.textureId,this._configuration.hasVertexTangents=this.parameters.hasVertexTangents,this._configuration.instanced=this.parameters.isInstanced,this._configuration.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasSliceHighlight=this.parameters.hasSliceHighlight,this._configuration.alphaDiscardMode=this.parameters.textureAlphaMode,this._configuration.normalType=this.parameters.normalType,this._configuration.transparent=this.parameters.transparent,this._configuration.discardInvisibleFragments=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,null!=this.parameters.customDepthTest&&(this._configuration.customDepthTest=this.parameters.customDepthTest),this._configuration.hasOccludees=this.parameters.hasOccludees,this._configuration.cullFace=this.parameters.hasSlicePlane?F.s2.None:this.parameters.cullFace,this._configuration.multipassEnabled=t.multipassEnabled,this._configuration.cullAboveGround=t.multipassTerrain.cullAboveGround,this._configuration.hasModelTransformation=null!=this.parameters.modelTransformation,(0,de.RN)(e)&&(this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.hasSymbolColors=this.parameters.hasSymbolColors,this.parameters.treeRendering?this._configuration.doubleSidedMode=fe.W.WindingOrder:this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?fe.W.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?fe.W.WindingOrder:fe.W.None,this._configuration.instancedColor=this.parameters.hasInstancedColor,this._configuration.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this._configuration.receiveAmbientOcclusion=this.parameters.receiveAmbientOcclusion&&null!=t.ssao,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this._configuration.pbrMode=this.parameters.usePBR?this.parameters.isSchematic?me.A9.Schematic:me.A9.Normal:me.A9.Disabled,this._configuration.hasMetallicRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this._configuration.emissionSource=null!=this.parameters.emissiveTextureId?he.ZX.Texture:this.parameters.usePBR&&!this.parameters.isSchematic?he.ZX.Value:he.ZX.None,this._configuration.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this._configuration.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this._configuration.transparencyPassType=t.transparencyPassType,this._configuration.enableOffset=t.camera.relativeElevation<xe.xt,this._configuration.snowCover=this.hasSnowCover(t),this._configuration.hasColorTextureTransform=!!this.parameters.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!this.parameters.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!this.parameters.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!this.parameters.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!this.parameters.metallicRoughnessTextureTransformMatrix),this._configuration}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}intersect(e,t,r,o,n,i){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,d.s)(It,t[12],t[13],t[14]);let i=null;switch(r.viewingMode){case le.RT.Global:i=(0,d.n)(Ct,It);break;case le.RT.Local:i=(0,d.c)(Ct,At)}let a=0;const s=(0,d.f)(Et,It,e.eye),l=(0,d.l)(s),c=(0,d.j)(s,s,1/l);let u=null;this.parameters.screenSizePerspective&&(u=(0,d.m)(i,c)),a+=(0,Ye.kE)(e,l,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective),(0,d.j)(i,i,a),(0,d.t)(Ot,i,r.transform.inverseRotation),o=(0,d.f)(_t,o,Ot),n=(0,d.f)(St,n,Ot)}var a;Me(e,r,o,n,null!=(a=r.verticalOffset)?(Ge.offset=a,Ge):null,i)}createGLMaterial(e){return new Tt(e)}createBufferWriter(){return new ke(this._vertexBufferLayout)}}class Tt extends ve.m8{constructor(e){super({...e,...e.material.parameters})}_updateShadowState(e){e.shadowMap.enabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMap.enabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.hasOccludees&&this._material.setParameters({hasOccludees:e.hasOccludees})}beginSlot(e){(0,de.RN)(this._output)&&(this._updateShadowState(e),this._updateOccludeeState(e));const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.s)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.ensureTechnique(t.treeRendering?yt:ht,e)}}class wt extends ut{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}}const _t=(0,u.vt)(),St=(0,u.vt)(),At=(0,u.fA)(0,0,1),Ct=(0,u.vt)(),Ot=(0,u.vt)(),It=(0,u.vt)(),Et=(0,u.vt)(),Rt=()=>R.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");function Pt(e){throw new E.A("",`Request for object resource failed: ${e}`)}function Nt(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(Rt().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(Rt().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(Rt().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(Rt().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else Rt().warn("Indexed geometries must specify faces"),o=!1;break}default:Rt().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(Rt().warn("Geometry requires material"),o=!1);const n=e.params.vertexAttributes;for(const e in n)n[e].values||(Rt().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function Bt(e){const t=(0,h.Ie)();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&((0,h.iT)(t,r.bbMin),(0,h.iT)(t,r.bbMax))})),t}function Ht(e){switch(e){case"mask":return F.sf.Mask;case"maskAndTransparency":return F.sf.MaskBlend;case"none":return F.sf.Opaque;default:return F.sf.Blend}}function Lt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const zt=new B.R(1,2,"wosr");var Ft=r(61765);async function Gt(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,o.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=t?.streamDataRequester;if(r)return async function(e,t,r){const o=await(0,O.Ke)(t.request(e,"json",r));if(!0===o.ok)return o.value;(0,N.QP)(o.error),Pt(o.error.details.url)}(e,r,t);const o=await(0,O.Ke)((0,C.A)(e,t));if(!0===o.ok)return o.value.data;(0,N.QP)(o.error),Pt(o.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const n=e[o],i=n.images[0].data;if(!i){Rt().warn("Externally referenced texture data is not yet supported");continue}const a=n.encoding+";base64,"+i,s="/textureDefinitions/"+o,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:tt.pF.REPEAT,t:tt.pF.REPEAT},preMultiplyAlpha:Ht(l)!==F.sf.Opaque},d=t?.disableTextures?Promise.resolve(null):(0,L.D)(a,t);r.push(d.then((e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l}))))}const o=await Promise.all(r),n={};for(const e of o)n[e.refId]=e;return n}(r.textureDefinitions??{},t);let n=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];n+=t?.image?t.image.width*t.image.height*4:0}return{resource:r,textures:o,size:n+(0,I.iL)(r)}}(a.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,n=new Array,i=new P.O,a=e.resource,s=B.R.parse(a.version||"1.0","wosr");zt.validate(s);const l=a.model.name,c=a.model.geometries,d=a.materialDefinitions??{},h=e.textures;let f=0;const m=new Map;for(let e=0;e<c.length;e++){const a=c[e];if(!Nt(a))continue;const s=Lt(a),l=a.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===a.params.topology)return null;const t=a.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l[ne.r.POSITION],x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,H.tM)(x);p.push([e,new z.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,y=h&&h[b];if(y&&!m.has(b)){const{image:e,parameters:t}=y,r=new ae.g(e,t);o.push(r),m.set(b,r)}const M=m.get(b),T=M?M.id:void 0,w=s.material;let _=i.get(w,b);if(null==_){const e=d[w.slice(w.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y&&y.alphaChannelUsage,o=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,n=y?Ht(y.alphaChannelUsage):void 0,a={ambient:(0,u.ci)(e.diffuse),diffuse:(0,u.ci)(e.diffuse),opacity:1-(e.transparency||0),transparent:o,textureAlphaMode:n,textureAlphaCutoff:.33,textureId:T,initTextureTransparent:!0,doubleSided:!0,cullFace:F.s2.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(a,t.materialParameters),_=new Mt(a),i.set(w,b,_)}n.push(_);const S=new ie(_,p);f+=p.find((e=>e[0]===ne.r.POSITION))?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:l,stageResources:{textures:o,materials:n,geometries:r},pivotOffset:a.model.pivotOffset,numberOfVertices:f,lodThreshold:null}],referenceBoundingBox:Bt(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let w;if(t.cache)w=await t.cache.loadGLTF(a.url,t,!!t.usePBR);else{const{loadGLTF:e}=await r.e(4399).then(r.bind(r,4399));w=await e(new y.R(t.streamDataRequester),a.url,t,t.usePBR)}const S=w.model.meta?.ESRI_proxyEllipsoid,E=w.meta.isEsriSymbolResource&&null!=S&&"EsriRealisticTreesStyle"===w.meta.ESRI_webstyle;E&&!w.customMeta.esriTreeRendering&&(w.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const o=e.model.lods[r];for(const n of o.parts){const o=n.attributes.normal;if(null==o)return;const i=n.attributes.position,a=i.count,c=(0,u.vt)(),h=(0,u.vt)(),f=(0,u.vt)(),p=new Uint8Array(4*a),v=new Float64Array(3*a),g=(0,s.B8)((0,l.vt)(),n.transform);let x=0,b=0;for(let s=0;s<a;s++){i.getVec(s,h),o.getVec(s,c),(0,d.h)(h,h,n.transform),(0,d.f)(f,h,t.center),(0,d.D)(f,f,t.radius);const a=f[2],l=(0,d.l)(f),u=Math.min(.45+.55*l*l,1);(0,d.D)(f,f,t.radius),null!==g&&(0,d.h)(f,f,g),(0,d.n)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.o)(f,f,c,a>-1?.2:Math.min(-4*a-3.8,1)),v[x]=f[0],v[x+1]=f[1],v[x+2]=f[2],x+=3,p[b]=255*u,p[b+1]=255*u,p[b+2]=255*u,p[b+3]=255,b+=4}n.attributes.normal=new m.xs(v),n.attributes.color=new m.XP(p)}}}(w,S));const R=!!t.usePBR,G=w.meta.isEsriSymbolResource?{usePBR:R,isSchematic:!1,treeRendering:E,mrrFactors:[...lt]}:{usePBR:R,isSchematic:!1,treeRendering:!1,mrrFactors:[...at]},V={...t.materialParameters,treeRendering:E},{engineResources:D,referenceBoundingBox:j}=function(e,t,r,o){const a=e.model,s=new Array,l=new Map,y=new Map,w=a.lods.length,S=(0,h.Ie)();return a.lods.forEach(((e,C)=>{const O=!0===o.skipHighLods&&(w>1&&0===C||w>3&&1===C)||!1===o.skipHighLods&&null!=o.singleLodIndex&&C!==o.singleLodIndex;if(O&&0!==C)return;const I=new A(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const o=O?new Mt({}):function(e,t,r,o,n,i,a){const s=t.material+(t.attributes.normal?"_normal":"")+(t.attributes.color?"_color":"")+(t.attributes.texCoord0?"_texCoord0":"")+(t.attributes.tangent?"_tangent":""),l=e.materials.get(t.material),h=null!=t.attributes.texCoord0,f=null!=t.attributes.normal;if(null==l)return null;const m=function(e){switch(e){case"BLEND":return F.sf.Blend;case"MASK":return F.sf.Mask;case"OPAQUE":case null:case void 0:return F.sf.Opaque}}(l.alphaMode);if(!i.has(s)){if(h){const t=(t,r=!1)=>{if(null!=t&&!a.has(t)){const o=e.textures.get(t);if(null!=o){const e=o.data;a.set(t,new ae.g((0,T.x3)(e)?e.data:e,{...o.parameters,preMultiplyAlpha:!(0,T.x3)(e)&&r,encoding:(0,T.x3)(e)&&null!=e.encoding?e.encoding:void 0}))}}};t(l.textureColor,m!==F.sf.Opaque),t(l.textureNormal),t(l.textureOcclusion),t(l.textureEmissive),t(l.textureMetallicRoughness)}const r=l.color[0]**(1/Ft.T),p=l.color[1]**(1/Ft.T),v=l.color[2]**(1/Ft.T),g=l.emissiveFactor[0]**(1/Ft.T),x=l.emissiveFactor[1]**(1/Ft.T),b=l.emissiveFactor[2]**(1/Ft.T),y=null!=l.textureColor&&h?a.get(l.textureColor):null,M=function({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:o,emissiveTexture:n,emissiveFactor:i,occlusionTexture:a}){return null==e&&null==t&&null==n&&(null==i||(0,d.e)(i,u.uY))&&null==a&&(null==o||1===o)&&(null==r||1===r)}({normalTexture:l.textureNormal,metallicRoughnessTexture:l.textureMetallicRoughness,metallicFactor:l.metallicFactor,roughnessFactor:l.roughnessFactor,emissiveTexture:l.textureEmissive,emissiveFactor:l.emissiveFactor,occlusionTexture:l.textureOcclusion}),w=null!=l.normalTextureTransform?.scale?l.normalTextureTransform?.scale:c.Un;i.set(s,new Mt({...o,transparent:m===F.sf.Blend,customDepthTest:F.it.Lequal,textureAlphaMode:m,textureAlphaCutoff:l.alphaCutoff,diffuse:[r,p,v],ambient:[r,p,v],opacity:l.opacity,doubleSided:l.doubleSided,doubleSidedType:"winding-order",cullFace:l.doubleSided?F.s2.None:F.s2.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:f?ue.W.Attribute:ue.W.ScreenDerivative,castShadows:!0,receiveShadows:l.receiveShadows,receiveAmbientOcclusion:l.receiveAmbientOcclustion,textureId:null!=y?y.id:void 0,colorMixMode:l.colorMixMode,normalTextureId:null!=l.textureNormal&&h?a.get(l.textureNormal).id:void 0,textureAlphaPremultiplied:null!=y&&!!y.parameters.preMultiplyAlpha,occlusionTextureId:null!=l.textureOcclusion&&h?a.get(l.textureOcclusion).id:void 0,emissiveTextureId:null!=l.textureEmissive&&h?a.get(l.textureEmissive).id:void 0,metallicRoughnessTextureId:null!=l.textureMetallicRoughness&&h?a.get(l.textureMetallicRoughness).id:void 0,emissiveFactor:[g,x,b],mrrFactors:M?[...st]:[l.metallicFactor,l.roughnessFactor,o.mrrFactors[2]],isSchematic:M,colorTextureTransformMatrix:_(l.colorTextureTransform),normalTextureTransformMatrix:_(l.normalTextureTransform),scale:[w[0],w[1]],occlusionTextureTransformMatrix:_(l.occlusionTextureTransform),emissiveTextureTransformMatrix:_(l.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:_(l.metallicRoughnessTextureTransform),...n}))}const p=i.get(s);if(r.stageResources.materials.push(p),h){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(l.textureColor),e(l.textureNormal),e(l.textureOcclusion),e(l.textureEmissive),e(l.textureMetallicRoughness)}return p}(a,e,I,t,r,l,y),{geometry:s,vertexCount:w}=function(e,t){const r=e.attributes.position.count,o=(0,M.x)(e.indices||r,e.primitiveType),a=(0,f.oe)(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,p.a)(a,s,e.transform,3,l);const c=[[ne.r.POSITION,new z.n(a,o,3,!0)]];if(null!=e.attributes.normal){const t=(0,f.oe)(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;(0,i.Ge)(Vt,e.transform),(0,p.t)(t,a,Vt,3,s),(0,n.or)(Vt)&&(0,p.n)(t,t),c.push([ne.r.NORMAL,new z.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=(0,f.oe)(4*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.tangent;(0,i.z0)(Vt,e.transform),(0,v.t)(t,a,Vt,4,s),(0,n.or)(Vt)&&(0,p.n)(t,t,4),c.push([ne.r.TANGENT,new z.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,f.oe)(2*r),{typedBuffer:n,typedBufferStride:i}=e.attributes.texCoord0;(0,g.a)(t,n,2,i),c.push([ne.r.UV0,new z.n(t,o,2,!0)])}const d=e.attributes.color;if(null!=d){const t=new Uint8Array(4*r);4===d.elementCount?d instanceof m.Eq?(0,v.b)(t,d,255):d instanceof m.XP?(0,b.a)(t,d):d instanceof m.Uz&&(0,v.b)(t,d,1/256):(t.fill(255),d instanceof m.xs?(0,p.f)(t,d.typedBuffer,255,4,d.typedBufferStride):e.attributes.color instanceof m.eI?(0,x.c)(t,d.typedBuffer,4,e.attributes.color.typedBufferStride):e.attributes.color instanceof m.nS&&(0,p.f)(t,d.typedBuffer,1/256,4,d.typedBufferStride)),c.push([ne.r.COLOR,new z.n(t,o,4,!0)])}return{geometry:new ie(t,c),vertexCount:r}}(e,null!=o?o:new Mt({})),A=s.boundingInfo;null!=A&&0===C&&((0,h.iT)(S,A.bbMin),(0,h.iT)(S,A.bbMax)),null!=o&&(I.stageResources.geometries.push(s),I.numberOfVertices+=w)})),O||s.push(I)})),{engineResources:s,referenceBoundingBox:S}}(w,G,V,t.skipHighLods&&null==a.specifiedLodIndex?{skipHighLods:!0}:{skipHighLods:!1,singleLodIndex:a.specifiedLodIndex});return{lods:D,referenceBoundingBox:j,isEsriSymbolResource:w.meta.isEsriSymbolResource,isWosr:!1}}const Vt=(0,a.vt)()},66104:(e,t,r)=>{var o,n;r.d(t,{k5:()=>o}),r(34727),(n=o||(o={}))[n.Multiply=1]="Multiply",n[n.Ignore=2]="Ignore",n[n.Replace=3]="Replace",n[n.Tint=4]="Tint"},42583:(e,t,r)=>{r.d(t,{A:()=>i});var o=r(66104),n=r(2597);function i(e){e.vertex.code.add(n.H`
|
|
225
225
|
vec4 decodeSymbolColor(vec4 symbolColor, out int colorMixMode) {
|
|
226
226
|
float symbolAlpha = 0.0;
|
|
227
227
|
|
|
@@ -259,7 +259,7 @@ return posClip;
|
|
|
259
259
|
}`)}},82048:(e,t,r)=>{r.d(t,{c:()=>i});var o=r(2597),n=r(46540);function i(e,t=!0){e.attributes.add(n.r.POSITION,"vec2"),t&&e.varyings.add("uv","vec2"),e.vertex.main.add(o.H`
|
|
260
260
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
261
261
|
${t?o.H`uv = position * 0.5 + vec2(0.5);`:""}
|
|
262
|
-
`)}},49255:(e,t,r)=>{var o;function n(e){return e===o.Shadow||e===o.ShadowHighlight||e===o.ShadowExcludeHighlight||e===o.ViewshedShadow}function i(e){return function(e){return
|
|
262
|
+
`)}},49255:(e,t,r)=>{var o;function n(e){return e===o.Shadow||e===o.ShadowHighlight||e===o.ShadowExcludeHighlight||e===o.ViewshedShadow}function i(e){return function(e){return d(e)||u(e)}(e)||e===o.Normal}function a(e){return function(e){return function(e){return c(e)||s(e)}(e)||u(e)}(e)||e===o.Normal}function s(e){return e===o.Highlight||e===o.ObjectAndLayerIdColor}function l(e){return e===o.Color}function c(e){return l(e)||h(e)}function d(e){return l(e)||s(e)}function u(e){return e===o.Depth}function h(e){return e===o.ColorEmission}r.d(t,{LG:()=>h,PJ:()=>n,RN:()=>c,V:()=>o,XY:()=>i,dX:()=>d,iq:()=>a}),function(e){e[e.Color=0]="Color",e[e.ColorEmission=1]="ColorEmission",e[e.Depth=2]="Depth",e[e.Normal=3]="Normal",e[e.Shadow=4]="Shadow",e[e.ShadowHighlight=5]="ShadowHighlight",e[e.ShadowExcludeHighlight=6]="ShadowExcludeHighlight",e[e.ViewshedShadow=7]="ViewshedShadow",e[e.Highlight=8]="Highlight",e[e.ObjectAndLayerIdColor=9]="ObjectAndLayerIdColor",e[e.COUNT=10]="COUNT"}(o||(o={}))},76597:(e,t,r)=>{r.d(t,{d:()=>i});var o=r(46686),n=r(2597);function i(e){(0,o.i$)(e),e.vertex.code.add(n.H`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) {
|
|
263
263
|
vec4 eye = view * vec4(pos, 1.0);
|
|
264
264
|
depth = calculateLinearDepth(nearFar,eye.z);
|
|
265
265
|
return proj * eye;
|
|
@@ -356,7 +356,7 @@ vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;`),t.hasNormal
|
|
|
356
356
|
normalTextureTransformMatrix[1][0]/scale[0], normalTextureTransformMatrix[1][1]/scale[1], 0.0,
|
|
357
357
|
0.0, 0.0, 0.0 );
|
|
358
358
|
rawNormal.xy = (normalTextureRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),r.code.add(c.H`return tangentSpace * rawNormal;
|
|
359
|
-
}`))}},3452:(e,t,r)=>{r.d(t,{n:()=>D});var o,n,i,a=r(2597),s=r(63761),l=r(90237),c=r(34727),d=r(97768),u=r(36708),h=r(78659),f=r(10107),m=(r(44208),r(53966),r(87811),r(40608)),p=r(37585);(i=o||(o={}))[i.RED=0]="RED",i[i.RG=1]="RG",i[i.RGBA4=2]="RGBA4",i[i.RGBA=3]="RGBA",i[i.RGBA_MIPMAP=4]="RGBA_MIPMAP",i[i.R16F=5]="R16F",i[i.RGBA16F=6]="RGBA16F",function(e){e[e.DEPTH_STENCIL_TEXTURE=0]="DEPTH_STENCIL_TEXTURE",e[e.DEPTH16_BUFFER=1]="DEPTH16_BUFFER"}(n||(n={}));var v=r(69622),g=r(49186),x=r(89192);let b=class extends v.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces="composite-color",this.requireGeometryDepth=!1,this._context=null,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)}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}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===x.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._context.bindParameters}get renderingContext(){return this.view._stage.renderView.renderingContext}get renderContext(){return this._context}updateAnimation(){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e,t){this._context=t,this._frameBuffer=e.find((({name:e})=>e===this.produces));try{return this.render(e)}finally{this._frameBuffer=null}}};(0,l._)([(0,f.MZ)({constructOnly:!0})],b.prototype,"view",void 0),(0,l._)([(0,f.MZ)({constructOnly:!0})],b.prototype,"consumes",void 0),(0,l._)([(0,f.MZ)()],b.prototype,"produces",void 0),b=(0,l._)([(0,m.$)("esri.views.3d.webgl.RenderNode")],b);const y=b;var M=r(97220),T=r(84867),w=r(39341),_=r(34886),S=r(95774),C=r(90644);class A extends T.w{initializeProgram(e){return new _.B(e.rctx,A.shader.get().build(),w.D)}initializePipeline(){return(0,C.Ey)({colorWrite:C.wE})}}A.shader=new M.$(S.S,(()=>r.e(9384).then(r.bind(r,59384))));var O=r(48163);class I extends a.Y{constructor(){super(...arguments),this.projScale=1}}class E extends I{constructor(){super(...arguments),this.intensity=1}}class P extends a.Y{}class R extends P{constructor(){super(...arguments),this.blurSize=(0,O.vt)()}}var B=r(15581);class N extends T.w{initializeProgram(e){return new _.B(e.rctx,N.shader.get().build(),w.D)}initializePipeline(){return(0,C.Ey)({colorWrite:C.wE})}}N.shader=new M.$(B.S,(()=>r.e(191).then(r.bind(r,90191))));var H=r(63907),L=r(21231),z=r(67171);const V=2;let F=class extends y{constructor(e){super(e),this.consumes={required:["normals"]},this.produces="ssao",this.isEnabled=()=>!1,this._enableTime=(0,h.l5)(0),this._passParameters=new E,this._drawParameters=new R}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 z.R;t.wrapMode=H.pF.CLAMP_TO_EDGE,t.pixelFormat=H.Ab.RGB,t.wrapMode=H.pF.REPEAT,t.hasMipmap=!0,t.width=32,t.height=32,this._passParameters.noiseTexture=new L.g(this.renderingContext,t,e),this._ssaoTechnique=this.techniques.acquire(N),this._blurTechnique=this.techniques.acquire(A),this.addHandles((0,u.wB)((()=>this.isEnabled()),(()=>this._enableTime=(0,h.l5)(0))))}destroy(){this._passParameters.noiseTexture=(0,d.WD)(this._passParameters.noiseTexture),this._blurTechnique.release(),this._ssaoTechnique.release()}render(e){const t=this.bindParameters,r=e.find((({name:e})=>"normals"===e)),n=r?.getTexture(),i=r?.getTexture(H.nI),a=this.fboCache,s=t.camera,l=s.fullViewport[2],d=s.fullViewport[3],u=Math.round(l/V),f=Math.round(d/V);if(!this._ssaoTechnique.compiled||!this._blurTechnique.compiled)return this._enableTime=(0,h.l5)(performance.now()),this.requestRender(),a.acquire(u,f,"ssao",o.RED);0===this._enableTime&&(this._enableTime=(0,h.l5)(performance.now()));const m=this.renderingContext,v=this.view.qualitySettings.fadeDuration,g=s.relativeElevation,b=(0,c.qE)((5e5-g)/2e5,0,1),y=v>0?Math.min(v,performance.now()-this._enableTime)/v:1,M=y*b;this._passParameters.normalTexture=n,this._passParameters.depthTexture=i,this._passParameters.projScale=1/s.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*G/(0,B.g)(s)**6*M;const T=a.acquire(l,d,"ssao input",o.RG);m.bindFramebuffer(T.fbo),m.setViewport(0,0,l,d),m.bindTechnique(this._ssaoTechnique,t,this._passParameters,this._drawParameters),m.screen.draw();const w=a.acquire(u,f,"ssao blur",o.RED);m.bindFramebuffer(w.fbo),this._drawParameters.colorTexture=T.getTexture(),(0,p.hZ)(this._drawParameters.blurSize,0,V/d),m.bindTechnique(this._blurTechnique,t,this._passParameters,this._drawParameters),m.setViewport(0,0,u,f),m.screen.draw(),T.release();const _=a.acquire(u,f,"ssao",o.RED);return m.bindFramebuffer(_.fbo),m.setViewport(0,0,l,d),m.setClearColor(1,1,1,0),m.clear(H.NV.COLOR),this._drawParameters.colorTexture=w.getTexture(),(0,p.hZ)(this._drawParameters.blurSize,V/l,0),m.bindTechnique(this._blurTechnique,t,this._passParameters,this._drawParameters),m.setViewport(0,0,u,f),m.screen.draw(),m.setViewport4fv(s.fullViewport),w.release(),y<1&&this.requestRender(x.C7.UPDATE),_}};(0,l._)([(0,f.MZ)()],F.prototype,"consumes",void 0),(0,l._)([(0,f.MZ)()],F.prototype,"produces",void 0),(0,l._)([(0,f.MZ)({constructOnly:!0})],F.prototype,"techniques",void 0),(0,l._)([(0,f.MZ)({constructOnly:!0})],F.prototype,"isEnabled",void 0),F=(0,l._)([(0,m.$)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],F);const G=.5;function D(e,t){const r=e.fragment;t.receiveAmbientOcclusion?(r.uniforms.add(new s.N("ssaoTex",((e,t)=>t.ssao?.getTexture()))),r.constants.add("blurSizePixelsInverse","float",1/V),r.code.add(a.H`float evaluateAmbientOcclusionInverse() {
|
|
359
|
+
}`))}},3452:(e,t,r)=>{r.d(t,{n:()=>D});var o,n,i,a=r(2597),s=r(63761),l=r(90237),c=r(34727),d=r(97768),u=r(36708),h=r(78659),f=r(10107),m=(r(44208),r(53966),r(87811),r(40608)),p=r(37585);(i=o||(o={}))[i.RED=0]="RED",i[i.RG=1]="RG",i[i.RGBA4=2]="RGBA4",i[i.RGBA=3]="RGBA",i[i.RGBA_MIPMAP=4]="RGBA_MIPMAP",i[i.R16F=5]="R16F",i[i.RGBA16F=6]="RGBA16F",function(e){e[e.DEPTH_STENCIL_TEXTURE=0]="DEPTH_STENCIL_TEXTURE",e[e.DEPTH16_BUFFER=1]="DEPTH16_BUFFER"}(n||(n={}));var v=r(69622),g=r(49186),x=r(89192);let b=class extends v.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces="composite-color",this.requireGeometryDepth=!1,this._context=null,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)}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}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===x.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._context.bindParameters}get renderingContext(){return this.view._stage.renderView.renderingContext}get renderContext(){return this._context}updateAnimation(){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e,t){this._context=t,this._frameBuffer=e.find((({name:e})=>e===this.produces));try{return this.render(e)}finally{this._frameBuffer=null}}};(0,l._)([(0,f.MZ)({constructOnly:!0})],b.prototype,"view",void 0),(0,l._)([(0,f.MZ)({constructOnly:!0})],b.prototype,"consumes",void 0),(0,l._)([(0,f.MZ)()],b.prototype,"produces",void 0),b=(0,l._)([(0,m.$)("esri.views.3d.webgl.RenderNode")],b);const y=b;var M=r(97220),T=r(84867),w=r(39341),_=r(34886),S=r(95774),A=r(90644);class C extends T.w{initializeProgram(e){return new _.B(e.rctx,C.shader.get().build(),w.D)}initializePipeline(){return(0,A.Ey)({colorWrite:A.wE})}}C.shader=new M.$(S.S,(()=>r.e(9384).then(r.bind(r,59384))));var O=r(48163);class I extends a.Y{constructor(){super(...arguments),this.projScale=1}}class E extends I{constructor(){super(...arguments),this.intensity=1}}class R extends a.Y{}class P extends R{constructor(){super(...arguments),this.blurSize=(0,O.vt)()}}var N=r(15581);class B extends T.w{initializeProgram(e){return new _.B(e.rctx,B.shader.get().build(),w.D)}initializePipeline(){return(0,A.Ey)({colorWrite:A.wE})}}B.shader=new M.$(N.S,(()=>r.e(191).then(r.bind(r,90191))));var H=r(63907),L=r(21231),z=r(67171);const F=2;let G=class extends y{constructor(e){super(e),this.consumes={required:["normals"]},this.produces="ssao",this.isEnabled=()=>!1,this._enableTime=(0,h.l5)(0),this._passParameters=new E,this._drawParameters=new P}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 z.R;t.wrapMode=H.pF.CLAMP_TO_EDGE,t.pixelFormat=H.Ab.RGB,t.wrapMode=H.pF.REPEAT,t.hasMipmap=!0,t.width=32,t.height=32,this._passParameters.noiseTexture=new L.g(this.renderingContext,t,e),this._ssaoTechnique=this.techniques.acquire(B),this._blurTechnique=this.techniques.acquire(C),this.addHandles((0,u.wB)((()=>this.isEnabled()),(()=>this._enableTime=(0,h.l5)(0))))}destroy(){this._passParameters.noiseTexture=(0,d.WD)(this._passParameters.noiseTexture),this._blurTechnique.release(),this._ssaoTechnique.release()}render(e){const t=this.bindParameters,r=e.find((({name:e})=>"normals"===e)),n=r?.getTexture(),i=r?.getTexture(H.nI),a=this.fboCache,s=t.camera,l=s.fullViewport[2],d=s.fullViewport[3],u=Math.round(l/F),f=Math.round(d/F);if(!this._ssaoTechnique.compiled||!this._blurTechnique.compiled)return this._enableTime=(0,h.l5)(performance.now()),this.requestRender(),a.acquire(u,f,"ssao",o.RED);0===this._enableTime&&(this._enableTime=(0,h.l5)(performance.now()));const m=this.renderingContext,v=this.view.qualitySettings.fadeDuration,g=s.relativeElevation,b=(0,c.qE)((5e5-g)/2e5,0,1),y=v>0?Math.min(v,performance.now()-this._enableTime)/v:1,M=y*b;this._passParameters.normalTexture=n,this._passParameters.depthTexture=i,this._passParameters.projScale=1/s.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*V/(0,N.g)(s)**6*M;const T=a.acquire(l,d,"ssao input",o.RG);m.bindFramebuffer(T.fbo),m.setViewport(0,0,l,d),m.bindTechnique(this._ssaoTechnique,t,this._passParameters,this._drawParameters),m.screen.draw();const w=a.acquire(u,f,"ssao blur",o.RED);m.bindFramebuffer(w.fbo),this._drawParameters.colorTexture=T.getTexture(),(0,p.hZ)(this._drawParameters.blurSize,0,F/d),m.bindTechnique(this._blurTechnique,t,this._passParameters,this._drawParameters),m.setViewport(0,0,u,f),m.screen.draw(),T.release();const _=a.acquire(u,f,"ssao",o.RED);return m.bindFramebuffer(_.fbo),m.setViewport(0,0,l,d),m.setClearColor(1,1,1,0),m.clear(H.NV.COLOR),this._drawParameters.colorTexture=w.getTexture(),(0,p.hZ)(this._drawParameters.blurSize,F/l,0),m.bindTechnique(this._blurTechnique,t,this._passParameters,this._drawParameters),m.setViewport(0,0,u,f),m.screen.draw(),m.setViewport4fv(s.fullViewport),w.release(),y<1&&this.requestRender(x.C7.UPDATE),_}};(0,l._)([(0,f.MZ)()],G.prototype,"consumes",void 0),(0,l._)([(0,f.MZ)()],G.prototype,"produces",void 0),(0,l._)([(0,f.MZ)({constructOnly:!0})],G.prototype,"techniques",void 0),(0,l._)([(0,f.MZ)({constructOnly:!0})],G.prototype,"isEnabled",void 0),G=(0,l._)([(0,m.$)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],G);const V=.5;function D(e,t){const r=e.fragment;t.receiveAmbientOcclusion?(r.uniforms.add(new s.N("ssaoTex",((e,t)=>t.ssao?.getTexture()))),r.constants.add("blurSizePixelsInverse","float",1/F),r.code.add(a.H`float evaluateAmbientOcclusionInverse() {
|
|
360
360
|
vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
|
|
361
361
|
return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
|
|
362
362
|
}
|
|
@@ -754,7 +754,7 @@ const vec4 RGBA_2_FLOAT_FACTORS = vec4(
|
|
|
754
754
|
);
|
|
755
755
|
float rgba2float(vec4 rgba) {
|
|
756
756
|
return dot(rgba, RGBA_2_FLOAT_FACTORS);
|
|
757
|
-
}`)}},68259:(e,t,r)=>{r.d(t,{t:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"vec2",n.c.Draw,((r,o,n,i)=>r.setUniform2fv(e,t(o,n,i))))}}},40710:(e,t,r)=>{r.d(t,{W:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"vec3",n.c.Draw,((r,o,n,i)=>r.setUniform3fv(e,t(o,n,i))))}}},33079:(e,t,r)=>{r.d(t,{t:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"vec3",n.c.Pass,((r,o,n)=>r.setUniform3fv(e,t(o,n))))}}},20304:(e,t,r)=>{r.d(t,{m:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"float",n.c.Pass,((r,o,n)=>r.setUniform1f(e,t(o,n))))}}},98353:(e,t,r)=>{r.d(t,{h:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"mat3",n.c.Draw,((r,o,n)=>r.setUniformMatrix3fv(e,t(o,n))))}}},35644:(e,t,r)=>{r.d(t,{k:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"mat3",n.c.Pass,((r,o,n)=>r.setUniformMatrix3fv(e,t(o,n))))}}},40095:(e,t,r)=>{r.d(t,{X:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"mat4",n.c.Pass,((r,o,n)=>r.setUniformMatrix4fv(e,t(o,n))))}}},15976:(e,t,r)=>{r.d(t,{o:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"sampler2D",n.c.Draw,((r,o,n)=>r.bindTexture(e,t(o,n))))}}},39589:(e,t,r)=>{r.d(t,{n:()=>n});var o=r(46263);class n{constructor(e,t,r,n,i=null){if(this.name=e,this.type=t,this.arraySize=i,this.bind={[o.c.Pass]:null,[o.c.Draw]:null},n)switch(r){case o.c.Pass:this.bind[o.c.Pass]=n;break;case o.c.Draw:this.bind[o.c.Draw]=n}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},2597:(e,t,r)=>{r.d(t,{H:()=>n,If:()=>i,Y:()=>o});const o=class{};function n(e,...t){let r="";for(let o=0;o<t.length;o++)r+=e[o]+t[o];return r+=e[e.length-1],r}function i(e,t,r=""){return e?t:r}var a;(a=n||(n={})).int=function(e){return Math.round(e).toString()},a.float=function(e){return e.toPrecision(8)}},46263:(e,t,r)=>{var o;r.d(t,{c:()=>o}),function(e){e[e.Pass=0]="Pass",e[e.Draw=1]="Draw"}(o||(o={}))},61765:(e,t,r)=>{r.d(t,{T:()=>o});const o=2.1},60517:(e,t,r)=>{r.d(t,{z:()=>d});var o=r(49255),n=r(22911),i=r(76662),a=r(35093),s=r(63365),l=r(2597),c=r(14327);function d(e,t){e.include(i.Q,t),e.include(n.NL,t),e.fragment.include(s.a);const r=t.output===o.V.ObjectAndLayerIdColor,d=t.output
|
|
757
|
+
}`)}},68259:(e,t,r)=>{r.d(t,{t:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"vec2",n.c.Draw,((r,o,n,i)=>r.setUniform2fv(e,t(o,n,i))))}}},40710:(e,t,r)=>{r.d(t,{W:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"vec3",n.c.Draw,((r,o,n,i)=>r.setUniform3fv(e,t(o,n,i))))}}},33079:(e,t,r)=>{r.d(t,{t:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"vec3",n.c.Pass,((r,o,n)=>r.setUniform3fv(e,t(o,n))))}}},20304:(e,t,r)=>{r.d(t,{m:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"float",n.c.Pass,((r,o,n)=>r.setUniform1f(e,t(o,n))))}}},98353:(e,t,r)=>{r.d(t,{h:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"mat3",n.c.Draw,((r,o,n)=>r.setUniformMatrix3fv(e,t(o,n))))}}},35644:(e,t,r)=>{r.d(t,{k:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"mat3",n.c.Pass,((r,o,n)=>r.setUniformMatrix3fv(e,t(o,n))))}}},40095:(e,t,r)=>{r.d(t,{X:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"mat4",n.c.Pass,((r,o,n)=>r.setUniformMatrix4fv(e,t(o,n))))}}},15976:(e,t,r)=>{r.d(t,{o:()=>i});var o=r(39589),n=r(46263);class i extends o.n{constructor(e,t){super(e,"sampler2D",n.c.Draw,((r,o,n)=>r.bindTexture(e,t(o,n))))}}},39589:(e,t,r)=>{r.d(t,{n:()=>n});var o=r(46263);class n{constructor(e,t,r,n,i=null){if(this.name=e,this.type=t,this.arraySize=i,this.bind={[o.c.Pass]:null,[o.c.Draw]:null},n)switch(r){case o.c.Pass:this.bind[o.c.Pass]=n;break;case o.c.Draw:this.bind[o.c.Draw]=n}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},2597:(e,t,r)=>{r.d(t,{H:()=>n,If:()=>i,Y:()=>o});const o=class{};function n(e,...t){let r="";for(let o=0;o<t.length;o++)r+=e[o]+t[o];return r+=e[e.length-1],r}function i(e,t,r=""){return e?t:r}var a;(a=n||(n={})).int=function(e){return Math.round(e).toString()},a.float=function(e){return e.toPrecision(8)}},46263:(e,t,r)=>{var o;r.d(t,{c:()=>o}),function(e){e[e.Pass=0]="Pass",e[e.Draw=1]="Draw"}(o||(o={}))},61765:(e,t,r)=>{r.d(t,{T:()=>o});const o=2.1},60517:(e,t,r)=>{r.d(t,{z:()=>d});var o=r(49255),n=r(22911),i=r(76662),a=r(35093),s=r(63365),l=r(2597),c=r(14327);function d(e,t){e.include(i.Q,t),e.include(n.NL,t),e.fragment.include(s.a);const r=t.output===o.V.ObjectAndLayerIdColor,d=(0,o.LG)(t.output),u=(0,o.RN)(t.output)&&t.transparencyPassType===c.y.ColorAlpha,h=(0,o.RN)(t.output)&&t.transparencyPassType!==c.y.ColorAlpha,f=t.discardInvisibleFragments;let m=0;(h||d||u)&&e.outputs.add("fragColor","vec4",m++),d&&e.outputs.add("fragEmission","vec4",m++),u&&e.outputs.add("fragAlpha","float",m++),e.fragment.code.add(l.H`
|
|
758
758
|
void outputColorHighlightOID(vec4 finalColor, const in vec3 vWorldPosition) {
|
|
759
759
|
${(0,l.If)(r,l.H`finalColor.a = 1.0;`)}
|
|
760
760
|
|
|
@@ -100,10 +100,6 @@
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
calcite-action {
|
|
104
|
-
--calcite-color-foreground-1: transparent;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
103
|
// Prevents frozen columns from appearing offset from the table edge on load.
|
|
108
104
|
// This is because VaadinGrid's positioning logic accounts for 'hidden' calcite dropdown items,
|
|
109
105
|
// since they use 'visibility: hidden' instead of 'display: none'.
|
|
@@ -115,10 +111,6 @@
|
|
|
115
111
|
}
|
|
116
112
|
}
|
|
117
113
|
|
|
118
|
-
.esri-column__action {
|
|
119
|
-
--calcite-color-foreground-1: transparent;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
114
|
.esri-column__header-menu-icon {
|
|
123
115
|
margin-inline-end: $side-spacing;
|
|
124
116
|
}
|
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
padding: $cap-spacing $side-spacing;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
.esri-print__browse-template-button-container-filter {
|
|
32
|
+
margin-right: $cap-spacing;
|
|
33
|
+
}
|
|
34
|
+
|
|
31
35
|
.esri-print__container {
|
|
32
36
|
display: flex;
|
|
33
37
|
flex-direction: column;
|
|
@@ -121,25 +125,19 @@
|
|
|
121
125
|
}
|
|
122
126
|
}
|
|
123
127
|
|
|
128
|
+
.esri-print__template-select-error {
|
|
129
|
+
color: var(--calcite-color-status-danger);
|
|
130
|
+
}
|
|
131
|
+
|
|
124
132
|
.esri-print__template-select-container {
|
|
125
|
-
display: flex;
|
|
126
|
-
align-items: center;
|
|
127
|
-
justify-content: space-between;
|
|
128
133
|
border: 1px solid $border-color;
|
|
129
134
|
cursor: pointer;
|
|
130
135
|
|
|
131
|
-
.esri-print__template-select-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
.esri-print__template-select-icon {
|
|
137
|
-
padding: $cap-spacing;
|
|
138
|
-
|
|
139
|
-
/* stylelint-disable-next-line order/order */
|
|
140
|
-
@include icomoonIconSelector() {
|
|
141
|
-
background: transparent;
|
|
142
|
-
}
|
|
136
|
+
.esri-print__template-select-error,
|
|
137
|
+
.esri-print__template-select-arrow {
|
|
138
|
+
display: flex;
|
|
139
|
+
align-self: center;
|
|
140
|
+
margin-right: $cap-spacing;
|
|
143
141
|
}
|
|
144
142
|
}
|
|
145
143
|
|