import { c as c2 } from "./chunk-JNESCGQR.js"; import { s as s2 } from "./chunk-AJFR3FGC.js"; import { on } from "./chunk-P24XEEHY.js"; import "./chunk-SAJAEMIJ.js"; import { l as l3 } from "./chunk-JOYXMSKE.js"; import { l, w } from "./chunk-TJV6ODRM.js"; import { c } from "./chunk-WLSB4F4I.js"; import "./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 "./chunk-VGWC3IKZ.js"; import "./chunk-2H5MD622.js"; import "./chunk-3RSFVUKZ.js"; import { e as e3, o } from "./chunk-UVVU4UUO.js"; import { l as l2 } from "./chunk-X4SA4ELJ.js"; import { n as n2, t as t2 } from "./chunk-ZAY3CMAZ.js"; import "./chunk-P3XKUGLS.js"; import "./chunk-ZLNEXZAN.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 { j } from "./chunk-LBW34VZ2.js"; import "./chunk-GSSTTHIT.js"; import "./chunk-YFSLJIO4.js"; import "./chunk-IM3LVQXV.js"; import "./chunk-55RWC67C.js"; import "./chunk-HZRKBTHJ.js"; import "./chunk-DVUG3KID.js"; import "./chunk-FWSQEIAR.js"; import "./chunk-VEGAOVMY.js"; import { w as w2, w2 as w3 } from "./chunk-6T6G6LCQ.js"; import { s } from "./chunk-YEJL5NEF.js"; import { r as r2 } from "./chunk-PQFTYGF5.js"; import { e, n5 as n, u2 as u, y3 as y } from "./chunk-2Z2TG5CU.js"; import "./chunk-6KZ2LTDA.js"; import "./chunk-U2XHEJM7.js"; import { T, a } from "./chunk-SQOPWYIT.js"; import "./chunk-V6P2MAQQ.js"; import "./chunk-E5O6P5I2.js"; import "./chunk-SPWQ3AWG.js"; import "./chunk-2TIUKVZN.js"; import { e as e2, r, t } from "./chunk-YXWMMD76.js"; import "./chunk-S5KM4IGW.js"; // node_modules/@arcgis/core/analysis/DimensionSimpleStyle.js var c3 = class extends u(l3) { constructor(e4) { super(e4), this.type = "simple", this.color = new l2("black"), this.lineSize = 2, this.fontSize = 10, this.textColor = new l2("black"), this.textBackgroundColor = new l2([255, 255, 255, 0.6]); } }; e([y({ type: ["simple"], readOnly: true, json: { write: { isRequired: true } } })], c3.prototype, "type", void 0), e([y({ type: l2, nonNullable: true, json: { type: [T], write: { isRequired: true } } })], c3.prototype, "color", void 0), e([y({ type: Number, cast: o, nonNullable: true, range: { min: e3(1) }, json: { write: { isRequired: true } } })], c3.prototype, "lineSize", void 0), e([y({ type: Number, cast: o, nonNullable: true, json: { write: { isRequired: true } } })], c3.prototype, "fontSize", void 0), e([y({ type: l2, nonNullable: true, json: { type: [T], write: { isRequired: true } } })], c3.prototype, "textColor", void 0), e([y({ type: l2, nonNullable: true, json: { type: [T], write: { isRequired: true } } })], c3.prototype, "textBackgroundColor", void 0), c3 = e([n("esri.analysis.DimensionSimpleStyle")], c3); var a2 = c3; // node_modules/@arcgis/core/analysis/dimensionUtils.js var t3; !function(t4) { t4.Horizontal = "horizontal", t4.Vertical = "vertical", t4.Direct = "direct"; }(t3 || (t3 = {})); var r3 = [t3.Horizontal, t3.Vertical, t3.Direct]; // node_modules/@arcgis/core/analysis/LengthDimension.js var l4 = class extends u(l3) { constructor(o2) { super(o2), this.type = "length", this.startPoint = null, this.endPoint = null, this.measureType = t3.Direct, this.offset = 0, this.orientation = 0; } }; e([y({ type: ["length"], json: { write: { isRequired: true } } })], l4.prototype, "type", void 0), e([y({ type: w2, json: { write: true } })], l4.prototype, "startPoint", void 0), e([y({ type: w2, json: { write: true } })], l4.prototype, "endPoint", void 0), e([y({ type: r3, nonNullable: true, json: { write: { isRequired: true } } })], l4.prototype, "measureType", void 0), e([y({ type: Number, nonNullable: true, json: { write: { isRequired: true } } })], l4.prototype, "offset", void 0), e([y({ type: Number, nonNullable: true, json: { write: { isRequired: true } } }), s((o2) => s2.normalize(a(o2), 0, true))], l4.prototype, "orientation", void 0), l4 = e([n("esri.analysis.LengthDimension")], l4); var u2 = l4; // node_modules/@arcgis/core/analysis/DimensionAnalysis.js var h = j.ofType(u2); var g = class extends c2 { constructor(e4) { super(e4), this.type = "dimension", this.style = new a2(), this.extent = null; } initialize() { this.addHandles(l(() => this._computeExtent(), (e4) => { (t(e4) || t(e4.pending)) && this._set("extent", r(e4) ? e4.extent : null); }, w)); } get dimensions() { return this._get("dimensions") || new h(); } set dimensions(e4) { this._set("dimensions", n2(e4, this.dimensions, h)); } get spatialReference() { for (const e4 of this.dimensions) { if (r(e4.startPoint)) return e4.startPoint.spatialReference; if (r(e4.endPoint)) return e4.endPoint.spatialReference; } return null; } get requiredPropertiesForEditing() { return this.dimensions.reduce((e4, t4) => (e4.push(t4.startPoint, t4.endPoint), e4), []); } async waitComputeExtent() { const e4 = this._computeExtent(); return r(e4) ? e2(e4.pending) : null; } _computeExtent() { const e4 = this.spatialReference; if (t(e4)) return { pending: null, extent: null }; const t4 = []; for (const s3 of this.dimensions) r(s3.startPoint) && t4.push(s3.startPoint), r(s3.endPoint) && t4.push(s3.endPoint); const n3 = on(t4, e4); if (r(n3.pending)) return { pending: n3.pending, extent: null }; let o2 = null; return r(n3.geometries) && (o2 = n3.geometries.reduce((e5, t5) => t(e5) ? r(t5) ? w3.fromPoint(t5) : null : r(t5) ? e5.union(w3.fromPoint(t5)) : e5, null)), { pending: null, extent: o2 }; } clear() { this.dimensions.removeAll(); } }; e([y({ type: ["dimension"] })], g.prototype, "type", void 0), e([y({ cast: t2, type: h, nonNullable: true })], g.prototype, "dimensions", null), e([y({ readOnly: true })], g.prototype, "spatialReference", null), e([y({ types: { key: "type", base: null, typeMap: { simple: a2 } }, nonNullable: true })], g.prototype, "style", void 0), e([y({ value: null, readOnly: true })], g.prototype, "extent", void 0), e([y({ readOnly: true })], g.prototype, "requiredPropertiesForEditing", null), g = e([n("esri.analysis.DimensionAnalysis")], g); var j2 = g; // node_modules/@arcgis/core/layers/DimensionLayer.js var h2 = class extends c(O(b)) { constructor(e4) { if (super(e4), this.type = "dimension", this.operationalLayerType = "ArcGISDimensionLayer", this.source = new j2(), this.opacity = 1, e4) { const { source: s3, style: r4 } = e4; s3 && r4 && (s3.style = r4); } } initialize() { this.addHandles([l(() => this.source, (e4, s3) => { r(s3) && s3.parent === this && (s3.parent = null), r(e4) && (e4.parent = this); }, w)]); } async load() { return this.addResolvingPromise(this.source.waitComputeExtent()), this; } get spatialReference() { return e2(this.source.spatialReference); } get style() { return this.source.style; } set style(e4) { this.source.style = e4; } get fullExtent() { return this.source.extent; } releaseAnalysis(e4) { this.source === e4 && (this.source = new j2()); } get analysis() { return this.source; } set analysis(e4) { this.source = e4; } get dimensions() { return this.source.dimensions; } set dimensions(e4) { this.source.dimensions = e4; } writeDimensions(e4, s3, r4, t4) { s3.dimensions = e4.filter(({ startPoint: e5, endPoint: s4 }) => r(e5) && r(s4)).map((e5) => e5.toJSON(t4)).toJSON(); } }; e([y({ json: { read: false }, readOnly: true })], h2.prototype, "type", void 0), e([y({ type: ["ArcGISDimensionLayer"] })], h2.prototype, "operationalLayerType", void 0), e([y({ nonNullable: true })], h2.prototype, "source", void 0), e([y({ readOnly: true })], h2.prototype, "spatialReference", null), e([y({ types: { key: "type", base: null, typeMap: { simple: a2 } }, json: { write: { ignoreOrigin: true } } })], h2.prototype, "style", null), e([y({ readOnly: true })], h2.prototype, "fullExtent", null), e([y({ readOnly: true, json: { read: false, write: false, origins: { service: { read: false, write: false }, "portal-item": { read: false, write: false }, "web-document": { read: false, write: false } } } })], h2.prototype, "opacity", void 0), e([y({ type: ["show", "hide"] })], h2.prototype, "listMode", void 0), e([y({ type: j.ofType(u2), json: { write: { ignoreOrigin: true }, origins: { "web-scene": { write: { ignoreOrigin: true } } } } })], h2.prototype, "dimensions", null), e([r2("web-scene", "dimensions")], h2.prototype, "writeDimensions", null), h2 = e([n("esri.layers.DimensionLayer")], h2); var f = h2; export { f as default }; //# sourceMappingURL=DimensionLayer-MJFOLY32.js.map