123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272 |
- import {
- d,
- l as l4,
- t as t2
- } from "./chunk-3TP6BVDH.js";
- import {
- s as s5,
- x
- } from "./chunk-GTTGW4YT.js";
- import {
- n as n4
- } from "./chunk-FAOWJMTO.js";
- import {
- l as l3
- } from "./chunk-CDZENOCQ.js";
- import {
- o
- } from "./chunk-O6VYMEIX.js";
- import {
- l as l2
- } from "./chunk-X4SA4ELJ.js";
- import {
- r as r2
- } from "./chunk-5N7JLUJJ.js";
- import {
- n as n3
- } from "./chunk-ZAY3CMAZ.js";
- import {
- n as n5,
- r as r3
- } from "./chunk-P3XKUGLS.js";
- import {
- j
- } from "./chunk-LBW34VZ2.js";
- import {
- m as m2
- } from "./chunk-YFSLJIO4.js";
- import {
- n as n2
- } from "./chunk-IM3LVQXV.js";
- import {
- s as s4
- } from "./chunk-YEJL5NEF.js";
- import {
- r
- } from "./chunk-PQFTYGF5.js";
- import {
- e,
- l3 as l,
- m,
- n5 as n,
- u2 as u,
- y3 as y2
- } from "./chunk-2Z2TG5CU.js";
- import {
- T,
- b
- } from "./chunk-SQOPWYIT.js";
- import {
- E,
- f
- } from "./chunk-V6P2MAQQ.js";
- import {
- s,
- s2,
- s3
- } from "./chunk-E5O6P5I2.js";
- import {
- y
- } from "./chunk-SPWQ3AWG.js";
- import {
- t
- } from "./chunk-YXWMMD76.js";
- // node_modules/@arcgis/core/ground/NavigationConstraint.js
- var t3;
- var p = t3 = class extends l {
- constructor(r5) {
- super(r5), this.type = "none";
- }
- clone() {
- return new t3({ type: this.type });
- }
- };
- e([r2({ none: "none", stayAbove: "stay-above" })], p.prototype, "type", void 0), p = t3 = e([n("esri.ground.NavigationConstraint")], p);
- // node_modules/@arcgis/core/views/3d/support/debugFlags.js
- var T2 = class extends m {
- constructor() {
- super(...arguments), this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR = false, this.DECONFLICTOR_SHOW_VISIBLE = false, this.DECONFLICTOR_SHOW_INVISIBLE = false, this.DECONFLICTOR_SHOW_GRID = false, this.LABELS_SHOW_BORDER = false, this.TEXT_SHOW_BASELINE = false, this.TEXT_SHOW_BORDER = false, this.OVERLAY_DRAW_DEBUG_TEXTURE = false, this.OVERLAY_SHOW_CENTER = false, this.SHOW_POI = false, this.TESTS_DISABLE_OPTIMIZATIONS = false, this.TESTS_DISABLE_FAST_UPDATES = false, this.DRAW_MESH_GEOMETRY_NORMALS = false, this.FEATURE_TILE_FETCH_SHOW_TILES = false, this.FEATURE_TILE_TREE_SHOW_TILES = false, this.TERRAIN_TILE_TREE_SHOW_TILES = false, this.I3S_TREE_SHOW_TILES = false, this.I3S_SHOW_MODIFICATIONS = false, this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES = false, this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL = false, this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES = false, this.LINE_WIREFRAMES = false, this.TERRAIN_USE_LEGACY_SHADING = false;
- }
- };
- e([y2()], T2.prototype, "SCENEVIEW_HITTEST_RETURN_INTERSECTOR", void 0), e([y2()], T2.prototype, "DECONFLICTOR_SHOW_VISIBLE", void 0), e([y2()], T2.prototype, "DECONFLICTOR_SHOW_INVISIBLE", void 0), e([y2()], T2.prototype, "DECONFLICTOR_SHOW_GRID", void 0), e([y2()], T2.prototype, "LABELS_SHOW_BORDER", void 0), e([y2()], T2.prototype, "TEXT_SHOW_BASELINE", void 0), e([y2()], T2.prototype, "TEXT_SHOW_BORDER", void 0), e([y2()], T2.prototype, "OVERLAY_DRAW_DEBUG_TEXTURE", void 0), e([y2()], T2.prototype, "OVERLAY_SHOW_CENTER", void 0), e([y2()], T2.prototype, "SHOW_POI", void 0), e([y2()], T2.prototype, "TESTS_DISABLE_OPTIMIZATIONS", void 0), e([y2()], T2.prototype, "TESTS_DISABLE_FAST_UPDATES", void 0), e([y2()], T2.prototype, "DRAW_MESH_GEOMETRY_NORMALS", void 0), e([y2()], T2.prototype, "FEATURE_TILE_FETCH_SHOW_TILES", void 0), e([y2()], T2.prototype, "FEATURE_TILE_TREE_SHOW_TILES", void 0), e([y2()], T2.prototype, "TERRAIN_TILE_TREE_SHOW_TILES", void 0), e([y2()], T2.prototype, "I3S_TREE_SHOW_TILES", void 0), e([y2()], T2.prototype, "I3S_SHOW_MODIFICATIONS", void 0), e([y2()], T2.prototype, "LOD_INSTANCE_RENDERER_DISABLE_UPDATES", void 0), e([y2()], T2.prototype, "LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL", void 0), e([y2()], T2.prototype, "EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES", void 0), e([y2()], T2.prototype, "LINE_WIREFRAMES", void 0), e([y2()], T2.prototype, "TERRAIN_USE_LEGACY_SHADING", void 0), T2 = e([n("esri.views.3d.support.DebugFlags")], T2);
- var t4 = new T2();
- // node_modules/@arcgis/core/Ground.js
- var C;
- var S = C = class extends u(m2) {
- constructor(r5) {
- super(r5), this.opacity = 1, this.shading = !t4.TERRAIN_USE_LEGACY_SHADING, this.surfaceColor = null, this.navigationConstraint = null, this.layers = new j();
- const e2 = (r6) => {
- r6.parent && r6.parent !== this && "remove" in r6.parent && r6.parent.remove(r6), r6.parent = this, "elevation" !== r6.type && "base-elevation" !== r6.type && s2.getLogger(this.declaredClass).error(`Layer '${r6.title}, id:${r6.id}' of type '${r6.type}' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported.`);
- }, t6 = (r6) => {
- r6.parent = null;
- };
- this.layers.on("after-add", (r6) => e2(r6.item)), this.layers.on("after-remove", (r6) => t6(r6.item));
- }
- initialize() {
- this.when().catch((r5) => {
- s2.getLogger(this.declaredClass).error("#load()", "Failed to load ground", r5);
- }), this.resourceInfo && this.read(this.resourceInfo.data, this.resourceInfo.context);
- }
- destroy() {
- const r5 = this.layers.removeAll();
- for (const e2 of r5)
- e2.destroy();
- this.layers.destroy();
- }
- normalizeCtorArgs(r5) {
- return r5 && "resourceInfo" in r5 && (this._set("resourceInfo", r5.resourceInfo), delete (r5 = { ...r5 }).resourceInfo), r5;
- }
- set layers(r5) {
- this._set("layers", n3(r5, this._get("layers")));
- }
- writeLayers(r5, e2, o2, t6) {
- const i3 = [];
- r5 ? (t6 = { ...t6, layerContainerType: "ground" }, r5.forEach((r6) => {
- if ("write" in r6) {
- const e3 = {};
- o(r6)().write(e3, t6) && i3.push(e3);
- } else
- t6 && t6.messages && t6.messages.push(new s3("layer:unsupported", `Layers (${r6.title}, ${r6.id}) of type '${r6.declaredClass}' cannot be persisted in the ground`, { layer: r6 }));
- }), e2.layers = i3) : e2.layers = i3;
- }
- load(r5) {
- return this.addResolvingPromise(this._loadFromSource(r5)), Promise.resolve(this);
- }
- loadAll() {
- return n4(this, (r5) => {
- r5(this.layers);
- });
- }
- async queryElevation(r5, e2) {
- await this.load({ signal: e2 == null ? void 0 : e2.signal });
- const { ElevationQuery: o2 } = await import("./ElevationQuery-PFI6RXXM.js");
- f(e2);
- const t6 = new o2(), s6 = this.layers.filter(A).toArray();
- return t6.queryAll(s6, r5, e2);
- }
- async createElevationSampler(r5, e2) {
- await this.load({ signal: e2 == null ? void 0 : e2.signal });
- const { ElevationQuery: o2 } = await import("./ElevationQuery-PFI6RXXM.js");
- f(e2);
- const t6 = new o2(), s6 = this.layers.filter(A).toArray();
- return t6.createSamplerAll(s6, r5, e2);
- }
- clone() {
- const r5 = { opacity: this.opacity, surfaceColor: y(this.surfaceColor), navigationConstraint: y(this.navigationConstraint), layers: this.layers.slice() };
- return this.loaded && (r5.loadStatus = "loaded"), new C({ resourceInfo: this.resourceInfo }).set(r5);
- }
- read(r5, e2) {
- this.resourceInfo || this._set("resourceInfo", { data: r5, context: e2 }), super.read(r5, e2);
- }
- _loadFromSource(r5) {
- const e2 = this.resourceInfo;
- return e2 ? this._loadLayersFromJSON(e2.data, e2.context, r5) : Promise.resolve();
- }
- _loadLayersFromJSON(r5, e2, o2) {
- const t6 = e2 && e2.origin || "web-scene", s6 = e2 && e2.portal || null, a = e2 && e2.url || null;
- return import("./layersCreator-NMJW6DZD.js").then(({ populateOperationalLayers: e3 }) => {
- f(o2);
- const i3 = [];
- if (r5.layers && Array.isArray(r5.layers)) {
- const o3 = { context: { origin: t6, url: a, portal: s6, layerContainerType: "ground" }, defaultLayerType: "ArcGISTiledElevationServiceLayer" };
- i3.push(e3(this.layers, r5.layers, o3));
- }
- return E(i3);
- }).then(() => {
- });
- }
- };
- function I(r5) {
- return r5 && "createElevationSampler" in r5;
- }
- function A(r5) {
- return "elevation" === r5.type || I(r5);
- }
- e([y2({ json: { read: false } })], S.prototype, "layers", null), e([r("layers")], S.prototype, "writeLayers", null), e([y2({ readOnly: true })], S.prototype, "resourceInfo", void 0), e([y2({ type: Number, nonNullable: true, range: { min: 0, max: 1 }, json: { type: T, read: { reader: r3, source: "transparency" }, write: { writer: (r5, e2) => {
- e2.transparency = n5(r5);
- }, target: "transparency" } } })], S.prototype, "opacity", void 0), e([y2({ type: Boolean, nonNullable: true, json: { read: false } })], S.prototype, "shading", void 0), e([y2({ type: l2, json: { type: [T], write: (r5, e2) => {
- e2.surfaceColor = r5.toJSON().slice(0, 3);
- } } })], S.prototype, "surfaceColor", void 0), e([y2({ type: p, json: { write: true } })], S.prototype, "navigationConstraint", void 0), S = C = e([n("esri.Ground")], S);
- var L = S;
- // node_modules/@arcgis/core/layers/support/editableLayers.js
- function i(i3) {
- var _a;
- return !!(i3 && i3.loaded && "capabilities" in i3 && ((_a = i3 == null ? void 0 : i3.capabilities) == null ? void 0 : _a.operations) && "supportsEditing" in i3.capabilities.operations && true === i3.capabilities.operations.supportsEditing) && !("editingEnabled" in i3 && !i3.editingEnabled);
- }
- // node_modules/@arcgis/core/support/basemapUtils.js
- var f2 = s2.getLogger("esri.support.basemapUtils");
- function p2() {
- return {};
- }
- function y4(e2) {
- for (const r5 in e2) {
- const a = e2[r5];
- false === (a == null ? void 0 : a.destroyed) && a.destroy(), delete e2[r5];
- }
- }
- function m3(a, t6) {
- let n6;
- if ("string" == typeof a) {
- if (!(a in s5)) {
- const e2 = Object.entries(s5).filter(([e3, a2]) => s.apiKey && !a2.classic || !s.apiKey && a2.classic && !a2.deprecated).map(([e3]) => `"${e3}"`).join(", ");
- return f2.warn(`Unable to find basemap definition for: ${a}. Try one of these: ${e2}`), null;
- }
- t6 && (n6 = t6[a]), n6 || (n6 = x.fromId(a), t6 && (t6[a] = n6));
- } else
- n6 = b(x, a);
- return (n6 == null ? void 0 : n6.destroyed) && (f2.warn("The provided basemap is already destroyed", { basemap: n6 }), n6 = null), n6;
- }
- // node_modules/@arcgis/core/support/groundUtils.js
- var i2 = { "world-elevation": { id: "worldElevation", url: "//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer", layerType: "ArcGISTiledElevationServiceLayer" }, "world-topobathymetry": { id: "worldTopoBathymetry", url: "//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/TopoBathy3D/ImageServer", layerType: "ArcGISTiledElevationServiceLayer" } };
- function t5(t6) {
- let a = null;
- if ("string" == typeof t6)
- if (t6 in i2) {
- const r5 = i2[t6];
- a = new L({ resourceInfo: { data: { layers: [r5] } } });
- } else
- s2.getLogger("esri.support.groundUtils").warn(`Unable to find ground definition for: ${t6}. Try "world-elevation"`);
- else
- a = b(L, t6);
- return a;
- }
- // node_modules/@arcgis/core/Map.js
- var j2 = class extends l4(d(n2.EventedMixin(m))) {
- constructor(s6) {
- super(s6), this.allLayers = new l3({ getCollections: () => {
- var _a, _b, _c;
- return [(_a = this.basemap) == null ? void 0 : _a.baseLayers, (_b = this.ground) == null ? void 0 : _b.layers, this.layers, (_c = this.basemap) == null ? void 0 : _c.referenceLayers];
- }, getChildrenFunction: (s7) => "layers" in s7 ? s7.layers : null }), this.allTables = t2(this), this.basemap = null, this.editableLayers = new l3({ getCollections: () => [this.allLayers], itemFilterFunction: i }), this.ground = new L(), this._basemapCache = p2();
- }
- destroy() {
- var _a, _b;
- this.allLayers.destroy(), this.allTables.destroy(), this.editableLayers.destroy(), (_a = this.ground) == null ? void 0 : _a.destroy(), (_b = this.basemap) == null ? void 0 : _b.destroy(), y4(this._basemapCache), this._basemapCache = null;
- }
- castBasemap(s6) {
- return m3(s6, this._basemapCache);
- }
- castGround(s6) {
- const e2 = t5(s6);
- return t(e2) ? this._get("ground") : e2;
- }
- findLayerById(s6) {
- return this.allLayers.find((e2) => e2.id === s6);
- }
- findTableById(s6) {
- return this.allTables.find((e2) => e2.id === s6);
- }
- };
- e([y2({ readOnly: true, dependsOn: [] })], j2.prototype, "allLayers", void 0), e([y2({ readOnly: true })], j2.prototype, "allTables", void 0), e([y2({ type: x })], j2.prototype, "basemap", void 0), e([s4("basemap")], j2.prototype, "castBasemap", null), e([y2({ readOnly: true })], j2.prototype, "editableLayers", void 0), e([y2({ type: L, nonNullable: true })], j2.prototype, "ground", void 0), e([s4("ground")], j2.prototype, "castGround", null), j2 = e([n("esri.Map")], j2);
- var L2 = j2;
- export {
- L2 as L
- };
- //# sourceMappingURL=chunk-4PH34UAV.js.map
|