/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../../chunks/_rollupPluginBabelHelpers","../../../chunks/tslib.es6","../../../core/Error","../../../core/Logger","../../../core/accessorSupport/ensureType","../../../core/arrayUtils","../../../core/has","../../../core/accessorSupport/set","../../../core/accessorSupport/decorators/subclass","../../../geometry/Extent","./DynamicLayerView3D","../../layers/WMSLayerView"],(function(e,t,r,i,s,n,a,o,c,u,h,p){"use strict";let l=function(t){function i(){var e;return(e=t.apply(this,arguments)||this).type="wms-3d",e}e._inheritsLoose(i,t);var s=i.prototype;return s.initialize=function(){this.layer.serviceSupportsSpatialReference(this.view.spatialReference)||this.addResolvingPromise(Promise.reject(new r("layerview:spatial-reference-incompatible","The spatial references supported by this WMS layer are incompatible with the spatial reference of the view"))),this.updatingHandles.add((()=>{var e;return null==(e=this.exportImageParameters)?void 0:e.version}),(()=>{this.updatingHandles.addPromise(this.refreshDebounced())}))},s.createFetchPopupFeaturesQuery=function(e){const t=this.findExtentInfoAt(e),r=t.extent,i=new u(r[0],r[1],r[2],r[3],this._spatialReference),s=t.imageSize,n=s.width,a=s.height,o=i.width/n;return{extent:i,width:n,height:a,x:Math.round((e.x-i.xmin)/o),y:Math.round((i.ymax-e.y)/o)}},s.getFetchOptions=function(){return{timeExtent:this.timeExtent}},i}(p(h));l=t.__decorate([c.subclass("esri.views.3d.layers.WMSLayerView3D")],l);return l}));
