import { v } from "./chunk-6SHVYOIM.js"; import { u } from "./chunk-7FZX4UI7.js"; import "./chunk-IR3DRB65.js"; import "./chunk-6334AFGG.js"; import "./chunk-FM5OVTDI.js"; import { s as s3 } from "./chunk-JXDT22MC.js"; import "./chunk-VM66JY35.js"; import "./chunk-OJ2HHY2O.js"; import { p } from "./chunk-BFKFNCQC.js"; import "./chunk-SZFMKPVM.js"; import "./chunk-EY2WJSAJ.js"; import "./chunk-RDMCXRET.js"; import "./chunk-73AMYZFU.js"; import "./chunk-TV3CFJQR.js"; import "./chunk-BWATQC2Y.js"; import "./chunk-6URCZZA6.js"; import "./chunk-U2WD23Z5.js"; import { v as v2 } from "./chunk-2DSTZVND.js"; import { c } from "./chunk-VXKIGGM4.js"; import { f as f2 } from "./chunk-KG45D2XL.js"; import { O } from "./chunk-JYRZQPQI.js"; import "./chunk-3HZQM2NK.js"; import "./chunk-AR2YN3E2.js"; import "./chunk-U3LEOWJX.js"; import "./chunk-4ONPMX2F.js"; import "./chunk-47NSA4T4.js"; import "./chunk-FUODOQDM.js"; import "./chunk-SWMSD4RP.js"; import "./chunk-UKEN2UNL.js"; import "./chunk-HWSWTWZD.js"; import "./chunk-P3XKUGLS.js"; import "./chunk-PIFOHNWC.js"; import "./chunk-LLO7GCYU.js"; import "./chunk-U7RKABRB.js"; import "./chunk-X7CNGECX.js"; import "./chunk-PSEI52P3.js"; import "./chunk-ZLNEXZAN.js"; import "./chunk-5UVJ64RB.js"; import { b } from "./chunk-O43KLDSX.js"; import "./chunk-AUOH2VSO.js"; import "./chunk-RYY6632W.js"; import "./chunk-DW42UVIT.js"; import "./chunk-TJNOJH33.js"; import "./chunk-YAEIHDJH.js"; import "./chunk-OSHI574D.js"; import "./chunk-44GMIOGP.js"; import "./chunk-75U5LM2V.js"; import "./chunk-ZHRAUKVQ.js"; import "./chunk-RZK6A2GY.js"; import "./chunk-BDA6VH2A.js"; import "./chunk-Z4JTBD7M.js"; import "./chunk-MSBIHK67.js"; import "./chunk-HZRKBTHJ.js"; import { U } from "./chunk-5DMBXPN2.js"; import "./chunk-QANZ6BFY.js"; import { I } from "./chunk-VEGAOVMY.js"; import { o } from "./chunk-CXCDYJ5R.js"; import "./chunk-GAOW3WRZ.js"; import "./chunk-QCKFNSN2.js"; import { e, n2 as n, n5 as n2, y3 as y } from "./chunk-6SOHRC7T.js"; import "./chunk-U2XHEJM7.js"; import "./chunk-SQOPWYIT.js"; import "./chunk-6KZ2LTDA.js"; import { f, w as w2 } from "./chunk-V6P2MAQQ.js"; import { s2 as s, s3 as s2 } from "./chunk-E5O6P5I2.js"; import "./chunk-SPWQ3AWG.js"; import { C } from "./chunk-2TIUKVZN.js"; import { e as e2, r, w } from "./chunk-YXWMMD76.js"; import "./chunk-S5KM4IGW.js"; // node_modules/@arcgis/core/core/workers/WorkerHandle.js var h = class { constructor(e3, t, s5, i, h2 = {}) { this._mainMethod = t, this._transferLists = s5, this._listeners = [], this._promise = u(e3, { ...h2, schedule: i }).then((e4) => { if (void 0 === this._thread) { this._thread = e4, this._promise = null, h2.hasInitialize && this.broadcast({}, "initialize"); for (const e5 of this._listeners) this._connectListener(e5); } else e4.close(); }), this._promise.catch((t2) => s.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e3} worker: ${t2}`)); } on(r2, i) { const o3 = { removed: false, eventName: r2, callback: i, threadHandle: null }; return this._listeners.push(o3), this._connectListener(o3), n(() => { o3.removed = true, C(this._listeners, o3), this._thread && r(o3.threadHandle) && o3.threadHandle.remove(); }); } destroy() { this._thread && (this._thread.close(), this._thread = null), this._promise = null; } invoke(e3, t) { return this.invokeMethod(this._mainMethod, e3, t); } invokeMethod(e3, t, r2) { if (this._thread) { const s5 = this._transferLists[e3], i = s5 ? s5(t) : []; return this._thread.invoke(e3, t, { transferList: i, signal: r2 }); } return this._promise ? this._promise.then(() => (f(r2), this.invokeMethod(e3, t, r2))) : Promise.reject(null); } broadcast(e3, t) { return this._thread ? Promise.all(this._thread.broadcast(t, e3)).then(() => { }) : this._promise ? this._promise.then(() => this.broadcast(e3, t)) : Promise.reject(); } get promise() { return this._promise; } _connectListener(e3) { this._thread && this._thread.on(e3.eventName, e3.callback).then((t) => { e3.removed || (e3.threadHandle = t); }); } }; // node_modules/@arcgis/core/layers/support/LercDecoder.js var s4 = class extends h { constructor(e3 = null) { super("LercWorker", "_decode", { _decode: (e4) => [e4.buffer] }, e3, { strategy: "dedicated" }), this.schedule = e3, this.ref = 0; } decode(e3, r2, t) { return e3 && 0 !== e3.byteLength ? this.invoke({ buffer: e3, options: r2 }, t) : Promise.resolve(null); } release() { --this.ref <= 0 && (o2.forEach((e3, r2) => { e3 === this && o2.delete(r2); }), this.destroy()); } }; var o2 = /* @__PURE__ */ new Map(); function n3(t = null) { let n4 = o2.get(e2(t)); return n4 || (r(t) ? (n4 = new s4((e3) => t.schedule(e3)), o2.set(t, n4)) : (n4 = new s4(), o2.set(null, n4))), ++n4.ref, n4; } // node_modules/@arcgis/core/layers/ElevationLayer.js var j = class extends s3(p(c(v2(O(b))))) { constructor(...e3) { super(...e3), this.copyright = null, this.heightModelInfo = null, this.path = null, this.minScale = void 0, this.maxScale = void 0, this.opacity = 1, this.operationalLayerType = "ArcGISTiledElevationServiceLayer", this.sourceJSON = null, this.type = "elevation", this.url = null, this.version = null, this._lercDecoder = n3(); } normalizeCtorArgs(e3, r2) { return "string" == typeof e3 ? { url: e3, ...r2 } : e3; } destroy() { this._lercDecoder = w(this._lercDecoder); } readVersion(e3, r2) { let t = r2.currentVersion; return t || (t = 9.3), t; } load(e3) { const r2 = r(e3) ? e3.signal : null; return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["Image Service"], supportsData: false, validateItem: (e4) => { for (let r3 = 0; r3 < e4.typeKeywords.length; r3++) if ("elevation 3d layer" === e4.typeKeywords[r3].toLowerCase()) return true; throw new s2("portal:invalid-layer-item-type", "Invalid layer item type '${type}', expected '${expectedType}' ", { type: "Image Service", expectedType: "Image Service Elevation 3D Layer" }); } }, e3).catch(w2).then(() => this._fetchImageService(r2))), Promise.resolve(this); } fetchTile(e3, t, o3, s5) { const a = r((s5 = s5 || { signal: null }).signal) ? s5.signal : s5.signal = new AbortController().signal, l = { responseType: "array-buffer", signal: a }, p2 = { noDataValue: s5.noDataValue, returnFileInfo: true }; return this.load().then(() => this._fetchTileAvailability(e3, t, o3, s5)).then(() => U(this.getTileUrl(e3, t, o3), l)).then((e4) => this._lercDecoder.decode(e4.data, p2, a)).then((e4) => { var _a; return { values: e4.pixelData, width: e4.width, height: e4.height, maxZError: (_a = e4.fileInfo) == null ? void 0 : _a.maxZError, noDataValue: e4.noDataValue, minValue: e4.minValue, maxValue: e4.maxValue }; }); } getTileUrl(e3, r2, t) { const o3 = !this.tilemapCache && this.supportsBlankTile, i = I({ ...this.parsedUrl.query, blankTile: !o3 && null }); return `${this.parsedUrl.path}/tile/${e3}/${r2}/${t}${i ? "?" + i : ""}`; } async queryElevation(e3, r2) { const { ElevationQuery: t } = await import("./ElevationQuery-BZTDAKT4.js"); f(r2); return new t().query(this, e3, r2); } async createElevationSampler(e3, r2) { const { ElevationQuery: t } = await import("./ElevationQuery-BZTDAKT4.js"); f(r2); return new t().createSampler(this, e3, r2); } _fetchTileAvailability(e3, r2, t, o3) { return this.tilemapCache ? this.tilemapCache.fetchAvailability(e3, r2, t, o3) : Promise.resolve("unknown"); } async _fetchImageService(e3) { var _a; if (this.sourceJSON) return this.sourceJSON; const t = { query: { f: "json", ...this.parsedUrl.query }, responseType: "json", signal: e3 }, o3 = await U(this.parsedUrl.path, t); o3.ssl && (this.url = (_a = this.url) == null ? void 0 : _a.replace(/^http:/i, "https:")), this.sourceJSON = o3.data, this.read(o3.data, { origin: "service", url: this.parsedUrl }); } get hasOverriddenFetchTile() { return !this.fetchTile.__isDefault__; } }; e([y({ json: { read: { source: "copyrightText" } } })], j.prototype, "copyright", void 0), e([y({ readOnly: true, type: v })], j.prototype, "heightModelInfo", void 0), e([y({ type: String, json: { origins: { "web-scene": { read: true, write: true } }, read: false } })], j.prototype, "path", void 0), e([y({ type: ["show", "hide"] })], j.prototype, "listMode", void 0), e([y({ json: { read: false, write: false, origins: { service: { read: false, write: false }, "portal-item": { read: false, write: false }, "web-document": { read: false, write: false } } }, readOnly: true })], j.prototype, "minScale", void 0), e([y({ json: { read: false, write: false, origins: { service: { read: false, write: false }, "portal-item": { read: false, write: false }, "web-document": { read: false, write: false } } }, readOnly: true })], j.prototype, "maxScale", void 0), e([y({ json: { read: false, write: false, origins: { "web-document": { read: false, write: false } } } })], j.prototype, "opacity", void 0), e([y({ type: ["ArcGISTiledElevationServiceLayer"] })], j.prototype, "operationalLayerType", void 0), e([y()], j.prototype, "sourceJSON", void 0), e([y({ json: { read: false }, value: "elevation", readOnly: true })], j.prototype, "type", void 0), e([y(f2)], j.prototype, "url", void 0), e([y()], j.prototype, "version", void 0), e([o("version", ["currentVersion"])], j.prototype, "readVersion", null), j = e([n2("esri.layers.ElevationLayer")], j), j.prototype.fetchTile.__isDefault__ = true; var w3 = j; export { w3 as default }; //# sourceMappingURL=ElevationLayer-QUSPD7CU.js.map