123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736 |
- import {
- d as d3,
- y
- } from "./chunk-TQFDJPI3.js";
- import {
- o,
- r as r3
- } from "./chunk-6G6XHVK2.js";
- import {
- s as s5
- } from "./chunk-FJ72FJKM.js";
- import {
- r as r4
- } from "./chunk-YR7YKE3S.js";
- import {
- W,
- m,
- p as p2
- } from "./chunk-H3QCF24A.js";
- import {
- i as i3
- } from "./chunk-EAUVYZHD.js";
- import {
- f,
- u as u4
- } from "./chunk-MNZXIBJ7.js";
- import "./chunk-YJKEIUMW.js";
- import "./chunk-JH3PLIM6.js";
- import "./chunk-FCDUTNBY.js";
- import "./chunk-LL6JU3GU.js";
- import "./chunk-ZIWBDWEW.js";
- import "./chunk-IQNZZCQJ.js";
- import "./chunk-Q4LKAPDF.js";
- import "./chunk-TODU7HVH.js";
- import {
- I
- } from "./chunk-23ONSYIH.js";
- import "./chunk-3T4BXU2T.js";
- import "./chunk-YLVXZ2PS.js";
- import {
- g as g3,
- i as i2,
- s as s4,
- u as u3
- } from "./chunk-3G6RGU7K.js";
- import {
- F as F2,
- T,
- X,
- ne
- } from "./chunk-Y4GPJDDM.js";
- import {
- F
- } from "./chunk-FUB4YNLX.js";
- import {
- l as l2,
- u as u2
- } from "./chunk-EE6TL7XD.js";
- import "./chunk-GDB2KX4Y.js";
- import "./chunk-546QCRS4.js";
- import "./chunk-QXZVBSBH.js";
- import "./chunk-773XI6MQ.js";
- import "./chunk-WFSV2B2I.js";
- import "./chunk-J525NRN3.js";
- import "./chunk-MI7HWWFL.js";
- import {
- mt
- } from "./chunk-7BTL34ZE.js";
- import {
- e as e3
- } from "./chunk-ZHRMTKME.js";
- import "./chunk-ZVHTCCQC.js";
- import {
- r as r2
- } from "./chunk-PCGDLSZ4.js";
- import {
- p
- } from "./chunk-CAYFEZCR.js";
- import "./chunk-MFFE4I2S.js";
- import "./chunk-K3NA3LQS.js";
- import "./chunk-LMCIAW5S.js";
- import {
- h as h2
- } from "./chunk-OTS3UE5B.js";
- import "./chunk-6RAL4JPQ.js";
- import {
- l as l3
- } from "./chunk-4E6K4P67.js";
- import "./chunk-LGW7TID4.js";
- import "./chunk-3OHML7FO.js";
- import "./chunk-G5AI6ZNE.js";
- import "./chunk-FIYKFRB2.js";
- import "./chunk-FYNVVMWY.js";
- import "./chunk-Q52DVFYK.js";
- import "./chunk-HBMVUVZX.js";
- import {
- i,
- s as s3
- } from "./chunk-CRGVDJI6.js";
- import "./chunk-DH2OBAUC.js";
- import "./chunk-TNLRDNTC.js";
- import "./chunk-6P6NA7JB.js";
- import {
- g as g4
- } from "./chunk-RZFGRBD7.js";
- import "./chunk-PUSPZYFZ.js";
- import "./chunk-EN7YGJWG.js";
- import "./chunk-VBNMTM7L.js";
- import "./chunk-3D3QEPRE.js";
- import "./chunk-JFNNSBWL.js";
- import "./chunk-WNCU6BFU.js";
- import "./chunk-PIGRDDRG.js";
- import "./chunk-XLV7RUSE.js";
- import "./chunk-NTUXR253.js";
- import "./chunk-C43UE3Z5.js";
- import {
- d as d2
- } from "./chunk-RMX2AZ4P.js";
- import "./chunk-NE3ESGA6.js";
- import {
- h,
- l,
- w
- } from "./chunk-YIS6BAC3.js";
- import "./chunk-7XXXCK2A.js";
- import "./chunk-7ZIDBK7B.js";
- import {
- g as g2
- } from "./chunk-PSV473TI.js";
- import "./chunk-FONIFA5N.js";
- import "./chunk-EG5OI4V4.js";
- import "./chunk-65BYCSII.js";
- import "./chunk-WZQZRKNH.js";
- import "./chunk-LRDX4TO7.js";
- import "./chunk-6A4U74YA.js";
- import {
- S
- } from "./chunk-RBZL6SRZ.js";
- import "./chunk-WJW5DUN6.js";
- import "./chunk-PJ7ZQ4VD.js";
- import "./chunk-WDLTDV2L.js";
- import "./chunk-TERAW6FT.js";
- import {
- u
- } from "./chunk-N2663GRX.js";
- import "./chunk-O4FY3ITT.js";
- import "./chunk-WEMIK25H.js";
- import "./chunk-7N4X6GF3.js";
- import "./chunk-JXW4QTJA.js";
- import "./chunk-UXF37FQ4.js";
- import "./chunk-ZOEK6QHJ.js";
- import "./chunk-XNLG7T2T.js";
- import "./chunk-IR4PV7VK.js";
- import "./chunk-2Z6LERTI.js";
- import "./chunk-OWVBLVP3.js";
- import "./chunk-AFZ7XSEW.js";
- import "./chunk-4NKD334K.js";
- import "./chunk-65K7LC56.js";
- import "./chunk-ATPLLI5W.js";
- import "./chunk-MXB2XLKV.js";
- import "./chunk-XH7RUGVZ.js";
- import "./chunk-TBBTRX4O.js";
- import "./chunk-YBSUITLL.js";
- import "./chunk-ALDCDSPV.js";
- import "./chunk-DT6EAZQ5.js";
- import "./chunk-HNOZUNJ4.js";
- import "./chunk-VNFRAYHO.js";
- import "./chunk-R5IG2D6H.js";
- import "./chunk-VBRY5KJM.js";
- import "./chunk-PDKDCAAD.js";
- import {
- M2 as M,
- j2 as j
- } from "./chunk-ECW2QABR.js";
- import "./chunk-GCDJLKH4.js";
- import "./chunk-MRJEICT6.js";
- import {
- d,
- e,
- n2 as n
- } from "./chunk-Y3WMVFTW.js";
- import "./chunk-SAS7RONY.js";
- import "./chunk-WSRBH7BF.js";
- import "./chunk-IHXECKQQ.js";
- import {
- E,
- g,
- x
- } from "./chunk-ULGDPLM2.js";
- import {
- s,
- s3 as s2
- } from "./chunk-EMJ4ZSM2.js";
- import "./chunk-IKP3YN53.js";
- import {
- e as e2,
- r,
- t
- } from "./chunk-GZT4BVFP.js";
- import "./chunk-A5ICIBVI.js";
- // node_modules/@arcgis/core/views/2d/engine/imagery/RasterTile.js
- var i4 = class extends r3 {
- constructor(t2, e4, i5, r6, a, n5 = null) {
- super(t2, e4, i5, r6, a), this.bitmap = new p2(n5, null, null), this.bitmap.coordScale = [r6, a], this.bitmap.once("isReady", () => this.ready());
- }
- destroy() {
- super.destroy(), this.bitmap.destroy(), this.bitmap = null, this.stage = null;
- }
- set stencilRef(t2) {
- this.bitmap.stencilRef = t2;
- }
- get stencilRef() {
- return this.bitmap.stencilRef;
- }
- setTransform(t2, s6) {
- super.setTransform(t2, s6), this.bitmap.transforms.dvs = this.transforms.dvs;
- }
- _createTransforms() {
- return { dvs: e3(), tileMat3: e3() };
- }
- onAttach() {
- this.bitmap.stage = this.stage;
- }
- onDetach() {
- this.bitmap.stage = null;
- }
- };
- // node_modules/@arcgis/core/views/2d/engine/imagery/RasterTileContainer.js
- var n2 = class extends o {
- constructor() {
- super(...arguments), this.isCustomTilingScheme = false;
- }
- createTile(e4) {
- const s6 = this._getTileBounds(e4), [r6, t2] = this._tileInfoView.tileInfo.size;
- return new i4(e4, s6[0], s6[3], r6, t2);
- }
- prepareRenderPasses(e4) {
- const s6 = e4.registerRenderPass({ name: "imagery (tile)", brushes: [W.raster], target: () => this.children.map((e5) => e5.bitmap), drawPhase: I.MAP });
- return [...super.prepareRenderPasses(e4), s6];
- }
- doRender(e4) {
- this.visible && e4.drawPhase === I.MAP && super.doRender(e4);
- }
- _getTileBounds(r6) {
- const i5 = this._tileInfoView.getTileBounds(u(), r6);
- if (this.isCustomTilingScheme && r6.world) {
- const { tileInfo: e4 } = this._tileInfoView, t2 = mt(e4.spatialReference);
- if (t2) {
- const { resolution: s6 } = e4.lodAt(r6.level), o3 = t2 / s6 % e4.size[0], n5 = o3 ? (e4.size[0] - o3) * s6 : 0;
- i5[0] -= n5 * r6.world, i5[2] -= n5 * r6.world;
- }
- }
- return i5;
- }
- };
- // node_modules/@arcgis/core/views/2d/layers/imagery/BaseImageryTileSubView2D.js
- var R = [0, 0];
- var T2 = s.getLogger("esri.views.2d.layers.ImageryTileLayerView2D");
- var V = class extends d2 {
- constructor() {
- super(...arguments), this._emptyTilePixelBlock = null, this._tileStrategy = null, this._tileInfoView = null, this._fetchQueue = null, this._blockCacheRegistryUrl = null, this._blockCacheRegistryId = null, this._srcResolutions = null, this.previousLOD = null, this._needBlockCacheUpdate = false, this._globalSymbolizerParams = null, this._symbolizerParams = null, this._abortController = null, this._isCustomTilingScheme = false, this._globalUpdateRequested = false, this.attached = false, this.container = null, this.layer = null, this.timeExtent = null, this.redrawOrRefetch = x((e4, t2) => !this.previousLOD || this.layerView.suspended ? Promise.resolve() : e4 ? this.updatingHandles.addPromise(this.doRefresh()) : this.updatingHandles.addPromise(this._redrawImage(t2)));
- }
- get useWebGLForProcessing() {
- return this._get("useWebGLForProcessing") ?? true;
- }
- set useWebGLForProcessing(e4) {
- this._set("useWebGLForProcessing", e4);
- }
- get useProgressiveUpdate() {
- return this._get("useProgressiveUpdate") == null || this._get("useProgressiveUpdate");
- }
- set useProgressiveUpdate(e4) {
- if (this._tileStrategy && this.useProgressiveUpdate !== e4) {
- this._tileStrategy.destroy(), this.container.removeAllChildren();
- const t2 = this._getCacheSize(e4);
- this._tileStrategy = new r2({ cachePolicy: "purge", acquireTile: (e5) => this.acquireTile(e5), releaseTile: (e5) => this.releaseTile(e5), cacheSize: t2, tileInfoView: this._tileInfoView }), this._set("useProgressiveUpdate", e4), this.layerView.requestUpdate();
- }
- }
- update(e4) {
- this._fetchQueue.pause(), this._fetchQueue.state = e4.state, this._tileStrategy.update(e4), this._fetchQueue.resume();
- const { extent: t2, resolution: i5, scale: s6 } = e4.state, r6 = this._tileInfoView.getClosestInfoForScale(s6);
- if (this.layer.raster) {
- if (!this.useProgressiveUpdate || this._needBlockCacheUpdate) {
- const e5 = this._srcResolutions[r6.level], s7 = t2.toJSON ? t2 : M.fromJSON(t2);
- g3(this._blockCacheRegistryUrl, this._blockCacheRegistryId, s7, i5, e5, this.layer.raster.ioConfig.sampling);
- }
- this._needBlockCacheUpdate = false, this.previousLOD?.level !== r6.level && (this.previousLOD = r6, this._symbolizerParams == null || this.layerView.hasTilingEffects || this._updateSymbolizerParams(), this._tileStrategy.updateCacheSize(0));
- }
- }
- moveEnd() {
- !this.layerView.hasTilingEffects && this.useProgressiveUpdate || (this._abortController && this._abortController.abort(), this._abortController = new AbortController(), this._fetchQueue.length === 0 && this._redrawImage(this._abortController.signal).then(() => {
- this._globalUpdateRequested = false, this.layerView.requestUpdate();
- }));
- const e4 = this._getCacheSize(this.useProgressiveUpdate);
- this._tileStrategy.updateCacheSize(e4), this.layerView.requestUpdate();
- }
- get updating() {
- return this._fetchQueue?.updating || this._globalUpdateRequested || !(!this.updatingHandles || !this.updatingHandles.updating);
- }
- attach() {
- l3("2d").supportsTextureFloat || (this.useWebGLForProcessing = false), this._initializeTileInfo(), this._tileInfoView = new h2(this.layerView.tileInfo, this.layerView.fullExtent);
- const e4 = this._computeFetchConcurrency();
- this._fetchQueue = new p({ tileInfoView: this._tileInfoView, concurrency: e4, process: (e5, t3) => this._fetchTile1(e5, t3) });
- const t2 = this._getCacheSize(this.useProgressiveUpdate);
- this._tileStrategy = new r2({ cachePolicy: "purge", acquireTile: (e5) => this.acquireTile(e5), releaseTile: (e5) => this.releaseTile(e5), cacheSize: t2, tileInfoView: this._tileInfoView }), this._updateBlockCacheRegistry();
- }
- detach() {
- this._tileStrategy.destroy(), this._fetchQueue.clear(), this.container.removeAllChildren(), this._fetchQueue = this._tileStrategy = this._tileInfoView = null, u3(this._blockCacheRegistryUrl, this._blockCacheRegistryId), this._blockCacheRegistryUrl = this._blockCacheRegistryId = null;
- }
- acquireTile(e4) {
- const t2 = this.container.createTile(e4);
- return this._enqueueTileFetch(t2), this.layerView.requestUpdate(), this._needBlockCacheUpdate = true, this._globalUpdateRequested = this.layerView.hasTilingEffects || !this.useProgressiveUpdate, t2;
- }
- releaseTile(e4) {
- this._fetchQueue.abort(e4.key.id), this.container.removeChild(e4), e4.once("detach", () => {
- e4.destroy(), this.layerView.requestUpdate();
- }), this.layerView.requestUpdate();
- }
- createEmptyTilePixelBlock(e4 = null) {
- const t2 = e4 == null || e4.join(",") === this._tileInfoView.tileInfo.size.join(",");
- if (t2 && r(this._emptyTilePixelBlock))
- return this._emptyTilePixelBlock;
- e4 = e4 || this._tileInfoView.tileInfo.size;
- const [i5, r6] = e4, l5 = new u2({ width: i5, height: r6, pixels: [new Uint8Array(i5 * r6)], mask: new Uint8Array(i5 * r6), pixelType: "u8" });
- return t2 && (this._emptyTilePixelBlock = l5), l5;
- }
- _fetchTile1(e4, t2) {
- const i5 = r(t2) && t2.signal, l5 = this.canUseWebGLForProcessing(), { layerView: a } = this, o3 = !a.tileInfo.isWrappable && r(X(a.view.spatialReference)), h3 = { allowPartialFill: true, datumTransformation: a.datumTransformation, interpolation: l5 ? "nearest" : this.layer.interpolation, registryId: this._blockCacheRegistryId, requestRawData: l5, signal: e2(i5), srcResolution: this._srcResolutions[e4.level], timeExtent: a.timeExtent, tileInfo: a.tileInfo, disableWrapAround: o3 };
- return this.fetchTile(e4, h3);
- }
- _getCacheSize(e4) {
- return e4 ? 40 : 0;
- }
- _initializeTileInfo() {
- const e4 = this.layerView.view.spatialReference, t2 = new j({ x: this.layerView.fullExtent.xmin, y: this.layerView.fullExtent.ymax, spatialReference: e4 }), { scales: i5, srcResolutions: s6, isCustomTilingScheme: r6 } = ne(this.layer.rasterInfo, e4), l5 = S.create({ spatialReference: e4, size: 512, scales: i5 });
- (l5.origin.x === 0 || l5.origin.x > t2.x) && (l5.origin = t2), this._isCustomTilingScheme = r6, this.layerView.set("tileInfo", l5), this._srcResolutions = s6 ?? [];
- }
- _computeFetchConcurrency() {
- const { blockBoundary: e4 } = this.layer.rasterInfo.storageInfo, t2 = e4[e4.length - 1];
- return (t2.maxCol - t2.minCol + 1) * (t2.maxRow - t2.minRow + 1) > 64 ? 2 : 10;
- }
- async _enqueueTileFetch(e4, t2) {
- this.updatingHandles.addPromise(this._enqueueTileFetch1(e4, t2));
- }
- async _enqueueTileFetch1(e4, t2) {
- if (!this._fetchQueue.has(e4.key.id)) {
- try {
- const t3 = await this._fetchQueue.push(e4.key), { bandIds: s6 } = this.layer;
- let r6 = !this.useProgressiveUpdate || this.layerView.hasTilingEffects && !this._globalSymbolizerParams;
- if (this._globalUpdateRequested && !this.layerView.moving && this._fetchQueue.length === 0) {
- r6 = false;
- try {
- await this._redrawImage(this._abortController && this._abortController.signal);
- } catch (i5) {
- g(i5) && T2.error(i5);
- }
- this._globalUpdateRequested = false;
- }
- !this.canUseWebGLForProcessing() && this.type !== "rasterVF" || this.layerView.hasTilingEffects || this._symbolizerParams != null || this._updateSymbolizerParams();
- const l5 = this._tileInfoView.getTileCoords(R, e4.key), o3 = this._tileInfoView.getTileResolution(e4.key);
- await this.updateTileSource(e4, { source: t3, symbolizerParams: this._symbolizerParams, globalSymbolizerParams: this._globalSymbolizerParams, suspended: r6, bandIds: s6, coords: l5, resolution: o3 }), e4.once("attach", () => this.layerView.requestUpdate()), this.container.addChild(e4);
- } catch (i5) {
- g(i5) || T2.error(i5);
- }
- this.layerView.requestUpdate();
- }
- }
- async _redrawImage(e4) {
- if (this.container.children.length === 0)
- return;
- await this.layer.updateRenderer(), this.layerView.hasTilingEffects ? await this._updateGlobalSymbolizerParams(e4) : (this._updateSymbolizerParams(), this._globalSymbolizerParams = null);
- const t2 = this.container.children.map(async (e5) => this.updateTileSymbolizerParameters(e5, { local: this._symbolizerParams, global: this._globalSymbolizerParams }));
- await E(t2), this.container.requestRender();
- }
- async _updateGlobalSymbolizerParams(e4) {
- const t2 = { srcResolution: this._srcResolutions[this.previousLOD.level], registryId: this._blockCacheRegistryId, signal: e4 }, i5 = await this.layer.fetchPixels(this.layerView.view.extent, this.layerView.view.width, this.layerView.view.height, t2);
- if (!i5 || !i5.pixelBlock)
- return;
- const s6 = this.layer.symbolizer.generateWebGLParameters({ pixelBlock: l2(i5.pixelBlock, this.layer.bandIds), isGCS: this.layerView.view.spatialReference.isGeographic, resolution: { x: this.previousLOD.resolution, y: this.previousLOD.resolution }, bandIds: this.layer.bandIds });
- !this.canUseWebGLForProcessing() && s6 && s6.type === "stretch" && this.layer.renderer && this.layer.renderer.type === "raster-stretch" && (s6.factor = s6.factor.map((e5) => 255 * e5), s6.outMin = Math.round(255 * s6.outMin), s6.outMax = Math.round(255 * s6.outMax)), this._globalSymbolizerParams = s6;
- }
- _updateSymbolizerParams() {
- this._symbolizerParams = this.layer.symbolizer.generateWebGLParameters({ pixelBlock: null, isGCS: this.layerView.view.spatialReference.isGeographic, resolution: { x: this.previousLOD.resolution, y: this.previousLOD.resolution }, bandIds: this.layer.bandIds });
- }
- _updateBlockCacheRegistry(e4 = false) {
- const { url: t2, rasterInfo: i5, raster: s6 } = this.layer, { multidimensionalDefinition: r6 } = this.layer.normalizeRasterFetchOptions({ multidimensionalDefinition: this.layer.multidimensionalDefinition, timeExtent: this.layerView.timeExtent }), l5 = i5?.multidimensionalInfo ? s6.getSliceIndex(r6) : null, a = i2(t2, l5);
- if (a !== this._blockCacheRegistryUrl) {
- if (this._blockCacheRegistryUrl != null && u3(this._blockCacheRegistryUrl, this._blockCacheRegistryId), this._blockCacheRegistryId = s4(a, this.layer.raster.rasterInfo), e4) {
- const e5 = this._tileInfoView.getClosestInfoForScale(this.layerView.view.scale), t3 = this._srcResolutions[e5.level];
- g3(a, this._blockCacheRegistryId, this.layerView.view.extent, this.layerView.view.resolution, t3, this.layer.raster.ioConfig.sampling);
- }
- this._blockCacheRegistryUrl = a;
- }
- }
- async doRefresh() {
- await this.layer.updateRenderer(), this.layerView.hasTilingEffects || this._updateSymbolizerParams(), this._updateBlockCacheRegistry(true), this._fetchQueue.reset();
- const e4 = [];
- this._globalUpdateRequested = this.layerView.hasTilingEffects || !this.useProgressiveUpdate, this._tileStrategy.tiles.forEach((t2) => e4.push(this._enqueueTileFetch(t2))), await E(e4);
- }
- };
- e([d()], V.prototype, "_fetchQueue", void 0), e([d()], V.prototype, "_globalUpdateRequested", void 0), e([d()], V.prototype, "attached", void 0), e([d()], V.prototype, "container", void 0), e([d()], V.prototype, "layer", void 0), e([d()], V.prototype, "layerView", void 0), e([d()], V.prototype, "type", void 0), e([d()], V.prototype, "useWebGLForProcessing", null), e([d()], V.prototype, "useProgressiveUpdate", null), e([d()], V.prototype, "timeExtent", void 0), e([d()], V.prototype, "updating", null), V = e([n("esri.views.2d.layers.imagery.BaseImageryTileSubView2D")], V);
- // node_modules/@arcgis/core/views/2d/layers/imagery/ImageryTileView2D.js
- var l4 = class extends V {
- constructor() {
- super(...arguments), this.container = null, this.layer = null, this.type = "raster";
- }
- attach() {
- super.attach(), this.container = new n2(this._tileInfoView), this.container.isCustomTilingScheme = this._isCustomTilingScheme;
- }
- detach() {
- super.detach(), this.container.removeAllChildren(), this.container = null;
- }
- canUseWebGLForProcessing() {
- return this.useWebGLForProcessing && this.layer.symbolizer.canRenderInWebGL && !(this.layer.interpolation === "majority" && r4(this.layer));
- }
- fetchTile(e4, r6) {
- return this.layer.fetchTile(e4.level, e4.row, e4.col, r6);
- }
- async updateTileSource(e4, t2) {
- const { bandIds: s6 } = this.layer, i5 = this._getLayerInterpolation(), o3 = this.canUseWebGLForProcessing(), { source: a, globalSymbolizerParams: l5, suspended: n5, coords: c2, resolution: p3 } = t2, u5 = this.layerView.hasTilingEffects ? l5 : t2.symbolizerParams, { bitmap: m4 } = e4;
- if ([m4.x, m4.y] = c2, m4.resolution = p3, a && r(a) && r(a.pixelBlock)) {
- const e5 = { extent: a.extent, pixelBlock: a.pixelBlock };
- if (m4.rawPixelData = e5, o3)
- m4.source = a.pixelBlock, m4.isRendereredSource = false;
- else {
- const r6 = await this.layer.applyRenderer(e5, l5?.type === "stretch" ? l5 : null);
- m4.source = r6, m4.isRendereredSource = true;
- }
- m4.symbolizerParameters = o3 ? u5 : null, o3 ? m4.transformGrid || (m4.transformGrid = a.transformGrid) : m4.transformGrid = null;
- } else {
- const e5 = this.createEmptyTilePixelBlock();
- m4.source = e5, m4.symbolizerParameters = o3 ? u5 : null, m4.transformGrid = null;
- }
- m4.bandIds = o3 ? s6 : null, m4.width = this._tileInfoView.tileInfo.size[0], m4.height = this._tileInfoView.tileInfo.size[1], m4.interpolation = i5, m4.suspended = n5, m4.invalidateTexture();
- }
- async updateTileSymbolizerParameters(e4, t2) {
- const { local: s6, global: i5 } = t2, { bandIds: o3 } = this.layer, a = this._getLayerInterpolation(), l5 = this.canUseWebGLForProcessing(), { bitmap: n5 } = e4, { rawPixelData: c2 } = n5;
- !l5 && r(c2) ? (n5.source = await this.layer.applyRenderer(c2, i5?.type === "stretch" ? i5 : null), n5.isRendereredSource = true) : (n5.isRendereredSource && r(c2) && (n5.source = c2.pixelBlock), n5.isRendereredSource = false), n5.symbolizerParameters = l5 ? this.layerView.hasTilingEffects ? i5 : s6 : null, n5.bandIds = l5 ? o3 : null, n5.interpolation = a, n5.suspended = false;
- }
- _getLayerInterpolation() {
- const e4 = this.layer.renderer.type;
- if (e4 === "raster-colormap" || e4 === "unique-value" || e4 === "class-breaks")
- return "nearest";
- const { interpolation: r6 } = this.layer, { renderer: t2 } = this.layer;
- return t2.type === "raster-stretch" && t2.colorRamp != null ? r6 === "bilinear" || r6 === "cubic" ? "bilinear" : "nearest" : r6;
- }
- };
- e([d()], l4.prototype, "container", void 0), e([d()], l4.prototype, "layer", void 0), e([d()], l4.prototype, "type", void 0), l4 = e([n("esri.views.2d.layers.imagery.ImageryTileView2D")], l4);
- var n3 = l4;
- // node_modules/@arcgis/core/views/2d/engine/imagery/RasterVFTile.js
- var r5 = class extends r3 {
- constructor(t2, s6, e4, i5, r6, o3 = null) {
- super(t2, s6, e4, i5, r6), this.tileData = new y(o3), this.tileData.coordScale = [i5, r6], this.tileData.once("isReady", () => this.ready());
- }
- destroy() {
- super.destroy(), this.tileData.destroy(), this.tileData = null, this.stage = null;
- }
- set stencilRef(t2) {
- this.tileData.stencilRef = t2;
- }
- get stencilRef() {
- return this.tileData.stencilRef;
- }
- _createTransforms() {
- return { dvs: e3(), tileMat3: e3() };
- }
- setTransform(e4, a) {
- super.setTransform(e4, a);
- const i5 = a / (e4.resolution * e4.pixelRatio), r6 = this.transforms.tileMat3, [o3, l5] = this.tileData.offset, h3 = [this.x + o3 * a, this.y - l5 * a], [n5, f2] = e4.toScreenNoRotation([0, 0], h3), { symbolTileSize: m4 } = this.tileData.symbolizerParameters, c2 = Math.round((this.width - this.tileData.offset[0]) / m4) * m4, D = Math.round((this.height - this.tileData.offset[1]) / m4) * m4, d4 = c2 / this.rangeX * i5, u5 = D / this.rangeY * i5;
- s3(r6, d4, 0, 0, 0, u5, 0, n5, f2, 1), i(this.transforms.dvs, e4.displayViewMat3, r6), this.tileData.transforms.dvs = this.transforms.dvs;
- }
- onAttach() {
- this.tileData.stage = this.stage;
- }
- onDetach() {
- this.tileData.stage = null;
- }
- };
- // node_modules/@arcgis/core/views/2d/engine/imagery/RasterVFTileContainer.js
- var o2 = class extends o {
- constructor() {
- super(...arguments), this.isCustomTilingScheme = false, this.symbolTypes = ["triangle"];
- }
- createTile(s6) {
- const t2 = this._tileInfoView.getTileBounds(u(), s6), [i5, o3] = this._tileInfoView.tileInfo.size;
- return new r5(s6, t2[0], t2[3], i5, o3);
- }
- prepareRenderPasses(e4) {
- const r6 = e4.registerRenderPass({ name: "imagery (vf tile)", brushes: [m], target: () => this.children.map((e5) => e5.tileData), drawPhase: I.MAP });
- return [...super.prepareRenderPasses(e4), r6];
- }
- doRender(e4) {
- this.visible && e4.drawPhase === I.MAP && this.symbolTypes.forEach((s6) => {
- e4.renderPass = s6, super.doRender(e4);
- });
- }
- };
- // node_modules/@arcgis/core/views/2d/layers/imagery/VectorFieldTileView2D.js
- var c = class extends V {
- constructor() {
- super(...arguments), this._handle = null, this.container = null, this.layer = null, this.type = "rasterVF";
- }
- canUseWebGLForProcessing() {
- return false;
- }
- async fetchTile(e4, t2) {
- t2 = { ...t2, interpolation: "nearest", requestProjectedLocalDirections: true };
- const i5 = await this.layer.fetchTile(e4.level, e4.row, e4.col, t2);
- return this.layer.rasterInfo.dataType === "vector-magdir" && i5?.pixelBlock && (i5.pixelBlock = await this.layer.convertVectorFieldData(i5.pixelBlock, t2)), i5;
- }
- updateTileSource(e4, i5) {
- const r6 = i5.symbolizerParams, { tileData: o3 } = e4;
- o3.key = e4.key, o3.width = this._tileInfoView.tileInfo.size[0], o3.height = this._tileInfoView.tileInfo.size[1];
- const { symbolTileSize: s6 } = r6, { source: l5 } = i5;
- if (o3.offset = this._getTileSymbolOffset(o3.key, s6), r(l5) && r(l5.pixelBlock)) {
- const e5 = { extent: l5.extent, pixelBlock: l5.pixelBlock };
- o3.rawPixelData = e5, o3.symbolizerParameters = r6, o3.source = this._sampleVectorFieldData(l5.pixelBlock, r6, o3.offset);
- } else {
- const e5 = [Math.round((this._tileInfoView.tileInfo[0] - o3.offset[0]) / s6), Math.round((this._tileInfoView.tileInfo[1] - o3.offset[1]) / s6)], t2 = this.createEmptyTilePixelBlock(e5);
- o3.source = t2, o3.symbolizerParameters = r6;
- }
- return o3.invalidateVAO(), Promise.resolve(null);
- }
- updateTileSymbolizerParameters(e4, i5) {
- const r6 = i5.local, { symbolTileSize: o3 } = r6, { tileData: s6 } = e4;
- s6.offset = this._getTileSymbolOffset(s6.key, o3);
- const l5 = s6.symbolizerParameters.symbolTileSize;
- return s6.symbolizerParameters = r6, r(s6.rawPixelData?.pixelBlock) && l5 !== o3 && (s6.source = this._sampleVectorFieldData(s6.rawPixelData.pixelBlock, s6.symbolizerParameters, s6.offset)), Promise.resolve(null);
- }
- attach() {
- super.attach(), this.container = new o2(this._tileInfoView), this.container.isCustomTilingScheme = this._isCustomTilingScheme, this._updateSymbolType(this.layer.renderer), this._handle = l(() => this.layer.renderer, (e4) => this._updateSymbolType(e4));
- }
- detach() {
- super.detach(), this.container.removeAllChildren(), this._handle.remove(), this._handle = null;
- }
- _getTileSymbolOffset(e4, t2) {
- const i5 = e4.col * this._tileInfoView.tileInfo.size[0] % t2, r6 = e4.row * this._tileInfoView.tileInfo.size[1] % t2;
- return [i5 > t2 / 2 ? t2 - i5 : -i5, r6 > t2 / 2 ? t2 - r6 : -r6];
- }
- _sampleVectorFieldData(e4, t2, i5) {
- const { symbolTileSize: r6 } = t2;
- return F(e4, "vector-uv", r6, i5);
- }
- _updateSymbolType(e4) {
- e4.type === "vector-field" && (this.container.symbolTypes = e4.style === "wind-barb" ? ["scalar", "triangle"] : e4.style === "simple-scalar" ? ["scalar"] : ["triangle"]);
- }
- };
- e([d()], c.prototype, "container", void 0), e([d()], c.prototype, "layer", void 0), e([d()], c.prototype, "type", void 0), c = e([n("esri.views.2d.layers.imagery.VectorFieldTileView2D")], c);
- var n4 = c;
- // node_modules/@arcgis/core/views/layers/ImageryTileLayerView.js
- var m2 = (m4) => {
- let f2 = class extends m4 {
- constructor() {
- super(...arguments), this._rasterFieldPrefix = "Raster.", this.layer = null, this.view = null, this.tileInfo = null;
- }
- get fullExtent() {
- return this._getfullExtent();
- }
- _getfullExtent() {
- return this.projectFullExtent(this.view.spatialReference);
- }
- get hasTilingEffects() {
- return this.layer.renderer && "dynamicRangeAdjustment" in this.layer.renderer && this.layer.renderer.dynamicRangeAdjustment;
- }
- get datumTransformation() {
- return T(e2(this.layer.fullExtent), this.view.spatialReference, true);
- }
- supportsSpatialReference(t2) {
- return !!this.projectFullExtent(t2);
- }
- projectFullExtent(t2) {
- const e4 = e2(this.layer.fullExtent), r6 = T(e4, t2, false);
- return F2(e4, t2, r6);
- }
- async fetchPopupFeatures(t2, i5) {
- const { layer: s6 } = this;
- if (!t2)
- throw new s2("imageryTileLayerView:fetchPopupFeatures", "Nothing to fetch without area", { layer: s6 });
- const { popupEnabled: a } = s6, n5 = s5(s6, i5);
- if (!a || t(n5))
- throw new s2("imageryTileLayerView:fetchPopupFeatures", "Missing required popupTemplate or popupEnabled", { popupEnabled: a, popupTemplate: n5 });
- const l5 = [], { value: u5, magdirValue: m5 } = await s6.identify(t2, { timeExtent: this.timeExtent });
- let f3 = "";
- if (u5 && u5.length) {
- f3 = s6.type === "imagery-tile" && s6.hasStandardTime() && u5[0] != null ? u5.map((t4) => s6.getStandardTimeValue(t4)).join(", ") : u5.join(", ");
- const t3 = { ObjectId: 0 }, r6 = "Raster.ServicePixelValue";
- t3[r6] = this._formatAttributeValue(f3, r6);
- const i6 = s6.rasterInfo?.attributeTable?.features;
- if (i6 && i6.length > 0) {
- const e4 = i6.filter((t4) => {
- const e5 = t4.attributes.value || t4.attributes.Value || t4.attributes.VALUE;
- return String(e5) === f3;
- });
- if (e4.length > 0) {
- const r7 = e4[0];
- if (r7) {
- for (const e5 in r7.attributes)
- if (r7.attributes.hasOwnProperty(e5)) {
- const i7 = this._rasterFieldPrefix + e5;
- t3[i7] = this._formatAttributeValue(r7.attributes[e5], i7);
- }
- }
- }
- }
- const o3 = s6.rasterInfo.dataType;
- o3 !== "vector-magdir" && o3 !== "vector-uv" || (t3["Raster.Magnitude"] = m5?.[0], t3["Raster.Direction"] = m5?.[1]);
- const a2 = new g4(this.fullExtent.clone(), null, t3);
- a2.layer = s6, a2.sourceLayer = a2.layer, l5.push(a2);
- }
- return l5;
- }
- _formatAttributeValue(t2, e4) {
- if (typeof t2 == "string") {
- const r6 = this.layer.popupTemplate && this.layer.popupTemplate.fieldInfos, i5 = this._getFieldInfo(r6, e4), o3 = i5 && i5.format;
- if (o3) {
- let e5, r7;
- return t2.trim().includes(",") ? (e5 = ",", r7 = e5 + " ", this._formatDelimitedString(t2, e5, r7, o3)) : t2.trim().includes(" ") ? (e5 = r7 = " ", this._formatDelimitedString(t2, e5, r7, o3)) : this._formatNumberFromString(t2, o3);
- }
- }
- return t2;
- }
- _getFieldInfo(t2, e4) {
- if (!t2 || !t2.length || !e4)
- return;
- const r6 = e4.toLowerCase();
- let i5;
- return t2.some((t3) => !(!t3.fieldName || t3.fieldName.toLowerCase() !== r6 && t3.fieldName.toLowerCase() !== r6.replace(/ /g, "_")) && (i5 = t3, true)), i5;
- }
- _formatDelimitedString(t2, e4, r6, i5) {
- return t2 && e4 && r6 && i5 ? t2.trim().split(e4).map((t3) => this._formatNumberFromString(t3, i5)).join(r6) : t2;
- }
- _formatNumberFromString(t2, e4) {
- if (!t2 || !e4)
- return t2;
- const r6 = Number(t2);
- return isNaN(r6) ? t2 : e4.format(r6);
- }
- };
- return e([d()], f2.prototype, "layer", void 0), e([d(g2)], f2.prototype, "timeExtent", void 0), e([d()], f2.prototype, "view", void 0), e([d()], f2.prototype, "fullExtent", null), e([d()], f2.prototype, "tileInfo", void 0), e([d({ readOnly: true })], f2.prototype, "hasTilingEffects", null), f2 = e([n("esri.views.layers.ImageryTileLayerView")], f2), f2;
- };
- // node_modules/@arcgis/core/views/2d/layers/ImageryTileLayerView2D.js
- var m3 = s.getLogger("esri.views.2d.layers.ImageryTileLayerView2D");
- var y2 = class extends m2(i3(f(u4))) {
- constructor() {
- super(...arguments), this._useWebGLForProcessing = true, this._useProgressiveUpdate = true, this.subview = null;
- }
- get useWebGLForProcessing() {
- return this._useWebGLForProcessing;
- }
- set useWebGLForProcessing(e4) {
- this._useWebGLForProcessing = e4, this.subview && "useWebGLForProcessing" in this.subview && (this.subview.useWebGLForProcessing = e4);
- }
- get useProgressiveUpdate() {
- return this._useWebGLForProcessing;
- }
- set useProgressiveUpdate(e4) {
- this._useProgressiveUpdate = e4, this.subview && "useProgressiveUpdate" in this.subview && (this.subview.useProgressiveUpdate = e4);
- }
- update(e4) {
- this.subview.update(e4), this.notifyChange("updating");
- }
- isUpdating() {
- return !this.subview || this.subview.updating;
- }
- attach() {
- this.layer.increaseRasterJobHandlerUsage(), this._updateSubview(), this.handles.add([l(() => {
- const { layer: e4 } = this;
- return { bandIds: e4.bandIds, renderer: e4.renderer, interpolation: e4.interpolation, multidimensionalDefinition: e4.multidimensionalDefinition };
- }, (e4, s6) => {
- const i5 = e4.interpolation !== s6.interpolation && (e4.interpolation === "majority" || s6.interpolation === "majority") && r4(this.layer), r6 = e4.renderer !== s6.renderer && s6.renderer?.type !== e4.renderer?.type;
- r6 && this._updateSubview();
- const o3 = e4.multidimensionalDefinition !== s6.multidimensionalDefinition || i5 || r6;
- this.subview.redrawOrRefetch(o3).catch((e5) => {
- g(e5) || m3.error(e5);
- }), this.notifyChange("updating");
- }), l(() => this.layer.blendMode ?? "normal", (e4) => {
- this.subview.container.blendMode = e4;
- }, w), l(() => this.layer.effect ?? null, (e4) => {
- this.subview.container.effect = e4;
- }, w), l(() => this.timeExtent, () => {
- this.subview.timeExtent = this.timeExtent, this.subview.redrawOrRefetch(true).catch((e4) => {
- g(e4) || m3.error(e4);
- });
- }, h)], "attach");
- }
- detach() {
- this.handles.remove("attach"), this.layer.decreaseRasterJobHandlerUsage(), this._detachSubview(this.subview), this.subview?.destroy(), this.subview = null;
- }
- moveStart() {
- this.requestUpdate();
- }
- viewChange() {
- this.requestUpdate();
- }
- moveEnd() {
- this.subview.moveEnd();
- }
- async hitTest(e4, i5) {
- return [{ type: "graphic", layer: this.layer, mapPoint: e4, graphic: new g4({ attributes: {}, geometry: e4.clone() }) }];
- }
- doRefresh() {
- return this.subview.doRefresh();
- }
- _updateSubview() {
- const e4 = this.layer.renderer.type === "vector-field" ? "rasterVF" : this.layer.renderer.type === "flow" ? "flow" : "raster";
- if (this.subview) {
- if (this.subview.type === e4)
- return void this._attachSubview(this.subview);
- this._detachSubview(this.subview), this.subview?.destroy(), this.subview = null;
- }
- const { layer: s6 } = this;
- let i5;
- i5 = e4 === "rasterVF" ? new n4({ layer: s6, layerView: this }) : e4 === "flow" ? new d3({ layer: s6, layerView: this }) : new n3({ layer: s6, layerView: this }), "useWebGLForProcessing" in i5 && (i5.useWebGLForProcessing = this._useWebGLForProcessing), "useProgressiveUpdate" in i5 && (i5.useProgressiveUpdate = this._useProgressiveUpdate), "previousLOD" in i5 && (i5.previousLOD = this.subview && "previousLOD" in this.subview && this.subview.previousLOD), this._attachSubview(i5), this.subview = i5, this.requestUpdate();
- }
- _attachSubview(e4) {
- e4 && !e4.attached && (e4.attach(), e4.attached = true, this.container.addChildAt(e4.container, 0), e4.container.blendMode = this.layer.blendMode, e4.container.effect = this.layer.effect);
- }
- _detachSubview(e4) {
- e4?.attached && (this.container.removeChild(e4.container), e4.detach(), e4.attached = false);
- }
- };
- e([d()], y2.prototype, "subview", void 0), e([d()], y2.prototype, "useWebGLForProcessing", null), e([d()], y2.prototype, "useProgressiveUpdate", null), y2 = e([n("esri.views.2d.layers.ImageryTileLayerView2D")], y2);
- var g5 = y2;
- export {
- g5 as default
- };
- //# sourceMappingURL=ImageryTileLayerView2D-D6NZZS4Z.js.map
|