(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [3439],
  {
    22203: (e, t, r) => {
      'use strict';
      r.d(t, { C: () => y });
      var i = r(29768),
        s = r(15324),
        o = r(95873),
        n = r(76506),
        a = r(34250),
        l = (r(91306), r(92143), r(17533)),
        d = r(21972);
      let p = class extends (0, o.p)(s.Z) {
        constructor(e) {
          super(e), (this.getCollections = null);
        }
        initialize() {
          this.handles.add((0, d.a)(() => this.refresh()));
        }
        destroy() {
          this.getCollections = null;
        }
        refresh() {
          const e = (0, n.i)(this.getCollections) ? this.getCollections() : null;
          if ((0, n.b)(e)) return void this.removeAll();
          let t = 0;
          for (const r of e) (0, n.i)(r) && (t = this._processCollection(t, r));
          this.splice(t, this.length);
        }
        _createNewInstance(e) {
          return new s.Z(e);
        }
        _processCollection(e, t) {
          if (!t) return e;
          const r = this.itemFilterFunction ? this.itemFilterFunction : (e) => !!e;
          for (const i of t)
            if (i) {
              if (r(i)) {
                const t = this.indexOf(i, e);
                t >= 0 ? t !== e && this.reorder(i, e) : this.add(i, e), ++e;
              }
              if (this.getChildrenFunction) {
                const t = this.getChildrenFunction(i);
                if (Array.isArray(t)) for (const r of t) e = this._processCollection(e, r);
                else e = this._processCollection(e, t);
              }
            }
          return e;
        }
      };
      (0, i._)([(0, a.Cb)()], p.prototype, 'getCollections', void 0),
        (0, i._)([(0, a.Cb)()], p.prototype, 'getChildrenFunction', void 0),
        (0, i._)([(0, a.Cb)()], p.prototype, 'itemFilterFunction', void 0),
        (p = (0, i._)([(0, l.j)('esri.core.CollectionFlattener')], p));
      var y = p;
    },
    91162: (e, t, r) => {
      'use strict';
      r.d(t, { a: () => l, l: () => a });
      var i = r(41864),
        s = r(15324),
        o = r(22739),
        n = r(76506);
      async function a(e, t) {
        return await e.load(), l(e, t);
      }
      async function l(e, t) {
        const r = [],
          a = (...e) => {
            for (const t of e)
              (0, n.b)(t) ||
                (Array.isArray(t)
                  ? a(...t)
                  : s.Z.isCollection(t)
                  ? t.forEach((e) => a(e))
                  : o.L.isLoadable(t) && r.push(t));
          };
        t(a);
        let l = null;
        if (
          (await (0, i.m)(r, async (e) => {
            var t;
            !1 !==
              (
                await (0, i.r)(
                  ((t = e),
                  'loadAll' in t && 'function' == typeof t.loadAll ? e.loadAll() : e.load()),
                )
              ).ok ||
              l ||
              (l = e);
          }),
          l)
        )
          throw l.loadError;
        return e;
      }
    },
    95873: (e, t, r) => {
      'use strict';
      r.d(t, { r: () => h, p: () => c, W: () => y });
      var i = r(29768),
        s = r(21972),
        o = r(82933),
        n = r(34250),
        a = r(17533),
        l = r(76506),
        d = r(6906),
        p = r(617);
      r(23639),
        r(92143),
        r(31450),
        r(71552),
        r(40642),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(91306),
        r(81172),
        r(50406),
        r(60991),
        r(15324),
        r(76996);
      let y = class extends s.Z {
        constructor() {
          super(...arguments),
            (this.updating = !1),
            (this.handleId = 0),
            (this.handles = new o.Z()),
            (this.scheduleHandleId = 0),
            (this.pendingPromises = new Set());
        }
        destroy() {
          this.removeAll(), this.handles.destroy();
        }
        add(e, t, r, i = 0) {
          const s = 0 != (1 & i),
            o = ++this.handleId;
          s || this.installSyncUpdatingWatch(e, t, o);
          const n = 0 != (2 & i) ? (0, p.S1)(e, t, r, s) : e.watch(t, r, s);
          return this.handles.add(n, o), { remove: () => this.handles.remove(o) };
        }
        addOnCollectionPropertyChange(e, t, r, i = 0) {
          const s = 0 != (2 & i),
            o = ++this.handleId;
          return (
            this.handles.add(
              [
                (0, p.on)(e, t, 'after-changes', this.createSyncUpdatingCallback()),
                (0, p.on)(
                  e,
                  t,
                  'change',
                  r,
                  s
                    ? (e) => {
                        r({ added: e.items, removed: [], moved: [], target: e });
                      }
                    : void 0,
                ),
              ],
              o,
            ),
            {
              remove: () => {
                this.handles.remove(o);
              },
            }
          );
        }
        addOnCollectionChange(e, t, r = 0) {
          const i = 0 != (2 & r),
            s = ++this.handleId;
          return (
            this.handles.add(
              [e.on('after-changes', this.createSyncUpdatingCallback()), e.on('change', t)],
              s,
            ),
            i && t({ added: e.items, removed: [], moved: [], target: e }),
            {
              remove: () => {
                this.handles.remove(s);
              },
            }
          );
        }
        addPromise(e) {
          if ((0, l.b)(e)) return e;
          const t = ++this.handleId;
          this.handles.add(
            {
              remove: () => {
                this.pendingPromises.delete(e) &&
                  (0 !== this.pendingPromises.size ||
                    this.handles.has(u) ||
                    this._set('updating', !1));
              },
            },
            t,
          ),
            this.pendingPromises.add(e),
            this._set('updating', !0);
          const r = () => this.handles.remove(t);
          return e.then(r, r), e;
        }
        removeAll() {
          this.pendingPromises.clear(), this.handles.removeAll(), this._set('updating', !1);
        }
        installSyncUpdatingWatch(e, t, r) {
          const i = this.createSyncUpdatingCallback(),
            o = (0, s.r)(() => (0, n.v)(e, t), i);
          return this.handles.add(o, r), o;
        }
        createSyncUpdatingCallback() {
          return () => {
            this.handles.remove(u), ++this.scheduleHandleId;
            const e = this.scheduleHandleId;
            this._get('updating') || this._set('updating', !0),
              this.handles.add(
                (0, d.Os)(() => {
                  e === this.scheduleHandleId &&
                    (this._set('updating', this.pendingPromises.size > 0), this.handles.remove(u));
                }),
                u,
              );
          };
        }
      };
      (0, i._)([(0, n.Cb)({ readOnly: !0 })], y.prototype, 'updating', void 0),
        (y = (0, i._)([(0, a.j)('esri.views.support.WatchUpdatingTracking')], y));
      const u = -42,
        c = (e) => {
          let t = class extends e {
            destroy() {
              this.destroyed || (this.handles.destroy(), this.updatingHandles.destroy());
            }
            get handles() {
              return this._get('handles') || new o.Z();
            }
            get updatingHandles() {
              return this._get('updatingHandles') || new y();
            }
          };
          return (
            (0, i._)([(0, n.Cb)({ readOnly: !0 })], t.prototype, 'handles', null),
            (0, i._)([(0, n.Cb)({ readOnly: !0 })], t.prototype, 'updatingHandles', null),
            (t = (0, i._)([(0, a.j)('esri.core.HandleOwner')], t)),
            t
          );
        };
      let h = class extends c(s.Z) {};
      h = (0, i._)([(0, a.j)('esri.core.HandleOwner')], h);
    },
    3439: (e, t, r) => {
      'use strict';
      r.r(t), r.d(t, { default: () => Ve });
      var i = r(29768),
        s = r(15324),
        o = r(22203),
        n = r(60991),
        a = r(76506),
        l = r(91162),
        d = r(92143),
        p = r(54179),
        y = r(50406),
        u = r(32101),
        c = r(34250),
        h = r(91306),
        b = r(97714),
        g = r(17533),
        f = r(60947),
        v = r(41617),
        m = r(86748),
        _ = (r(55306), r(71206), r(51979), r(60698), r(65684), r(86758), r(95310), r(20208)),
        C = r(82058),
        w = r(57251),
        S = r(22739),
        O = r(20543),
        j = r(59465),
        I = r(21801),
        F = r(9506),
        x = r(82673),
        L = r(43022),
        T =
          (r(21972),
          r(23639),
          r(86656),
          r(22723),
          r(91055),
          r(27794),
          r(6906),
          r(81172),
          r(71552),
          r(31450),
          r(40642),
          r(50161),
          r(26341),
          r(93314),
          r(74673)),
        A =
          (r(35197), r(2906), r(73796), r(91597), r(86787), r(35132), r(89623), r(38742), r(47842));
      r(14249),
        r(9801),
        r(53523),
        r(42911),
        r(46826),
        r(45433),
        r(60217),
        r(74569),
        r(84069),
        r(44567),
        r(98380),
        r(92896),
        r(22781),
        r(32422),
        r(17298),
        r(85557),
        r(53785),
        r(95587),
        r(34394);
      let B = class extends (0, x.I)(p.a) {
        constructor(e) {
          super(e),
            (this.title = ''),
            (this.id = -1),
            (this.modelName = null),
            (this.isEmpty = null),
            (this.visible = !0),
            (this.opacity = 1);
        }
        readTitle(e, t) {
          return 'string' == typeof t.alias ? t.alias : 'string' == typeof t.name ? t.name : '';
        }
        readIdOnlyOnce(e) {
          return -1 !== this.id ? this.id : 'number' == typeof e ? e : void 0;
        }
      };
      (0, i._)(
        [
          (0, c.Cb)({
            type: String,
            json: { origins: { 'web-scene': { write: !0 }, 'portal-item': { write: !0 } } },
          }),
        ],
        B.prototype,
        'title',
        void 0,
      ),
        (0, i._)([(0, b.r)('service', 'title', ['alias', 'name'])], B.prototype, 'readTitle', null),
        (0, i._)([(0, c.Cb)()], B.prototype, 'layer', void 0),
        (0, i._)(
          [(0, c.Cb)({ type: h.I, readOnly: !0, json: { read: !1, write: { ignoreOrigin: !0 } } })],
          B.prototype,
          'id',
          void 0,
        ),
        (0, i._)([(0, b.r)('service', 'id')], B.prototype, 'readIdOnlyOnce', null),
        (0, i._)([(0, c.Cb)((0, L.r)(String))], B.prototype, 'modelName', void 0),
        (0, i._)([(0, c.Cb)((0, L.r)(Boolean))], B.prototype, 'isEmpty', void 0),
        (0, i._)(
          [(0, c.Cb)({ type: Boolean, json: { name: 'visibility', write: !0 } })],
          B.prototype,
          'visible',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ type: Number, json: { write: !0 } })],
          B.prototype,
          'opacity',
          void 0,
        ),
        (B = (0, i._)([(0, g.j)('esri.layers.buildingSublayers.BuildingSublayer')], B));
      const E = B;
      var P = r(45272),
        k = r(47346),
        Z = r(1709),
        q = r(83805),
        N = r(69003),
        R = r(31292),
        M = r(78893),
        U =
          (r(76996),
          r(29107),
          r(30574),
          r(2157),
          r(25977),
          r(7471),
          r(54414),
          r(1648),
          r(8925),
          r(33921),
          r(3482),
          r(45154),
          r(16769),
          r(55531),
          r(30582),
          r(593),
          r(85699),
          r(63136),
          r(96055),
          r(47776),
          r(18033),
          r(6331),
          r(62048),
          r(4292),
          r(75626),
          r(72652),
          r(29641),
          r(30493),
          r(70821),
          r(34229),
          r(37029),
          r(96467),
          r(63571),
          r(30776),
          r(48027),
          r(54174),
          r(82426),
          r(63130),
          r(25696),
          r(66396)),
        Q =
          (r(42775),
          r(95834),
          r(57150),
          r(76726),
          r(20444),
          r(76393),
          r(78548),
          r(2497),
          r(49906),
          r(46527),
          r(48649),
          r(9960),
          r(3101),
          r(5853),
          r(39141),
          r(48243),
          r(34635),
          r(10401),
          r(49900),
          r(66284),
          r(73173),
          r(88762),
          r(67477),
          r(78533),
          r(74653),
          r(91091),
          r(58943),
          r(70737),
          r(8487),
          r(17817),
          r(90814),
          r(15459),
          r(61847),
          r(16796),
          r(16955),
          r(22401),
          r(77894),
          r(55187),
          r(8586),
          r(44509),
          r(69814),
          r(11305),
          r(62259),
          r(44790),
          r(5909),
          r(60669),
          r(48208),
          r(51589),
          r(74071),
          r(51723),
          r(23243),
          r(51669),
          r(6090),
          r(3977),
          r(36741),
          r(11253),
          r(90319),
          r(38822),
          r(74057),
          r(23761),
          r(48190),
          r(94070),
          r(16218),
          r(9075),
          r(67541),
          r(12158),
          r(74864),
          r(63683),
          r(94479),
          r(45702),
          r(51127),
          r(89241),
          r(91700),
          r(32037),
          r(90811),
          r(93939),
          r(238),
          r(71831),
          r(49500),
          r(82933),
          r(10691),
          r(38949),
          r(71777),
          r(27371),
          r(78648),
          r(87558),
          r(13063),
          r(17153),
          r(35962),
          r(9252),
          r(67350),
          r(11471),
          r(83748),
          r(28376),
          r(62554),
          r(29027),
          r(48687),
          r(65514),
          r(46987),
          r(37453),
          r(55823),
          r(92847),
          r(87258),
          r(97546),
          r(54732),
          r(21781)),
        H = r(75025),
        D = (r(21132), r(11118), r(8547), r(89440)),
        K = r(62162),
        V = (r(41864), r(56420), r(74742), r(28239), r(16647), r(58912));
      r(19902),
        r(59765),
        r(77361),
        r(13322),
        r(14460),
        r(77807),
        r(50203),
        r(30439),
        r(6941),
        r(83290),
        r(46495),
        r(78303),
        r(17055),
        r(68653),
        r(2180),
        r(14327),
        r(69218),
        r(68714),
        r(34446),
        r(46646),
        r(39210),
        r(90549),
        r(27207);
      const W = d.L.getLogger('esri.layers.buildingSublayers.BuildingComponentSublayer'),
        z = (0, k.d)();
      let J = class extends S.L.LoadableMixin((0, O.a)(E)) {
        constructor(e) {
          super(e),
            (this.type = 'building-component'),
            (this.nodePages = null),
            (this.materialDefinitions = null),
            (this.textureSetDefinitions = null),
            (this.geometryDefinitions = null),
            (this.serviceUpdateTimeStamp = null),
            (this.fields = null),
            (this.associatedLayer = null),
            (this.outFields = null),
            (this.listMode = 'show'),
            (this.renderer = null),
            (this.definitionExpression = null),
            (this.popupEnabled = !0),
            (this.popupTemplate = null),
            (this.layerType = '3d-object');
        }
        get parsedUrl() {
          return this.layer
            ? {
                path: `${this.layer.parsedUrl.path}/sublayers/${this.id}`,
                query: this.layer.parsedUrl.query,
              }
            : null;
        }
        get fieldsIndex() {
          return new Z.Z(this.fields);
        }
        readAssociatedLayer(e, t) {
          const r = this.layer.associatedFeatureServiceItem,
            i = t.associatedLayerID;
          return (0, a.i)(r) && 'number' == typeof i
            ? new F.default({ portalItem: r, layerId: i })
            : null;
        }
        get objectIdField() {
          if (null != this.fields) for (const e of this.fields) if ('oid' === e.type) return e.name;
          return null;
        }
        get displayField() {
          return (0, a.i)(this.associatedLayer) ? this.associatedLayer.displayField : null;
        }
        get defaultPopupTemplate() {
          return this.createPopupTemplate();
        }
        load(e) {
          const t = (0, a.i)(e) ? e.signal : null,
            r = this._fetchService(t).then(() => {
              this.indexInfo = (0, q.f)(
                this.parsedUrl.path,
                this.rootNode,
                this.nodePages,
                this.apiKey,
                W,
                t,
              );
            });
          return this.addResolvingPromise(r), Promise.resolve(this);
        }
        createPopupTemplate(e) {
          return (0, M.eZ)(this, e);
        }
        async _fetchService(e) {
          const t = (
            await (0, C.default)(this.parsedUrl.path, {
              query: { f: 'json', token: this.apiKey },
              responseType: 'json',
              signal: e,
            })
          ).data;
          this.read(t, { origin: 'service', url: this.parsedUrl });
        }
        getField(e) {
          return this.fieldsIndex.get(e);
        }
        getFieldDomain(e, t) {
          var r, i, s, o;
          const n =
            null == (r = this.getFeatureType(null == t ? void 0 : t.feature)) ||
            null == (i = r.domains)
              ? void 0
              : i[e];
          return n && 'inherited' !== n.type
            ? n
            : null != (s = null == (o = this.getField(e)) ? void 0 : o.domain)
            ? s
            : null;
        }
        getFeatureType(e) {
          return e && (0, a.i)(this.associatedLayer)
            ? this.associatedLayer.getFeatureType(e)
            : null;
        }
        get types() {
          return (0, a.i)(this.associatedLayer) ? this.associatedLayer.types : [];
        }
        get typeIdField() {
          return (0, a.i)(this.associatedLayer) ? this.associatedLayer.typeIdField : null;
        }
        get geometryType() {
          return '3d-object' === this.layerType ? 'mesh' : 'point';
        }
        get profile() {
          return '3d-object' === this.layerType ? 'mesh-pyramids' : 'points';
        }
        get capabilities() {
          const e =
              (0, a.i)(this.associatedLayer) && this.associatedLayer.capabilities
                ? this.associatedLayer.capabilities
                : P.z,
            {
              query: t,
              data: { supportsZ: r, supportsM: i, isVersioned: s },
            } = e;
          return { query: t, data: { supportsZ: r, supportsM: i, isVersioned: s } };
        }
        createQuery() {
          const e = new R.Z();
          return (
            'mesh' !== this.geometryType && ((e.returnGeometry = !0), (e.returnZ = !0)),
            (e.where = this.definitionExpression || '1=1'),
            (e.sqlFormat = 'standard'),
            e
          );
        }
        queryExtent(e, t) {
          return this._getAssociatedLayerForQuery().then((r) =>
            r.queryExtent(e || this.createQuery(), t),
          );
        }
        queryFeatureCount(e, t) {
          return this._getAssociatedLayerForQuery().then((r) =>
            r.queryFeatureCount(e || this.createQuery(), t),
          );
        }
        queryFeatures(e, t) {
          return this._getAssociatedLayerForQuery()
            .then((r) => r.queryFeatures(e || this.createQuery(), t))
            .then((e) => {
              if (null != e && e.features)
                for (const t of e.features) (t.layer = this.layer), (t.sourceLayer = this);
              return e;
            });
        }
        queryObjectIds(e, t) {
          return this._getAssociatedLayerForQuery().then((r) =>
            r.queryObjectIds(e || this.createQuery(), t),
          );
        }
        getFieldUsageInfo(e) {
          return this.fieldsIndex.has(e)
            ? {
                supportsLabelingInfo: !1,
                supportsRenderer: !1,
                supportsPopupTemplate: !1,
                supportsLayerQuery: !1,
              }
            : {
                supportsLabelingInfo: !1,
                supportsRenderer: !0,
                supportsPopupTemplate: !0,
                supportsLayerQuery: (0, a.i)(this.associatedLayer),
              };
        }
        _getAssociatedLayerForQuery() {
          const e = this.associatedLayer;
          return (0, a.i)(e) && e.loaded ? Promise.resolve(e) : this._loadAssociatedLayerForQuery();
        }
        async _loadAssociatedLayerForQuery() {
          if ((await this.load(), (0, a.b)(this.associatedLayer)))
            throw new n.Z(
              'buildingscenelayer:query-not-available',
              'BuildingSceneLayer component layer queries are not available without an associated feature layer',
              { layer: this },
            );
          try {
            await this.associatedLayer.load();
          } catch (e) {
            throw new n.Z(
              'buildingscenelayer:query-not-available',
              'BuildingSceneLayer associated feature layer could not be loaded',
              { layer: this, error: e },
            );
          }
          return this.associatedLayer;
        }
      };
      (0, i._)([(0, c.Cb)({ readOnly: !0 })], J.prototype, 'parsedUrl', null),
        (0, i._)([(0, c.Cb)({ type: N.I, readOnly: !0 })], J.prototype, 'nodePages', void 0),
        (0, i._)(
          [(0, c.Cb)({ type: [N.a], readOnly: !0 })],
          J.prototype,
          'materialDefinitions',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ type: [N.b], readOnly: !0 })],
          J.prototype,
          'textureSetDefinitions',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ type: [N.c], readOnly: !0 })],
          J.prototype,
          'geometryDefinitions',
          void 0,
        ),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], J.prototype, 'serviceUpdateTimeStamp', void 0),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], J.prototype, 'store', void 0),
        (0, i._)(
          [(0, c.Cb)({ type: String, readOnly: !0, json: { read: { source: 'store.rootNode' } } })],
          J.prototype,
          'rootNode',
          void 0,
        ),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], J.prototype, 'attributeStorageInfo', void 0),
        (0, i._)([(0, c.Cb)(z.fields)], J.prototype, 'fields', void 0),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], J.prototype, 'fieldsIndex', null),
        (0, i._)(
          [(0, c.Cb)({ readOnly: !0, type: F.default })],
          J.prototype,
          'associatedLayer',
          void 0,
        ),
        (0, i._)(
          [(0, b.r)('service', 'associatedLayer', ['associatedLayerID'])],
          J.prototype,
          'readAssociatedLayer',
          null,
        ),
        (0, i._)([(0, c.Cb)(z.outFields)], J.prototype, 'outFields', void 0),
        (0, i._)([(0, c.Cb)({ type: String, readOnly: !0 })], J.prototype, 'objectIdField', null),
        (0, i._)(
          [(0, c.Cb)({ readOnly: !0, type: String, json: { read: !1 } })],
          J.prototype,
          'displayField',
          null,
        ),
        (0, i._)(
          [(0, c.Cb)({ readOnly: !0, type: String, aliasOf: 'layer.apiKey' })],
          J.prototype,
          'apiKey',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ readOnly: !0, type: I.Z, aliasOf: 'layer.fullExtent' })],
          J.prototype,
          'fullExtent',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ readOnly: !0, type: f.Z, aliasOf: 'layer.spatialReference' })],
          J.prototype,
          'spatialReference',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ readOnly: !0, aliasOf: 'layer.version' })],
          J.prototype,
          'version',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ readOnly: !0, type: A.E, aliasOf: 'layer.elevationInfo' })],
          J.prototype,
          'elevationInfo',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ readOnly: !0, type: Number, aliasOf: 'layer.minScale' })],
          J.prototype,
          'minScale',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ readOnly: !0, type: Number, aliasOf: 'layer.maxScale' })],
          J.prototype,
          'maxScale',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ type: ['hide', 'show'], json: { write: !0 } })],
          J.prototype,
          'listMode',
          void 0,
        ),
        (0, i._)(
          [
            (0, c.Cb)({
              types: _.w,
              json: {
                origins: { service: { read: { source: 'drawingInfo.renderer' } } },
                name: 'layerDefinition.drawingInfo.renderer',
                write: !0,
              },
              value: null,
            }),
          ],
          J.prototype,
          'renderer',
          void 0,
        ),
        (0, i._)(
          [
            (0, c.Cb)({
              type: String,
              json: {
                origins: { service: { read: !1, write: !1 } },
                name: 'layerDefinition.definitionExpression',
                write: { enabled: !0, allowNull: !0 },
              },
            }),
          ],
          J.prototype,
          'definitionExpression',
          void 0,
        ),
        (0, i._)([(0, c.Cb)(L.p)], J.prototype, 'popupEnabled', void 0),
        (0, i._)(
          [
            (0, c.Cb)({
              type: m.Z,
              json: { read: { source: 'popupInfo' }, write: { target: 'popupInfo' } },
            }),
          ],
          J.prototype,
          'popupTemplate',
          void 0,
        ),
        (0, i._)(
          [
            (0, c.Cb)({
              readOnly: !0,
              type: String,
              json: {
                origins: { service: { read: { source: 'store.normalReferenceFrame' } } },
                read: !1,
              },
            }),
          ],
          J.prototype,
          'normalReferenceFrame',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ readOnly: !0, json: { read: !1 } })],
          J.prototype,
          'defaultPopupTemplate',
          null,
        ),
        (0, i._)([(0, c.Cb)()], J.prototype, 'types', null),
        (0, i._)([(0, c.Cb)()], J.prototype, 'typeIdField', null),
        (0, i._)(
          [
            (0, c.Cb)({ json: { write: !1 } }),
            (0, j.e)(new w.J({ '3DObject': '3d-object', Point: 'point' })),
          ],
          J.prototype,
          'layerType',
          void 0,
        ),
        (0, i._)([(0, c.Cb)()], J.prototype, 'geometryType', null),
        (0, i._)([(0, c.Cb)()], J.prototype, 'profile', null),
        (0, i._)(
          [(0, c.Cb)({ readOnly: !0, json: { read: !1 } })],
          J.prototype,
          'capabilities',
          null,
        ),
        (J = (0, i._)([(0, g.j)('esri.layers.buildingSublayers.BuildingComponentSublayer')], J));
      const G = J;
      var $;
      const X = {
        type: s.Z,
        readOnly: !0,
        json: { origins: { service: { read: { source: 'sublayers', reader: Y } } }, read: !1 },
      };
      function Y(e, t, r) {
        if (e && Array.isArray(e))
          return new s.Z(
            e.map((e) => {
              const t = (function (e) {
                return 'group' === e.layerType ? ee : G;
              })(e);
              if (t) {
                const i = new t();
                return i.read(e, r), i;
              }
              r &&
                r.messages &&
                e &&
                r.messages.push(
                  new g.W(
                    'building-scene-layer:unsupported-sublayer-type',
                    "Building scene sublayer of type '" +
                      (e.type || 'unknown') +
                      "' are not supported",
                    { definition: e, context: r },
                  ),
                );
            }),
          );
      }
      let ee = ($ = class extends E {
        constructor(e) {
          super(e),
            (this.type = 'building-group'),
            (this.listMode = 'show'),
            (this.sublayers = null);
        }
        loadAll() {
          return (0, l.a)(this, (e) =>
            $.forEachSublayer(this.sublayers, (t) => {
              'building-group' !== t.type && e(t);
            }),
          );
        }
      });
      var te;
      (0, i._)(
        [(0, c.Cb)({ type: ['hide', 'show', 'hide-children'], json: { write: !0 } })],
        ee.prototype,
        'listMode',
        void 0,
      ),
        (0, i._)([(0, c.Cb)(X)], ee.prototype, 'sublayers', void 0),
        (ee = $ = (0, i._)([(0, g.j)('esri.layers.buildingSublayers.BuildingGroupSublayer')], ee)),
        ((te = ee || (ee = {})).sublayersProperty = X),
        (te.readSublayers = Y),
        (te.forEachSublayer = function e(t, r) {
          t.forEach((t) => {
            r(t), 'building-group' === t.type && e(t.sublayers, r);
          });
        });
      const re = ee;
      var ie = r(98412),
        se = r(10279);
      let oe = class extends T.a {};
      (0, i._)([(0, c.Cb)({ readOnly: !0, json: { read: !1 } })], oe.prototype, 'type', void 0),
        (oe = (0, i._)([(0, g.j)('esri.layers.support.BuildingFilterMode')], oe));
      var ne,
        ae = oe;
      let le = (ne = class extends ae {
        constructor() {
          super(...arguments), (this.type = 'solid');
        }
        clone() {
          return new ne();
        }
      });
      (0, i._)(
        [(0, c.Cb)({ type: ['solid'], readOnly: !0, json: { write: !0 } })],
        le.prototype,
        'type',
        void 0,
      ),
        (le = ne = (0, i._)([(0, g.j)('esri.layers.support.BuildingFilterModeSolid')], le));
      var de,
        pe = le;
      let ye = (de = class extends ae {
        constructor() {
          super(...arguments), (this.type = 'wire-frame'), (this.edges = null);
        }
        clone() {
          return new de({ edges: (0, a.d9)(this.edges) });
        }
      });
      (0, i._)([(0, j.e)({ wireFrame: 'wire-frame' })], ye.prototype, 'type', void 0),
        (0, i._)([(0, c.Cb)(U.s)], ye.prototype, 'edges', void 0),
        (ye = de = (0, i._)([(0, g.j)('esri.layers.support.BuildingFilterModeWireFrame')], ye));
      var ue,
        ce = ye;
      let he = (ue = class extends ae {
        constructor() {
          super(...arguments), (this.type = 'x-ray');
        }
        clone() {
          return new ue();
        }
      });
      (0, i._)(
        [(0, c.Cb)({ type: ['x-ray'], readOnly: !0, json: { write: !0 } })],
        he.prototype,
        'type',
        void 0,
      ),
        (he = ue = (0, i._)([(0, g.j)('esri.layers.support.BuildingFilterModeXRay')], he));
      var be,
        ge = he;
      const fe = {
        nonNullable: !0,
        types: { key: 'type', base: ae, typeMap: { solid: pe, 'wire-frame': ce, 'x-ray': ge } },
        json: {
          read: (e) => {
            switch (e && e.type) {
              case 'solid':
                return pe.fromJSON(e);
              case 'wireFrame':
                return ce.fromJSON(e);
              case 'x-ray':
                return ge.fromJSON(e);
              default:
                return;
            }
          },
          write: { enabled: !0, isRequired: !0 },
        },
      };
      let ve = (be = class extends T.a {
        constructor() {
          super(...arguments),
            (this.filterExpression = null),
            (this.filterMode = new pe()),
            (this.title = '');
        }
        clone() {
          return new be({
            filterExpression: this.filterExpression,
            filterMode: (0, a.d9)(this.filterMode),
            title: this.title,
          });
        }
      });
      (0, i._)(
        [(0, c.Cb)({ type: String, json: { write: { enabled: !0, isRequired: !0 } } })],
        ve.prototype,
        'filterExpression',
        void 0,
      ),
        (0, i._)([(0, c.Cb)(fe)], ve.prototype, 'filterMode', void 0),
        (0, i._)(
          [(0, c.Cb)({ type: String, json: { write: { enabled: !0, isRequired: !0 } } })],
          ve.prototype,
          'title',
          void 0,
        ),
        (ve = be = (0, i._)([(0, g.j)('esri.layers.support.BuildingFilterBlock')], ve));
      var me = ve;
      let _e = class extends T.a {
        constructor() {
          super(...arguments), (this.type = null);
        }
      };
      (0, i._)(
        [(0, c.Cb)({ type: String, readOnly: !0, json: { write: !0 } })],
        _e.prototype,
        'type',
        void 0,
      ),
        (_e = (0, i._)([(0, g.j)('esri.layers.support.BuildingFilterAuthoringInfo')], _e));
      var Ce,
        we = _e;
      let Se = (Ce = class extends T.a {
        constructor() {
          super(...arguments), (this.filterType = null), (this.filterValues = null);
        }
        clone() {
          return new Ce({
            filterType: this.filterType,
            filterValues: (0, a.d9)(this.filterValues),
          });
        }
      });
      (0, i._)(
        [(0, c.Cb)({ type: String, json: { write: !0 } })],
        Se.prototype,
        'filterType',
        void 0,
      ),
        (0, i._)(
          [(0, c.Cb)({ type: [String], json: { write: !0 } })],
          Se.prototype,
          'filterValues',
          void 0,
        ),
        (Se = Ce = (0, i._)([(0, g.j)('esri.layers.support.BuildingFilterAuthoringInfoType')], Se));
      var Oe,
        je = Se;
      const Ie = s.Z.ofType(je);
      let Fe = (Oe = class extends T.a {
        clone() {
          return new Oe({ filterTypes: (0, a.d9)(this.filterTypes) });
        }
      });
      (0, i._)([(0, c.Cb)({ type: Ie, json: { write: !0 } })], Fe.prototype, 'filterTypes', void 0),
        (Fe = Oe = (0, i._)(
          [(0, g.j)('esri.layers.support.BuildingFilterAuthoringInfoBlock')],
          Fe,
        ));
      var xe,
        Le = Fe;
      const Te = s.Z.ofType(Le);
      let Ae = (xe = class extends we {
        constructor() {
          super(...arguments), (this.type = 'checkbox');
        }
        clone() {
          return new xe({ filterBlocks: (0, a.d9)(this.filterBlocks) });
        }
      });
      (0, i._)([(0, c.Cb)({ type: ['checkbox'] })], Ae.prototype, 'type', void 0),
        (0, i._)(
          [(0, c.Cb)({ type: Te, json: { write: !0 } })],
          Ae.prototype,
          'filterBlocks',
          void 0,
        ),
        (Ae = xe = (0, i._)(
          [(0, g.j)('esri.layers.support.BuildingFilterAuthoringInfoCheckbox')],
          Ae,
        ));
      var Be,
        Ee = Ae;
      const Pe = s.Z.ofType(me);
      let ke = (Be = class extends T.a {
        constructor() {
          super(...arguments),
            (this.description = null),
            (this.filterBlocks = null),
            (this.id = (0, se.g)()),
            (this.name = null);
        }
        clone() {
          return new Be({
            description: this.description,
            filterBlocks: (0, a.d9)(this.filterBlocks),
            id: this.id,
            name: this.name,
            filterAuthoringInfo: (0, a.d9)(this.filterAuthoringInfo),
          });
        }
      });
      (0, i._)(
        [(0, c.Cb)({ type: String, json: { write: !0 } })],
        ke.prototype,
        'description',
        void 0,
      ),
        (0, i._)(
          [(0, c.Cb)({ type: Pe, json: { write: { enabled: !0, isRequired: !0 } } })],
          ke.prototype,
          'filterBlocks',
          void 0,
        ),
        (0, i._)(
          [
            (0, c.Cb)({
              types: { key: 'type', base: we, typeMap: { checkbox: Ee } },
              json: {
                read: (e) => {
                  switch (e && e.type) {
                    case 'checkbox':
                      return Ee.fromJSON(e);
                    default:
                      return null;
                  }
                },
                write: !0,
              },
            }),
          ],
          ke.prototype,
          'filterAuthoringInfo',
          void 0,
        ),
        (0, i._)(
          [
            (0, c.Cb)({
              type: String,
              constructOnly: !0,
              json: { write: { enabled: !0, isRequired: !0 } },
            }),
          ],
          ke.prototype,
          'id',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ type: String, json: { write: { enabled: !0, isRequired: !0 } } })],
          ke.prototype,
          'name',
          void 0,
        ),
        (ke = Be = (0, i._)([(0, g.j)('esri.layers.support.BuildingFilter')], ke));
      const Ze = ke,
        qe = d.L.getLogger('esri.layers.support.BuildingSummaryStatistics');
      let Ne = class extends T.a {
        constructor() {
          super(...arguments),
            (this.fieldName = null),
            (this.modelName = null),
            (this.label = null),
            (this.min = null),
            (this.max = null),
            (this.mostFrequentValues = null),
            (this.subLayerIds = null);
        }
      };
      (0, i._)([(0, c.Cb)({ type: String })], Ne.prototype, 'fieldName', void 0),
        (0, i._)([(0, c.Cb)({ type: String })], Ne.prototype, 'modelName', void 0),
        (0, i._)([(0, c.Cb)({ type: String })], Ne.prototype, 'label', void 0),
        (0, i._)([(0, c.Cb)({ type: Number })], Ne.prototype, 'min', void 0),
        (0, i._)([(0, c.Cb)({ type: Number })], Ne.prototype, 'max', void 0),
        (0, i._)(
          [
            (0, c.Cb)({
              json: {
                read: (e) =>
                  Array.isArray(e) &&
                  (e.every((e) => 'string' == typeof e) || e.every((e) => 'number' == typeof e))
                    ? e.slice()
                    : null,
              },
            }),
          ],
          Ne.prototype,
          'mostFrequentValues',
          void 0,
        ),
        (0, i._)([(0, c.Cb)({ type: [Number] })], Ne.prototype, 'subLayerIds', void 0),
        (Ne = (0, i._)([(0, g.j)('esri.layers.support.BuildingFieldStatistics')], Ne));
      let Re = class extends S.L.LoadableMixin((0, O.a)(T.a)) {
        constructor() {
          super(...arguments), (this.url = null);
        }
        get fields() {
          return this.loaded || 'loading' === this.loadStatus
            ? this._get('fields')
            : (qe.error('building summary statistics are not loaded'), null);
        }
        load(e) {
          const t = (0, a.i)(e) ? e.signal : null;
          return this.addResolvingPromise(this._fetchService(t)), Promise.resolve(this);
        }
        async _fetchService(e) {
          const t = (
            await (0, C.default)(this.url, {
              query: { f: 'json' },
              responseType: 'json',
              signal: e,
            })
          ).data;
          this.read(t, { origin: 'service' });
        }
      };
      (0, i._)([(0, c.Cb)({ constructOnly: !0, type: String })], Re.prototype, 'url', void 0),
        (0, i._)(
          [(0, c.Cb)({ readOnly: !0, type: [Ne], json: { read: { source: 'summary' } } })],
          Re.prototype,
          'fields',
          null,
        ),
        (Re = (0, i._)([(0, g.j)('esri.layers.support.BuildingSummaryStatistics')], Re));
      const Me = Re;
      var Ue = r(34558);
      r(95873), r(617), r(46857), r(3754);
      const Qe = d.L.getLogger('esri.layers.BuildingSceneLayer'),
        He = s.Z.ofType(Ze),
        De = (0, a.d9)(re.sublayersProperty);
      (De.json.origins['web-scene'] = {
        type: [G],
        write: { enabled: !0, overridePolicy: () => ({ enabled: !1 }) },
      }),
        (De.json.origins['portal-item'] = {
          type: [G],
          write: { enabled: !0, overridePolicy: () => ({ enabled: !1 }) },
        });
      let Ke = class extends (0, ie.S)(
        (0, H.A)((0, D.O)((0, K.P)((0, V.S)((0, p.M)((0, Q.A)(v.Z)))))),
      ) {
        constructor(e) {
          super(e),
            (this.operationalLayerType = 'BuildingSceneLayer'),
            (this.allSublayers = new o.C({
              getCollections: () => [this.sublayers],
              getChildrenFunction: (e) => ('building-group' === e.type ? e.sublayers : null),
            })),
            (this.sublayers = null),
            (this.sublayerOverrides = null),
            (this.filters = new He()),
            (this.activeFilterId = null),
            (this.summaryStatistics = null),
            (this.outFields = null),
            (this.type = 'building-scene');
        }
        normalizeCtorArgs(e) {
          return 'string' == typeof e ? { url: e } : e;
        }
        destroy() {
          this.allSublayers.destroy();
        }
        readSublayers(e, t, r) {
          const i = re.readSublayers(e, t, r);
          return (
            re.forEachSublayer(i, (e) => (e.layer = this)),
            this.sublayerOverrides &&
              (this.applySublayerOverrides(i, this.sublayerOverrides),
              (this.sublayerOverrides = null)),
            i
          );
        }
        applySublayerOverrides(e, { overrides: t, context: r }) {
          re.forEachSublayer(e, (e) => e.read(t.get(e.id), r));
        }
        readSublayerOverrides(e, t) {
          const r = new Map();
          for (const i of e)
            null != i && 'object' == typeof i && 'number' == typeof i.id
              ? r.set(i.id, i)
              : t.messages.push(
                  new n.Z(
                    'building-scene-layer:invalid-sublayer-override',
                    'Invalid value for sublayer override. Not an object or no id specified.',
                    { value: i },
                  ),
                );
          return { overrides: r, context: t };
        }
        writeSublayerOverrides(e, t, r) {
          const i = [];
          re.forEachSublayer(this.sublayers, (e) => {
            const t = e.write({}, r);
            Object.keys(t).length > 1 && i.push(t);
          }),
            i.length > 0 && (t.sublayers = i);
        }
        writeUnappliedOverrides(e, t) {
          (t.sublayers = []),
            e.overrides.forEach((e) => {
              t.sublayers.push((0, a.d9)(e));
            });
        }
        write(e, t) {
          return (
            (e = super.write(e, t)),
            !t ||
              ('web-scene' !== t.origin && 'portal-item' !== t.origin) ||
              (this.sublayers
                ? this.writeSublayerOverrides(this.sublayers, e, t)
                : this.sublayerOverrides &&
                  this.writeUnappliedOverrides(this.sublayerOverrides, e)),
            e
          );
        }
        read(e, t) {
          if (
            (super.read(e, t),
            t &&
              ('web-scene' === t.origin || 'portal-item' === t.origin) &&
              null != e &&
              Array.isArray(e.sublayers))
          ) {
            const r = this.readSublayerOverrides(e.sublayers, t);
            this.sublayers
              ? this.applySublayerOverrides(this.sublayers, r)
              : (this.sublayerOverrides = r);
          }
        }
        readSummaryStatistics(e, t) {
          if ('string' == typeof t.statisticsHRef) {
            const e = (0, u.v_)(this.parsedUrl.path, t.statisticsHRef);
            return new Me({ url: e });
          }
          return null;
        }
        set elevationInfo(e) {
          this._set('elevationInfo', e), this._validateElevationInfo();
        }
        load(e) {
          const t = (0, a.i)(e) ? e.signal : null,
            r = this.loadFromPortal({ supportedTypes: ['Scene Service'] }, e)
              .catch(y.r9)
              .then(() => this._fetchService(t))
              .then(() => this._fetchAssociatedFeatureService(t));
          return this.addResolvingPromise(r), Promise.resolve(this);
        }
        loadAll() {
          return (0, l.l)(this, (e) => {
            re.forEachSublayer(this.sublayers, (t) => {
              'building-group' !== t.type && e(t);
            }),
              this.summaryStatistics && e(this.summaryStatistics);
          });
        }
        async saveAs(e, t) {
          return this._debouncedSaveOperations(
            1,
            {
              ...t,
              getTypeKeywords: () => this._getTypeKeywords(),
              portalItemLayerType: 'building-scene',
            },
            e,
          );
        }
        async save() {
          const e = {
            getTypeKeywords: () => this._getTypeKeywords(),
            portalItemLayerType: 'building-scene',
          };
          return this._debouncedSaveOperations(0, e);
        }
        validateLayer(e) {
          if (!e.layerType || 'Building' !== e.layerType)
            throw new n.Z(
              'buildingscenelayer:layer-type-not-supported',
              'BuildingSceneLayer does not support this layer type',
              { layerType: e.layerType },
            );
        }
        _getTypeKeywords() {
          return ['Building'];
        }
        _validateElevationInfo() {
          const e = this.elevationInfo;
          e &&
            ('absolute-height' !== e.mode &&
              Qe.warn(
                '.elevationInfo=',
                'Building scene layers only support absolute-height elevation mode',
              ),
            e.featureExpressionInfo &&
              '0' !== e.featureExpressionInfo.expression &&
              Qe.warn(
                '.elevationInfo=',
                'Building scene layers do not support featureExpressionInfo',
              ));
        }
        async _fetchAssociatedFeatureService(e) {
          const t = new Ue.F(this.parsedUrl, this.portalItem, this.apiKey, e);
          try {
            this.associatedFeatureServiceItem = await t.fetchPortalItem();
          } catch (e) {
            Qe.warn('Associated feature service item could not be loaded', e);
          }
        }
      };
      (0, i._)(
        [(0, c.Cb)({ type: ['BuildingSceneLayer'] })],
        Ke.prototype,
        'operationalLayerType',
        void 0,
      ),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], Ke.prototype, 'allSublayers', void 0),
        (0, i._)([(0, c.Cb)(De)], Ke.prototype, 'sublayers', void 0),
        (0, i._)([(0, b.r)('service', 'sublayers')], Ke.prototype, 'readSublayers', null),
        (0, i._)(
          [(0, c.Cb)({ type: He, nonNullable: !0, json: { write: !0 } })],
          Ke.prototype,
          'filters',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ type: String, json: { write: !0 } })],
          Ke.prototype,
          'activeFilterId',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ readOnly: !0, type: Me })],
          Ke.prototype,
          'summaryStatistics',
          void 0,
        ),
        (0, i._)(
          [(0, b.r)('summaryStatistics', ['statisticsHRef'])],
          Ke.prototype,
          'readSummaryStatistics',
          null,
        ),
        (0, i._)(
          [(0, c.Cb)({ type: [String], json: { read: !1 } })],
          Ke.prototype,
          'outFields',
          void 0,
        ),
        (0, i._)([(0, c.Cb)(L.s)], Ke.prototype, 'fullExtent', void 0),
        (0, i._)(
          [(0, c.Cb)({ type: ['show', 'hide', 'hide-children'] })],
          Ke.prototype,
          'listMode',
          void 0,
        ),
        (0, i._)([(0, c.Cb)((0, L.r)(f.Z))], Ke.prototype, 'spatialReference', void 0),
        (0, i._)([(0, c.Cb)(L.e)], Ke.prototype, 'elevationInfo', null),
        (0, i._)([(0, c.Cb)({ json: { read: !1 }, readOnly: !0 })], Ke.prototype, 'type', void 0),
        (0, i._)([(0, c.Cb)()], Ke.prototype, 'associatedFeatureServiceItem', void 0),
        (Ke = (0, i._)([(0, g.j)('esri.layers.BuildingSceneLayer')], Ke));
      const Ve = Ke;
    },
  },
]);
