CSVLayer-PX22PS2D.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. import {
  2. c
  3. } from "./chunk-4D6PVVFX.js";
  4. import "./chunk-WQJRLXWG.js";
  5. import {
  6. Ke
  7. } from "./chunk-6NQ3AA2U.js";
  8. import "./chunk-524XACB7.js";
  9. import "./chunk-XKHC7KKF.js";
  10. import "./chunk-HGDNY7J3.js";
  11. import "./chunk-GD5TMIPM.js";
  12. import "./chunk-ZRX5UNQH.js";
  13. import {
  14. u
  15. } from "./chunk-VEAEIBHK.js";
  16. import "./chunk-6SASJ6IM.js";
  17. import "./chunk-3OHML7FO.js";
  18. import "./chunk-JGOAMEPM.js";
  19. import "./chunk-Z64YKYHD.js";
  20. import {
  21. x as x2
  22. } from "./chunk-2VFJVI2I.js";
  23. import "./chunk-F37AVPUF.js";
  24. import "./chunk-FUEX356Y.js";
  25. import "./chunk-TNLRDNTC.js";
  26. import "./chunk-OSNKP4CI.js";
  27. import "./chunk-435DJNTD.js";
  28. import "./chunk-T3EUPDKL.js";
  29. import "./chunk-2SJEIKRW.js";
  30. import "./chunk-PHRSJJ3U.js";
  31. import "./chunk-VVBOYBFX.js";
  32. import "./chunk-S7R5EXHN.js";
  33. import "./chunk-FMKGHOGD.js";
  34. import "./chunk-6URTNEGN.js";
  35. import "./chunk-KN7TOKVN.js";
  36. import "./chunk-RQJNTZAL.js";
  37. import "./chunk-QTOOFNRV.js";
  38. import "./chunk-7O56JPWQ.js";
  39. import "./chunk-6B2LQBKM.js";
  40. import "./chunk-MFI6BALW.js";
  41. import "./chunk-CIG5OHC7.js";
  42. import "./chunk-FUD7XO3N.js";
  43. import "./chunk-6EU7GFUT.js";
  44. import "./chunk-MFUAILAT.js";
  45. import "./chunk-HZJYXMI6.js";
  46. import "./chunk-27P5ZSC7.js";
  47. import "./chunk-UPD4MTCL.js";
  48. import "./chunk-GRBROWI6.js";
  49. import "./chunk-5NKYXKIA.js";
  50. import "./chunk-MPWGHCZG.js";
  51. import "./chunk-FTI5VP6T.js";
  52. import "./chunk-RZFGRBD7.js";
  53. import "./chunk-PUSPZYFZ.js";
  54. import "./chunk-EN7YGJWG.js";
  55. import "./chunk-VBNMTM7L.js";
  56. import "./chunk-3D3QEPRE.js";
  57. import "./chunk-JFNNSBWL.js";
  58. import {
  59. b
  60. } from "./chunk-UD63WBG3.js";
  61. import "./chunk-X7DBH4KK.js";
  62. import "./chunk-LY74KTXV.js";
  63. import "./chunk-EWE6EXPY.js";
  64. import "./chunk-KUXNUNAI.js";
  65. import "./chunk-KMAHKQ2G.js";
  66. import "./chunk-522WBHUO.js";
  67. import "./chunk-WNCU6BFU.js";
  68. import "./chunk-PIGRDDRG.js";
  69. import "./chunk-BJHM4JNS.js";
  70. import "./chunk-F6A2QQ26.js";
  71. import "./chunk-XLV7RUSE.js";
  72. import "./chunk-NTUXR253.js";
  73. import "./chunk-EOSZHC5H.js";
  74. import "./chunk-C43UE3Z5.js";
  75. import "./chunk-H2KDMZTR.js";
  76. import "./chunk-RMX2AZ4P.js";
  77. import "./chunk-NE3ESGA6.js";
  78. import "./chunk-YIS6BAC3.js";
  79. import "./chunk-7XXXCK2A.js";
  80. import "./chunk-7ZIDBK7B.js";
  81. import "./chunk-KHA63LLS.js";
  82. import "./chunk-FGKNEJKJ.js";
  83. import "./chunk-PSV473TI.js";
  84. import "./chunk-I3OBGWNS.js";
  85. import "./chunk-FONIFA5N.js";
  86. import "./chunk-EG5OI4V4.js";
  87. import {
  88. m,
  89. p
  90. } from "./chunk-65BYCSII.js";
  91. import "./chunk-WZQZRKNH.js";
  92. import "./chunk-LRDX4TO7.js";
  93. import "./chunk-6A4U74YA.js";
  94. import "./chunk-CYI7KFYB.js";
  95. import "./chunk-5LXROFTA.js";
  96. import "./chunk-GJXW4HL5.js";
  97. import "./chunk-WJW5DUN6.js";
  98. import "./chunk-W72F6AS3.js";
  99. import "./chunk-PJ7ZQ4VD.js";
  100. import "./chunk-WDLTDV2L.js";
  101. import "./chunk-TERAW6FT.js";
  102. import "./chunk-N2663GRX.js";
  103. import "./chunk-O4FY3ITT.js";
  104. import "./chunk-WEMIK25H.js";
  105. import "./chunk-4DDBH2K5.js";
  106. import "./chunk-7N4X6GF3.js";
  107. import "./chunk-JXW4QTJA.js";
  108. import "./chunk-UXF37FQ4.js";
  109. import "./chunk-ZOEK6QHJ.js";
  110. import "./chunk-XNLG7T2T.js";
  111. import "./chunk-IR4PV7VK.js";
  112. import "./chunk-2Z6LERTI.js";
  113. import "./chunk-OWVBLVP3.js";
  114. import "./chunk-AFZ7XSEW.js";
  115. import "./chunk-EGZW6HC3.js";
  116. import "./chunk-4NKD334K.js";
  117. import "./chunk-65K7LC56.js";
  118. import "./chunk-ATPLLI5W.js";
  119. import "./chunk-WJ3OEUD3.js";
  120. import "./chunk-MXB2XLKV.js";
  121. import "./chunk-XH7RUGVZ.js";
  122. import {
  123. m as m2
  124. } from "./chunk-TBBTRX4O.js";
  125. import "./chunk-YBSUITLL.js";
  126. import "./chunk-ALDCDSPV.js";
  127. import "./chunk-DT6EAZQ5.js";
  128. import "./chunk-HNOZUNJ4.js";
  129. import "./chunk-VNFRAYHO.js";
  130. import "./chunk-R5IG2D6H.js";
  131. import {
  132. j
  133. } from "./chunk-VBRY5KJM.js";
  134. import "./chunk-PDKDCAAD.js";
  135. import {
  136. M2 as M,
  137. o
  138. } from "./chunk-ECW2QABR.js";
  139. import "./chunk-GCDJLKH4.js";
  140. import {
  141. k2 as k
  142. } from "./chunk-MRJEICT6.js";
  143. import {
  144. d,
  145. e,
  146. n2 as n
  147. } from "./chunk-Y3WMVFTW.js";
  148. import "./chunk-SAS7RONY.js";
  149. import "./chunk-WSRBH7BF.js";
  150. import "./chunk-IHXECKQQ.js";
  151. import {
  152. x
  153. } from "./chunk-ULGDPLM2.js";
  154. import {
  155. s3 as s
  156. } from "./chunk-EMJ4ZSM2.js";
  157. import "./chunk-IKP3YN53.js";
  158. import {
  159. a,
  160. r
  161. } from "./chunk-GZT4BVFP.js";
  162. import "./chunk-A5ICIBVI.js";
  163. // node_modules/@arcgis/core/layers/graphics/sources/CSVSource.js
  164. var l = class extends m2 {
  165. constructor(t) {
  166. super(t), this.type = "csv", this.refresh = x(async (t2) => {
  167. await this.load();
  168. const { extent: e2, timeExtent: o2 } = await this._connection.invoke("refresh", t2);
  169. return this.sourceJSON.extent = e2, o2 && (this.sourceJSON.timeInfo.timeExtent = [o2.start, o2.end]), { dataChanged: true, updates: { extent: this.sourceJSON.extent, timeInfo: this.sourceJSON.timeInfo } };
  170. });
  171. }
  172. load(t) {
  173. const e2 = r(t) ? t.signal : null;
  174. return this.addResolvingPromise(this._startWorker(e2)), Promise.resolve(this);
  175. }
  176. destroy() {
  177. this._connection?.close(), this._connection = null;
  178. }
  179. async openPorts() {
  180. return await this.load(), this._connection.openPorts();
  181. }
  182. async queryFeatures(t, e2 = {}) {
  183. await this.load(e2);
  184. const o2 = await this._connection.invoke("queryFeatures", t ? t.toJSON() : null, e2);
  185. return x2.fromJSON(o2);
  186. }
  187. async queryFeaturesJSON(t, e2 = {}) {
  188. return await this.load(e2), this._connection.invoke("queryFeatures", t ? t.toJSON() : null, e2);
  189. }
  190. async queryFeatureCount(t, e2 = {}) {
  191. return await this.load(e2), this._connection.invoke("queryFeatureCount", t ? t.toJSON() : null, e2);
  192. }
  193. async queryObjectIds(t, e2 = {}) {
  194. return await this.load(e2), this._connection.invoke("queryObjectIds", t ? t.toJSON() : null, e2);
  195. }
  196. async queryExtent(t, e2 = {}) {
  197. await this.load(e2);
  198. const o2 = await this._connection.invoke("queryExtent", t ? t.toJSON() : null, e2);
  199. return { count: o2.count, extent: M.fromJSON(o2.extent) };
  200. }
  201. async querySnapping(t, e2 = {}) {
  202. return await this.load(e2), this._connection.invoke("querySnapping", t, e2);
  203. }
  204. async _startWorker(t) {
  205. this._connection = await u("CSVSourceWorker", { strategy: a("feature-layers-workers") ? "dedicated" : "local", signal: t });
  206. const { url: o2, delimiter: r2, fields: s2, latitudeField: n2, longitudeField: a2, spatialReference: c2, timeInfo: u2 } = this.loadOptions, l2 = await this._connection.invoke("load", { url: o2, customParameters: this.customParameters, parsingOptions: { delimiter: r2, fields: s2?.map((t2) => t2.toJSON()), latitudeField: n2, longitudeField: a2, spatialReference: c2?.toJSON(), timeInfo: u2?.toJSON() } }, { signal: t });
  207. this.locationInfo = l2.locationInfo, this.sourceJSON = l2.layerDefinition, this.delimiter = l2.delimiter;
  208. }
  209. };
  210. e([d()], l.prototype, "type", void 0), e([d()], l.prototype, "loadOptions", void 0), e([d()], l.prototype, "customParameters", void 0), e([d()], l.prototype, "locationInfo", void 0), e([d()], l.prototype, "sourceJSON", void 0), e([d()], l.prototype, "delimiter", void 0), l = e([n("esri.layers.graphics.sources.CSVSource")], l);
  211. // node_modules/@arcgis/core/layers/CSVLayer.js
  212. function h(e2, r2) {
  213. throw new s(r2, `CSVLayer (title: ${e2.title}, id: ${e2.id}) cannot be saved to a portal item`);
  214. }
  215. var m3 = class extends Ke {
  216. constructor(...e2) {
  217. super(...e2), this.capabilities = c(false, false), this.delimiter = null, this.editingEnabled = false, this.fields = null, this.latitudeField = null, this.locationType = "coordinates", this.longitudeField = null, this.operationalLayerType = "CSV", this.outFields = ["*"], this.path = null, this.portalItem = null, this.spatialReference = k.WGS84, this.source = null, this.type = "csv";
  218. }
  219. normalizeCtorArgs(e2, t) {
  220. return typeof e2 == "string" ? { url: e2, ...t } : e2;
  221. }
  222. get isTable() {
  223. return this.loaded && this.geometryType == null;
  224. }
  225. readWebMapLabelsVisible(e2, t) {
  226. return t.showLabels != null ? t.showLabels : !!(t.layerDefinition && t.layerDefinition.drawingInfo && t.layerDefinition.drawingInfo.labelingInfo);
  227. }
  228. set url(e2) {
  229. if (!e2)
  230. return void this._set("url", e2);
  231. const t = j(e2);
  232. this._set("url", t.path), t.query && (this.customParameters = { ...this.customParameters, ...t.query });
  233. }
  234. async createGraphicsSource(e2) {
  235. const t = new l({ loadOptions: { delimiter: this.delimiter, fields: this.fields, latitudeField: this.latitudeField, longitudeField: this.longitudeField, spatialReference: this.spatialReference, timeInfo: this.timeInfo, url: this.url }, customParameters: this.customParameters });
  236. return this._set("source", t), await t.load({ signal: e2 }), this.read({ locationInfo: t.locationInfo, columnDelimiter: t.delimiter }, { origin: "service", url: this.parsedUrl }), t;
  237. }
  238. queryFeatures(e2, t) {
  239. return this.load().then(() => this.source.queryFeatures(b.from(e2) || this.createQuery())).then((e3) => {
  240. if (e3?.features)
  241. for (const t2 of e3.features)
  242. t2.layer = t2.sourceLayer = this;
  243. return e3;
  244. });
  245. }
  246. queryObjectIds(e2, t) {
  247. return this.load().then(() => this.source.queryObjectIds(b.from(e2) || this.createQuery()));
  248. }
  249. queryFeatureCount(e2, t) {
  250. return this.load().then(() => this.source.queryFeatureCount(b.from(e2) || this.createQuery()));
  251. }
  252. queryExtent(e2, t) {
  253. return this.load().then(() => this.source.queryExtent(b.from(e2) || this.createQuery()));
  254. }
  255. write(e2, t) {
  256. return super.write(e2, { ...t, writeLayerSchema: true });
  257. }
  258. clone() {
  259. throw new s("csv-layer:clone", `CSVLayer (title: ${this.title}, id: ${this.id}) cannot be cloned`);
  260. }
  261. async save(e2) {
  262. return h(this, "csv-layer:save");
  263. }
  264. async saveAs(e2, t) {
  265. return h(this, "csv-layer:save-as");
  266. }
  267. async hasDataChanged() {
  268. try {
  269. const { dataChanged: e2, updates: t } = await this.source.refresh(this.customParameters);
  270. return r(t) && this.read(t, { origin: "service", url: this.parsedUrl, ignoreDefaults: true }), e2;
  271. } catch {
  272. }
  273. return false;
  274. }
  275. _verifyFields() {
  276. }
  277. _verifySource() {
  278. }
  279. _hasMemorySource() {
  280. return false;
  281. }
  282. };
  283. e([d({ readOnly: true, json: { read: false, write: false } })], m3.prototype, "capabilities", void 0), e([d({ type: [",", " ", ";", "|", " "], json: { read: { source: "columnDelimiter" }, write: { target: "columnDelimiter", ignoreOrigin: true } } })], m3.prototype, "delimiter", void 0), e([d({ readOnly: true, type: Boolean, json: { origins: { "web-scene": { read: false, write: false } } } })], m3.prototype, "editingEnabled", void 0), e([d({ json: { read: { source: "layerDefinition.fields" }, write: { target: "layerDefinition.fields" } } })], m3.prototype, "fields", void 0), e([d({ type: Boolean, readOnly: true })], m3.prototype, "isTable", null), e([o("web-map", "labelsVisible", ["layerDefinition.drawingInfo.labelingInfo", "showLabels"])], m3.prototype, "readWebMapLabelsVisible", null), e([d({ type: String, json: { read: { source: "locationInfo.latitudeFieldName" }, write: { target: "locationInfo.latitudeFieldName", ignoreOrigin: true } } })], m3.prototype, "latitudeField", void 0), e([d({ type: ["show", "hide"] })], m3.prototype, "listMode", void 0), e([d({ type: ["coordinates"], json: { read: { source: "locationInfo.locationType" }, write: { target: "locationInfo.locationType", ignoreOrigin: true, isRequired: true } } })], m3.prototype, "locationType", void 0), e([d({ type: String, json: { read: { source: "locationInfo.longitudeFieldName" }, write: { target: "locationInfo.longitudeFieldName", ignoreOrigin: true } } })], m3.prototype, "longitudeField", void 0), e([d({ type: ["CSV"] })], m3.prototype, "operationalLayerType", void 0), e([d()], m3.prototype, "outFields", void 0), e([d({ type: String, json: { origins: { "web-scene": { read: false, write: false } }, read: false, write: false } })], m3.prototype, "path", void 0), e([d({ json: { read: false, write: false, origins: { "web-document": { read: false, write: false } } } })], m3.prototype, "portalItem", void 0), e([d({ json: { read: false }, cast: null, type: l, readOnly: true })], m3.prototype, "source", void 0), e([d({ json: { read: false }, value: "csv", readOnly: true })], m3.prototype, "type", void 0), e([d({ json: { read: m, write: { isRequired: true, ignoreOrigin: true, writer: p } } })], m3.prototype, "url", null), m3 = e([n("esri.layers.CSVLayer")], m3);
  284. var f = m3;
  285. export {
  286. f as default
  287. };
  288. //# sourceMappingURL=CSVLayer-PX22PS2D.js.map