{"version":3,"sources":["webpack:///./node_modules/arcgis-js-api/views/3d/layers/DynamicLayerView3D.js","webpack:///./node_modules/arcgis-js-api/views/layers/support/popupUtils.js","webpack:///./node_modules/arcgis-js-api/views/3d/layers/support/overlayImageUtils.js","webpack:///./node_modules/arcgis-js-api/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js","webpack:///./node_modules/arcgis-js-api/views/3d/layers/support/projectExtentUtils.js","webpack:///./node_modules/arcgis-js-api/views/3d/layers/ImageryLayerView3D.js","webpack:///./node_modules/arcgis-js-api/views/layers/ImageryLayerView.js","webpack:///./node_modules/arcgis-js-api/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js","webpack:///./node_modules/arcgis-js-api/views/3d/webgl-engine/materials/ImageMaterial.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAO,CAAC,kCAAS,CAAC,OAAS,CAAC,2BAAO,CAAC,2BAA0B,CAAC,2BAAsB,CAAC,2BAA4B,CAAC,2BAA4B,CAAC,2BAA0B,CAAC,2BAA0C,CAAC,2BAA0B,CAAC,2BAA0C,CAAC,2BAAe,CAAC,2BAA6B,CAAC,2BAA8B,CAAC,2BAAuB,CAAC,2BAAoC,CAAC,2BAA6B,CAAC,2BAAyC,CAAC,2BAAwB,CAAC,2BAAmC,CAAC,mCAAE,kDAAkD,aAAa,2EAA2E,aAAa,8CAA8C,qNAAqN,0DAA0D,WAAW,iEAAiE,yDAAyD,0DAA0D,mCAAmC,kGAAkG,qDAAqD,eAAe,8FAA8F,mCAAmC,2GAA2G,gDAAgD,+BAA+B,GAAG,GAAG,gCAAgC,aAAa,oDAAoD,yBAAyB,oFAAoF,4BAA4B,4CAA4C,wJAAwJ,gEAAgE,2DAA2D,cAAc,gBAAgB,+CAA+C,eAAe,aAAa,+CAA+C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,EAAE,OAAO,uCAAuC,0DAA0D,eAAe,2BAA2B,+BAA+B,sDAAsD,kCAAkC,qDAAE,qCAAC,2BAAsB,CAAC,GAAC,CAAC,iEAAC,CAAC,YAAC,CAAC,GAAG,KAAK,oBAAoB,2BAA2B,OAAO,iBAAiB,eAAe,aAAa,8CAA8C,8JAA8J,mDAAmD,QAAQ,2DAA2D,QAAQ,qbAAqb,iCAAiC,wCAAwC;AAAA,oGAAE,C;;;;;;;ACxB/iG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAO,CAAC,kCAAS,CAAC,OAAS,CAAC,2BAAO,CAAC,2BAA0B,CAAC,2BAAiB,CAAC,2BAAgC,CAAC,2BAAyB,CAAC,2BAAyB,CAAC,2BAAmC,CAAC,mCAAE,4BAA4B,aAAa,kBAAkB,gBAAgB,2BAA2B,uHAAuH,mEAAmE,4DAA4D,sCAAsC,mBAAmB,4CAA4C,qWAAqW,+CAA+C,gDAAgD,uCAAuC,kDAAkD,2CAA2C,qDAAqD,GAAG,2BAA2B,cAAc,0CAA0C,uCAAuC,8BAA8B,gEAAgE,oCAAoC,kLAAkL,mCAAmC,0HAA0H,8CAA8C,oGAAoG,gCAAgC,2BAA2B,0CAA0C,8CAA8C,gCAAgC,4LAA4L,4CAA4C,oEAAoE,GAAG,OAAO,qIAAqI,SAAS;AAAA,oGAAE,C","file":"js/chunk-73fa367f.5c61fd77.js","sourcesContent":["// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"tslib\",\"../../../core/asyncUtils\",\"../../../core/Logger\",\"../../../core/promiseUtils\",\"../../../core/promiseUtils\",\"../../../core/watchUtils\",\"../../../core/accessorSupport/decorators\",\"../../../geometry/Extent\",\"../../../geometry/support/aaBoundingRect\",\"./LayerView3D\",\"./support/overlayImageUtils\",\"./support/projectExtentUtils\",\"../support/debugFlags\",\"../webgl-engine/lib/RenderGeometry\",\"../webgl-engine/lib/Texture\",\"../webgl-engine/materials/ImageMaterial\",\"../../layers/LayerView\",\"../../layers/RefreshableLayerView\"],(function(e,t,r,i,a,n,o,s,l,u,h,c,d,p,g,m,y,f,_,v){\"use strict\";var x=a.getLogger(\"esri.views.3d.layers.DynamicLayerView3D\"),w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.drapeSourceType=0,t.hasDraped=!0,t.fullExtentInLocalViewSpatialReference=null,t.maximumDataResolution=null,t._images=new Array,t._extents=new Array,t._overlayExtents=new Array,t.updateWhenStationary=!0,t}return r.__extends(t,e),t.prototype.initialize=function(){var e=this;this.addResolvingPromise(p.toViewIfLocal(this).then((function(t){return e._set(\"fullExtentInLocalViewSpatialReference\",t)}))),this.updatingHandles.add(this,\"suspended\",(function(){return e._suspendedChangeHandler()})),this.handles.add(this.view.resourceController.scheduler.registerIdleStateCallbacks((function(){e._isScaleRangeActive()&&e.notifyChange(\"suspended\")}),(function(){}))),this._isScaleRangeLayer()&&this.updatingHandles.add(this.layer,\"scaleRangeId\",(function(){return e.notifyChange(\"suspended\")})),\"local\"===this.view.viewingMode&&this.updatingHandles.add(this.view.basemapTerrain,\"extent\",(function(){return e._overlayExtents.forEach((function(t,r){return e._updateImageExtent(r)}))}))},t.prototype.destroy=function(){this.clear()},t.prototype.setDrapingExtent=function(e,t,r,i,a,n){this._overlayExtents[e]={extent:h.create(t),spatialReference:r,resolution:i,renderLocalOrigin:a,pixelRatio:n},this._updateImageExtent(e)},t.prototype._updateImageExtent=function(e){var t=this._overlayExtents[e],r=this._clippedExtent(t.extent,b),i=d.computeImageExportSize(t.extent,r,t.resolution),a=t.pixelRatio*this.view.pixelRatio;if(\"imageMaxWidth\"in this.layer||\"imageMaxHeight\"in this.layer){var o=this.layer.imageMaxWidth,s=this.layer.imageMaxHeight;if(i.width>o){var l=o/i.width;i.height=Math.floor(i.height*l),i.width=o,a*=l}if(i.height>s){l=s/i.height;i.width=Math.floor(i.width*l),i.height=s,a*=l}}var u=this._extents[e];u&&h.equals(u.extent,r)&&!this._imageSizeDiffers(r,u.imageSize,i)||(this._extents[e]={extent:h.create(r),spatialReference:t.spatialReference,imageSize:i,pixelRatio:a},this.suspended||this._fetch(e).catch((function(e){n.isAbortError(e)||x.error(e)})))},t.prototype.clear=function(){for(var e=0;e0||i>0){var a=this.view.scale;if(a0&&a>r)return!1}}return!0},t.prototype.isUpdating=function(){return this._images.some((function(e){return!!e.loadingPromise}))},t.prototype.processResult=function(e,t,i){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement)&&(e.image=t),[2]}))}))},t.prototype.findExtentInfoAt=function(e){for(var t=0,r=this._extents;t1.5||c>1.5},t.prototype._fetch=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i,a,s,l,c,d,p,g,m,y=this;return r.__generator(this,(function(f){switch(f.label){case 0:return this.suspended?[2]:(i=this._overlayExtents[e],a=this._extents[e],s=a.extent,l=new u(s[0],s[1],s[2],s[3],a.spatialReference),this._images[e]||(this._images[e]={texture:null,material:null,rendergeometry:null,loadingPromise:null,loadingAbortController:null,image:null,pixelData:null,renderExtent:h.create(s)}),(c=this._images[e]).loadingAbortController&&(c.loadingAbortController.abort(),c.loadingAbortController=null),0===l.width||0===l.height?(this._clearImage(e),[2]):(d=n.createAbortController(),c.loadingAbortController=d,n.onAbort(t,(function(){return d.abort()})),p=d.signal,g=this._waitFetchReady(p).then((function(){var e=r.__assign(r.__assign({requestAsImageElement:!0,pixelRatio:i.pixelRatio},y.getFetchOptions()),{signal:p}),t=a.imageSize,n=t.height,o=t.width;return y.layer.fetchImage(l,o,n,e)})).then((function(e){if(o.isAborted(p))throw x.warnOnce(\"A call to fetchImage resolved even though the request was aborted. fetchImage should not resolve if options.signal.aborted is true.\"),o.createAbortError();return y.processResult(c,e)})),c.loadingPromise=g,n.always(g,(function(){g===c.loadingPromise&&(c.loadingPromise=null,c.loadingAbortController=null)})),m=g.then((function(){h.set(c.renderExtent,s),y._createStageObjects(e,c.image),y.notifyChange(\"updating\"),y.emit(\"draped-data-change\")})).catch((function(e){throw e&&!n.isAbortError(e)&&x.error(e),y.notifyChange(\"updating\"),e})),this.notifyChange(\"updating\"),[4,m]));case 1:return f.sent(),[2]}}))}))},t.prototype.notifyGraphicUpdate=function(){},t.prototype._clearImage=function(e){var t=this._images[e],r=this.view._stage;t&&(t.rendergeometry&&(this.view.basemapTerrain.overlayManager.renderer.removeGeometries([t.rendergeometry],this,2),t.rendergeometry=null),t.texture&&(r.remove(4,t.texture.id),t.texture=null),t.material&&(r.remove(3,t.material.id),t.material=null),t.loadingAbortController&&(t.loadingAbortController.abort(),t.loadingAbortController=null),t.loadingPromise=null,t.image=null,t.pixelData=null)},t.prototype._createStageObjects=function(e,t){var r=this.view._stage,i=this._images[e];i.texture&&(r.remove(4,i.texture.id),i.texture=null),t?(i.texture=new y(t,\"dynamicLayer\",{width:t.width,height:t.height,preMultiplyAlpha:!0,wrap:{s:33071,t:33071}}),r.add(4,i.texture)):i.material&&(r.remove(3,i.material.id),i.material=null),!i.material&&i.texture?(i.material=new f({transparent:!0,textureId:i.texture.id},\"dynamicLayer\"),r.add(3,i.material)):i.material&&t&&i.material.setParameterValues({textureId:i.texture.id});var a=this.view.basemapTerrain.overlayManager.renderer;if(i.material){var n=void 0,o=this._overlayExtents[e].renderLocalOrigin;if(0===e)n=d.createGeometryForExtent(i.renderExtent,-1);else{if(1!==e)return void console.error(\"DynamicLayerView3D._createStageObjects: Invalid extent idx\");var s=this._images[0].renderExtent;if(!s)return;n=d.createOuterImageGeometry(s,i.renderExtent,-1)}var l=new m(n);l.material=i.material,l.origin=o,a.addGeometries([l],this,2),i.rendergeometry&&a.removeGeometries([i.rendergeometry],this,2),i.rendergeometry=l}else i.rendergeometry&&(a.removeGeometries([i.rendergeometry],this,2),i.rendergeometry=null)},t.prototype._isScaleRangeLayer=function(){return\"minScale\"in this.layer&&\"maxScale\"in this.layer},t.prototype._isScaleRangeActive=function(){return!!this._isScaleRangeLayer()&&(this.layer.minScale>0||this.layer.maxScale>0)},t.prototype._clippedExtent=function(e,t){if(\"local\"!==this.view.viewingMode)return h.set(t,e);var r=this.view.basemapTerrain,i=r.extent;return r.ready&&i?h.intersection(e,i,t):h.set(t,e)},t.prototype._suspendedChangeHandler=function(){this.suspended?(this.clear(),this.emit(\"draped-data-change\")):this.refresh()},t.prototype._waitFetchReady=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return this.updateWhenStationary?[4,s.whenOnce(this.view,\"stationary\",e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},r.__decorate([l.property()],t.prototype,\"layer\",void 0),r.__decorate([l.property({dependsOn:[\"view.scale\",\"layer.minScale\",\"layer.maxScale\"]})],t.prototype,\"suspended\",void 0),r.__decorate([l.property({type:Boolean})],t.prototype,\"hasDraped\",void 0),r.__decorate([l.property({readOnly:!0})],t.prototype,\"fullExtentInLocalViewSpatialReference\",void 0),r.__decorate([l.property()],t.prototype,\"updating\",void 0),t=r.__decorate([l.subclass(\"esri.views.3d.layers.DynamicLayerView3D\")],t)}(v.RefreshableLayerView(c.LayerView3D(_))),b=h.create();return w}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"tslib\",\"@dojo/framework/shim/array\",\"../../../core/maybe\",\"../../../layers/support/fieldUtils\"],(function(e,i,t,l,s,d){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0}),i.getFetchPopupTemplate=i.getRequiredFields=void 0,i.getRequiredFields=function(e,i){return void 0===i&&(i=e.popupTemplate),t.__awaiter(this,void 0,void 0,(function(){var a,r,u,p,o,n,f,c,h;return t.__generator(this,(function(F){switch(F.label){case 0:return s.isSome(i)?[4,i.getRequiredFields(e.fields)]:[2,[]];case 1:return a=F.sent(),r=i.lastEditInfoEnabled,u=e.objectIdField,p=e.typeIdField,o=e.globalIdField,n=e.relationships,l.includes(a,\"*\")?[2,[\"*\"]]:r?[4,d.getFeatureEditFields(e)]:[3,3];case 2:return c=F.sent(),[3,4];case 3:c=[],F.label=4;case 4:return f=c,h=d.fixFields(e.fields,t.__spreadArrays(a,f)),p&&h.push(p),h&&u&&d.hasField(e.fields,u)&&-1===h.indexOf(u)&&h.push(u),h&&o&&d.hasField(e.fields,o)&&-1===h.indexOf(o)&&h.push(o),n&&n.forEach((function(i){var t=i.keyField;h&&t&&d.hasField(e.fields,t)&&-1===h.indexOf(t)&&h.push(t)})),[2,h]}}))}))},i.getFetchPopupTemplate=function(e,i){return e.popupTemplate?e.popupTemplate:s.isSome(i)&&i.defaultPopupTemplateEnabled&&s.isSome(e.defaultPopupTemplate)?e.defaultPopupTemplate:null}}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"../../../../geometry/support/aaBoundingRect\",\"../../webgl-engine/lib/GeometryData\",\"../../webgl-engine/lib/GeometryUtil\",\"../../webgl-engine/lib/Util\"],(function(t,e,r,a,n,i){\"use strict\";function o(t,e){var r=[[t[0],t[1],e],[t[2],t[1],e],[t[2],t[3],e],[t[0],t[3],e]];return n.createSquareGeometry(r)}Object.defineProperty(e,\"__esModule\",{value:!0}),e.createOuterImageGeometry=e.createGeometryForExtent=e.computeImageExportSize=void 0,e.computeImageExportSize=function(t,e,a){var n=r.width(t)/r.height(t),i={width:a,height:a};return n>1.0001?i.height=a/n:n<.9999&&(i.width=a*n),i.width=Math.round(i.width/(r.width(t)/r.width(e))),i.height=Math.round(i.height/(r.height(t)/r.height(e))),i},e.createGeometryForExtent=o,e.createOuterImageGeometry=function(t,e,n){if(!r.intersects(t,e))return o(e,n);for(var s=[t[1]-e[1],Math.min(t[3],e[3])-Math.max(t[1],e[1]),e[3]-t[3],123456],g=[t[0]-e[0],Math.min(t[2],e[2])-Math.max(t[0],e[0]),e[2]-t[2],123456],u=e[2]-e[0],m=e[3]-e[1],d=g[0]>0&&g[2]>0?3:2,w=s[0]>0&&s[2]>0?3:2,c=(w+1)*(d+1),l=new Float64Array(3*c),y=new Float32Array(2*c),x=new Uint32Array(6*(w*d-1)),A=0,f=0,v=0,M=0,O=0,p=0;p<4;p++){var G=s[p];if(!(G<=0)){for(var I=0,V=0;V<4;V++){var b=g[V];b<=0||(l[f++]=e[0]+I,l[f++]=e[1]+A,l[f++]=n,y[v++]=I/u,y[v++]=A/m,V<3&&p<3&&(1!==V||1!==p)&&(x[O++]=M,x[O++]=M+1,x[O++]=M+d+1,x[O++]=M+1,x[O++]=M+d+2,x[O++]=M+d+1),M++,I+=b)}A+=G}}var C={};C[i.VertexAttrConstants.POSITION]={size:3,data:l},C[i.VertexAttrConstants.NORMAL]={size:3,data:h},C[i.VertexAttrConstants.UV0]={size:2,data:y};for(var U={},z=new Uint32Array(x.length),F=0;F