123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- import {
- a,
- a2,
- a3,
- d as d4
- } from "./chunk-PFG2S2HL.js";
- import {
- A,
- K
- } from "./chunk-C62PEMUB.js";
- import "./chunk-5ZZSM3DU.js";
- import "./chunk-BQ7UE3XL.js";
- import "./chunk-UILPRJKY.js";
- import "./chunk-524XACB7.js";
- import {
- l as l2
- } from "./chunk-ZRX5UNQH.js";
- import "./chunk-QY775BFA.js";
- import {
- i
- } from "./chunk-FMKGHOGD.js";
- import {
- p as p2
- } from "./chunk-6URTNEGN.js";
- import {
- d as d3
- } from "./chunk-MFI6BALW.js";
- import "./chunk-MFUAILAT.js";
- import "./chunk-HZJYXMI6.js";
- import {
- B,
- i4 as i2
- } from "./chunk-PUSPZYFZ.js";
- import "./chunk-X7DBH4KK.js";
- import "./chunk-KMAHKQ2G.js";
- import "./chunk-PIGRDDRG.js";
- import {
- y
- } from "./chunk-BJHM4JNS.js";
- import "./chunk-F6A2QQ26.js";
- import "./chunk-7XXXCK2A.js";
- import {
- r as r3
- } from "./chunk-7ZIDBK7B.js";
- import {
- v
- } from "./chunk-KHA63LLS.js";
- import {
- c as c2
- } from "./chunk-FGKNEJKJ.js";
- import {
- c,
- d as d2,
- p
- } from "./chunk-PSV473TI.js";
- import {
- O
- } from "./chunk-I3OBGWNS.js";
- import "./chunk-FONIFA5N.js";
- import "./chunk-EG5OI4V4.js";
- import "./chunk-65BYCSII.js";
- import "./chunk-WZQZRKNH.js";
- import "./chunk-LRDX4TO7.js";
- import "./chunk-6A4U74YA.js";
- import {
- t
- } from "./chunk-W72F6AS3.js";
- import "./chunk-O4FY3ITT.js";
- import {
- b
- } from "./chunk-4DDBH2K5.js";
- import "./chunk-7N4X6GF3.js";
- import "./chunk-JXW4QTJA.js";
- import "./chunk-UXF37FQ4.js";
- import "./chunk-ZOEK6QHJ.js";
- import "./chunk-XNLG7T2T.js";
- import "./chunk-IR4PV7VK.js";
- import "./chunk-2Z6LERTI.js";
- import "./chunk-OWVBLVP3.js";
- import "./chunk-EGZW6HC3.js";
- import "./chunk-4NKD334K.js";
- import "./chunk-65K7LC56.js";
- import "./chunk-ATPLLI5W.js";
- import "./chunk-WJ3OEUD3.js";
- import "./chunk-MXB2XLKV.js";
- import "./chunk-XH7RUGVZ.js";
- import "./chunk-TBBTRX4O.js";
- import "./chunk-YBSUITLL.js";
- import "./chunk-ALDCDSPV.js";
- import "./chunk-DT6EAZQ5.js";
- import "./chunk-HNOZUNJ4.js";
- import {
- U
- } from "./chunk-VNFRAYHO.js";
- import "./chunk-R5IG2D6H.js";
- import {
- G
- } from "./chunk-VBRY5KJM.js";
- import "./chunk-PDKDCAAD.js";
- import {
- o as o2
- } from "./chunk-ECW2QABR.js";
- import "./chunk-GCDJLKH4.js";
- import {
- r as r2
- } from "./chunk-MRJEICT6.js";
- import {
- d,
- e,
- l3 as l,
- n2 as n
- } from "./chunk-Y3WMVFTW.js";
- import "./chunk-SAS7RONY.js";
- import "./chunk-WSRBH7BF.js";
- import {
- S
- } from "./chunk-IHXECKQQ.js";
- import {
- w
- } from "./chunk-ULGDPLM2.js";
- import {
- s,
- s3 as s2
- } from "./chunk-EMJ4ZSM2.js";
- import {
- m,
- o
- } from "./chunk-IKP3YN53.js";
- import {
- r
- } from "./chunk-GZT4BVFP.js";
- import "./chunk-A5ICIBVI.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([d({ type: String, json: { write: { enabled: true, isRequired: true } } })], t2.prototype, "field", void 0), e([d({ readOnly: true, nonNullable: true, json: { read: false } })], t2.prototype, "type", void 0), t2 = e([n("esri.layers.pointCloudFilters.PointCloudFilter")], t2);
- var l3 = t2;
- // node_modules/@arcgis/core/layers/pointCloudFilters/PointCloudBitfieldFilter.js
- var d5;
- var p3 = d5 = class extends l3 {
- constructor(e3) {
- super(e3), this.requiredClearBits = null, this.requiredSetBits = null, this.type = "bitfield";
- }
- clone() {
- return new d5({ field: this.field, requiredClearBits: m(this.requiredClearBits), requiredSetBits: m(this.requiredSetBits) });
- }
- };
- e([d({ type: [S], json: { write: { enabled: true, overridePolicy() {
- return { enabled: true, isRequired: !this.requiredSetBits };
- } } } })], p3.prototype, "requiredClearBits", void 0), e([d({ type: [S], json: { write: { enabled: true, overridePolicy() {
- return { enabled: true, isRequired: !this.requiredClearBits };
- } } } })], p3.prototype, "requiredSetBits", void 0), e([r3({ pointCloudBitfieldFilter: "bitfield" })], p3.prototype, "type", void 0), p3 = d5 = e([n("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")], p3);
- var u = p3;
- // node_modules/@arcgis/core/layers/pointCloudFilters/PointCloudReturnFilter.js
- var n2;
- var p4 = n2 = class extends l3 {
- constructor(r4) {
- super(r4), this.includedReturns = [], this.type = "return";
- }
- clone() {
- return new n2({ field: this.field, includedReturns: m(this.includedReturns) });
- }
- };
- e([d({ type: [["firstOfMany", "last", "lastOfMany", "single"]], json: { write: { enabled: true, isRequired: true } } })], p4.prototype, "includedReturns", void 0), e([r3({ pointCloudReturnFilter: "return" })], p4.prototype, "type", void 0), p4 = n2 = e([n("esri.layers.pointCloudFilters.PointCloudReturnFilter")], p4);
- var u2 = p4;
- // node_modules/@arcgis/core/layers/pointCloudFilters/PointCloudValueFilter.js
- var p5;
- var l4 = p5 = class extends l3 {
- constructor(e3) {
- super(e3), this.mode = "exclude", this.type = "value", this.values = [];
- }
- clone() {
- return new p5({ field: this.field, mode: this.mode, values: m(this.values) });
- }
- };
- e([d({ type: ["exclude", "include"], json: { write: { enabled: true, isRequired: true } } })], l4.prototype, "mode", void 0), e([r3({ pointCloudValueFilter: "value" })], l4.prototype, "type", void 0), e([d({ type: [Number], json: { write: { enabled: true, isRequired: true } } })], l4.prototype, "values", void 0), l4 = p5 = e([n("esri.layers.pointCloudFilters.PointCloudValueFilter")], l4);
- var u3 = l4;
- // node_modules/@arcgis/core/layers/pointCloudFilters/typeUtils.js
- var e2 = { key: "type", base: l3, 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: m(this.field) });
- }
- };
- e([r3({ pointCloudRGBRenderer: "point-cloud-rgb" })], c3.prototype, "type", void 0), e([d({ 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": d4, "point-cloud-rgb": n3, "point-cloud-stretch": a2, "point-cloud-unique-value": a3 }, errorContext: "renderer" };
- // node_modules/@arcgis/core/layers/PointCloudLayer.js
- var A2 = s.getLogger("esri.layers.PointCloudLayer");
- var N = l2();
- var R = class extends A(p2(c2(v(t(O(i(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 typeof e3 == "string" ? { 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 y();
- return e4.type === "FieldTypeInteger" && ((e4 = m(e4)).type = "esriFieldTypeInteger"), r5.read(e4, t3), r5;
- }) : Array.isArray(r4.attributeStorageInfo) ? r4.attributeStorageInfo.map((e4) => new y({ name: e4.name, type: e4.name === "ELEVATION" ? "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 = d3(this, e3);
- return this._formatPopupTemplateReturnsField(r4), this._formatPopupTemplateRGBField(r4), r4;
- }
- _formatPopupTemplateReturnsField(e3) {
- const r4 = this.fieldsIndex.get("RETURNS");
- if (!r4)
- return;
- const t3 = e3.fieldInfos.find((e4) => e4.fieldName === r4.name);
- if (!t3)
- return;
- const o3 = new i2({ 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) {
- const r4 = this.fieldsIndex.get("RGB");
- if (!r4)
- return;
- const t3 = e3.fieldInfos.find((e4) => e4.fieldName === r4.name);
- if (!t3)
- return;
- const o3 = new i2({ 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(K.SAVE_AS, { ...r4, getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "point-cloud" }, e3);
- }
- async save() {
- const e3 = { getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "point-cloud" };
- return this._debouncedSaveOperations(K.SAVE, e3);
- }
- validateLayer(e3) {
- if (e3.layerType && e3.layerType !== "PointCloud")
- 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 this.attributeStorageInfo != null && this.attributeStorageInfo.some((r4) => r4.name === e3);
- }
- _getTypeKeywords() {
- return ["PointCloud"];
- }
- _validateElevationInfo() {
- const e3 = this.elevationInfo;
- e3 && (e3.mode !== "absolute-height" && A2.warn(".elevationInfo=", "Point cloud layers only support absolute-height elevation mode"), e3.featureExpressionInfo && e3.featureExpressionInfo.expression !== "0" && A2.warn(".elevationInfo=", "Point cloud layers do not support featureExpressionInfo"));
- }
- };
- e([d({ type: ["PointCloudLayer"] })], R.prototype, "operationalLayerType", void 0), e([d(p)], R.prototype, "popupEnabled", void 0), e([d({ type: B, json: { name: "popupInfo", write: true } })], R.prototype, "popupTemplate", void 0), e([d({ readOnly: true, json: { read: false } })], R.prototype, "defaultPopupTemplate", null), e([d({ readOnly: true, json: { write: false, read: false, origins: { "web-document": { write: false, read: false } } } })], R.prototype, "opacity", void 0), e([d({ type: ["show", "hide"] })], R.prototype, "listMode", void 0), e([d({ types: [e2], json: { origins: { service: { read: { source: "filters" } } }, name: "layerDefinition.filters", write: true } })], R.prototype, "filters", void 0), e([d({ type: [y] })], R.prototype, "fields", void 0), e([d(N.fieldsIndex)], R.prototype, "fieldsIndex", void 0), e([o2("service", "fields", ["fields", "attributeStorageInfo"])], R.prototype, "readServiceFields", null), e([d(N.outFields)], R.prototype, "outFields", void 0), e([d({ readOnly: true })], R.prototype, "attributeStorageInfo", void 0), e([d(d2)], R.prototype, "elevationInfo", null), e([d({ type: String, json: { origins: { "web-scene": { read: true, write: true }, "portal-item": { read: true, write: true } }, read: false } })], R.prototype, "path", void 0), e([d(c)], R.prototype, "legendEnabled", void 0), e([d({ 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 } } } } })], R.prototype, "renderer", void 0), e([r2("renderer")], R.prototype, "writeRenderer", null), e([d({ json: { read: false }, readOnly: true })], R.prototype, "type", void 0), R = e([n("esri.layers.PointCloudLayer")], R);
- var O2 = R;
- export {
- O2 as default
- };
- //# sourceMappingURL=PointCloudLayer-VRRXFWIB.js.map
|