(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-382fcf84"],{"0e25":function(e,t,i){"use strict";i.d(t,"a",(function(){return c}));var s,r=i("c649"),a=i("b7c2");!function(e){e[e.Object=0]="Object",e[e.RenderGeometry=1]="RenderGeometry",e[e.External=2]="External",e[e.COUNT=3]="COUNT"}(s||(s={}));class n{constructor(){this.items=[]}addObject(e,t){this.items.push({type:s.Object,objectStateId:t,object:e})}addRenderGeometry(e,t,i){this.items.push({type:s.RenderGeometry,objectStateId:t,renderGeometry:e,owner:i})}addExternal(e,t){this.items.push({type:s.External,objectStateId:t,remove:e})}remove(e){for(let t=this.items.length-1;t>=0;--t){const i=this.items[t];i.objectStateId===e&&(this._removeObjectStateItem(i),this.items.splice(t,1))}}removeObject(e){for(let t=this.items.length-1;t>=0;--t){const i=this.items[t];i.type===s.Object&&i.object===e&&(this._removeObjectStateItem(i),this.items.splice(t,1))}}removeRenderGeometry(e){for(let t=this.items.length-1;t>=0;--t){const i=this.items[t];i.type===s.RenderGeometry&&i.renderGeometry===e&&(this._removeObjectStateItem(i),this.items.splice(t,1))}}removeAll(){this.items.forEach(e=>{this._removeObjectStateItem(e)}),this.items=[]}_removeObjectStateItem(e){switch(e.type){case s.Object:e.objectStateId.channel===a["f"].Highlight?e.object.removeHighlight(e.objectStateId):e.objectStateId.channel===a["f"].MaskOccludee&&e.object.removeOcclude(e.objectStateId);break;case s.RenderGeometry:e.owner.removeRenderGeometryObjectState(e.renderGeometry,e.objectStateId);break;case s.External:e.remove(e.objectStateId)}}}class o{constructor(e,t){this.stateType=e,this.objectIdField=t,this.objectStateSet=new n,this.ids=new Set,this.paused=!1}hasGraphic(e){if(this.objectIdField){const t=e.graphic.attributes[this.objectIdField];return this.ids.has(t)}return this.ids.has(e.graphic.uid)}}class c{constructor(e){this._graphicsCore=e,this._stateSets=new Array}destroy(){this._stateSets&&this._stateSets.forEach(e=>e.objectStateSet.removeAll()),this._stateSets=null}acquireSet(e,t){const i=new o(e,t);this._stateSets.push(i);const s=Object(r["b"])(()=>this.releaseSet(i));return{set:i,handle:s}}releaseSet(e){e.objectStateSet.removeAll();const t=this._stateSets?this._stateSets.indexOf(e):-1;-1!==t&&this._stateSets.splice(t,1)}_addObjectStateSet(e,t){e.addObjectStateSet(t.stateType,t.objectStateSet)}_removeObjectStateSet(e,t){e.removeObjectState(t.objectStateSet)}setUid(e,t){e.ids.add(t);const i=this._graphicsCore.graphics3DGraphics.get(t);i&&this._addObjectStateSet(i,e)}setUids(e,t){t.forEach(t=>this.setUid(e,t))}setObjectIds(e,t){t.forEach(t=>e.ids.add(t)),this._initializeSet(e)}addGraphic(e){this._stateSets.forEach(t=>{!t.paused&&t.hasGraphic(e)&&this._addObjectStateSet(e,t)})}removeGraphic(e){this._stateSets.forEach(t=>{t.hasGraphic(e)&&this._removeObjectStateSet(e,t)})}allGraphicsDeleted(){this._stateSets&&this._stateSets.forEach(e=>e.objectStateSet.removeAll())}_initializeSet(e){const t=this._graphicsCore.graphics3DGraphics;e.objectIdField?t.forEach(t=>{t&&e.hasGraphic(t)&&this._addObjectStateSet(t,e)}):e.ids.forEach(i=>{const s=t.get(i);s&&this._addObjectStateSet(s,e)})}get test(){return{states:this._stateSets}}}},8202:function(e,t,i){"use strict";i.d(t,"a",(function(){return f}));var s=i("a4ee"),r=i("fc29"),a=i("ce6d"),n=i("af40"),o=i("b2b2"),c=i("59b2"),h=(i("b50f"),i("c120"),i("cea0"),i("d386")),l=i("8a44"),d=i("9180"),u=i("9305");const p=.05;class y{constructor(){this._extents=new l["a"]({allocator:e=>e||Object(d["l"])()}),this._tmpExtent=Object(d["l"])(),this._dirty=!1}get empty(){return 0===this._extents.length}get size(){return this._extents.length}clear(){this._extents.clear()}add(e){this._contains(e)||(this._removeContained(e),Object(d["k"])(this._extents.pushNew(),e),this._dirty=!0)}pop(){return this._dirty&&this._mergeTight(),this._extents.pop()}merge(e){return this._mergeTight(e),e.hasProgressed}_mergeTight(e=u["e"]){const t=this._extents,i=new Set;let s=0;for(;s!==t.length;){t.sort((e,t)=>e[0]-t[0]),s=t.length,i.clear();for(let s=0;s=r[2])break;i.add(s)}i.forEach(s=>{if(r===s)return;if(s[2]<=r[0])return void i.delete(s);const a=Object(d["d"])(r),n=Object(d["d"])(s),o=this._tmpExtent;Object(d["p"])(r,s,o);const c=a+n;(Object(d["d"])(o)-c)/cObject(d["g"])(t,e))}_removeContained(e){this._extents.filterInPlace(t=>!Object(d["g"])(e,t))}get test(){const e=this;return{containsPoint:t=>e._extents.some(e=>Object(d["h"])(e,t))}}}var b=i("b7c2");let g=class extends r["a"]{constructor(){super(...arguments),this.dirtyExtents=new y,this.globalDirty=!1,this.averageExtentUpdateSize=0,this.dirtyGraphicsSet=new Set,this.handles=new n["a"],this.updateElevation=!1,this.graphicsCoreOwner=null,this.graphicsCore=null,this.events=new a["a"]}setup(e,t,i,s){this.graphicsCoreOwner=e,this.queryGraphicUIDsInExtent=t,this.graphicsCore=i,this.elevationProvider=s;const r=this.graphicsCoreOwner.view.resourceController.scheduler;this.handles.add([s.on("elevation-change",e=>this._elevationChanged(e)),this.graphicsCoreOwner.watch("suspended",()=>this._suspendedChange()),r.registerTask(u["c"].ELEVATION_ALIGNMENT,this)])}destroy(){this.dirtyGraphicsSet.clear(),this.handles.destroy(),this.handles=null,this.graphicsCoreOwner=null,this.graphicsCore=null,this.queryGraphicUIDsInExtent=null}clear(){this.dirtyGraphicsSet.clear(),this.notifyChange("updating")}_suspendedChange(){!0===this.graphicsCoreOwner.suspended?this.updateElevation=!1:!1===this.graphicsCoreOwner.suspended&&this.updateElevation&&(this.globalDirty=!0,this.notifyChange("updating"))}elevationInfoChange(){this.globalDirty=!0,this.notifyChange("updating")}get updating(){return this.running}get running(){return this.dirtyGraphicsSet.size>0||this.dirtyExtents&&!this.dirtyExtents.empty||this.globalDirty}get updatingRemaining(){return this.dirtyGraphicsSet.size+this.dirtyExtents.size*this.averageExtentUpdateSize}runTask(e){for(this.globalDirty&&(this._markAllGraphicsElevationDirty(),this.globalDirty=!1,e.madeProgress()),e.run(()=>this.dirtyExtents.merge(e));this.running&&!e.done;)this._updateDirtyGraphics(e),this._updateDirtyExtents(e);this.graphicsCoreOwner.view.deconflictor.setDirty(),this.notifyChange("updating")}_updateDirtyGraphics(e){const t=this.graphicsCoreOwner.view.renderCoordsHelper,i=this.graphicsCore.effectiveUpdatePolicy===b["m"].ASYNC;for(const s of this.dirtyGraphicsSet.keys()){const r=this.graphicsCore.getGraphics3DGraphicById(s);if(this.dirtyGraphicsSet.delete(s),Object(o["k"])(r)&&(r.alignWithElevation(this.elevationProvider,t,i),e.madeProgress()),e.done)return}}_updateDirtyExtents(e){for(;!this.dirtyExtents.empty&&!e.done;){const t=this.dirtyExtents.pop(),i=this.elevationProvider.spatialReference;this.events.emit("invalidate-elevation",{extent:t,spatialReference:i});const s=this.dirtyGraphicsSet.size;this.queryGraphicUIDsInExtent(t,i,e=>{const t=this.graphicsCore.getGraphics3DGraphicById(e);Object(o["k"])(t)&&t.needsElevationUpdates()&&this.dirtyGraphicsSet.add(e)}),this.averageExtentUpdateSize=.1*(this.dirtyGraphicsSet.size-s)+.9*this.averageExtentUpdateSize,e.madeProgress()}}_markAllGraphicsElevationDirty(){this.dirtyExtents.clear(),this.dirtyGraphicsSet.clear(),this.graphicsCore.graphics3DGraphics.forEach((e,t)=>this.dirtyGraphicsSet.add(t))}_elevationChanged(e){if("scene"===e.context&&(!this.graphicsCore.layer.elevationInfo||"relative-to-scene"!==this.graphicsCore.layer.elevationInfo.mode))return;const{extent:t,spatialReference:i}=e;if(this.graphicsCoreOwner.suspended){if(!this.updateElevation){const e=this.graphicsCore.computedExtent;e&&t[2]>e.xmin&&t[0]e.ymin&&t[1]{e.layer=this.layer,e.sourceLayer=this.layer}),s}async executeQuery(e,t){const i=await this.dataQueryEngine.executeQuery(this._ensureQueryJSON(e),t),s=l["default"].fromJSON(i);return s.features.forEach(e=>{e.layer=this.layer,e.sourceLayer=this.layer}),s}_ensureQueryJSON(e){return Object(a["j"])(e)?this.defaultQueryJSON:("outSpatialReference"in e&&!e.outSpatialReference&&(e.outSpatialReference=this.spatialReference),e.toJSON())}_ensureDataQueryEngine(){if(this._dataQueryEngineInstance)return this._dataQueryEngineInstance;const e="timeInfo"in this.layer&&this.layer.timeInfo&&this.layer.timeInfo.toJSON()||null,t=this.layer.objectIdField,i=u["a"].toJSON(this.queryGeometryType),s=this.layer.fields.map(e=>e.toJSON()),r=this.layerView.view.resourceController.scheduler,a=this.priority,n=this.spatialReference.toJSON(),o=this.layerView.processor.featureStore,{hasZ:c,hasM:h}=this.layerView;return this._dataQueryEngineInstance=new p({hasZ:c,hasM:h,geometryType:i,fields:s,timeInfo:e,spatialReference:n,objectIdField:t,featureStore:o,scheduler:r,priority:a}),this._dataQueryEngineInstance}};Object(s["a"])([Object(n["b"])({constructOnly:!0})],y.prototype,"layerView",void 0),Object(s["a"])([Object(n["b"])({constructOnly:!0})],y.prototype,"priority",void 0),Object(s["a"])([Object(n["b"])({readOnly:!0,aliasOf:"layerView.view.spatialReference"})],y.prototype,"spatialReference",void 0),Object(s["a"])([Object(n["b"])({readOnly:!0,aliasOf:"layerView.layer"})],y.prototype,"layer",void 0),Object(s["a"])([Object(n["b"])({readOnly:!0})],y.prototype,"queryGeometryType",null),Object(s["a"])([Object(n["b"])({readOnly:!0})],y.prototype,"defaultQueryJSON",null),y=Object(s["a"])([Object(o["a"])("esri.views.3d.layers.graphics.QueryEngine")],y);const b=y},a5de:function(e,t,i){"use strict";i.d(t,"a",(function(){return q}));var s=i("a4ee"),r=i("8d60"),a=i("6c97"),n=i("9096"),o=i("b2b2"),c=i("f4cc"),h=i("477c"),l=i("59b2"),d=(i("b50f"),i("c120"),i("cea0"),i("d386")),u=i("0f1c"),p=i("9786"),y=i("d1ac"),b=i("69dd"),g=i("ed70"),f=i("4c84"),O=i("8202"),m=i("fc29"),j=i("af40"),v=i("e92d"),_=i("fe80"),S=i("3795"),w=i("96d4"),E=i("6431"),x=i("a207"),C=i("f353"),I=i("9305");const V=v["a"].getLogger("esri.views.3d.layers.graphics.Graphics3DFilterVisibility");let G=class extends m["a"]{constructor(...e){super(...e),this._dirty=!1,this._querying=!1,this._handles=new j["a"]}get updating(){return this._dirty||this._querying||Object(o["k"])(this._queryResult)}setup(e,t){this._layerView=e,this._core=t,this._objectIdField=e.layer.objectIdField,this._queryEngine=new x["a"]({layerView:this._layerView,priority:I["c"].FILTER_VISIBILITY});const i=this._layerView.view.resourceController.scheduler;this._handles.add(i.registerTask(I["c"].FILTER_VISIBILITY,this)),this._handles.add(Object(S["b"])(t.owner,"loadedGraphics","after-changes",e=>this._graphicsChanged(e),()=>this.dirty=!0)),this.filterChanged()}destroy(){this._handles.destroy(),this._handles=null,this.clear(),this._layerView=null,this._core=null}clear(){this._queryEngine.clear()&&(this._core.modifyGraphics3DGraphicVisibilities(e=>e.clearVisibilityFlag(E["a"].FILTER)),this._queryResult=null,this._querying=!1),this.dirty=!1}_graphicsChanged(e){this._queryEngine&&0==(e.type&_["a"].ADD)||(this.dirty=!0)}updateVisibility(e){this.active&&(e.hasVisibilityFlag(E["a"].FILTER,E["b"].GRAPHIC)||e.setVisibilityFlag(E["a"].FILTER,!1,E["b"].GRAPHIC),this.dirty=!0)}filterChanged(){const e=this._recomputeFilter();e!==this._filter&&(this._filter=e,this.dirty=!0)}get active(){return this._filter&&this._core.graphics3DGraphics.size>0}_recomputeFilter(){const e="filter"in this._layerView?this._layerView.filter:null,t="timeExtent"in this._layerView?this._layerView.timeExtent:null,i=Object(C["b"])(this._layerView);if(Object(o["j"])(t)&&Object(o["j"])(i))return e;const s=Object(o["k"])(e)?e.clone():new w["a"];if(Object(o["k"])(t)&&(s.timeExtent=Object(o["k"])(s.timeExtent)?s.timeExtent.intersection(t):t),Object(o["k"])(i)){const e=null==s.where||""===s.where;s.where=e?i:`(${s.where}) AND (${i})`}return s}get running(){return this._dirty&&!this._querying||Object(o["k"])(this._queryResult)}runTask(e){if(!this.active)return void this.clear();!this._dirty||this._querying||e.done||(this._querying=!0,this.dirty=!1,this._queryEngine.executeQueryForIdSet(this._filter).then(e=>{this._queryResult=e,this._querying=!1}).catch(e=>{if(!Object(c["m"])(e)){V.warn("FeatureFilter query failed: "+e,{error:e});const t=new Set;this._core.graphics3DGraphics.forEach(e=>t.add(this._getFeatureId(e.graphic))),this._queryResult=t,this._querying=!1}}),e.madeProgress());const t=this._queryResult;Object(o["k"])(t)&&!e.done&&(this._core.modifyGraphics3DGraphicVisibilities(i=>{if(e.done)return!1;const s=t.has(this._getFeatureId(i.graphic));return!!i.setVisibilityFlag(E["a"].FILTER,s,E["b"].GRAPHIC)&&(e.madeProgress(),!0)}),e.done||(this._queryResult=null))}_getFeatureId(e){return null==e.objectId?e.attributes[this._objectIdField]:e.objectId}set dirty(e){this._dirty=e}};Object(s["a"])([Object(l["b"])({readOnly:!0})],G.prototype,"updating",null),Object(s["a"])([Object(l["b"])({readOnly:!0})],G.prototype,"running",null),Object(s["a"])([Object(l["b"])()],G.prototype,"_dirty",void 0),Object(s["a"])([Object(l["b"])()],G.prototype,"_querying",void 0),Object(s["a"])([Object(l["b"])()],G.prototype,"_queryResult",void 0),G=Object(s["a"])([Object(d["a"])("esri.views.3d.layers.graphics.Graphics3DFilterVisibility")],G);var R=i("ebae"),F=i("0e25"),D=i("3422"),T=i("ba58"),A=i("d36d"),Q=i("b7c2");let P=class extends n["a"]{constructor(e){super(e),this.type="graphics-3d",this.elevationFeatureExpressionEnabled=!1,this.dataExtent=null,this.preferredUpdatePolicy=Q["m"].ASYNC,this.suspendResumeExtent=null}normalizeCtorArgs(e){const t=e.frustumVisibilityEnabled?new R["a"]:null,i=e.scaleVisibilityEnabled?new D["a"]:null,s=(e.filterVisibilityEnabled||e.timeExtentVisibilityEnabled)&&"multipatch"!==e.owner.layer.geometryType?new G:null,r=e.elevationAlignmentEnabled?new O["a"]:null,{owner:a,updateClippingExtent:n,dataExtent:o,elevationFeatureExpressionEnabled:c,preferredUpdatePolicy:h}=e;return{owner:a,updateClippingExtent:n,dataExtent:o,frustumVisibility:t,scaleVisibility:i,filterVisibility:s,elevationAlignment:r,elevationFeatureExpressionEnabled:c,preferredUpdatePolicy:h}}get featureSpatialReference(){return"featureSpatialReference"in this.owner?this.owner.featureSpatialReference:void 0}initialize(){const e=new f["a"]({owner:this,layer:this.layer,preferredUpdatePolicy:this.preferredUpdatePolicy,elevationFeatureExpressionEnabled:this.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:this.owner.hasZ,hasM:this.owner.hasM});this._set("graphicsCore",e),this.scaleVisibility&&this.updatingHandles.add(()=>this.layer.effectiveScaleRange,()=>this.scaleVisibility.layerMinMaxScaleChangeHandler()),this.filterVisibility&&(this.updatingHandles.add(()=>"filter"in this.owner&&this.owner.filter,()=>this.filterVisibility.filterChanged()),this.updatingHandles.add(()=>"timeExtent"in this.owner&&this.owner.timeExtent,()=>this.filterVisibility.filterChanged())),this.elevationAlignment&&this.updatingHandles.add(()=>this.layer.elevationInfo,(e,t)=>{Object(u["a"])(e,t)&&this.updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())}),this.updatingHandles.add(()=>this.layer.labelsVisible,()=>this.graphicsCore.updateVisibilityInfo()),this.updatingHandles.add(()=>this.layer.labelingInfo,(e,t)=>{Object(u["a"])(e,t)&&this.graphicsCore.updateLabelingInfo()}),this.updatingHandles.add(()=>this.preferredUpdatePolicy,e=>this.graphicsCore.preferredUpdatePolicy=e),this.handles.add(this.view.resourceController.memoryController.events.on("quality-changed",()=>this.notifyChange("displayFeatureLimit")))}destroy(){this.handles.removeAll(),this.updatingHandles.removeAll(),this._set("frustumVisibility",Object(o["d"])(this.frustumVisibility)),this._set("scaleVisibility",Object(o["d"])(this.scaleVisibility)),this._set("filterVisibility",Object(o["d"])(this.filterVisibility)),this._set("elevationAlignment",Object(o["d"])(this.elevationAlignment)),this._set("objectStates",Object(o["d"])(this.objectStates)),this._set("graphicsCore",Object(o["d"])(this.graphicsCore)),this._set("owner",null)}get layer(){return this.owner.layer}get suspendResumeExtentMode(){return"suspendResumeExtentMode"in this.owner?this.owner.suspendResumeExtentMode:"computed"}get scaleVisibilitySuspended(){var e;return null==(e=this.scaleVisibility)?void 0:e.suspended}get suspended(){return this.owner.suspended}get legendEnabled(){return!this.frustumVisibility.suspended}get suspendInfo(){var e,t;const i={};return null!=(e=this.scaleVisibility)&&e.suspended&&(i.outsideScaleRange=!0),null!=(t=this.frustumVisibility)&&t.suspended&&(i.outsideOfView=!0),i}get updating(){var e,t,i;return!!(null!=(e=this.graphicsCore)&&e.updating||null!=(t=this.frustumVisibility)&&t.updating||null!=(i=this.updatingHandles)&&i.updating)}get updatingRemaining(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.updatingRemaining)?e:0}get featureStore(){var e;return null==(e=this.graphicsCore)?void 0:e.featureStore}get view(){return this.owner.view}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner.fullOpacity}get filter(){return"filter"in this.owner?this.owner.filter:null}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get drapeSourceType(){return this.owner.drapeSourceType}get updatePolicy(){return this.owner.updatePolicy}get graphics3DGraphics(){var e;return null==(e=this.graphicsCore)?void 0:e.graphics3DGraphics}get graphics3DGraphicsByObjectID(){var e;return null==(e=this.graphicsCore)?void 0:e.graphics3DGraphicsByObjectID}get symbolUpdateType(){var e;return null==(e=this.graphicsCore)?void 0:e.symbolUpdateType}get displayFeatureLimit(){var e;const t=this.view.resourceController.memoryController.memoryFactor,i=null==(e=this.graphicsCore)?void 0:e.displayFeatureLimit;if(1===t)return i;const s=Math.ceil(i.maximumNumberOfFeatures*t),r=Math.ceil(i.maximumTotalNumberOfFeatures*t),a=Math.ceil(i.minimumTotalNumberOfFeatures*t);return{...i,maximumNumberOfFeatures:s,maximumTotalNumberOfFeatures:r,minimumTotalNumberOfFeatures:a}}get usedMemory(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.usedMemory)?e:0}get usedMemoryPerFeature(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.usedMemoryPerGraphic)?e:0}get unprocessedMemoryEstimate(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.unprocessedMemoryEstimate)?e:0}get performanceInfo(){return{core:this.graphicsCore.performanceInfo,elevationUpdating:this.elevationAlignment.updating,visibilityFrustum:!this.frustumVisibility.suspended,visibilityScale:!this.scaleVisibility.suspended}}async setup(){this.frustumVisibility&&this.frustumVisibility.setup(this);const e=this.owner,t=this.owner.view.basemapTerrain,i=(e,t,i)=>this.graphicsCore.spatialIndex.queryGraphicUIDsInExtent(e,t,i);if(this.scaleVisibility&&this.scaleVisibility.setup(this,this.layer,i,this.graphicsCore,t),this.filterVisibility&&("filter"in e||"timeExtent"in e)&&this.filterVisibility.setup(e,this.graphicsCore),this.elevationAlignment){const t=e.view.elevationProvider;this.elevationAlignment.setup(this,i,this.graphicsCore,t)}this._set("objectStates",new F["a"](this.graphicsCore)),this._set("labeling",this.owner.view.labeler.addGraphicsOwner(this.graphicsCore,this.scaleVisibility)),this._set("deconfliction",e.view.deconflictor.addGraphicsOwner(this.graphicsCore)),await Object(c["p"])(this.graphicsCore.setup({elevationAlignment:this.elevationAlignment,scaleVisibility:this.scaleVisibility,filterVisibility:this.filterVisibility,deconflictor:this.deconfliction,labeler:this.labeling,objectStates:this.objectStates})),this.updatingHandles.add(()=>this.layer.renderer,e=>this.updatingHandles.addPromise(this.graphicsCore.rendererChange(e))),this.updatingHandles.add(()=>e.fullOpacity,()=>this.graphicsCore.opacityChange()),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this.updatingHandles.add(()=>e.view.clippingArea,()=>this._updateClippingExtent()),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&await Object(c["p"])(this.graphicsCore.updateLabelingInfo())}maskOccludee(e){const{set:t,handle:i}=this.objectStates.acquireSet(Q["f"].MaskOccludee,null);return this.objectStates.setUid(t,e.uid),i}highlight(e,t){if(e instanceof b["a"]){const{set:i,handle:s}=this.objectStates.acquireSet(Q["f"].Highlight,t);return this.owner.queryObjectIds(e).then(e=>this.objectStates.setObjectIds(i,e)),s}if("number"==typeof e||"string"==typeof e)return this.highlight([e],t);if(e instanceof r["a"])return this.highlight([e],t);if("toArray"in e&&(e=e.toArray()),Array.isArray(e)&&e.length>0){if(e[0]instanceof r["a"]){const i=e;if(null==Object(A["a"])(this.layer.fieldsIndex,i[0].attributes,t)){const e=i.map(e=>e.uid),{set:t,handle:s}=this.objectStates.acquireSet(Q["f"].Highlight,null);return this.objectStates.setUids(t,e),s}e=i.map(e=>Object(A["a"])(this.layer.fieldsIndex,e.attributes,t))}if("number"==typeof e[0]||"string"==typeof e[0]){const i=e,{set:s,handle:r}=this.objectStates.acquireSet(Q["f"].Highlight,t);return this.objectStates.setObjectIds(s,i),r}}return k}whenGraphicBounds(e,t){var i;return null==(i=this.graphicsCore)?void 0:i.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){var i;return null==(i=this.graphicsCore)?void 0:i.computeAttachmentOrigin(e,t)}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}getRenderingInfo(e,t,i){const s=Object(y["c"])(e,{renderer:t,arcade:i});if(Object(o["k"])(s)&&s.color){const e=s.color;e[0]=e[0]/255,e[1]=e[1]/255,e[2]=e[2]/255}return s}getRenderingInfoAsync(e,t,i,s){return Object(y["d"])(e,{renderer:t,arcade:i,...s})}getSymbolLayerSize(e,t){var i;return null==(i=this.graphicsCore)?void 0:i.getSymbolLayerSize(e,t)}setObjectIdVisibility(e,t){var i;null==(i=this.graphicsCore)||i.setObjectIdVisibility(e,t)}_updateClippingExtent(){const e=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.owner.view.spatialReference)&&(this.updateClippingExtent(e)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this.handles.add(Object(h["e"])(()=>this.suspendResumeExtentMode,()=>{switch(this.handles.remove(N),this.suspendResumeExtentMode){case"computed":this.handles.add([Object(h["e"])(()=>this.graphicsCore.computedExtent,e=>this._updateSuspendResumeExtent(e),h["a"]),Object(h["e"])(()=>this.graphicsCore.extentPadding,()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent))],N);break;case"data":this.handles.add([Object(h["f"])(()=>this.dataExtent,e=>this._updateSuspendResumeExtent(e),h["a"]),Object(h["e"])(()=>this.graphicsCore.extentPadding,()=>this._updateSuspendResumeExtent(Object(o["t"])(this.dataExtent)))],N);break;default:Object(a["a"])(this.suspendResumeExtentMode)}},h["a"]))}_updateSuspendResumeExtent(e){e?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(e,this.suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(e,t){const i=this.owner.view.spatialReference;if(!e.spatialReference.equals(i)){if(!Object(p["a"])(e,i))return;e=Object(p["d"])(e,i)}return Object(T["e"])(e,t,g["a"],this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(e){this.frustumVisibility&&this.frustumVisibility.setExtent(e),this.scaleVisibility&&this.scaleVisibility.setExtent(e)}};Object(s["a"])([Object(l["b"])()],P.prototype,"type",void 0),Object(s["a"])([Object(l["b"])({constructOnly:!0})],P.prototype,"owner",void 0),Object(s["a"])([Object(l["b"])()],P.prototype,"layer",null),Object(s["a"])([Object(l["b"])({constructOnly:!0})],P.prototype,"updateClippingExtent",void 0),Object(s["a"])([Object(l["b"])({constructOnly:!0})],P.prototype,"elevationFeatureExpressionEnabled",void 0),Object(s["a"])([Object(l["b"])({constructOnly:!0})],P.prototype,"graphicsCore",void 0),Object(s["a"])([Object(l["b"])({constructOnly:!0})],P.prototype,"scaleVisibility",void 0),Object(s["a"])([Object(l["b"])({constructOnly:!0})],P.prototype,"filterVisibility",void 0),Object(s["a"])([Object(l["b"])({constructOnly:!0})],P.prototype,"elevationAlignment",void 0),Object(s["a"])([Object(l["b"])({constructOnly:!0})],P.prototype,"frustumVisibility",void 0),Object(s["a"])([Object(l["b"])({readOnly:!0})],P.prototype,"deconfliction",void 0),Object(s["a"])([Object(l["b"])({readOnly:!0})],P.prototype,"labeling",void 0),Object(s["a"])([Object(l["b"])({readOnly:!0})],P.prototype,"objectStates",void 0),Object(s["a"])([Object(l["b"])()],P.prototype,"suspendResumeExtentMode",null),Object(s["a"])([Object(l["b"])()],P.prototype,"dataExtent",void 0),Object(s["a"])([Object(l["b"])()],P.prototype,"scaleVisibilitySuspended",null),Object(s["a"])([Object(l["b"])()],P.prototype,"suspended",null),Object(s["a"])([Object(l["b"])()],P.prototype,"legendEnabled",null),Object(s["a"])([Object(l["b"])()],P.prototype,"suspendInfo",null),Object(s["a"])([Object(l["b"])()],P.prototype,"updating",null),Object(s["a"])([Object(l["b"])()],P.prototype,"updatingRemaining",null),Object(s["a"])([Object(l["b"])()],P.prototype,"featureStore",null),Object(s["a"])([Object(l["b"])()],P.prototype,"view",null),Object(s["a"])([Object(l["b"])()],P.prototype,"loadedGraphics",null),Object(s["a"])([Object(l["b"])()],P.prototype,"fullOpacity",null),Object(s["a"])([Object(l["b"])()],P.prototype,"filter",null),Object(s["a"])([Object(l["b"])()],P.prototype,"slicePlaneEnabled",null),Object(s["a"])([Object(l["b"])()],P.prototype,"drapeSourceType",null),Object(s["a"])([Object(l["b"])()],P.prototype,"updatePolicy",null),Object(s["a"])([Object(l["b"])()],P.prototype,"preferredUpdatePolicy",void 0),Object(s["a"])([Object(l["b"])()],P.prototype,"displayFeatureLimit",null),P=Object(s["a"])([Object(d["a"])("esri.views.3d.layers.graphics.Graphics3DFeatureProcessor")],P);const q=P,N="suspendResumeExtentMode",k={remove(){},pause(){},resume(){}}},d36d:function(e,t,i){"use strict";function s(e,t,i){if(!i||null==t)return null;if(!e)return r(t,i);const s=e.get(i);return s?t[s.name]:null}function r(e,t){const i=t.toLowerCase();for(const s in e)if(s.toLowerCase()===i)return e[s];return null}i.d(t,"a",(function(){return s}))},ebae:function(e,t,i){"use strict";i.d(t,"a",(function(){return y}));var s=i("a4ee"),r=i("fc29"),a=i("af40"),n=i("3795"),o=i("59b2"),c=(i("b50f"),i("c120"),i("cea0"),i("d386")),h=i("f694"),l=i("6b38"),d=i("9305");const u=1.2;let p=class extends r["a"]{constructor(){super(...arguments),this.suspended=!1,this.extent=null,this.extentIntersectionDirty=!0,this._isVisibleBelowSurface=!1,this.handles=new a["a"],this.graphicsCoreOwner=null,this.updating=!0}setup(e){this.graphicsCoreOwner=e,this.extentIntersection=new l["a"]({renderCoordsHelper:e.view.renderCoordsHelper});const t=e.view,i=t.basemapTerrain,s=t.resourceController.scheduler;this.handles.add([t.on("resize",()=>this._viewChange()),t.state.watch("camera",()=>this._viewChange(),!0),s.registerTask(d["c"].FRUSTUM_VISIBILITY,this),i.on("elevation-bounds-change",()=>this._elevationBoundsChange())]),"local"===t.viewingMode?this.isVisibleBelowSurface=!0:this.handles.add([Object(n["a"])(i,["opacity","wireframe"],()=>this._updateIsVisibleBelowSurface()),Object(n["a"])(t,"map.ground.navigationConstraint.type",()=>this._updateIsVisibleBelowSurface())])}destroy(){this.graphicsCoreOwner=null,this.extent=null,this.extentIntersection=null,this.handles&&(this.handles.destroy(),this.handles=null)}_setDirty(){this.updating||this._set("updating",!0)}setExtent(e){this.extent=e,this.extentIntersectionDirty=!0,this._setDirty()}_viewChange(){this._setDirty()}_elevationBoundsChange(){this._setDirty(),this.extentIntersectionDirty=!0}set isVisibleBelowSurface(e){this._isVisibleBelowSurface=e,this._setDirty(),this.extentIntersectionDirty=!0}_updateIsVisibleBelowSurface(){const e=this.graphicsCoreOwner.view,t=e.basemapTerrain,i="local"===e.viewingMode,s=e.map.ground&&e.map.ground.navigationConstraint&&"none"===e.map.ground.navigationConstraint.type;this.isVisibleBelowSurface=i||!t.opaque||s}_updateExtentIntersection(){if(!this.extentIntersectionDirty)return;this.extentIntersectionDirty=!1;const e=this.graphicsCoreOwner.view;let t;if(this._isVisibleBelowSurface)t=-.3*Object(h["e"])(e.spatialReference).radius;else{const{min:i,max:s}=e.basemapTerrain.elevationBounds;t=i-Math.max(1,(s-i)*(u-1))}this.extentIntersection.update(this.extent,e.spatialReference,t)}get running(){return this.updating}runTask(){if(this._set("updating",!1),!this.extent)return void this._set("suspended",!1);this._updateExtentIntersection();const e=this.graphicsCoreOwner.view.frustum,t=Object(h["e"])(this.graphicsCoreOwner.view.spatialReference).radius;this._set("suspended",!this.extentIntersection.isVisibleInFrustum(e,t))}};Object(s["a"])([Object(o["b"])({readOnly:!0})],p.prototype,"suspended",void 0),Object(s["a"])([Object(o["b"])({readOnly:!0})],p.prototype,"updating",void 0),p=Object(s["a"])([Object(c["a"])("esri.views.3d.layers.graphics.Graphics3DFrustumVisibility")],p);const y=p}}]); //# sourceMappingURL=chunk-382fcf84.2d1b4379.js.map