// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("../../../chunks/tslib.es6 ../../../Color ../../../Graphic ../../../symbols ../../../core/maybe ../../../core/reactiveUtils ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../../layers/GraphicsLayer ../../../layers/support/TelemetryDisplay ../engine/webgl/OverlayContainer ../engine/webgl/OverlayMultipoint ./LayerView2D ./graphics/GraphicContainer ./graphics/GraphicsView2D ../../layers/LayerView ../../../symbols/SimpleFillSymbol ../../../symbols/SimpleLineSymbol ../../../symbols/SimpleMarkerSymbol".split(" "), function(f,b,g,z,k,c,h,A,B,C,p,q,l,r,t,u,v,w,x,y,m,n){const d=new b([255,127,0]);b=class extends u.LayerView2DMixin(x){constructor(){super(...arguments);this._graphicsLayer=new q;this._frameOutlineGraphic=new g({symbol:new y({outline:{type:"simple-line",color:d}})});this._sensorTrailGraphic=new g({symbol:new m({color:d})});this._lineOfSightGraphic=new g({symbol:new m({color:d})});this._sensorLocationGraphic=new g({symbol:new n({color:d})});this._frameCenterGraphic=new g({symbol:new n({color:d})}); this.layer=this._overlayContainer=null;this.symbolColor=d;this.visibleTelemetryElements=null}destroy(){this._graphicsLayer=k.destroyMaybe(this._graphicsLayer)}initialize(){this.addHandles(c.watch(()=>this.symbolColor,()=>{this._frameOutlineGraphic.symbol.outline.color=this.symbolColor;this._sensorTrailGraphic.symbol.color=this.symbolColor;this._lineOfSightGraphic.symbol.color=this.symbolColor;this._sensorLocationGraphic.symbol.color=this.symbolColor;this._frameCenterGraphic.symbol.color=this.symbolColor}, c.initial));this._graphicsLayer.graphics.addMany([this._frameOutlineGraphic,this._sensorTrailGraphic,this._lineOfSightGraphic,this._sensorLocationGraphic,this._frameCenterGraphic]);this.visibleTelemetryElements=new l({frameCenter:this.layer.telemetryDisplay?.frameCenter??!0,frameOutline:this.layer.telemetryDisplay?.frameOutline??!0,lineOfSight:this.layer.telemetryDisplay?.lineOfSight??!0,sensorLocation:this.layer.telemetryDisplay?.sensorLocation??!0,sensorTrail:this.layer.telemetryDisplay?.sensorTrail?? !0})}attach(){this._overlayContainer=new r;this.container.addChild(this._overlayContainer);this._addOverlayMultipoint();this.graphicsView=new w({requestUpdateCallback:()=>this.requestUpdate(),view:this.view,graphics:this._graphicsLayer.graphics,container:new v(this.view.featuresTilingScheme)});this.container.addChild(this.graphicsView.container);this.addAttachHandles(this._graphicsLayer.on("graphic-update",this.graphicsView.graphicUpdateHandler));this.addAttachHandles([c.watch(()=>[this.layer.telemetryDisplay?.frameCenter, this.layer.telemetryDisplay?.frameOutline,this.layer.telemetryDisplay?.sensorLocation,this.layer.telemetryDisplay?.sensorTrail,this.layer.telemetryDisplay?.lineOfSight],()=>this._updateVisibleTelemetryElements(),c.initial),c.watch(()=>[this.layer.telemetry,this.visibleTelemetryElements?.frameCenter,this.visibleTelemetryElements?.frameOutline,this.visibleTelemetryElements?.sensorLocation,this.visibleTelemetryElements?.sensorTrail,this.visibleTelemetryElements?.lineOfSight],()=>this._updateGraphicGeometries(), c.initial)])}detach(){this._overlayContainer.removeAllChildren();this.container.removeAllChildren();this.graphicsView=k.destroyMaybe(this.graphicsView)}supportsSpatialReference(a){return!0}moveEnd(){}viewChange(){this.graphicsView.viewChange()}update(a){this.graphicsView.processUpdate(a)}isUpdating(){return!this.graphicsView||this.graphicsView.updating}_updateVisibleTelemetryElements(){this.visibleTelemetryElements&&this.layer.telemetryDisplay&&(this.visibleTelemetryElements.frameCenter=this.layer.telemetryDisplay.frameCenter, this.visibleTelemetryElements.frameOutline=this.layer.telemetryDisplay.frameOutline,this.visibleTelemetryElements.lineOfSight=this.layer.telemetryDisplay.lineOfSight,this.visibleTelemetryElements.sensorLocation=this.layer.telemetryDisplay.sensorLocation,this.visibleTelemetryElements.sensorTrail=this.layer.telemetryDisplay.sensorTrail)}_updateGraphicGeometries(){const {telemetry:a}=this.layer,{visibleTelemetryElements:e}=this;a&&e&&(this._frameOutlineGraphic.geometry=e.frameOutline&&a.frameOutline? this.layer.telemetry.frameOutline:null,this._sensorTrailGraphic.geometry=e.sensorTrail&&a.sensorTrail?this.layer.telemetry.sensorTrail:null,this._lineOfSightGraphic.geometry=e.lineOfSight&&a.lineOfSight?this.layer.telemetry.lineOfSight:null,this._sensorLocationGraphic.geometry=e.sensorLocation&&a.sensorLocation?this.layer.telemetry.sensorLocation:null,this._frameCenterGraphic.geometry=e.frameCenter&&a.frameCenter?this.layer.telemetry.frameCenter:null)}async _addOverlayMultipoint(){if(this.layer.videoElement){var a= new t(this.layer.videoElement);this.addAttachHandles([c.watch(()=>[this.layer.frameHorizonPoints,this.layer.groundControlPoints],()=>{a.frameHorizonPoints=this.layer.frameHorizonPoints;a.groundControlPoints=this.layer.groundControlPoints},c.initial)]);this._overlayContainer.addChild(a);this.view.stage.requestRender()}}};f.__decorate([h.property()],b.prototype,"graphicsView",void 0);f.__decorate([h.property()],b.prototype,"layer",void 0);f.__decorate([h.property()],b.prototype,"symbolColor",void 0); f.__decorate([h.property({type:l})],b.prototype,"visibleTelemetryElements",void 0);return b=f.__decorate([p.subclass("esri.views.2d.layers.VideoLayerView2D")],b)});