import { L, N } from "./chunk-DRPR56GA.js"; import { a, a2, a3, d } from "./chunk-PFW4FYZV.js"; import "./chunk-LX2NI53X.js"; import "./chunk-IZUZZJS7.js"; import "./chunk-56OWH4DC.js"; import "./chunk-7B57NUGF.js"; import { s as s3 } from "./chunk-DN6W4TJU.js"; import "./chunk-I4RYNNL6.js"; import { i as i2 } from "./chunk-WWXZOC2Y.js"; import { p } from "./chunk-ZOKNWEG3.js"; import { p as p2 } from "./chunk-7C2KDOAI.js"; import "./chunk-JPUFJK2B.js"; import "./chunk-HZ2WKB3G.js"; import { i4 as i, k } from "./chunk-P6VVVEX6.js"; import "./chunk-JOYXMSKE.js"; import "./chunk-SZFMKPVM.js"; import "./chunk-JLSNMUQJ.js"; import { y as y3 } from "./chunk-JGBXYDGB.js"; import "./chunk-QEWF7QPH.js"; import "./chunk-TV3CFJQR.js"; import { v } from "./chunk-JUWKPBLS.js"; import { c as c2 } from "./chunk-WLSB4F4I.js"; import { c, d as d2, p as p3 } from "./chunk-GLSWDDR3.js"; import { O } from "./chunk-MIQGEDET.js"; import "./chunk-DUEMJ5XS.js"; import "./chunk-VRLXUHP2.js"; import "./chunk-3LVSQLWJ.js"; import "./chunk-4ONPMX2F.js"; import "./chunk-CRGY2SDS.js"; import "./chunk-4T5ZGMEN.js"; import { t } from "./chunk-PLWDAYK7.js"; import "./chunk-3RSFVUKZ.js"; import "./chunk-X4SA4ELJ.js"; import { r as r3 } from "./chunk-5N7JLUJJ.js"; import "./chunk-P3XKUGLS.js"; import "./chunk-2ZSOO377.js"; import "./chunk-YUA3AHKR.js"; import "./chunk-LU5IJZB4.js"; import "./chunk-7IBV2TRE.js"; import "./chunk-ZLNEXZAN.js"; import "./chunk-5UVJ64RB.js"; import "./chunk-SFEFRQCL.js"; import { b } from "./chunk-DXVOOCG4.js"; import "./chunk-3GZSQU56.js"; import "./chunk-ZYRIJWLX.js"; import "./chunk-RYY6632W.js"; import "./chunk-DW42UVIT.js"; import "./chunk-YAEIHDJH.js"; import "./chunk-TJNOJH33.js"; import "./chunk-OSHI574D.js"; import "./chunk-ETGAZ7LF.js"; import "./chunk-75U5LM2V.js"; import "./chunk-RMDDCMKS.js"; import "./chunk-VCH45Q2I.js"; import "./chunk-LBW34VZ2.js"; import "./chunk-GSSTTHIT.js"; import "./chunk-YFSLJIO4.js"; import "./chunk-IM3LVQXV.js"; import "./chunk-55RWC67C.js"; import "./chunk-HZRKBTHJ.js"; import { U } from "./chunk-DVUG3KID.js"; import "./chunk-FWSQEIAR.js"; import { G } from "./chunk-VEGAOVMY.js"; import { o as o2 } from "./chunk-6T6G6LCQ.js"; import "./chunk-YEJL5NEF.js"; import { r as r2 } from "./chunk-PQFTYGF5.js"; import { e, l3 as l, n5 as n, y3 as y2 } from "./chunk-2Z2TG5CU.js"; import "./chunk-6KZ2LTDA.js"; import "./chunk-U2XHEJM7.js"; import { T } from "./chunk-SQOPWYIT.js"; import { w } from "./chunk-V6P2MAQQ.js"; import { s2 as s, s3 as s2 } from "./chunk-E5O6P5I2.js"; import { o, y } from "./chunk-SPWQ3AWG.js"; import "./chunk-2TIUKVZN.js"; import { r } from "./chunk-YXWMMD76.js"; import "./chunk-S5KM4IGW.js"; // node_modules/@arcgis/core/layers/pointCloudFilters/PointCloudFilter.js var t2 = class extends l { constructor(r4) { super(r4), this.field = null, this.type = null; } clone() { return console.warn(".clone() is not implemented for " + this.declaredClass), null; } }; e([y2({ type: String, json: { write: { enabled: true, isRequired: true } } })], t2.prototype, "field", void 0), e([y2({ readOnly: true, nonNullable: true, json: { read: false } })], t2.prototype, "type", void 0), t2 = e([n("esri.layers.pointCloudFilters.PointCloudFilter")], t2); var l2 = t2; // node_modules/@arcgis/core/layers/pointCloudFilters/PointCloudBitfieldFilter.js var d3; var p4 = d3 = class extends l2 { constructor(e3) { super(e3), this.requiredClearBits = null, this.requiredSetBits = null, this.type = "bitfield"; } clone() { return new d3({ field: this.field, requiredClearBits: y(this.requiredClearBits), requiredSetBits: y(this.requiredSetBits) }); } }; e([y2({ type: [T], json: { write: { enabled: true, overridePolicy() { return { enabled: true, isRequired: !this.requiredSetBits }; } } } })], p4.prototype, "requiredClearBits", void 0), e([y2({ type: [T], json: { write: { enabled: true, overridePolicy() { return { enabled: true, isRequired: !this.requiredClearBits }; } } } })], p4.prototype, "requiredSetBits", void 0), e([r3({ pointCloudBitfieldFilter: "bitfield" })], p4.prototype, "type", void 0), p4 = d3 = e([n("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")], p4); var u = p4; // node_modules/@arcgis/core/layers/pointCloudFilters/PointCloudReturnFilter.js var n2; var p5 = n2 = class extends l2 { constructor(r4) { super(r4), this.includedReturns = [], this.type = "return"; } clone() { return new n2({ field: this.field, includedReturns: y(this.includedReturns) }); } }; e([y2({ type: [["firstOfMany", "last", "lastOfMany", "single"]], json: { write: { enabled: true, isRequired: true } } })], p5.prototype, "includedReturns", void 0), e([r3({ pointCloudReturnFilter: "return" })], p5.prototype, "type", void 0), p5 = n2 = e([n("esri.layers.pointCloudFilters.PointCloudReturnFilter")], p5); var u2 = p5; // node_modules/@arcgis/core/layers/pointCloudFilters/PointCloudValueFilter.js var p6; var l3 = p6 = class extends l2 { constructor(e3) { super(e3), this.mode = "exclude", this.type = "value", this.values = []; } clone() { return new p6({ field: this.field, mode: this.mode, values: y(this.values) }); } }; e([y2({ type: ["exclude", "include"], json: { write: { enabled: true, isRequired: true } } })], l3.prototype, "mode", void 0), e([r3({ pointCloudValueFilter: "value" })], l3.prototype, "type", void 0), e([y2({ type: [Number], json: { write: { enabled: true, isRequired: true } } })], l3.prototype, "values", void 0), l3 = p6 = e([n("esri.layers.pointCloudFilters.PointCloudValueFilter")], l3); var u3 = l3; // node_modules/@arcgis/core/layers/pointCloudFilters/typeUtils.js var e2 = { key: "type", base: l2, typeMap: { value: u3, bitfield: u, return: u2 } }; // node_modules/@arcgis/core/renderers/PointCloudRGBRenderer.js var i3; var c3 = i3 = class extends a { constructor(r4) { super(r4), this.type = "point-cloud-rgb", this.field = null; } clone() { return new i3({ ...this.cloneProperties(), field: y(this.field) }); } }; e([r3({ pointCloudRGBRenderer: "point-cloud-rgb" })], c3.prototype, "type", void 0), e([y2({ type: String, json: { write: true } })], c3.prototype, "field", void 0), c3 = i3 = e([n("esri.renderers.PointCloudRGBRenderer")], c3); var n3 = c3; // node_modules/@arcgis/core/renderers/support/pointCloud/typeUtils.js var i4 = { key: "type", base: a, typeMap: { "point-cloud-class-breaks": d, "point-cloud-rgb": n3, "point-cloud-stretch": a2, "point-cloud-unique-value": a3 }, errorContext: "renderer" }; // node_modules/@arcgis/core/layers/PointCloudLayer.js var A = s3(); var N2 = class extends N(p(c2(v(t(O(i2(b))))))) { constructor(...e3) { super(...e3), this.operationalLayerType = "PointCloudLayer", this.popupEnabled = true, this.popupTemplate = null, this.opacity = 1, this.filters = [], this.fields = null, this.fieldsIndex = null, this.outFields = null, this.path = null, this.legendEnabled = true, this.renderer = null, this.type = "point-cloud"; } normalizeCtorArgs(e3, r4) { return "string" == typeof e3 ? { url: e3, ...r4 } : e3; } get defaultPopupTemplate() { return this.attributeStorageInfo ? this.createPopupTemplate() : null; } getFieldDomain(e3) { const r4 = this.fieldsIndex.get(e3); return r4 && r4.domain ? r4.domain : null; } readServiceFields(e3, r4, t3) { return Array.isArray(e3) ? e3.map((e4) => { const r5 = new y3(); return "FieldTypeInteger" === e4.type && ((e4 = y(e4)).type = "esriFieldTypeInteger"), r5.read(e4, t3), r5; }) : Array.isArray(r4.attributeStorageInfo) ? r4.attributeStorageInfo.map((e4) => new y3({ name: e4.name, type: "ELEVATION" === e4.name ? "double" : "integer" })) : null; } set elevationInfo(e3) { this._set("elevationInfo", e3), this._validateElevationInfo(); } writeRenderer(e3, r4, t3, o3) { o("layerDefinition.drawingInfo.renderer", e3.write({}, o3), r4); } load(e3) { const r4 = r(e3) ? e3.signal : null, t3 = this.loadFromPortal({ supportedTypes: ["Scene Service"] }, e3).catch(w).then(() => this._fetchService(r4)); return this.addResolvingPromise(t3), Promise.resolve(this); } createPopupTemplate(e3) { const r4 = p2(this, e3); return r4 && (this._formatPopupTemplateReturnsField(r4), this._formatPopupTemplateRGBField(r4)), r4; } _formatPopupTemplateReturnsField(e3) { var _a; const r4 = this.fieldsIndex.get("RETURNS"); if (!r4) return; const t3 = (_a = e3.fieldInfos) == null ? void 0 : _a.find((e4) => e4.fieldName === r4.name); if (!t3) return; const o3 = new i({ name: "pcl-returns-decoded", title: r4.alias || r4.name, expression: ` var returnValue = $feature.${r4.name}; return (returnValue % 16) + " / " + Floor(returnValue / 16); ` }); e3.expressionInfos = [...e3.expressionInfos || [], o3], t3.fieldName = "expression/pcl-returns-decoded"; } _formatPopupTemplateRGBField(e3) { var _a; const r4 = this.fieldsIndex.get("RGB"); if (!r4) return; const t3 = (_a = e3.fieldInfos) == null ? void 0 : _a.find((e4) => e4.fieldName === r4.name); if (!t3) return; const o3 = new i({ name: "pcl-rgb-decoded", title: r4.alias || r4.name, expression: ` var rgb = $feature.${r4.name}; var red = Floor(rgb / 65536, 0); var green = Floor((rgb - (red * 65536)) / 256,0); var blue = rgb - (red * 65536) - (green * 256); return "rgb(" + red + "," + green + "," + blue + ")"; ` }); e3.expressionInfos = [...e3.expressionInfos || [], o3], t3.fieldName = "expression/pcl-rgb-decoded"; } async queryCachedStatistics(e3, r4) { if (await this.load(r4), !this.attributeStorageInfo) throw new s2("scenelayer:no-cached-statistics", "Cached statistics are not available for this layer"); const i5 = this.fieldsIndex.get(e3); if (!i5) throw new s2("pointcloudlayer:field-unexisting", `Field '${e3}' does not exist on the layer`); for (const o3 of this.attributeStorageInfo) if (o3.name === i5.name) { const e4 = G(this.parsedUrl.path, `./statistics/${o3.key}`); return U(e4, { query: { f: "json", token: this.apiKey }, responseType: "json", signal: r4 ? r4.signal : null }).then((e5) => e5.data); } throw new s2("pointcloudlayer:no-cached-statistics", "Cached statistics for this attribute are not available"); } async saveAs(e3, r4) { return this._debouncedSaveOperations(L.SAVE_AS, { ...r4, getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "point-cloud" }, e3); } async save() { const e3 = { getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "point-cloud" }; return this._debouncedSaveOperations(L.SAVE, e3); } validateLayer(e3) { if (e3.layerType && "PointCloud" !== e3.layerType) throw new s2("pointcloudlayer:layer-type-not-supported", "PointCloudLayer does not support this layer type", { layerType: e3.layerType }); if (isNaN(this.version.major) || isNaN(this.version.minor)) throw new s2("layer:service-version-not-supported", "Service version is not supported.", { serviceVersion: this.version.versionString, supportedVersions: "1.x-2.x" }); if (this.version.major > 2) throw new s2("layer:service-version-too-new", "Service version is too new.", { serviceVersion: this.version.versionString, supportedVersions: "1.x-2.x" }); } hasCachedStatistics(e3) { return null != this.attributeStorageInfo && this.attributeStorageInfo.some((r4) => r4.name === e3); } _getTypeKeywords() { return ["PointCloud"]; } _validateElevationInfo() { const e3 = this.elevationInfo; e3 && ("absolute-height" !== e3.mode && s.getLogger(this.declaredClass).warn(".elevationInfo=", "Point cloud layers only support absolute-height elevation mode"), e3.featureExpressionInfo && "0" !== e3.featureExpressionInfo.expression && s.getLogger(this.declaredClass).warn(".elevationInfo=", "Point cloud layers do not support featureExpressionInfo")); } }; e([y2({ type: ["PointCloudLayer"] })], N2.prototype, "operationalLayerType", void 0), e([y2(p3)], N2.prototype, "popupEnabled", void 0), e([y2({ type: k, json: { name: "popupInfo", write: true } })], N2.prototype, "popupTemplate", void 0), e([y2({ readOnly: true, json: { read: false } })], N2.prototype, "defaultPopupTemplate", null), e([y2({ readOnly: true, json: { write: false, read: false, origins: { "web-document": { write: false, read: false } } } })], N2.prototype, "opacity", void 0), e([y2({ type: ["show", "hide"] })], N2.prototype, "listMode", void 0), e([y2({ types: [e2], json: { origins: { service: { read: { source: "filters" } } }, name: "layerDefinition.filters", write: true } })], N2.prototype, "filters", void 0), e([y2({ type: [y3] })], N2.prototype, "fields", void 0), e([y2(A.fieldsIndex)], N2.prototype, "fieldsIndex", void 0), e([o2("service", "fields", ["fields", "attributeStorageInfo"])], N2.prototype, "readServiceFields", null), e([y2(A.outFields)], N2.prototype, "outFields", void 0), e([y2({ readOnly: true })], N2.prototype, "attributeStorageInfo", void 0), e([y2(d2)], N2.prototype, "elevationInfo", null), e([y2({ type: String, json: { origins: { "web-scene": { read: true, write: true }, "portal-item": { read: true, write: true } }, read: false } })], N2.prototype, "path", void 0), e([y2(c)], N2.prototype, "legendEnabled", void 0), e([y2({ types: i4, json: { origins: { service: { read: { source: "drawingInfo.renderer" } } }, name: "layerDefinition.drawingInfo.renderer", write: { target: { "layerDefinition.drawingInfo.renderer": { types: i4 }, "layerDefinition.drawingInfo.transparency": { type: Number } } } } })], N2.prototype, "renderer", void 0), e([r2("renderer")], N2.prototype, "writeRenderer", null), e([y2({ json: { read: false }, readOnly: true })], N2.prototype, "type", void 0), N2 = e([n("esri.layers.PointCloudLayer")], N2); var R = N2; export { R as default }; //# sourceMappingURL=PointCloudLayer-VJULXDN2.js.map