(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-08e8eb9a"],{"1bd2":function(e,t,i){"use strict";i.d(t,"a",(function(){return c}));var r=i("a4ee"),a=i("b2b2"),s=i("fab3"),o=i("59b2"),n=(i("b50f"),i("c120"),i("cea0"),i("d386"));const c=e=>{let t=class extends(Object(s["b"])(e)){constructor(){super(...arguments),this.parent=null}get updating(){return!1}get visible(){const e=!Object(a["k"])(this.parent)||this.parent.visible&&!this.parent.suspended;return this.analysis.visible&&e}};return Object(r["a"])([Object(o["b"])({readOnly:!0})],t.prototype,"type",void 0),Object(r["a"])([Object(o["b"])({constructOnly:!0})],t.prototype,"analysis",void 0),Object(r["a"])([Object(o["b"])({constructOnly:!0})],t.prototype,"parent",void 0),Object(r["a"])([Object(o["b"])({constructOnly:!0})],t.prototype,"view",void 0),Object(r["a"])([Object(o["b"])({readOnly:!0})],t.prototype,"updating",null),Object(r["a"])([Object(o["b"])({readOnly:!0})],t.prototype,"visible",null),t=Object(r["a"])([Object(n["a"])("esri.views.3d.analysis.AnalysisView3D")],t),t}},2252:function(e,t,i){"use strict";i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return s}));var r=i("3886");function a(e){e.vertex.uniforms.add("cameraPosition","vec3").add("perScreenPixelRatio","float").add("screenSize","float"),e.vertex.code.add(r["a"]`float computeRenderPixelSizeAt( vec3 pWorld ){ vec3 viewForward = - vec3(view[0][2], view[1][2], view[2][2]); float viewDirectionDistance = abs(dot(viewForward, pWorld - cameraPosition)); return viewDirectionDistance*perScreenPixelRatio; } vec3 screenSizeScaling(vec3 position, vec3 anchor){ return position * screenSize * computeRenderPixelSizeAt(anchor) + anchor; }`)}function s(e,t,i){e.setUniform1f("perScreenPixelRatio",i.camera.perScreenPixelRatio),e.setUniform1f("screenSize",t.screenSize)}},2698:function(e,t,i){"use strict";function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,"a",(function(){return r}))},"29a2":function(e,t,i){"use strict";i.d(t,"a",(function(){return o})),i.d(t,"b",(function(){return n}));var r=i("b2b2"),a=i("8188"),s=i("0cb9");function o(e,t,i,o=!1){const n=Object(a["D"])(e,t);return Object(r["j"])(n)?null:(n.hasZ&&!o||!Object(r["k"])(i)||(n.z=Object(r["u"])(Object(s["b"])(i,n),0)),n)}function n(e,t,i){i.warnOnce(`Failed to project analysis geometry (id: '${e.id}'), projection from spatial reference (wkid: '${t.wkid}') to view spatial reference is not supported. Projection may be possible after calling projection.load().`)}},"2e4d":function(e,t,i){"use strict";i.d(t,"a",(function(){return p}));var r=i("a4ee"),a=i("a5d8"),s=i("e694"),o=i("59b2"),n=(i("b50f"),i("c120"),i("cea0")),c=i("afcf"),l=i("d386"),d=i("22f4");let u=class extends(Object(a["b"])(s["b"])){constructor(e){super(e),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.visible=!0,this.opacity=1}readTitle(e,t){return"string"==typeof t.alias?t.alias:"string"==typeof t.name?t.name:""}readIdOnlyOnce(e){return-1!==this.id?this.id:"number"==typeof e?e:void 0}};Object(r["a"])([Object(o["b"])({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],u.prototype,"title",void 0),Object(r["a"])([Object(c["a"])("service","title",["alias","name"])],u.prototype,"readTitle",null),Object(r["a"])([Object(o["b"])()],u.prototype,"layer",void 0),Object(r["a"])([Object(o["b"])({type:n["a"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],u.prototype,"id",void 0),Object(r["a"])([Object(c["a"])("service","id")],u.prototype,"readIdOnlyOnce",null),Object(r["a"])([Object(o["b"])(Object(d["k"])(String))],u.prototype,"modelName",void 0),Object(r["a"])([Object(o["b"])(Object(d["k"])(Boolean))],u.prototype,"isEmpty",void 0),Object(r["a"])([Object(o["b"])({type:Boolean,json:{name:"visibility",write:!0}})],u.prototype,"visible",void 0),Object(r["a"])([Object(o["b"])({type:Number,json:{write:!0}})],u.prototype,"opacity",void 0),u=Object(r["a"])([Object(l["a"])("esri.layers.buildingSublayers.BuildingSublayer")],u);const p=u},"4e85":function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return dt}));var r=i("a4ee"),a=i("fc29"),s=i("b2b2"),o=i("59b2"),n=(i("b50f"),i("c120")),c=i("cea0"),l=i("d386"),d=i("1bd2"),u=(i("e06a"),i("d3ac")),p=i("6a0ed"),b=i("1a3e"),h=i("c6f7"),y=i("680b"),O=i("4ae5");let j=class extends(Object(u["a"])(p["a"])){constructor(e){super(e),this.type="plane",this.position=null,this.heading=0,this.tilt=0,this.width=10,this.height=10}equals(e){return this.heading===e.heading&&this.tilt===e.tilt&&Object(s["f"])(this.position,e.position)&&this.width===e.width&&this.height===e.height}};Object(r["a"])([Object(o["b"])({readOnly:!0,json:{read:!1,write:!0}})],j.prototype,"type",void 0),Object(r["a"])([Object(o["b"])({type:O["a"]}),Object(h["a"])()],j.prototype,"position",void 0),Object(r["a"])([Object(o["b"])({type:Number,nonNullable:!0,range:{min:0,max:360}}),Object(h["a"])(),Object(b["a"])(e=>y["e"].normalize(Object(c["i"])(e),0,!0))],j.prototype,"heading",void 0),Object(r["a"])([Object(o["b"])({type:Number,nonNullable:!0,range:{min:0,max:360}}),Object(h["a"])(),Object(b["a"])(e=>y["e"].normalize(Object(c["i"])(e),0,!0))],j.prototype,"tilt",void 0),Object(r["a"])([Object(o["b"])({type:Number,nonNullable:!0}),Object(h["a"])()],j.prototype,"width",void 0),Object(r["a"])([Object(o["b"])({type:Number,nonNullable:!0}),Object(h["a"])()],j.prototype,"height",void 0),j=Object(r["a"])([Object(l["a"])("esri.analysis.SlicePlane")],j);const f=j;var g=i("af40"),v=i("e92d"),m=i("477c"),_=i("3795"),w=i("0d9f"),C=i("a6a3"),E=i("e814"),P=i("29a2"),S=i("6c97"),x=i("38a4"),T=i("a915"),I=i("d791"),R=i("afe1"),F=(i("04f0"),i("e431")),A=i("0b2d"),D=i("8188"),V=i("3a35"),N=i("7289"),L=i("d18f"),k=i("a1b1"),M=i("7361"),U=(i("ce6d"),i("4c37"),i("1c92"),i("dae5")),G=(i("3349"),i("f694"),i("9180"),i("bd7e")),z=(i("d3cf"),i("0cb9"),i("9990"),i("171c"),i("5a22"),i("b7c2")),W=(i("748fd"),i("7298"));Object(T["f"])(),Object(G["c"])(),Object(L["c"])(),Object(U["b"])(),Object(R["d"])(),Object(R["d"])(),Object(N["d"])(),Object(A["f"])(),Object(A["f"])(),Object(A["f"])(),Object(A["f"])(),Object(A["f"])(),Object(A["f"])(),new O["a"]({x:0,y:0,z:0,spatialReference:null});var q=i("0fc4"),H=(i("ba58"),i("caf7")),B=i("35b3"),Q=(i("d36e"),i("4261"),i("8190"),i("fc00"),i("a05b")),$=i("d7f7"),Z=(i("b061"),i("badc")),K=(i("1153"),i("b7bd")),Y=(i("5957"),i("7c51")),X=i("2252"),J=i("d272"),ee=i("c6d7"),te=i("8e97"),ie=i("c3a4"),re=i("ca98"),ae=i("da35"),se=i("7438"),oe=i("c829"),ne=i("692f"),ce=i("d17d"),le=i("189c");class de extends re["a"]{initializeProgram(e){const t=de.shader.get(),i=this.configuration,r=t.build({output:i.output,slicePlaneEnabled:i.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,screenSizeEnabled:i.screenSizeEnabled,shadingEnabled:i.shadingEnabled,oitEnabled:i.transparencyPassType===z["l"].Color,multipassTerrainEnabled:i.multipassTerrainEnabled,cullAboveGround:i.cullAboveGround});return new oe["a"](e.rctx,r,pe)}bindPass(e,t){const{screenSizeEnabled:i,shadingEnabled:r}=this.configuration,{color:a,shadingTint:s,shadingDirection:o}=e;Object(te["b"])(this.program,t.camera.projectionMatrix),this.program.setUniform4fv("uColor",a),t.multipassTerrainEnabled&&(this.program.setUniform2fv("nearFar",t.camera.nearFar),this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(ee["a"])(this.program,t)),r&&(this.program.setUniform4fv("shadedColor",this._blendColor(be,s,a)),this.program.setUniform3fv("shadingDirection",o),this.program.setUniformMatrix4fv("viewNormal",t.camera.viewInverseTransposeMatrix)),i&&Object(X["b"])(this.program,e,t)}bindDraw(e){Object(te["c"])(this.program,e),Object(te["a"])(this.program,e.origin,e.camera.viewInverseTransposeMatrix),Object(J["c"])(this.program,this.configuration,e),this.program.rebindTextures()}_blendColor(e,t,i){const r=1-t[3],a=t[3]+i[3]*r;return 0===a?(e[3]=a,e):(e[0]=(t[0]*t[3]+i[0]*i[3]*r)/a,e[1]=(t[1]*t[3]+i[1]*i[3]*r)/a,e[2]=(t[2]*t[3]+i[2]*i[3]*r)/a,e[3]=i[3],e)}_setPipelineState(e){const t=this.configuration,i=e===z["l"].NONE,r=e===z["l"].FrontFace;return Object(le["g"])({blending:t.output!==Q["a"].Color&&t.output!==Q["a"].Alpha||!t.transparent?null:i?se["d"]:Object(se["f"])(e),culling:Object(le["c"])(t.cullFace),depthTest:{func:r?ce["h"].LESS:t.shadingEnabled?ce["h"].LEQUAL:ce["h"].LESS},depthWrite:i?t.writeDepth&&le["e"]:Object(se["h"])(e),colorWrite:le["d"],polygonOffset:i||r?null:se["a"]})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}de.shader=new ie["a"](ne["a"],()=>i.e("chunk-2d2219c9").then(i.bind(null,"caa6")));class ue extends ae["a"]{constructor(){super(...arguments),this.output=Q["a"].Color,this.cullFace=z["c"].None,this.slicePlaneEnabled=!1,this.transparent=!1,this.writeDepth=!0,this.screenSizeEnabled=!0,this.shadingEnabled=!0,this.transparencyPassType=z["l"].NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}Object(r["a"])([Object(ae["b"])({count:Q["a"].COUNT})],ue.prototype,"output",void 0),Object(r["a"])([Object(ae["b"])({count:z["c"].COUNT})],ue.prototype,"cullFace",void 0),Object(r["a"])([Object(ae["b"])()],ue.prototype,"slicePlaneEnabled",void 0),Object(r["a"])([Object(ae["b"])()],ue.prototype,"transparent",void 0),Object(r["a"])([Object(ae["b"])()],ue.prototype,"writeDepth",void 0),Object(r["a"])([Object(ae["b"])()],ue.prototype,"screenSizeEnabled",void 0),Object(r["a"])([Object(ae["b"])()],ue.prototype,"shadingEnabled",void 0),Object(r["a"])([Object(ae["b"])({count:z["l"].COUNT})],ue.prototype,"transparencyPassType",void 0),Object(r["a"])([Object(ae["b"])()],ue.prototype,"multipassTerrainEnabled",void 0),Object(r["a"])([Object(ae["b"])()],ue.prototype,"cullAboveGround",void 0);const pe=new Map([[K["a"].POSITION,0],[K["a"].NORMAL,1],[K["a"].OFFSET,2]]),be=Object(q["e"])();B["b"];$["a"];Object(F["t"])(Object(A["f"])(),[.5,-.5,-.5]),z["c"].None,B["a"];Object(A["f"])(),Object(A["f"])();function he(e,t,i,r){const a=Object(F["t"])(M["d"].get(),e),s=Object(F["t"])(M["d"].get(),t),o=Object(F["i"])(M["d"].get(),a,s);return r[0]=a[0],r[1]=a[1],r[2]=a[2],r[3]=0,r[4]=s[0],r[5]=s[1],r[6]=s[2],r[7]=0,r[8]=o[0],r[9]=o[1],r[10]=o[2],r[11]=0,r[12]=i[0],r[13]=i[1],r[14]=i[2],r[15]=1,r}Object(n["a"])("mac"),Math.cos(Object(x["h"])(45)),Math.cos(Object(x["h"])(5));const ye=.7,Oe=[1,.5,0],je=2,fe=1,ge=[...Oe,ye],ve=[0,0,0,.04],me=[...Oe,.5];var _e=i("94e6"),we=i("7577"),Ce=i("5ef2"),Ee=i("5fae"),Pe=i("8675"),Se=i("fa1e"),xe=i("b04d");class Te extends re["a"]{initializeProgram(e){const t=Te.shader.get().build();return new oe["a"](e.rctx,t,Se["a"])}bindPass(e,t){Object(te["b"])(this.program,t.camera.projectionMatrix),this.program.setUniform4fv("backgroundColor",e.backgroundColor),this.program.setUniform4fv("gridColor",e.gridColor),this.program.setUniform1f("gridWidth",e.gridWidth)}bindDraw(e){Object(te["c"])(this.program,e),this.program.rebindTextures()}initializePipeline(){return Object(le["g"])({blending:Object(le["h"])(ce["b"].ONE,ce["b"].ONE,ce["b"].ONE_MINUS_SRC_ALPHA,ce["b"].ONE_MINUS_SRC_ALPHA),depthTest:{func:ce["h"].LESS},colorWrite:le["d"]})}}Te.shader=new ie["a"](xe["a"],()=>i.e("chunk-2d0a47c1").then(i.bind(null,"0748")));class Ie extends B["b"]{constructor(e){super(e,Fe),this._config=new ae["a"]}intersect(e,t,i,r,a,s,o){return Object(Y["i"])(e,t,r,a,s,void 0,o)}createBufferWriter(){return new Pe["a"](Pe["d"])}requiresSlot(e){return e===Z["a"].TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL}createGLMaterial(e){return e.output===Q["a"].Color?new Re(e):null}getTechniqueConfig(){return this._config}}class Re extends $["a"]{constructor(e){super(e),this.ensureTechnique(Te,null)}updateParameters(){return Object(s["t"])(this.technique)}beginSlot(){return Object(s["t"])(this.technique)}bind(e,t){t.bindPass(this._material.parameters,e)}}const Fe={backgroundColor:[1,0,0,.5],gridColor:[0,1,0,.5],gridWidth:4,...B["a"]};class Ae extends Ee["a"]{constructor(e){super(e),this._material=null,this._renderOccluded=B["c"].OccludeAndTransparent,this._gridWidth=1,this._gridColor=Object(Ce["c"])(1,0,0,1),this._backgroundColor=Object(Ce["c"])(1,0,0,1),this.applyProps(e)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get gridWidth(){return this._gridWidth}set gridWidth(e){this._gridWidth!==e&&(this._gridWidth=e,this._updateMaterial())}get gridColor(){return this._gridColor}set gridColor(e){Object(we["c"])(this._gridColor,e),this._updateMaterial()}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){Object(we["c"])(this._backgroundColor,e),this._updateMaterial()}createExternalResources(){this._material=new Ie(this.materialParameters)}destroyExternalResources(){this._material=null}forEachExternalMaterial(e){Object(s["k"])(this._material)&&e(this._material)}createGeometries(e){if(Object(s["k"])(this._material)){const t=H["a"].createSquareGeometry();e.addGeometry(t,this._material)}}get materialParameters(){return{backgroundColor:this._backgroundColor,gridWidth:this._gridWidth,gridColor:this._gridColor,renderOccluded:this._renderOccluded}}_updateMaterial(){Object(s["k"])(this._material)&&this._material.setParameters(this.materialParameters)}}var De=i("92a1");i("0278"),i("ad96"),i("3748"),i("86ba"),i("3af1");const Ve=v["a"].getLogger("esri.views.3d.interactive.analysisTools.slice.sliceToolUtils");function Ne(e,t,i){const r=t.worldUpAtPosition(e.origin,M["d"].get()),a=e.basis1,s=ze(e,r),o=Math.round(s/Ke)*Ke;return Object(w["j"])(e,o-s,a,i)}function Le(e,t){return he(e.basis1,e.basis2,e.origin,t)}var ke;function Me(e){const t=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0],[-1,-1,0]];return new _e["a"]({view:e,attached:!0,color:ge,width:fe,writeDepthEnabled:!1,renderOccluded:B["c"].OccludeAndTransparent,geometry:[t]})}function Ue(e){return new Ae({view:e,attached:!0,backgroundColor:[...ve],gridColor:me,gridWidth:4,renderOccluded:B["c"].OccludeAndTransparent})}function Ge(e,t,i,r=new f){if(Object(s["j"])(e))return null;const{renderCoordsHelper:a}=t,o=a.fromRenderCoords(e.origin,t.spatialReference);if(Object(s["j"])(o))return null;const n=Object(D["D"])(o,i);if(Object(s["j"])(n))return null;r.position=n;const c=a.worldUpAtPosition(e.origin,M["d"].get()),l=a.worldBasisAtPosition(e.origin,V["a"].Y,M["d"].get()),d=2*Object(F["r"])(e.basis1),u=2*Object(F["r"])(e.basis2),p=De["a"].renderUnitScaleFactor(t.spatialReference,i);return r.width=d*p,r.height=u*p,r.tilt=Object(x["p"])(ze(e,c)),r.heading=Object(x["p"])(We(e,c,l)),r}function ze(e,t){return Object(k["b"])(t,e.basis2,e.basis1)+Ke}function We(e,t,i){return Object(k["b"])(e.basis1,i,t)-Ke}function qe(e,t,i,r,a,s,o=Object(w["d"])()){return s.toRenderCoords(e,o.origin)?(s.worldBasisAtPosition(o.origin,V["a"].X,o.basis1),s.worldBasisAtPosition(o.origin,V["a"].Y,o.basis2),Object(N["j"])(o.basis2,o.basis1,o.origin,o.plane),Object(w["j"])(o,-Object(x["h"])(t),Object(w["i"])(o),o),Object(w["j"])(o,Object(x["h"])(i),o.basis1,o),Object(F["g"])(o.basis1,o.basis1,r/2),Object(F["g"])(o.basis2,o.basis2,a/2),Object(w["l"])(o),o):(Ve.error(`Failed to project slice plane position, projection from ${e.spatialReference.wkid} is not supported`),null)}function He(e,t){if(Object(s["j"])(e)||Object(s["j"])(e.position))return null;const i=Object(P["a"])(e.position,t.spatialReference,t.elevationProvider);if(Object(s["j"])(i))return null;const r=De["a"].renderUnitScaleFactor(e.position.spatialReference,t.spatialReference),a=e.width*r,o=e.height*r;return{position:i,heading:e.heading,tilt:e.tilt,renderWidth:a,renderHeight:o}}function Be(e,t,i,r=Object(w["d"])()){if(Object(s["j"])(e))return null;const a=qe(e.position,e.heading,e.tilt,e.renderWidth,e.renderHeight,t.renderCoordsHelper,r);return!i.tiltEnabled&&Object(s["k"])(a)&&Ne(a,t.renderCoordsHelper,a),a}function Qe(e){switch(e.type){case"analysis":case"building-scene":case"csv":case"feature":case"geo-rss":case"geojson":case"graphics":case"group":case"integrated-mesh":case"kml":case"map-notes":case"ogc-feature":case"point-cloud":case"route":case"scene":case"stream":case"voxel":case"subtype-group":case"unknown":case"unsupported":case"wfs":case null:return!1;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"elevation":case"imagery":case"imagery-tile":case"map-image":case"open-street-map":case"tile":case"vector-tile":case"wcs":case"web-tile":case"wms":case"wmts":return!0;default:return Object(S["a"])(e.type),!1}}!function(e){e[e.POSITIVE_X=0]="POSITIVE_X",e[e.POSITIVE_Y=1]="POSITIVE_Y",e[e.NEGATIVE_X=2]="NEGATIVE_X",e[e.NEGATIVE_Y=3]="NEGATIVE_Y"}(ke||(ke={}));W["b"].Custom1;var $e,Ze;!function(e){e[e.HEADING=1]="HEADING",e[e.TILT=2]="TILT"}($e||($e={})),function(e){e[e.HORIZONTAL_OR_VERTICAL=0]="HORIZONTAL_OR_VERTICAL",e[e.HORIZONTAL=1]="HORIZONTAL",e[e.VERTICAL=2]="VERTICAL",e[e.TILTED=3]="TILTED"}(Ze||(Ze={}));W["b"].Custom2,Object(L["c"])();const Ke=Math.PI/2;W["b"].Custom1,W["b"].Custom2;var Ye;function Xe(e){const t="building-scene-3d"===e.type?e:null;return Object(s["k"])(t)}!function(e){e[e.CENTER_ON_CALLOUT=0]="CENTER_ON_CALLOUT",e[e.CENTER_ON_ARROW=1]="CENTER_ON_ARROW"}(Ye||(Ye={}));const Je=v["a"].getLogger("esri.views.3d.analysis.Slice.SliceController");let et=class extends a["a"]{constructor(e){super(e),this._handles=new g["a"],this._internalChange=!1,this._currentSlicePlane=null,this.state="ready"}get ready(){return"ready"===this.state}initialize(){this._handles.add(this.analysis.excludedLayers.on("before-add",e=>{const t=e.item;null!=t&&(t instanceof C["a"]||t instanceof E["a"])?t instanceof C["a"]&&Qe(t)?(Je.error("excludedLayers",`Layer '${t.title}, id:${t.id}' of type '${t.type}' can not be individually excluded from slicing. Use 'excludeGroundSurface' instead.`),e.preventDefault()):this.analysis.excludedLayers.includes(t)&&e.preventDefault():(Je.error("excludedLayers","Invalid layer type, layer must derive from Layer or BuildingComponentSublayer"),e.preventDefault())})),at(this.view,this),this._handles.add([Object(m["e"])(()=>this.analysisViewData.plane,()=>{this._internalChange||this._updateSlicePlaneFromBoundedPlane(),this._updateLayerViews()},{sync:!0}),Object(m["e"])(()=>this.analysis.excludeGroundSurface,()=>this._updateLayerViews(),{sync:!0}),this.analysis.excludedLayers.on("change",()=>this._updateLayerViews()),Object(m["e"])(()=>[this.analysisViewData.active,this.analysisViewData.visible],()=>{this._updateActiveController(),this._updateViewSlicePlane()},{sync:!0}),Object(m["e"])(()=>this._allLayerAndSubLayerViews,()=>this._updateLayerViews())]),this._handles.add([Object(m["e"])(()=>this.analysis.shape,()=>{this._internalChange||(this._updateBoundedPlaneFromSlicePlane(),this._updateViewSlicePlane())},{sync:!0})],"analysis"),this._set("state","ready"),this._updateActiveController(),this._updateBoundedPlaneFromSlicePlane(),this._updateViewSlicePlane()}destroy(){"destroyed"!==this.state&&(this.analysisViewData.active&&(this.analysisViewData.active=!1,this.view.slicePlane=null),ot(this.view,this),this._handles.destroy(),this.set("view",null),this._set("state","destroyed"))}async whenReady(){return await Object(_["j"])(this,"ready"),this}get _allLayerAndSubLayerViews(){const e=this.view.allLayerViews.items;return e.concat(e.filter(Xe).flatMap(({sublayerViews:e})=>e.items))}_updateBoundedPlaneFromSlicePlane(){const e=this.analysis.shape,t=this._currentSlicePlane;if(Object(s["j"])(t)&&Object(s["j"])(e)||Object(s["k"])(t)&&Object(s["k"])(e)&&e.equals(t))return;let i=null,r=null;if(Object(s["k"])(e)&&Object(s["k"])(e.position)){const t=e.position.spatialReference,a=He(e,this.view);Object(s["j"])(a)&&Object(P["b"])(this.analysis,t,Je),i=Be(a,this.view,{tiltEnabled:this.analysis.tiltEnabled},Object(w["d"])()),Object(s["k"])(i)&&(r={heading:e.heading,tilt:e.tilt,position:e.position,width:e.width,height:e.height})}this._currentSlicePlane=r,this._internalChange=!0,this.analysisViewData.plane=i,this._internalChange=!1}_updateSlicePlaneFromBoundedPlane(){const e=this.analysisViewData.plane,t=Ge(e,this.view,this.view.spatialReference,new f);let i=null;Object(s["k"])(t)&&(i={heading:t.heading,tilt:t.tilt,position:t.position,width:t.width,height:t.height}),this._currentSlicePlane=i,this._internalChange=!0,this.analysis.shape=t,this._internalChange=!1,this._updateViewSlicePlane()}_updateActiveController(){if(it)return;const e=st(this.view);if(this.analysisViewData.active)Object(s["k"])(e.activeController)&&e.activeController!==this?(it=!0,e.activeController.analysisViewData.active=!1,it=!1):Object(s["k"])(e.activeController)&&e.activeController,this._updateLayerViews(),e.activeController=this;else{if(Object(s["k"])(e.activeController)&&e.activeController!==this)return;Object(s["k"])(e.activeController)&&e.activeController===this&&(e.activeController=null,this._updateLayerViews())}}_updateViewSlicePlane(){"ready"===this.state&&rt(this.view)}_updateLayerViews(){const e=Object(s["k"])(this.analysisViewData.plane)&&this.analysisViewData.visible&&this.analysisViewData.active,t=[],i=e=>{"layers"in e?e.layers.forEach(i):t.push(e)};this.analysis.excludedLayers.forEach(i),this.view.allLayerViews.forEach(i=>{i.destroyed||("slicePlaneEnabled"in i&&(i.slicePlaneEnabled=e&&t.indexOf(i.layer)<0),"sublayerViews"in i&&i.sublayerViews.forEach(i=>{i.slicePlaneEnabled=e&&t.indexOf(i.sublayer)<0}))}),null!=this.view.basemapTerrain&&(this.view.basemapTerrain.slicePlaneEnabled=e&&!this.analysis.excludeGroundSurface)}};Object(r["a"])([Object(o["b"])({readOnly:!0})],et.prototype,"state",void 0),Object(r["a"])([Object(o["b"])()],et.prototype,"view",void 0),Object(r["a"])([Object(o["b"])()],et.prototype,"analysis",void 0),Object(r["a"])([Object(o["b"])()],et.prototype,"analysisViewData",void 0),Object(r["a"])([Object(o["b"])()],et.prototype,"ready",null),Object(r["a"])([Object(o["b"])()],et.prototype,"_allLayerAndSubLayerViews",null),et=Object(r["a"])([Object(l["a"])("esri.views.3d.analysis.Slice.SliceController")],et);const tt=new Map;let it=!1;function rt(e){const t=st(e).activeController;Object(s["k"])(t)&&Object(s["k"])(t.analysisViewData.plane)&&t.analysisViewData.visible?e.slicePlane=t.analysisViewData.plane:e.slicePlane=null}function at(e,t){tt.has(e)||tt.set(e,{all:[],activeController:null}),tt.get(e).all.push(t)}function st(e){return tt.get(e)}function ot(e,t){if(!tt.has(e))throw new Error("view expected in global slice register");const i=tt.get(e),r=i.all.lastIndexOf(t);if(-1===r)throw new Error("controller expected in global slice register");i.all.splice(r,1),0===i.all.length&&tt.delete(e)}var nt=i("3544");let ct=class extends a["a"]{constructor(e){super(e),this._handles=new g["a"],this._gridVisualElement=null,this._outlineVisualElement=null,this.state="pending",this.showGrid=!1,this.editable=!0}get ready(){return"ready"===this.state}initialize(){this._initialize()}async _initialize(){if("destroyed"===this.state||"ready"===this.state)return;await Object(_["j"])(this.view,"ready",!0);const e=this.analysisViewData;if(Object(s["j"])(e))throw new Error("expected internal object to be valid");this._gridVisualElement=Ue(this.view),this._outlineVisualElement=Me(this.view),this._handles.add([Object(m["e"])(()=>({visible:Object(s["k"])(e.plane)&&this.analysisViewData.visible,active:this.analysisViewData.active,editable:this.editable,showGrid:this.showGrid}),e=>this._updateMaterials(e),m["d"]),Object(m["e"])(()=>e.plane,e=>this._updatePlane(e),m["d"])],"internal"),this._set("state","ready")}destroy(){"destroyed"!==this.state&&"pending"!==this.state&&(this._handles.destroy(),this._gridVisualElement=Object(s["d"])(this._gridVisualElement),this._outlineVisualElement=Object(s["d"])(this._outlineVisualElement),this.set("view",null),this._set("state","destroyed"))}async whenReady(){return await Object(_["j"])(this,"ready"),this}_updatePlane(e){if(Object(s["j"])(e))return;const t=Object(F["y"])(M["d"].get(),Object(F["r"])(e.basis1),Object(F["r"])(e.basis2),1),i=Object(I["v"])(M["a"].get(),t),r=Le(e,M["a"].get()),a=Object(I["n"])(i,r,i);this._outlineVisualElement.transform=a,this._gridVisualElement.transform=a}_updateMaterials({visible:e,active:t,editable:i,showGrid:r}){this._outlineVisualElement.color=ge,this._outlineVisualElement.width=i?fe:je,this._outlineVisualElement.stipplePattern=t?null:Object(nt["a"])(5);const a=r?me:[0,0,0,0];this._gridVisualElement.backgroundColor=ve,this._gridVisualElement.gridColor=a,this._gridVisualElement.visible=e,this._outlineVisualElement.visible=e}};Object(r["a"])([Object(o["b"])({readOnly:!0})],ct.prototype,"state",void 0),Object(r["a"])([Object(o["b"])()],ct.prototype,"view",void 0),Object(r["a"])([Object(o["b"])()],ct.prototype,"analysis",void 0),Object(r["a"])([Object(o["b"])()],ct.prototype,"analysisViewData",void 0),Object(r["a"])([Object(o["b"])()],ct.prototype,"ready",null),Object(r["a"])([Object(o["b"])()],ct.prototype,"showGrid",void 0),Object(r["a"])([Object(o["b"])()],ct.prototype,"editable",void 0),ct=Object(r["a"])([Object(l["a"])("esri.views.3d.analysis.Slice.SliceVisualization")],ct);let lt=class extends(Object(d["a"])(a["a"])){constructor(e){super(e),this.type="slice-view-3d",this.analysisVisualization=null,this.analysisController=null,this.plane=null,this.active=!0,this.showGrid=!1,this.editable=!1}initialize(){this.analysisVisualization=new ct({view:this.view,analysis:this.analysis,analysisViewData:this}),this.analysisController=new et({view:this.view,analysis:this.analysis,analysisViewData:this})}destroy(){this.analysisVisualization=Object(s["d"])(this.analysisVisualization),this.analysisController=Object(s["d"])(this.analysisController)}async when(){return await this.analysisVisualization.whenReady(),await this.analysisController.whenReady(),this}get testData(){return{visualization:this.analysisVisualization,controller:this.analysisController}}};Object(r["a"])([Object(o["b"])()],lt.prototype,"type",void 0),Object(r["a"])([Object(o["b"])()],lt.prototype,"analysis",void 0),Object(r["a"])([Object(o["b"])()],lt.prototype,"plane",void 0),Object(r["a"])([Object(o["b"])()],lt.prototype,"active",void 0),Object(r["a"])([Object(o["b"])({aliasOf:"analysisVisualization.showGrid"})],lt.prototype,"showGrid",void 0),Object(r["a"])([Object(o["b"])({aliasOf:"analysisVisualization.editable"})],lt.prototype,"editable",void 0),lt=Object(r["a"])([Object(l["a"])("esri.views.3d.analysis.SliceAnalysisView3D")],lt);const dt=lt},"5d34":function(e,t,i){"use strict";i.d(t,"a",(function(){return j})),i.d(t,"b",(function(){return u})),i.d(t,"c",(function(){return c})),i.d(t,"d",(function(){return b}));var r=i("a4ee"),a=i("6a0ed"),s=i("59b2"),o=(i("b50f"),i("c120"),i("cea0"),i("448d")),n=i("d386");let c=class extends a["a"]{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};Object(r["a"])([Object(s["b"])({type:Number})],c.prototype,"nodesPerPage",void 0),Object(r["a"])([Object(s["b"])({type:Number})],c.prototype,"rootIndex",void 0),Object(r["a"])([Object(s["b"])({type:String})],c.prototype,"lodSelectionMetricType",void 0),c=Object(r["a"])([Object(n["a"])("esri.layer.support.I3SNodePageDefinition")],c);let l=class extends a["a"]{constructor(){super(...arguments),this.factor=1}};Object(r["a"])([Object(s["b"])({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],l.prototype,"id",void 0),Object(r["a"])([Object(s["b"])({type:Number})],l.prototype,"factor",void 0),l=Object(r["a"])([Object(n["a"])("esri.layer.support.I3SMaterialTexture")],l);let d=class extends a["a"]{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};Object(r["a"])([Object(s["b"])({type:[Number]})],d.prototype,"baseColorFactor",void 0),Object(r["a"])([Object(s["b"])({type:l})],d.prototype,"baseColorTexture",void 0),Object(r["a"])([Object(s["b"])({type:l})],d.prototype,"metallicRoughnessTexture",void 0),Object(r["a"])([Object(s["b"])({type:Number})],d.prototype,"metallicFactor",void 0),Object(r["a"])([Object(s["b"])({type:Number})],d.prototype,"roughnessFactor",void 0),d=Object(r["a"])([Object(n["a"])("esri.layer.support.I3SMaterialPBRMetallicRoughness")],d);let u=class extends a["a"]{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};Object(r["a"])([Object(o["a"])({opaque:"opaque",mask:"mask",blend:"blend"})],u.prototype,"alphaMode",void 0),Object(r["a"])([Object(s["b"])({type:Number})],u.prototype,"alphaCutoff",void 0),Object(r["a"])([Object(s["b"])({type:Boolean})],u.prototype,"doubleSided",void 0),Object(r["a"])([Object(o["a"])({none:"none",back:"back",front:"front"})],u.prototype,"cullFace",void 0),Object(r["a"])([Object(s["b"])({type:l})],u.prototype,"normalTexture",void 0),Object(r["a"])([Object(s["b"])({type:l})],u.prototype,"occlusionTexture",void 0),Object(r["a"])([Object(s["b"])({type:l})],u.prototype,"emissiveTexture",void 0),Object(r["a"])([Object(s["b"])({type:[Number]})],u.prototype,"emissiveFactor",void 0),Object(r["a"])([Object(s["b"])({type:d})],u.prototype,"pbrMetallicRoughness",void 0),u=Object(r["a"])([Object(n["a"])("esri.layer.support.I3SMaterialDefinition")],u);let p=class extends a["a"]{};Object(r["a"])([Object(s["b"])({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:""+t.index}}})],p.prototype,"name",void 0),Object(r["a"])([Object(o["a"])({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],p.prototype,"format",void 0),p=Object(r["a"])([Object(n["a"])("esri.layer.support.I3STextureFormat")],p);let b=class extends a["a"]{constructor(){super(...arguments),this.atlas=!1}};Object(r["a"])([Object(s["b"])({type:[p]})],b.prototype,"formats",void 0),Object(r["a"])([Object(s["b"])({type:Boolean})],b.prototype,"atlas",void 0),b=Object(r["a"])([Object(n["a"])("esri.layer.support.I3STextureSetDefinition")],b);let h=class extends a["a"]{};Object(r["a"])([Object(o["a"])({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],h.prototype,"type",void 0),Object(r["a"])([Object(s["b"])({type:Number})],h.prototype,"component",void 0),h=Object(r["a"])([Object(n["a"])("esri.layer.support.I3SGeometryAttribute")],h);let y=class extends a["a"]{};Object(r["a"])([Object(o["a"])({draco:"draco"})],y.prototype,"encoding",void 0),Object(r["a"])([Object(s["b"])({type:[String]})],y.prototype,"attributes",void 0),y=Object(r["a"])([Object(n["a"])("esri.layer.support.I3SGeometryCompressedAttributes")],y);let O=class extends a["a"]{constructor(){super(...arguments),this.offset=0}};Object(r["a"])([Object(s["b"])({type:Number})],O.prototype,"offset",void 0),Object(r["a"])([Object(s["b"])({type:h})],O.prototype,"position",void 0),Object(r["a"])([Object(s["b"])({type:h})],O.prototype,"normal",void 0),Object(r["a"])([Object(s["b"])({type:h})],O.prototype,"uv0",void 0),Object(r["a"])([Object(s["b"])({type:h})],O.prototype,"color",void 0),Object(r["a"])([Object(s["b"])({type:h})],O.prototype,"uvRegion",void 0),Object(r["a"])([Object(s["b"])({type:h})],O.prototype,"featureId",void 0),Object(r["a"])([Object(s["b"])({type:h})],O.prototype,"faceRange",void 0),Object(r["a"])([Object(s["b"])({type:y})],O.prototype,"compressedAttributes",void 0),O=Object(r["a"])([Object(n["a"])("esri.layer.support.I3SGeometryBuffer")],O);let j=class extends a["a"]{};Object(r["a"])([Object(o["a"])({triangle:"triangle"})],j.prototype,"topology",void 0),Object(r["a"])([Object(s["b"])()],j.prototype,"geometryBuffers",void 0),j=Object(r["a"])([Object(n["a"])("esri.layer.support.I3SGeometryDefinition")],j)},"5fae":function(e,t,i){"use strict";i.d(t,"a",(function(){return d}));var r=i("b2b2"),a=i("d791"),s=i("afe1"),o=i("f53a"),n=i("b7c2"),c=i("5a22"),l=i("748fd");class d extends o["a"]{constructor(e){super(e.view),this._resources=null,this._transform=Object(s["d"])()}get object(){return Object(r["k"])(this._resources)?this._resources.object:null}get transform(){return this._transform}set transform(e){Object(a["d"])(this._transform,e),Object(r["k"])(this._resources)&&(this._resources.object.transformation=this._transform)}recreate(){this.attached&&this.createResources()}recreateGeometry(){if(Object(r["j"])(this._resources))return;const e=this._resources.object,t=this.view._stage;t.removeMany(e.geometries),e.removeAllGeometries(),this.createGeometries(e),this.visible||e.setVisible(this.visible),t.addMany(e.geometries)}createResources(){this.destroyResources();const e=this.view._stage;if(!e)return;const t=new l["a"]({isPickable:!1,updatePolicy:n["m"].SYNC});e.add(t);const i=new c["a"]({castShadow:!1});i.transformation=this._transform,this.createExternalResources(),this.createGeometries(i),e.addMany(i.geometries),this.forEachExternalMaterial(t=>e.add(t)),e.add(i),t.add(i),this.visible||i.setVisible(!1),this._resources={layer:t,object:i}}destroyResources(){const e=this.view._stage;!Object(r["j"])(this._resources)&&e&&(e.remove(this._resources.object),e.remove(this._resources.layer),this.forEachExternalMaterial(t=>{e.remove(t),t.dispose()}),e.removeMany(this._resources.object.geometries),this._resources.object.dispose(),this.destroyExternalResources(),this._resources=null)}updateVisibility(e){Object(r["j"])(this._resources)||this._resources.object.setVisible(e)}}},"692f":function(e,t,i){"use strict";i.d(t,"a",(function(){return y})),i.d(t,"b",(function(){return h}));var r=i("2252"),a=i("a05b"),s=i("d272"),o=i("4db9"),n=i("d047"),c=i("c6d7"),l=i("ebd5"),d=i("4377"),u=i("3886"),p=i("690a"),b=i("b7bd");function h(e){const t=new p["a"];return t.include(o["a"],{linearDepth:!1}),t.include(r["a"],{}),t.include(s["a"],e),t.fragment.include(d["a"]),t.vertex.uniforms.add("proj","mat4").add("view","mat4"),t.fragment.uniforms.add("uColor","vec4"),t.attributes.add(b["a"].POSITION,"vec3"),t.varyings.add("vWorldPosition","vec3"),e.multipassTerrainEnabled&&t.varyings.add("depth","float"),e.screenSizeEnabled&&t.attributes.add(b["a"].OFFSET,"vec3"),e.shadingEnabled&&(t.vertex.uniforms.add("viewNormal","mat4"),t.fragment.uniforms.add("shadedColor","vec4").add("shadingDirection","vec3"),t.attributes.add(b["a"].NORMAL,"vec3"),t.varyings.add("vViewNormal","vec3")),t.vertex.code.add(u["a"]` void main(void) { vWorldPosition = ${e.screenSizeEnabled?"screenSizeScaling(offset, position)":"position"}; `),e.shadingEnabled&&t.vertex.code.add(u["a"]`vec3 worldNormal = normal; vViewNormal = (viewNormal * vec4(worldNormal, 1)).xyz;`),t.vertex.code.add(u["a"]` ${e.multipassTerrainEnabled?"depth = (view * vec4(vWorldPosition, 1.0)).z;":""} gl_Position = transformPosition(proj, view, vWorldPosition); } `),e.multipassTerrainEnabled&&(t.fragment.include(n["a"]),t.include(c["b"],e)),t.fragment.code.add(u["a"]` void main() { discardBySlice(vWorldPosition); ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""} `),e.shadingEnabled?t.fragment.code.add(u["a"]`vec3 viewNormalNorm = normalize(vViewNormal); float shadingFactor = 1.0 - clamp(-dot(viewNormalNorm, shadingDirection), 0.0, 1.0); vec4 finalColor = mix(uColor, shadedColor, shadingFactor);`):t.fragment.code.add(u["a"]`vec4 finalColor = uColor;`),t.fragment.code.add(u["a"]` if (finalColor.a < ${u["a"].float(l["c"])}) { discard; } ${e.output===a["a"].Alpha?u["a"]`gl_FragColor = vec4(finalColor.a);`:""} ${e.output===a["a"].Color?u["a"]`gl_FragColor = highlightSlice(finalColor, vWorldPosition); ${e.oitEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":""}`:""} } `),t}const y=Object.freeze({__proto__:null,build:h})},"6e36":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var r=i("2eab"),a=i("ce50"),s=i("b2b2");async function o(e,t,i,o,n,c){let l=null;if(Object(s["k"])(i)){const t=e+"/nodepages/",a=t+Math.floor(i.rootIndex/i.nodesPerPage);try{return{type:"page",rootPage:(await Object(r["default"])(a,{query:{f:"json",token:o},responseType:"json",signal:c})).data,rootIndex:i.rootIndex,pageSize:i.nodesPerPage,lodMetric:i.lodSelectionMetricType,urlPrefix:t}}catch(p){Object(s["k"])(n)&&n.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",a,p),l=p}}if(!t)return null;const d=e+"/nodes/",u=d+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await Object(r["default"])(u,{query:{f:"json",token:o},responseType:"json",signal:c})).data,urlPrefix:d}}catch(p){throw new a["a"]("sceneservice:root-node-missing","Root node missing.",{pageError:l,nodeError:p,url:u})}}},"7eab":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));const r={attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1},query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},"94e6":function(e,t,i){"use strict";i.d(t,"a",(function(){return h}));var r=i("b2b2"),a=i("d791"),s=i("afe1"),o=i("e431"),n=i("0b2d"),c=i("7577"),l=i("5ef2"),d=i("5fae"),u=i("d408"),p=i("35b3"),b=i("86ba");class h extends d["a"]{constructor(e){super(e),this._renderOccluded=p["c"].OccludeAndTransparent,this._width=1,this._color=Object(l["c"])(1,0,1,1),this._innerWidth=1,this._innerColor=null,this._stipplePattern=null,this._stippleOffColor=null,this._stipplePreferContinuous=!0,this._writeDepthEnabled=!0,this._falloff=0,this._polygonOffset=!1,this.applyProps(e)}setGeometryFromRenderSpacePoint(e){const t=1e3,i=[];i.push([[e[0]-t,e[1]+0,e[2]+0],[e[0]+t,e[1]+0,e[2]+0]]),i.push([[e[0]-0,e[1]-t,e[2]+0],[e[0]+0,e[1]+t,e[2]+0]]),i.push([[e[0]-0,e[1]+0,e[2]-t],[e[0]+0,e[1]+0,e[2]+t]]),this.geometry=i}setGeometryFromExtent(e){const t=this.view.spatialReference,i=Object(n["f"])(),r=Object(n["f"])(),a=100,s=[];Object(o["y"])(i,e[0],e[1],a),this.view.renderCoordsHelper.toRenderCoords(i,t,r),s.push([r[0],r[1],r[2]]),Object(o["y"])(i,e[2],e[1],a),this.view.renderCoordsHelper.toRenderCoords(i,t,r),s.push([r[0],r[1],r[2]]),Object(o["y"])(i,e[2],e[3],a),this.view.renderCoordsHelper.toRenderCoords(i,t,r),s.push([r[0],r[1],r[2]]),Object(o["y"])(i,e[0],e[3],a),this.view.renderCoordsHelper.toRenderCoords(i,t,r),s.push([r[0],r[1],r[2]]),Object(o["y"])(i,e[0],e[1],a),this.view.renderCoordsHelper.toRenderCoords(i,t,r),s.push([r[0],r[1],r[2]]),Object(o["y"])(i,e[0],e[1],a),this.view.renderCoordsHelper.toRenderCoords(i,t,r),s.push([r[0],r[1],r[2]]),this.geometry=[s]}setGeometryFromFrustum(e){const t=[];e.lines.forEach(e=>{t.push([e.origin[0],e.origin[1],e.origin[2]]),t.push([e.endpoint[0],e.endpoint[1],e.endpoint[2]])}),this.geometry=[t]}setGeometryFromBoundedPlane(e){const t=[],i=e.origin,r=e.basis1,a=e.basis2,s=.5,o=Object(n["f"])(),c=Object(n["f"])(),l=Object(n["f"])(),d=Object(n["f"])();o[0]=i[0]-r[0]*s-a[0]*s,o[1]=i[1]-r[1]*s-a[1]*s,o[2]=i[2]-r[2]*s-a[2]*s,c[0]=i[0]-r[0]*s+a[0]*s,c[1]=i[1]-r[1]*s+a[1]*s,c[2]=i[2]-r[2]*s+a[2]*s,l[0]=i[0]+r[0]*s+a[0]*s,l[1]=i[1]+r[1]*s+a[1]*s,l[2]=i[2]+r[2]*s+a[2]*s,d[0]=i[0]+r[0]*s-a[0]*s,d[1]=i[1]+r[1]*s-a[1]*s,d[2]=i[2]+r[2]*s-a[2]*s,t.push([o[0],o[1],o[2]]),t.push([c[0],c[1],c[2]]),t.push([l[0],l[1],l[2]]),t.push([d[0],d[1],d[2]]),t.push([o[0],o[1],o[2]]),this.geometry=[t]}setGeometryFromSegment(e){const t=e.endRenderSpace;this.transform=Object(a["g"])(y,t);const{points:i}=e.createRenderGeometry(t,this.view.renderCoordsHelper);this.geometry=[i]}setGeometryFromSegments(e,t=n["c"]){this.transform=Object(a["g"])(y,t),this.geometry=e.map(e=>e.createRenderGeometry(t,this.view.renderCoordsHelper).points)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get geometry(){return this._geometry}set geometry(e){this._geometry=e,this.recreateGeometry()}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get color(){return this._color}set color(e){Object(c["g"])(e,this._color)||(Object(c["c"])(this._color,e),this._updateMaterial())}get innerWidth(){return this._innerWidth}set innerWidth(e){e!==this._innerWidth&&(this._innerWidth=e,this._updateMaterial())}get innerColor(){return this._innerColor}set innerColor(e){Object(r["k"])(e)?!Object(r["j"])(this._innerColor)&&Object(c["g"])(e,this._innerColor)||(this._innerColor=Object(c["c"])(Object(l["b"])(),e),this._updateMaterial()):Object(r["k"])(this._innerColor)&&(this._innerColor=null,this._updateMaterial())}get stipplePattern(){return this._stipplePattern}set stipplePattern(e){const t=Object(r["k"])(e)!==Object(r["k"])(this._stipplePattern);this._stipplePattern=e,t?this.recreate():this._updateMaterial()}get stippleOffColor(){return this._stippleOffColor}set stippleOffColor(e){(Object(r["j"])(e)||Object(r["j"])(this._stippleOffColor)||!Object(c["g"])(e,this._stippleOffColor))&&(this._stippleOffColor=Object(r["k"])(e)?Object(l["a"])(e):null,this._updateMaterial())}get stipplePreferContinuous(){return this._stipplePreferContinuous}set stipplePreferContinuous(e){this._stipplePreferContinuous!==e&&(this._stipplePreferContinuous=e,this._updateMaterial())}get writeDepthEnabled(){return this._writeDepthEnabled}set writeDepthEnabled(e){this._writeDepthEnabled!==e&&(this._writeDepthEnabled=e,this._updateMaterial())}get falloff(){return this._falloff}set falloff(e){e!==this._falloff&&(this._falloff=e,this._updateMaterial())}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){e!==this._polygonOffset&&(this._polygonOffset=e,this._updateMaterial())}createExternalResources(){this._material=new b["a"](this.materialParameters)}destroyExternalResources(){this._material=null}createGeometries(e){const t=this._createLineGeometries();if(0!==t.length)for(let i=0;i{const i=e.length,r=new Float64Array(3*i);e.forEach((e,t)=>{r[3*t+0]=e[0],r[3*t+1]=e[1],r[3*t+2]=e[2]});const a={overlayInfo:null,attributeData:{position:r},removeDuplicateStartEnd:u["a"].KEEP};t.push(a)}),t}}const y=Object(s["d"])()},ad96:function(e,t,i){"use strict";i.d(t,"a",(function(){return x}));var r=i("a05b"),a=i("b7c2"),s=i("b061"),o=i("68af"),n=i("35b3"),c=i("7438"),l=i("badc"),d=i("8675"),u=i("7c51"),p=i("a4ee"),b=i("d272"),h=i("c6d7"),y=i("8e97"),O=i("c3a4"),j=i("ca98"),f=i("da35"),g=i("fa1e"),v=i("c829"),m=i("87b7"),_=i("f3d9"),w=i("d17d"),C=i("189c");class E extends j["a"]{initializeProgram(e){const t=E.shader.get(),i=this.configuration,r=t.build({output:i.output,slicePlaneEnabled:i.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,oitEnabled:i.transparencyPassType===a["l"].Color,multipassTerrainEnabled:i.multipassTerrainEnabled,cullAboveGround:i.cullAboveGround});return new v["a"](e.rctx,r,g["a"])}bindPass(e,t){Object(y["b"])(this.program,t.camera.projectionMatrix),this.program.setUniform1f("opacity",e.opacity),t.multipassTerrainEnabled&&(this.program.setUniform2fv("nearFar",t.camera.nearFar),this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(h["a"])(this.program,t))}bindDraw(e){Object(y["c"])(this.program,e),Object(b["c"])(this.program,this.configuration,e),this.program.rebindTextures()}_setPipelineState(e,t){const i=this.configuration,s=e===a["l"].NONE,o=e===a["l"].FrontFace;return Object(C["g"])({blending:i.output!==r["a"].Color&&i.output!==r["a"].Alpha||!i.transparent?null:s?P:Object(c["f"])(e),culling:Object(C["c"])(i.cullFace),depthTest:{func:Object(c["g"])(e)},depthWrite:s?i.writeDepth&&C["e"]:Object(c["h"])(e),colorWrite:C["d"],stencilWrite:i.sceneHasOcludees?m["j"]:null,stencilTest:i.sceneHasOcludees?t?m["f"]:m["e"]:null,polygonOffset:s||o?null:Object(c["e"])(i.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipelineState(this.configuration.transparencyPassType,!0),this._setPipelineState(this.configuration.transparencyPassType,!1)}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}E.shader=new O["a"](_["a"],()=>i.e("chunk-2d215c84").then(i.bind(null,"c056")));const P=Object(C["i"])(w["b"].ONE,w["b"].ONE_MINUS_SRC_ALPHA);class S extends f["a"]{constructor(){super(...arguments),this.output=r["a"].Color,this.cullFace=a["c"].None,this.slicePlaneEnabled=!1,this.transparent=!1,this.enableOffset=!0,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparencyPassType=a["l"].NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}Object(p["a"])([Object(f["b"])({count:r["a"].COUNT})],S.prototype,"output",void 0),Object(p["a"])([Object(f["b"])({count:a["c"].COUNT})],S.prototype,"cullFace",void 0),Object(p["a"])([Object(f["b"])()],S.prototype,"slicePlaneEnabled",void 0),Object(p["a"])([Object(f["b"])()],S.prototype,"transparent",void 0),Object(p["a"])([Object(f["b"])()],S.prototype,"enableOffset",void 0),Object(p["a"])([Object(f["b"])()],S.prototype,"writeDepth",void 0),Object(p["a"])([Object(f["b"])()],S.prototype,"sceneHasOcludees",void 0),Object(p["a"])([Object(f["b"])({count:a["l"].COUNT})],S.prototype,"transparencyPassType",void 0),Object(p["a"])([Object(f["b"])()],S.prototype,"multipassTerrainEnabled",void 0),Object(p["a"])([Object(f["b"])()],S.prototype,"cullAboveGround",void 0);class x extends n["b"]{constructor(e){super(e,I),this.supportsEdges=!0,this.techniqueConfig=new S}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.parameters.cullFace,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.enableOffset=t.camera.relativeElevation{const a=g(e,i,r);for(const e of t){const t=Object(l["c"])(i,e,r);for(const e in a)t[e]=a[e]}}}function g(e,t,i){if(Object(r["k"])(e)&&"resource"===e.type)return v(e,t,i);switch(Object(r["k"])(e)&&e.type?e.type:"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=j["d"];return{read:e,write:t}}}}function v(e,t,i){const o=Object(n["b"])(t,i);return{type:String,read:(e,t,i)=>{const r=Object(j["e"])(e,t,i);return o.type===String?r:"function"==typeof o.type?new o.type({url:r}):void 0},write:{writer(t,n,l,d){if(!d||!d.resources)return"string"==typeof t?void(n[l]=Object(j["f"])(t,d)):void(n[l]=t.write({},d));const u=S(t),p=u?Object(j["f"])(u,{...d,verifyItemRelativeUrls:d&&d.verifyItemRelativeUrls?{writtenUrls:d.verifyItemRelativeUrls.writtenUrls,rootPath:null}:null},j["a"].NO):null,b=o.type!==String&&(!Object(a["a"])(this)||d&&d.origin&&this.originIdOf(i)>Object(c["e"])(d.origin));d&&d.portalItem&&Object(r["k"])(p)&&!Object(s["u"])(p)?b?_(this,i,t,p,n,l,d,e):w(p,n,l,d):d&&d.portalItem&&(Object(r["j"])(p)||Object(r["k"])(Object(j["c"])(p))||Object(s["v"])(p)||b)?m(this,i,t,p,n,l,d,e):n[l]=p}}}}function m(e,t,i,a,n,c,l,u){const p=Object(o["a"])(),b=E(i,a,l),h=Object(s["B"])(Object(r["i"])(u,"prefix"),p),y=`${h}.${d(b)}`,O=l.portalItem.resourceFromPath(y);Object(s["v"])(a)&&l.resources.pendingOperations.push(P(a).then(e=>{O.path=`${h}.${d(e)}`,n[c]=O.itemRelativeUrl}).catch(()=>{})),C(e,t,O,b,l.resources.toAdd),n[c]=O.itemRelativeUrl}function _(e,t,i,r,a,o,n,c){const l=n.portalItem.resourceFromPath(r),u=E(i,r,n);d(u)===Object(s["p"])(l.path)?(C(e,t,l,u,n.resources.toUpdate),a[o]=r):m(e,t,i,r,a,o,n,c)}function w(e,t,i,r){r.resources.toKeep.push({resource:r.portalItem.resourceFromPath(e)}),t[i]=e}function C(e,t,i,r,a){a.push({resource:i,content:r,finish:i=>{x(e,t,i)}})}function E(e,t,i){return"string"==typeof e?{url:t}:new Blob([JSON.stringify(e.toJSON(i))],{type:"application/json"})}async function P(e){const t=(await Promise.resolve().then(i.bind(null,"2eab"))).default,{data:r}=await t(e,{responseType:"blob"});return r}function S(e){return Object(r["j"])(e)?null:"string"==typeof e?e:e.url}function x(e,t,i){"string"==typeof e[t]?e[t]=i.url:e[t].url=i.url}},e814:function(e,t,i){"use strict";i.d(t,"a",(function(){return A}));var r=i("a4ee"),a=i("4856"),s=(i("b423"),i("261a"),i("b48d"),i("478c"),i("667b"),i("ff57"),i("da00"),i("f976"),i("5cdb")),o=i("2eab"),n=i("ce50"),c=i("fa8a"),l=i("6d5f"),d=i("e92d"),u=i("b2b2"),p=i("fab3"),b=i("59b2"),h=(i("b50f"),i("c120"),i("cea0"),i("448d")),y=i("afcf"),O=i("d386"),j=i("3af1"),f=i("5996"),g=i("5bd5"),v=i("2e4d"),m=i("7eab"),_=i("22f4"),w=i("2feb"),C=i("80b7"),E=i("6e36"),P=i("5d34"),S=i("69dd"),x=i("f51b"),T=i("fd14");const I=d["a"].getLogger("esri.layers.buildingSublayers.BuildingComponentSublayer"),R=Object(w["a"])();let F=class extends(l["a"].LoadableMixin(Object(p["b"])(v["a"]))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.fields=null,this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl.path}/sublayers/${this.id}`,query:this.layer.parsedUrl.query}:null}get fieldsIndex(){return new C["a"](this.fields)}readAssociatedLayer(e,t){const i=this.layer.associatedFeatureServiceItem,r=t.associatedLayerID;return Object(u["k"])(i)&&"number"==typeof r?new g["default"]({portalItem:i,layerId:r}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return Object(u["k"])(this.associatedLayer)?this.associatedLayer.displayField:null}get apiKey(){return this.layer.apiKey}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=Object(u["k"])(e)?e.signal:null,i=this._fetchService(t).then(()=>{this.indexInfo=Object(E["a"])(this.parsedUrl.path,this.rootNode,this.nodePages,this.apiKey,I,t)});return this.addResolvingPromise(i),Promise.resolve(this)}createPopupTemplate(e){return Object(x["a"])(this,e)}async _fetchService(e){const t=(await Object(o["default"])(this.parsedUrl.path,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){var i,r,a,s;const o=null==(i=this.getFeatureType(null==t?void 0:t.feature))||null==(r=i.domains)?void 0:r[e];return o&&"inherited"!==o.type?o:null!=(a=null==(s=this.getField(e))?void 0:s.domain)?a:null}getFeatureType(e){return e&&Object(u["k"])(this.associatedLayer)?this.associatedLayer.getFeatureType(e):null}get types(){return Object(u["k"])(this.associatedLayer)?this.associatedLayer.types:[]}get typeIdField(){return Object(u["k"])(this.associatedLayer)?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=Object(u["k"])(this.associatedLayer)&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:m["a"],{query:t,data:{supportsZ:i,supportsM:r,isVersioned:a}}=e;return{query:t,data:{supportsZ:i,supportsM:r,isVersioned:a}}}createQuery(){const e=new S["a"];return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(i=>i.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(i=>i.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(i=>i.queryFeatures(e||this.createQuery(),t)).then(e=>{if(null!=e&&e.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e})}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(i=>i.queryObjectIds(e||this.createQuery(),t))}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:Object(u["k"])(this.associatedLayer)}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return Object(u["k"])(e)&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),Object(u["j"])(this.associatedLayer))throw new n["a"]("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n["a"]("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};Object(r["a"])([Object(b["b"])({readOnly:!0})],F.prototype,"parsedUrl",null),Object(r["a"])([Object(b["b"])({type:P["c"],readOnly:!0})],F.prototype,"nodePages",void 0),Object(r["a"])([Object(b["b"])({type:[P["b"]],readOnly:!0})],F.prototype,"materialDefinitions",void 0),Object(r["a"])([Object(b["b"])({type:[P["d"]],readOnly:!0})],F.prototype,"textureSetDefinitions",void 0),Object(r["a"])([Object(b["b"])({type:[P["a"]],readOnly:!0})],F.prototype,"geometryDefinitions",void 0),Object(r["a"])([Object(b["b"])({readOnly:!0})],F.prototype,"serviceUpdateTimeStamp",void 0),Object(r["a"])([Object(b["b"])({readOnly:!0})],F.prototype,"store",void 0),Object(r["a"])([Object(b["b"])({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],F.prototype,"rootNode",void 0),Object(r["a"])([Object(b["b"])({readOnly:!0})],F.prototype,"attributeStorageInfo",void 0),Object(r["a"])([Object(b["b"])(R.fields)],F.prototype,"fields",void 0),Object(r["a"])([Object(b["b"])({readOnly:!0})],F.prototype,"fieldsIndex",null),Object(r["a"])([Object(b["b"])({readOnly:!0,type:g["default"]})],F.prototype,"associatedLayer",void 0),Object(r["a"])([Object(y["a"])("service","associatedLayer",["associatedLayerID"])],F.prototype,"readAssociatedLayer",null),Object(r["a"])([Object(b["b"])(R.outFields)],F.prototype,"outFields",void 0),Object(r["a"])([Object(b["b"])({type:String,readOnly:!0})],F.prototype,"objectIdField",null),Object(r["a"])([Object(b["b"])({readOnly:!0,type:String,json:{read:!1}})],F.prototype,"displayField",null),Object(r["a"])([Object(b["b"])({readOnly:!0,type:String})],F.prototype,"apiKey",null),Object(r["a"])([Object(b["b"])({readOnly:!0,type:j["a"]})],F.prototype,"fullExtent",null),Object(r["a"])([Object(b["b"])({readOnly:!0,type:f["a"]})],F.prototype,"spatialReference",null),Object(r["a"])([Object(b["b"])({readOnly:!0})],F.prototype,"version",null),Object(r["a"])([Object(b["b"])({readOnly:!0,type:T["a"]})],F.prototype,"elevationInfo",null),Object(r["a"])([Object(b["b"])({readOnly:!0,type:Number})],F.prototype,"minScale",null),Object(r["a"])([Object(b["b"])({readOnly:!0,type:Number})],F.prototype,"maxScale",null),Object(r["a"])([Object(b["b"])({readOnly:!0,type:Number})],F.prototype,"effectiveScaleRange",null),Object(r["a"])([Object(b["b"])({type:["hide","show"],json:{write:!0}})],F.prototype,"listMode",void 0),Object(r["a"])([Object(b["b"])({types:s["b"],json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],F.prototype,"renderer",void 0),Object(r["a"])([Object(b["b"])({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],F.prototype,"definitionExpression",void 0),Object(r["a"])([Object(b["b"])(_["j"])],F.prototype,"popupEnabled",void 0),Object(r["a"])([Object(b["b"])({type:a["a"],json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],F.prototype,"popupTemplate",void 0),Object(r["a"])([Object(b["b"])({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],F.prototype,"normalReferenceFrame",void 0),Object(r["a"])([Object(b["b"])({readOnly:!0,json:{read:!1}})],F.prototype,"defaultPopupTemplate",null),Object(r["a"])([Object(b["b"])()],F.prototype,"types",null),Object(r["a"])([Object(b["b"])()],F.prototype,"typeIdField",null),Object(r["a"])([Object(b["b"])({json:{write:!1}}),Object(h["a"])(new c["a"]({"3DObject":"3d-object",Point:"point"}))],F.prototype,"layerType",void 0),Object(r["a"])([Object(b["b"])()],F.prototype,"geometryType",null),Object(r["a"])([Object(b["b"])()],F.prototype,"profile",null),Object(r["a"])([Object(b["b"])({readOnly:!0,json:{read:!1}})],F.prototype,"capabilities",null),F=Object(r["a"])([Object(O["a"])("esri.layers.buildingSublayers.BuildingComponentSublayer")],F);const A=F},f3d9:function(e,t,i){"use strict";i.d(t,"a",(function(){return h})),i.d(t,"b",(function(){return b}));var r=i("a05b"),a=i("d272"),s=i("4db9"),o=i("d047"),n=i("c6d7"),c=i("ebd5"),l=i("4377"),d=i("3886"),u=i("690a"),p=i("b7bd");function b(e){const t=new u["a"];return t.include(s["a"],{linearDepth:!1}),t.vertex.uniforms.add("proj","mat4").add("view","mat4"),t.attributes.add(p["a"].POSITION,"vec3"),t.attributes.add(p["a"].UV0,"vec2"),t.varyings.add("vpos","vec3"),e.multipassTerrainEnabled&&t.varyings.add("depth","float"),t.vertex.uniforms.add("textureCoordinateScaleFactor","vec2"),t.vertex.code.add(d["a"]` void main(void) { vpos = position; ${e.multipassTerrainEnabled?"depth = (view * vec4(vpos, 1.0)).z;":""} vTexCoord = uv0 * textureCoordinateScaleFactor; gl_Position = transformPosition(proj, view, vpos); } `),t.include(a["a"],e),e.multipassTerrainEnabled&&(t.fragment.include(o["a"]),t.include(n["b"],e)),t.fragment.uniforms.add("tex","sampler2D"),t.fragment.uniforms.add("opacity","float"),t.varyings.add("vTexCoord","vec2"),e.output===r["a"].Alpha?t.fragment.code.add(d["a"]` void main() { discardBySlice(vpos); ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""} float alpha = texture2D(tex, vTexCoord).a * opacity; if (alpha < ${d["a"].float(c["b"])}) { discard; } gl_FragColor = vec4(alpha); } `):(t.fragment.include(l["a"]),t.fragment.code.add(d["a"]` void main() { discardBySlice(vpos); ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""} gl_FragColor = texture2D(tex, vTexCoord) * opacity; if (gl_FragColor.a < ${d["a"].float(c["b"])}) { discard; } gl_FragColor = highlightSlice(gl_FragColor, vpos); ${e.oitEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":""} } `)),t}const h=Object.freeze({__proto__:null,build:b})},f53a:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));class r{constructor(e){this._attached=!1,this._resourcesCreated=!1,this._visible=!0,this.view=e,this.view.watch("ready",e=>{this._resourcesCreated&&(e?this._createResources():this._destroyResources())})}applyProps(e){let t=!1;for(const i in e)i in this?"attached"===i?t=e[i]:this[i]=e[i]:console.error("Cannot set unknown property",i);this.attached=t}destroy(){this.attached=!1}get attached(){return this._attached}set attached(e){e!==this._attached&&this.view._stage&&(this._attached=e,this._attached&&!this._resourcesCreated?this._createResources():!this._attached&&this._resourcesCreated&&this._destroyResources())}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this.attached&&this.updateVisibility(e))}_createResources(){this.createResources(),this._resourcesCreated=!0,this.visible||this.updateVisibility(!1)}_destroyResources(){this.destroyResources(),this._resourcesCreated=!1}}}}]); //# sourceMappingURL=chunk-08e8eb9a.8bd6918d.js.map