12345 |
- /*
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
- See https://js.arcgis.com/4.25/esri/copyright.txt for details.
- */
- import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../Graphic.js";import{rasterRendererTypes as r,websceneRasterRendererTypes as i,read as s}from"../../rasterRenderers.js";import n from"../../request.js";import o from"../../core/Error.js";import{strict as a}from"../../core/jsonMap.js";import{clone as l}from"../../core/lang.js";import u from"../../core/Logger.js";import{isSome as p,isNone as c,unwrap as m}from"../../core/maybe.js";import{watch as d}from"../../core/reactiveUtils.js";import{urlToObject as h}from"../../core/urlUtils.js";import{property as f,ensureRange as y}from"../../core/accessorSupport/decorators/property.js";import{Integer as g,ensureClass as R,ensureNumber as S}from"../../core/accessorSupport/ensureType.js";import{reader as v}from"../../core/accessorSupport/decorators/reader.js";import{subclass as b}from"../../core/accessorSupport/decorators/subclass.js";import{writer as I}from"../../core/accessorSupport/decorators/writer.js";import{opacity as x,url as w}from"../support/commonProperties.js";import _ from"../support/DimensionalDefinition.js";import{ExportImageServiceParameters as F}from"../support/ExportImageServiceParameters.js";import D from"../support/Field.js";import j from"../support/FieldsIndex.js";import{isSupportedRendererType as T}from"../support/imageryRendererUtils.js";import P from"../support/MosaicRule.js";import N from"../support/MultidimensionalSubset.js";import O from"../support/PixelBlock.js";import{interpolationKebab as C,noDataInterpretationKebab as M}from"../support/rasterEnums.js";import J from"../support/RasterFunction.js";import q from"../support/RasterInfo.js";import V from"../support/RasterJobHandler.js";import{hasExcludedVariableOrDimension as E,getSubsetVariablesFromMdInfo as A,getDefaultMultidimensionalDefinition as Q}from"../support/rasterDatasets/multidimensionalUtils.js";import{decode as H,getFormat as U}from"../support/rasterFormats/RasterCodec.js";import{uvComponentToVector as z}from"../support/rasterFunctions/vectorFieldUtils.js";import{getSupportedRendererTypes as L,getDefaultBandCombination as B,createDefaultRenderer as k,normalizeRendererJSON as G}from"../../renderers/support/rasterRendererHelper.js";import W from"../../renderers/support/RasterSymbolizer.js";import{computeAngles as K,computePixelSpaceLocations as X,computeHistograms as $,computeStatisticsHistograms as Y,getImageSpatialReferenceQueryParameter as Z,getSamples as ee,identify as te}from"../../rest/imageService.js";import"../../core/has.js";import"../support/source/DataLayerSource.js";import{executeQueryJSON as re}from"../../rest/query/executeQueryJSON.js";import"../../config.js";import"../../kernel.js";import"../../core/unitUtils.js";import"../../geometry/support/spatialReferenceUtils.js";import"../graphics/featureConversionUtils.js";import ie from"../../geometry/Extent.js";import"../../geometry/Geometry.js";import"../../geometry/Multipoint.js";import"../../geometry/Point.js";import se from"../../geometry/Polygon.js";import"../../geometry/Polyline.js";import"../../geometry/support/normalizeUtils.js";import"../../core/pbf.js";import ne from"../../rest/support/FeatureSet.js";import oe from"../../rest/support/Query.js";import"../../rest/query/support/AttachmentInfo.js";import"../../rest/support/AttachmentQuery.js";import{executeForCount as ae}from"../../rest/query/executeForCount.js";import{executeForIds as le}from"../../rest/query/executeForIds.js";import"../../rest/support/RelationshipQuery.js";import"../../rest/support/TopFeaturesQuery.js";import{fetchServiceRasterInfo as ue,generateRasterInfo as pe}from"../../rest/imageService/fetchRasterInfo.js";import{getCatalogItemRasterInfo as ce}from"../../rest/imageService/getCatalogItemRasterInfo.js";import me from"../../rest/support/ImageAngleParameters.js";import de from"../../rest/support/ImageHistogramParameters.js";import he from"../../rest/support/ImageIdentifyParameters.js";import fe from"../../rest/support/ImagePixelLocationParameters.js";import ye from"../../rest/support/ImageSampleParameters.js";import{createFlowMesh as ge}from"../../views/2d/engine/flow/dataUtils.js";import Re from"../../geometry/SpatialReference.js";const Se=a()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"}),ve=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),be=y(S,{min:0,max:255});function Ie(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi)?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return t?t.join("/"):null}const xe=a=>{let y=class extends a{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this._rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new F({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||p(this.rasterFunctionInfos)&&this.rasterFunctionInfos.length<1||p(this.rasterFunctionInfos)&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replace(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,r){null!=e&&"lerc"!==this.format&&(t[r]=e)}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?P.fromJSON(t):null}get fieldsIndex(){return this.fields?new j(this.fields):null}set format(e){e&&ve.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t&&t.mosaicMethod&&(t=P.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const r=e||t.mosaicRule;return r?P.fromJSON(r):this._isMosaicRuleSupported(t)?P.fromJSON(t):null}writeMosaicRule(e,t,r){let i=this.mosaicRule;const s=this.definitionExpression;i?s&&s!==i.where&&(i=i.clone(),i.where=s):s&&(i=new P({where:s})),this._isValidCustomizedMosaicRule(i)&&(t[r]=i.toJSON())}get multidimensionalInfo(){return p(this.serviceRasterInfo)?this.serviceRasterInfo.multidimensionalInfo:null}writeNoData(e,t,r){null!=e&&"number"==typeof e&&(t[r]=be(e))}readObjectIdField(e,t){if(!e){const r=t.fields.filter((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=r&&r[0]&&r[0].name}return e}get parsedUrl(){return h(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer,n=s(i,r);return null==n?null:("vector-field"===n.type&&t.symbolTileSize&&!i.symbolTileSize&&(n.symbolTileSize=t.symbolTileSize),T(n)||u.getLogger(this.declaredClass).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),n)}writeRenderer(e,t,r){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this._rasterAttributeTableFieldPrefix||"Raster.",t=new D({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new D({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new D({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let s=this.fields?l(this.fields):[];s.push(r),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&s.push(t),this.version>=10.4&&p(this.rasterFunctionInfos)&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&s.push(i),p(this.rasterFunctionInfos)&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{s.push(new D({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(s.push(new D({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),s.push(new D({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:n}=this.rasterInfo??{};if(p(n)){const t=n.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const r=l(t);return r.name=e+t.name,r}));s=s.concat(t)}return s}set renderingRule(e){let t=e;t&&t.rasterFunction&&(t=J.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("renderingRule",t)}readRenderingRule(e,t){const r=t.rasterFunctionInfos;return t.renderingRule||r&&r.length&&"None"!==r[0].name?this._isRFTJson(t.renderingRule)?J.fromJSON({rasterFunctionDefinition:t.renderingRule}):J.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}writeRenderingRule(e,t,r){const i=e.toJSON();i.rasterFunctionDefinition?t[r]=i.rasterFunctionDefinition:t[r]=i}readSpatialReference(e,t){const r=e||t.extent.spatialReference;return r?Re.fromJSON(r):null}readPixelType(e){return Se.fromJSON(e)||e}writePixelType(e,t,r){(c(this.serviceRasterInfo)||this.pixelType!==this.serviceRasterInfo.pixelType)&&(t[r]=Se.toJSON(e))}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),r}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let r=e;const{renderer:i,symbolizer:s,pixelFilter:n,bandIds:o}=this;if(!this._isPicture()&&i&&s&&!n){const n=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(i.toJSON()),a=this._rasterJobHandler.instance;if(a){n&&(s.bind(),await a.updateSymbolizer(s,t),this._cachedRendererJson=i.toJSON());const l=await a.symbolize({bandIds:o,...e},t);r={extent:e.extent,pixelBlock:l}}else r={extent:e.extent,pixelBlock:s.symbolize({bandIds:o,...e})}}return r}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new o("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=R(me,e).clone(),K(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new o("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=R(fe,e).clone(),X(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new o("imagery-layer:compute-histograms","this operation is not supported on the input image service");e=R(de,e).clone();const{raster:r,mosaicRule:i,renderingRule:s}=this;return s&&null==e.renderingRule&&(e.renderingRule=s),i&&null==e.mosaicRule&&(e.mosaicRule=i),r&&null==e.raster&&(e.raster=r),$(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new o("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");e=R(de,e).clone();const{raster:r,mosaicRule:i,renderingRule:s}=this;return s&&null==e.renderingRule&&(e.renderingRule=s),i&&null==e.mosaicRule&&(e.mosaicRule=i),r&&null==e.raster&&(e.raster=r),Y(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return p(t)?t.get(e):void 0}getFieldDomain(e,t){const r=this.getField(e);return r?r.domain:null}async fetchImage(e,t,r,i={}){if(null==e||null==t||null==r)throw new o("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this.generateRasterInfo(this.renderingRule,{signal:i.signal});e&&(this.rasterInfo=e)}const s=this.getExportImageServiceParameters(e,t,r,i.timeExtent);if(null==s){if(i.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,{imageOrCanvasElement:e}}const s=(this.bandIds?.length||this.rasterInfo?.bandCount)??0,n=t*r,o=this.rasterInfo?.pixelType??"unknown",a=[];for(let e=0;e<s;e++)a.push(O.createEmptyBand(o,n));return{pixelData:{pixelBlock:new O({width:t,height:r,pixels:a,mask:new Uint8Array(n),pixelType:o}),extent:e}}}const n={imageServiceParameters:s,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:i.requestAsImageElement&&!this.pixelFilter||!1,signal:i.signal};return this._requestArrayBuffer(n)}fetchKeyProperties(e){return n(S(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.renderingRule:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new o("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):n(S(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.renderingRule:null})}).then((e=>ne.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return ce(S(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await n(S(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),i=r&&r.ics;if(!i)return;let s=null;try{s=(await n(S(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!s||!s.spatialReference)return{ics:i,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?n(S(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=s.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[s]}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},u=n(S(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=5,c=(s.xmin+s.xmax)/2,m=(s.ymax-s.ymin)/(p+1),d=s.ymin+m,h=[];for(let n=0;n<p;n++)h.push({x:c,y:d+m*n});const f={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:h}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},y=n(S(this.parsedUrl)+"/project",{query:this._getQueryParams(f),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([o,u,y]);let R=g[0].ipxf;if(null==R){const e=i.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(R={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const v=ie.fromJSON(g[1]&&g[1].geometries&&g[1].geometries[0]);v&&(v.spatialReference=new Re({wkid:0,imageCoordinateSystem:i}));const b=g[2].geometries?g[2].geometries.filter((e=>null!=e&&null!=e.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],I=b.length;if(I<3)return{ics:i,icsToPixelTransform:R,icsExtent:v,northDirection:null};let x=0,w=0,_=0,F=0;for(let n=0;n<I;n++)x+=b[n].x,w+=b[n].y,_+=b[n].x*b[n].x,F+=b[n].x*b[n].y;const D=(I*F-x*w)/(I*_-x*x);let j=0;const T=b[p-1].x>b[0].x,P=b[p-1].y>b[0].y;return D===1/0?j=P?90:270:0===D?j=T?0:180:D>0?j=T?180*Math.atan(D)/Math.PI:180*Math.atan(D)/Math.PI+180:D<0&&(j=P?180+180*Math.atan(D)/Math.PI:360+180*Math.atan(D)/Math.PI),{ics:i,icsToPixelTransform:R,icsExtent:v,northDirection:j}}async generateRasterInfo(e,t){if(this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const r=Ie(e);if(!r)return null;if(this._functionRasterInfos[r])return this._functionRasterInfos[r];const i=this._generateRasterInfo(e,t);this._functionRasterInfos[r]=i;try{return await i}catch{return this._functionRasterInfos[r]=null,null}}getExportImageServiceParameters(e,t,r,i){e=e.clone().shiftCentralMeridian();const s=Z(e.spatialReference,S(this.parsedUrl));this.pixelType!==this.serviceRasterInfo?.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const n=this.exportImageServiceParameters.toJSON(),{bandIds:o,noData:a}=n;let{renderingRule:l}=n;const u=this.renderingRule?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(o?.length&&this._hasRenderingRule(this.renderingRule)&&!u&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:o}};if("Stretch"===l.rasterFunction)e.rasterFunctionArguments.Raster=l.rasterFunctionArguments.Raster,l.rasterFunctionArguments.Raster=e;else if("Colormap"===l.rasterFunction){const t=l.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,l.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=l,l=e;n.bandIds=void 0}else n.bandIds=o?.join(",");a instanceof Array&&a.length>0&&(n.noData=a.join(","));const m=this._serviceSupportsMosaicRule?this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,i):null;n.mosaicRule=p(m)?JSON.stringify(m):null;const{multidimensionalSubset:d}=this;if(d&&p(m)&&m.multidimensionalDefinition&&E(m.multidimensionalDefinition,d,!0))return null;n.renderingRule=this._getRenderingRuleString(J.fromJSON(l));const h={};if(i){const{start:e,end:t}=i.toJSON();let r;if(e&&t&&e===t?(h.time=""+e,r=[e]):null==e&&null==t||(h.time=`${e??"null"},${t??"null"}`,r=null!=e&&null!=t?[e,t]:[e??t]),r&&d){const e=d.dimensions.find((({name:e})=>"StdTime"===e));if(2===r.length&&e.extent.length){if(r[0]=Math.max(r[0],e.extent[0]),r[1]=Math.min(r[1],e.extent[1]??e.extent[0]),r[1]<r[0])return null;h.time=r.join()}const t=new _({variableName:"",dimensionName:"StdTime",isSlice:1===r.length,values:r});if(E([t],d,!0))return null}}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:s,imageSR:s,size:t+","+r,...n,...h}}async getSamples(e,t){if(!(await this._fetchCapabilities(t?.signal))?.operations.supportsGetSamples)throw new o("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=R(ye,e).clone();const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),ee(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new o("imagery-layer:query-rasters","query operation is not supported on the input image service");e=R(he,e).clone();const{raster:r,mosaicRule:i,renderingRule:s}=this;if(s&&null==e.renderingRule&&(e.renderingRule=s),i&&null==e.mosaicRule){const t=this._combineMosaicRuleWithTimeExtent(i,e.timeExtent);e.mosaicRule=m(t)}return r&&null==e.raster&&(e.raster=r),te(this.url,e,this._getRequestOptions(t))}createQuery(){const e=new oe;return e.outFields=["*"],e.returnGeometry=!0,e.where=this.definitionExpression||"1=1",e}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),re(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),le(this.url,e,t)}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),ae(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new o("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:r,returnDomainValues:i,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,l=null,u=null;const m="raster.servicepixelvalue",d=this._rasterFunctionNamesIndex;if(p(e.outFields)&&(a=e.outFields.some((e=>!e.toLowerCase().includes(m))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(m)&&e.length>m.length)).map((e=>{const t=e.slice(m.length+1);return[this._updateRenderingRulesFunctionName(t,d),t]}));l=t.map((e=>new J({functionName:e[0]}))),u=t.map((e=>e[1]));const{renderingRule:r}=this;0===l.length?r?.functionName?(l.push(r),u.push(r.functionName)):l=null:r?.functionName&&!l.some((e=>e.functionName===r.functionName))&&(l.push(r),u.push(r.functionName))}const h=c(e.outSpatialReference)||e.outSpatialReference.equals(this.spatialReference),f=e.timeExtent||this.timeExtent,y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,f),g=this._getQueryParams({geometry:e.geometry,timeExtent:f,mosaicRule:y,renderingRule:this.version<10.4?this.renderingRule:null,renderingRules:l,pixelSize:r,returnCatalogItems:a,returnGeometry:h,raster:this.raster,maxItemCount:s?1:null});delete g.f;const R=new he(g);try{await this.generateRasterInfo(this.renderingRule);const r=await te(this.url,R,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,o=null!=r.value&&r.value.toLowerCase().includes("nodata");if(!(a&&!h&&r?.catalogItems?.features.length&&(n||!o)))return this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s});const l=this.objectIdField||"ObjectId",c=r.catalogItems?.features??[],m=c.map((e=>e.attributes?.[l])),d=new oe({objectIds:m,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]}),f=await this.queryRasters(d);return f?.features?.length&&f.features.forEach((t=>{c.forEach((r=>{r.attributes[l]===t.attributes[l]&&(r.geometry=new se(t.geometry),p(e.outSpatialReference)&&(r.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s})}catch{throw new o("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=n(S(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),i=n(S(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),s=await Promise.all([r,i]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async createFlowMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createFlowMesh(e,t):ge(e.meshType,e.simulationSettings,e.flowData,p(t.signal)?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.multidimensionalInfo;return A(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=p(this.serviceRasterInfo)?Promise.resolve(this.serviceRasterInfo):ue(S(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),e))),i=this._hasRenderingRule(this.renderingRule)?this.generateRasterInfo(this.renderingRule,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([r,i,s]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),u.getLogger(this.declaredClass).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles([d((()=>this.renderingRule),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this.generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;t&&p(t.multidimensionalInfo)&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const r=this.timeInfo;if(c(e)||c(this.multidimensionalInfo)||c(t)||c(r?.startField))return e;const{startField:i}=r,s=this.multidimensionalInfo.variables.some((e=>e.dimensions.some((e=>e.name===i))))?i:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==s)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const n=e.multidimensionalDefinition.filter((e=>e.dimensionName===s)),o=p(t.start)?t.start.getTime():null,a=p(t.end)?t.end.getTime():null,l=null==o||null==a||o===a,u=l?[o||a]:[[o,a]],m=this.version>=10.8;if(n.length)n.forEach((e=>{e.dimensionName===s&&(m?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=l,e.values=u))}));else if(!m){const t=e.multidimensionalDefinition.filter((e=>null!=e.variableName&&null==e.dimensionName));t.length?t.forEach((e=>{e.dimensionName=s,e.isSlice=l,e.values=u})):e.multidimensionalDefinition.push(new _({variableName:"",dimensionName:s,isSlice:l,values:u}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return c(e)?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new o("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=p(e)?R(oe,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new V;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_isSupportedRenderer(e){const{rasterInfo:t,renderingRule:r}=this;return"unique-value"===e.type&&this._hasRenderingRule(r)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&L(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:r,ssl:i}=await n(S(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,i&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new o("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),r=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||r}_isVectorFieldResampleFunction(e){if(c(e))return!1;const{functionName:t,functionArguments:r}=e,i="resample"===t?.toLowerCase(),s=r?.ResampleType||r?.resampleType;return i&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){if(!this._isPicture()&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&this.rasterInfo&&this.rasterInfo.bandCount>=3){const e=B(this.rasterInfo);!e||3===this.rasterInfo.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=k(this.rasterInfo,{bandIds:this.bandIds,variableName:this.renderingRule?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=G(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=this.rasterInfo):this.symbolizer=new W({rendererJSON:t,rasterInfo:this.rasterInfo}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:p(e.pixelBlock)?e.pixelBlock.clone():null}}_getQueryParams(e){e&&p(e.renderingRule)&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:r}=this;return{raster:t,viewId:r,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,r){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):H(e,t,r)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;return(await n(S(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e})).data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,signal:i}=e;if(r&&this._canRequestImageElement(t.format)){return{imageOrCanvasElement:(await n(S(this.parsedUrl)+"/exportImage",{responseType:"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:i})).data,params:t}}const s=this._initJobHandler(),a=n(S(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:i}),l=(await Promise.all([a,s]))[0].data,u=t.format||"jpgpng";let p=u;if("bsq"!==p&&"bip"!==p&&(p=U(l)),!p)throw new o("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(l)));const c={signal:i},m="gif"===u||"bmp"===u||u.includes("png")&&("png"===p||"jpg"===p)?H(l,{useCanvas:!0,...t},c):this._decodePixelBlock(l,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:u},c);return{pixelData:{pixelBlock:await m,extent:t.extent},params:t}}_generateRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return pe(S(this.parsedUrl),e,r)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;const t=Q(e,{multidimensionalSubset:this.multidimensionalSubset});if(p(t)&&t.length>0){this.mosaicRule=this.mosaicRule||new P;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.renderingRule&&"none"!==this.renderingRule.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),(!e||e&&e.length<=0)&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,r){r=r||{};const i=e.value,{templateRRFunctionNames:s,showNoDataRecords:n,returnDomainValues:o,templateFields:a}=r,l=e.processedValues;let u=e.catalogItems&&e.catalogItems.features,c=e.properties&&e.properties.Values&&e.properties.Values.map((e=>e.replace(/ /gi,", ")))||[];const m=this.objectIdField||"ObjectId",d="string"==typeof i&&i.toLowerCase().includes("nodata"),h=[];if(i&&!u&&!d){const e={};e[m]=0;c=[i],u=[new t(this.fullExtent,null,e)]}if(!u)return[];let f,y,g;this._updateResponseFieldNames(u,a),d&&!n&&(u=[]);for(let t=0;t<u.length;t++){if(f=u[t],null!=i){if(y=c[t],g=this.renderingRule&&l&&l.length>0&&s&&s.length>0&&s.includes(this.renderingRule.functionName)?l[s.indexOf(this.renderingRule.functionName)]:i,"nodata"===y.toLowerCase()&&!n)continue;const e="Raster.ItemPixelValue",r="Raster.ServicePixelValue";f.attributes[e]=y,f.attributes[r]=g,this._updateFeatureWithMagDirValues(f,y);const o=this.fields&&this.fields.length>0;let a=this.renderingRule&&p(this.serviceRasterInfo?.attributeTable)?o?y:i:g;this.renderingRule||(a=o?y:i),this._updateFeatureWithRasterAttributeTableValues(f,a)}if(f.sourceLayer=f.layer=this,o&&this._updateFeatureWithDomainValues(f),s&&l&&s.length===l.length)for(let e=0;e<s.length;e++){const t="Raster.ServicePixelValue."+s[e];f.attributes[t]=l[e]}h.push(u[t])}return h}_updateFeatureWithRasterAttributeTableValues(e,t){const r=this.rasterInfo&&this.rasterInfo.attributeTable||this.serviceRasterInfo?.attributeTable;if(c(r))return;const{features:i,fields:s}=r,n=s.map((e=>e.name)).filter((e=>"value"===e.toLowerCase())),o=n&&n[0];if(!o)return;const a=i.filter((e=>e.attributes[o]===(null!=t?parseInt(t,10):null)));a&&a[0]&&s.forEach((t=>{const r=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[r]=a[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const r=t.split(/,\s*/).map((e=>parseFloat(e))),i=r.map((e=>[e])),s=r.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new O({height:1,width:1,pixelType:"f32",pixels:i,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new ie(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:z([n.pixels[0][0],n.pixels[1][0]]);e.attributes["Raster.Magnitude"]=o[0],e.attributes["Raster.Direction"]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const r=e.attributes[t.name];if(null!=r){const i=t.domain.codedValues.find((e=>e.code===r));i&&(e.attributes[t.name]=i.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const r=this.fieldsIndex;c(r)||e.forEach((e=>{if(e&&e.attributes)for(const i of t){const t=r.get(i)?.name;t&&t!==i&&(e.attributes[i]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(this._hasRenderingRule(e)){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRenderingRule(e){return null!=e&&null!=e.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const r=e.toLowerCase().replace(/ /gi,"_");return t.has(r)?t.get(r):e}_isRFTJson(e){return e&&e.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:r,advancedQueryCapabilities:i,maxRecordCount:s}=e,n=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!!(e.spatialReference||e.extent&&e.extent.spatialReference),l=t.includes("edit");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsMeasure:t.includes("mensuration")&&a,supportsDownload:t.includes("download"),supportsQuery:t.includes("catalog")&&e.fields&&e.fields.length>0,supportsGetSamples:r>=10.2&&n,supportsProject:r>=10.3&&n,supportsComputeStatisticsHistograms:r>=10.4&&n,supportsQueryBoundary:r>=10.6&&n,supportsCalculateVolume:r>=10.7&&o,supportsComputePixelLocation:r>=10.7&&t.includes("catalog"),supportsComputeAngles:r>=10.91,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!!i?.supportsStatistics,supportsOrderBy:!!i?.supportsOrderBy,supportsDistinct:!!i?.supportsDistinct,supportsPagination:!!i?.supportsPagination,supportsStandardizedQueriesOnly:!!i?.useStandardizedQueries,supportsPercentileStatistics:!!i?.supportsPercentileStatistics,supportsCentroid:!!i?.supportsReturningGeometryCentroid,supportsDistance:!!i?.supportsQueryWithDistance,supportsExtent:!!i?.supportsReturningQueryExtent,supportsGeometryProperties:!!i?.supportsReturningGeometryProperties,supportsHavingClause:!!i?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!i?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}}}};function S(e){return e?.path??""}return e([f()],y.prototype,"_functionRasterInfos",void 0),e([f()],y.prototype,"_rasterJobHandler",void 0),e([f()],y.prototype,"_cachedRendererJson",void 0),e([f({readOnly:!0})],y.prototype,"_serviceSupportsMosaicRule",void 0),e([v("_serviceSupportsMosaicRule",["currentVersion","fields"])],y.prototype,"readServiceSupportsMosaicRule",null),e([f()],y.prototype,"_rasterAttributeTableFieldPrefix",void 0),e([f({readOnly:!0})],y.prototype,"_rasterFunctionNamesIndex",null),e([f()],y.prototype,"adjustAspectRatio",void 0),e([f({type:[g],json:{write:!0}})],y.prototype,"bandIds",void 0),e([v("bandIds")],y.prototype,"readBandIds",null),e([f({readOnly:!0,json:{read:!1}})],y.prototype,"capabilities",void 0),e([v("service","capabilities",["capabilities","currentVersion","serviceDataType"])],y.prototype,"readCapabilities",null),e([f({type:Number})],y.prototype,"compressionQuality",void 0),e([I("compressionQuality")],y.prototype,"writeCompressionQuality",null),e([f({type:Number})],y.prototype,"compressionTolerance",void 0),e([I("compressionTolerance")],y.prototype,"writeCompressionTolerance",null),e([f({json:{read:{source:"copyrightText"}}})],y.prototype,"copyright",void 0),e([f({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],y.prototype,"defaultMosaicRule",void 0),e([v("defaultMosaicRule",["defaultMosaicMethod"])],y.prototype,"readDefaultMosaicRule",null),e([f({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],y.prototype,"definitionExpression",void 0),e([f({readOnly:!0,constructOnly:!0})],y.prototype,"exportImageServiceParameters",void 0),e([f()],y.prototype,"rasterInfo",void 0),e([f({readOnly:!0,type:[D]})],y.prototype,"fields",void 0),e([f({readOnly:!0})],y.prototype,"fieldsIndex",null),e([f({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],y.prototype,"format",null),e([v("service","format",["serviceDataType"])],y.prototype,"readFormat",null),e([f({type:ie})],y.prototype,"fullExtent",void 0),e([f({readOnly:!0})],y.prototype,"hasMultidimensions",void 0),e([f({json:{read:{source:"maxImageHeight"}}})],y.prototype,"imageMaxHeight",void 0),e([f({json:{read:{source:"maxImageWidth"}}})],y.prototype,"imageMaxWidth",void 0),e([f({type:String,json:{type:C.jsonValues,read:C.read,write:C.write}})],y.prototype,"interpolation",void 0),e([f()],y.prototype,"minScale",void 0),e([v("service","minScale")],y.prototype,"readMinScale",null),e([f()],y.prototype,"maxScale",void 0),e([v("service","maxScale")],y.prototype,"readMaxScale",null),e([f({type:P})],y.prototype,"mosaicRule",null),e([v("mosaicRule",["mosaicRule","defaultMosaicMethod"])],y.prototype,"readMosaicRule",null),e([I("mosaicRule")],y.prototype,"writeMosaicRule",null),e([f()],y.prototype,"multidimensionalInfo",null),e([f({type:N,json:{write:!0}})],y.prototype,"multidimensionalSubset",void 0),e([f({json:{type:g}})],y.prototype,"noData",void 0),e([I("noData")],y.prototype,"writeNoData",null),e([f({type:String,json:{type:M.jsonValues,read:M.read,write:M.write}})],y.prototype,"noDataInterpretation",void 0),e([f({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],y.prototype,"objectIdField",void 0),e([v("objectIdField")],y.prototype,"readObjectIdField",null),e([f({})],y.prototype,"geometryType",void 0),e([f({})],y.prototype,"typeIdField",void 0),e([f({})],y.prototype,"types",void 0),e([f({readOnly:!0})],y.prototype,"parsedUrl",null),e([f({type:Function})],y.prototype,"pixelFilter",void 0),e([f()],y.prototype,"raster",void 0),e([f({readOnly:!0})],y.prototype,"sourceType",void 0),e([v("sourceType",["serviceSourceType","fields"])],y.prototype,"readSourceType",null),e([f()],y.prototype,"viewId",void 0),e([f({types:r,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:i,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],y.prototype,"renderer",null),e([v("renderer")],y.prototype,"readRenderer",null),e([I("renderer")],y.prototype,"writeRenderer",null),e([f()],y.prototype,"symbolizer",void 0),e([f(x)],y.prototype,"opacity",void 0),e([f({readOnly:!0})],y.prototype,"rasterFields",null),e([f({constructOnly:!0})],y.prototype,"rasterFunctionInfos",void 0),e([f({type:J})],y.prototype,"renderingRule",null),e([v("renderingRule",["renderingRule","rasterFunctionInfos"])],y.prototype,"readRenderingRule",null),e([I("renderingRule")],y.prototype,"writeRenderingRule",null),e([f()],y.prototype,"serviceDataType",void 0),e([f({readOnly:!0,type:Re})],y.prototype,"spatialReference",void 0),e([v("spatialReference",["spatialReference","extent"])],y.prototype,"readSpatialReference",null),e([f({json:{type:Se.jsonValues}})],y.prototype,"pixelType",void 0),e([v("pixelType")],y.prototype,"readPixelType",null),e([I("pixelType")],y.prototype,"writePixelType",null),e([f({constructOnly:!0,type:q})],y.prototype,"serviceRasterInfo",void 0),e([f()],y.prototype,"sourceJSON",void 0),e([f(w)],y.prototype,"url",void 0),e([f({readOnly:!0})],y.prototype,"version",void 0),e([v("version",["currentVersion","fields","timeInfo"])],y.prototype,"readVersion",null),y=e([b("esri.layers.mixins.ArcGISImageService")],y),y};export{xe as ArcGISImageService};
|