{"version":3,"sources":["webpack:///./node_modules/arcgis-js-api/views/3d/layers/DynamicLayerView3D.js","webpack:///./node_modules/arcgis-js-api/views/layers/WMSLayerView.js","webpack:///./node_modules/arcgis-js-api/views/3d/layers/WMSLayerView3D.js","webpack:///./node_modules/arcgis-js-api/views/3d/layers/support/overlayImageUtils.js","webpack:///./node_modules/arcgis-js-api/layers/support/ExportWMSImageParameters.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/layers/support/wmsUtils.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,2DAA2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,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-220dba40.554ec195.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\",\"../../core/Error\",\"../../core/promiseUtils\",\"../../core/accessorSupport/decorators\"],(function(e,t,r,o,i,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.WMSLayerView=void 0,t.WMSLayerView=function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.fetchPopupFeatures=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,u,s,a,p,c,h,f;return r.__generator(this,(function(r){if(t=this.layer,!e)return[2,i.reject(new o(\"wmslayerview:fetchPopupFeatures\",\"Nothing to fetch without area\",{layer:t}))];if(!(n=t.popupEnabled))return[2,i.reject(new o(\"wmslayerview:fetchPopupFeatures\",\"popupEnabled should be true\",{popupEnabled:n}))];if(u=this.createFetchPopupFeaturesQuery(e),s=u.extent,a=u.width,p=u.height,c=u.x,h=u.y,!(s&&a&&p))throw new o(\"wmslayerview:fetchPopupFeatures\",\"WMSLayer does not support fetching features.\",{extent:s,width:a,height:p});return[2,(f=t.fetchFeatureInfo(s,a,p,c,h))?f.then((function(e){return[e]})):i.resolve([])]}))}))},r.__decorate([n.property()],t.prototype,\"layer\",void 0),t=r.__decorate([n.subclass(\"esri.layers.mixins.WMSLayerView\")],t)}(e)}}));","// 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/Error\",\"../../../core/promiseUtils\",\"../../../core/accessorSupport/decorators\",\"../../../geometry/Extent\",\"../../../layers/support/ExportWMSImageParameters\",\"./DynamicLayerView3D\",\"../../layers/WMSLayerView\"],(function(e,t,r,a,i,s,n,o,p,c){\"use strict\";return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.initialize=function(){var e=this;this.layer.supportsSpatialReference(this.view.spatialReference)||this.addResolvingPromise(i.reject(new a(\"layerview:spatial-reference-incompatible\",\"The spatial references supported by this WMS layer are incompatible with the spatial reference of the view\")));var t=this.layer,r=this.view;this._exportWMSImageParameters=new o({layer:t,view:r}),this.updatingHandles.add(this._exportWMSImageParameters,\"version\",(function(){e.updatingHandles.addPromise(e.refreshDebounced())}))},t.prototype.destroy=function(){this._exportWMSImageParameters&&(this._exportWMSImageParameters.layer=null,this._exportWMSImageParameters.destroy(),this._exportWMSImageParameters=null)},t.prototype.createFetchPopupFeaturesQuery=function(e){var t=this.findExtentInfoAt(e),r=t.extent,a=new n(r[0],r[1],r[2],r[3],t.spatialReference),i=t.imageSize,s=i.width,o=i.height,p=a.width/s;return{extent:a,width:s,height:o,x:Math.round((e.x-a.xmin)/p),y:Math.round((a.ymax-e.y)/p)}},t.prototype.getFetchOptions=function(){return{timeExtent:this._exportWMSImageParameters.timeExtent}},r.__decorate([s.property({dependsOn:[\"view.spatialReference\",\"layer.spatialReferences\"]})],t.prototype,\"suspended\",void 0),t=r.__decorate([s.subclass(\"esri.views.3d.layers.WMSLayerView3D\")],t)}(c.WMSLayerView(p))}));","// 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=s))&&(i?i.forEach(a):n.unshift(e))};return null==t||t.forEach(a),n},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,\"wkid\",{get:function(){var e=this.extent,r=this.layer.spatialReferences,t=e.spatialReference&&e.spatialReference.wkid;r&&-1===r.indexOf(t)&&e.spatialReference.latestWkid&&(t=e.spatialReference.latestWkid);var n=p.some((function(e){return e===t}));if(!r)return t;if(n){var a=[];r.forEach((function(e){p.indexOf(e)>-1&&a.push(e)})),a.length||r.forEach((function(e){c.indexOf(e)>-1&&a.push(e)})),t=a.length>0?a[0]:p[0]}return t},enumerable:!1,configurable:!0}),r.prototype.toJSON=function(){var e=this.extent,r=this.layer,n=this.layers,a=r.imageFormat,s=r.imageTransparency,i=r.spatialReferences,l=r.version,p=this.wkid;i&&-1===i.indexOf(p)&&e.spatialReference.latestWkid&&(p=e.spatialReference.latestWkid);var c=e.xmin,u=e.ymin,y=e.xmax,d=e.ymax,f={bbox:\"1.3.0\"===r.version&&o.coordsReversed(p)?u+\",\"+c+\",\"+d+\",\"+y:c+\",\"+u+\",\"+y+\",\"+d,format:a,request:\"GetMap\",service:\"WMS\",styles:\"\",transparent:s,version:l};return isNaN(p)||(\"1.3.0\"===l?f.crs=\"EPSG:\"+p:f.srs=\"EPSG:\"+p),t.__assign(t.__assign({},f),{layers:n})},t.__decorate([s.property()],r.prototype,\"extent\",void 0),t.__decorate([s.property()],r.prototype,\"layer\",null),t.__decorate([s.property({readOnly:!0,dependsOn:[\"visibleSublayers\"]})],r.prototype,\"layers\",null),t.__decorate([s.property({type:Number,dependsOn:[\"view.scale\"]})],r.prototype,\"scale\",null),t.__decorate([s.property(i.combinedViewLayerTimeExtentProperty)],r.prototype,\"timeExtent\",void 0),t.__decorate([s.property({type:Number,dependsOn:[\"layers\",\"layer.imageTransparency\",\"timeExtent\"],readOnly:!0})],r.prototype,\"version\",null),t.__decorate([s.property()],r.prototype,\"view\",void 0),t.__decorate([s.property({readOnly:!0,dependsOn:[\"layer.sublayers\",\"scale\"]})],r.prototype,\"visibleSublayers\",null),t.__decorate([s.property()],r.prototype,\"wkid\",null),r=t.__decorate([s.subclass(\"esri.layers.support.ExportWMSImageParameters\")],r)}(n)}));","// 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/shaderLibrary/Slice.glsl\",\"../core/shaderLibrary/Transform.glsl\",\"../core/shaderLibrary/util/AlphaDiscard.glsl\",\"../core/shaderModules/interfaces\",\"../core/shaderModules/ShaderBuilder\"],(function(e,o,r,a,i,n,d,t){\"use strict\";var l,s;Object.defineProperty(o,\"__esModule\",{value:!0}),o.build=void 0,o.build=function(e){var o=new t.ShaderBuilder;return o.include(i.Transform,{linearDepth:!1}),o.vertex.uniforms.add(\"proj\",\"mat4\").add(\"view\",\"mat4\"),o.attributes.add(\"position\",\"vec3\"),o.attributes.add(\"uv0\",\"vec2\"),o.varyings.add(\"vpos\",\"vec3\"),o.vertex.uniforms.add(\"textureCoordinateScaleFactor\",\"vec2\"),o.vertex.code.add(d.glsl(l||(l=r.__makeTemplateObject([\"\\n void main(void) {\\n vpos = position;\\n vTexCoord = uv0 * textureCoordinateScaleFactor;\\n gl_Position = transformPosition(proj, view, vpos);\\n }\\n \"],[\"\\n void main(void) {\\n vpos = position;\\n vTexCoord = uv0 * textureCoordinateScaleFactor;\\n gl_Position = transformPosition(proj, view, vpos);\\n }\\n \"])))),o.include(a.Slice,e),o.fragment.uniforms.add(\"tex\",\"sampler2D\"),o.fragment.uniforms.add(\"opacity\",\"float\"),o.varyings.add(\"vTexCoord\",\"vec2\"),o.fragment.code.add(d.glsl(s||(s=r.__makeTemplateObject([\"\\n void main() {\\n discardBySlice(vpos);\\n gl_FragColor = texture2D(tex, vTexCoord) * opacity;\\n\\n if (gl_FragColor.a < \",\") {\\n discard;\\n }\\n\\n gl_FragColor = highlightSlice(gl_FragColor, vpos);\\n }\\n \"],[\"\\n void main() {\\n discardBySlice(vpos);\\n gl_FragColor = texture2D(tex, vTexCoord) * opacity;\\n\\n if (gl_FragColor.a < \",\") {\\n discard;\\n }\\n\\n gl_FragColor = highlightSlice(gl_FragColor, vpos);\\n }\\n \"])),d.glsl.float(n.defaultMaskAlphaCutoff))),o}}));","// 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\",\"../../../../core/promiseUtils\",\"../../../../geometry/support/webMercatorUtils\",\"../../../../portal/support/geometryServiceUtils\"],(function(e,t,r,o,l){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.toViewIfLocal=void 0,t.toViewIfLocal=function(e){var t=e.view.spatialReference,i=e.layer.fullExtent,n=i&&i.spatialReference;return n?n.equals(t)?r.resolve(i.clone()):o.canProject(n,t)?r.resolve(o.project(i,t)):e.view.state.isLocal?l.projectGeometry(i,t,e.layer.portalItem).then((function(t){return!e.destroyed&&t?t:void 0})).catch((function(){return null})):r.resolve(null):r.resolve(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\",\"../../core/Error\",\"../../core/urlUtils\",\"../../geometry/Extent\",\"../../geometry/SpatialReference\"],(function(e,t,n,r,i,a){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.toISOString=t.fromISODuration=t.isTimeDimension=t.isGenericDimension=t.isElevationDimension=t.isDimensionInterval=t.getPopupLayers=t.coordsReversed=t.parseCapabilities=void 0;var u=[[4001,4999],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3416,3416],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]],o={84:4326,83:4269,27:4267};function l(e){return u.some((function(t){var n=t[0],r=t[1];return e>=n&&e<=r}))}function s(e,t,n){var r;return null!==(r=t.getAttribute(e))&&void 0!==r?r:n}function f(e,t){for(var n=0;n-1?\"SRS\":\"CRS\";return Array.prototype.slice.call(e.childNodes).forEach((function(e){if(\"Name\"===e.nodeName)r.name=e.textContent||\"\";else if(\"Title\"===e.nodeName)r.title=e.textContent||\"\";else if(\"Abstract\"===e.nodeName)r.description=e.textContent||\"\";else if(\"BoundingBox\"===e.nodeName){var i=e.getAttribute(g);if(i&&0===i.indexOf(\"EPSG:\"))0===(u=parseInt(i.substring(5),10))||isNaN(u)||v||(v=\"1.3.0\"===t?d(e,u,l(u)):d(e,u));var a=i&&i.indexOf(\":\");if(a&&a>-1){var u;0===(u=parseInt(i.substring(a+1,i.length),10))||isNaN(u)||(u=o[u]?o[u]:u);var s=\"1.3.0\"===t?d(e,u,l(u)):d(e,u);r.fullExtents.push(s)}}else if(e.nodeName===g){e.textContent.split(\" \").forEach((function(e){0===(e=e.indexOf(\":\")>-1?parseInt(e.split(\":\")[1],10):parseInt(e,10))||isNaN(e)||(o[e]&&(e=o[e]),-1===r.spatialReferences.indexOf(e)&&r.spatialReferences.push(e))}))}else if(\"Style\"!==e.nodeName||r.legendURL){if(\"Layer\"===e.nodeName){var m=x(e,t,n);m&&(m.parentLayerId=r.id,r.sublayers||(r.sublayers=[]),r.sublayers.push(m))}}else{var c=f(\"LegendURL\",e);if(c){var p=f(\"OnlineResource\",c);p&&(r.legendURL=p.getAttribute(\"xlink:href\"))}}})),r.extent=null==v?void 0:v.toJSON(),r.dimensions=m(\"Dimension\",e).filter((function(e){return e.getAttribute(\"name\")&&e.getAttribute(\"units\")&&e.textContent})).map((function(e){var t=e.getAttribute(\"name\"),n=e.getAttribute(\"units\"),r=e.textContent,i=e.getAttribute(\"unitSymbol\"),a=e.getAttribute(\"default\"),u=\"0\"!==s(\"default\",e,\"0\"),o=\"0\"!==s(\"nearestValue\",e,\"0\"),l=\"0\"!==s(\"current\",e,\"0\");return/^time$/i.test(t)&&/^ISO8601$/i.test(n)?{name:\"time\",units:\"ISO8601\",extent:A(r),default:A(a),multipleValues:u,nearestValue:o,current:l}:/^elevation$/i.test(t)?{name:\"elevation\",units:n,extent:b(r),unitSymbol:i,default:b(a),multipleValues:u,nearestValue:o}:{name:t,units:n,extent:y(r),unitSymbol:i,default:y(a),multipleValues:u,nearestValue:o}})),r}function g(e){return e.nodeType===Node.ELEMENT_NODE}function N(e){return\"time\"===e.name}function b(e){if(!e)return null;var t=-1!==e.indexOf(\"/\"),n=e.split(\",\");return t?n.map((function(e){var t=e.split(\"/\");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&\"0\"!==t[2]?parseFloat(t[2]):void 0}})).filter((function(e){return e})):n.map((function(e){return parseFloat(e)}))}function y(e){if(!e)return null;var t=-1!==e.indexOf(\"/\"),n=e.split(\",\");return t?n.map((function(e){var t=e.split(\"/\");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&\"0\"!==t[2]?t[2]:void 0}})).filter((function(e){return e})):n}function A(e){if(!e)return null;var t=-1!==e.indexOf(\"/\"),n=e.split(\",\");return t?n.map((function(e){var t=e.split(\"/\");return t.length<2?null:{min:new Date(t[0]),max:new Date(t[1]),resolution:t.length>=3&&\"0\"!==t[2]?E(t[2]):void 0}})).filter((function(e){return e})):n.map((function(e){return new Date(e)}))}function E(e){var t=e.match(/(?:p(\\d+y|\\d+(?:.|,)\\d+y)?(\\d+m|\\d+(?:.|,)\\d+m)?(\\d+d|\\d+(?:.|,)\\d+d)?)?(?:t(\\d+h|\\d+(?:.|,)\\d+h)?(\\d+m|\\d+(?:.|,)\\d+m)?(\\d+s|\\d+(?:.|,)\\d+s)?)?/i);return t?{years:S(t[1]),months:S(t[2]),days:S(t[3]),hours:S(t[4]),minutes:S(t[5]),seconds:S(t[6])}:null}function S(e){if(!e)return 0;var t=e.match(/(?:\\d+(?:.|,)\\d+|\\d+)/);if(!t)return 0;var n=t[0].replace(\",\",\".\");return Number(n)}t.parseCapabilities=function(e){if(!e)return null;var t={idCounter:-1};\"string\"==typeof e&&(e=(new DOMParser).parseFromString(e,\"text/xml\"));var r=e.documentElement;if(\"ServiceExceptionReport\"===r.nodeName){var a=Array.prototype.slice.call(r.childNodes).map((function(e){return e.textContent})).join(\"\\r\\n\");throw new n(\"wmslayer:wms-capabilities-xml-is-not-valid\",\"The server returned errors when the WMS capabilities were requested.\",a)}var u=f(\"Capability\",r),o=f(\"Service\",r),l=f(\"Request\",u);if(!u||!o||!l)return null;var s=f(\"Layer\",u);if(!s)return null;var m,d,h,g,b=\"WMS_Capabilities\"===r.nodeName||\"WMT_MS_Capabilities\"===r.nodeName?r.getAttribute(\"version\"):\"1.3.0\",y=c(\"Title\",o,\"\")||c(\"Name\",o,\"\"),A=c(\"AccessConstraints\",o,\"\"),E=c(\"Abstract\",o,\"\"),S=parseInt(c(\"MaxWidth\",o,\"5000\"),10),I=parseInt(c(\"MaxHeight\",o,\"5000\"),10),O=v(l,\"GetMap\"),L=p(l,\"GetMap\"),M=x(s,b,t),F=0;if(Array.prototype.slice.call(u.childNodes).forEach((function(e){\"Layer\"===e.nodeName&&(0===F?m=e:1===F?(M.name&&(M.name=\"\",M.sublayers.push(x(m,b,t))),M.sublayers.push(x(e,b,t))):M.sublayers.push(x(e,b,t)),F++)})),!M)return null;var w=M.fullExtents;if((d=M.sublayers)||(d=[]),0===d.length&&d.push(M),!(h=M.extent)){var T=new i(d[0].extent);M.extent=T.toJSON(),h=M.extent}if(!(g=M.spatialReferences).length&&d.length>0){var C=function(e){var t=[];return e.sublayers.forEach((function(e){!t.length&&e.spatialReferences.length&&(t=e.spatialReferences||C(e))})),t};d.forEach((function(e){g.length||(g=e.spatialReferences||C(e))}))}var R,D=p(l,\"GetFeatureInfo\");if(D){var V=v(l,\"GetFeatureInfo\");V.indexOf(\"text/html\")>-1?R=\"text/html\":V.indexOf(\"text/plain\")>-1&&(R=\"text/plain\")}if(!R){var _=function(e){e&&(e.queryable=!1,e.sublayers&&e.sublayers.forEach((function(e){_(e)})))};_(M)}var U=function e(t){var n=[];return t.forEach((function(t){n.push(t),t.sublayers&&t.sublayers.length&&(n=n.concat(e(t.sublayers)),delete t.sublayers)})),n}(d),q=M.minScale||0,B=M.maxScale||0,G=M.dimensions,P=U.reduce((function(e,t){return e.concat(t.dimensions)}),[]),X=G.concat(P).filter(N),k=null;if(X.length>0){var j=Number.POSITIVE_INFINITY,W=Number.NEGATIVE_INFINITY;X.forEach((function(e){var t,n=e.extent;t=n,Array.isArray(t)&&t.length>0&&t[0]instanceof Date?n.forEach((function(e){j=Math.min(j,e.getTime()),W=Math.max(W,e.getTime())})):n.forEach((function(e){j=Math.min(j,e.min.getTime()),W=Math.max(W,e.max.getTime())}))})),k={startTimeField:null,endTimeField:null,trackIdField:null,timeExtent:[j,W]}}return{copyright:A,description:E,dimensions:G,extent:h,fullExtents:w,featureInfoFormat:R,featureInfoUrl:D,mapUrl:L,maxImageWidth:S,maxImageHeight:I,maxScale:B,minScale:q,layers:U,spatialReferences:g,supportedImageFormatTypes:O,timeInfo:k,title:y,version:b}},t.coordsReversed=l,t.getPopupLayers=function(e){return e.length?e.filter((function(e){return e.popupEnabled&&e.name&&e.queryable})).map((function(e){return e.name})).join(\",\"):\"\"},t.isDimensionInterval=function(e){return void 0!==e.min&&void 0!==e.max},t.isElevationDimension=function(e){return\"elevation\"===e.name},t.isGenericDimension=function(e){return\"time\"!==e.name&&\"elevation\"!==e.name},t.isTimeDimension=N,t.fromISODuration=E,t.toISOString=function(e){return e.toISOString().replace(/\\.[0-9]{3}/,\"\")}}));","// 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/shaderLibrary/Slice.glsl\",\"../core/shaderLibrary/util/View.glsl\",\"../core/shaderTechnique/ReloadableShaderModule\",\"../core/shaderTechnique/ShaderTechnique\",\"../core/shaderTechnique/ShaderTechniqueConfiguration\",\"../lib/DefaultVertexAttributeLocations\",\"../lib/StencilUtils\",\"./ImageMaterial.glsl\",\"../../../webgl/Program\",\"../../../webgl/renderState\",\"../../../webgl/renderState\",\"@dojo/framework/shim/Promise\"],(function(e,t,r,i,a,o,n,l,c,s,u,d,p,h){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.ImageMaterialTechniqueConfiguration=t.ImageMaterialTechnique=void 0;var g=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.initializeProgram=function(e){var t=n.shader.get(),r=this.configuration,i=t.build({slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:r.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1});return new d(e.rctx,i.generateSource(\"vertex\"),i.generateSource(\"fragment\"),c.Default3D)},n.prototype.bindPass=function(e,t,r){a.View.bindProjectionMatrix(this.program,r.camera.projectionMatrix),this.program.setUniform1f(\"opacity\",t.opacity)},n.prototype.bindDraw=function(e){a.View.bindView(this.program,e),i.Slice.bindUniformsWithOrigin(this.program,this.configuration,e)},n.prototype.initializePipeline=function(){var e=this.configuration,t=0===e.output&&e.transparent?p.simpleBlendingParams(1,771):null,r=function(r){return h.makePipelineState({blending:t,polygonOffset:e.polygonOffset&&f,culling:(i=e.cullFace,0!==i&&{face:1===i?1028:1029,mode:2305}),depthTest:s.depthCompareLess,depthWrite:e.writeDepth&&h.defaultDepthWriteParams,colorWrite:h.defaultColorWriteParams,stencilWrite:e.sceneHasOcludees?s.stencilWriteMaskOn:null,stencilTest:e.sceneHasOcludees?r?s.stencilToolMaskBaseParams:s.stencilBaseAllZerosParams:null});var i};return this._occludeeState=r(!0),r(!1)},Object.defineProperty(n.prototype,\"opaqueOccludeeState\",{get:function(){return this._occludeeState},enumerable:!1,configurable:!0}),n.shader=new o.ReloadableShaderModule(u,(function(){return new Promise((function(t,r){e([\"./ImageMaterial.glsl\"],t,r)}))})),n}(n.ShaderTechnique);t.ImageMaterialTechnique=g;var f={factor:1,units:1},m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.output=0,t.cullFace=0,t.slicePlaneEnabled=!1,t.sliceHighlightDisabled=!1,t.transparent=!1,t.polygonOffset=!1,t.writeDepth=!0,t.sceneHasOcludees=!1,t}return r.__extends(t,e),r.__decorate([l.parameter({count:7})],t.prototype,\"output\",void 0),r.__decorate([l.parameter({count:3})],t.prototype,\"cullFace\",void 0),r.__decorate([l.parameter()],t.prototype,\"slicePlaneEnabled\",void 0),r.__decorate([l.parameter()],t.prototype,\"sliceHighlightDisabled\",void 0),r.__decorate([l.parameter()],t.prototype,\"transparent\",void 0),r.__decorate([l.parameter()],t.prototype,\"polygonOffset\",void 0),r.__decorate([l.parameter()],t.prototype,\"writeDepth\",void 0),r.__decorate([l.parameter()],t.prototype,\"sceneHasOcludees\",void 0),t}(l.ShaderTechniqueConfiguration);t.ImageMaterialTechniqueConfiguration=m}));","// 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\",\"../lib/GLMaterialTexture\",\"../lib/Material\",\"./internal/DefaultBufferWriter\",\"./internal/MaterialUtil\",\"./internal/MaterialUtil\",\"../shaders/ImageMaterialTechnique\"],(function(e,t,i,a,r,n,s,u,c){\"use strict\";var o=function(e){function t(t,i){var a=e.call(this,i)||this;return a.supportsEdges=!0,a.techniqueConfig=new c.ImageMaterialTechniqueConfiguration,a.params=u.copyParameters(t,p),a}return i.__extends(t,e),t.prototype.setParameterValues=function(e){s.updateParameters(this.params,e)&&this.parametersChanged()},t.prototype.getParameters=function(){return this.params},t.prototype.getTechniqueConfig=function(e){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.params.cullFace,this.techniqueConfig.slicePlaneEnabled=this.params.slicePlaneEnabled,this.techniqueConfig.transparent=this.params.transparent,this.techniqueConfig.writeDepth=this.params.writeDepth,this.techniqueConfig.sceneHasOcludees=this.params.sceneHasOcludees,this.techniqueConfig},t.prototype.intersect=function(e,t,i,a,r,n,s){u.intersectTriangleGeometry(e,t,a,r,n,void 0,s)},t.prototype.getGLMaterial=function(e){return 0===e.output||4===e.output?new h(e):void 0},t.prototype.createBufferWriter=function(){return new n.DefaultBufferWriter(n.PositionUVLayout)},t}(r.Material),h=function(e){function t(t){var a=e.call(this,i.__assign(i.__assign({},t),t.material.getParameters()))||this;return a.updateParameters(),a}return i.__extends(t,e),t.prototype.updateParameters=function(){var e=this.material.getParameters();this.updateTexture(e.textureId),this.technique=this.techniqueRep.acquireAndReleaseExisting(c.ImageMaterialTechnique,this.material.getTechniqueConfig(this.output),this.technique)},t.prototype.beginSlot=function(e){return 4===this.output?3===e:e===(this.technique.configuration.transparent?this.technique.configuration.writeDepth?5:8:3)},t.prototype._updateOccludeeState=function(e){e.hasOccludees!==this.material.getParameters().sceneHasOcludees&&(this.material.setParameterValues({sceneHasOcludees:e.hasOccludees}),this.updateParameters())},t.prototype.ensureParameters=function(e){0===this.output&&this._updateOccludeeState(e)},t.prototype.bind=function(e,t){e.bindProgram(this.technique.program),this.bindTexture(e,this.technique.program),this.bindTextureScale(e,this.technique.program),this.technique.bindPass(e,this.material.getParameters(),t)},t.prototype.getPipelineState=function(e,t){return t?this.technique.opaqueOccludeeState:this.technique.pipeline},t}(a),p={transparent:!1,writeDepth:!0,slicePlaneEnabled:!1,cullFace:0,sceneHasOcludees:!1,opacity:1,textureId:null,initTextureTransparent:!0};return o}));"],"sourceRoot":""}