????

Your IP : 3.149.235.7


Current Path : C:/inetpub/vhost/bcvt.kontum.gov.vn/www/
Upload File :
Current File : C:/inetpub/vhost/bcvt.kontum.gov.vn/www/39-es5.js

(function () {
  var absMids = {
    "esri/layers/support/ElevationQuery": "./node_modules/arcgis-js-api/layers/support/ElevationQuery.js",
    "esri/layers/support/ElevationSampler": "./node_modules/arcgis-js-api/layers/support/ElevationSampler.js",
    "esri/layers/support/ElevationTile": "./node_modules/arcgis-js-api/layers/support/ElevationTile.js"
  };
  var globalObj = this || window;
  var jsonpArray = globalObj["webpackJsonp"] = globalObj["webpackJsonp"] || [];

  if (jsonpArray.registerAbsMids) {
    jsonpArray.registerAbsMids(absMids);
  } else {
    var absMidsWaiting = jsonpArray.absMidsWaiting = jsonpArray.absMidsWaiting || [];
    absMidsWaiting.push(absMids);
  }
})(), (window["webpackJsonp"] = window["webpackJsonp"] || []).push([[39], {
  /***/
  "./node_modules/arcgis-js-api/layers/support/ElevationQuery.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/arcgis-js-api/layers/support/ElevationQuery.js ***!
    \*********************************************************************/

  /*! no static exports found */

  /***/
  function node_modulesArcgisJsApiLayersSupportElevationQueryJs(module, exports, __webpack_require__) {
    var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // COPYRIGHT © 2019 Esri
    //
    // All rights reserved under the copyright laws of the United States
    // and applicable international laws, treaties, and conventions.
    //
    // This material is licensed for use under the Esri Master License
    // Agreement (MLA), and is bound by the terms of that agreement.
    // You may redistribute and use this code without modification,
    // provided you adhere to the terms of the MLA and include this
    // copyright notice.
    //
    // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
    //
    // For additional information, contact:
    // Environmental Systems Research Institute, Inc.
    // Attn: Contracts and Legal Services Department
    // 380 New York Street
    // Redlands, California, USA 92373
    // USA
    //
    // email: contracts@esri.com
    //
    // See http://js.arcgis.com/4.14/esri/copyright.txt for details.


    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), exports, __webpack_require__(
    /*! ../../core/tsSupport/assignHelper */
    "./node_modules/arcgis-js-api/core/tsSupport/assignHelper.js"), __webpack_require__(
    /*! ../../core/tsSupport/awaiterHelper */
    "./node_modules/arcgis-js-api/core/tsSupport/awaiterHelper.js"), __webpack_require__(
    /*! ../../core/tsSupport/extendsHelper */
    "./node_modules/arcgis-js-api/core/tsSupport/extendsHelper.js"), __webpack_require__(
    /*! ../../core/tsSupport/generatorHelper */
    "./node_modules/arcgis-js-api/core/tsSupport/generatorHelper.js"), __webpack_require__(
    /*! ../../core/arrayUtils */
    "./node_modules/arcgis-js-api/core/arrayUtils.js"), __webpack_require__(
    /*! ../../core/asyncUtils */
    "./node_modules/arcgis-js-api/core/asyncUtils.js"), __webpack_require__(
    /*! ../../core/Error */
    "./node_modules/arcgis-js-api/core/Error.js"), __webpack_require__(
    /*! ../../core/promiseUtils */
    "./node_modules/arcgis-js-api/core/promiseUtils.js"), __webpack_require__(
    /*! ../../core/unitUtils */
    "./node_modules/arcgis-js-api/core/unitUtils.js"), __webpack_require__(
    /*! ../../geometry/Multipoint */
    "./node_modules/arcgis-js-api/geometry/Multipoint.js"), __webpack_require__(
    /*! ../../geometry/Point */
    "./node_modules/arcgis-js-api/geometry/Point.js"), __webpack_require__(
    /*! ../../geometry/Polyline */
    "./node_modules/arcgis-js-api/geometry/Polyline.js"), __webpack_require__(
    /*! ../../geometry/support/aaBoundingRect */
    "./node_modules/arcgis-js-api/geometry/support/aaBoundingRect.js"), __webpack_require__(
    /*! ../../geometry/support/webMercatorUtils */
    "./node_modules/arcgis-js-api/geometry/support/webMercatorUtils.js"), __webpack_require__(
    /*! ./ElevationSampler */
    "./node_modules/arcgis-js-api/layers/support/ElevationSampler.js"), __webpack_require__(
    /*! ./ElevationTile */
    "./node_modules/arcgis-js-api/layers/support/ElevationTile.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (e, t, n, i, o, r, l, a, s, u, c, p, f, h, v, d, m, y) {
      function T(e, t) {
        var n = e.lods.length - 1;

        if (t > 0) {
          var i = l.findIndex(e.lods, function (e) {
            return e.resolution < t;
          });
          0 === i ? n = 0 : i > 0 && (n = i - 1);
        }

        return n;
      }

      Object.defineProperty(t, "__esModule", {
        value: !0
      });

      var g = function () {
        function e() {}

        return e.prototype.queryAll = function (e, t, o) {
          return i(this, void 0, void 0, function () {
            var i, l, a, c, p;
            return r(this, function (r) {
              switch (r.label) {
                case 0:
                  return e = o && o.ignoreInvisibleLayers ? e.filter(function (e) {
                    return e.visible;
                  }) : e.slice(), e.length ? (i = x.fromGeometry(t), l = !1, o && o.returnSampleInfo || (l = !0), a = n({
                    noDataValue: 0,
                    maximumAutoTileRequests: 20
                  }, o, {
                    returnSampleInfo: !0,
                    demResolution: "auto"
                  }), [4, this.query(e[e.length - 1], i, a)]) : [2, u.reject(new s("elevation-query:invalid-layer", "Elevation queries require at least one elevation layer to fetch tiles from"))];

                case 1:
                  return c = r.sent(), [4, this._queryAllContinue(e, c, a)];

                case 2:
                  return p = r.sent(), p.geometry = p.geometry["export"](), l && delete p.sampleInfo, [2, p];
              }
            });
          });
        }, e.prototype.query = function (e, t, o) {
          return i(this, void 0, void 0, function () {
            var i;
            return r(this, function (r) {
              switch (r.label) {
                case 0:
                  return e ? t && (t instanceof x || "point" === t.type || "multipoint" === t.type || "polyline" === t.type) ? (o = n({
                    noDataValue: 0,
                    demResolution: "auto",
                    minDemResolution: 0,
                    maximumAutoTileRequests: 20,
                    returnSampleInfo: !1
                  }, o), i = new w(e, t.spatialReference, o), [4, e.load(o)]) : [2, u.reject(new s("elevation-query:invalid-geometry", "Only point, polyline and multipoint geometries can be used to query elevation"))] : [2, u.reject(new s("elevation-query:invalid-layer", "Elevation queries require an elevation layer to fetch tiles from"))];

                case 1:
                  return r.sent(), this._createGeometryDescriptor(i, t), [4, this._selectTiles(i)];

                case 2:
                  return r.sent(), [4, this._populateElevationTiles(i)];

                case 3:
                  return r.sent(), this._sampleGeometryWithElevation(i), [2, this._createQueryResult(i)];
              }
            });
          });
        }, e.prototype.createSampler = function (e, t, o) {
          return i(this, void 0, void 0, function () {
            return r(this, function (i) {
              return e ? t && "extent" === t.type ? (o = n({
                noDataValue: 0,
                demResolution: "auto",
                maximumAutoTileRequests: 20,
                returnSampleInfo: !1
              }, o), [2, this._createSampler(e, t, o)]) : [2, u.reject(new s("elevation-query:invalid-extent", "Invalid or undefined extent"))] : [2, u.reject(new s("elevation-query:invalid-layer", "Elevation queries require an elevation layer to fetch tiles from"))];
            });
          });
        }, e.prototype.createSamplerAll = function (e, t, o) {
          return i(this, void 0, void 0, function () {
            var i, l;
            return r(this, function (r) {
              switch (r.label) {
                case 0:
                  return e = o && o.ignoreInvisibleLayers ? e.filter(function (e) {
                    return e.visible;
                  }) : e.slice(), e.length ? t && "extent" === t.type ? (i = n({
                    noDataValue: 0,
                    maximumAutoTileRequests: 20
                  }, o, {
                    returnSampleInfo: !0,
                    demResolution: "auto"
                  }), [4, this._createSampler(e[e.length - 1], t, i)]) : [2, u.reject(new s("elevation-query:invalid-extent", "Invalid or undefined extent"))] : [2, u.reject(new s("elevation-query:invalid-layer", "Elevation queries require at least one elevation layer to fetch tiles from"))];

                case 1:
                  return l = r.sent(), [2, this._createSamplerAllContinue(e, t, l, i)];
              }
            });
          });
        }, e.prototype._createSampler = function (e, t, n, o) {
          return i(this, void 0, void 0, function () {
            var i, l, a;
            return r(this, function (r) {
              switch (r.label) {
                case 0:
                  return [4, e.load()];

                case 1:
                  if (r.sent(), i = t.spatialReference, l = e.tileInfo.spatialReference, !i.equals(l)) {
                    if (!d.canProject(i, l)) return [2, u.reject(new s("elevation-query:invalid-extent", "Extent spatial reference (" + i.wkid + ") must be compatible with tile spatial reference (" + l.wkid + ")"))];
                    t = d.project(t, l);
                  }

                  return a = new E(e, t, n, o), [4, this._selectTiles(a)];

                case 2:
                  return r.sent(), [4, this._populateElevationTiles(a)];

                case 3:
                  return r.sent(), [2, new m.MultiTileElevationSampler(a.elevationTiles, a.layer.tileInfo, a.options.noDataValue)];
              }
            });
          });
        }, e.prototype._createSamplerAllContinue = function (e, t, n, o) {
          return i(this, void 0, void 0, function () {
            var i, l, a, s;
            return r(this, function (r) {
              switch (r.label) {
                case 0:
                  return e.pop(), e.length ? (i = n.samplers.map(function (e) {
                    return v.fromExtent(e.extent);
                  }), [4, this._createSampler(e[e.length - 1], t, o, i)]) : [2, n];

                case 1:
                  return l = r.sent(), 0 === l.samplers.length ? [2, n] : (a = n.samplers.concat(l.samplers), s = new m.MultiTileElevationSampler(a, o.noDataValue), [2, this._createSamplerAllContinue(e, t, s, o)]);
              }
            });
          });
        }, e.prototype._queryAllContinue = function (e, t, n) {
          return i(this, void 0, void 0, function () {
            var i, o, l, a, s, u, c;
            return r(this, function (r) {
              switch (r.label) {
                case 0:
                  if (i = e.pop(), t.geometry.coordinates.forEach(function (e, n) {
                    t.sampleInfo[n].demResolution >= 0 && !t.sampleInfo[n].source && (t.sampleInfo[n].source = i);
                  }), !e.length) return [2, t];

                  for (o = t.geometry.coordinates, l = [], a = [], s = 0; s < o.length; s++) t.sampleInfo[s].demResolution < 0 && (l.push(o[s]), a.push(s));

                  return 0 === l.length ? [2, t] : (u = t.geometry.clone(l), [4, this.query(e[e.length - 1], u, n)]);

                case 1:
                  return c = r.sent(), a.forEach(function (e, n) {
                    o[e].z = c.geometry.coordinates[n].z, t.sampleInfo[e].demResolution = c.sampleInfo[n].demResolution;
                  }), [2, this._queryAllContinue(e, t, n)];
              }
            });
          });
        }, e.prototype._createQueryResult = function (e) {
          var t;
          t = e.outSpatialReference.equals(e.geometry.spatialReference) ? e.geometry : e.geometry.project(e.outSpatialReference);
          var n = {
            geometry: t["export"](),
            noDataValue: e.options.noDataValue
          };
          return e.options.returnSampleInfo && (n.sampleInfo = this._extractSampleInfo(e)), e.geometry.coordinates.forEach(function (e) {
            e.tile = null, e.elevationTile = null;
          }), n;
        }, e.prototype._createGeometryDescriptor = function (e, t) {
          var n,
              i = e.layer.tileInfo.spatialReference;
          if (!(n = t instanceof x ? t.project(i) : d.project(t, i))) throw new s("elevation-query:spatial-reference-mismatch", "Cannot query elevation in '" + t.spatialReference.wkid + "' on an elevation service in '" + i.wkid + "'");
          e.geometry = x.fromGeometry(n);
        }, e.prototype._selectTiles = function (e) {
          return i(this, void 0, void 0, function () {
            var t;
            return r(this, function (n) {
              switch (n.label) {
                case 0:
                  return t = e.options.demResolution, ("geometry" === e.type && this._preselectOutsideLayerExtent(e), "number" != typeof t) ? [3, 1] : (this._selectTilesClosestResolution(e), [3, 6]);

                case 1:
                  return "finest-contiguous" !== t ? [3, 3] : [4, this._selectTilesFinestContiguous(e)];

                case 2:
                  return n.sent(), [3, 6];

                case 3:
                  return "auto" !== t ? [3, 5] : [4, this._selectTilesAuto(e)];

                case 4:
                  return n.sent(), [3, 6];

                case 5:
                  throw new s("elevation-query:invalid-dem-resolution", "Invalid dem resolution value '" + t + '\', expected a number, "finest-contiguous" or "auto"');

                case 6:
                  return [2];
              }
            });
          });
        }, e.prototype._preselectOutsideLayerExtent = function (e) {
          var t = new y.ElevationTile(null);
          t.sample = function () {
            return e.options.noDataValue;
          }, e.outsideExtentTile = t;
          var n = e.layer.fullExtent;
          e.geometry.coordinates.forEach(function (e) {
            var i = e.x,
                o = e.y;
            (i < n.xmin || i > n.xmax || o < n.ymin || o > n.ymax) && (e.elevationTile = t);
          });
        }, e.prototype._selectTilesClosestResolution = function (e) {
          var t = e.layer.tileInfo,
              n = this._findNearestDemResolutionLODIndex(t, e.options.demResolution);

          e.selectTilesAtLOD(n);
        }, e.prototype._findNearestDemResolutionLODIndex = function (e, t) {
          for (var n = c.getMetersPerUnitForSR(e.spatialReference), i = t / n, o = e.lods[0], r = 0, l = 1; l < e.lods.length; l++) {
            var a = e.lods[l];
            Math.abs(a.resolution - i) < Math.abs(o.resolution - i) && (o = a, r = l);
          }

          return r;
        }, e.prototype._selectTilesFinestContiguous = function (e) {
          return i(this, void 0, void 0, function () {
            var t;
            return r(this, function (n) {
              switch (n.label) {
                case 0:
                  return t = T(e.layer.tileInfo, e.options.minDemResolution), [4, this._selectTilesFinestContiguousAt(e, t)];

                case 1:
                  return n.sent(), [2];
              }
            });
          });
        }, e.prototype._selectTilesFinestContiguousAt = function (e, t) {
          return i(this, void 0, void 0, function () {
            var n, i, o, l;
            return r(this, function (r) {
              switch (r.label) {
                case 0:
                  if (n = e.layer, e.selectTilesAtLOD(t), t < 0) return [2];
                  i = n.tilemapCache, o = e.getTilesToFetch(), r.label = 1;

                case 1:
                  return r.trys.push([1, 6,, 8]), i ? [4, u.all(o.map(function (t) {
                    return i.fetchAvailability(t.level, t.row, t.col, {
                      signal: e.options.signal
                    });
                  }))] : [3, 3];

                case 2:
                  return r.sent(), [3, 5];

                case 3:
                  return [4, this._populateElevationTiles(e)];

                case 4:
                  if (r.sent(), !e.allElevationTilesFetched()) throw e.clearElevationTiles(), new s("elevation-query:has-unavailable-tiles");
                  r.label = 5;

                case 5:
                  return [3, 8];

                case 6:
                  if (l = r.sent(), u.isAbortError(l)) throw l;
                  return [4, this._selectTilesFinestContiguousAt(e, t - 1)];

                case 7:
                  return r.sent(), [3, 8];

                case 8:
                  return [2];
              }
            });
          });
        }, e.prototype._populateElevationTiles = function (e) {
          return i(this, void 0, void 0, function () {
            var t, n, i;
            return r(this, function (o) {
              switch (o.label) {
                case 0:
                  return t = e.getTilesToFetch(), n = {}, i = t.map(function (t) {
                    return e.layer.fetchTile(t.level, t.row, t.col, {
                      noDataValue: e.options.noDataValue,
                      signal: e.options.signal
                    }).then(function (e) {
                      return n[t.id] = new y.ElevationTile(t, e);
                    });
                  }), [4, u.eachAlways(i)];

                case 1:
                  return o.sent(), u.throwIfAborted(e.options.signal), e.populateElevationTiles(n), [2];
              }
            });
          });
        }, e.prototype._selectTilesAuto = function (e) {
          return i(this, void 0, void 0, function () {
            var t,
                n,
                o,
                l,
                s = this;
            return r(this, function (c) {
              switch (c.label) {
                case 0:
                  return this._selectTilesAutoFinest(e), (this._reduceTilesForMaximumRequests(e), t = e.layer.tilemapCache) ? (n = e.getTilesToFetch(), o = {}, l = n.map(function (n) {
                    return i(s, void 0, void 0, function () {
                      var i, l;
                      return r(this, function (r) {
                        switch (r.label) {
                          case 0:
                            return i = {
                              id: null,
                              level: 0,
                              row: 0,
                              col: 0,
                              extent: v.create()
                            }, [4, a.result(t.fetchAvailabilityUpsample(n.level, n.row, n.col, i, {
                              signal: e.options.signal
                            }))];

                          case 1:
                            if (l = r.sent(), !1 === l.ok && u.isAbortError(l.error)) throw l.error;
                            return !0 === l.ok && (o[n.id] = i), [2];
                        }
                      });
                    });
                  }), [4, u.all(l)]) : [2, this._selectTilesAutoPrefetchUpsample(e)];

                case 1:
                  return c.sent(), e.remapTiles(o), [2];
              }
            });
          });
        }, e.prototype._reduceTilesForMaximumRequests = function (e) {
          var t = e.layer.tileInfo,
              n = 0,
              i = {},
              o = function o(e) {
            e.id in i ? i[e.id]++ : (i[e.id] = 1, n++);
          },
              r = function r(e) {
            var t = i[e.id];
            1 === t ? (delete i[e.id], n--) : i[e.id] = t - 1;
          };

          e.forEachTileToFetch(o, r);

          for (var l = !0; l && (l = !1, e.forEachTileToFetch(function (i) {
            n <= e.options.maximumAutoTileRequests || (r(i), t.upsampleTile(i) && (l = !0), o(i));
          }, r), l););
        }, e.prototype._selectTilesAutoFinest = function (e) {
          var t = T(e.layer.tileInfo, e.options.minDemResolution);
          e.selectTilesAtLOD(t, e.options.maximumAutoTileRequests);
        }, e.prototype._selectTilesAutoPrefetchUpsample = function (e) {
          return i(this, void 0, void 0, function () {
            var t, n;
            return r(this, function (i) {
              switch (i.label) {
                case 0:
                  return t = e.layer.tileInfo, [4, this._populateElevationTiles(e)];

                case 1:
                  return i.sent(), n = !1, e.forEachTileToFetch(function (e, i) {
                    t.upsampleTile(e) ? n = !0 : i();
                  }), n ? [4, this._selectTilesAutoPrefetchUpsample(e)] : [3, 3];

                case 2:
                  i.sent(), i.label = 3;

                case 3:
                  return [2];
              }
            });
          });
        }, e.prototype._sampleGeometryWithElevation = function (e) {
          e.geometry.coordinates.forEach(function (t) {
            var n = t.elevationTile,
                i = e.options.noDataValue;

            if (n) {
              var o = n.sample(t.x, t.y);
              void 0 !== o ? i = o : t.elevationTile = null;
            }

            t.z = i;
          });
        }, e.prototype._extractSampleInfo = function (e) {
          var t = e.layer.tileInfo,
              n = c.getMetersPerUnitForSR(t.spatialReference);
          return e.geometry.coordinates.map(function (i) {
            var o = -1;

            if (i.elevationTile && i.elevationTile !== e.outsideExtentTile) {
              o = t.lodAt(i.elevationTile.tile.level).resolution * n;
            }

            return {
              demResolution: o
            };
          });
        }, e;
      }();

      t.ElevationQuery = g;

      var x = function () {
        function e() {}

        return e.prototype["export"] = function () {
          return this._exporter(this.coordinates, this.spatialReference);
        }, e.prototype.clone = function (t) {
          var n = this,
              i = new e();
          return i.geometry = this.geometry, i.spatialReference = this.spatialReference, i.coordinates = t || this.coordinates.map(function (e) {
            return n._cloneCoordinate(e);
          }), i._exporter = this._exporter, i;
        }, e.prototype.project = function (e) {
          var t = this;
          if (this.spatialReference.equals(e)) return this.clone();

          if (d.canProject(this.spatialReference, e)) {
            var n = e.isWGS84 ? d.xyToLngLat : d.lngLatToXY,
                i = [0, 0],
                o = this.coordinates.map(function (e) {
              var o = t._cloneCoordinate(e);

              return n(o.x, o.y, i), o.x = i[0], o.y = i[1], o;
            }),
                r = this.clone(o);
            return r.spatialReference = e, r;
          }

          return null;
        }, e.prototype._cloneCoordinate = function (e) {
          return {
            x: e.x,
            y: e.y,
            z: e.z,
            m: e.m,
            tile: null,
            elevationTile: null
          };
        }, e.fromGeometry = function (t) {
          var n = new e();
          if (n.geometry = t, n.spatialReference = t.spatialReference, t instanceof e) n.coordinates = t.coordinates.map(function (e) {
            return n._cloneCoordinate(e);
          }), n._exporter = function (e, n) {
            var i = t.clone(e);
            return i.spatialReference = n, i;
          };else switch (t.type) {
            case "point":
              var i = t;
              t.hasM ? n.coordinates = [{
                x: i.x,
                y: i.y,
                m: i.m
              }] : n.coordinates = [{
                x: i.x,
                y: i.y
              }], n._exporter = function (e, n) {
                return t.hasM ? new f(e[0].x, e[0].y, e[0].z, e[0].m, n) : new f(e[0].x, e[0].y, e[0].z, n);
              };
              break;

            case "multipoint":
              var o = t;
              n.coordinates = o.points.map(function (e) {
                if (t.hasM) {
                  var n = t.hasZ ? 3 : 2;
                  return {
                    x: e[0],
                    y: e[1],
                    m: e[n]
                  };
                }

                return {
                  x: e[0],
                  y: e[1]
                };
              }), n._exporter = function (e, n) {
                return t.hasM ? new p({
                  points: e.map(function (e) {
                    return [e.x, e.y, e.z, e.m];
                  }),
                  hasZ: !0,
                  hasM: !0,
                  spatiaReference: n
                }) : new p(e.map(function (e) {
                  return [e.x, e.y, e.z];
                }), n);
              };
              break;

            case "polyline":
              var r = t,
                  l = [],
                  a = [],
                  s = 0;
              r.paths.forEach(function (e) {
                a.push([s, s + e.length]), s += e.length, l.push.apply(l, e.map(function (e) {
                  if (t.hasM) {
                    var n = t.hasZ ? 3 : 2;
                    return {
                      x: e[0],
                      y: e[1],
                      m: e[n]
                    };
                  }

                  return {
                    x: e[0],
                    y: e[1]
                  };
                }));
              }), n.coordinates = l, n._exporter = function (e, n) {
                var i = t.hasM ? e.map(function (e) {
                  return [e.x, e.y, e.z, e.m];
                }) : e.map(function (e) {
                  return [e.x, e.y, e.z];
                }),
                    o = a.map(function (e) {
                  return i.slice(e[0], e[1]);
                });
                return new h({
                  paths: o,
                  hasM: t.hasM,
                  hasZ: !0,
                  spatialReference: n
                });
              };
          }
          return n;
        }, e;
      }();

      t.GeometryDescriptor = x;

      var _ = function () {
        function e(e, t) {
          this.layer = e, this.options = t;
        }

        return e;
      }(),
          w = function (e) {
        function t(t, n, i) {
          var o = e.call(this, t, i) || this;
          return o.type = "geometry", o.outSpatialReference = n, o;
        }

        return o(t, e), t.prototype.selectTilesAtLOD = function (e) {
          if (e < 0) this.geometry.coordinates.forEach(function (e) {
            return e.tile = null;
          });else {
            var t = this.layer.tileInfo,
                n = t.lods[e].level;
            this.geometry.coordinates.forEach(function (e) {
              e.tile = t.tileAt(n, e.x, e.y);
            });
          }
        }, t.prototype.allElevationTilesFetched = function () {
          return !this.geometry.coordinates.some(function (e) {
            return !e.elevationTile;
          });
        }, t.prototype.clearElevationTiles = function () {
          for (var e = 0, t = this.geometry.coordinates; e < t.length; e++) {
            var n = t[e];
            n.elevationTile !== this.outsideExtentTile && (n.elevationTile = null);
          }
        }, t.prototype.populateElevationTiles = function (e) {
          for (var t = 0, n = this.geometry.coordinates; t < n.length; t++) {
            var i = n[t];
            !i.elevationTile && i.tile && (i.elevationTile = e[i.tile.id]);
          }
        }, t.prototype.remapTiles = function (e) {
          for (var t = 0, n = this.geometry.coordinates; t < n.length; t++) {
            var i = n[t];
            i.tile = e[i.tile.id];
          }
        }, t.prototype.getTilesToFetch = function () {
          for (var e = {}, t = [], n = 0, i = this.geometry.coordinates; n < i.length; n++) {
            var o = i[n],
                r = o.tile;
            o.elevationTile || !o.tile || e[r.id] || (e[r.id] = r, t.push(r));
          }

          return t;
        }, t.prototype.forEachTileToFetch = function (e) {
          for (var t = 0, n = this.geometry.coordinates; t < n.length; t++) {
            var i = n[t];
            !function (t) {
              t.tile && !t.elevationTile && e(t.tile, function () {
                return t.tile = null;
              });
            }(i);
          }
        }, t;
      }(_),
          E = function (e) {
        function t(t, n, i, o) {
          var r = e.call(this, t, i) || this;
          return r.type = "extent", r.elevationTiles = [], r.candidateTiles = [], r.fetchedCandidates = new Set(), r.extent = n.intersection(t.fullExtent), r.maskExtents = o, r;
        }

        return o(t, e), t.prototype.selectTilesAtLOD = function (e, t) {
          var n = this._maximumLodForRequests(t),
              i = Math.min(n, e);

          i < 0 ? this.candidateTiles.length = 0 : this._selectCandidateTilesCoveringExtentAt(i);
        }, t.prototype._maximumLodForRequests = function (e) {
          var t = this.layer.tileInfo;
          if (!e) return t.lods.length - 1;

          for (var n = this.extent, i = t.lods.length - 1; i >= 0; i--) {
            var o = t.lods[i],
                r = o.resolution * t.size[0],
                l = o.resolution * t.size[1];
            if (Math.ceil(n.width / r) * Math.ceil(n.height / l) <= e) return i;
          }

          return -1;
        }, t.prototype.allElevationTilesFetched = function () {
          return this.candidateTiles.length === this.elevationTiles.length;
        }, t.prototype.clearElevationTiles = function () {
          this.elevationTiles.length = 0, this.fetchedCandidates.clear();
        }, t.prototype.populateElevationTiles = function (e) {
          for (var t = 0, n = this.candidateTiles; t < n.length; t++) {
            var i = n[t],
                o = e[i.id];
            o && (this.fetchedCandidates.add(i), this.elevationTiles.push(o));
          }
        }, t.prototype.remapTiles = function (e) {
          this.candidateTiles = this._uniqueNonOverlappingTiles(this.candidateTiles.map(function (t) {
            return e[t.id];
          }));
        }, t.prototype.getTilesToFetch = function () {
          return this.candidateTiles;
        }, t.prototype.forEachTileToFetch = function (e, t) {
          var n = this,
              i = this.candidateTiles;
          this.candidateTiles = [], i.forEach(function (i) {
            if (n.fetchedCandidates.has(i)) return void (t && t(i));
            var o = !1;
            e(i, function () {
              return o = !0;
            }), o ? t && t(i) : n.candidateTiles.push(i);
          }), this.candidateTiles = this._uniqueNonOverlappingTiles(this.candidateTiles, t);
        }, t.prototype._uniqueNonOverlappingTiles = function (e, t) {
          for (var n = {}, i = [], o = 0, r = e; o < r.length; o++) {
            var l = r[o];
            n[l.id] ? t && t(l) : (n[l.id] = l, i.push(l));
          }

          var a = i.sort(function (e, t) {
            return e.level - t.level;
          });
          return a.filter(function (e, n) {
            for (var i = 0; i < n; i++) if (v.contains(a[i].extent, e.extent)) return t && t(e), !1;

            return !0;
          });
        }, t.prototype._selectCandidateTilesCoveringExtentAt = function (e) {
          this.candidateTiles.length = 0;

          for (var t = this.layer.tileInfo, n = t.lods[e], i = this.extent, o = t.tileAt(n.level, i.xmin, i.ymin), r = n.resolution * t.size[0], l = n.resolution * t.size[1], a = Math.ceil((i.xmax - o.extent[0]) / r), s = Math.ceil((i.ymax - o.extent[1]) / l), u = 0; u < s; u++) for (var c = 0; c < a; c++) {
            var p = {
              id: null,
              level: o.level,
              row: o.row - u,
              col: o.col + c
            };
            t.updateTileInfo(p), this._tileIsMasked(p) || this.candidateTiles.push(p);
          }
        }, t.prototype._tileIsMasked = function (e) {
          return !!this.maskExtents && this.maskExtents.some(function (t) {
            return v.contains(t, e.extent);
          });
        }, t;
      }(_);

      t.getFinestLodIndex = T, t["default"] = g;
    }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    /***/
  },

  /***/
  "./node_modules/arcgis-js-api/layers/support/ElevationSampler.js":
  /*!***********************************************************************!*\
    !*** ./node_modules/arcgis-js-api/layers/support/ElevationSampler.js ***!
    \***********************************************************************/

  /*! no static exports found */

  /***/
  function node_modulesArcgisJsApiLayersSupportElevationSamplerJs(module, exports, __webpack_require__) {
    var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // COPYRIGHT © 2019 Esri
    //
    // All rights reserved under the copyright laws of the United States
    // and applicable international laws, treaties, and conventions.
    //
    // This material is licensed for use under the Esri Master License
    // Agreement (MLA), and is bound by the terms of that agreement.
    // You may redistribute and use this code without modification,
    // provided you adhere to the terms of the MLA and include this
    // copyright notice.
    //
    // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
    //
    // For additional information, contact:
    // Environmental Systems Research Institute, Inc.
    // Attn: Contracts and Legal Services Department
    // 380 New York Street
    // Redlands, California, USA 92373
    // USA
    //
    // email: contracts@esri.com
    //
    // See http://js.arcgis.com/4.14/esri/copyright.txt for details.


    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), exports, __webpack_require__(
    /*! ../../core/tsSupport/extendsHelper */
    "./node_modules/arcgis-js-api/core/tsSupport/extendsHelper.js"), __webpack_require__(
    /*! ../../geometry */
    "./node_modules/arcgis-js-api/geometry.js"), __webpack_require__(
    /*! ../../core/compilerUtils */
    "./node_modules/arcgis-js-api/core/compilerUtils.js"), __webpack_require__(
    /*! ../../core/Logger */
    "./node_modules/arcgis-js-api/core/Logger.js"), __webpack_require__(
    /*! ../../core/unitUtils */
    "./node_modules/arcgis-js-api/core/unitUtils.js"), __webpack_require__(
    /*! ../../geometry/support/aaBoundingRect */
    "./node_modules/arcgis-js-api/geometry/support/aaBoundingRect.js"), __webpack_require__(
    /*! ../../geometry/support/contains */
    "./node_modules/arcgis-js-api/geometry/support/contains.js"), __webpack_require__(
    /*! ../../geometry/support/webMercatorUtils */
    "./node_modules/arcgis-js-api/geometry/support/webMercatorUtils.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (e, t, n, r, a, i, o, l, s, u) {
      function p(e, t) {
        var n = c(e, t.spatialReference);
        if (!n) return null;

        switch (e.type) {
          case "point":
            f(e, n, t);
            break;

          case "polyline":
            m(e, n, t);
            break;

          case "multipoint":
            v(e, n, t);
            break;

          default:
            a.neverReached(e);
        }

        return e;
      }

      function c(e, t) {
        var n = e.spatialReference;
        return n.equals(t) ? e : u.canProject(n, t) ? u.project(e, t) : (h.error("Cannot project geometry spatial reference (wkid:" + n.wkid + ") to elevation sampler spatial reference (wkid:" + t.wkid + ")"), null);
      }

      function f(e, t, n) {
        e.z = n.elevationAt(t) || 0;
      }

      function m(e, t, n) {
        y.spatialReference = t.spatialReference;

        for (var r = e.hasM && !e.hasZ, a = 0; a < e.paths.length; a++) for (var i = e.paths[a], o = t.paths[a], l = 0; l < i.length; l++) {
          var s = i[l],
              u = o[l];
          y.x = u[0], y.y = u[1];
          var p = n.elevationAt(y) || 0;
          r && (s[3] = s[2]), s[2] = p;
        }

        e.hasZ = !0;
      }

      function v(e, t, n) {
        y.spatialReference = t.spatialReference;

        for (var r = e.hasM && !e.hasZ, a = 0; a < e.points.length; a++) {
          var i = e.points[a],
              o = t.points[a];
          y.x = o[0], y.y = o[1];
          var l = n.elevationAt(y) || 0;
          r && (i[3] = i[2]), i[2] = l;
        }

        e.hasZ = !0;
      }

      Object.defineProperty(t, "__esModule", {
        value: !0
      });

      var h = i.getLogger("esri.layers.support.ElevationSampler"),
          x = function () {
        function e() {}

        return e.prototype.queryElevation = function (e) {
          return p(e.clone(), this);
        }, e.prototype.on = function () {
          return g;
        }, e.prototype.projectIfRequired = function (e, t) {
          return c(e, t);
        }, e;
      }();

      t.ElevationSamplerBase = x;

      var d = function (e) {
        function t(t, n, r) {
          var a = e.call(this) || this;
          a.tile = t, a.noDataValue = r, a.extent = l.toExtent(t.tile.extent, n.spatialReference);
          var i = o.getMetersPerUnitForSR(n.spatialReference),
              s = n.lodAt(t.tile.level).resolution * i;
          return a.demResolution = {
            min: s,
            max: s
          }, a;
        }

        return n(t, e), Object.defineProperty(t.prototype, "spatialReference", {
          get: function get() {
            return this.extent.spatialReference;
          },
          enumerable: !0,
          configurable: !0
        }), t.prototype.contains = function (e) {
          var t = this.projectIfRequired(e, this.spatialReference);
          return s.extentContainsPoint(this.extent, t);
        }, t.prototype.elevationAt = function (e) {
          var t = this.projectIfRequired(e, this.spatialReference);
          if (!t) return null;

          if (!this.contains(e)) {
            var n = this.extent,
                r = n.xmin + ", " + n.ymin + ", " + n.xmax + ", " + n.ymax;
            h.warn("#elevationAt()", "Point used to sample elevation (" + e.x + ", " + e.y + ") is outside of the sampler extent (" + r + ")");
          }

          return this.tile.sample(t.x, t.y);
        }, t;
      }(x);

      t.TileElevationSampler = d;

      var R = function (e) {
        function t(t, n, r) {
          var a,
              i = e.call(this) || this;
          "number" == typeof n ? (i.noDataValue = n, a = null) : (a = n, i.noDataValue = r), i.samplers = a ? t.map(function (e) {
            return new d(e, a, i.noDataValue);
          }) : t;
          var o = i.samplers[0];

          if (o) {
            i.extent = o.extent.clone();
            var s = o.demResolution,
                u = s.min,
                p = s.max;
            i.demResolution = {
              min: u,
              max: p
            };

            for (var c = 1; c < i.samplers.length; c++) {
              var f = i.samplers[c];
              i.extent.union(f.extent), i.demResolution.min = Math.min(i.demResolution.min, f.demResolution.min), i.demResolution.max = Math.max(i.demResolution.max, f.demResolution.max);
            }
          } else i.extent = l.toExtent(l.create(), a.spatialReference), i.demResolution = {
            min: 0,
            max: 0
          };

          return i;
        }

        return n(t, e), Object.defineProperty(t.prototype, "spatialReference", {
          get: function get() {
            return this.extent.spatialReference;
          },
          enumerable: !0,
          configurable: !0
        }), t.prototype.elevationAt = function (e) {
          var t = this.projectIfRequired(e, this.spatialReference);
          if (!t) return null;

          for (var n = 0, r = this.samplers; n < r.length; n++) {
            var a = r[n];
            if (a.contains(t)) return a.elevationAt(t);
          }

          return h.warn("#elevationAt()", "Point used to sample elevation (" + e.x + ", " + e.y + ") is outside of the sampler"), null;
        }, t;
      }(x);

      t.MultiTileElevationSampler = R, t.updateGeometryElevation = p;
      var y = new r.Point(),
          g = {
        remove: function remove() {}
      };
    }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    /***/
  },

  /***/
  "./node_modules/arcgis-js-api/layers/support/ElevationTile.js":
  /*!********************************************************************!*\
    !*** ./node_modules/arcgis-js-api/layers/support/ElevationTile.js ***!
    \********************************************************************/

  /*! no static exports found */

  /***/
  function node_modulesArcgisJsApiLayersSupportElevationTileJs(module, exports, __webpack_require__) {
    var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // COPYRIGHT © 2019 Esri
    //
    // All rights reserved under the copyright laws of the United States
    // and applicable international laws, treaties, and conventions.
    //
    // This material is licensed for use under the Esri Master License
    // Agreement (MLA), and is bound by the terms of that agreement.
    // You may redistribute and use this code without modification,
    // provided you adhere to the terms of the MLA and include this
    // copyright notice.
    //
    // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
    //
    // For additional information, contact:
    // Environmental Systems Research Institute, Inc.
    // Attn: Contracts and Legal Services Department
    // 380 New York Street
    // Redlands, California, USA 92373
    // USA
    //
    // email: contracts@esri.com
    //
    // See http://js.arcgis.com/4.14/esri/copyright.txt for details.


    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), exports], __WEBPACK_AMD_DEFINE_RESULT__ = function (t, e) {
      function a(t, e, a) {
        var r = t.safeWidth,
            n = t.width,
            l = t.pixelData,
            h = t.noDataValue,
            o = i(t.dy * (t.y1 - a), 0, r),
            u = i(t.dx * (e - t.x0), 0, r),
            d = Math.floor(o),
            f = Math.floor(u),
            s = d * n + f,
            p = s + n,
            D = l[s],
            v = l[p],
            x = l[s + 1],
            c = l[p + 1];

        if (D !== h && v !== h && x !== h && c !== h) {
          var w = o - d,
              y = u - f,
              m = D + (x - D) * y;
          return m + (v + (c - v) * y - m) * w;
        }
      }

      function i(t, e, a) {
        return t < e ? e : t > a ? a : t;
      }

      Object.defineProperty(e, "__esModule", {
        value: !0
      });

      var r = function () {
        function t(t, e) {
          if (this.tile = t, !e) return void (this.samplerData = null);
          var a = this.tile.extent;
          this.samplerData = {
            pixelData: e.values,
            width: e.width,
            height: e.height,
            safeWidth: .99999999 * (e.width - 1),
            noDataValue: e.noDataValue,
            dx: (e.width - 1) / (a[2] - a[0]),
            dy: (e.width - 1) / (a[3] - a[1]),
            x0: a[0],
            y1: a[3]
          };
        }

        return t.prototype.sample = function (t, e) {
          if (this.samplerData) return a(this.samplerData, t, e);
        }, t;
      }();

      e.ElevationTile = r, e["default"] = r;
    }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    /***/
  }
}]);
//# sourceMappingURL=39-es5.js.map