123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237 |
- import {
- s as s4
- } from "./chunk-YJKEIUMW.js";
- import {
- a as a2
- } from "./chunk-RMX2AZ4P.js";
- import {
- a,
- l as l2,
- w
- } from "./chunk-YIS6BAC3.js";
- import {
- s as s3
- } from "./chunk-7N4X6GF3.js";
- import {
- d as d2
- } from "./chunk-2Z6LERTI.js";
- import {
- v2 as v
- } from "./chunk-OWVBLVP3.js";
- import {
- n as n3
- } from "./chunk-AFZ7XSEW.js";
- import {
- m
- } from "./chunk-YBSUITLL.js";
- import {
- j
- } from "./chunk-ALDCDSPV.js";
- import {
- n as n2
- } from "./chunk-DT6EAZQ5.js";
- import {
- M2 as M,
- p
- } from "./chunk-ECW2QABR.js";
- import {
- d,
- e,
- l3 as l,
- n2 as n,
- y3 as y
- } from "./chunk-Y3WMVFTW.js";
- import {
- s,
- s3 as s2
- } from "./chunk-EMJ4ZSM2.js";
- import {
- c
- } from "./chunk-GZT4BVFP.js";
- // node_modules/@arcgis/core/views/layers/support/ClipArea.js
- var e2 = class extends l {
- };
- e2 = e([n("esri.views.layers.support.ClipArea")], e2);
- var t = e2;
- // node_modules/@arcgis/core/views/layers/support/ClipRect.js
- var s5;
- var i = s5 = class extends t {
- constructor() {
- super(...arguments), this.type = "rect", this.left = null, this.right = null, this.top = null, this.bottom = null;
- }
- clone() {
- return new s5({ left: this.left, right: this.right, top: this.top, bottom: this.bottom });
- }
- get version() {
- return (this._get("version") || 0) + 1;
- }
- };
- e([d({ type: [Number, String], json: { write: true } })], i.prototype, "left", void 0), e([d({ type: [Number, String], json: { write: true } })], i.prototype, "right", void 0), e([d({ type: [Number, String], json: { write: true } })], i.prototype, "top", void 0), e([d({ type: [Number, String], json: { write: true } })], i.prototype, "bottom", void 0), e([d({ readOnly: true })], i.prototype, "version", null), i = s5 = e([n("esri.views.layers.support.ClipRect")], i);
- var p2 = i;
- // node_modules/@arcgis/core/views/layers/support/Geometry.js
- var y2;
- var n4 = { base: p, key: "type", typeMap: { extent: M, polygon: v } };
- var c2 = y2 = class extends t {
- constructor() {
- super(...arguments), this.type = "geometry", this.geometry = null;
- }
- get version() {
- return (this._get("version") || 0) + 1;
- }
- clone() {
- return new y2({ geometry: this.geometry.clone() });
- }
- };
- e([d({ types: n4, json: { read: d2, write: true } })], c2.prototype, "geometry", void 0), e([d({ readOnly: true })], c2.prototype, "version", null), c2 = y2 = e([n("esri.views.layers.support.Geometry")], c2);
- var a3 = c2;
- // node_modules/@arcgis/core/views/layers/support/Path.js
- var e3 = class extends t {
- constructor() {
- super(...arguments), this.type = "path", this.path = [];
- }
- get version() {
- return (this._get("version") || 0) + 1;
- }
- };
- e([d({ type: [[[Number]]], json: { write: true } })], e3.prototype, "path", void 0), e([d({ readOnly: true })], e3.prototype, "version", null), e3 = e([n("esri.views.layers.support.Path")], e3);
- var p3 = e3;
- // node_modules/@arcgis/core/views/2d/layers/LayerView2D.js
- var y3 = j.ofType({ key: "type", base: t, typeMap: { rect: p2, path: p3, geometry: a3 } });
- var f = (t2) => {
- let c3 = class extends t2 {
- constructor() {
- super(...arguments), this.attached = false, this.clips = new y3(), this.lastUpdateId = -1, this.moving = false, this.updateRequested = false;
- }
- initialize() {
- const e4 = this.view?.spatialReferenceLocked ?? true, t3 = this.view?.spatialReference;
- t3 && e4 && !this.spatialReferenceSupported ? this.addResolvingPromise(Promise.reject(new s2("layerview:spatial-reference-incompatible", "The spatial reference of this layer does not meet the requirements of the view", { layer: this.layer }))) : (this.container || (this.container = new s4()), this.container.fadeTransitionEnabled = true, this.container.opacity = 0, this.container.clips = this.clips, this.handles.add([l2(() => this.suspended, (e5) => {
- this.container && (this.container.visible = !e5), this.view && !e5 && this.updateRequested && this.view.requestUpdate();
- }, w), l2(() => this.layer?.opacity ?? 1, (e5) => {
- this.container && (this.container.opacity = e5);
- }, w), l2(() => this.layer && "blendMode" in this.layer ? this.layer.blendMode : "normal", (e5) => {
- this.container && (this.container.blendMode = e5);
- }, w), l2(() => this.layer && "effect" in this.layer ? this.layer.effect : null, (e5) => {
- this.container && (this.container.effect = e5);
- }, w), a(() => this.clips, "change", () => {
- this.container && (this.container.clips = this.clips);
- })]), this.view?.whenLayerView ? this.view.whenLayerView(this.layer).then((e5) => {
- e5 === this && this.processAttach();
- }, () => {
- }) : this.when().then(() => {
- this.processAttach();
- }, () => {
- }));
- }
- destroy() {
- this.processDetach(), this.updateRequested = false;
- }
- get spatialReferenceSupported() {
- const e4 = this.view?.spatialReference;
- return e4 == null || this.supportsSpatialReference(e4);
- }
- get updating() {
- return this.spatialReferenceSupported && (!this.attached || !this.suspended && (this.updateRequested || this.isUpdating()) || !!this.updatingHandles?.updating);
- }
- get visibleAtCurrentScale() {
- return this.isVisibleAtScale(this.view.scale);
- }
- processAttach() {
- this.isResolved() && !this.attached && !this.destroyed && this.spatialReferenceSupported && (this.attach(), this.attached = true, this.requestUpdate());
- }
- processDetach() {
- this.attached && (this.attached = false, this.detach(), this.updateRequested = false);
- }
- isVisibleAtScale(e4) {
- const t3 = this.layer && "effectiveScaleRange" in this.layer ? this.layer.effectiveScaleRange : null;
- if (!t3)
- return true;
- const { minScale: s6, maxScale: i2 } = t3;
- return (s6 === 0 || e4 <= s6) && (i2 === 0 || e4 >= i2);
- }
- requestUpdate() {
- this.destroyed || this.updateRequested || (this.updateRequested = true, this.suspended || this.view.requestUpdate());
- }
- processUpdate(e4) {
- !this.isFulfilled() || this.isResolved() ? (this._set("updateParameters", e4), this.updateRequested && !this.suspended && (this.updateRequested = false, this.update(e4))) : this.updateRequested = false;
- }
- hitTest(e4, t3) {
- return Promise.resolve(null);
- }
- supportsSpatialReference(e4) {
- return true;
- }
- canResume() {
- return !!this.spatialReferenceSupported && (!!super.canResume() && this.visibleAtCurrentScale);
- }
- getSuspendInfo() {
- const e4 = super.getSuspendInfo(), t3 = !this.spatialReferenceSupported, s6 = this.visibleAtCurrentScale;
- return t3 && (e4.spatialReferenceNotSupported = t3), s6 && (e4.outsideScaleRange = s6), e4;
- }
- };
- return e([d()], c3.prototype, "attached", void 0), e([d({ type: y3, set(e4) {
- const t3 = n3(e4, this._get("clips"), y3);
- this._set("clips", t3);
- } })], c3.prototype, "clips", void 0), e([d()], c3.prototype, "container", void 0), e([d()], c3.prototype, "moving", void 0), e([d({ readOnly: true })], c3.prototype, "spatialReferenceSupported", null), e([d({ readOnly: true })], c3.prototype, "updateParameters", void 0), e([d()], c3.prototype, "updateRequested", void 0), e([d()], c3.prototype, "updating", null), e([d()], c3.prototype, "view", void 0), e([d({ readOnly: true })], c3.prototype, "visibleAtCurrentScale", null), c3 = e([n("esri.views.2d.layers.LayerView2D")], c3), c3;
- };
- // node_modules/@arcgis/core/views/layers/LayerView.js
- var d3 = class extends a2(s3(m(n2.EventedMixin(y)))) {
- constructor(e4) {
- super(e4), this.layer = null, this.parent = null;
- }
- initialize() {
- this.when().catch((e4) => {
- if (e4.name !== "layerview:create-error") {
- const r = this.layer && this.layer.id || "no id", t2 = this.layer && this.layer.title || "no title";
- s.getLogger(this.declaredClass).error("#resolve()", `Failed to resolve layer view (layer title: '${t2}', id: '${r}')`, e4);
- }
- });
- }
- get fullOpacity() {
- return c(this.get("layer.opacity"), 1) * c(this.get("parent.fullOpacity"), 1);
- }
- get suspended() {
- return !this.canResume();
- }
- get suspendInfo() {
- return this.getSuspendInfo();
- }
- get legendEnabled() {
- return !this.suspended && this.layer?.legendEnabled === true;
- }
- get updating() {
- return !(!this.updatingHandles?.updating && !this.isUpdating());
- }
- get updatingProgress() {
- return this.updating ? 0 : 1;
- }
- get visible() {
- return this.layer?.visible === true;
- }
- set visible(e4) {
- e4 !== void 0 ? this._override("visible", e4) : this._clearOverride("visible");
- }
- canResume() {
- return this.visible && this.layer?.loaded && !this.parent?.suspended && this.view?.ready || false;
- }
- getSuspendInfo() {
- const e4 = this.parent && this.parent.suspended ? this.parent.suspendInfo : {}, r = this;
- return r.view && r.view.ready || (e4.viewNotReady = true), this.layer && this.layer.loaded || (e4.layerNotLoaded = true), this.visible || (e4.layerInvisible = true), e4;
- }
- isUpdating() {
- return false;
- }
- };
- e([d()], d3.prototype, "fullOpacity", null), e([d()], d3.prototype, "layer", void 0), e([d()], d3.prototype, "parent", void 0), e([d({ readOnly: true })], d3.prototype, "suspended", null), e([d({ readOnly: true })], d3.prototype, "suspendInfo", null), e([d({ readOnly: true })], d3.prototype, "legendEnabled", null), e([d({ type: Boolean, readOnly: true })], d3.prototype, "updating", null), e([d({ readOnly: true })], d3.prototype, "updatingProgress", null), e([d()], d3.prototype, "visible", null), e([d()], d3.prototype, "view", void 0), d3 = e([n("esri.views.layers.LayerView")], d3);
- var u = d3;
- export {
- f,
- u
- };
- //# sourceMappingURL=chunk-MNZXIBJ7.js.map
|