ImageryLayer-UVN5SIK4.js 104 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538
  1. import {
  2. B,
  3. V,
  4. f as f3,
  5. i as i2,
  6. i2 as i3,
  7. i3 as i4,
  8. k as k2,
  9. l as l3,
  10. m2 as m3,
  11. n as n5,
  12. n2 as n6,
  13. o as o6,
  14. p as p3,
  15. te,
  16. u as u3
  17. } from "./chunk-4LBZICSO.js";
  18. import {
  19. P,
  20. R,
  21. S as S2,
  22. U as U2,
  23. _,
  24. f as f2,
  25. h,
  26. l as l4,
  27. p as p4
  28. } from "./chunk-ZBREIOZ2.js";
  29. import {
  30. u as u2,
  31. u2 as u4
  32. } from "./chunk-FUB4YNLX.js";
  33. import {
  34. u
  35. } from "./chunk-EE6TL7XD.js";
  36. import {
  37. n as n4,
  38. s as s5
  39. } from "./chunk-4JM5IOYA.js";
  40. import "./chunk-USORKAIZ.js";
  41. import "./chunk-7SW2GQFP.js";
  42. import "./chunk-TRK7CKWP.js";
  43. import "./chunk-EGVIPYN2.js";
  44. import {
  45. s as s4
  46. } from "./chunk-MTFA4FTA.js";
  47. import {
  48. e as e4,
  49. n as n3,
  50. o as o5
  51. } from "./chunk-YASLQAXE.js";
  52. import "./chunk-VEAEIBHK.js";
  53. import "./chunk-6SASJ6IM.js";
  54. import "./chunk-3OHML7FO.js";
  55. import "./chunk-Z64YKYHD.js";
  56. import {
  57. x
  58. } from "./chunk-2VFJVI2I.js";
  59. import "./chunk-GS2NUWMB.js";
  60. import "./chunk-FUEX356Y.js";
  61. import "./chunk-54AOZV5X.js";
  62. import "./chunk-PK35UGFJ.js";
  63. import "./chunk-7IKYLNB5.js";
  64. import {
  65. L
  66. } from "./chunk-P4UZNLD5.js";
  67. import "./chunk-FYNVVMWY.js";
  68. import "./chunk-Q52DVFYK.js";
  69. import "./chunk-HBMVUVZX.js";
  70. import "./chunk-TNLRDNTC.js";
  71. import {
  72. e as e3
  73. } from "./chunk-OSNKP4CI.js";
  74. import {
  75. a as a3
  76. } from "./chunk-435DJNTD.js";
  77. import "./chunk-T3EUPDKL.js";
  78. import "./chunk-2SJEIKRW.js";
  79. import "./chunk-PHRSJJ3U.js";
  80. import {
  81. p as p2
  82. } from "./chunk-6URTNEGN.js";
  83. import {
  84. o as o4
  85. } from "./chunk-6B2LQBKM.js";
  86. import {
  87. d as d4
  88. } from "./chunk-MFI6BALW.js";
  89. import {
  90. o as o3
  91. } from "./chunk-FUD7XO3N.js";
  92. import {
  93. j as j3
  94. } from "./chunk-6EU7GFUT.js";
  95. import "./chunk-MFUAILAT.js";
  96. import "./chunk-HZJYXMI6.js";
  97. import "./chunk-27P5ZSC7.js";
  98. import "./chunk-UPD4MTCL.js";
  99. import "./chunk-GRBROWI6.js";
  100. import "./chunk-5NKYXKIA.js";
  101. import {
  102. g
  103. } from "./chunk-RZFGRBD7.js";
  104. import {
  105. B as B2
  106. } from "./chunk-PUSPZYFZ.js";
  107. import "./chunk-EN7YGJWG.js";
  108. import "./chunk-VBNMTM7L.js";
  109. import "./chunk-3D3QEPRE.js";
  110. import "./chunk-JFNNSBWL.js";
  111. import {
  112. b
  113. } from "./chunk-UD63WBG3.js";
  114. import "./chunk-X7DBH4KK.js";
  115. import "./chunk-LY74KTXV.js";
  116. import "./chunk-EWE6EXPY.js";
  117. import {
  118. d as d3
  119. } from "./chunk-KMAHKQ2G.js";
  120. import "./chunk-522WBHUO.js";
  121. import "./chunk-WNCU6BFU.js";
  122. import "./chunk-PIGRDDRG.js";
  123. import {
  124. y
  125. } from "./chunk-BJHM4JNS.js";
  126. import "./chunk-F6A2QQ26.js";
  127. import "./chunk-EOSZHC5H.js";
  128. import "./chunk-C43UE3Z5.js";
  129. import "./chunk-H2KDMZTR.js";
  130. import {
  131. l as l2
  132. } from "./chunk-YIS6BAC3.js";
  133. import "./chunk-7XXXCK2A.js";
  134. import {
  135. r as r3
  136. } from "./chunk-7ZIDBK7B.js";
  137. import {
  138. v as v5
  139. } from "./chunk-KHA63LLS.js";
  140. import {
  141. c as c2
  142. } from "./chunk-FGKNEJKJ.js";
  143. import {
  144. c,
  145. f,
  146. p,
  147. w as w2
  148. } from "./chunk-PSV473TI.js";
  149. import {
  150. O
  151. } from "./chunk-I3OBGWNS.js";
  152. import "./chunk-FONIFA5N.js";
  153. import {
  154. y as y2
  155. } from "./chunk-EG5OI4V4.js";
  156. import "./chunk-65BYCSII.js";
  157. import "./chunk-WZQZRKNH.js";
  158. import "./chunk-LRDX4TO7.js";
  159. import "./chunk-6A4U74YA.js";
  160. import {
  161. n as n2
  162. } from "./chunk-CYI7KFYB.js";
  163. import {
  164. a as a2
  165. } from "./chunk-5LXROFTA.js";
  166. import "./chunk-GJXW4HL5.js";
  167. import "./chunk-WJW5DUN6.js";
  168. import {
  169. t as t2
  170. } from "./chunk-W72F6AS3.js";
  171. import "./chunk-PJ7ZQ4VD.js";
  172. import "./chunk-WDLTDV2L.js";
  173. import "./chunk-TERAW6FT.js";
  174. import "./chunk-N2663GRX.js";
  175. import "./chunk-O4FY3ITT.js";
  176. import "./chunk-WEMIK25H.js";
  177. import {
  178. b as b2
  179. } from "./chunk-4DDBH2K5.js";
  180. import "./chunk-7N4X6GF3.js";
  181. import "./chunk-JXW4QTJA.js";
  182. import {
  183. i
  184. } from "./chunk-UXF37FQ4.js";
  185. import "./chunk-ZOEK6QHJ.js";
  186. import "./chunk-XNLG7T2T.js";
  187. import "./chunk-IR4PV7VK.js";
  188. import {
  189. d as d2,
  190. v as v4
  191. } from "./chunk-2Z6LERTI.js";
  192. import {
  193. m as m2,
  194. v2 as v3
  195. } from "./chunk-OWVBLVP3.js";
  196. import "./chunk-AFZ7XSEW.js";
  197. import "./chunk-EGZW6HC3.js";
  198. import "./chunk-4NKD334K.js";
  199. import "./chunk-65K7LC56.js";
  200. import "./chunk-ATPLLI5W.js";
  201. import "./chunk-WJ3OEUD3.js";
  202. import "./chunk-MXB2XLKV.js";
  203. import "./chunk-XH7RUGVZ.js";
  204. import "./chunk-TBBTRX4O.js";
  205. import "./chunk-YBSUITLL.js";
  206. import "./chunk-ALDCDSPV.js";
  207. import "./chunk-DT6EAZQ5.js";
  208. import "./chunk-HNOZUNJ4.js";
  209. import {
  210. U
  211. } from "./chunk-VNFRAYHO.js";
  212. import "./chunk-R5IG2D6H.js";
  213. import {
  214. j as j2
  215. } from "./chunk-VBRY5KJM.js";
  216. import {
  217. o as o2
  218. } from "./chunk-PDKDCAAD.js";
  219. import {
  220. M2 as M,
  221. j2 as j,
  222. o
  223. } from "./chunk-ECW2QABR.js";
  224. import {
  225. s as s3
  226. } from "./chunk-GCDJLKH4.js";
  227. import {
  228. k2 as k,
  229. r as r2
  230. } from "./chunk-MRJEICT6.js";
  231. import {
  232. d,
  233. e,
  234. l3 as l,
  235. n2 as n,
  236. v as v2
  237. } from "./chunk-Y3WMVFTW.js";
  238. import "./chunk-SAS7RONY.js";
  239. import "./chunk-WSRBH7BF.js";
  240. import {
  241. S,
  242. a,
  243. v
  244. } from "./chunk-IHXECKQQ.js";
  245. import {
  246. $,
  247. w
  248. } from "./chunk-ULGDPLM2.js";
  249. import {
  250. s,
  251. s3 as s2
  252. } from "./chunk-EMJ4ZSM2.js";
  253. import {
  254. m
  255. } from "./chunk-IKP3YN53.js";
  256. import {
  257. e as e2,
  258. r,
  259. t
  260. } from "./chunk-GZT4BVFP.js";
  261. import "./chunk-A5ICIBVI.js";
  262. // node_modules/@arcgis/core/layers/support/RasterFunction.js
  263. var u5;
  264. var c3 = new Set(["raster", "raster2", "dem", "fillraster"]);
  265. var p5 = new Set(["rasters"]);
  266. var m4 = (t4) => t4 && t4.rasterFunction ? d5.fromJSON(t4) : t4;
  267. var f4 = (t4) => t4 && t4 instanceof d5 ? t4.toJSON() : t4;
  268. var l5 = (t4) => t4?.functionName && !t4.declaredClass;
  269. var y3 = (t4) => l5(t4) ? new d5(t4) : t4;
  270. var F = (t4) => {
  271. if (t4 == null)
  272. return null;
  273. t4 = m(t4);
  274. const r4 = {};
  275. for (const e6 of Object.keys(t4))
  276. c3.has(e6.toLowerCase()) ? r4[e6] = m4(t4[e6]) : p5.has(e6.toLowerCase()) && Array.isArray(t4[e6]) ? r4[e6] = t4[e6].map(m4) : r4[e6] = t4[e6];
  277. return r4;
  278. };
  279. var d5 = u5 = class extends l {
  280. constructor(t4) {
  281. super(t4), this.functionName = null, this.outputPixelType = "unknown", this.variableName = null, this.rasterFunctionDefinition = null;
  282. }
  283. set functionArguments(t4) {
  284. if (t4) {
  285. const r4 = Object.keys(t4);
  286. if (r4.some((r5) => c3.has(r5.toLowerCase()) && l5(t4[r5])) || r4.some((r5) => p5.has(r5.toLowerCase()) && Array.isArray(t4[r5]) && t4[r5].some((t5) => l5(t5)))) {
  287. t4 = m(t4);
  288. for (const e6 of r4)
  289. c3.has(e6.toLowerCase()) ? t4[e6] = y3(t4[e6]) : p5.has(e6.toLowerCase()) && Array.isArray(t4[e6]) && (t4[e6] = t4[e6].map((t5) => y3(t5)));
  290. }
  291. }
  292. this._set("functionArguments", t4);
  293. }
  294. readFunctionArguments(t4) {
  295. return F(t4);
  296. }
  297. writeFunctionArguments(t4, r4, e6) {
  298. const o7 = {};
  299. for (const n9 of Object.keys(t4))
  300. c3.has(n9.toLowerCase()) ? o7[n9] = f4(t4[n9]) : p5.has(n9.toLowerCase()) && Array.isArray(t4[n9]) ? o7[n9] = t4[n9].map(f4) : o7[n9] = f4(t4[n9]);
  301. r4[e6] = o7;
  302. }
  303. readFunctionName(t4, r4) {
  304. const e6 = r4.rasterFunctionInfos, o7 = r4.name;
  305. return o7 || (e6 && e6.length && e6[0].name !== "None" ? e6[0].name : r4.rasterFunctionDefinition ? r4.rasterFunctionDefinition.name : r4.rasterFunction);
  306. }
  307. clone() {
  308. return new u5({ functionName: this.functionName, functionArguments: m(this.functionArguments), outputPixelType: this.outputPixelType, variableName: this.variableName, rasterFunctionDefinition: m(this.rasterFunctionDefinition) });
  309. }
  310. };
  311. e([d({ json: { type: Object, name: "rasterFunctionArguments" } })], d5.prototype, "functionArguments", null), e([o("functionArguments")], d5.prototype, "readFunctionArguments", null), e([r2("functionArguments")], d5.prototype, "writeFunctionArguments", null), e([d({ json: { type: String, write: { target: "rasterFunction" } } })], d5.prototype, "functionName", void 0), e([o("functionName", ["rasterFunction", "rasterFunctionInfos", "rasterFunctionDefinition"])], d5.prototype, "readFunctionName", null), e([r3({ C128: "c128", C64: "c64", F32: "f32", F64: "f64", S16: "s16", S32: "s32", S8: "s8", U1: "u1", U16: "u16", U2: "u2", U32: "u32", U4: "u4", U8: "u8", UNKNOWN: "unknown" }, { ignoreUnknown: false }), d({ json: { default: "unknown" } })], d5.prototype, "outputPixelType", void 0), e([d({ type: String, json: { read: true, write: true } })], d5.prototype, "variableName", void 0), e([d({ type: Object, json: { name: "rasterFunctionDefinition" } })], d5.prototype, "rasterFunctionDefinition", void 0), d5 = u5 = e([n("esri.layers.support.RasterFunction")], d5);
  312. var w3 = d5;
  313. // node_modules/@arcgis/core/layers/support/rasterFunctionUtils.js
  314. var e5 = { StretchFunction: { arguments: { ComputeGamma: { isDataset: false, isPublic: false, name: "ComputeGamma", type: "RasterFunctionVariable", value: false }, DRA: { isDataset: false, isPublic: false, name: "DRA", type: "RasterFunctionVariable", value: false }, EstimateStatsHistogram: { isDataset: false, isPublic: false, name: "EstimateStatsHistogram", type: "RasterFunctionVariable", value: false }, Gamma: { displayName: "Gamma", isDataset: false, isPublic: false, name: "Gamma", type: "RasterFunctionVariable" }, Histograms: { isDataset: false, isPublic: false, name: "Histograms", type: "RasterFunctionVariable" }, Max: { isDataset: false, isPublic: false, name: "Max", type: "RasterFunctionVariable", value: 255 }, MaxPercent: { isDataset: false, isPublic: false, name: "MaxPercent", type: "RasterFunctionVariable", value: 0.5 }, Min: { isDataset: false, isPublic: false, name: "Min", type: "RasterFunctionVariable", value: 0 }, MinPercent: { isDataset: false, isPublic: false, name: "MinPercent", type: "RasterFunctionVariable", value: 0.25 }, NumberOfStandardDeviations: { isDataset: false, isPublic: false, name: "NumberOfStandardDeviation", type: "RasterFunctionVariable", value: 2 }, Raster: { isDataset: true, isPublic: false, name: "Raster", type: "RasterFunctionVariable" }, SigmoidStrengthLevel: { isDataset: false, isPublic: false, name: "SigmoidStrengthLevel", type: "RasterFunctionVariable", value: 2 }, Statistics: { isDataset: false, isPublic: false, name: "Statistics", type: "RasterFunctionVariable" }, StretchType: { isDataset: false, isPublic: false, name: "StretchType", type: "RasterFunctionVariable", value: 0 }, type: "StretchFunctionArguments", UseGamma: { isDataset: false, isPublic: false, name: "UseGamma", type: "RasterFunctionVariable", value: false } }, description: "Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.", function: { description: "Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.", name: "Stretch", pixelType: "UNKNOWN", type: "StretchFunction" }, functionType: 0, name: "Stretch", thumbnail: "" }, RemapFunction: { name: "Remap", description: "Changes pixel values by assigning new values to ranges of pixel values or using an external table.", function: { type: "RemapFunction", pixelType: "UNKNOWN", name: "Remap", description: "Changes pixel values by assigning new values to ranges of pixel values or using an external table." }, arguments: { Raster: { name: "Raster", isPublic: false, isDataset: true, type: "RasterFunctionVariable" }, UseTable: { name: "UseTable", isPublic: false, isDataset: false, value: false, type: "RasterFunctionVariable" }, InputRanges: { name: "InputRanges", isPublic: false, isDataset: false, type: "RasterFunctionVariable", displayName: "Input Ranges" }, OutputValues: { name: "OutputValues", isPublic: false, isDataset: false, type: "RasterFunctionVariable", displayName: "Output Values" }, NoDataRanges: { name: "NoDataRanges", isPublic: false, isDataset: false, type: "RasterFunctionVariable", displayName: "NoData Ranges" }, Table: { name: "Table", isPublic: false, isDataset: false, type: "RasterFunctionVariable" }, InputField: { name: "InputField", isPublic: false, isDataset: false, type: "RasterFunctionVariable" }, OutputField: { name: "OutputField", isPublic: false, isDataset: false, type: "RasterFunctionVariable" }, InputMaxField: { name: "InputMaxField", isPublic: false, isDataset: false, type: "RasterFunctionVariable" }, RemapTableType: { name: "RemapTableType", isPublic: false, isDataset: false, value: 1, type: "RasterFunctionVariable" }, AllowUnmatched: { name: "AllowUnmatched", isPublic: false, isDataset: false, value: true, type: "RasterFunctionVariable" }, type: "RemapFunctionArguments" }, functionType: 0, thumbnail: "" }, ColormapFunction: { name: "Colormap", description: "Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.", function: { type: "ColormapFunction", pixelType: "UNKNOWN", name: "Colormap", description: "Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp." }, arguments: { Raster: { name: "Raster", isPublic: false, isDataset: true, type: "RasterFunctionVariable" }, ColorSchemeType: { name: "ColorSchemeType", isPublic: false, isDataset: false, value: 1, type: "RasterFunctionVariable" }, Colormap: { name: "Colormap", isPublic: false, isDataset: false, type: "RasterFunctionVariable" }, ColormapName: { name: "ColormapName", isPublic: false, isDataset: false, value: "Gray", type: "RasterFunctionVariable" }, ColorRamp: { name: "ColorRamp", isPublic: false, isDataset: false, type: "RasterFunctionVariable" }, type: "ColormapFunctionArguments" }, functionType: 0, thumbnail: "" }, ShadedReliefFunction: { name: "Shaded Relief", description: "Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.", function: { type: "ShadedReliefFunction", pixelType: "UNKNOWN", name: "Shaded Relief", description: "Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image." }, arguments: { Raster: { name: "Raster", isPublic: false, isDataset: true, type: "RasterFunctionVariable" }, ColorSchemeType: { name: "ColorSchemeType", isPublic: false, isDataset: false, value: 1, type: "RasterFunctionVariable" }, ColorRamp: { name: "ColorRamp", isPublic: false, isDataset: false, type: "RasterFunctionVariable" }, HillshadeType: { name: "HillshadeType", isPublic: false, isDataset: false, value: 0, type: "RasterFunctionVariable" }, Colormap: { name: "Colormap", isPublic: false, isDataset: false, type: "RasterFunctionVariable" }, Azimuth: { name: "Azimuth", isPublic: false, isDataset: false, value: 315, type: "RasterFunctionVariable" }, Altitude: { name: "Altitude", isPublic: false, isDataset: false, value: 45, type: "RasterFunctionVariable" }, SlopeType: { name: "SlopeType", isPublic: false, isDataset: false, value: 1, type: "RasterFunctionVariable" }, ZFactor: { name: "ZFactor", isPublic: false, isDataset: false, value: 1, type: "RasterFunctionVariable" }, PSPower: { name: "PSPower", isPublic: false, isDataset: false, value: 0.664, type: "RasterFunctionVariable" }, PSZFactor: { name: "PSZFactor", isPublic: false, isDataset: false, value: 0.024, type: "RasterFunctionVariable" }, RemoveEdgeEffect: { name: "RemoveEdgeEffect", isPublic: false, isDataset: false, value: false, type: "RasterFunctionVariable" }, type: "ShadedReliefFunctionArguments" }, functionType: 0, thumbnail: "" }, HillshadeFunction: { name: "Hillshade", description: "Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image", function: { type: "HillshadeFunction", pixelType: "UNKNOWN", name: "Hillshade", description: "Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image" }, arguments: { DEM: { name: "DEM", isPublic: false, isDataset: true, type: "RasterFunctionVariable" }, HillshadeType: { name: "HillshadeType", isPublic: false, isDataset: false, value: 0, type: "RasterFunctionVariable" }, Azimuth: { name: "Azimuth", isPublic: false, isDataset: false, value: 315, type: "RasterFunctionVariable" }, Altitude: { name: "Altitude", isPublic: false, isDataset: false, value: 45, type: "RasterFunctionVariable" }, SlopeType: { name: "SlopeType", isPublic: false, isDataset: false, value: 1, type: "RasterFunctionVariable" }, ZFactor: { name: "ZFactor", isPublic: false, isDataset: false, value: 1, type: "RasterFunctionVariable" }, PSPower: { name: "PSPower", isPublic: false, isDataset: false, value: 0.664, type: "RasterFunctionVariable" }, PSZFactor: { name: "PSZFactor", isPublic: false, isDataset: false, value: 0.024, type: "RasterFunctionVariable" }, RemoveEdgeEffect: { name: "RemoveEdgeEffect", isPublic: false, isDataset: false, value: false, type: "RasterFunctionVariable" }, type: "HillshadeFunctionArguments" }, functionType: 0, thumbnail: "" }, ResampleFunction: { name: "Resample", description: "Changes the cell size of a raster.", function: { type: "ResampleFunction", pixelType: "UNKNOWN", name: "Resample", description: "Changes the cell size of a raster." }, arguments: { Raster: { name: "Raster", isPublic: false, isDataset: true, type: "RasterFunctionVariable" }, ResamplingType: { name: "ResamplingType", isPublic: false, isDataset: false, value: 0, type: "RasterFunctionVariable" }, InputCellSize: { name: "InputCellsize", isPublic: false, isDataset: false, value: { x: 0, y: 0 }, type: "RasterFunctionVariable" }, OutputCellSize: { name: "OutputCellsize", isPublic: false, isDataset: false, value: { x: 0, y: 0 }, type: "RasterFunctionVariable" }, type: "ResampleFunctionArguments" }, functionType: 0, thumbnail: "" } };
  315. // node_modules/@arcgis/core/layers/support/imageryRendererUtils.js
  316. var c4 = { u1: [0, 1], u2: [0, 3], u4: [0, 15], u8: [0, 255], s8: [-128, 127], u16: [0, 65535], s16: [-32768, 32767] };
  317. var l6 = { simple_scalar: "Simple Scalar", wind_barb: "Wind Barb", single_arrow: "Single Arrow", beaufort_kn: "Beaufort Wind (Knots)", beaufort_m: "Beaufort Wind (MetersPerSecond)", ocean_current_m: "Ocean Current (MetersPerSecond)", ocean_current_kn: "Ocean Current (Knots)" };
  318. var m5 = new Set(["raster-stretch", "unique-value", "class-breaks", "raster-shaded-relief", "vector-field", "raster-colormap"]);
  319. function f5(e6) {
  320. return m5.has(e6.type);
  321. }
  322. function p6(t4, n9) {
  323. if (!t4 || !n9)
  324. return m(t4 || n9);
  325. const r4 = m(t4);
  326. if (n9.rasterFunctionDefinition) {
  327. const e6 = n9.rasterFunctionDefinition;
  328. (e6.thumbnail || e6.thumbnailEx) && (e6.thumbnail = e6.thumbnailEx = null), g2(r4.rasterFunctionDefinition.arguments, n9);
  329. } else if (n9.functionName.toLowerCase() !== "none") {
  330. b3(r4.functionArguments).Raster = n9;
  331. }
  332. return r4;
  333. }
  334. function g2(e6, t4) {
  335. for (const n9 in e6)
  336. n9.toLowerCase() === "raster" && (e6[n9].type === "RasterFunctionVariable" ? (e6[n9] = t4.rasterFunctionDefinition, e6[n9].type = "RasterFunctionTemplate") : e6[n9].type === "RasterFunctionTemplate" && g2(e6[n9].arguments, t4));
  337. }
  338. function d6(t4) {
  339. const r4 = m(e5[t4.functionName + "Function"]), o7 = t4.functionArguments;
  340. for (const e6 in o7)
  341. e6.toLowerCase() === "raster" ? (r4.arguments[e6] = d6(o7[e6]), r4.arguments[e6].type = "RasterFunctionTemplate") : e6.toLowerCase() === "colormap" ? (r4.arguments[e6].value = N(o7[e6]), r4.arguments.ColorSchemeType.value = 0) : r4.arguments[e6].value = o7[e6];
  342. return r4;
  343. }
  344. function h2(e6, t4) {
  345. switch (t4 = t4 || {}, e6.type) {
  346. case "raster-stretch":
  347. return v6(e6, t4);
  348. case "class-breaks":
  349. return T(e6, t4);
  350. case "unique-value":
  351. return A(e6, t4);
  352. case "raster-colormap":
  353. return F2(e6, t4);
  354. case "vector-field":
  355. return y4(e6, t4);
  356. case "raster-shaded-relief":
  357. return w4(e6, t4);
  358. case "flow":
  359. throw new Error("Unsupported rendering rule.");
  360. }
  361. }
  362. function b3(e6) {
  363. const t4 = e6.Raster;
  364. return t4 && t4.declaredClass === "esri.layers.support.RasterFunction" ? b3(t4.functionArguments) : e6;
  365. }
  366. var R2 = { none: 0, standardDeviation: 3, histogramEqualization: 4, minMax: 5, percentClip: 6, sigmoid: 9 };
  367. function y4(e6, n9) {
  368. const r4 = new w3();
  369. r4.functionName = "VectorFieldRenderer";
  370. const { dataType: o7, bandProperties: a5 } = n9, i7 = o7 === "vector-uv";
  371. let s6, c8;
  372. a5 && a5.length === 2 && (s6 = a5.map((e7) => e7.BandName.toLowerCase()).indexOf("magnitude"), c8 = a5.map((e7) => e7.BandName.toLowerCase()).indexOf("direction")), s6 !== -1 && s6 !== null || (s6 = 0, c8 = 1);
  373. const m9 = e6.rotationType === "arithmetic" ? 1 : 2, f7 = e6.flowRepresentation === "flow-from" ? 0 : 1, p13 = e6.visualVariables ? e6.visualVariables.find((e7) => e7.field === "Magnitude") : new j3(), g4 = { magnitudeBandID: s6, directionBandID: c8, isUVComponents: i7, referenceSystem: m9, massFlowAngleRepresentation: f7, symbolTileSize: 50, symbolTileSizeUnits: 100, calculationMethod: "Vector Average", symbologyName: l6[e6.style.toLowerCase().replace("-", "_")], minimumMagnitude: p13.minDataValue, maximumMagnitude: p13.maxDataValue, minimumSymbolSize: p13.minSize, maximumSymbolSize: p13.maxSize };
  374. return r4.functionArguments = g4, n9.convertToRFT ? new w3({ rasterFunctionDefinition: d6(r4) }) : r4;
  375. }
  376. function w4(e6, n9) {
  377. const a5 = n9.convertToRFT;
  378. if (n9.dataType !== "elevation")
  379. return new w3();
  380. const i7 = new w3();
  381. i7.functionName = "Hillshade";
  382. const s6 = e6.hillshadeType === "traditional" ? 0 : 1, u8 = e6.scalingType === "none" ? 1 : 3, c8 = { HillshadeType: s6, SlopeType: u8, ZFactor: e6.zFactor };
  383. return s6 === 0 && (c8.Azimuth = e6.azimuth, c8.Altitude = e6.altitude), u8 === 3 && (c8.PSPower = e6.pixelSizePower, c8.PSZFactor = e6.pixelSizeFactor), i7.functionArguments = c8, i7.variableName = "Raster", e6.colorRamp && (i7.functionName = "ShadedRelief", a5 ? c8.ColorRamp = _(e6.colorRamp) : c8.Colormap = h(e6.colorRamp, 256)), a5 ? new w3({ rasterFunctionDefinition: d6(i7) }) : i7;
  384. }
  385. function v6(e6, n9) {
  386. const i7 = n9.convertToRFT, u8 = new w3();
  387. u8.functionName = "Stretch";
  388. const c8 = R2[n5.toJSON(e6.stretchType)], l9 = "u8", m9 = { StretchType: c8, Statistics: x2(e6.statistics), DRA: e6.dynamicRangeAdjustment, UseGamma: e6.useGamma, Gamma: e6.gamma, ComputeGamma: e6.computeGamma };
  389. if (e6.outputMin != null && (m9.Min = e6.outputMin), e6.outputMax != null && (m9.Max = e6.outputMax), c8 === R2.standardDeviation ? (m9.NumberOfStandardDeviations = e6.numberOfStandardDeviations, u8.outputPixelType = l9) : c8 === R2.percentClip ? (m9.MinPercent = e6.minPercent, m9.MaxPercent = e6.maxPercent, u8.outputPixelType = l9) : c8 === R2.minMax ? u8.outputPixelType = l9 : c8 === R2.sigmoid && (m9.SigmoidStrengthLevel = e6.sigmoidStrengthLevel), u8.functionArguments = m9, u8.variableName = "Raster", e6.colorRamp) {
  390. const s6 = e6.colorRamp, c9 = new w3();
  391. if (i7)
  392. c9.functionArguments = { ColorRamp: _(s6) };
  393. else {
  394. const t4 = f2(s6);
  395. if (t4)
  396. c9.functionArguments = { colorRamp: t4 };
  397. else if (!n9.convertColorRampToColormap || s6.type !== "algorithmic" && s6.type !== "multipart") {
  398. const t5 = e6.colorRamp.toJSON();
  399. t5.type === "algorithmic" ? t5.algorithm = t5.algorithm || "esriCIELabAlgorithm" : t5.type === "multipart" && t5.colorRamps?.length && t5.colorRamps.forEach((e7) => e7.algorithm = e7.algorithm || "esriCIELabAlgorithm"), c9.functionArguments = { colorRamp: t5 };
  400. } else
  401. c9.functionArguments = { Colormap: h(s6, 256) };
  402. }
  403. return c9.variableName = "Raster", c9.functionName = "Colormap", c9.functionArguments.Raster = u8, i7 ? new w3({ rasterFunctionDefinition: d6(c9) }) : c9;
  404. }
  405. return i7 ? new w3({ rasterFunctionDefinition: d6(u8) }) : u8;
  406. }
  407. function T(e6, n9) {
  408. const r4 = [], o7 = [], a5 = [], i7 = [], s6 = 1e-6, { pixelType: u8, rasterAttributeTable: c8 } = n9, l9 = c8 && c8.features, m9 = C(c8);
  409. if (l9 && Array.isArray(l9) && e6.classBreakInfos) {
  410. e6.classBreakInfos.forEach((t4, n10) => {
  411. const r6 = t4.symbol.color;
  412. let o9;
  413. r6.a && l9.forEach((a6) => {
  414. o9 = a6.attributes[e6.field], (o9 >= t4.minValue && o9 < t4.maxValue || n10 === e6.classBreakInfos.length - 1 && o9 >= t4.minValue) && i7.push([a6.attributes[m9], r6.r, r6.g, r6.b]);
  415. });
  416. });
  417. const r5 = u8 ? S3(i7, u8) : i7, o8 = new w3();
  418. return o8.functionName = "Colormap", o8.functionArguments = {}, o8.functionArguments.Colormap = r5, o8.variableName = "Raster", n9.convertToRFT ? new w3({ rasterFunctionDefinition: d6(o8) }) : o8;
  419. }
  420. e6.classBreakInfos.forEach((e7, t4) => {
  421. const n10 = e7.symbol && e7.symbol.color;
  422. n10.a ? (t4 === 0 ? r4.push(e7.minValue, e7.maxValue + s6) : r4.push(e7.minValue + s6, e7.maxValue + s6), o7.push(t4), i7.push([t4, n10.r, n10.g, n10.b])) : a5.push(e7.minValue, e7.maxValue);
  423. });
  424. const f7 = u8 ? S3(i7, u8) : i7, p13 = new w3();
  425. p13.functionName = "Remap", p13.functionArguments = { InputRanges: r4, OutputValues: o7, NoDataRanges: a5 }, p13.variableName = "Raster";
  426. const g4 = new w3();
  427. return g4.functionName = "Colormap", g4.functionArguments = { Colormap: f7, Raster: p13 }, n9.convertToRFT ? new w3({ rasterFunctionDefinition: d6(g4) }) : g4;
  428. }
  429. function S3(e6, t4) {
  430. const n9 = c4[String(t4).toLowerCase()];
  431. return n9 && e6.push([Math.floor(n9[0] - 1), 0, 0, 0], [Math.ceil(n9[1] + 1), 0, 0, 0]), e6;
  432. }
  433. function C(e6) {
  434. if (!e6)
  435. return;
  436. const { fields: t4 } = e6, n9 = t4 && t4.find((e7) => e7 && e7.name && e7.name.toLowerCase() === "value");
  437. return n9 && n9.name;
  438. }
  439. function A(e6, n9) {
  440. const r4 = [], { pixelType: o7, rasterAttributeTable: a5 } = n9, i7 = a5 && a5.features, s6 = C(a5), u8 = e6.defaultSymbol?.color?.toRgb(), c8 = e6.uniqueValueInfos;
  441. if (c8)
  442. if (i7) {
  443. const t4 = new Map();
  444. c8.forEach((e7) => {
  445. const n11 = e7.value, r5 = e7.symbol.color?.toRgb();
  446. n11 != null && r5 && t4.set(String(n11), r5);
  447. });
  448. const n10 = e6.field;
  449. i7.forEach(({ attributes: e7 }) => {
  450. const o8 = String(e7[n10]), a6 = e7[s6];
  451. if (t4.has(o8)) {
  452. const e8 = t4.get(o8);
  453. r4.push([a6, ...e8]);
  454. } else
  455. u8 && r4.push([a6, ...u8]);
  456. });
  457. } else
  458. for (let t4 = 0; t4 < c8.length; t4++) {
  459. const e7 = c8[t4], n10 = e7.symbol.color, o8 = +e7.value;
  460. if (n10?.a) {
  461. if (isNaN(o8))
  462. return null;
  463. r4.push([o8, n10.r, n10.g, n10.b]);
  464. }
  465. }
  466. const l9 = o7 && r4.length > 0 ? S3(r4, o7) : r4, m9 = new w3();
  467. return m9.functionName = "Colormap", m9.functionArguments = {}, m9.functionArguments.Colormap = l9, m9.variableName = "Raster", n9.convertToRFT ? new w3({ rasterFunctionDefinition: d6(m9) }) : m9;
  468. }
  469. function F2(e6, n9) {
  470. const r4 = e6.extractColormap();
  471. if (!r4 || r4.length === 0)
  472. return;
  473. const { pixelType: o7 } = n9, a5 = o7 ? S3(r4, o7) : r4, i7 = new w3();
  474. return i7.functionName = "Colormap", i7.functionArguments = {}, i7.functionArguments.Colormap = a5, n9.convertToRFT ? new w3({ rasterFunctionDefinition: d6(i7) }) : i7;
  475. }
  476. function x2(e6) {
  477. const t4 = [];
  478. return e6.forEach((e7) => {
  479. const n9 = e7;
  480. if (Array.isArray(n9))
  481. t4.push(n9);
  482. else {
  483. if (n9.min == null || n9.max == null)
  484. return;
  485. const e8 = [n9.min, n9.max, n9.avg || 0, n9.stddev || 0];
  486. t4.push(e8);
  487. }
  488. }), t4;
  489. }
  490. function N(e6) {
  491. const t4 = [], n9 = [];
  492. return e6.forEach((e7) => {
  493. t4.push(e7[0]), n9.push(R([...e7.slice(1), 255]));
  494. }), { type: "RasterColormap", values: t4, colors: n9 };
  495. }
  496. // node_modules/@arcgis/core/layers/support/MosaicRule.js
  497. var u6;
  498. var m6 = o2()({ MT_FIRST: "first", MT_LAST: "last", MT_MIN: "min", MT_MAX: "max", MT_MEAN: "mean", MT_BLEND: "blend", MT_SUM: "sum" });
  499. var h3 = o2()({ esriMosaicNone: "none", esriMosaicCenter: "center", esriMosaicNadir: "nadir", esriMosaicViewpoint: "viewpoint", esriMosaicAttribute: "attribute", esriMosaicLockRaster: "lock-raster", esriMosaicNorthwest: "northwest", esriMosaicSeamline: "seamline" });
  500. function M2(e6) {
  501. let t4;
  502. switch (e6 ? e6.toLowerCase().replace("esrimosaic", "") : "") {
  503. case "byattribute":
  504. case "attribute":
  505. t4 = "esriMosaicAttribute";
  506. break;
  507. case "lockraster":
  508. t4 = "esriMosaicLockRaster";
  509. break;
  510. case "center":
  511. t4 = "esriMosaicCenter";
  512. break;
  513. case "northwest":
  514. t4 = "esriMosaicNorthwest";
  515. break;
  516. case "nadir":
  517. t4 = "esriMosaicNadir";
  518. break;
  519. case "viewpoint":
  520. t4 = "esriMosaicViewpoint";
  521. break;
  522. case "seamline":
  523. t4 = "esriMosaicSeamline";
  524. break;
  525. default:
  526. t4 = "esriMosaicNone";
  527. }
  528. return h3.fromJSON(t4);
  529. }
  530. var w5 = u6 = class extends l {
  531. constructor(e6) {
  532. super(e6), this.ascending = true, this.itemRenderingRule = null, this.lockRasterIds = null, this.method = null, this.multidimensionalDefinition = null, this.objectIds = null, this.operation = null, this.sortField = null, this.sortValue = null, this.viewpoint = null, this.where = null;
  533. }
  534. readAscending(e6, t4) {
  535. return t4.ascending != null ? t4.ascending : t4.sortAscending == null || t4.sortAscending;
  536. }
  537. readMethod(e6, t4) {
  538. return M2(t4.mosaicMethod || t4.defaultMosaicMethod);
  539. }
  540. readOperation(e6, t4) {
  541. const o7 = t4.mosaicOperation, r4 = t4.mosaicOperator && t4.mosaicOperator.toLowerCase(), i7 = o7 || (r4 ? m6.toJSON(r4) : null);
  542. return m6.fromJSON(i7) || "first";
  543. }
  544. castSortValue(e6) {
  545. return e6 == null || typeof e6 == "string" || typeof e6 == "number" ? e6 : `${e6}`;
  546. }
  547. clone() {
  548. return new u6({ ascending: this.ascending, itemRenderingRule: m(this.itemRenderingRule), lockRasterIds: m(this.lockRasterIds), method: this.method, multidimensionalDefinition: m(this.multidimensionalDefinition), objectIds: m(this.objectIds), operation: this.operation, sortField: this.sortField, sortValue: this.sortValue, viewpoint: m(this.viewpoint), where: this.where });
  549. }
  550. };
  551. e([d({ type: Boolean, json: { write: true } })], w5.prototype, "ascending", void 0), e([o("ascending", ["ascending", "sortAscending"])], w5.prototype, "readAscending", null), e([d({ type: w3, json: { write: true } })], w5.prototype, "itemRenderingRule", void 0), e([d({ type: [S], json: { write: { overridePolicy() {
  552. return { enabled: this.method === "lock-raster" };
  553. } } } })], w5.prototype, "lockRasterIds", void 0), e([d({ type: String, json: { type: h3.jsonValues, write: { target: "mosaicMethod", writer: h3.write } } })], w5.prototype, "method", void 0), e([o("method", ["mosaicMethod", "defaultMosaicMethod"])], w5.prototype, "readMethod", null), e([d({ type: [p3], json: { write: true } })], w5.prototype, "multidimensionalDefinition", void 0), e([d({ type: [S], json: { name: "fids", write: true } })], w5.prototype, "objectIds", void 0), e([d({ json: { type: m6.jsonValues, read: { reader: m6.read }, write: { target: "mosaicOperation", writer: m6.write } } })], w5.prototype, "operation", void 0), e([o("operation", ["mosaicOperation", "mosaicOperator"])], w5.prototype, "readOperation", null), e([d({ type: String, json: { write: { overridePolicy() {
  554. return { enabled: this.method === "attribute" };
  555. } } } })], w5.prototype, "sortField", void 0), e([d({ type: [String, Number], json: { write: { allowNull: true, overridePolicy() {
  556. return { enabled: this.method === "attribute", allowNull: true };
  557. } } } })], w5.prototype, "sortValue", void 0), e([s3("sortValue")], w5.prototype, "castSortValue", null), e([d({ type: j, json: { write: true } })], w5.prototype, "viewpoint", void 0), e([d({ type: String, json: { write: true } })], w5.prototype, "where", void 0), w5 = u6 = e([n("esri.layers.support.MosaicRule")], w5);
  558. var y5 = w5;
  559. // node_modules/@arcgis/core/layers/support/ExportImageServiceParameters.js
  560. var d7 = class extends l {
  561. constructor() {
  562. super(...arguments), this.layer = null, this.adjustAspectRatio = void 0, this.bandIds = void 0, this.compression = void 0, this.compressionQuality = void 0, this.compressionTolerance = 0.01, this.interpolation = null, this.noData = null, this.noDataInterpretation = void 0, this.pixelType = void 0, this.lercVersion = 2;
  563. }
  564. writeAdjustAspectRatio(e6, r4, t4) {
  565. this.layer.version < 10.3 || (r4[t4] = e6);
  566. }
  567. writeCompressionQuality(e6, r4, t4) {
  568. this.format && this.format.toLowerCase().includes("jpg") && e6 != null && (r4[t4] = e6);
  569. }
  570. writeCompressionTolerance(e6, r4, t4) {
  571. this.format === "lerc" && e6 != null && (r4[t4] = e6);
  572. }
  573. get format() {
  574. return this.layer.renderer?.type === "vector-field" ? "lerc" : this.layer.format;
  575. }
  576. writeLercVersion(e6, r4, t4) {
  577. this.format === "lerc" && this.layer.version >= 10.5 && (r4[t4] = e6);
  578. }
  579. get version() {
  580. const e6 = this.layer;
  581. return e6.commitProperty("bandIds"), e6.commitProperty("format"), e6.commitProperty("compressionQuality"), e6.commitProperty("compressionTolerance"), e6.commitProperty("interpolation"), e6.commitProperty("noData"), e6.commitProperty("noDataInterpretation"), e6.commitProperty("mosaicRule"), e6.commitProperty("renderingRule"), e6.commitProperty("adjustAspectRatio"), e6.commitProperty("pixelFilter"), e6.commitProperty("renderer"), e6.commitProperty("definitionExpression"), (this._get("version") || 0) + 1;
  582. }
  583. set version(e6) {
  584. this._set("version", e6);
  585. }
  586. get mosaicRule() {
  587. const e6 = this.layer;
  588. let r4 = e6.mosaicRule;
  589. const t4 = e6.definitionExpression;
  590. return r4 ? t4 && t4 !== r4.where && (r4 = r4.clone(), r4.where = t4) : t4 && (r4 = new y5({ where: t4 })), r4;
  591. }
  592. get renderingRule() {
  593. const e6 = this.layer;
  594. let r4 = e6.renderingRule;
  595. const t4 = e6.pixelFilter, o7 = !e6.format || e6.format.includes("jpg") || e6.format.includes("png");
  596. return r4 = this._addResampleRasterFunction(r4), o7 && !t4 && e6.renderer?.type !== "vector-field" && (r4 = this.combineRendererWithRenderingRule()), r4;
  597. }
  598. combineRendererWithRenderingRule() {
  599. const e6 = this.layer, { rasterInfo: r4, renderingRule: t4, renderer: o7 } = e6;
  600. if (!o7 || !f5(o7))
  601. return t4;
  602. return p6(h2(o7, { rasterAttributeTable: r4.attributeTable, pixelType: r4.pixelType, dataType: r4.dataType, bandProperties: r4.keyProperties?.BandProperties, convertColorRampToColormap: e6.version < 10.6, convertToRFT: !!t4?.rasterFunctionDefinition }), t4);
  603. }
  604. _addResampleRasterFunction(e6) {
  605. if (!(this.layer.renderer?.type === "vector-field") || e6?.functionName === "Resample")
  606. return e6;
  607. const r4 = this.layer.serviceDataType === "esriImageServiceDataTypeVector-UV" ? 7 : 10;
  608. let t4 = new w3({ functionName: "Resample", functionArguments: { ResamplingType: r4, InputCellSize: { x: this.layer.pixelSizeX, y: this.layer.pixelSizeY } } });
  609. return t4 = e6?.rasterFunctionDefinition ? new w3({ rasterFunctionDefinition: d6(t4) }) : t4, p6(t4, e6);
  610. }
  611. };
  612. e([d()], d7.prototype, "layer", void 0), e([d({ json: { write: true } })], d7.prototype, "adjustAspectRatio", void 0), e([r2("adjustAspectRatio")], d7.prototype, "writeAdjustAspectRatio", null), e([d({ json: { write: true } }), o3("layer.bandIds")], d7.prototype, "bandIds", void 0), e([d({ json: { write: true } })], d7.prototype, "compression", void 0), e([d({ json: { write: true } }), o3("layer.compressionQuality")], d7.prototype, "compressionQuality", void 0), e([r2("compressionQuality")], d7.prototype, "writeCompressionQuality", null), e([d({ json: { write: true } }), o3("layer.compressionTolerance")], d7.prototype, "compressionTolerance", void 0), e([r2("compressionTolerance")], d7.prototype, "writeCompressionTolerance", null), e([d({ json: { write: true } })], d7.prototype, "format", null), e([d({ type: String, json: { read: { reader: o6.read }, write: { writer: o6.write } } }), o3("layer.interpolation")], d7.prototype, "interpolation", void 0), e([d({ json: { write: true } }), o3("layer.noData")], d7.prototype, "noData", void 0), e([d({ type: String, json: { read: { reader: i3.read }, write: { writer: i3.write } } }), o3("layer.noDataInterpretation")], d7.prototype, "noDataInterpretation", void 0), e([d({ json: { write: true } })], d7.prototype, "pixelType", void 0), e([d({ json: { write: true } })], d7.prototype, "lercVersion", void 0), e([r2("lercVersion")], d7.prototype, "writeLercVersion", null), e([d({ type: Number })], d7.prototype, "version", null), e([d({ json: { write: true } })], d7.prototype, "mosaicRule", null), e([d({ json: { write: true } })], d7.prototype, "renderingRule", null), d7 = e([n("esri.layers.mixins.ExportImageServiceParameters")], d7);
  613. // node_modules/@arcgis/core/rest/support/ImageAngleResult.js
  614. var p7 = class extends l {
  615. constructor() {
  616. super(...arguments), this.north = null, this.up = null, this.spatialReference = null;
  617. }
  618. };
  619. e([d({ type: Number, json: { write: true } })], p7.prototype, "north", void 0), e([d({ type: Number, json: { write: true } })], p7.prototype, "up", void 0), e([d({ type: k, json: { write: true } })], p7.prototype, "spatialReference", void 0), p7 = e([n("esri.rest.support.ImageAngleResult")], p7);
  620. var i5 = p7;
  621. // node_modules/@arcgis/core/rest/support/ImageIdentifyResult.js
  622. var p8 = class extends l {
  623. constructor() {
  624. super(...arguments), this.catalogItemVisibilities = null, this.catalogItems = null, this.location = null, this.name = null, this.objectId = null, this.processedValues = null, this.properties = null, this.value = null;
  625. }
  626. };
  627. e([d({ json: { write: true } })], p8.prototype, "catalogItemVisibilities", void 0), e([d({ type: x, json: { write: true } })], p8.prototype, "catalogItems", void 0), e([d({ type: j, json: { write: true } })], p8.prototype, "location", void 0), e([d({ json: { write: true } })], p8.prototype, "name", void 0), e([d({ json: { write: true } })], p8.prototype, "objectId", void 0), e([d({ json: { write: true } })], p8.prototype, "processedValues", void 0), e([d({ json: { write: true } })], p8.prototype, "properties", void 0), e([d({ json: { write: true } })], p8.prototype, "value", void 0), p8 = e([n("esri.rest.support.ImageIdentifyResult")], p8);
  628. var l7 = p8;
  629. // node_modules/@arcgis/core/rest/support/ImagePixelLocationResult.js
  630. var t3 = class extends l {
  631. constructor() {
  632. super(...arguments), this.geometries = null;
  633. }
  634. };
  635. e([d({ json: { write: true } })], t3.prototype, "geometries", void 0), t3 = e([n("esri.rest.support.ImagePixelLocationResult")], t3);
  636. var p9 = t3;
  637. // node_modules/@arcgis/core/rest/support/ImageSample.js
  638. var i6 = class extends l {
  639. constructor() {
  640. super(...arguments), this.attributes = null, this.location = null, this.locationId = null, this.rasterId = null, this.resolution = null, this.pixelValue = null;
  641. }
  642. };
  643. e([d({ json: { write: true } })], i6.prototype, "attributes", void 0), e([d({ type: j, json: { write: true } })], i6.prototype, "location", void 0), e([d({ json: { write: true } })], i6.prototype, "locationId", void 0), e([d({ json: { write: true } })], i6.prototype, "rasterId", void 0), e([d({ json: { write: true } })], i6.prototype, "resolution", void 0), e([d({ json: { write: true } })], i6.prototype, "pixelValue", void 0), i6 = e([n("esri.rest.support.ImageSample")], i6);
  644. var p10 = i6;
  645. // node_modules/@arcgis/core/rest/support/ImageSampleResult.js
  646. var p11 = class extends l {
  647. constructor() {
  648. super(...arguments), this.samples = null;
  649. }
  650. };
  651. e([d({ type: [p10], json: { write: true } })], p11.prototype, "samples", void 0), p11 = e([n("esri.rest.support.ImageSampleResult")], p11);
  652. var c5 = p11;
  653. // node_modules/@arcgis/core/rest/imageService.js
  654. function u7(e6) {
  655. const t4 = e6?.time;
  656. if (t4 && (t4.start != null || t4.end != null)) {
  657. const n9 = [];
  658. t4.start != null && n9.push(t4.start), t4.end == null || n9.includes(t4.end) || n9.push(t4.end), e6.time = n9.join(",");
  659. }
  660. }
  661. async function p12(e6, r4, i7) {
  662. const m9 = n3(e6), c8 = r4.geometry ? [r4.geometry] : [], l9 = await L(c8), p13 = r4.toJSON();
  663. u7(p13);
  664. const f7 = l9 && l9[0];
  665. r(f7) && (p13.geometry = f7.toJSON());
  666. const g4 = o5({ ...m9.query, f: "json", ...p13 });
  667. return e4(g4, i7);
  668. }
  669. async function f6(n9, i7, m9) {
  670. const c8 = i7.toJSON();
  671. r(c8.angleName) && (c8.angleName = c8.angleName.join(",")), r(i7.point) && i7.point.spatialReference?.imageCoordinateSystem && (c8.point.spatialReference = h4(i7.point.spatialReference)), r(i7.spatialReference) && i7.spatialReference.imageCoordinateSystem && (c8.spatialReference = R3(i7.spatialReference));
  672. const u8 = n3(n9), p13 = o5({ ...u8.query, f: "json", ...c8 }), f7 = e4(p13, m9), { data: g4 } = await U(`${u8.path}/computeAngles`, f7);
  673. return g4.spatialReference = g4.spatialReference ? g4.spatialReference.geodataXform != null ? new k({ wkid: 0, imageCoordinateSystem: g4.spatialReference }) : k.fromJSON(g4.spatialReference) : null, g4.north === "NaN" && (g4.north = null), g4.up === "NaN" && (g4.up = null), new i5(g4);
  674. }
  675. async function g3(t4, n9, r4) {
  676. const i7 = n9.toJSON(), { geometries: c8 } = n9;
  677. for (let e6 = 0; e6 < c8.length; e6++)
  678. c8[e6].spatialReference?.imageCoordinateSystem && (i7.geometries.geometries[e6].spatialReference = h4(c8[e6].spatialReference));
  679. const l9 = n3(t4), u8 = o5({ ...l9.query, f: "json", ...i7 }), p13 = e4(u8, r4), { data: f7 } = await U(`${l9.path}/computePixelLocation`, p13);
  680. return p9.fromJSON(f7);
  681. }
  682. async function y6(t4, n9, a5) {
  683. const s6 = await p12(t4, n9, a5), r4 = n3(t4), { data: i7 } = await U(`${r4.path}/computeStatisticsHistograms`, s6), { statistics: m9 } = i7;
  684. return m9?.length && m9.forEach((e6) => {
  685. e6.avg = e6.mean, e6.stddev = e6.standardDeviation;
  686. }), { statistics: m9, histograms: i7.histograms };
  687. }
  688. async function d8(t4, n9, a5) {
  689. const s6 = await p12(t4, n9, a5), r4 = n3(t4), { data: i7 } = await U(`${r4.path}/computeHistograms`, s6);
  690. return { histograms: i7.histograms };
  691. }
  692. async function N2(r4, i7, m9) {
  693. const l9 = i7.toJSON();
  694. u7(l9), l9.outFields?.length && (l9.outFields = l9.outFields.join(","));
  695. const p13 = (await L(i7.geometry))?.[0];
  696. r(p13) && (l9.geometry = p13.toJSON());
  697. const f7 = n3(r4), g4 = o5({ ...f7.query, f: "json", ...l9 }), y9 = e4(g4, m9), { data: d12 } = await U(`${f7.path}/getSamples`, y9), N3 = d12?.samples?.map((e6) => {
  698. const t4 = e6.value === "NaN" || e6.value === "" ? null : e6.value.split(" ").map((e7) => Number(e7));
  699. return { ...e6, pixelValue: t4 };
  700. });
  701. return c5.fromJSON({ samples: N3 });
  702. }
  703. async function S4(r4, m9, c8) {
  704. const l9 = n3(r4), u8 = m9.geometry ? [m9.geometry] : [];
  705. return L(u8).then((n9) => {
  706. const o7 = m9.toJSON(), r5 = n9 && n9[0];
  707. r(r5) && (o7.geometry = JSON.stringify(r5.toJSON()));
  708. const i7 = o5({ ...l9.query, f: "json", ...o7 }), u9 = e4(i7, c8);
  709. return U(l9.path + "/identify", u9);
  710. }).then((e6) => l7.fromJSON(e6.data));
  711. }
  712. function h4(e6) {
  713. const { imageCoordinateSystem: t4 } = e6;
  714. if (t4) {
  715. const { id: e7, referenceServiceName: n9 } = t4;
  716. return e7 != null ? n9 ? { icsid: e7, icsns: n9 } : { icsid: e7 } : { ics: t4 };
  717. }
  718. return e6.toJSON();
  719. }
  720. function R3(e6, t4) {
  721. const n9 = h4(e6), { icsid: o7, icsns: a5, wkid: s6 } = n9;
  722. return o7 != null ? a5 == null || t4?.toLowerCase().includes("/" + a5.toLowerCase() + "/") ? `0:${o7}` : JSON.stringify(n9) : s6 ? s6.toString() : JSON.stringify(n9);
  723. }
  724. // node_modules/@arcgis/core/rest/imageService/getCatalogItemRasterInfo.js
  725. async function n7(n9, m9, p13) {
  726. const f7 = n3(n9), u8 = o5({ ...f7.query, f: "json" }), h6 = e4(u8, p13), d12 = `${f7.path}/${m9}/info`, c8 = U(`${d12}`, h6), g4 = U(`${d12}/keyProperties`, h6), x3 = await Promise.allSettled([c8, g4]), y9 = x3[0].status === "fulfilled" ? x3[0].value.data : null, v7 = x3[1].status === "fulfilled" ? x3[1].value.data : null;
  727. let P2 = null;
  728. y9.statistics?.length && (P2 = y9.statistics.map((e6) => ({ min: e6[0], max: e6[1], avg: e6[2], stddev: e6[3] })));
  729. const S5 = M.fromJSON(y9.extent), j6 = Math.ceil(S5.width / y9.pixelSizeX - 0.1), w6 = Math.ceil(S5.height / y9.pixelSizeY - 0.1), b4 = S5.spatialReference, k3 = new j({ x: y9.pixelSizeX, y: y9.pixelSizeY, spatialReference: b4 }), z = y9.histograms?.length ? y9.histograms : null, L3 = new p4({ origin: y9.origin, blockWidth: y9.blockWidth, blockHeight: y9.blockHeight, firstPyramidLevel: y9.firstPyramidLevel, maximumPyramidLevel: y9.maxPyramidLevel });
  730. return new l4({ width: j6, height: w6, bandCount: y9.bandCount, extent: S5, spatialReference: b4, pixelSize: k3, pixelType: y9.pixelType.toLowerCase(), statistics: P2, histograms: z, keyProperties: v7, storageInfo: L3 });
  731. }
  732. // node_modules/@arcgis/core/rest/support/ImageAngleParameters.js
  733. var n8;
  734. var m7 = n8 = class extends l {
  735. constructor() {
  736. super(...arguments), this.angleNames = null, this.point = null, this.spatialReference = null, this.rasterId = null;
  737. }
  738. clone() {
  739. return new n8(m({ angleNames: this.angleNames, point: this.point, spatialReference: this.spatialReference, rasterId: this.rasterId }));
  740. }
  741. };
  742. e([d({ type: [String], json: { name: "angleName", write: true } })], m7.prototype, "angleNames", void 0), e([d({ type: j, json: { write: true } })], m7.prototype, "point", void 0), e([d({ type: k, json: { write: true } })], m7.prototype, "spatialReference", void 0), e([d({ type: S, json: { write: true } })], m7.prototype, "rasterId", void 0), m7 = n8 = e([n("esri.rest.support.ImageAngleParameters")], m7);
  743. var l8 = m7;
  744. // node_modules/@arcgis/core/rest/support/ImageHistogramParameters.js
  745. var y7;
  746. var j4 = y7 = class extends l {
  747. constructor() {
  748. super(...arguments), this.geometry = null, this.mosaicRule = null, this.renderingRule = null, this.pixelSize = null, this.raster = void 0, this.timeExtent = null;
  749. }
  750. writeGeometry(e6, r4, t4) {
  751. e6 != null && (r4.geometryType = v4(e6), r4[t4] = e6.toJSON());
  752. }
  753. clone() {
  754. return new y7(m({ geometry: this.geometry, mosaicRule: this.mosaicRule, renderingRule: this.renderingRule, pixelSize: this.pixelSize, raster: this.raster, timeExtent: this.timeExtent }));
  755. }
  756. };
  757. e([d({ types: i, json: { read: d2 } })], j4.prototype, "geometry", void 0), e([r2("geometry")], j4.prototype, "writeGeometry", null), e([d({ type: y5, json: { write: true } })], j4.prototype, "mosaicRule", void 0), e([d({ type: w3, json: { write: true } })], j4.prototype, "renderingRule", void 0), e([d({ type: j, json: { write: true } })], j4.prototype, "pixelSize", void 0), e([d({ json: { write: true } })], j4.prototype, "raster", void 0), e([d({ type: y2, json: { read: { source: "time" }, write: { target: "time" } } })], j4.prototype, "timeExtent", void 0), j4 = y7 = e([n("esri.rest.support.ImageHistogramParameters")], j4);
  758. var d9 = j4;
  759. // node_modules/@arcgis/core/rest/support/ImageIdentifyParameters.js
  760. var y8;
  761. var c6 = y8 = class extends l {
  762. constructor() {
  763. super(...arguments), this.geometry = null, this.renderingRules = null, this.pixelSize = null, this.returnGeometry = true, this.returnCatalogItems = true, this.returnPixelValues = true, this.maxItemCount = null, this.timeExtent = null, this.raster = void 0, this.viewId = void 0, this.processAsMultidimensional = false;
  764. }
  765. writeGeometry(e6, t4, r4) {
  766. e6 != null && (t4.geometryType = v4(e6), t4[r4] = JSON.stringify(e6.toJSON()));
  767. }
  768. set mosaicRule(e6) {
  769. let t4 = e6;
  770. t4 && t4.mosaicMethod && (t4 = y5.fromJSON({ ...t4.toJSON(), mosaicMethod: t4.mosaicMethod, mosaicOperation: t4.mosaicOperation })), this._set("mosaicRule", t4);
  771. }
  772. writeMosaicRule(e6, t4, r4) {
  773. e6 != null && (t4[r4] = JSON.stringify(e6.toJSON()));
  774. }
  775. set renderingRule(e6) {
  776. let t4 = e6;
  777. t4 && t4.rasterFunction && (t4 = w3.fromJSON({ ...t4.toJSON(), rasterFunction: t4.rasterFunction, rasterFunctionArguments: t4.rasterFunctionArguments })), this._set("renderingRule", t4);
  778. }
  779. writeRenderingRule(e6, t4, r4) {
  780. e6 != null && (t4[r4] = JSON.stringify(e6.toJSON())), e6.rasterFunctionDefinition && (t4[r4] = JSON.stringify(e6.rasterFunctionDefinition));
  781. }
  782. writeRenderingRules(e6, t4, r4) {
  783. e6 != null && (t4[r4] = JSON.stringify(e6.map((e7) => e7.rasterFunctionDefinition || e7.toJSON())));
  784. }
  785. writePixelSize(e6, t4, r4) {
  786. e6 != null && (t4[r4] = JSON.stringify(e6));
  787. }
  788. writeTimeExtent(e6, t4, r4) {
  789. if (e6 != null) {
  790. const o7 = r(e6.start) ? e6.start.getTime() : null, s6 = r(e6.end) ? e6.end.getTime() : null;
  791. t4[r4] = o7 != null ? s6 != null ? `${o7},${s6}` : `${o7}` : null;
  792. }
  793. }
  794. clone() {
  795. return new y8(m({ geometry: this.geometry, mosaicRule: this.mosaicRule, renderingRule: this.renderingRule, pixelSize: this.pixelSize, returnGeometry: this.returnGeometry, returnCatalogItems: this.returnCatalogItems, returnPixelValues: this.returnPixelValues, maxItemCount: this.maxItemCount, processAsMultidimensional: this.processAsMultidimensional, raster: this.raster, viewId: this.viewId, timeExtent: this.timeExtent }));
  796. }
  797. };
  798. e([d({ json: { write: true } })], c6.prototype, "geometry", void 0), e([r2("geometry")], c6.prototype, "writeGeometry", null), e([d({ type: y5, json: { write: true } })], c6.prototype, "mosaicRule", null), e([r2("mosaicRule")], c6.prototype, "writeMosaicRule", null), e([d({ type: w3, json: { write: true } })], c6.prototype, "renderingRule", null), e([r2("renderingRule")], c6.prototype, "writeRenderingRule", null), e([d({ type: [w3], json: { write: true } })], c6.prototype, "renderingRules", void 0), e([r2("renderingRules")], c6.prototype, "writeRenderingRules", null), e([d({ type: j, json: { write: true } })], c6.prototype, "pixelSize", void 0), e([r2("pixelSize")], c6.prototype, "writePixelSize", null), e([d({ type: Boolean, json: { write: true } })], c6.prototype, "returnGeometry", void 0), e([d({ type: Boolean, json: { write: true } })], c6.prototype, "returnCatalogItems", void 0), e([d({ type: Boolean, json: { write: true } })], c6.prototype, "returnPixelValues", void 0), e([d({ type: Number, json: { write: true } })], c6.prototype, "maxItemCount", void 0), e([d({ type: y2, json: { write: { target: "time" } } })], c6.prototype, "timeExtent", void 0), e([r2("timeExtent")], c6.prototype, "writeTimeExtent", null), e([d({ json: { write: true } })], c6.prototype, "raster", void 0), e([d({ json: { write: true } })], c6.prototype, "viewId", void 0), e([d({ type: Boolean, json: { write: true } })], c6.prototype, "processAsMultidimensional", void 0), c6 = y8 = e([n("esri.rest.support.ImageIdentifyParameters")], c6);
  799. var d10 = c6;
  800. // node_modules/@arcgis/core/rest/support/ImagePixelLocationParameters.js
  801. var m8;
  802. var c7 = m8 = class extends l {
  803. constructor() {
  804. super(...arguments), this.geometries = null, this.rasterId = null;
  805. }
  806. writeGeometry(r4, e6, o7) {
  807. e6.geometries = { geometryType: "esriGeometryPoint", geometries: r4.map((r5) => r5.toJSON()) };
  808. }
  809. clone() {
  810. return new m8({ geometries: this.geometries.map((r4) => r4.clone()), rasterId: this.rasterId });
  811. }
  812. };
  813. e([d({ type: [j], json: { write: true } })], c7.prototype, "geometries", void 0), e([r2("geometries")], c7.prototype, "writeGeometry", null), e([d({ type: S, json: { write: true } })], c7.prototype, "rasterId", void 0), c7 = m8 = e([n("esri.rest.support.ImagePixelLocationParameters")], c7);
  814. var a4 = c7;
  815. // node_modules/@arcgis/core/rest/support/ImageSampleParameters.js
  816. var d11;
  817. var j5 = d11 = class extends l {
  818. constructor() {
  819. super(...arguments), this.geometry = null, this.interpolation = "nearest", this.mosaicRule = null, this.outFields = null, this.pixelSize = null, this.returnFirstValueOnly = true, this.sampleDistance = null, this.sampleCount = null, this.sliceId = null, this.timeExtent = null;
  820. }
  821. writeGeometry(t4, e6, o7) {
  822. t4 != null && (e6.geometryType = v4(t4), e6[o7] = t4.toJSON());
  823. }
  824. set locations(t4) {
  825. if (t4?.length) {
  826. const e6 = new m2({ spatialReference: t4[0].spatialReference });
  827. e6.points = t4.map((t5) => [t5.x, t5.y]), this._set("locations", t4), this.geometry = e6;
  828. }
  829. }
  830. clone() {
  831. return new d11(m({ geometry: this.geometry, locations: this.locations, interpolation: this.interpolation, mosaicRule: this.mosaicRule, outFields: this.outFields, raster: this.raster, returnFirstValueOnly: this.returnFirstValueOnly, sampleDistance: this.sampleDistance, sampleCount: this.sampleCount, sliceId: this.sliceId, pixelSize: this.pixelSize, timeExtent: this.timeExtent }));
  832. }
  833. };
  834. e([d({ types: i, json: { read: d2 } })], j5.prototype, "geometry", void 0), e([r2("geometry")], j5.prototype, "writeGeometry", null), e([d()], j5.prototype, "locations", null), e([d({ type: String, json: { type: o6.jsonValues, read: o6.read, write: o6.write } })], j5.prototype, "interpolation", void 0), e([d({ type: y5, json: { write: true } })], j5.prototype, "mosaicRule", void 0), e([d({ type: [String], json: { write: true } })], j5.prototype, "outFields", void 0), e([d({ type: j, json: { write: true } })], j5.prototype, "pixelSize", void 0), e([d({ type: String, json: { write: true } })], j5.prototype, "raster", void 0), e([d({ type: Boolean, json: { write: true } })], j5.prototype, "returnFirstValueOnly", void 0), e([d({ type: Number, json: { write: true } })], j5.prototype, "sampleDistance", void 0), e([d({ type: Number, json: { write: true } })], j5.prototype, "sampleCount", void 0), e([d({ type: Number, json: { write: true } })], j5.prototype, "sliceId", void 0), e([d({ type: y2, json: { read: { source: "time" }, write: { target: "time" } } })], j5.prototype, "timeExtent", void 0), j5 = d11 = e([n("esri.rest.support.ImageSampleParameters")], j5);
  835. var h5 = j5;
  836. // node_modules/@arcgis/core/layers/mixins/ArcGISImageService.js
  837. var Re = s.getLogger("esri.layers.mixins.ArcGISImageService");
  838. var ve = o2()({ 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" });
  839. var Se = new Set(["png", "png8", "png24", "png32", "jpg", "bmp", "gif", "jpgpng", "lerc", "tiff"]);
  840. var be = v2(a, { min: 0, max: 255 });
  841. function Ie(e6) {
  842. if (!e6)
  843. return null;
  844. const t4 = JSON.stringify(e6).match(/"rasterFunction":"(.*?")/gi)?.map((e7) => e7.replace('"rasterFunction":"', "").replace('"', ""));
  845. return t4 ? t4.join("/") : null;
  846. }
  847. var xe = (a5) => {
  848. let u8 = class extends a5 {
  849. constructor() {
  850. super(...arguments), this._functionRasterInfos = {}, this._rasterJobHandler = { instance: null, refCount: 0, connectionPromise: null }, this._defaultServiceMosaicRule = null, this._serviceSourceType = null, this._serviceSupportsMosaicRule = null, this.rasterAttributeTableFieldPrefix = "Raster.", this.adjustAspectRatio = null, this.bandCount = null, this.bandIds = void 0, this.capabilities = null, this.compressionQuality = void 0, this.compressionTolerance = 0.01, this.copyright = null, this.definitionExpression = null, this.exportImageServiceParameters = null, this.rasterInfo = null, this.fields = null, this.fullExtent = null, this.hasMultidimensions = false, this.imageMaxHeight = 4100, this.imageMaxWidth = 4100, this.interpolation = void 0, this.minScale = 0, this.maxScale = 0, this.multidimensionalInfo = null, this.noData = null, this.noDataInterpretation = void 0, this.objectIdField = null, this.geometryType = "polygon", this.typeIdField = null, this.types = [], this.pixelSizeX = null, this.pixelSizeY = null, this.pixelFilter = null, this.raster = void 0, this.viewId = void 0, this.symbolizer = null, this.rasterAttributeTable = 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;
  851. }
  852. initialize() {
  853. this._set("exportImageServiceParameters", new d7({ layer: this }));
  854. }
  855. readDefaultServiceMosaicRule(e6, t4) {
  856. return this._serviceSupportsMosaicRule ? y5.fromJSON(t4) : null;
  857. }
  858. readServiceSourceType(e6, t4) {
  859. return this._isMosaicDataset(t4) ? "mosaic-dataset" : "raster-dataset";
  860. }
  861. readServiceSupportsMosaicRule(e6, t4) {
  862. return this._isMosaicRuleSupported(t4);
  863. }
  864. get rasterFunctionNamesIndex() {
  865. const e6 = new Map();
  866. return !this.rasterFunctionInfos || r(this.rasterFunctionInfos) && this.rasterFunctionInfos.length < 1 || r(this.rasterFunctionInfos) && this.rasterFunctionInfos.forEach((t4) => {
  867. e6.set(t4.name.toLowerCase().replace(/ /gi, "_"), t4.name);
  868. }), e6;
  869. }
  870. readBandIds(e6, t4) {
  871. if (Array.isArray(e6) && e6.length > 0 && e6.every((e7) => typeof e7 == "number"))
  872. return e6;
  873. }
  874. readCapabilities(e6, t4) {
  875. return this._readCapabilities(t4);
  876. }
  877. writeCompressionQuality(e6, t4, r4) {
  878. e6 != null && this.format !== "lerc" && (t4[r4] = e6);
  879. }
  880. writeCompressionTolerance(e6, t4, r4) {
  881. this.format === "lerc" && e6 != null && (t4[r4] = e6);
  882. }
  883. get fieldsIndex() {
  884. return this.fields ? new d3(this.fields) : null;
  885. }
  886. set format(e6) {
  887. e6 && Se.has(e6.toLowerCase()) && this._set("format", e6.toLowerCase());
  888. }
  889. readFormat(e6, t4) {
  890. return t4.serviceDataType === "esriImageServiceDataTypeVector-UV" || t4.serviceDataType === "esriImageServiceDataTypeVector-MagDir" || this.pixelFilter != null ? "lerc" : "jpgpng";
  891. }
  892. readMinScale(e6, t4) {
  893. return t4.minLOD != null && t4.maxLOD != null ? e6 : 0;
  894. }
  895. readMaxScale(e6, t4) {
  896. return t4.minLOD != null && t4.maxLOD != null ? e6 : 0;
  897. }
  898. set mosaicRule(e6) {
  899. let t4 = e6;
  900. t4 && t4.mosaicMethod && (t4 = y5.fromJSON({ ...t4.toJSON(), mosaicMethod: t4.mosaicMethod, mosaicOperation: t4.mosaicOperation })), this._set("mosaicRule", t4);
  901. }
  902. readMosaicRule(e6, t4) {
  903. const r4 = e6 || t4.mosaicRule;
  904. return r4 ? y5.fromJSON(r4) : this._isMosaicRuleSupported(t4) ? y5.fromJSON(t4) : null;
  905. }
  906. writeMosaicRule(e6, t4, r4) {
  907. let i7 = this.mosaicRule;
  908. const s6 = this.definitionExpression;
  909. i7 ? s6 && s6 !== i7.where && (i7 = i7.clone(), i7.where = s6) : s6 && (i7 = new y5({ where: s6 })), this._isValidCustomizedMosaicRule(i7) && (t4[r4] = i7.toJSON());
  910. }
  911. writeNoData(e6, t4, r4) {
  912. e6 != null && typeof e6 == "number" && (t4[r4] = be(e6));
  913. }
  914. readObjectIdField(e6, t4) {
  915. if (!e6) {
  916. const r4 = t4.fields.filter((e7) => e7.type === "esriFieldTypeOID" || e7.type === "oid");
  917. e6 = r4 && r4[0] && r4[0].name;
  918. }
  919. return e6;
  920. }
  921. get parsedUrl() {
  922. return this.url ? j2(this.url) : null;
  923. }
  924. set renderer(e6) {
  925. this.loaded && (e6 = this._configRenderer(e6)), this._set("renderer", e6);
  926. }
  927. readRenderer(e6, t4, i7) {
  928. const s6 = t4?.layerDefinition?.drawingInfo?.renderer, n9 = u3(s6, i7);
  929. return n9 == null ? null : (n9.type === "vector-field" && t4.symbolTileSize && !s6.symbolTileSize && (n9.symbolTileSize = t4.symbolTileSize), f5(n9) || Re.warn("ArcGISImageService", "Imagery layer doesn't support given renderer type."), n9);
  930. }
  931. writeRenderer(e6, t4, r4) {
  932. t4.layerDefinition = t4.layerDefinition || {}, t4.layerDefinition.drawingInfo = t4.layerDefinition.drawingInfo || {}, t4.layerDefinition.drawingInfo.renderer = e6.toJSON(), e6.type === "vector-field" && (t4.symbolTileSize = e6.symbolTileSize);
  933. }
  934. get rasterFields() {
  935. const e6 = this.rasterAttributeTableFieldPrefix || "Raster.", t4 = new y({ name: "Raster.ItemPixelValue", alias: "Item Pixel Value", domain: null, editable: false, length: 50, type: "string" }), r4 = new y({ name: "Raster.ServicePixelValue", alias: "Service Pixel Value", domain: null, editable: false, length: 50, type: "string" }), i7 = new y({ name: "Raster.ServicePixelValue.Raw", alias: "Raw Service Pixel Value", domain: null, editable: false, length: 50, type: "string" });
  936. let s6 = this.fields ? m(this.fields) : [];
  937. s6.push(r4), this.capabilities.operations.supportsQuery && this.fields && this.fields.length > 0 && s6.push(t4), this.version >= 10.4 && r(this.rasterFunctionInfos) && this.rasterFunctionInfos.some((e7) => e7.name.toLowerCase() === "none") && s6.push(i7), r(this.rasterFunctionInfos) && this.rasterFunctionInfos.filter((e7) => e7.name.toLowerCase() !== "none").forEach((e7) => {
  938. s6.push(new y({ name: "Raster.ServicePixelValue." + e7.name, alias: e7.name, domain: null, editable: false, length: 50, type: "string" }));
  939. }), this._isVectorDataSet() && (s6.push(new y({ name: "Raster.Magnitude", alias: "Magnitude", domain: null, editable: false, type: "double" })), s6.push(new y({ name: "Raster.Direction", alias: "Direction", domain: null, editable: false, type: "double" })));
  940. const n9 = this.rasterInfo.attributeTable && this.rasterInfo.attributeTable.fields || null;
  941. if (n9 && n9.length > 0) {
  942. const t5 = n9.filter((e7) => e7.type !== "esriFieldTypeOID" && e7.name.toLowerCase() !== "value").map((t6) => {
  943. const r5 = m(t6);
  944. return r5.name = e6 + t6.name, r5;
  945. });
  946. s6 = s6.concat(t5);
  947. }
  948. return s6;
  949. }
  950. set renderingRule(e6) {
  951. let t4 = e6;
  952. t4 && t4.rasterFunction && (t4 = w3.fromJSON({ ...t4.toJSON(), rasterFunction: t4.rasterFunction, rasterFunctionArguments: t4.rasterFunctionArguments })), this._set("renderingRule", t4);
  953. }
  954. readRenderingRule(e6, t4) {
  955. const r4 = t4.rasterFunctionInfos;
  956. return t4.renderingRule || r4 && r4.length && r4[0].name !== "None" ? this._isRFTJson(t4.renderingRule) ? w3.fromJSON({ rasterFunctionDefinition: t4.renderingRule }) : w3.fromJSON(t4.renderingRule || { rasterFunctionInfos: t4.rasterFunctionInfos }) : null;
  957. }
  958. writeRenderingRule(e6, t4, r4) {
  959. const i7 = e6.toJSON();
  960. i7.rasterFunctionDefinition ? t4[r4] = i7.rasterFunctionDefinition : t4[r4] = i7;
  961. }
  962. readSpatialReference(e6, t4) {
  963. const r4 = e6 || t4.extent.spatialReference;
  964. return r4 ? k.fromJSON(r4) : null;
  965. }
  966. readPixelType(e6) {
  967. return ve.fromJSON(e6) || e6;
  968. }
  969. writePixelType(e6, t4, r4) {
  970. (t(this.serviceRasterInfo) || this.pixelType !== this.serviceRasterInfo.pixelType) && (t4[r4] = ve.toJSON(e6));
  971. }
  972. readVersion(e6, t4) {
  973. let r4 = t4.currentVersion;
  974. return r4 || (r4 = t4.hasOwnProperty("fields") || t4.hasOwnProperty("timeInfo") ? 10 : 9.3), r4;
  975. }
  976. applyFilter(e6) {
  977. let t4 = e6;
  978. return this.pixelFilter && (t4 = this._clonePixelData(e6), this.pixelFilter(t4)), t4;
  979. }
  980. async applyRenderer(e6, t4) {
  981. let r4 = e6;
  982. if (!this._isPicture() && this.renderer && this.symbolizer && !this.pixelFilter) {
  983. const i7 = JSON.stringify(this._cachedRendererJson) !== JSON.stringify(this.renderer.toJSON()), s6 = this._rasterJobHandler.instance, { bandIds: n9 } = this;
  984. if (s6) {
  985. i7 && (this.symbolizer.bind(), await s6.updateSymbolizer(this.symbolizer, t4), this._cachedRendererJson = this.renderer.toJSON());
  986. const o7 = await s6.symbolize({ bandIds: n9, ...e6 }, t4);
  987. r4 = { extent: e6.extent, pixelBlock: o7 };
  988. } else
  989. r4 = { extent: e6.extent, pixelBlock: this.symbolizer.symbolize({ bandIds: n9, ...e6 }) };
  990. }
  991. return r4;
  992. }
  993. destroy() {
  994. this._shutdownJobHandler();
  995. }
  996. increaseRasterJobHandlerUsage() {
  997. this._rasterJobHandler.refCount++;
  998. }
  999. decreaseRasterJobHandlerUsage() {
  1000. this._rasterJobHandler.refCount--, this._rasterJobHandler.refCount <= 0 && this._shutdownJobHandler();
  1001. }
  1002. async computeAngles(e6, t4) {
  1003. if (await this._fetchCapabilities(t4?.signal), !this.capabilities.operations.supportsComputeAngles)
  1004. throw new s2("imagery-layer:compute-angles", "this operation is not supported on the input image service");
  1005. return e6 = v(l8, e6).clone(), f6(this.url, e6, this._getRequestOptions(t4));
  1006. }
  1007. async computePixelSpaceLocations(e6, t4) {
  1008. if (await this._fetchCapabilities(t4?.signal), !this.capabilities.operations.supportsComputePixelLocation)
  1009. throw new s2("imagery-layer:compute-pixel-space-locations", "this operation is not supported on the input image service");
  1010. return e6 = v(a4, e6).clone(), g3(this.url, e6, this._getRequestOptions(t4));
  1011. }
  1012. async computeHistograms(e6, t4) {
  1013. if (await this._fetchCapabilities(t4?.signal), !this.capabilities.operations.supportsComputeHistograms)
  1014. throw new s2("imagery-layer:compute-histograms", "this operation is not supported on the input image service");
  1015. e6 = v(d9, e6).clone();
  1016. const { raster: r4, mosaicRule: i7, renderingRule: s6 } = this;
  1017. return s6 && e6.renderingRule == null && (e6.renderingRule = s6), i7 && e6.mosaicRule == null && (e6.mosaicRule = i7), r4 && e6.raster == null && (e6.raster = r4), d8(this.url, e6, this._getRequestOptions(t4));
  1018. }
  1019. async computeStatisticsHistograms(e6, t4) {
  1020. if (await this._fetchCapabilities(t4?.signal), !this.capabilities.operations.supportsComputeStatisticsHistograms)
  1021. throw new s2("imagery-layer:compute-statistics-histograms", "this operation is not supported on the input image service");
  1022. e6 = v(d9, e6).clone();
  1023. const { raster: r4, mosaicRule: i7, renderingRule: s6 } = this;
  1024. return s6 && e6.renderingRule == null && (e6.renderingRule = s6), i7 && e6.mosaicRule == null && (e6.mosaicRule = i7), r4 && e6.raster == null && (e6.raster = r4), y6(this.url, e6, this._getRequestOptions(t4));
  1025. }
  1026. getField(e6) {
  1027. const { fieldsIndex: t4 } = this;
  1028. return r(t4) ? t4.get(e6) : void 0;
  1029. }
  1030. getFieldDomain(e6, t4) {
  1031. const r4 = this.getField(e6);
  1032. return r4 ? r4.domain : null;
  1033. }
  1034. fetchImage(e6, t4, r4, i7 = {}) {
  1035. if (e6 == null || t4 == null || r4 == null)
  1036. return Promise.reject(new s2("imagery-layer:fetch-image", "Insufficient parameters for requesting an image. A valid extent, width and height values are required."));
  1037. const s6 = this.renderer || this.symbolizer ? this.generateRasterInfo(this.renderingRule, { signal: i7.signal }) : null;
  1038. return $(s6).then((s7) => {
  1039. s7 && (this.rasterInfo = s7);
  1040. const n9 = { imageServiceParameters: this.getExportImageServiceParameters(e6, t4, r4, i7.timeExtent), imageProps: { extent: e6, width: t4, height: r4, format: this.format }, requestAsImageElement: i7.requestAsImageElement && !this.pixelFilter || false, signal: i7.signal };
  1041. return this._requestArrayBuffer(n9);
  1042. });
  1043. }
  1044. fetchKeyProperties(e6) {
  1045. return U(this.parsedUrl.path + "/keyProperties", { query: this._getQueryParams({ renderingRule: this.version >= 10.3 ? e6?.renderingRule : null }) }).then((e7) => e7.data);
  1046. }
  1047. fetchRasterAttributeTable(e6) {
  1048. return this.version < 10.1 ? Promise.reject(new s2("#fetchRasterAttributeTable()", "Failed to get rasterAttributeTable")) : U(this.parsedUrl.path + "/rasterAttributeTable", { query: this._getQueryParams({ renderingRule: this.version >= 10.3 ? e6?.renderingRule : null }) }).then((e7) => x.fromJSON(e7.data));
  1049. }
  1050. getCatalogItemRasterInfo(e6, t4) {
  1051. const r4 = { ...t4, query: this._getQueryParams() };
  1052. return n7(this.parsedUrl.path, e6, r4);
  1053. }
  1054. async getCatalogItemICSInfo(e6, t4) {
  1055. const { data: r4 } = await U(this.parsedUrl.path + "/" + e6 + "/info/ics", { query: this._getQueryParams(), ...t4 }), i7 = r4 && r4.ics;
  1056. if (!i7)
  1057. return;
  1058. let s6 = null;
  1059. try {
  1060. s6 = (await U(this.parsedUrl.path + "/" + e6 + "/info", { query: this._getQueryParams(), ...t4 })).data.extent;
  1061. } catch {
  1062. }
  1063. if (!s6 || !s6.spatialReference)
  1064. return { ics: i7, icsToPixelTransform: null, icsExtent: null, northDirection: null };
  1065. const o7 = this.version >= 10.7 ? U(this.parsedUrl.path + "/" + e6 + "/info/icstopixel", { query: this._getQueryParams(), ...t4 }).then((e7) => e7.data).catch(() => ({})) : {}, a6 = s6.spatialReference, l9 = { geometries: JSON.stringify({ geometryType: "esriGeometryEnvelope", geometries: [s6] }), inSR: a6.wkid || JSON.stringify(a6), outSR: "0:" + e6 }, u9 = U(this.parsedUrl.path + "/project", { query: this._getQueryParams(l9), ...t4 }).then((e7) => e7.data).catch(() => ({})), p13 = 5, c8 = (s6.xmin + s6.xmax) / 2, m9 = (s6.ymax - s6.ymin) / (p13 + 1), d12 = s6.ymin + m9, h6 = [];
  1066. for (let n9 = 0; n9 < p13; n9++)
  1067. h6.push({ x: c8, y: d12 + m9 * n9 });
  1068. const f7 = { geometries: JSON.stringify({ geometryType: "esriGeometryPoint", geometries: h6 }), inSR: a6.wkid || JSON.stringify(a6), outSR: "0:" + e6 }, y9 = U(this.parsedUrl.path + "/project", { query: this._getQueryParams(f7), ...t4 }).then((e7) => e7.data).catch(() => ({})), g4 = await Promise.all([o7, u9, y9]);
  1069. let R4 = g4[0].ipxf;
  1070. if (R4 == null) {
  1071. const e7 = i7.geodataXform?.xf_0;
  1072. e7?.name?.toLowerCase() === "topup" && e7?.coefficients?.length === 6 && (R4 = { affine: { name: "ics [sensor: Frame] to pixel (column, row) transformation", coefficients: e7.coefficients, cellsizeRatio: 0, type: "GeometricXform" } });
  1073. }
  1074. const v7 = M.fromJSON(g4[1] && g4[1].geometries && g4[1].geometries[0]);
  1075. v7 && (v7.spatialReference = new k({ wkid: 0, imageCoordinateSystem: i7 }));
  1076. const S5 = g4[2].geometries ? g4[2].geometries.filter((e7) => e7 != null && e7.x != null && e7.y != null && e7.x !== "NaN" && e7.y !== "NaN") : [], b4 = S5.length;
  1077. if (b4 < 3)
  1078. return { ics: i7, icsToPixelTransform: R4, icsExtent: v7, northDirection: null };
  1079. let I = 0, x3 = 0, w6 = 0, _2 = 0;
  1080. for (let n9 = 0; n9 < b4; n9++)
  1081. I += S5[n9].x, x3 += S5[n9].y, w6 += S5[n9].x * S5[n9].x, _2 += S5[n9].x * S5[n9].y;
  1082. const F3 = (b4 * _2 - I * x3) / (b4 * w6 - I * I);
  1083. let D = 0;
  1084. const j6 = S5[p13 - 1].x > S5[0].x, T3 = S5[p13 - 1].y > S5[0].y;
  1085. return F3 === 1 / 0 ? D = T3 ? 90 : 270 : F3 === 0 ? D = j6 ? 0 : 180 : F3 > 0 ? D = j6 ? 180 * Math.atan(F3) / Math.PI : 180 * Math.atan(F3) / Math.PI + 180 : F3 < 0 && (D = T3 ? 180 + 180 * Math.atan(F3) / Math.PI : 360 + 180 * Math.atan(F3) / Math.PI), { ics: i7, icsToPixelTransform: R4, icsExtent: v7, northDirection: D };
  1086. }
  1087. async generateRasterInfo(e6, t4) {
  1088. if ((!e6 || e6?.functionName?.toLowerCase() === "none" || this._isVectorFieldResampleFunction(e6)) && r(this.serviceRasterInfo))
  1089. return this.serviceRasterInfo;
  1090. const r4 = Ie(e6);
  1091. if (this._functionRasterInfos[r4])
  1092. return this._functionRasterInfos[r4];
  1093. const i7 = this._generateRasterInfo(e6, t4);
  1094. this._functionRasterInfos[r4] = i7;
  1095. try {
  1096. return await i7;
  1097. } catch {
  1098. return this._functionRasterInfos[r4] = null, null;
  1099. }
  1100. }
  1101. getExportImageServiceParameters(e6, t4, r4, i7) {
  1102. e6 = e6.clone().shiftCentralMeridian();
  1103. const s6 = R3(e6.spatialReference, this.parsedUrl.path);
  1104. r(this.serviceRasterInfo) && this.pixelType !== this.serviceRasterInfo.pixelType && (this.exportImageServiceParameters.pixelType = this.pixelType);
  1105. const n9 = this.exportImageServiceParameters.toJSON(), { bandIds: o7, noData: a6 } = n9;
  1106. let { renderingRule: l9 } = n9;
  1107. const u9 = this.renderingRule?.rasterFunctionDefinition, c8 = !this.renderer || this.renderer.type === "raster-stretch";
  1108. if (o7?.length && this._hasRenderingRule(this.renderingRule) && !u9 && c8) {
  1109. const e7 = { rasterFunction: "ExtractBand", rasterFunctionArguments: { BandIds: o7 } };
  1110. if (l9.rasterFunction === "Stretch")
  1111. e7.rasterFunctionArguments.Raster = l9.rasterFunctionArguments.Raster, l9.rasterFunctionArguments.Raster = e7;
  1112. else if (l9.rasterFunction === "Colormap") {
  1113. const t5 = l9.rasterFunctionArguments.Raster;
  1114. t5?.rasterFunction === "Stretch" ? (e7.rasterFunctionArguments.Raster = t5.rasterFunctionArguments.Raster, t5.rasterFunctionArguments.Raster = e7) : (e7.rasterFunctionArguments.Raster = t5, l9.rasterFunctionArguments.Raster = e7);
  1115. } else
  1116. e7.rasterFunctionArguments.Raster = l9, l9 = e7;
  1117. n9.bandIds = void 0;
  1118. } else
  1119. n9.bandIds = o7?.join(",");
  1120. a6 instanceof Array && a6.length > 0 && (n9.noData = a6.join(","));
  1121. const m9 = this._serviceSupportsMosaicRule ? this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule, i7) : null;
  1122. n9.mosaicRule = m9 && JSON.stringify(m9), n9.renderingRule = this._getRenderingRuleString(w3.fromJSON(l9));
  1123. const d12 = {};
  1124. if (i7) {
  1125. const { start: e7, end: t5 } = i7.toJSON();
  1126. e7 && t5 && e7 === t5 ? d12.time = "" + e7 : e7 == null && t5 == null || (d12.time = `${e7 == null ? "null" : e7},${t5 == null ? "null" : t5}`);
  1127. }
  1128. return { bbox: e6.xmin + "," + e6.ymin + "," + e6.xmax + "," + e6.ymax, bboxSR: s6, imageSR: s6, size: t4 + "," + r4, ...n9, ...d12 };
  1129. }
  1130. async getSamples(e6, t4) {
  1131. if (await this._fetchCapabilities(t4?.signal), !this.capabilities.operations.supportsGetSamples)
  1132. throw new s2("imagery-layer:get-samples", "getSamples operation is not supported on the input image service");
  1133. e6 = v(h5, e6).clone();
  1134. const { raster: r4 } = this;
  1135. return r4 && e6.raster == null && (e6.raster = r4), N2(this.url, e6, this._getRequestOptions(t4));
  1136. }
  1137. async identify(e6, t4) {
  1138. if (await this._fetchCapabilities(t4?.signal), !this.capabilities.operations.supportsIdentify)
  1139. throw new s2("imagery-layer:query-rasters", "query operation is not supported on the input image service");
  1140. e6 = v(d10, e6).clone();
  1141. const { raster: r4, mosaicRule: i7, renderingRule: s6 } = this;
  1142. if (s6 && e6.renderingRule == null && (e6.renderingRule = s6), i7 && e6.mosaicRule == null) {
  1143. const t5 = this._combineMosaicRuleWithTimeExtent(i7, e6.timeExtent);
  1144. e6.mosaicRule = e2(t5);
  1145. }
  1146. return r4 && e6.raster == null && (e6.raster = r4), S4(this.url, e6, this._getRequestOptions(t4));
  1147. }
  1148. createQuery() {
  1149. const e6 = new b();
  1150. return e6.outFields = ["*"], e6.returnGeometry = true, e6.where = this.definitionExpression || "1=1", e6;
  1151. }
  1152. async queryRasters(e6, t4) {
  1153. return { query: e6, requestOptions: t4 } = await this._prepareForQuery(e6, t4), s4(this.url, e6, t4);
  1154. }
  1155. async queryObjectIds(e6, t4) {
  1156. return { query: e6, requestOptions: t4 } = await this._prepareForQuery(e6, t4), s5(this.url, e6, t4);
  1157. }
  1158. async queryRasterCount(e6, t4) {
  1159. return { query: e6, requestOptions: t4 } = await this._prepareForQuery(e6, t4), n4(this.url, e6, t4);
  1160. }
  1161. async queryVisibleRasters(e6, t4) {
  1162. if (!e6)
  1163. throw new s2("imagery-layer: query-visible-rasters", "missing query parameter");
  1164. const { pixelSize: r4, returnDomainValues: i7, returnTopmostRaster: s6, showNoDataRecords: n9 } = t4 || { pixelSize: null, returnDomainValues: false, returnTopmostRaster: false, showNoDataRecords: false };
  1165. let a6 = false, l9 = null, u9 = null;
  1166. const m9 = "raster.servicepixelvalue", d12 = this.rasterFunctionNamesIndex;
  1167. if (r(e6.outFields) && (a6 = e6.outFields.some((e7) => !e7.toLowerCase().includes(m9)), this.version >= 10.4)) {
  1168. const t5 = e6.outFields.filter((e7) => e7.toLowerCase().includes(m9) && e7.length > m9.length).map((e7) => {
  1169. const t6 = e7.slice(m9.length + 1);
  1170. return [this._updateRenderingRulesFunctionName(t6, d12), t6];
  1171. });
  1172. l9 = t5.map((e7) => new w3({ functionName: e7[0] })), u9 = t5.map((e7) => e7[1]), l9.length === 0 ? this.renderingRule ? (l9.push(this.renderingRule), u9.push(this.renderingRule.functionName)) : l9 = null : this.renderingRule && !l9.some((e7) => e7.functionName === this.renderingRule.functionName) && (l9.push(this.renderingRule), u9.push(this.renderingRule.functionName));
  1173. }
  1174. const h6 = t(e6.outSpatialReference) || e6.outSpatialReference.equals(this.spatialReference), f7 = e6.timeExtent || this.timeExtent, y9 = this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule, f7), g4 = this._getQueryParams({ geometry: e6.geometry, timeExtent: f7, mosaicRule: y9, renderingRule: this.version < 10.4 ? this.renderingRule : null, renderingRules: l9, pixelSize: r4, returnCatalogItems: a6, returnGeometry: h6, raster: this.raster, maxItemCount: s6 ? 1 : null });
  1175. delete g4.f;
  1176. const R4 = new d10(g4);
  1177. try {
  1178. await this.generateRasterInfo(this.renderingRule);
  1179. const r5 = await S4(this.url, R4, { signal: t4?.signal, query: { ...this.customParameters } }), s7 = e6.outFields, o7 = r5.value.toLowerCase().includes("nodata");
  1180. if (!(a6 && !h6 && r5?.catalogItems?.features.length && (n9 || !o7)))
  1181. return this._processVisibleRastersResponse(r5, { returnDomainValues: i7, templateRRFunctionNames: u9, showNoDataRecords: n9, templateFields: s7 });
  1182. const l10 = this.objectIdField || "ObjectId", c8 = r5.catalogItems.features, m10 = c8.map((e7) => e7.attributes?.[l10]), d13 = new b({ objectIds: m10, returnGeometry: true, outSpatialReference: e6.outSpatialReference, outFields: [l10] }), f8 = await this.queryRasters(d13);
  1183. return f8?.features?.length && f8.features.forEach((t5) => {
  1184. c8.forEach((r6) => {
  1185. r6.attributes[l10] === t5.attributes[l10] && (r6.geometry = new v3(t5.geometry), r(e6.outSpatialReference) && (r6.geometry.spatialReference = e6.outSpatialReference));
  1186. });
  1187. }), this._processVisibleRastersResponse(r5, { returnDomainValues: i7, templateRRFunctionNames: u9, showNoDataRecords: n9, templateFields: s7 });
  1188. } catch {
  1189. throw new s2("imagery-layer:query-visible-rasters", "encountered error when querying visible rasters");
  1190. }
  1191. }
  1192. async fetchVariableStatisticsHistograms(e6, t4) {
  1193. const r4 = U(this.parsedUrl.path + "/statistics", { query: this._getQueryParams({ variable: e6 }), signal: t4 }).then((e7) => e7.data?.statistics), i7 = U(this.parsedUrl.path + "/histograms", { query: this._getQueryParams({ variable: e6 }), signal: t4 }).then((e7) => e7.data?.histograms), s6 = await Promise.all([r4, i7]);
  1194. return s6[0] && s6[0].forEach((e7) => {
  1195. e7.avg = e7.mean, e7.stddev = e7.standardDeviation;
  1196. }), { statistics: s6[0] || null, histograms: s6[1] || null };
  1197. }
  1198. async createFlowMesh(e6, t4) {
  1199. const r4 = this._rasterJobHandler.instance;
  1200. return r4 ? r4.createFlowMesh(e6, t4) : u4(e6.meshType, e6.simulationSettings, e6.flowData, r(t4.signal) ? t4.signal : new AbortController().signal);
  1201. }
  1202. async _fetchService(e6) {
  1203. await this._fetchServiceInfo(e6), r(this.serviceRasterInfo) && !this.rasterInfo && (this.rasterInfo = this.serviceRasterInfo);
  1204. const t4 = this.sourceJSON, r4 = r(this.serviceRasterInfo) ? Promise.resolve(this.serviceRasterInfo) : m3(this.parsedUrl.path, t4, { signal: e6, query: this._getQueryParams() }).then((e7) => (this._set("serviceRasterInfo", e7), e7)), i7 = this._hasRenderingRule(this.renderingRule) ? this.generateRasterInfo(this.renderingRule, { signal: e6 }) : null, s6 = this._getRasterFunctionInfos();
  1205. return Promise.all([r4, i7, s6]).then((e7) => {
  1206. e7[1] ? this._set("rasterInfo", e7[1]) : this._set("rasterInfo", e7[0]), e7[2] && this._set("rasterFunctionInfos", e7[2]), this.renderer && !this._isSupportedRenderer(this.renderer) && (this._set("renderer", null), Re.warn("ArcGISImageService", "Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")), this._set("renderer", this._configRenderer(this.renderer)), this.own(l2(() => this.renderingRule, (e8) => {
  1207. (this.renderer || this.symbolizer || this.popupEnabled && this.popupTemplate) && this.generateRasterInfo(e8).then((e9) => {
  1208. e9 && (this.rasterInfo = e9);
  1209. });
  1210. }));
  1211. const { serviceRasterInfo: t5 } = this;
  1212. r(t5) && t5.multidimensionalInfo && this._updateMultidimensionalDefinition(t5);
  1213. });
  1214. }
  1215. _combineMosaicRuleWithTimeExtent(e6, t4) {
  1216. const r4 = this.timeInfo;
  1217. if (t(e6) || t(this.multidimensionalInfo) || t(t4) || t(r4?.startField))
  1218. return e6;
  1219. const { startField: i7 } = r4, s6 = this.multidimensionalInfo.variables.some((e7) => e7.dimensions.some((e8) => e8.name === i7)) ? i7 : "StdTime";
  1220. if (e6 = e6.clone(), this._serviceSourceType === "mosaic-dataset")
  1221. return e6.multidimensionalDefinition = e6.multidimensionalDefinition?.filter((e7) => e7.dimensionName !== s6), this._cleanupMultidimensionalDefinition(e6);
  1222. e6.multidimensionalDefinition = e6.multidimensionalDefinition || [];
  1223. const n9 = e6.multidimensionalDefinition.filter((e7) => e7.dimensionName === s6), o7 = r(t4.start) ? t4.start.getTime() : null, a6 = r(t4.end) ? t4.end.getTime() : null, l9 = o7 == null || a6 == null || o7 === a6, u9 = l9 ? [o7 || a6] : [[o7, a6]], m9 = this.version >= 10.8;
  1224. if (n9.length)
  1225. n9.forEach((e7) => {
  1226. e7.dimensionName === s6 && (m9 ? (e7.dimensionName = null, e7.isSlice = null, e7.values = null) : (e7.isSlice = l9, e7.values = u9));
  1227. });
  1228. else if (!m9) {
  1229. const t5 = e6.multidimensionalDefinition.filter((e7) => e7.variableName != null && e7.dimensionName == null);
  1230. t5.length ? t5.forEach((e7) => {
  1231. e7.dimensionName = s6, e7.isSlice = l9, e7.values = u9;
  1232. }) : e6.multidimensionalDefinition.push(new p3({ variableName: "", dimensionName: s6, isSlice: l9, values: u9 }));
  1233. }
  1234. return this._cleanupMultidimensionalDefinition(e6);
  1235. }
  1236. _cleanupMultidimensionalDefinition(e6) {
  1237. return t(e6) ? null : (e6.multidimensionalDefinition && (e6.multidimensionalDefinition = e6.multidimensionalDefinition.filter((e7) => !(!e7.variableName && !e7.dimensionName)), e6.multidimensionalDefinition.length === 0 && (e6.multidimensionalDefinition = null)), this._serviceSourceType !== "mosaic-dataset" && e6.multidimensionalDefinition == null ? null : e6);
  1238. }
  1239. async _prepareForQuery(e6, t4) {
  1240. if (await this._fetchCapabilities(t4?.signal), !this.capabilities.operations.supportsQuery)
  1241. throw new s2("imagery-layer:query-rasters", "query operation is not supported on the input image service");
  1242. return e6 = r(e6) ? v(b, e6) : this.createQuery(), t4 = this._getRequestOptions(t4), this.raster && (t4.query = { ...t4.query, raster: this.raster }), { query: e6, requestOptions: t4 };
  1243. }
  1244. async _initJobHandler() {
  1245. if (this._rasterJobHandler.connectionPromise != null)
  1246. return this._rasterJobHandler.connectionPromise;
  1247. const e6 = new n6();
  1248. this._rasterJobHandler.connectionPromise = e6.initialize().then(() => {
  1249. this._rasterJobHandler.instance = e6;
  1250. }, () => null), await this._rasterJobHandler.connectionPromise;
  1251. }
  1252. _shutdownJobHandler() {
  1253. this._rasterJobHandler.instance && this._rasterJobHandler.instance.destroy(), this._rasterJobHandler.instance = null, this._rasterJobHandler.connectionPromise = null, this._rasterJobHandler.refCount = 0, this._cachedRendererJson = null;
  1254. }
  1255. _isSupportedRenderer(e6) {
  1256. const { rasterInfo: t4, renderingRule: r4 } = this;
  1257. return e6.type === "unique-value" && this._hasRenderingRule(r4) && t4.bandCount === 1 && ["u8", "s8"].includes(t4.pixelType) || V(this.rasterInfo).includes(this.renderer.type);
  1258. }
  1259. async _fetchCapabilities(e6) {
  1260. return this.capabilities || await this._fetchServiceInfo(e6), this.capabilities;
  1261. }
  1262. async _fetchServiceInfo(e6) {
  1263. let t4 = this.sourceJSON;
  1264. if (!t4) {
  1265. const { data: r4, ssl: i7 } = await U(this.parsedUrl.path, { query: this._getQueryParams(), signal: e6 });
  1266. t4 = r4, this.sourceJSON = t4, i7 && (this.url = this.url.replace(/^http:/i, "https:"));
  1267. }
  1268. if (t4.capabilities?.toLowerCase().split(",").map((e7) => e7.trim()).indexOf("tilesonly") > -1)
  1269. throw new s2("imagery-layer:fetch-service-info", "use ImageryTileLayer to open tiles-only image services");
  1270. this.read(t4, { origin: "service", url: this.parsedUrl });
  1271. }
  1272. _isMosaicDataset(e6) {
  1273. return e6.serviceSourceType ? e6.serviceSourceType === "esriImageServiceSourceTypeMosaicDataset" : e6.fields?.length > 0;
  1274. }
  1275. _isMosaicRuleSupported(e6) {
  1276. if (!e6)
  1277. return false;
  1278. const t4 = this._isMosaicDataset(e6), r4 = e6.currentVersion >= 10.71 && e6.hasMultidimensions && e6.timeInfo && !(e6.objectIdField && e6.fields?.length > 1);
  1279. return t4 || r4;
  1280. }
  1281. _isVectorFieldResampleFunction(e6) {
  1282. if (t(e6))
  1283. return false;
  1284. const { functionName: t4, functionArguments: r4 } = e6, i7 = t4?.toLowerCase() === "resample", s6 = r4?.ResampleType || r4?.resampleType;
  1285. return i7 && (s6 === 7 || s6 === 10);
  1286. }
  1287. _isPicture() {
  1288. return !this.format || this.format.includes("jpg") || this.format.includes("png");
  1289. }
  1290. _configRenderer(e6) {
  1291. if (!this._isPicture() && !this.pixelFilter || this._isVectorDataSet()) {
  1292. if (!this.bandIds && this.rasterInfo.bandCount >= 3) {
  1293. const e7 = B(this.rasterInfo);
  1294. !e7 || this.rasterInfo.bandCount === 3 && e7[0] === 0 && e7[1] === 1 && e7[2] === 2 || (this.bandIds = e7);
  1295. }
  1296. e6 || (e6 = k2(this.rasterInfo, { bandIds: this.bandIds, variableName: this.renderingRule ? null : this.mosaicRule?.multidimensionalDefinition?.[0].variableName }));
  1297. const t4 = te(e6.toJSON());
  1298. this.symbolizer ? (this.symbolizer.rendererJSON = t4, this.symbolizer.rasterInfo = this.rasterInfo) : this.symbolizer = new U2({ rendererJSON: t4, rasterInfo: this.rasterInfo }), this.symbolizer.bind().success || (this.symbolizer = null);
  1299. }
  1300. return e6;
  1301. }
  1302. _clonePixelData(e6) {
  1303. return e6 == null ? e6 : { extent: e6.extent && e6.extent.clone(), pixelBlock: r(e6.pixelBlock) && e6.pixelBlock.clone() };
  1304. }
  1305. _getQueryParams(e6) {
  1306. r(e6?.renderingRule) && typeof e6.renderingRule != "string" && (e6.renderingRule = this._getRenderingRuleString(e6.renderingRule));
  1307. const { raster: t4, viewId: r4 } = this;
  1308. return { raster: t4, viewId: r4, f: "json", ...e6, ...this.customParameters };
  1309. }
  1310. _getRequestOptions(e6) {
  1311. return { ...e6, query: { ...e6?.query, ...this.customParameters } };
  1312. }
  1313. _decodePixelBlock(e6, t4, r4) {
  1314. return this._rasterJobHandler.instance ? this._rasterJobHandler.instance.decode({ data: e6, options: t4 }) : S2(e6, t4, r4);
  1315. }
  1316. async _getRasterFunctionInfos(e6) {
  1317. const t4 = this.sourceJSON.rasterFunctionInfos;
  1318. if (this.serviceRasterInfo)
  1319. return t4;
  1320. if (t4 && this.version >= 10.3) {
  1321. if (t4.length === 1 && t4[0].name.toLowerCase() === "none")
  1322. return t4;
  1323. return (await U(this.parsedUrl.path + "/rasterFunctionInfos", { query: this._getQueryParams(), signal: e6 })).data?.rasterFunctionInfos;
  1324. }
  1325. return null;
  1326. }
  1327. async _requestArrayBuffer(e6) {
  1328. const { imageProps: t4, requestAsImageElement: r4, signal: i7 } = e6;
  1329. if (r4 && !this.pixelFilter && t4.format?.indexOf("png") > -1) {
  1330. return { imageElement: (await U(this.parsedUrl.path + "/exportImage", { responseType: "image", query: this._getQueryParams({ f: "image", ...e6.imageServiceParameters }), signal: i7 })).data, params: t4 };
  1331. }
  1332. const s6 = this._initJobHandler(), a6 = U(this.parsedUrl.path + "/exportImage", { responseType: "array-buffer", query: this._getQueryParams({ f: "image", ...e6.imageServiceParameters }), signal: i7 }), l9 = (await Promise.all([a6, s6]))[0].data, u9 = t4.format || "jpgpng";
  1333. let p13 = u9;
  1334. if (p13 !== "bsq" && p13 !== "bip" && (p13 = P(l9)), !p13)
  1335. throw new s2("imagery-layer:fetch-image", "unsupported format signature " + String.fromCharCode.apply(null, new Uint8Array(l9)));
  1336. const c8 = { signal: i7 }, m9 = u9 === "gif" || u9 === "bmp" || u9.includes("png") && (p13 === "png" || p13 === "jpg") ? S2(l9, { useCanvas: true, ...t4 }, c8) : this._decodePixelBlock(l9, { width: t4.width, height: t4.height, planes: null, pixelType: null, noDataValue: null, format: u9 }, c8);
  1337. return { pixelData: { pixelBlock: await m9, extent: t4.extent }, params: t4 };
  1338. }
  1339. _generateRasterInfo(e6, t4) {
  1340. const r4 = { ...t4, query: this._getQueryParams() };
  1341. return f3(this.parsedUrl.path, e6, r4);
  1342. }
  1343. _isValidCustomizedMosaicRule(e6) {
  1344. return e6 && JSON.stringify(e6.toJSON()) !== JSON.stringify(this._defaultServiceMosaicRule?.toJSON());
  1345. }
  1346. _updateMultidimensionalDefinition(e6) {
  1347. if (this._isValidCustomizedMosaicRule(this.mosaicRule))
  1348. return;
  1349. const t4 = i4(e6);
  1350. if (r(t4) && t4.length > 0) {
  1351. this.mosaicRule = this.mosaicRule || new y5();
  1352. const e7 = this.mosaicRule.multidimensionalDefinition;
  1353. (!e7 || e7 && e7.length <= 0) && (this.mosaicRule.multidimensionalDefinition = t4);
  1354. }
  1355. }
  1356. _processVisibleRastersResponse(e6, r4) {
  1357. r4 = r4 || {};
  1358. const i7 = e6.value, { templateRRFunctionNames: s6, showNoDataRecords: n9, returnDomainValues: o7, templateFields: a6 } = r4, l9 = e6.processedValues;
  1359. let u9 = e6.catalogItems && e6.catalogItems.features, c8 = e6.properties && e6.properties.Values && e6.properties.Values.map((e7) => e7.replace(/ /gi, ", ")) || [];
  1360. const m9 = this.objectIdField || "ObjectId", d12 = typeof i7 == "string" && i7.toLowerCase().includes("nodata"), h6 = [];
  1361. if (i7 && !u9 && !d12) {
  1362. const e7 = {};
  1363. e7[m9] = 0;
  1364. c8 = [i7], u9 = [new g(this.fullExtent, null, e7)];
  1365. }
  1366. if (!u9)
  1367. return [];
  1368. let f7, y9, g4;
  1369. this._updateResponseFieldNames(u9, a6), d12 && !n9 && (u9 = []);
  1370. for (let t4 = 0; t4 < u9.length; t4++) {
  1371. if (f7 = u9[t4], i7 != null) {
  1372. if (y9 = c8[t4], g4 = this.renderingRule && l9 && l9.length > 0 && s6 && s6.length > 0 && s6.includes(this.renderingRule.functionName) ? l9[s6.indexOf(this.renderingRule.functionName)] : i7, y9.toLowerCase() === "nodata" && !n9)
  1373. continue;
  1374. const e7 = "Raster.ItemPixelValue", r5 = "Raster.ServicePixelValue";
  1375. f7.attributes[e7] = y9, f7.attributes[r5] = g4, this._updateFeatureWithMagDirValues(f7, y9);
  1376. const o8 = this.fields && this.fields.length > 0;
  1377. let a7 = this.renderingRule && r(this.serviceRasterInfo) && this.serviceRasterInfo.attributeTable ? o8 ? y9 : i7 : g4;
  1378. this.renderingRule || (a7 = o8 ? y9 : i7), this._updateFeatureWithRasterAttributeTableValues(f7, a7);
  1379. }
  1380. if (f7.sourceLayer = f7.layer = this, o7 && this._updateFeatureWithDomainValues(f7), s6 && l9 && s6.length === l9.length)
  1381. for (let e7 = 0; e7 < s6.length; e7++) {
  1382. const t5 = "Raster.ServicePixelValue." + s6[e7];
  1383. f7.attributes[t5] = l9[e7];
  1384. }
  1385. h6.push(u9[t4]);
  1386. }
  1387. return h6;
  1388. }
  1389. _updateFeatureWithRasterAttributeTableValues(e6, t4) {
  1390. const r4 = this.rasterInfo && this.rasterInfo.attributeTable || r(this.serviceRasterInfo) && this.serviceRasterInfo.attributeTable, i7 = r4 && r4.features;
  1391. if (!i7)
  1392. return;
  1393. const s6 = r4.fields, n9 = s6.map((e7) => e7.name).filter((e7) => e7.toLowerCase() === "value"), o7 = n9 && n9[0];
  1394. if (!o7)
  1395. return;
  1396. const a6 = i7.filter((e7) => e7.attributes[o7] === (t4 != null ? parseInt(t4, 10) : null));
  1397. a6 && a6[0] && s6.forEach((t5) => {
  1398. const r5 = this.rasterAttributeTableFieldPrefix + t5.name;
  1399. e6.attributes[r5] = a6[0].attributes[t5.name];
  1400. });
  1401. }
  1402. _updateFeatureWithMagDirValues(e6, t4) {
  1403. if (!this._isVectorDataSet())
  1404. return;
  1405. const r4 = t4.split(/,\s*/).map((e7) => parseFloat(e7)), i7 = r4.map((e7) => [e7]), s6 = r4.map((e7) => ({ minValue: e7, maxValue: e7, noDataValue: null })), n9 = new u({ height: 1, width: 1, pixelType: "f32", pixels: i7, statistics: s6 });
  1406. this.pixelFilter != null && this.pixelFilter({ pixelBlock: n9, extent: new M(0, 0, 0, 0, this.spatialReference) });
  1407. const o7 = this.serviceDataType === "esriImageServiceDataTypeVector-MagDir" ? [n9.pixels[0][0], n9.pixels[1][0]] : u2([n9.pixels[0][0], n9.pixels[1][0]]);
  1408. e6.attributes["Raster.Magnitude"] = o7[0], e6.attributes["Raster.Direction"] = o7[1];
  1409. }
  1410. _updateFeatureWithDomainValues(e6) {
  1411. const t4 = this.fields && this.fields.filter((e7) => e7.domain && e7.domain.type === "coded-value");
  1412. t4 != null && t4.forEach((t5) => {
  1413. const r4 = e6.attributes[t5.name];
  1414. if (r4 != null) {
  1415. const i7 = t5.domain.codedValues.find((e7) => e7.code === r4);
  1416. i7 && (e6.attributes[t5.name] = i7.name);
  1417. }
  1418. });
  1419. }
  1420. _updateResponseFieldNames(e6, t4) {
  1421. if (!t4 || t4.length < 1)
  1422. return;
  1423. const r4 = this.fieldsIndex;
  1424. t(r4) || e6.forEach((e7) => {
  1425. if (e7 && e7.attributes) {
  1426. for (const i7 of t4)
  1427. if (r4.has(i7)) {
  1428. const t5 = r4.get(i7).name;
  1429. t5 !== i7 && (e7.attributes[i7] = e7.attributes[t5], delete e7.attributes[t5]);
  1430. }
  1431. }
  1432. });
  1433. }
  1434. _getRenderingRuleString(e6) {
  1435. if (this._hasRenderingRule(e6)) {
  1436. let t4 = e6.toJSON();
  1437. return t4 = t4.rasterFunctionDefinition ?? t4, (t4.thumbnail || t4.thumbnailEx) && (t4.thumbnail = t4.thumbnailEx = null), JSON.stringify(t4);
  1438. }
  1439. return null;
  1440. }
  1441. _hasRenderingRule(e6) {
  1442. return e6 && e6.functionName && e6.functionName.toLowerCase() !== "none";
  1443. }
  1444. _updateRenderingRulesFunctionName(e6, t4) {
  1445. if (!e6 || e6.length < 1)
  1446. return;
  1447. if (e6 === "Raw")
  1448. return e6.replace("Raw", "None");
  1449. const r4 = e6.toLowerCase().replace(/ /gi, "_");
  1450. return t4.has(r4) ? t4.get(r4) : e6;
  1451. }
  1452. _isRFTJson(e6) {
  1453. return e6 && e6.name && e6.arguments && e6.function && e6.hasOwnProperty("functionType");
  1454. }
  1455. _isVectorDataSet() {
  1456. return this.serviceDataType === "esriImageServiceDataTypeVector-UV" || this.serviceDataType === "esriImageServiceDataTypeVector-MagDir";
  1457. }
  1458. _readCapabilities(e6) {
  1459. const t4 = e6.capabilities ? e6.capabilities.toLowerCase().split(",").map((e7) => e7.trim()) : ["image", "catalog"], { currentVersion: r4, advancedQueryCapabilities: i7, maxRecordCount: s6 } = e6, n9 = t4.includes("image"), o7 = e6.serviceDataType === "esriImageServiceDataTypeElevation", a6 = !!(e6.spatialReference || e6.extent && e6.extent.spatialReference), l9 = t4.includes("edit");
  1460. return { data: { supportsAttachment: false }, operations: { supportsComputeHistograms: n9, supportsExportImage: n9, supportsIdentify: n9, supportsMeasure: t4.includes("mensuration") && a6, supportsDownload: t4.includes("download"), supportsQuery: t4.includes("catalog") && e6.fields && e6.fields.length > 0, supportsGetSamples: r4 >= 10.2 && n9, supportsProject: r4 >= 10.3 && n9, supportsComputeStatisticsHistograms: r4 >= 10.4 && n9, supportsQueryBoundary: r4 >= 10.6 && n9, supportsCalculateVolume: r4 >= 10.7 && o7, supportsComputePixelLocation: r4 >= 10.7 && t4.includes("catalog"), supportsComputeAngles: r4 >= 10.91, supportsAdd: l9, supportsDelete: l9, supportsEditing: l9, supportsUpdate: l9, supportsCalculate: false, supportsTruncate: false, supportsValidateSql: false, supportsChangeTracking: false, supportsQueryAttachments: false, supportsResizeAttachments: false, supportsSync: false, supportsExceedsLimitStatistics: false, supportsQueryAnalytics: false, supportsQueryTopFeatures: false }, query: { maxRecordCount: s6, maxRecordCountFactor: void 0, supportsStatistics: !!i7?.supportsStatistics, supportsOrderBy: !!i7?.supportsOrderBy, supportsDistinct: !!i7?.supportsDistinct, supportsPagination: !!i7?.supportsPagination, supportsStandardizedQueriesOnly: !!i7?.useStandardizedQueries, supportsPercentileStatistics: !!i7?.supportsPercentileStatistics, supportsCentroid: !!i7?.supportsReturningGeometryCentroid, supportsDistance: !!i7?.supportsQueryWithDistance, supportsExtent: !!i7?.supportsReturningQueryExtent, supportsGeometryProperties: !!i7?.supportsReturningGeometryProperties, supportsHavingClause: !!i7?.supportsHavingClause, supportsQuantization: false, supportsQuantizationEditMode: false, supportsQueryGeometry: false, supportsResultType: false, supportsMaxRecordCountFactor: false, supportsSqlExpression: false, supportsTopFeaturesQuery: false, supportsQueryByOthers: false, supportsHistoricMoment: false, supportsFormatPBF: false, supportsDisjointSpatialRelationship: false, supportsCacheHint: false, supportsSpatialAggregationStatistics: false, supportedSpatialAggregationStatistics: { envelope: false, centroid: false, convexHull: false }, supportsDefaultSpatialReference: !!i7?.supportsDefaultSR, supportsCompactGeometry: false, standardMaxRecordCount: void 0, tileMaxRecordCount: void 0 } };
  1461. }
  1462. };
  1463. return e([d()], u8.prototype, "_functionRasterInfos", void 0), e([d()], u8.prototype, "_rasterJobHandler", void 0), e([d({ dependsOn: ["_serviceSupportsMosaicRule"] })], u8.prototype, "_defaultServiceMosaicRule", void 0), e([o("_defaultServiceMosaicRule", ["defaultMosaicMethod"])], u8.prototype, "readDefaultServiceMosaicRule", null), e([d()], u8.prototype, "_cachedRendererJson", void 0), e([d({ readOnly: true })], u8.prototype, "_serviceSourceType", void 0), e([o("_serviceSourceType", ["serviceSourceType", "fields"])], u8.prototype, "readServiceSourceType", null), e([d({ readOnly: true })], u8.prototype, "_serviceSupportsMosaicRule", void 0), e([o("_serviceSupportsMosaicRule", ["currentVersion", "fields"])], u8.prototype, "readServiceSupportsMosaicRule", null), e([d()], u8.prototype, "rasterAttributeTableFieldPrefix", void 0), e([d({ readOnly: true })], u8.prototype, "rasterFunctionNamesIndex", null), e([d()], u8.prototype, "adjustAspectRatio", void 0), e([d({ readOnly: true }), o3("serviceRasterInfo.bandCount")], u8.prototype, "bandCount", void 0), e([d({ type: [S], json: { write: true } })], u8.prototype, "bandIds", void 0), e([o("bandIds")], u8.prototype, "readBandIds", null), e([d({ readOnly: true, json: { read: false } })], u8.prototype, "capabilities", void 0), e([o("service", "capabilities", ["capabilities", "currentVersion", "serviceDataType"])], u8.prototype, "readCapabilities", null), e([d({ type: Number })], u8.prototype, "compressionQuality", void 0), e([r2("compressionQuality")], u8.prototype, "writeCompressionQuality", null), e([d({ type: Number })], u8.prototype, "compressionTolerance", void 0), e([r2("compressionTolerance")], u8.prototype, "writeCompressionTolerance", null), e([d({ json: { read: { source: "copyrightText" } } })], u8.prototype, "copyright", void 0), e([d({ type: String, json: { name: "layerDefinition.definitionExpression", write: { enabled: true, allowNull: true } } })], u8.prototype, "definitionExpression", void 0), e([d({ readOnly: true, constructOnly: true })], u8.prototype, "exportImageServiceParameters", void 0), e([d()], u8.prototype, "rasterInfo", void 0), e([d({ readOnly: true, type: [y] })], u8.prototype, "fields", void 0), e([d({ readOnly: true })], u8.prototype, "fieldsIndex", null), e([d({ type: ["png", "png8", "png24", "png32", "jpg", "bmp", "gif", "jpgpng", "lerc", "tiff"], json: { write: true } })], u8.prototype, "format", null), e([o("service", "format", ["serviceDataType"])], u8.prototype, "readFormat", null), e([d({ type: M })], u8.prototype, "fullExtent", void 0), e([d({ readOnly: true })], u8.prototype, "hasMultidimensions", void 0), e([d({ json: { read: { source: "maxImageHeight" } } })], u8.prototype, "imageMaxHeight", void 0), e([d({ json: { read: { source: "maxImageWidth" } } })], u8.prototype, "imageMaxWidth", void 0), e([d({ type: String, json: { type: o6.jsonValues, read: o6.read, write: o6.write } })], u8.prototype, "interpolation", void 0), e([d()], u8.prototype, "minScale", void 0), e([o("service", "minScale")], u8.prototype, "readMinScale", null), e([d()], u8.prototype, "maxScale", void 0), e([o("service", "maxScale")], u8.prototype, "readMaxScale", null), e([d({ type: y5 })], u8.prototype, "mosaicRule", null), e([o("mosaicRule", ["mosaicRule", "defaultMosaicMethod"])], u8.prototype, "readMosaicRule", null), e([r2("mosaicRule")], u8.prototype, "writeMosaicRule", null), e([d({ readOnly: true }), o3("serviceRasterInfo.multidimensionalInfo")], u8.prototype, "multidimensionalInfo", void 0), e([d({ json: { type: S } })], u8.prototype, "noData", void 0), e([r2("noData")], u8.prototype, "writeNoData", null), e([d({ type: String, json: { type: i3.jsonValues, read: i3.read, write: i3.write } })], u8.prototype, "noDataInterpretation", void 0), e([d({ type: String, readOnly: true, json: { read: { source: ["fields"] } } })], u8.prototype, "objectIdField", void 0), e([o("objectIdField")], u8.prototype, "readObjectIdField", null), e([d({})], u8.prototype, "geometryType", void 0), e([d({})], u8.prototype, "typeIdField", void 0), e([d({})], u8.prototype, "types", void 0), e([d({ readOnly: true })], u8.prototype, "parsedUrl", null), e([d({ readOnly: true }), o3("serviceRasterInfo.pixelSize.x")], u8.prototype, "pixelSizeX", void 0), e([d({ readOnly: true }), o3("serviceRasterInfo.pixelSize.y")], u8.prototype, "pixelSizeY", void 0), e([d({ type: Function })], u8.prototype, "pixelFilter", void 0), e([d()], u8.prototype, "raster", void 0), e([d()], u8.prototype, "viewId", void 0), e([d({ types: l3, json: { name: "layerDefinition.drawingInfo.renderer", origins: { "web-scene": { types: i2, name: "layerDefinition.drawingInfo.renderer", write: { overridePolicy: (e6) => ({ enabled: e6 && e6.type !== "vector-field" && e6.type !== "flow" }) } } } } })], u8.prototype, "renderer", null), e([o("renderer")], u8.prototype, "readRenderer", null), e([r2("renderer")], u8.prototype, "writeRenderer", null), e([d()], u8.prototype, "symbolizer", void 0), e([d(w2)], u8.prototype, "opacity", void 0), e([d({ readOnly: true }), o3("serviceRasterInfo.attributeTable")], u8.prototype, "rasterAttributeTable", void 0), e([d({ readOnly: true })], u8.prototype, "rasterFields", null), e([d({ constructOnly: true })], u8.prototype, "rasterFunctionInfos", void 0), e([d({ type: w3 })], u8.prototype, "renderingRule", null), e([o("renderingRule", ["renderingRule", "rasterFunctionInfos"])], u8.prototype, "readRenderingRule", null), e([r2("renderingRule")], u8.prototype, "writeRenderingRule", null), e([d()], u8.prototype, "serviceDataType", void 0), e([d({ readOnly: true, type: k })], u8.prototype, "spatialReference", void 0), e([o("spatialReference", ["spatialReference", "extent"])], u8.prototype, "readSpatialReference", null), e([d({ json: { type: ve.jsonValues } })], u8.prototype, "pixelType", void 0), e([o("pixelType")], u8.prototype, "readPixelType", null), e([r2("pixelType")], u8.prototype, "writePixelType", null), e([d({ constructOnly: true, type: l4 })], u8.prototype, "serviceRasterInfo", void 0), e([d()], u8.prototype, "sourceJSON", void 0), e([d(f)], u8.prototype, "url", void 0), e([d({ readOnly: true })], u8.prototype, "version", void 0), e([o("version", ["currentVersion", "fields", "timeInfo"])], u8.prototype, "readVersion", null), u8 = e([n("esri.layers.mixins.ArcGISImageService")], u8), u8;
  1464. };
  1465. // node_modules/@arcgis/core/layers/ImageryLayer.js
  1466. var L2 = class extends a2(a3(n2(t2(c2(v5(xe(o4(p2(O(b2)))))))))) {
  1467. constructor(...e6) {
  1468. super(...e6), this.legendEnabled = true, this.isReference = null, this.operationalLayerType = "ArcGISImageServiceLayer", this.popupEnabled = true, this.popupTemplate = null, this.type = "imagery";
  1469. }
  1470. normalizeCtorArgs(e6, r4) {
  1471. return typeof e6 == "string" ? { url: e6, ...r4 } : e6;
  1472. }
  1473. load(e6) {
  1474. const r4 = r(e6) ? e6.signal : null;
  1475. return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["Image Service"] }, e6).catch(w).then(() => this._fetchService(r4))), Promise.resolve(this);
  1476. }
  1477. writeOperationalLayerType(e6, r4, t4) {
  1478. const o7 = this.renderer?.type === "vector-field";
  1479. r4[t4] = o7 ? "ArcGISImageServiceVectorLayer" : "ArcGISImageServiceLayer";
  1480. }
  1481. get defaultPopupTemplate() {
  1482. return this.createPopupTemplate();
  1483. }
  1484. createPopupTemplate(e6) {
  1485. const r4 = this.rasterFields, t4 = this.title, o7 = new Set();
  1486. let i7 = false, s6 = false;
  1487. this.capabilities && (i7 = this.capabilities.operations.supportsQuery && this.fields && this.fields.length > 0, s6 = this.serviceDataType === "esriImageServiceDataTypeVector-UV" || this.serviceDataType === "esriImageServiceDataTypeVector-MagDir");
  1488. const a5 = new Set();
  1489. i7 && a5.add("raster.itempixelvalue");
  1490. for (const p13 of r4) {
  1491. const e7 = p13.name.toLowerCase();
  1492. a5.has(e7) || e7.includes("raster.servicepixelvalue.") || o7.add(p13.name);
  1493. }
  1494. return s6 && o7.add("raster.magnitude").add("raster.direction"), d4({ fields: r4, title: t4 }, { ...e6, visibleFieldNames: o7 });
  1495. }
  1496. queryFeatures(e6, r4) {
  1497. return this.queryRasters(e6, r4).then((e7) => {
  1498. if (e7?.features)
  1499. for (const r5 of e7.features)
  1500. r5.layer = r5.sourceLayer = this;
  1501. return e7;
  1502. });
  1503. }
  1504. queryFeatureCount(e6, r4) {
  1505. return this.queryRasterCount(e6, r4);
  1506. }
  1507. redraw() {
  1508. this.emit("redraw");
  1509. }
  1510. serviceSupportsSpatialReference(e6) {
  1511. return e3(this, e6);
  1512. }
  1513. };
  1514. e([d(c)], L2.prototype, "legendEnabled", void 0), e([d({ type: ["show", "hide"] })], L2.prototype, "listMode", void 0), e([d({ type: Boolean, json: { read: false, write: { enabled: true, overridePolicy: () => ({ enabled: false }) } } })], L2.prototype, "isReference", void 0), e([d({ type: ["ArcGISImageServiceLayer"], json: { origins: { "web-map": { type: ["ArcGISImageServiceLayer", "ArcGISImageServiceVectorLayer"], read: false, write: { target: "layerType", ignoreOrigin: true } } } } })], L2.prototype, "operationalLayerType", void 0), e([r2("web-map", "operationalLayerType")], L2.prototype, "writeOperationalLayerType", null), e([d(p)], L2.prototype, "popupEnabled", void 0), e([d({ type: B2, json: { read: { source: "popupInfo" }, write: { target: "popupInfo" } } })], L2.prototype, "popupTemplate", void 0), e([d({ readOnly: true })], L2.prototype, "defaultPopupTemplate", null), e([d({ readOnly: true, json: { read: false } })], L2.prototype, "type", void 0), L2 = e([n("esri.layers.ImageryLayer")], L2);
  1515. var T2 = L2;
  1516. export {
  1517. T2 as default
  1518. };
  1519. //# sourceMappingURL=ImageryLayer-UVN5SIK4.js.map