FeatureLayerSource-B6VXBL6Z.js 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822
  1. import {
  2. n as n4,
  3. s as s3
  4. } from "./chunk-4JM5IOYA.js";
  5. import {
  6. u
  7. } from "./chunk-4D6PVVFX.js";
  8. import "./chunk-WQJRLXWG.js";
  9. import {
  10. a as a2,
  11. l
  12. } from "./chunk-MTFA4FTA.js";
  13. import {
  14. n as n3
  15. } from "./chunk-YASLQAXE.js";
  16. import {
  17. i as i2
  18. } from "./chunk-JGOAMEPM.js";
  19. import {
  20. S as S2,
  21. c,
  22. d as d4
  23. } from "./chunk-Z64YKYHD.js";
  24. import {
  25. x as x3
  26. } from "./chunk-2VFJVI2I.js";
  27. import {
  28. d as d3,
  29. t as t2,
  30. x as x2
  31. } from "./chunk-GS2NUWMB.js";
  32. import {
  33. r as r2
  34. } from "./chunk-FUEX356Y.js";
  35. import "./chunk-54AOZV5X.js";
  36. import "./chunk-PK35UGFJ.js";
  37. import {
  38. L
  39. } from "./chunk-P4UZNLD5.js";
  40. import {
  41. me,
  42. ne
  43. } from "./chunk-FYNVVMWY.js";
  44. import "./chunk-Q52DVFYK.js";
  45. import "./chunk-HBMVUVZX.js";
  46. import {
  47. o as o2
  48. } from "./chunk-TNLRDNTC.js";
  49. import {
  50. g
  51. } from "./chunk-RZFGRBD7.js";
  52. import "./chunk-PUSPZYFZ.js";
  53. import "./chunk-EN7YGJWG.js";
  54. import "./chunk-VBNMTM7L.js";
  55. import "./chunk-3D3QEPRE.js";
  56. import "./chunk-JFNNSBWL.js";
  57. import {
  58. K,
  59. b
  60. } from "./chunk-UD63WBG3.js";
  61. import "./chunk-EWE6EXPY.js";
  62. import "./chunk-KUXNUNAI.js";
  63. import "./chunk-WNCU6BFU.js";
  64. import "./chunk-PIGRDDRG.js";
  65. import "./chunk-BJHM4JNS.js";
  66. import "./chunk-F6A2QQ26.js";
  67. import "./chunk-C43UE3Z5.js";
  68. import {
  69. n as n2
  70. } from "./chunk-H2KDMZTR.js";
  71. import "./chunk-7XXXCK2A.js";
  72. import "./chunk-7ZIDBK7B.js";
  73. import {
  74. y as y3
  75. } from "./chunk-EG5OI4V4.js";
  76. import "./chunk-65BYCSII.js";
  77. import "./chunk-WZQZRKNH.js";
  78. import "./chunk-LRDX4TO7.js";
  79. import "./chunk-6A4U74YA.js";
  80. import "./chunk-N2663GRX.js";
  81. import "./chunk-O4FY3ITT.js";
  82. import "./chunk-WEMIK25H.js";
  83. import "./chunk-7N4X6GF3.js";
  84. import "./chunk-JXW4QTJA.js";
  85. import "./chunk-UXF37FQ4.js";
  86. import "./chunk-ZOEK6QHJ.js";
  87. import "./chunk-XNLG7T2T.js";
  88. import "./chunk-IR4PV7VK.js";
  89. import {
  90. d as d2,
  91. v
  92. } from "./chunk-2Z6LERTI.js";
  93. import "./chunk-OWVBLVP3.js";
  94. import "./chunk-AFZ7XSEW.js";
  95. import "./chunk-4NKD334K.js";
  96. import "./chunk-65K7LC56.js";
  97. import "./chunk-ATPLLI5W.js";
  98. import "./chunk-XH7RUGVZ.js";
  99. import {
  100. m
  101. } from "./chunk-TBBTRX4O.js";
  102. import "./chunk-YBSUITLL.js";
  103. import "./chunk-ALDCDSPV.js";
  104. import "./chunk-DT6EAZQ5.js";
  105. import "./chunk-HNOZUNJ4.js";
  106. import {
  107. U
  108. } from "./chunk-VNFRAYHO.js";
  109. import {
  110. i
  111. } from "./chunk-R5IG2D6H.js";
  112. import {
  113. G,
  114. S,
  115. j,
  116. nt
  117. } from "./chunk-VBRY5KJM.js";
  118. import {
  119. s as s2
  120. } from "./chunk-PDKDCAAD.js";
  121. import {
  122. M2 as M
  123. } from "./chunk-ECW2QABR.js";
  124. import "./chunk-GCDJLKH4.js";
  125. import {
  126. k2 as k
  127. } from "./chunk-MRJEICT6.js";
  128. import {
  129. d,
  130. e,
  131. n2 as n,
  132. y3 as y2
  133. } from "./chunk-Y3WMVFTW.js";
  134. import "./chunk-SAS7RONY.js";
  135. import "./chunk-WSRBH7BF.js";
  136. import "./chunk-IHXECKQQ.js";
  137. import {
  138. x,
  139. y
  140. } from "./chunk-ULGDPLM2.js";
  141. import {
  142. s3 as s
  143. } from "./chunk-EMJ4ZSM2.js";
  144. import {
  145. o
  146. } from "./chunk-IKP3YN53.js";
  147. import {
  148. a,
  149. r,
  150. t
  151. } from "./chunk-GZT4BVFP.js";
  152. import "./chunk-A5ICIBVI.js";
  153. // node_modules/@arcgis/core/rest/query/operations/pbfJSONFeatureSet.js
  154. function i3(e2, t3) {
  155. return t3;
  156. }
  157. function n5(e2, t3, r4, s8) {
  158. switch (r4) {
  159. case 0:
  160. return d5(e2, t3 + s8, 0);
  161. case 1:
  162. return e2.originPosition === "lowerLeft" ? d5(e2, t3 + s8, 1) : l2(e2, t3 + s8, 1);
  163. }
  164. }
  165. function a3(e2, t3, r4, s8) {
  166. return r4 === 2 ? d5(e2, t3, 2) : n5(e2, t3, r4, s8);
  167. }
  168. function h(e2, t3, r4, s8) {
  169. return r4 === 2 ? d5(e2, t3, 3) : n5(e2, t3, r4, s8);
  170. }
  171. function u2(e2, t3, r4, s8) {
  172. return r4 === 3 ? d5(e2, t3, 3) : a3(e2, t3, r4, s8);
  173. }
  174. function d5({ translate: e2, scale: t3 }, r4, s8) {
  175. return e2[s8] + r4 * t3[s8];
  176. }
  177. function l2({ translate: e2, scale: t3 }, r4, s8) {
  178. return e2[s8] - r4 * t3[s8];
  179. }
  180. var c2 = class {
  181. constructor(e2) {
  182. this.options = e2, this.geometryTypes = ["esriGeometryPoint", "esriGeometryMultipoint", "esriGeometryPolyline", "esriGeometryPolygon"], this.previousCoordinate = [0, 0], this.transform = null, this.applyTransform = i3, this.lengths = [], this.currentLengthIndex = 0, this.toAddInCurrentPath = 0, this.vertexDimension = 0, this.coordinateBuffer = null, this.coordinateBufferPtr = 0, this._attributesConstructor = () => {
  183. };
  184. }
  185. createFeatureResult() {
  186. return { fields: [], features: [] };
  187. }
  188. finishFeatureResult(e2) {
  189. if (this.options.applyTransform && (e2.transform = null), this._attributesConstructor = () => {
  190. }, this.coordinateBuffer = null, this.lengths.length = 0, !e2.hasZ)
  191. return;
  192. const s8 = o2(e2.geometryType, this.options.sourceSpatialReference, e2.spatialReference);
  193. if (!t(s8))
  194. for (const t3 of e2.features)
  195. s8(t3.geometry);
  196. }
  197. createSpatialReference() {
  198. return {};
  199. }
  200. addField(e2, t3) {
  201. e2.fields.push(t3);
  202. const r4 = e2.fields.map((e3) => e3.name);
  203. this._attributesConstructor = function() {
  204. for (const e3 of r4)
  205. this[e3] = null;
  206. };
  207. }
  208. addFeature(e2, t3) {
  209. e2.features.push(t3);
  210. }
  211. prepareFeatures(t3) {
  212. switch (this.transform = t3.transform, this.options.applyTransform && t3.transform && (this.applyTransform = this._deriveApplyTransform(t3)), this.vertexDimension = 2, t3.hasZ && this.vertexDimension++, t3.hasM && this.vertexDimension++, t3.geometryType) {
  213. case "esriGeometryPoint":
  214. this.addCoordinate = (e2, t4, r4) => this.addCoordinatePoint(e2, t4, r4), this.createGeometry = (e2) => this.createPointGeometry(e2);
  215. break;
  216. case "esriGeometryPolygon":
  217. this.addCoordinate = (e2, t4, r4) => this._addCoordinatePolygon(e2, t4, r4), this.createGeometry = (e2) => this._createPolygonGeometry(e2);
  218. break;
  219. case "esriGeometryPolyline":
  220. this.addCoordinate = (e2, t4, r4) => this._addCoordinatePolyline(e2, t4, r4), this.createGeometry = (e2) => this._createPolylineGeometry(e2);
  221. break;
  222. case "esriGeometryMultipoint":
  223. this.addCoordinate = (e2, t4, r4) => this._addCoordinateMultipoint(e2, t4, r4), this.createGeometry = (e2) => this._createMultipointGeometry(e2);
  224. break;
  225. default:
  226. n2(t3.geometryType);
  227. }
  228. }
  229. createFeature() {
  230. return this.lengths.length = 0, this.currentLengthIndex = 0, this.previousCoordinate[0] = 0, this.previousCoordinate[1] = 0, this.coordinateBuffer = null, this.coordinateBufferPtr = 0, { attributes: new this._attributesConstructor() };
  231. }
  232. allocateCoordinates() {
  233. }
  234. addLength(e2, t3, r4) {
  235. this.lengths.length === 0 && (this.toAddInCurrentPath = t3), this.lengths.push(t3);
  236. }
  237. addQueryGeometry(e2, t3) {
  238. const { queryGeometry: r4, queryGeometryType: i5 } = t3, n10 = me(r4.clone(), r4, false, false, this.transform), a7 = ne(n10, i5, false, false);
  239. e2.queryGeometryType = i5, e2.queryGeometry = { ...a7 };
  240. }
  241. createPointGeometry(e2) {
  242. const t3 = { x: 0, y: 0, spatialReference: e2.spatialReference };
  243. return e2.hasZ && (t3.z = 0), e2.hasM && (t3.m = 0), t3;
  244. }
  245. addCoordinatePoint(e2, t3, r4) {
  246. switch (t3 = this.applyTransform(this.transform, t3, r4, 0), r4) {
  247. case 0:
  248. e2.x = t3;
  249. break;
  250. case 1:
  251. e2.y = t3;
  252. break;
  253. case 2:
  254. "z" in e2 ? e2.z = t3 : e2.m = t3;
  255. break;
  256. case 3:
  257. e2.m = t3;
  258. }
  259. }
  260. _transformPathLikeValue(e2, t3) {
  261. let r4 = 0;
  262. return t3 <= 1 && (r4 = this.previousCoordinate[t3], this.previousCoordinate[t3] += e2), this.applyTransform(this.transform, e2, t3, r4);
  263. }
  264. _addCoordinatePolyline(e2, t3, r4) {
  265. this._dehydratedAddPointsCoordinate(e2.paths, t3, r4);
  266. }
  267. _addCoordinatePolygon(e2, t3, r4) {
  268. this._dehydratedAddPointsCoordinate(e2.rings, t3, r4);
  269. }
  270. _addCoordinateMultipoint(e2, t3, r4) {
  271. r4 === 0 && e2.points.push([]);
  272. const s8 = this._transformPathLikeValue(t3, r4);
  273. e2.points[e2.points.length - 1].push(s8);
  274. }
  275. _createPolygonGeometry(e2) {
  276. return { rings: [[]], spatialReference: e2.spatialReference, hasZ: !!e2.hasZ, hasM: !!e2.hasM };
  277. }
  278. _createPolylineGeometry(e2) {
  279. return { paths: [[]], spatialReference: e2.spatialReference, hasZ: !!e2.hasZ, hasM: !!e2.hasM };
  280. }
  281. _createMultipointGeometry(e2) {
  282. return { points: [], spatialReference: e2.spatialReference, hasZ: !!e2.hasZ, hasM: !!e2.hasM };
  283. }
  284. _dehydratedAddPointsCoordinate(e2, t3, r4) {
  285. r4 === 0 && this.toAddInCurrentPath-- == 0 && (e2.push([]), this.toAddInCurrentPath = this.lengths[++this.currentLengthIndex] - 1, this.previousCoordinate[0] = 0, this.previousCoordinate[1] = 0);
  286. const s8 = this._transformPathLikeValue(t3, r4), o4 = e2[e2.length - 1];
  287. r4 === 0 && (this.coordinateBufferPtr = 0, this.coordinateBuffer = new Array(this.vertexDimension), o4.push(this.coordinateBuffer)), this.coordinateBuffer[this.coordinateBufferPtr++] = s8;
  288. }
  289. _deriveApplyTransform(e2) {
  290. const { hasZ: t3, hasM: r4 } = e2;
  291. return t3 && r4 ? u2 : t3 ? a3 : r4 ? h : n5;
  292. }
  293. };
  294. // node_modules/@arcgis/core/rest/query/executeQueryPBF.js
  295. async function n6(o4, s8, n10) {
  296. const p2 = n3(o4), i5 = { ...n10 }, u4 = b.from(s8), m5 = !u4.quantizationParameters, { data: f } = await d3(p2, u4, new c2({ sourceSpatialReference: u4.sourceSpatialReference, applyTransform: m5 }), i5);
  297. return f;
  298. }
  299. // node_modules/@arcgis/core/rest/query/operations/queryAttachments.js
  300. function n7(t3) {
  301. const o4 = t3.toJSON();
  302. return o4.attachmentTypes && (o4.attachmentTypes = o4.attachmentTypes.join(",")), o4.keywords && (o4.keywords = o4.keywords.join(",")), o4.globalIds && (o4.globalIds = o4.globalIds.join(",")), o4.objectIds && (o4.objectIds = o4.objectIds.join(",")), o4.size && (o4.size = o4.size.join(",")), o4;
  303. }
  304. function a4(o4, r4) {
  305. const n10 = {};
  306. for (const a7 of o4) {
  307. const { parentObjectId: o5, parentGlobalId: c5, attachmentInfos: i5 } = a7;
  308. for (const a8 of i5) {
  309. const { id: i6 } = a8, m5 = S(i(`${r4}/${o5}/attachments/${i6}`)), p2 = l.fromJSON(a8);
  310. p2.set({ url: m5, parentObjectId: o5, parentGlobalId: c5 }), n10[o5] ? n10[o5].push(p2) : n10[o5] = [p2];
  311. }
  312. }
  313. return n10;
  314. }
  315. function c3(t3, e2, s8) {
  316. let a7 = { query: t2({ ...t3.query, f: "json", ...n7(e2) }) };
  317. return s8 && (a7 = { ...s8, ...a7, query: { ...s8.query, ...a7.query } }), U(t3.path + "/queryAttachments", a7);
  318. }
  319. // node_modules/@arcgis/core/rest/query/executeAttachmentQuery.js
  320. async function a5(a7, m5, n10) {
  321. const s8 = n3(a7);
  322. return c3(s8, c.from(m5), { ...n10 }).then((t3) => a4(t3.data.attachmentGroups, s8.path));
  323. }
  324. // node_modules/@arcgis/core/rest/query/executeForExtent.js
  325. async function m2(m5, n10, s8) {
  326. const p2 = n3(m5);
  327. return x2(p2, b.from(n10), { ...s8 }).then((t3) => ({ count: t3.data.count, extent: M.fromJSON(t3.data.extent) }));
  328. }
  329. // node_modules/@arcgis/core/rest/query/operations/queryRelatedRecords.js
  330. function o3(e2, t3) {
  331. const o4 = e2.toJSON();
  332. return o4.objectIds && (o4.objectIds = o4.objectIds.join(",")), o4.orderByFields && (o4.orderByFields = o4.orderByFields.join(",")), o4.outFields && !t3?.returnCountOnly ? o4.outFields.includes("*") ? o4.outFields = "*" : o4.outFields = o4.outFields.join(",") : delete o4.outFields, o4.outSpatialReference && (o4.outSR = o4.outSR.wkid || JSON.stringify(o4.outSR.toJSON()), delete o4.outSpatialReference), o4.dynamicDataSource && (o4.layer = JSON.stringify({ source: o4.dynamicDataSource }), delete o4.dynamicDataSource), o4;
  333. }
  334. async function r3(e2, t3, o4) {
  335. const r4 = await s4(e2, t3, o4), n10 = r4.data, a7 = n10.geometryType, d7 = n10.spatialReference, c5 = {};
  336. for (const s8 of n10.relatedRecordGroups) {
  337. const e3 = { fields: void 0, objectIdFieldName: void 0, geometryType: a7, spatialReference: d7, hasZ: !!n10.hasZ, hasM: !!n10.hasM, features: s8.relatedRecords };
  338. if (s8.objectId != null)
  339. c5[s8.objectId] = e3;
  340. else
  341. for (const t4 in s8)
  342. s8.hasOwnProperty(t4) && t4 !== "relatedRecords" && (c5[s8[t4]] = e3);
  343. }
  344. return { ...r4, data: c5 };
  345. }
  346. async function n8(e2, t3, o4) {
  347. const r4 = await s4(e2, t3, o4, { returnCountOnly: true }), n10 = r4.data, a7 = {};
  348. for (const s8 of n10.relatedRecordGroups)
  349. s8.objectId != null && (a7[s8.objectId] = s8.count);
  350. return { ...r4, data: a7 };
  351. }
  352. async function s4(r4, n10, s8 = {}, a7) {
  353. const d7 = t2({ ...r4.query, f: "json", ...a7, ...o3(n10, a7) });
  354. return U(r4.path + "/queryRelatedRecords", { ...s8, query: { ...s8.query, ...d7 } });
  355. }
  356. // node_modules/@arcgis/core/rest/query/executeRelationshipQuery.js
  357. async function n9(e2, n10, u4) {
  358. n10 = d4.from(n10);
  359. const a7 = n3(e2);
  360. return r3(a7, n10, u4).then((t3) => {
  361. const r4 = t3.data, e3 = {};
  362. return Object.keys(r4).forEach((t4) => e3[t4] = x3.fromJSON(r4[t4])), e3;
  363. });
  364. }
  365. async function u3(r4, o4, n10) {
  366. o4 = d4.from(o4);
  367. const u4 = n3(r4);
  368. return n8(u4, o4, { ...n10 }).then((t3) => t3.data);
  369. }
  370. // node_modules/@arcgis/core/rest/query/operations/queryTopFeatures.js
  371. var l3 = "Layer does not support extent calculation.";
  372. function y4(t3, r4) {
  373. const o4 = t3.geometry, i5 = t3.toJSON(), s8 = i5;
  374. if (r(o4) && (s8.geometry = JSON.stringify(o4), s8.geometryType = v(o4), s8.inSR = o4.spatialReference.wkid || JSON.stringify(o4.spatialReference)), i5.topFilter?.groupByFields && (s8.topFilter.groupByFields = i5.topFilter.groupByFields.join(",")), i5.topFilter?.orderByFields && (s8.topFilter.orderByFields = i5.topFilter.orderByFields.join(",")), i5.topFilter && (s8.topFilter = JSON.stringify(s8.topFilter)), i5.objectIds && (s8.objectIds = i5.objectIds.join(",")), i5.orderByFields && (s8.orderByFields = i5.orderByFields.join(",")), i5.outFields && !(r4?.returnCountOnly || r4?.returnExtentOnly || r4?.returnIdsOnly) ? i5.outFields.includes("*") ? s8.outFields = "*" : s8.outFields = i5.outFields.join(",") : delete s8.outFields, i5.outSR ? s8.outSR = i5.outSR.wkid || JSON.stringify(i5.outSR) : o4 && i5.returnGeometry && (s8.outSR = s8.inSR), i5.returnGeometry && delete i5.returnGeometry, i5.timeExtent) {
  375. const t4 = i5.timeExtent, { start: e2, end: r5 } = t4;
  376. e2 == null && r5 == null || (s8.time = e2 === r5 ? e2 : `${e2 == null ? "null" : e2},${r5 == null ? "null" : r5}`), delete i5.timeExtent;
  377. }
  378. return s8;
  379. }
  380. async function d6(t3, e2, r4, o4) {
  381. const n10 = await c4(t3, e2, "json", o4);
  382. return r2(e2, r4, n10.data), n10;
  383. }
  384. async function m3(t3, r4, o4) {
  385. return r(r4.timeExtent) && r4.timeExtent.isEmpty ? { data: { objectIds: [] } } : c4(t3, r4, "json", o4, { returnIdsOnly: true });
  386. }
  387. async function p(t3, r4, o4) {
  388. return r(r4.timeExtent) && r4.timeExtent.isEmpty ? { data: { count: 0, extent: null } } : c4(t3, r4, "json", o4, { returnExtentOnly: true, returnCountOnly: true }).then((t4) => {
  389. const e2 = t4.data;
  390. if (e2.hasOwnProperty("extent"))
  391. return t4;
  392. if (e2.features)
  393. throw new Error(l3);
  394. if (e2.hasOwnProperty("count"))
  395. throw new Error(l3);
  396. return t4;
  397. });
  398. }
  399. function a6(t3, r4, o4) {
  400. return r(r4.timeExtent) && r4.timeExtent.isEmpty ? Promise.resolve({ data: { count: 0 } }) : c4(t3, r4, "json", o4, { returnIdsOnly: true, returnCountOnly: true });
  401. }
  402. function c4(n10, u4, l5, d7 = {}, m5 = {}) {
  403. const p2 = typeof n10 == "string" ? j(n10) : n10, a7 = u4.geometry ? [u4.geometry] : [];
  404. return d7.responseType = l5 === "pbf" ? "array-buffer" : "json", L(a7, null, d7).then((o4) => {
  405. const n11 = o4 && o4[0];
  406. r(n11) && ((u4 = u4.clone()).geometry = n11);
  407. const i5 = t2({ ...p2.query, f: l5, ...m5, ...y4(u4, m5) });
  408. return U(G(p2.path, "queryTopFeatures"), { ...d7, query: { ...i5, ...d7.query } });
  409. });
  410. }
  411. // node_modules/@arcgis/core/rest/query/executeTopFeaturesQuery.js
  412. async function s5(s8, p2, u4, a7) {
  413. const m5 = n3(s8), i5 = { ...a7 }, { data: f } = await d6(m5, S2.from(p2), u4, i5);
  414. return x3.fromJSON(f);
  415. }
  416. // node_modules/@arcgis/core/rest/query/executeForTopIds.js
  417. async function s6(s8, e2, p2) {
  418. const a7 = n3(s8);
  419. return (await m3(a7, S2.from(e2), { ...p2 })).data.objectIds;
  420. }
  421. // node_modules/@arcgis/core/rest/query/executeForTopExtents.js
  422. async function m4(m5, s8, n10) {
  423. const p2 = n3(m5), a7 = await p(p2, S2.from(s8), { ...n10 });
  424. return { count: a7.data.count, extent: M.fromJSON(a7.data.extent) };
  425. }
  426. // node_modules/@arcgis/core/rest/query/executeForTopCount.js
  427. async function s7(s8, e2, p2) {
  428. const u4 = n3(s8);
  429. return (await a6(u4, S2.from(e2), { ...p2 })).data.count;
  430. }
  431. // node_modules/@arcgis/core/tasks/Task.js
  432. var i4 = class extends y2 {
  433. constructor(...r4) {
  434. super(...r4), this.requestOptions = null, this.url = null;
  435. }
  436. normalizeCtorArgs(r4, s8) {
  437. return typeof r4 != "string" ? r4 : { url: r4, ...s8 };
  438. }
  439. get parsedUrl() {
  440. return this._parseUrl(this.url);
  441. }
  442. _parseUrl(r4) {
  443. return r4 ? j(r4) : null;
  444. }
  445. _encode(r4, s8, t3) {
  446. const o4 = {};
  447. for (const e2 in r4) {
  448. if (e2 === "declaredClass")
  449. continue;
  450. const i5 = r4[e2];
  451. if (i5 != null && typeof i5 != "function")
  452. if (Array.isArray(i5)) {
  453. o4[e2] = [];
  454. for (let r5 = 0; r5 < i5.length; r5++)
  455. o4[e2][r5] = this._encode(i5[r5]);
  456. } else if (typeof i5 == "object")
  457. if (i5.toJSON) {
  458. const r5 = i5.toJSON(t3 && t3[e2]);
  459. o4[e2] = s8 ? r5 : JSON.stringify(r5);
  460. } else
  461. o4[e2] = s8 ? i5 : JSON.stringify(i5);
  462. else
  463. o4[e2] = i5;
  464. }
  465. return o4;
  466. }
  467. };
  468. e([d({ readOnly: true })], i4.prototype, "parsedUrl", null), e([d()], i4.prototype, "requestOptions", void 0), e([d({ type: String })], i4.prototype, "url", void 0), i4 = e([n("esri.tasks.Task")], i4);
  469. var l4 = i4;
  470. // node_modules/@arcgis/core/layers/graphics/sources/support/QueryTask.js
  471. var g2 = class extends l4 {
  472. constructor(t3) {
  473. super(t3), this.dynamicDataSource = null, this.fieldsIndex = null, this.format = "json", this.gdbVersion = null, this.infoFor3D = null, this.sourceSpatialReference = null;
  474. }
  475. execute(t3, e2) {
  476. return this.executeJSON(t3, e2).then((r4) => this.featureSetFromJSON(t3, r4, e2));
  477. }
  478. async executeJSON(t3, e2) {
  479. const o4 = { ...this.requestOptions, ...e2 }, s8 = this._normalizeQuery(t3), i5 = t3.outStatistics?.[0] != null, u4 = a("featurelayer-pbf-statistics"), n10 = !i5 || u4;
  480. let a7;
  481. if (this.format === "pbf" && n10)
  482. try {
  483. a7 = await n6(this.url, s8, o4);
  484. } catch (m5) {
  485. if (m5.name !== "query:parsing-pbf")
  486. throw m5;
  487. this.format = "json";
  488. }
  489. return this.format !== "json" && n10 || (a7 = await a2(this.url, s8, o4)), this._normalizeFields(a7.fields), a7;
  490. }
  491. async featureSetFromJSON(t3, e2, r4) {
  492. if (!this._queryIs3DObjectFormat(t3) || t(this.infoFor3D) || !e2.features || !e2.features.length)
  493. return x3.fromJSON(e2);
  494. const { meshFeatureSetFromJSON: s8 } = await y(import("./meshFeatureSet-77HDYLJC.js"), r4);
  495. return s8(t3, this.infoFor3D, e2);
  496. }
  497. executeForCount(t3, e2) {
  498. const r4 = { ...this.requestOptions, ...e2 }, o4 = this._normalizeQuery(t3);
  499. return n4(this.url, o4, r4);
  500. }
  501. executeForExtent(t3, e2) {
  502. const r4 = { ...this.requestOptions, ...e2 }, o4 = this._normalizeQuery(t3);
  503. return m2(this.url, o4, r4);
  504. }
  505. executeForIds(t3, e2) {
  506. const r4 = { ...this.requestOptions, ...e2 }, o4 = this._normalizeQuery(t3);
  507. return s3(this.url, o4, r4);
  508. }
  509. executeRelationshipQuery(t3, e2) {
  510. t3 = d4.from(t3);
  511. const r4 = { ...this.requestOptions, ...e2 };
  512. return (this.gdbVersion || this.dynamicDataSource) && ((t3 = t3.clone()).gdbVersion = t3.gdbVersion || this.gdbVersion, t3.dynamicDataSource = t3.dynamicDataSource || this.dynamicDataSource), n9(this.url, t3, r4);
  513. }
  514. executeRelationshipQueryForCount(t3, e2) {
  515. t3 = d4.from(t3);
  516. const r4 = { ...this.requestOptions, ...e2 };
  517. return (this.gdbVersion || this.dynamicDataSource) && ((t3 = t3.clone()).gdbVersion = t3.gdbVersion || this.gdbVersion, t3.dynamicDataSource = t3.dynamicDataSource || this.dynamicDataSource), u3(this.url, t3, r4);
  518. }
  519. executeAttachmentQuery(t3, e2) {
  520. const r4 = { ...this.requestOptions, ...e2 };
  521. return a5(this.url, t3, r4);
  522. }
  523. executeTopFeaturesQuery(t3, e2) {
  524. const r4 = { ...this.requestOptions, ...e2 };
  525. return s5(this.parsedUrl, t3, this.sourceSpatialReference, r4);
  526. }
  527. executeForTopIds(t3, e2) {
  528. const r4 = { ...this.requestOptions, ...e2 };
  529. return s6(this.parsedUrl, t3, r4);
  530. }
  531. executeForTopExtents(t3, e2) {
  532. const r4 = { ...this.requestOptions, ...e2 };
  533. return m4(this.parsedUrl, t3, r4);
  534. }
  535. executeForTopCount(t3, e2) {
  536. const r4 = { ...this.requestOptions, ...e2 };
  537. return s7(this.parsedUrl, t3, r4);
  538. }
  539. _normalizeQuery(t3) {
  540. let r4 = b.from(t3);
  541. if (r4.sourceSpatialReference = r4.sourceSpatialReference || this.sourceSpatialReference, (this.gdbVersion || this.dynamicDataSource) && (r4 = r4 === t3 ? r4.clone() : r4, r4.gdbVersion = t3.gdbVersion || this.gdbVersion, r4.dynamicDataSource = t3.dynamicDataSource ? K.from(t3.dynamicDataSource) : this.dynamicDataSource), r(this.infoFor3D) && this._queryIs3DObjectFormat(t3)) {
  542. r4 = r4 === t3 ? r4.clone() : r4, r4.formatOf3DObjects = null;
  543. for (const t4 of this.infoFor3D.queryFormats) {
  544. if (t4.id === "3D_glb") {
  545. r4.formatOf3DObjects = t4.id;
  546. break;
  547. }
  548. t4.id !== "3D_gltf" || r4.formatOf3DObjects || (r4.formatOf3DObjects = t4.id);
  549. }
  550. if (!r4.formatOf3DObjects)
  551. throw new s("query:unsupported-3d-query-formats", "Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");
  552. if (t(r4.outFields) || !r4.outFields.includes("*")) {
  553. r4 = r4 === t3 ? r4.clone() : r4, t(r4.outFields) && (r4.outFields = []);
  554. const { originX: e2, originY: s8, originZ: i5, translationX: u4, translationY: n10, translationZ: a7, scaleX: c5, scaleY: p2, scaleZ: m5, rotationX: f, rotationY: l5, rotationZ: h2, rotationDeg: d7 } = this.infoFor3D.transformFieldRoles;
  555. r4.outFields.push(e2, s8, i5, u4, n10, a7, c5, p2, m5, f, l5, h2, d7);
  556. }
  557. }
  558. return r4;
  559. }
  560. _normalizeFields(t3) {
  561. if (r(this.fieldsIndex) && r(t3))
  562. for (const e2 of t3) {
  563. const t4 = this.fieldsIndex.get(e2.name);
  564. t4 && Object.assign(e2, t4.toJSON());
  565. }
  566. }
  567. _queryIs3DObjectFormat(t3) {
  568. return r(this.infoFor3D) && t3.returnGeometry && t3.multipatchOption !== "xyFootprint" && !t3.outStatistics;
  569. }
  570. };
  571. e([d({ type: K })], g2.prototype, "dynamicDataSource", void 0), e([d()], g2.prototype, "fieldsIndex", void 0), e([d()], g2.prototype, "format", void 0), e([d()], g2.prototype, "gdbVersion", void 0), e([d()], g2.prototype, "infoFor3D", void 0), e([d()], g2.prototype, "sourceSpatialReference", void 0), g2 = e([n("esri.tasks.QueryTask")], g2);
  572. var Q = g2;
  573. // node_modules/@arcgis/core/layers/graphics/sources/FeatureLayerSource.js
  574. var I = new s2({ originalAndCurrentFeatures: "original-and-current-features", none: "none" });
  575. async function _(e2) {
  576. if (typeof e2 == "string") {
  577. const t3 = nt(e2);
  578. return t3 || { data: e2 };
  579. }
  580. return new Promise((t3, r4) => {
  581. const s8 = new FileReader();
  582. s8.readAsDataURL(e2), s8.onload = () => t3(nt(s8.result)), s8.onerror = (e3) => r4(e3);
  583. });
  584. }
  585. var O = new Set(["Feature Layer", "Table"]);
  586. var S3 = class extends m {
  587. constructor() {
  588. super(...arguments), this.type = "feature-layer", this.refresh = x(async () => {
  589. await this.load();
  590. const e2 = this.sourceJSON.editingInfo?.lastEditDate;
  591. if (e2 == null)
  592. return { dataChanged: true, updates: {} };
  593. try {
  594. await this._fetchService(null);
  595. } catch {
  596. return { dataChanged: true, updates: {} };
  597. }
  598. const t3 = e2 !== this.sourceJSON.editingInfo?.lastEditDate;
  599. return { dataChanged: t3, updates: t3 ? { editingInfo: this.sourceJSON.editingInfo, extent: this.sourceJSON.extent } : null };
  600. });
  601. }
  602. load(e2) {
  603. const t3 = r(e2) ? e2.signal : null;
  604. return this.addResolvingPromise(this._fetchService(this.layer.sourceJSON, t3)), Promise.resolve(this);
  605. }
  606. get queryTask() {
  607. const { capabilities: { query: { supportsFormatPBF: e2 } }, parsedUrl: t3, dynamicDataSource: r4, infoFor3D: s8, gdbVersion: a7, spatialReference: o4, fieldsIndex: n10 } = this.layer, u4 = a("featurelayer-pbf") && e2 && t(s8) ? "pbf" : "json";
  608. return new Q({ url: t3.path, format: u4, fieldsIndex: n10, infoFor3D: s8, dynamicDataSource: r4, gdbVersion: a7, sourceSpatialReference: o4 });
  609. }
  610. async addAttachment(e2, t3) {
  611. await this.load();
  612. const s8 = e2.attributes[this.layer.objectIdField], a7 = this.layer.parsedUrl.path + "/" + s8 + "/addAttachment", i5 = this._getLayerRequestOptions(), o4 = this._getFormDataForAttachment(t3, i5.query);
  613. try {
  614. const e3 = await U(a7, { body: o4 });
  615. return this._createFeatureEditResult(e3.data.addAttachmentResult);
  616. } catch (n10) {
  617. throw this._createAttachmentErrorResult(s8, n10);
  618. }
  619. }
  620. async updateAttachment(e2, t3, s8) {
  621. await this.load();
  622. const a7 = e2.attributes[this.layer.objectIdField], i5 = this.layer.parsedUrl.path + "/" + a7 + "/updateAttachment", o4 = this._getLayerRequestOptions({ query: { attachmentId: t3 } }), n10 = this._getFormDataForAttachment(s8, o4.query);
  623. try {
  624. const e3 = await U(i5, { body: n10 });
  625. return this._createFeatureEditResult(e3.data.updateAttachmentResult);
  626. } catch (u4) {
  627. throw this._createAttachmentErrorResult(a7, u4);
  628. }
  629. }
  630. async applyEdits(e2, t3) {
  631. await this.load();
  632. const s8 = e2.addFeatures.map(this._serializeFeature, this), a7 = e2.updateFeatures.map(this._serializeFeature, this), i5 = this._getFeatureIds(e2.deleteFeatures, t3?.globalIdUsed);
  633. i2(s8, a7, this.layer.spatialReference);
  634. const o4 = [], n10 = [], u4 = [...e2.deleteAttachments];
  635. for (const r4 of e2.addAttachments)
  636. o4.push(await this._serializeAttachment(r4));
  637. for (const r4 of e2.updateAttachments)
  638. n10.push(await this._serializeAttachment(r4));
  639. const d7 = o4.length || n10.length || u4.length ? { adds: o4, updates: n10, deletes: u4 } : null, l5 = { gdbVersion: t3?.gdbVersion || this.layer.gdbVersion, rollbackOnFailure: t3?.rollbackOnFailureEnabled, useGlobalIds: t3?.globalIdUsed, returnEditMoment: t3?.returnEditMoment, usePreviousEditMoment: t3?.usePreviousEditMoment, sessionId: t3?.sessionId };
  640. t3?.returnServiceEditsOption ? (l5.edits = JSON.stringify([{ id: this.layer.layerId, adds: s8, updates: a7, deletes: i5, attachments: d7 }]), l5.returnServiceEditsOption = I.toJSON(t3?.returnServiceEditsOption), l5.returnServiceEditsInSourceSR = t3?.returnServiceEditsInSourceSR) : (l5.adds = s8.length ? JSON.stringify(s8) : null, l5.updates = a7.length ? JSON.stringify(a7) : null, l5.deletes = i5.length ? t3?.globalIdUsed ? JSON.stringify(i5) : i5.join(",") : null, l5.attachments = d7 && JSON.stringify(d7));
  641. const c5 = this._getLayerRequestOptions({ method: "post", query: l5 }), h2 = t3?.returnServiceEditsOption ? this.layer.url : this.layer.parsedUrl.path, p2 = await U(h2 + "/applyEdits", c5);
  642. return this._createEditsResult(p2);
  643. }
  644. async deleteAttachments(e2, t3) {
  645. await this.load();
  646. const s8 = e2.attributes[this.layer.objectIdField], a7 = this.layer.parsedUrl.path + "/" + s8 + "/deleteAttachments";
  647. try {
  648. return (await U(a7, this._getLayerRequestOptions({ query: { attachmentIds: t3.join(",") }, method: "post" }))).data.deleteAttachmentResults.map(this._createFeatureEditResult);
  649. } catch (i5) {
  650. throw this._createAttachmentErrorResult(s8, i5);
  651. }
  652. }
  653. fetchRecomputedExtents(e2 = {}) {
  654. const t3 = e2.signal;
  655. return this.load({ signal: t3 }).then(async () => {
  656. const t4 = this._getLayerRequestOptions({ ...e2, query: { returnUpdates: true } }), { layerId: a7, url: i5 } = this.layer, { data: o4 } = await U(`${i5}/${a7}`, t4), { id: n10, extent: u4, fullExtent: d7, timeExtent: l5 } = o4, c5 = u4 || d7;
  657. return { id: n10, fullExtent: c5 && M.fromJSON(c5), timeExtent: l5 && y3.fromJSON({ start: l5[0], end: l5[1] }) };
  658. });
  659. }
  660. async queryAttachments(e2, t3 = {}) {
  661. const { parsedUrl: s8 } = this.layer, a7 = s8.path;
  662. await this.load();
  663. const i5 = this._getLayerRequestOptions(t3);
  664. if (!this.layer.get("capabilities.operations.supportsQueryAttachments")) {
  665. const { objectIds: t4 } = e2, s9 = [];
  666. for (const e3 of t4) {
  667. const t5 = a7 + "/" + e3 + "/attachments";
  668. s9.push(U(t5, i5));
  669. }
  670. return Promise.all(s9).then((e3) => t4.map((t5, r4) => ({ parentObjectId: t5, attachmentInfos: e3[r4].data.attachmentInfos }))).then((e3) => a4(e3, a7));
  671. }
  672. return this.queryTask.executeAttachmentQuery(e2, i5);
  673. }
  674. async queryFeatures(e2, t3) {
  675. return await this.load(), this.queryTask.execute(e2, { ...t3, query: this._createRequestQueryOptions(t3) });
  676. }
  677. async queryFeaturesJSON(e2, t3) {
  678. return await this.load(), this.queryTask.executeJSON(e2, { ...t3, query: this._createRequestQueryOptions(t3) });
  679. }
  680. async queryObjectIds(e2, t3) {
  681. return await this.load(), this.queryTask.executeForIds(e2, { ...t3, query: this._createRequestQueryOptions(t3) });
  682. }
  683. async queryFeatureCount(e2, t3) {
  684. return await this.load(), this.queryTask.executeForCount(e2, { ...t3, query: this._createRequestQueryOptions(t3) });
  685. }
  686. async queryExtent(e2, t3) {
  687. return await this.load(), this.queryTask.executeForExtent(e2, { ...t3, query: this._createRequestQueryOptions(t3) });
  688. }
  689. async queryRelatedFeatures(e2, t3) {
  690. return await this.load(), this.queryTask.executeRelationshipQuery(e2, { ...t3, query: this._createRequestQueryOptions(t3) });
  691. }
  692. async queryRelatedFeaturesCount(e2, t3) {
  693. return await this.load(), this.queryTask.executeRelationshipQueryForCount(e2, { ...t3, query: this._createRequestQueryOptions(t3) });
  694. }
  695. async queryTopFeatures(e2, t3) {
  696. return await this.load(), this.queryTask.executeTopFeaturesQuery(e2, { ...t3, query: this._createRequestQueryOptions(t3) });
  697. }
  698. async queryTopObjectIds(e2, t3) {
  699. return await this.load(), this.queryTask.executeForTopIds(e2, { ...t3, query: this._createRequestQueryOptions(t3) });
  700. }
  701. async queryTopExtents(e2, t3) {
  702. return await this.load(), this.queryTask.executeForTopExtents(e2, { ...t3, query: this._createRequestQueryOptions(t3) });
  703. }
  704. async queryTopCount(e2, t3) {
  705. return await this.load(), this.queryTask.executeForTopCount(e2, { ...t3, query: this._createRequestQueryOptions(t3) });
  706. }
  707. _createRequestQueryOptions(e2) {
  708. const t3 = { ...this.layer.customParameters, token: this.layer.apiKey, ...e2?.query };
  709. return this.layer.datesInUnknownTimezone && (t3.timeReferenceUnknownClient = true), t3;
  710. }
  711. async _fetchService(e2, t3) {
  712. if (!e2) {
  713. const { data: s9 } = await U(this.layer.parsedUrl.path, this._getLayerRequestOptions({ query: a("featurelayer-advanced-symbols") ? { returnAdvancedSymbols: true } : {}, signal: t3 }));
  714. e2 = s9;
  715. }
  716. this.sourceJSON = this._patchServiceJSON(e2);
  717. const s8 = e2.type;
  718. if (!O.has(s8))
  719. throw new s("feature-layer-source:unsupported-type", `Source type "${s8}" is not supported`);
  720. }
  721. _patchServiceJSON(e2) {
  722. if (e2.type !== "Table" && e2.geometryType && !e2?.drawingInfo?.renderer && !e2.defaultSymbol) {
  723. const t3 = u(e2.geometryType).renderer;
  724. o("drawingInfo.renderer", t3, e2);
  725. }
  726. return e2.geometryType === "esriGeometryMultiPatch" && e2.infoFor3D && (e2.geometryType = "mesh"), e2;
  727. }
  728. _serializeFeature(e2) {
  729. const { geometry: t3, attributes: r4 } = e2;
  730. return t(t3) ? { attributes: r4 } : t3.type === "mesh" || t3.type === "extent" ? null : { geometry: t3.toJSON(), attributes: r4 };
  731. }
  732. async _serializeAttachment(e2) {
  733. const { feature: t3, attachment: r4 } = e2, { globalId: s8, name: a7, contentType: i5, data: o4, uploadId: n10 } = r4, u4 = { globalId: s8, parentGlobalId: null, contentType: null, name: null, uploadId: null, data: null };
  734. if (t3 && (u4.parentGlobalId = "attributes" in t3 ? t3.attributes && t3.attributes[this.layer.globalIdField] : t3.globalId), n10)
  735. u4.uploadId = n10;
  736. else if (o4) {
  737. const e3 = await _(o4);
  738. u4.contentType = e3.mediaType, u4.data = e3.data, o4 instanceof File && (u4.name = o4.name);
  739. }
  740. return a7 && (u4.name = a7), i5 && (u4.contentType = i5), u4;
  741. }
  742. _getFeatureIds(e2, t3) {
  743. const r4 = e2[0];
  744. return r4 ? this._canUseGlobalIds(t3, e2) ? this._getGlobalIdsFromFeatureIdentifier(e2) : "objectId" in r4 ? this._getObjectIdsFromFeatureIdentifier(e2) : this._getIdsFromFeatures(e2) : [];
  745. }
  746. _getIdsFromFeatures(e2) {
  747. const t3 = this.layer.objectIdField;
  748. return e2.map((e3) => e3.attributes && e3.attributes[t3]);
  749. }
  750. _canUseGlobalIds(e2, t3) {
  751. return e2 && "globalId" in t3[0];
  752. }
  753. _getObjectIdsFromFeatureIdentifier(e2) {
  754. return e2.map((e3) => e3.objectId);
  755. }
  756. _getGlobalIdsFromFeatureIdentifier(e2) {
  757. return e2.map((e3) => e3.globalId);
  758. }
  759. _createEditsResult(e2) {
  760. const t3 = e2.data, { layerId: r4 } = this.layer, s8 = [];
  761. let a7 = null;
  762. if (Array.isArray(t3))
  763. for (const n10 of t3)
  764. s8.push({ id: n10.id, editedFeatures: n10.editedFeatures }), n10.id === r4 && (a7 = { addResults: n10.addResults, updateResults: n10.updateResults, deleteResults: n10.deleteResults, attachments: n10.attachments, editMoment: n10.editMoment });
  765. else
  766. a7 = t3;
  767. const i5 = a7?.attachments, o4 = { addFeatureResults: a7.addResults ? a7.addResults.map(this._createFeatureEditResult, this) : [], updateFeatureResults: a7.updateResults ? a7.updateResults.map(this._createFeatureEditResult, this) : [], deleteFeatureResults: a7.deleteResults ? a7.deleteResults.map(this._createFeatureEditResult, this) : [], addAttachmentResults: i5 && i5.addResults ? i5.addResults.map(this._createFeatureEditResult, this) : [], updateAttachmentResults: i5 && i5.updateResults ? i5.updateResults.map(this._createFeatureEditResult, this) : [], deleteAttachmentResults: i5 && i5.deleteResults ? i5.deleteResults.map(this._createFeatureEditResult, this) : [] };
  768. if (a7.editMoment && (o4.editMoment = a7.editMoment), s8.length > 0) {
  769. o4.editedFeatureResults = [];
  770. for (const e3 of s8) {
  771. const { adds: t4, updates: r5, deletes: s9, spatialReference: a8 } = e3.editedFeatures, i6 = a8 ? new k(a8) : null;
  772. o4.editedFeatureResults.push({ layerId: e3.id, editedFeatures: { adds: t4?.map((e4) => this._createEditedFeature(e4, i6)) || [], updates: r5?.map((e4) => ({ original: this._createEditedFeature(e4[0], i6), current: this._createEditedFeature(e4[1], i6) })) || [], deletes: s9?.map((e4) => this._createEditedFeature(e4, i6)) || [], spatialReference: i6 } });
  773. }
  774. }
  775. return o4;
  776. }
  777. _createEditedFeature(e2, r4) {
  778. return new g({ attributes: e2.attributes, geometry: d2({ ...e2.geometry, spatialReference: r4 }) });
  779. }
  780. _createFeatureEditResult(e2) {
  781. const t3 = e2.success === true ? null : e2.error || { code: void 0, description: void 0 };
  782. return { objectId: e2.objectId, globalId: e2.globalId, error: t3 ? new s("feature-layer-source:edit-failure", t3.description, { code: t3.code }) : null };
  783. }
  784. _createAttachmentErrorResult(e2, t3) {
  785. const r4 = t3.details.messages && t3.details.messages[0] || t3.message, s8 = t3.details.httpStatus || t3.details.messageCode;
  786. return { objectId: e2, globalId: null, error: new s("feature-layer-source:attachment-failure", r4, { code: s8 }) };
  787. }
  788. _getFormDataForAttachment(e2, t3) {
  789. const r4 = e2 instanceof FormData ? e2 : e2 && e2.elements ? new FormData(e2) : null;
  790. if (r4)
  791. for (const s8 in t3) {
  792. const e3 = t3[s8];
  793. e3 != null && (r4.set ? r4.set(s8, e3) : r4.append(s8, e3));
  794. }
  795. return r4;
  796. }
  797. _getLayerRequestOptions(e2 = {}) {
  798. const { parsedUrl: t3, gdbVersion: r4, dynamicDataSource: s8 } = this.layer;
  799. return { ...e2, query: { gdbVersion: r4, layer: s8 ? JSON.stringify({ source: s8 }) : void 0, ...t3.query, f: "json", ...this._createRequestQueryOptions(e2) }, responseType: "json" };
  800. }
  801. };
  802. e([d()], S3.prototype, "type", void 0), e([d({ constructOnly: true })], S3.prototype, "layer", void 0), e([d({ readOnly: true })], S3.prototype, "queryTask", null), S3 = e([n("esri.layers.graphics.sources.FeatureLayerSource")], S3);
  803. var E = S3;
  804. export {
  805. E as default
  806. };
  807. //# sourceMappingURL=FeatureLayerSource-B6VXBL6Z.js.map