@arcgis/core 4.23.0-next.20220124 → 4.23.0-next.20220126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Graphic.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00c5bb5eecb0e89266df.js +1 -0
- package/assets/esri/core/workers/chunks/021a37e2b191298e80b7.js +1 -0
- package/assets/esri/core/workers/chunks/1370c92c40fd6271553c.js +1 -0
- package/assets/esri/core/workers/chunks/1fbcc8424452d0256bd6.js +1 -0
- package/assets/esri/core/workers/chunks/{fe864d01e72aa24574b6.js → 23b15e7c2f96d260e16c.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2ae5fc4f787ea568b88.js → 2460f3b6ada6ae900dec.js} +1 -1
- package/assets/esri/core/workers/chunks/2792ca40f1e92849247c.js +1 -0
- package/assets/esri/core/workers/chunks/2a96f1bba9ce6883e5e0.js +1 -0
- package/assets/esri/core/workers/chunks/2e899ef5881b4ec6fa55.js +1 -0
- package/assets/esri/core/workers/chunks/3231ee3e090bb4cac3fc.js +1 -0
- package/assets/esri/core/workers/chunks/{0c3e3a5baf54bd5e210c.js → 36e250278b5622ccf068.js} +1 -1
- package/assets/esri/core/workers/chunks/395ba088d4864588ff66.js +1 -0
- package/assets/esri/core/workers/chunks/3cc77692b2eee27b9c9e.js +1 -0
- package/assets/esri/core/workers/chunks/3f343f792fd9f44d6f25.js +1 -0
- package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +1 -0
- package/assets/esri/core/workers/chunks/{625d2663daa8e0cf64b0.js → 434b16731c6a81f868ef.js} +1 -1
- package/assets/esri/core/workers/chunks/4385a268c2a64281d1c1.js +1 -0
- package/assets/esri/core/workers/chunks/{44b01d42d4ec72913229.js → 438f0b5ae5c53ae4f06a.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d539878bfbd7c549e60.js → 46b4bb66a54bbd8e2e57.js} +1 -1
- package/assets/esri/core/workers/chunks/4c76146014dc15143ba3.js +1 -0
- package/assets/esri/core/workers/chunks/5d991b74d958005c26c4.js +1 -0
- package/assets/esri/core/workers/chunks/5dfe1f8d520025e2118b.js +1 -0
- package/assets/esri/core/workers/chunks/601e697dc7414bda128a.js +1 -0
- package/assets/esri/core/workers/chunks/{9cdaba126ac7fa5f33f0.js → 6cd5e4380d29b9a3c344.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7b1b75643ed31489495.js → 6f50a9647f026a8d4729.js} +1 -1
- package/assets/esri/core/workers/chunks/7d661129a0d8c466eeec.js +1 -0
- package/assets/esri/core/workers/chunks/{64276aacaafa4c8a15bd.js → 7dcf52d3db3903c8eb9f.js} +1 -1
- package/assets/esri/core/workers/chunks/8070972c0efb78523b68.js +1 -0
- package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +1 -0
- package/assets/esri/core/workers/chunks/97a28641b3b2fd31bea2.js +1 -0
- package/assets/esri/core/workers/chunks/{d1454155ee1b8a421cbb.js → 97ec9eef0048760fa260.js} +1 -1
- package/assets/esri/core/workers/chunks/98986e6601b0366376b4.js +1 -0
- package/assets/esri/core/workers/chunks/9cdcf9309d6feda70185.js +1 -0
- package/assets/esri/core/workers/chunks/aa04b90b82bf70caaae4.js +1 -0
- package/assets/esri/core/workers/chunks/aace7e1fef256bb961c9.js +1 -0
- package/assets/esri/core/workers/chunks/{c080114a69fa95b88d22.js → af5694b4d278cf1db2d9.js} +1 -1
- package/assets/esri/core/workers/chunks/afbb4f802ca5774f0326.js +1 -0
- package/assets/esri/core/workers/chunks/b2c5f92e3d7606297ca9.js +1 -0
- package/assets/esri/core/workers/chunks/b2d2de935487257c568b.js +1 -0
- package/assets/esri/core/workers/chunks/b2ebe4f6d100e15b512d.js +1 -0
- package/assets/esri/core/workers/chunks/b8316c6469a543029bc6.js +1 -0
- package/assets/esri/core/workers/chunks/{4c9084a04948b6924749.js → ba5eb394f098968c22d2.js} +1 -1
- package/assets/esri/core/workers/chunks/bf0a65b4be31959f921d.js +1 -0
- package/assets/esri/core/workers/chunks/c890c7fca27170e3341f.js +1 -0
- package/assets/esri/core/workers/chunks/c976785f2391c77d8a30.js +1 -0
- package/assets/esri/core/workers/chunks/{d39b7983b68d6e5b404d.js → cdbc005eebec1503b99d.js} +1 -1
- package/assets/esri/core/workers/chunks/e4b84ca8ddfd48dd79b1.js +1 -0
- package/assets/esri/core/workers/chunks/e4e2036373166c1d5cf5.js +1 -0
- package/assets/esri/core/workers/chunks/e4f93c55eaefab4192b5.js +1 -0
- package/assets/esri/core/workers/chunks/e6165e17fbb07bfc40a1.js +1 -0
- package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +1 -0
- package/assets/esri/core/workers/chunks/{f678293de9a6d8f5b5db.js → ec89466f76d0ba22525e.js} +1 -1
- package/assets/esri/core/workers/chunks/ee45618c45806ab654cb.js +1 -0
- package/assets/esri/core/workers/chunks/f4baa5ea2e42b1317941.js +1 -0
- package/assets/esri/core/workers/chunks/f760a3e030b0f358a92a.js +1 -0
- package/assets/esri/core/workers/chunks/face43cf5abcd2f5bd9d.js +1 -0
- package/assets/esri/themes/base/_mixins.scss +4 -1
- package/assets/esri/themes/base/icons/style.scss +11 -2
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +13 -10
- package/assets/esri/themes/base/widgets/_CoordinateConversion.scss +4 -2
- package/assets/esri/themes/base/widgets/_Directions.scss +5 -3
- package/assets/esri/themes/base/widgets/_Editor.scss +5 -2
- package/assets/esri/themes/base/widgets/_ElevationProfile.scss +6 -4
- package/assets/esri/themes/base/widgets/_ItemList.scss +1 -1
- package/assets/esri/themes/base/widgets/_LayerList.scss +13 -9
- package/assets/esri/themes/base/widgets/_Popup.scss +4 -2
- package/assets/esri/themes/base/widgets/_Print.scss +24 -11
- package/assets/esri/themes/base/widgets/_Search.scss +4 -2
- package/assets/esri/themes/base/widgets/_TableList.scss +9 -7
- package/assets/esri/themes/base/widgets/_Weather.scss +12 -0
- package/assets/esri/themes/base/widgets/_Widget.scss +18 -9
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark-blue/main.css +1 -1
- package/assets/esri/themes/dark-green/main.css +1 -1
- package/assets/esri/themes/dark-purple/main.css +1 -1
- package/assets/esri/themes/dark-red/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/themes/light-blue/main.css +1 -1
- package/assets/esri/themes/light-green/main.css +1 -1
- package/assets/esri/themes/light-purple/main.css +1 -1
- package/assets/esri/themes/light-red/main.css +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
- package/chunks/ComponentShader.glsl.js +19 -19
- package/chunks/Terrain.glsl.js +11 -11
- package/chunks/WaterSurface.glsl.js +21 -21
- package/chunks/pe.js +1 -1
- package/chunks/vec3.js +1 -1
- package/core/accessorSupport/read.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/geometry/pe.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/interfaces.d.ts +36 -2
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/package.json +2 -2
- package/popup/content/AttachmentsContent.js +1 -1
- package/popup/content/support/mediaInfoTypes.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/LabelSymbol3D.js +1 -1
- package/symbols/PointSymbol3D.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/Symbol3DVerticalOffset.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/previewWebStyleSymbol.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/symbols.js +1 -1
- package/views/2d/engine/webgl/brushes/raster/BrushRasterBitmap.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/environment/weather.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +21 -13
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/FeatureForm/InputField.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Slider/SliderViewModel.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/widgets/support/InteractiveToolViewModel.js +1 -1
- package/assets/components/assets/calcite-icon/checkSquareF16.json +0 -1
- package/assets/components/assets/calcite-icon/checkSquareF24.json +0 -1
- package/assets/components/assets/calcite-icon/checkSquareF32.json +0 -1
- package/assets/components/assets/calcite-icon/lineSolid4.json +0 -1
- package/assets/components/assets/calcite-icon/squareF16.json +0 -1
- package/assets/components/assets/calcite-icon/squareF24.json +0 -1
- package/assets/components/assets/calcite-icon/squareF32.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon16.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon24.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon32.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF16.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF24.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF32.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF16.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF24.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF32.json +0 -1
- package/assets/esri/core/workers/chunks/09da224052976e290828.js +0 -1
- package/assets/esri/core/workers/chunks/0bf079e752ab79468478.js +0 -1
- package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +0 -1
- package/assets/esri/core/workers/chunks/23745a5ab47c840dc452.js +0 -1
- package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +0 -1
- package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +0 -1
- package/assets/esri/core/workers/chunks/32f8c4af7e70ebdcb19e.js +0 -1
- package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +0 -1
- package/assets/esri/core/workers/chunks/3a9740dccda6a733313c.js +0 -1
- package/assets/esri/core/workers/chunks/43cdff2418325e163420.js +0 -1
- package/assets/esri/core/workers/chunks/5538639a49c7cc2eca63.js +0 -1
- package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +0 -1
- package/assets/esri/core/workers/chunks/67162b3e2cc1b5dc6818.js +0 -1
- package/assets/esri/core/workers/chunks/739e579150bf466d43ae.js +0 -1
- package/assets/esri/core/workers/chunks/74df1f3e1e2e524a89d2.js +0 -1
- package/assets/esri/core/workers/chunks/76eef4799f6c5fff7e2d.js +0 -1
- package/assets/esri/core/workers/chunks/7baf6b1f3f050aa67ae4.js +0 -1
- package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +0 -1
- package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +0 -1
- package/assets/esri/core/workers/chunks/9cb2ae42a8e328b1d98d.js +0 -1
- package/assets/esri/core/workers/chunks/9d3c58a0ef634d95b7bd.js +0 -1
- package/assets/esri/core/workers/chunks/a6ff3db3493543df81bc.js +0 -1
- package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +0 -1
- package/assets/esri/core/workers/chunks/a96afc176041f698c7a1.js +0 -1
- package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +0 -1
- package/assets/esri/core/workers/chunks/afa6912454f2a5ffadce.js +0 -1
- package/assets/esri/core/workers/chunks/b2beb6e1fd2ee6503830.js +0 -1
- package/assets/esri/core/workers/chunks/bab1cfd0a901181622af.js +0 -1
- package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +0 -1
- package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +0 -1
- package/assets/esri/core/workers/chunks/c6bd943fe8fd13bb4806.js +0 -1
- package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +0 -1
- package/assets/esri/core/workers/chunks/cd7d83d127e085d52584.js +0 -1
- package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +0 -1
- package/assets/esri/core/workers/chunks/da1c2873bdbc0956dca0.js +0 -1
- package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +0 -1
- package/assets/esri/core/workers/chunks/e079cb1d53aca15b7df2.js +0 -1
- package/assets/esri/core/workers/chunks/e6df9839b551569fbc62.js +0 -1
- package/assets/esri/core/workers/chunks/e97e986120aaadad7d4c.js +0 -1
- package/assets/esri/core/workers/chunks/f8e7755240a94b499e1f.js +0 -1
- package/assets/esri/core/workers/chunks/fd3e5d823dc7917f4b8f.js +0 -1
- package/views/3d/layers/graphics/IGraphics3DFeatureProcessor.js +0 -4
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7622,6006],{3920:(e,t,r)=>{r.d(t,{r:()=>u,p:()=>c});var n=r(43697),i=r(15923),s=r(61247),a=r(5600),o=r(52011),l=r(89749);const c=e=>{let t=class extends e{destroy(){var e,t;this.destroyed||(null==(e=this._get("handles"))||e.destroy(),null==(t=this._get("updatingHandles"))||t.destroy())}get handles(){return this._get("handles")||new s.Z}get updatingHandles(){return this._get("updatingHandles")||new l.t}};return(0,n._)([(0,a.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,n._)([(0,a.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,n._)([(0,o.j)("esri.core.HandleOwner")],t),t};let u=class extends(c(i.Z)){};u=(0,n._)([(0,o.j)("esri.core.HandleOwner")],u)},78346:(e,t,r)=>{r.d(t,{bA:()=>A});var n=r(20102),i=r(80442),s=r(95330),a=r(80903),o=r(25045),l=r(40330),c=r(92604),u=r(94362),f=r(99880),h=r(68773),d=(r(2587),r(17452));const p={};function m(e){var t;const r={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(r.async=!0),e.hasOwnProperty("isDebug")||(r.isDebug=!1),e.baseUrl||(r.baseUrl=p.baseUrl),null==(t=p.packages)||t.forEach((e=>{!function(e,t){for(const r of e)if(r.name===t.name)return;e.push(t)}(r.packages,e)})),r}var y=r(41213);class g{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class x{constructor(){this._dispatcher=new g,this._workerPostMessage({type:u.Cs.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,y.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,y.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,u.QM)(e);if(t&&t.type===u.Cs.OPEN){const{modulePath:e,jobId:r}=t;let n=await o.default.loadWorker(e);n||(n=await import(e));const i=o.default.connect(n);this._workerPostMessage({type:u.Cs.OPENED,jobId:r,data:i})}}}var w=r(70171),v=r(17202);const b=c.Z.getLogger("esri.core.workers"),{HANDSHAKE:I}=u.Cs;let _,C;const R="Failed to create Worker. Fallback to execute module in main thread";async function S(e){return new Promise((t=>{function r(i){const s=(0,u.QM)(i);s&&s.type===I&&(e.removeEventListener("message",r),e.removeEventListener("error",n),t(e))}function n(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",n),b.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new x).addEventListener("message",r),e.addEventListener("error",n)}e.addEventListener("message",r),e.addEventListener("error",n)}))}let k=0;const T=c.Z.getLogger("esri.core.workers"),{ABORT:M,INVOKE:P,OPEN:O,OPENED:F,RESPONSE:E}=u.Cs;class Z{constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),T.error(e)}))}static async create(e){const t=await async function(){if(!(0,i.Z)("esri-workers")||((0,i.Z)("mozilla"),0))return S(new x);if(!_&&!C)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.replace('"{CONFIGURATION}"',`'${function(){let e;if(null!=h.Z.default){const t={...h.Z};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(h.Z));e.assetsPath=(0,d.hF)(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,w.Kd)(),e.has={"esri-csp-restrictions":(0,i.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.Z)("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":(0,i.Z)("esri-2d-query-centroid-enabled"),"featurelayer-pbf":(0,i.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,i.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,i.Z)("esri-atomics"),"esri-shared-array-buffer":(0,i.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.Z)("esri-workers-arraybuffer-transfer"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,d.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,d.hF)(e.workers.workerPath):e.workers.workerPath=(0,d.hF)((0,f.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=h.Z.workers.loaderConfig,r=m({baseUrl:null==t?void 0:t.baseUrl,locale:(0,w.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...null==t?void 0:t.has},map:{...null==t?void 0:t.map},paths:{...null==t?void 0:t.paths},packages:(null==t?void 0:t.packages)||[]}),n={version:l.i8,buildDate:v.r,revision:v.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:n})}()}'`);_=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){C=e||{}}let e;if(_)try{e=new Worker(_,{name:"esri-worker-"+k++})}catch(t){b.warn(R,C),e=new x}else b.warn(R,C),e=new x;return S(e)}();return new Z(t,e)}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,n=(0,u.jt)();return new Promise(((t,i)=>{const a={resolve:t,reject:i,abortHandle:(0,s.$F)(r,(()=>{this._outJobs.delete(n),this._post({type:M,jobId:n})}))};this._outJobs.set(n,a),this._post({type:O,jobId:n,modulePath:e})}))}_onMessage(e){const t=(0,u.QM)(e);if(t)switch(t.type){case F:this._onOpenedMessage(t);break;case E:this._onResponseMessage(t);break;case M:this._onAbortMessage(t);break;case P:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);n&&(n.controller&&n.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:i}=e,a=i?new AbortController:null,o=this._inJobs,c=l.Nv[t];let f;try{if("function"!=typeof c)throw new TypeError(`${t} is not a function`);f=c.call(null,n,{signal:a?a.signal:null})}catch(e){return void this._post({type:E,jobId:r,error:(0,u.AB)(e)})}(0,s.y8)(f)?(o.set(r,{controller:a,promise:f}),f.then((e=>{o.has(r)&&(o.delete(r),this._post({type:E,jobId:r},e))}),(e=>{o.has(r)&&(o.delete(r),e||(e={message:"Error encountered at method"+t}),(0,s.D_)(e)||this._post({type:E,jobId:r,error:(0,u.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:E,jobId:r},f)}_onOpenedMessage(e){var t;const{jobId:r,data:n}=e,i=this._outJobs.get(r);i&&(this._outJobs.delete(r),null==(t=i.abortHandle)||t.remove(),i.resolve(n))}_onResponseMessage(e){var t;const{jobId:r,error:i,data:s}=e,a=this._outJobs.get(r);a&&(this._outJobs.delete(r),null==(t=a.abortHandle)||t.remove(),i?a.reject(n.Z.fromJSON(JSON.parse(i))):a.resolve(s))}_post(e,t,r){return(0,u.oi)(this.worker,e,t,r)}}let N=(0,i.Z)("esri-workers-debug")?1:(0,i.Z)("host-browser")?navigator.hardwareConcurrency-1:0;N||(N=(0,i.Z)("safari")&&(0,i.Z)("mac")||(0,i.Z)("trident")?7:2);let B=0;const D=[];async function z(e,t){const r=new a.Z;return await r.open(e,t),r}async function A(e,t={}){if("string"!=typeof e)throw new n.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.Z)("host-webworker")&&!(0,i.Z)("esri-workers")&&(r="local"),"local"===r){let r=await o.default.loadWorker(e);r||(r=await import(e)),(0,s.k_)(t.signal);const n=t.client||r;return z([o.default.connect(r)],{...t,client:n})}if(await async function(){if(L)return L;H=new AbortController;const e=[];for(let t=0;t<N;t++){const r=Z.create(t).then((e=>(D[t]=e,e)));e.push(r)}return L=Promise.all(e),L}(),(0,s.k_)(t.signal),"dedicated"===r){const r=B++%N;return z([await D[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,N);if(r<N){const n=new Array(r);for(let i=0;i<r;++i){const r=B++%N;n[i]=D[r].open(e,t)}return z(n,t)}}return z(D.map((r=>r.open(e,t))),t)}let H,L=null},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var n=r(94443),i=r(3172),s=r(20102),a=r(70586);async function o(e){if((0,a.pC)(c.fetchBundleAsset))return c.fetchBundleAsset(e);const t=await(0,i.default)(e,{responseType:"text"});return JSON.parse(t.data)}class l{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let n;n="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=n,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,i){const a=t.exec(r);if(!a)throw new s.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",c=a[2],u=(0,n.Su)(i),f=`${l}${c}.json`,h=u?`${l}${c}_${u}.json`:f;let d;try{d=await o(e(h))}catch(t){if(h===f)throw new s.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{d=await o(e(f))}catch(e){throw new s.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return d}(this.getAssetUrl,this.matcher,e,t)}}const c={};var u,f=r(99880);(0,n.tz)((u={pattern:"esri/",location:f.V},new l(u)))},94443:(e,t,r)=>{r.d(t,{ME:()=>d,Su:()=>p,tz:()=>h});var n=r(20102),i=r(95330),s=r(70171);const a=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,o={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function l(e){var t;return null!=(t=o[e])&&t}const c=[],u=new Map;function f(e){for(const t of u.keys())m(e.pattern,t)&&u.delete(t)}function h(e){return c.includes(e)||(f(e),c.unshift(e)),{remove(){const t=c.indexOf(e);t>-1&&(c.splice(t,1),f(e))}}}async function d(e){const t=(0,s.Kd)();u.has(e)||u.set(e,async function(e,t){const r=[];for(const n of c)if(m(n.pattern,e))try{return await n.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new n.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new n.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=u.get(e);return await y.add(r),r}function p(e){if(!a.test(e))return null;const[,t,r]=a.exec(e),n=t+(r?"-"+r.toUpperCase():"");return l(n)?n:l(t)?t:null}function m(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,s.Ze)((()=>{u.clear()}));const y=new class{constructor(){this._numLoading=0}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,i.dD)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},940:(e,t,r)=>{r.d(t,{n:()=>c});var n=r(92604),i=r(78286),s=r(19153),a=r(90344),o=r(18848);const l=n.Z.getLogger("esri.intl");function c(e,t,r={}){const{format:n={}}=r;return(0,s.gx)(e,(e=>function(e,t,r){let n,s;const a=e.indexOf(":");if(-1===a?n=e.trim():(n=e.slice(0,a).trim(),s=e.slice(a+1).trim()),!n)return"";const o=(0,i.hS)(n,t);if(null==o)return"";const l=r[s]||r[n];return l?u(o,l):s?f(o,s):h(o)}(e,t,n)))}function u(e,t){switch(t.type){case"date":return(0,a.p6)(e,t.intlOptions);case"number":return(0,o.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),h(e)}}function f(e,t){switch(t.toLowerCase()){case"dateformat":return(0,a.p6)(e);case"numberformat":return(0,o.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,a.p6)(e):/^numberformat/i.test(t)?(0,o.uf)(e):h(e)}}function h(e){switch(typeof e){case"string":return e;case"number":return(0,o.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,a.p6)(e):""}}},52294:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ve});var n=r(43697),i=r(51773),s=r(14746),a=r(20102),o=r(70586),l=r(16453),c=r(95330),u=r(5600),f=(r(67676),r(80442),r(75215)),h=r(36030),d=r(71715),p=r(52011),m=r(29600),y=r(71612),g=r(17017),x=(r(66577),r(3172)),w=r(92604),v=r(44422),b=r(8744),I=r(66677),_=r(21506),C=r(35956),R=r(88281),S=r(11145),k=r(80676),T=r(67058),M=r(91219),P=r(23808),O=r(6570),F=r(82971);const E=w.Z.getLogger("esri.layers.mixins.ImageryTileMixin"),Z=e=>{let t=class extends e{constructor(){super(...arguments),this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this.bandIds=null,this.copyright=null,this.fullExtent=null,this.interpolation="nearest",this.multidimensionalDefinition=null,this.raster=null,this.rasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.tileInfo=null,this.symbolizer=null}set url(e){this._set("url",(0,I.Nm)(e,E))}set renderer(e){this._set("renderer",e),this.updateRenderer()}async convertVectorFieldData(e,t){if((0,o.Wi)(e))return null;const r=this._rasterJobHandler.instance,n=this.rasterInfo.dataType;return r?r.convertVectorFieldData({pixelBlock:e,dataType:n},t):(0,k.KC)(e,n)}async createStreamlinesMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createStreamlinesMesh(e,t):(0,P.z_)(e.rendererSettings,e.flowData,(0,o.pC)(t.signal)?t.signal:(new AbortController).signal)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.rasterInfo;if((0,o.Wi)(t))return e;let r=e.multidimensionalDefinition||this.multidimensionalDefinition;!(0,o.Wi)(r)&&r.length||(r=this._getDefaultSlice());const n=e.timeExtent||this.timeExtent;if((0,o.pC)(r)&&(0,o.pC)(n)&&((0,o.pC)(n.start)||(0,o.pC)(n.end))){var i,s;r=r.map((e=>e.clone()));const a=null==(i=t.variables.find((({name:e})=>e===r[0].variableName)))||null==(s=i.dimensions)?void 0:s.find((({name:e})=>"StdTime"===e)),l=r.find((({dimensionName:e})=>"StdTime"===e));if(!a||!l)return{...e,multidimensionalDefinition:null};const{start:c,end:u}=n,f=(0,o.Wi)(c)?null:c.getTime(),h=(0,o.Wi)(u)?null:u.getTime(),d=null!=f?f:h,p=null!=h?h:f;if((0,o.pC)(a.values)){const e=a.values.filter((e=>{if(Array.isArray(e)){if(d===p)return e[0]<=d&&e[1]>=d;const t=e[0]<=d&&e[1]>d||e[0]<p&&e[1]>=p,r=e[0]>=d&&e[1]<=p||e[0]<d&&e[1]>p;return t||r}return d===p?e===d:e>=d&&e<=p}));if(e.length){const t=e.sort(((e,t)=>{var r,n,i,s;return d===p?(null!=(i=e[0])?i:e)-(null!=(s=t[0])?s:t):Math.abs((null!=(r=e[1])?r:e)-p)-Math.abs((null!=(n=t[1])?n:t)-p)}))[0];l.values=[t]}else r=null}else if(a.hasRegularIntervals&&a.extent){const[e,t]=a.extent;d>t||p<e?r=null:l.values=d===p?[d]:[Math.max(e,d),Math.min(t,p)]}}return{...e,multidimensionalDefinition:r}}async updateRenderer(){if(!this.loaded)return;if(JSON.stringify(this._cachedRendererJson)===JSON.stringify(this.renderer))return;const e=this._rasterJobHandler.instance;e&&(this.symbolizer.rendererJSON=(0,T.ol)(this.renderer.toJSON()),this.symbolizer.bind(),await e.updateSymbolizer(this.symbolizer),this._cachedRendererJson=this.renderer.toJSON())}async applyRenderer(e,t){const r=e&&e.pixelBlock;if(!((0,o.pC)(r)&&r.pixels&&r.pixels.length>0))return null;let n;await this.updateRenderer();const i=this._rasterJobHandler.instance,{bandIds:s}=this;return n=i?await i.symbolize({...e,simpleStretchParams:t,bandIds:s}):this.symbolizer.symbolize({...e,simpleStretchParams:t,bandIds:s}),n}getTileUrl(e,t,r){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${r}`:""}getCompatibleTileInfo(e,t,r=!1){if(!this.loaded||(0,o.Wi)(t))return null;if(r&&e.equals(this.spatialReference))return this.tileInfo;const n=(0,b.C5)(e);return S.Z.create({size:256,spatialReference:e,origin:n?{x:n.origin[0],y:n.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent&&this._compatibleFullExtent.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,r,n={}){if(n.requestAsImageElement){const i=this.getTileUrl(e,t,r);return(0,x.default)(i,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:n.signal}).then((e=>e.data))}if((0,o.pC)(this.rasterInfo.multidimensionalInfo)&&(n=this.normalizeRasterFetchOptions(n),(0,o.Wi)(n.multidimensionalDefinition))){const i=n.tileInfo||this.rasterInfo.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,t,r,i),pixelBlock:null}}return await this._initJobHandler(),"raster-shaded-relief"===this.renderer.type&&(n={...n,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,t,r,n)}async fetchPixels(e,t,r,n={}){return(0,o.pC)(this.rasterInfo.multidimensionalInfo)&&(n=this.normalizeRasterFetchOptions(n),(0,o.Wi)(n.multidimensionalDefinition))?{extent:e,pixelBlock:null}:(await this._initJobHandler(),this.raster.fetchPixels(e,t,r,n))}async identify(e,t={}){return(0,o.pC)(this.rasterInfo.multidimensionalInfo)&&(t=this.normalizeRasterFetchOptions(t),(0,o.Wi)(t.multidimensionalDefinition))?{location:e,value:null}:this.raster.identify(e,t)}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}hasStandardTime(){var e;const t=this.rasterInfo.multidimensionalInfo;if(!(0,o.pC)(t)||"standard-time"!==this.rasterInfo.dataType)return!1;const r=null==(e=this.multidimensionalDefinition[0])?void 0:e.variableName;return t.variables.some((e=>e.name===r&&e.dimensions.some((e=>"StdTime"===e.name))))}getStandardTimeValue(e){return new Date(24*(e-25569)*3600*1e3).toString()}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=this._getDefaultSlice()),this._configDefaultRenderer()}_initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new R.Z;return this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e,this.raster.rasterJobHandler=e,this.renderer&&this.updateRenderer()})).catch((()=>null)),this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this.raster.rasterJobHandler=null}_configDefaultInterpolation(){if(null==this.interpolation){var e;const t=(0,T.In)(this.rasterInfo,this.raster.tileType,null==(e=this.sourceJSON)?void 0:e.defaultResamplingMethod);this._set("interpolation",t)}}_getDefaultSlice(){const{multidimensionalInfo:e}=this.raster.rasterInfo;if(!(0,o.pC)(e))return null;const t=e.variables[0];return t.dimensions.map((e=>{var r,n;return new C.Z({variableName:t.name,dimensionName:e.name,values:[null!=(r=null==(n=e.values)?void 0:n[0])?r:e.extent[0]],isSlice:!0})}))}_configDefaultRenderer(){const e=this.raster.rasterInfo;var t;this.bandIds||(this.bandIds=(0,T.YD)(e)),this.renderer||(this.renderer=(0,T.Ob)(e,{bandIds:this.bandIds,variableName:(0,o.pC)(this.multidimensionalDefinition)?null==(t=this.multidimensionalDefinition[0])?void 0:t.variableName:null})),this.symbolizer?(this.symbolizer.rendererJSON=(0,T.ol)(this.renderer.toJSON()),this.symbolizer.rasterInfo=e):this.symbolizer=new M.Z({rendererJSON:this.renderer.toJSON(),rasterInfo:e});const r=this.symbolizer.bind();r.success||E.warn("imagery-tile-mixin",r.error||"The given renderer is not supported by the layer.")}};return(0,n._)([(0,u.Cb)()],t.prototype,"_cachedRendererJson",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"_compatibleFullExtent",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"_rasterJobHandler",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"bandIds",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"copyright",void 0),(0,n._)([(0,u.Cb)({type:O.Z}),(0,v.B)("rasterInfo.extent")],t.prototype,"fullExtent",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"interpolation",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"ioConfig",void 0),(0,n._)([(0,u.Cb)({type:[C.Z]})],t.prototype,"multidimensionalDefinition",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"raster",void 0),(0,n._)([(0,u.Cb)({readOnly:!0}),(0,v.B)("raster.rasterInfo")],t.prototype,"rasterInfo",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"sourceJSON",void 0),(0,n._)([(0,u.Cb)({type:F.Z}),(0,v.B)("rasterInfo.spatialReference")],t.prototype,"spatialReference",void 0),(0,n._)([(0,u.Cb)({type:S.Z}),(0,v.B)("rasterInfo.storageInfo.tileInfo")],t.prototype,"tileInfo",void 0),(0,n._)([(0,u.Cb)(_.HQ)],t.prototype,"url",null),(0,n._)([(0,u.Cb)({types:s.dr})],t.prototype,"renderer",null),(0,n._)([(0,u.Cb)()],t.prototype,"symbolizer",void 0),t=(0,n._)([(0,p.j)("esri.layers.ImageryTileMixin")],t),t};var N=r(38009),B=r(16859),D=r(34760),z=r(72965),A=r(28294),H=r(1231),L=r(69608),W=r(30547),J=r(48526),j=r(36679),q=r(96674),U=r(609),G=r(73506),$=r(13473);const V=new Map,Y=new class{constructor(e=15e3,t=5e3){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t)}decreaseRefCount(e,t){const r=e+"/"+t,n=this._cachedBlocks;if(n.has(r)){const e=n.get(r);return e.refCount--,e.refCount<=0&&(n.delete(r),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){const r=e+"/"+t,n=this._cachedBlocks;if(n.has(r)){const e=n.get(r);return e.ts=Date.now(),e.refCount++,n.delete(r),n.set(r,e),e.block}return null}putBlock(e,t,r,n=null){const i=this._cachedBlocks,s=e+"/"+t;if(i.has(s)){const e=i.get(s);e.ts=Date.now(),e.refCount++}else i.set(s,{block:r,ts:Date.now(),refCount:1,controller:n});this._trim(),this._updateTimer()}deleteBlock(e,t){const r=this._cachedBlocks,n=e+"/"+t;r.has(n)&&r.delete(n)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;const e=this._cachedBlocks;this._timer=setInterval((()=>{const t=Array.from(e),r=Date.now();for(let n=0;n<t.length&&t[n][1].ts<=r-this._duration;n++)e.delete(t[n][0]);0===e.size&&this._clearTimer()}),this._interval)}_trim(){const e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;const t=Array.from(e);for(let r=0;r<t.length-this._size;r++)e.delete(t[r][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}};function X(e,t){return null==t?e:`${e}?sliceId=${t}`}function K(e,t,r){if(!V.has(e))return null==t?Y.decreaseRefCount(e,r):0;const n=V.get(e);if(null==n[t])return Y.decreaseRefCount(e,r);const i=n[t].cache;if(i.has(r)){const e=i.get(r);if(e.refCount--,0===e.refCount){i.delete(r);for(let e=0;e<n.length;e++)n[e]&&n[e].cache.has(r)&&n[e].cache.delete(r);e.controller&&e.controller.abort()}return e.refCount}return 0}function Q(e,t,r){if(!V.has(e))return null==t?Y.getBlock(e,r):null;const n=V.get(e);if(null==n[t]){for(let e=0;e<n.length;e++)if(n[e]&&n[e].cache.has(r)){const t=n[e].cache.get(r);return t.refCount++,t.block}return Y.getBlock(e,r)}const i=n[t].cache;if(i.has(r)){const e=i.get(r);return e.refCount++,e.block}for(let e=0;e<n.length;e++)if(e!==t&&n[e]&&n[e]&&n[e].cache.has(r)){const t=n[e].cache.get(r);return t.refCount++,i.set(r,t),t.block}return null}function ee(e,t,r,n,i=null){if(!V.has(e))return void(null==t&&Y.putBlock(e,r,n,i));const s=V.get(e);if(null==s[t])return void Y.putBlock(e,r,n,i);const a={refCount:1,block:n,isResolved:!1,isRejected:!1,controller:i};n.then((()=>a.isResolved=!0)).catch((()=>a.isRejected=!0)),s[t].cache.set(r,a)}function te(e,t,r){if(!V.has(e))return void(null==t&&Y.deleteBlock(e,r));const n=V.get(e);null!=n[t]?n[t].cache.delete(r):Y.deleteBlock(e,r)}var re=r(75993),ne=r(55914);let ie=class extends((0,U.v)(q.wq)){constructor(){super(...arguments),this.rasterJobHandler=null,this.datasetName=null,this.datasetFormat=null,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}async init(){const e=(0,G.zD)();this.addResolvingPromise(e),await this.when()}normalizeCtorArgs(e){return e&&e.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:S.Z.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,G.ut)(e.spatialReference);return(0,o.pC)(t)&&e.extent.width>=t/2}set url(e){this._set("url",(0,I.Nm)(e,w.Z.getLogger(this.declaredClass)))}async open(e){throw new a.Z("BaseRaster:open-not-implemented","open() is not implemented")}async fetchTile(e,t,r,n={}){const i=n.tileInfo||this.rasterInfo.storageInfo.tileInfo,s=this.getTileExtentFromTileInfo(e,t,r,i);return this.fetchPixels(s,i.size[0],i.size[1],n)}async identify(e,t={}){t=this._getRequestOptionsWithSliceId(t);const{spatialReference:r,extent:n}=this.rasterInfo,{datumTransformation:i}=t;let s=(0,G.nF)(e,r,i);if(!n.intersects(s))return{location:s,value:null};if((0,o.pC)(this.rasterInfo.transform)){const e=this.rasterInfo.transform.inverseTransform(s);if(!this.rasterInfo.nativeExtent.intersects(e))return{location:e,value:null};s=e}let a=0;if(t.srcResolution)a=(0,G.kr)(t.srcResolution,this.rasterInfo,this.ioConfig.sampling).pyramidLevel;else if(a=await this.computeBestPyramidLevelForLocation(e,t),null==a)return{location:s,value:null};const l=this.identifyPixelLocation(s,a,null);if(null===l)return{location:s,value:null};const{row:c,col:u,rowOffset:f,colOffset:h}=l,d=X(this.url,t.sliceId),p=`${a}/${c}/${u}`;let m=Q(d,null,p);(0,o.Wi)(m)&&(m=this.fetchRawTile(a,c,u,t),ee(d,null,p,m));const y=await m;if((0,o.Wi)(y)||!y.pixels||0===y.pixels.length)return{location:s,value:null};const g=f*this.rasterInfo.storageInfo.blockHeight+h,x=!y.mask||y.mask[g]?y.pixels.map((e=>e[g])):null,w=this.rasterInfo.dataType;return("vector-magdir"===w||"vector-uv"===w)&&(null==x?void 0:x.length)>1?{location:s,value:x,magdirValue:"vector-magdir"===w?[x[0],x[1]]:(0,k.Tg)([x[0],x[1]]),pyramidLevel:a}:{location:s,value:x,pyramidLevel:a}}async fetchPixels(e,t,r,n={}){if(e=(0,G.kZ)(e),(n=this._getRequestOptionsWithSliceId(n)).requestRawData)return this._fetchPixels(e,t,r,n);const i=(0,G.ut)(e.spatialReference),s=(0,G.Hq)(e);if((0,o.Wi)(i)||0===s||1===s&&this._isGlobalWrappableSource)return this._fetchPixels(e,t,r,n);if(s>=3)return{extent:e,pixelBlock:null};const a=[],{xmin:l,xmax:c}=e,u=Math.round(i/(c-l)*t),f=u-Math.round((i/2-l)/(c-l)*t);let h=0;const d=[];for(let o=0;o<=s;o++){const p=new O.Z({xmin:0===o?l:-i/2,xmax:o===s?c-i*o:i/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),m=0===o?u-f:o===s?t-h:u;h+=m,d.push(m);const y=n.disableWrapAround&&o>0?null:this._fetchPixels(p,m,r,n);a.push(y)}const p=(await Promise.all(a)).map((e=>null==e?void 0:e.pixelBlock));let m=null;const y={width:t,height:r};return m=this.rasterJobHandler?await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:p,srcMosaicSize:y,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:d},n):(0,ne.us)(p,y,{blockWidths:d}),{extent:e,srcExtent:(0,G.tB)(e,this.rasterInfo.spatialReference,n.datumTransformation),pixelBlock:m}}async fetchRawPixels(e,t,r,n={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};const i=await this._fetchRawTiles(e,t,r,n),{nativeExtent:s,nativePixelSize:a,storageInfo:l}=this.rasterInfo,c=2**e,u=a.x*c,f=a.y*c,h=new O.Z({xmin:s.xmin+u*t.x,xmax:s.xmin+u*(t.x+r.width-1),ymin:s.ymax-f*(t.y+r.height-1),ymax:s.ymax-f*t.y,spatialReference:s.spatialReference});if(!i)return{extent:h,srcExtent:h,pixelBlock:null};const{pixelBlocks:d}=i;if(1===d.length&&(0,o.pC)(d[0])&&d[0].width===r.width&&d[0].height===r.height)return{extent:h,srcExtent:h,pixelBlock:i.pixelBlocks[0]};const p=e>0?l.pyramidBlockWidth:l.blockWidth,m=e>0?l.pyramidBlockHeight:l.blockHeight,y={width:Math.ceil(r.width/p)*p,height:Math.ceil(r.height/m)*m},g={x:t.x%p,y:t.y%m};let x;return x=this.rasterJobHandler?await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:d,srcMosaicSize:r,destDimension:r,clipOffset:g,clipSize:r,coefs:null,sampleSpacing:null,interpolation:n.interpolation,alignmentInfo:null,blockWidths:null},n):(0,ne.us)(d,y,{clipOffset:g,clipSize:r}),{extent:h,srcExtent:h,pixelBlock:x}}fetchRawTile(e,t,r,n){throw new a.Z("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,G.tB)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,re.J)(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,t,r){var n,i;const{customFetchParameters:s}=this.ioConfig,{range:a,query:o,headers:l}=t;r=null!=(n=null!=(i=r)?i:t.retryCount)?n:this.ioConfig.retryCount;const c=a?{Range:`bytes=${a.from}-${a.to}`}:null;try{return await(0,x.default)(e,{...t,query:{...o,...s},headers:{...l,...c}})}catch(n){if(r>0)return r--,this.request(e,t,r);throw n}}getSliceIndex(e){const{multidimensionalInfo:t}=this.rasterInfo;if(!(0,o.pC)(t))return null;if(!(0,o.pC)(e)||0===e.length)return null;let r=0;const n=e[0].variableName;for(let i=0;i<t.variables.length;i++){const s=t.variables[i],a=s.dimensions;if(s.name!==n){r+=a.map((e=>this._getDimensionValuesCount(e))).reduce(((e,t)=>e+t));break}const o=a.map((e=>this._getDimensionValuesCount(e))),l=a.length;for(let t=0;t<l;t++){const n=e.filter((e=>e.dimensionName===a[t].name))[0];if(null==n)return null;const i=Array.isArray(n.values[0])?n.values[0][0]:n.values[0],s=this._getIndexFromDimensions(i,a[t]);if(-1===s)return null;o.shift(),r+=t===l-1?s:s*o.reduce(((e,t)=>e+t))}}return r}getTileExtentFromTileInfo(e,t,r,n){const i=n.lodAt(e);return this.getTileExtent({x:i.resolution,y:i.resolution},t,r,n.origin,n.spatialReference,n.size)}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:r,pixelSize:n}=this.rasterInfo;if(!e.tileInfo){const i=[],s=e.maximumPyramidLevel||0;let a=Math.max(n.x,n.y),o=1/.0254*96*a;for(let e=0;e<=s;e++)i.push({level:s-e,resolution:a,scale:o}),a*=2,o*=2;const l=new $.Z({x:r.xmin,y:r.ymax,spatialReference:t});e.tileInfo=new S.Z({origin:l,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:i}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,r=512,n){const{width:i,height:s,nativeExtent:a,pixelSize:o,spatialReference:l}=e,c=new $.Z({x:a.xmin,y:a.ymax,spatialReference:l});null==n&&(n=Math.max(0,Math.round(Math.log(Math.max(i,s))/Math.LN2-8)));const u=this.computeBlockBoundary(a,512,512,{x:a.xmin,y:a.ymax},[o],n);e.storageInfo=new j.Z({blockWidth:t,blockHeight:r,pyramidBlockWidth:t,pyramidBlockHeight:r,origin:c,firstPyramidLevel:1,maximumPyramidLevel:n,blockBoundary:u})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,r,n,i,s=0,a=2){if(1===i.length&&s>0){i=[...i];let{x:e,y:t}=i[0];for(let r=0;r<s;r++)e*=a,t*=a,i.push({x:e,y:t})}const o=[],{x:l,y:c}=n;for(let n=0;n<i.length;n++){const{x:s,y:a}=i[n];o.push({minCol:Math.floor((e.xmin-l+.1*s)/t/s),maxCol:Math.floor((e.xmax-l-.1*s)/t/s),minRow:Math.floor((c-e.ymax+.1*a)/r/a),maxRow:Math.floor((c-e.ymin-.1*a)/r/a)})}return o}getPyramidPixelSize(e){const{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:r,pyramidScalingFactor:n}=this.rasterInfo.storageInfo;if(0===e)return t;if((0,o.pC)(r)&&r.length)return r[e-1];const i=n**e;return{x:t.x*i,y:t.y*i}}identifyPixelLocation(e,t,r){const{spatialReference:n,nativeExtent:i}=this.rasterInfo,{blockWidth:s,blockHeight:a,maximumPyramidLevel:o,origin:l}=this.rasterInfo.storageInfo,c=(0,G.nF)(e,n,r);if(!i.intersects(c))return null;if(t<0||t>o)return null;const u=this.getPyramidPixelSize(t),{x:f,y:h}=u,d=(l.y-c.y)/h/a,p=(c.x-l.x)/f/s,m=Math.min(a-1,Math.floor((d-Math.floor(d))*a)),y=Math.min(s-1,Math.floor((p-Math.floor(p))*s));return{pyramidLevel:t,row:Math.floor(d),col:Math.floor(p),rowOffset:m,colOffset:y,srcLocation:c}}getTileExtent(e,t,r,n,i,s){const[a,o]=s,l=n.x+r*a*e.x,c=l+a*e.x,u=n.y-t*o*e.y,f=u-o*e.y;return new O.Z({xmin:l,xmax:c,ymin:f,ymax:u,spatialReference:i})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,r){const n=this.rasterInfo.storageInfo.blockBoundary[e];return!n||n.maxRow<t||n.maxCol<r||n.minRow>t||n.minCol>r}async _fetchPixels(e,t,r,n={}){let i=(0,G.Hq)(e);if(i>=2)return{extent:e,pixelBlock:null};const s=this._getSourceDataInfo(e,t,r,n),{pyramidLevel:a,pyramidResolution:l,srcResolution:c,srcExtent:u,srcWidth:f,srcHeight:h}=s;if(0===f||0===h)return{extent:e,srcExtent:u,pixelBlock:null};const d=(0,o.Wg)(this.rasterInfo.transform);"gcs-shift"===(null==d?void 0:d.type)&&(i=(0,G.Hq)(s.srcExtent,!0));const p=this.rasterInfo.storageInfo,m={x:Math.floor((u.xmin-p.origin.x)/l.x+.1),y:Math.floor((p.origin.y-u.ymax)/l.y+.1)},y=await this._fetchRawTiles(a,m,{width:f,height:h,wrapCount:i},n);if(!y)return{extent:e,srcExtent:u,pixelBlock:null};const g=a>0?p.pyramidBlockWidth:p.blockWidth,x=a>0?p.pyramidBlockHeight:p.blockHeight,w=g===f&&x===h&&m.x%g==0&&m.y%x==0,v=new $.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/r,spatialReference:e.spatialReference}),b=!e.spatialReference.equals(this.rasterInfo.spatialReference),{datumTransformation:I}=n;if(!b&&w&&1===y.pixelBlocks.length&&g===t&&x===r&&c.x===v.x&&c.y===v.y)return{extent:e,srcExtent:u,pixelBlock:y.pixelBlocks[0]};const _=(0,o.pC)((0,G.ut)(e.spatialReference))&&(0,o.pC)((0,G.ut)(u.spatialReference)),C=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:v.toJSON(),datumTransformation:I,rasterTransform:d,hasWrapAround:i>0||_,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy},n):(0,G.Qp)({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:v,datumTransformation:I,rasterTransform:d,hasWrapAround:i>0||_,isAdaptive:!1});let R;const S=!n.requestRawData,k={rows:C.spacing[0],cols:C.spacing[1]},T=(0,o.Wg)(this._getRasterTileAlignmentInfo(a,y.extent.xmin)),{pixelBlocks:M,mosaicSize:P,isPartiallyFilled:O}=y;if(this.rasterJobHandler)R=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:M,srcMosaicSize:P,destDimension:S?{width:t,height:r}:null,coefs:S?C.coefficients:null,sampleSpacing:S?k:null,interpolation:n.interpolation,alignmentInfo:T,blockWidths:null},n);else{const e=(0,ne.us)(M,P,{alignmentInfo:T});R=S?(0,ne.Uk)(e,{width:t,height:r},C.coefficients,k,n.interpolation):e}return n.requestRawData?{srcExtent:u,pixelBlock:R,transformGrid:C,extent:e,isPartiallyFilled:O}:{srcExtent:u,extent:e,pixelBlock:R}}async _fetchRawTiles(e,t,r,n){const{origin:i,blockBoundary:s}=this.rasterInfo.storageInfo,{blockWidth:a,blockHeight:l}=this.getBlockWidthHeight(e);let{x:c,y:u}=t,{width:f,height:h,wrapCount:d}=r;const p=this._getRasterTileAlignmentInfo(e,0);n.buffer&&(c-=n.buffer.cols,u-=n.buffer.rows,f+=2*n.buffer.cols,h+=2*n.buffer.rows);let m=0,y=0,g=0;d&&(0,o.pC)(p)&&(({worldColumnCountFromOrigin:y,originColumnOffset:g,rightPadding:m}=p),y*p.blockWidth-m>=c+f&&(m=0));const x=Math.floor(c/a),w=Math.floor(u/l),v=Math.floor((c+f+m-1)/a),b=Math.floor((u+h+m-1)/l),I=s[e];if(!I)return null;const{minRow:_,minCol:C,maxCol:R,maxRow:S}=I;if(0===d&&(b<_||v<C||w>S||x>R))return null;const k=new Array;let T=!1;const M=null==this.ioConfig.allowPartialFill?n.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=w;t<=b;t++)for(let r=x;r<=v;r++){let i=r;if(!n.disableWrapAround&&d&&(0,o.pC)(p)&&y<=r&&(i=r-y-g),t>=_&&i>=C&&S>=t&&R>=i){const r=this._fetchRawTile(e,t,i,n);M?k.push(new Promise((e=>{r.then((t=>e(t))).catch((()=>{T=!0,e(null)}))}))):k.push(r)}else k.push(null)}if(0===k.length)return null;const P=await Promise.all(k),F={height:(b-w+1)*l,width:(v-x+1)*a},{spatialReference:E}=this.rasterInfo,Z=this.getPyramidPixelSize(e),{x:N,y:B}=Z;return{extent:new O.Z({xmin:i.x+x*a*N,xmax:i.x+(v+1)*a*N,ymin:i.y-(b+1)*l*B,ymax:i.y-w*l*B,spatialReference:E}),pixelBlocks:P,mosaicSize:F,isPartiallyFilled:T}}_fetchRawTile(e,t,r,n){const i=this.rasterInfo.storageInfo.blockBoundary[e];if(!i)return Promise.resolve(null);const{minRow:s,minCol:a,maxCol:l,maxRow:u}=i;if(t<s||r<a||t>u||r>l)return Promise.resolve(null);const f=X(this.url,n.sliceId),h=`${e}/${t}/${r}`;let d=Q(f,n.registryId,h);if((0,o.Wi)(d)){const i=new AbortController;d=this.fetchRawTile(e,t,r,{...n,signal:i.signal}),ee(f,n.registryId,h,d,i),d.catch((()=>te(f,n.registryId,h)))}return n.signal&&(0,c.fu)(n,(()=>{K(f,n.registryId,h)})),d}_getIndexFromDimensions(e,t){const{extent:r,interval:n,unit:i,values:s}=t;if(null!=s&&s.length)return Array.isArray(s[0])?s.findIndex((t=>t[0]<=e&&t[1]>=e)):s.indexOf(e);if(e>r[1])return-1;const a=r[0];let o=-1;if("ISO8601"===i){var l;switch((null==(l=t.intervalUnit)?void 0:l.toLowerCase())||"seconds"){case"seconds":o=Math.round((e-a)/1e3/n);break;case"minutes":o=Math.round((e-a)/6e4/n);break;case"hours":o=Math.round((e-a)/36e5/n);break;case"days":o=Math.round((e-a)/864e5/n);break;case"years":o=Math.round((new Date(e).getUTCFullYear()-new Date(a).getUTCFullYear())/n);break;case"decades":o=Math.round((new Date(e).getUTCFullYear()-new Date(a).getUTCFullYear())/10/n)}return o}return Math.round((e-a)/n)}_getDimensionValuesCount(e){const{extent:t,interval:r,unit:n,values:i}=e;let s=(null==i?void 0:i.length)||0;if(s)return s;const a=t[0];if(0===s&&"ISO8601"===n){var o;switch((null==(o=e.intervalUnit)?void 0:o.toLowerCase())||"seconds"){case"seconds":s=Math.round((t[1]-t[0])/1e3/r);break;case"minutes":s=Math.round((t[1]-t[0])/6e4/r);break;case"hours":s=Math.round((t[1]-t[0])/36e5/r);break;case"days":s=Math.round((t[1]-t[0])/864e5/r);break;case"years":s=Math.round((new Date(t[1]).getUTCFullYear()-new Date(a).getUTCFullYear())/r);break;case"decades":s=Math.round((new Date(t[1]).getUTCFullYear()-new Date(a).getUTCFullYear())/10/r)}return s}return Math.round((t[1]-t[0])/r)}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlighmentInfo&&(this._rasterTileAlighmentInfo=(0,G.P_)(this.rasterInfo)),(0,o.pC)(this._rasterTileAlighmentInfo.pyramidsInfo)?{startX:t,halfWorldWidth:this._rasterTileAlighmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlighmentInfo.hasGCSSShiftTransform,...this._rasterTileAlighmentInfo.pyramidsInfo[e]}:null}_getSourceDataInfo(e,t,r,n={}){const i={datumTransformation:n.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0};n.srcResolution&&(i.srcResolution=n.srcResolution,this._updateSourceDataInfo(e,i));const s=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:a,srcHeight:o,pyramidLevel:l}=i,c=a/t,u=o/r,f=l<s&&c*u>=16;if(f||l===s&&(c>8||u>8)||0===a||0===o){const a=new $.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/r,spatialReference:e.spatialReference});let o=(0,G.VO)(a,this.rasterInfo.spatialReference,e,i.datumTransformation);const h=!o||n.srcResolution&&o.x+o.y<n.srcResolution.x+n.srcResolution.y;if(f&&n.srcResolution&&h){const e=Math.round(Math.log(Math.max(c,u))/Math.LN2)-1;if(s-l+3>=e){const t=2**e;o={x:n.srcResolution.x*t,y:n.srcResolution.y*t}}}o&&(i.srcResolution=o,this._updateSourceDataInfo(e,i))}return(i.srcWidth/t>8||i.srcHeight/r>8)&&(i.srcWidth=0,i.srcHeight=0),i}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const r=this.rasterInfo.spatialReference,{srcResolution:n,datumTransformation:i}=t,{pyramidLevel:s,pyramidResolution:a,excessiveReading:l}=(0,G.kr)(n,this.rasterInfo,this.ioConfig.sampling);if(l)return;let c=t.srcExtent||(0,G.tB)(e,r,i);if(null==c)return;const u=(0,o.Wg)(this.rasterInfo.transform);u&&(c=u.inverseTransform(c)),t.srcExtent=c;const f=Math.ceil((c.xmax-c.xmin)/a.x-.1),h=Math.ceil((c.ymax-c.ymin)/a.y-.1);t.pyramidLevel=s,t.pyramidResolution=a,t.srcWidth=f,t.srcHeight=h}_getRequestOptionsWithSliceId(e){return(0,o.pC)(this.rasterInfo.multidimensionalInfo)&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}};(0,n._)([(0,u.Cb)()],ie.prototype,"_rasterTileAlighmentInfo",void 0),(0,n._)([(0,u.Cb)({readOnly:!0})],ie.prototype,"_isGlobalWrappableSource",null),(0,n._)([(0,u.Cb)(_.HQ)],ie.prototype,"url",null),(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],ie.prototype,"datasetName",void 0),(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],ie.prototype,"datasetFormat",void 0),(0,n._)([(0,u.Cb)()],ie.prototype,"rasterInfo",void 0),(0,n._)([(0,u.Cb)()],ie.prototype,"ioConfig",void 0),(0,n._)([(0,u.Cb)()],ie.prototype,"sourceJSON",void 0),ie=(0,n._)([(0,p.j)("esri.layers.support.rasterDatasets.BaseRaster")],ie);const se=ie;var ae=r(20095);function oe(e){const t=e.fields,r=e.records,n=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",i=[{name:n,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),s=i.map((e=>e.name)),a=[];let o=0,l=0;return r.forEach((e=>{const t={};for(t[n]=o++,l=1;l<s.length;l++)t[s[l]]=e[l-1];a.push({attributes:t})})),{displayFieldName:"",fields:i,features:a}}var le=r(87521),ce=r(74889);const ue=new Map;ue.set("int16","esriFieldTypeSmallInteger"),ue.set("int32","esriFieldTypeInteger"),ue.set("int64","esriFieldTypeInteger"),ue.set("float32","esriFieldTypeSingle"),ue.set("float64","esriFieldTypeDouble"),ue.set("text","esriFieldTypeString");let fe=class extends se{constructor(){super(...arguments),this.storageInfo=null,this.datasetFormat="CRF"}async open(e){await this.init();const{data:t}=await this.request(this.url+"/conf.json",{signal:null==e?void 0:e.signal});if(!this._validateHeader(t))throw new a.Z("cloudraster:open","Invalid or unsupported conf.json.");this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const{storageInfo:r,rasterInfo:n}=this._parseHeader(t);if("thematic"===n.dataType){const e=await this._fetchAuxiliaryInformation();n.attributeTable=e}this._set("storageInfo",r),this._set("rasterInfo",n),this.ioConfig.retryCount=this.ioConfig.retryCount||0}async fetchRawTile(e,t,r,n={}){const i=this.rasterInfo.storageInfo.maximumPyramidLevel-e;if(i<0)return null;const s=this._buildCacheFilePath(i,t,r,n.multidimensionalDefinition),a=this._getIndexRecordFromBundle(t,r),o=await this.request(s,{range:{from:0,to:this.storageInfo.headerSize-1},responseType:"array-buffer",signal:n.signal});if(!o)return null;const l=new Uint8Array(o.data),c=this._getTileEndAndContentType(l,a);if(0===c.recordSize)return null;const u=await this.request(s,{range:{from:c.position,to:c.position+c.recordSize},responseType:"array-buffer",signal:n.signal});return u?this.decodePixelBlock(u.data,{width:this.rasterInfo.storageInfo.tileInfo.size[0],height:this.rasterInfo.storageInfo.tileInfo.size[1],planes:null,pixelType:null}):null}_validateHeader(e){return e&&"RasterInfo"===e.type&&!["origin","extent","geodataXform","LODInfos","blockWidth","blockHeight","bandCount","pixelType","pixelSizeX","pixelSizeY","format","packetSize"].some((t=>!e[t]))}_parseHeader(e){var t,r;const n=["u1","u2","u4","u8","s8","u16","s16","u32","s32","f32","f64"][e.pixelType],{bandCount:i,histograms:s,colormap:a,blockWidth:o,blockHeight:l,firstPyramidLevel:c,maximumPyramidLevel:u}=e,f=e.statistics&&e.statistics.map((e=>({min:e.min,max:e.max,avg:e.mean,stddev:e.standardDeviation,median:e.median,mode:e.mode}))),h=e.extent.spatialReference,d=null==(t=e.geodataXform)?void 0:t.spatialReference,p=new F.Z(null!=h&&h.wkid||null!=h&&h.wkt?h:d);let m=new O.Z({xmin:e.extent.xmin,ymin:e.extent.ymin,xmax:e.extent.xmax,ymax:e.extent.ymax,spatialReference:p});const y=new $.Z({x:e.pixelSizeX,y:e.pixelSizeY,spatialReference:p}),g=Math.round((m.xmax-m.xmin)/y.x),x=Math.round((m.ymax-m.ymin)/y.y),w=this._parseTransform(e.geodataXform),v=w?m:null;w&&(m=w.forwardTransform(m),y.x=(m.xmax-m.xmin)/g,y.y=(m.ymax-m.ymin)/x);const b=null!=(r=e.properties)?r:{},I=e.format.toLowerCase().replace("cache/",""),_=new $.Z(e.origin.x,e.origin.y,p);let C,R,k,T;if(a&&a.colors)for(C=[],R=0;R<a.colors.length;R++)k=a.colors[R],T=a.values?a.values[R]:R,C.push([T,255&k,k<<16>>>24,k<<8>>>24,k>>>24]);const M=e.LODInfos,P=[];for(R=0;R<M.levels.length;R++)P.push({level:M.levels[R],resolution:M.resolutions[R],scale:96/.0254*M.resolutions[R]});const E=new S.Z({dpi:96,lods:P,format:I,origin:_,size:[o,l],spatialReference:p}),Z={recordSize:8,packetSize:e.packetSize,headerSize:e.packetSize*e.packetSize*8+64},N=[{maxCol:Math.ceil(g/o)-1,maxRow:Math.ceil(x/l)-1,minCol:0,minRow:0}];let B=2;if(u>0)for(R=0;R<u;R++)N.push({maxCol:Math.ceil(g/B/o)-1,maxRow:Math.ceil(x/B/l)-1,minCol:0,minRow:0}),B*=2;const D=e.mdInfo;return{storageInfo:Z,rasterInfo:new J.Z({width:g,height:x,pixelType:n,bandCount:i,extent:m,nativeExtent:v,transform:w,spatialReference:p,pixelSize:y,keyProperties:b,statistics:f,histograms:s,multidimensionalInfo:D,colormap:C,storageInfo:new j.Z({blockWidth:o,blockHeight:l,pyramidBlockWidth:o,pyramidBlockHeight:l,origin:_,tileInfo:E,firstPyramidLevel:c,maximumPyramidLevel:u,blockBoundary:N})})}}_parseTransform(e){var t,r;if(!(0,le.j)(e))throw new a.Z("cloudraster:open","the data contains unsupported geodata transform types");const n=(0,le.c)(e);if("identity"===n.type)return null;if("polynomial"!==n.type||null==(t=n.forwardCoefficients)||!t.length||null==(r=n.inverseCoefficients)||!r.length)throw new a.Z("cloudraster:open","the data contains unsupported geodata transforms - both forward and inverse coefficients are required currently");return n}async _fetchAuxiliaryInformation(e){const t=this.request(this.url+"/conf.vat.json",{signal:e}).then((e=>e.data)).catch((()=>null)),r=this.request(this.url+"/conf.vat.dbf",{responseType:"array-buffer",signal:e}).then((e=>e.data)).catch((()=>null)),n=await Promise.all([t,r]);let i;if(n[0]){let e=n[0].fields;const t=n[0].values;if(e&&t){e=e.map((e=>({type:"OID"===e.name?"esriFieldTypeOID":ue.get(e.type),name:e.name,alias:e.alias||e.name})));const r=t.map((e=>({attributes:e})));e&&t&&(i={fields:e,features:r})}}return!i&&n[1]&&(i=class{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),r=3&t.getUint8(0);if(3!==r)return{header:{version:r},recordSet:null};const n=t.getUint32(4,!0),i=t.getUint16(8,!0),s=t.getUint16(10,!0),a={version:r,recordCount:n,headerByteCount:i,recordByteCount:s};let o=32;const l=[],c=[];let u;if(3===r){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,ae.f)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<n&&e.byteLength-o>s;){const r=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)r.push((0,ae.f)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)r.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)r.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const n=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();r.push(new Date(parseInt(n.substring(0,4),10),parseInt(n.substring(4,6),10)-1,parseInt(n.substring(6,8),10)))}o+=t.length})),c.push(r)):o+=s}}return{header:a,fields:l,records:c,recordSet:oe({fields:l,records:c})}}}.parse(n[1]).recordSet),ce.default.fromJSON(i)}_buildCacheFilePath(e,t,r,n){const i=this.storageInfo.packetSize,s=Math.floor(t/i)*i,a=Math.floor(r/i)*i,l="R"+this._toHexString4(s)+"C"+this._toHexString4(a);let c="L";c+=e>=10?e.toString():"0"+e.toString();const{multidimensionalInfo:u}=this.rasterInfo,f=null==n?void 0:n[0];if(!(0,o.pC)(u)||!f)return`${this.url}/_alllayers/${c}/${l}.bundle`;let h=u.variables.filter((e=>e.name===f.variableName))[0].dimensions[0].values.indexOf(f.values[0]).toString(16);const d=4-h.length;for(let e=0;e<d;e++)h="0"+h;return h="S"+h,`${this.url}/_alllayers/${f.variableName}/${h}/${c}/${l}.bundle`}_getIndexRecordFromBundle(e,t){const r=this.storageInfo.packetSize,n=r*(e%r)+t%r;if(n<0)throw"Invalid level / row / col";return 20+n*this.storageInfo.recordSize+44}_getTileEndAndContentType(e,t){const r=e.subarray(t,t+8);let n,i=0;for(n=0;n<5;n++)i|=(255&r[n])<<8*n;const s=0xffffffffff&i;for(i=0,n=5;n<8;n++)i|=(255&r[n])<<8*(n-5);return{position:s,recordSize:0xffffffffff&i}}_toHexString4(e){let t=e.toString(16);if(4!==t.length){let e=4-t.length;for(;e-- >0;)t="0"+t}return t}};(0,n._)([(0,u.Cb)({readOnly:!0})],fe.prototype,"storageInfo",void 0),(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],fe.prototype,"datasetFormat",void 0),fe=(0,n._)([(0,p.j)("esri.layers.support.rasterDatasets.CloudRaster")],fe);const he=fe;let de=class extends se{constructor(){super(...arguments),this.datasetFormat="MEMORY"}async open(e){var t;await this.init();const{pixelBlock:r,statistics:n,histograms:i,name:s,keyProperties:a,nativeExtent:o,transform:l}=this.data,{width:c,height:u,pixelType:f}=r,h=this.data.extent||new O.Z({xmin:-.5,ymin:.5,xmax:c-.5,ymax:u-.5,spatialReference:new F.Z({wkid:3857})}),d=null!=(t=this.data.isPseudoSpatialReference)?t:!this.data.extent,p={x:h.width/c,y:h.height/u},m=new J.Z({width:c,height:u,pixelType:f,extent:h,nativeExtent:o,transform:l,pixelSize:p,spatialReference:h.spatialReference,bandCount:3,keyProperties:a||{},statistics:n,isPseudoSpatialReference:d,histograms:i});this.createRemoteDatasetStorageInfo(m,512,512),this._set("rasterInfo",m),this.updateTileInfo(),await this._buildInMemoryRaster(r,{width:512,height:512},e),this.datasetName=s,this.url="/InMemory/"+s}fetchRawTile(e,t,r,n={}){const i=this._pixelBlockTiles.get(`${e}/${t}/${r}`);return Promise.resolve(i)}async _buildInMemoryRaster(e,t,r){const n=this.rasterInfo.storageInfo.maximumPyramidLevel,i=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:n},r):Promise.resolve((0,ne.Vl)(e,t,n)),s=(0,o.pC)(this.rasterInfo.statistics),l=(0,o.pC)(this.rasterInfo.histograms),u=s&&l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},r):Promise.resolve((0,ne.Hv)(e)),f=await(0,c.as)([i,u]);if(!f[0].value&&f[1].value)throw new a.Z("inmemory-raster:open","failed to build in memory raster");var h,d;this._pixelBlockTiles=f[0].value,s||(this.rasterInfo.statistics=null==(h=f[1].value)?void 0:h.statistics),l&&(this.rasterInfo.histograms=null==(d=f[1].value)?void 0:d.histograms)}};(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],de.prototype,"datasetFormat",void 0),(0,n._)([(0,u.Cb)()],de.prototype,"data",void 0),de=(0,n._)([(0,p.j)("esri.layers.support.rasterDatasets.InMemoryRaster")],de);const pe=de;function me(e,t){if(!e||!t)return[];let r=t;t.indexOf("/")>-1?(r=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const n=[];if(t){const i=me(e,r);for(let e=0;e<i.length;e++)me(i[e],t).forEach((e=>n.push(e)));return n}const i=e.getElementsByTagNameNS("*",r);if(!i||0===i.length)return[];for(let e=0;e<i.length;e++)n.push(i[e]||i.item[e]);return n}function ye(e,t){if(!e||!t)return null;let r=t;t.indexOf("/")>-1?(r=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const n=me(e,r);return n.length>0?t?ye(n[0],t):n[0]:null}function ge(e,t=null){const r=t?ye(e,t):e;let n;return r?(n=r.textContent||r.nodeValue,n?n.trim():null):null}function xe(e,t){return function(e,t){const r=me(e,t),n=[];let i;for(let e=0;e<r.length;e++)i=r[e].textContent||r[e].nodeValue,i&&(i=i.trim(),""!==i&&n.push(i));return n}(e,t).map((e=>Number(e)))}function we(e,t){const r=ge(e,t);return Number(r)}function ve(e,t){var r;const n=null==e||null==(r=e.nodeName)?void 0:r.toLowerCase(),i=t.toLowerCase();return n.slice(n.lastIndexOf(":")+1)===i}var be=r(87390);function Ie(e,t){if(!e||!t)return null;const r=[];for(let n=0;n<e.length;n++)r.push(e[n]),r.push(t[n]);return r}function _e(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new F.Z({wkid:t});if((e=String(e)).startsWith("COMPD_CS")){if(!e.includes("VERTCS")||!e.includes("GEOGCS")&&!e.startsWith("PROJCS"))return null;const r=e.indexOf("VERTCS"),n=e.indexOf("PROJCS"),i=n>-1?n:e.indexOf("GEOGCS");if(-1===i)return null;const s=e.slice(i,e.lastIndexOf("]",r)+1).trim(),a=e.slice(r,e.lastIndexOf("]")).trim();t=Ce(s);const o=new F.Z(t?{wkid:t}:{wkt:s}),l=Ce(a);return l&&(o.vcsWkid=l),o}return e.startsWith("GEOGCS")||e.startsWith("PROJCS")?(t=Ce(e),new F.Z(0!==t?{wkid:t}:{wkt:e})):null}function Ce(e){var t;const r=e.replace(/\]/g,"[").replace(/\"/g,"").split("[").map((e=>e.trim())).filter((e=>""!==e)),n=r[r.length-1].split(","),i=null==(t=n[0])?void 0:t.toLowerCase();if(("epsg"===i||"esri"===i)&&e.endsWith('"]]')){const e=Number(n[1]);if(!isNaN(e)&&0!==e)return e}return 0}function Re(e){var t;if("pamdataset"!==(null==e||null==(t=e.documentElement.tagName)?void 0:t.toLowerCase()))return{};const r={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if(ve(e,"SRS")){if(!r.spatialReference){const t=ge(e);r.spatialReference=_e(t)}}else if(ve(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:t,transform:n}=function(e){var t;const r=ye(e,"GeodataXform"),n=_e(we(r,"SpatialReference/WKID")||ge(r,"SpatialReference/WKT"));if("typens:PolynomialXform"!==r.getAttribute("xsi:type"))return{spatialReference:n,transform:null};const i=null!=(t=we(r,"PolynomialOrder"))?t:1,s=xe(r,"CoeffX/Double"),a=xe(r,"CoeffY/Double"),o=xe(r,"InverseCoeffX/Double"),l=xe(r,"InverseCoeffY/Double"),c=Ie(s,a),u=Ie(o,l);return{spatialReference:n,transform:new be.Z({spatialReference:n,polynomialOrder:i,forwardCoefficients:c,inverseCoefficients:u})}}(e);r.transform=n,r.spatialReference||(r.spatialReference=t)}else me(e,"MDI").forEach((e=>r.metadata[e.getAttribute("key")]=ge(e)));else if(ve(e,"PAMRasterBand")){const t=function(e){var t;const r=we(e,"NoDataValue"),n=ye(e,"Histograms/HistItem"),i=we(n,"HistMin"),s=we(n,"HistMax"),a=we(n,"BucketCount"),o=null==(t=ge(n,"HistCounts"))?void 0:t.split("|").map((e=>Number(e)));let l,c,u,f;me(e,"Metadata/MDI").forEach((e=>{var t;const r=Number(null!=(t=e.textContent)?t:e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":l=r;break;case"STATISTICS_MAXIMUM":c=r;break;case"STATISTICS_MEAN":u=r;break;case"STATISTICS_STDDEV":f=r}}));const h=we(e,"Metadata/SourceBandIndex");return{noDataValue:r,histogram:null!=o&&o.length&&null!=l&&null!=c?{min:i,max:s,size:a||o.length,counts:o}:null,sourceBandIndex:h,statistics:null!=l&&null!=c?{min:l,max:c,avg:u,stddev:f}:null}}(e);null!=t.sourceBandIndex&&null==r.rasterBands[t.sourceBandIndex]?r.rasterBands[t.sourceBandIndex]=t:r.rasterBands.push(t)}}));const n=r.rasterBands;if(n){const e=!!n[0].statistics;r.statistics=e?n.map((e=>e.statistics)):null;const t=!!n[0].histogram;r.histograms=t?n.map((e=>e.histogram)):null}return r}let Se=class extends se{async open(e){await this.init();const t=await this._fetchData(e);let{spatialReference:r,statistics:n,histograms:i,transform:s}=await this._fetchAuxiliaryData(e);const a=!r;a&&(r=new F.Z({wkid:3857})),null!=i&&i.length&&null==n&&(n=(0,ne.Oh)(i));const{width:o,height:l}=t;let c=new O.Z({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:r});const u=s?s.forwardTransform(c):c;let f=!0;if(s){const e=s.forwardCoefficients;f=e&&0===e[1]&&0===e[2],f&&(s=null,c=u)}const h=new pe({data:{extent:u,nativeExtent:c,transform:s,pixelBlock:t,statistics:n,histograms:i,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a}});await h.open(),this._set("rasterInfo",h.rasterInfo),this._inMemoryRaster=h}fetchRawTile(e,t,r,n={}){return this._inMemoryRaster.fetchRawTile(e,t,r,n)}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:null==e?void 0:e.signal}),r=(0,re.y)(t).toUpperCase();if("JPG"!==r&&"PNG"!==r&&"GIF"!==r&&"BMP"!==r)throw new a.Z("image-aux-raster:open","the data is not a supported format");return this._set("datasetFormat",r),await this.decodePixelBlock(t,{format:"jpg",width:1,height:1,useCanvas:!0})}async _fetchAuxiliaryData(e){var t,r;const n=(0,o.Wg)(null==e?void 0:e.signal),i=null!=(t=this.ioConfig.skipExtensions)?t:[],s=i.indexOf("aux.xml")>-1?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:n}),a=this.datasetFormat,l="JPG"===a?"jgw":"PNG"===a?"pgw":"BMP"===a?"bpw":null,u=i.indexOf(l)>-1?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+l,{responseType:"text",signal:n}),f=await(0,c.as)([s,u]);if(null!=n&&n.aborted)throw(0,c.zE)();const h=Re(null==(r=f[0].value)?void 0:r.data);if(!h.transform){const e=f[1].value?f[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;h.transform=6===(null==e?void 0:e.length)?new be.Z({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return h}};(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],Se.prototype,"datasetFormat",void 0),Se=(0,n._)([(0,p.j)("esri.layers.support.rasterDatasets.ImageAuxRaster")],Se);const ke=Se;var Te=r(17452),Me=r(45322),Pe=r(56608),Oe=r(29680);let Fe=class extends se{constructor(){super(...arguments),this._levelOffset=0,this._slices=null,this._tilemapCache=null,this.datasetFormat="RasterTileServer"}async open(e){await this.init();const t=e&&e.signal,r=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});r.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const n=r.data;if(this.sourceJSON=n,!n)throw new a.Z("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!n.tileInfo)throw new a.Z("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=n.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].indexOf(n.tileInfo.format.toLowerCase())>-1?this.tileType="Map":"lerc"===n.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=n.name.slice(n.name.indexOf("/")+1);const i=await this._fetchRasterInfo({signal:t});if(!(0,o.pC)(i))throw new a.Z("image-server-raster:open","cannot initialize image service");{const e="Map"===this.tileType?(0,Me.d)(n.tileInfo,n):S.Z.fromJSON(n.tileInfo),{extent:t,pixelSize:r}=i,s=.5/i.width*r.x;let a,o;const l=e.lodAt(Math.max.apply(null,e.lods.map((e=>e.level))));"Map"!==this.tileType&&0!==n.maxScale&&("Raster"===this.tileType?(a=e.lods.filter((e=>e.resolution===r.x))[0],a||(a=e.lods[e.lods.length-1])):(a=e.lods.filter((e=>Math.abs(e.scale-n.maxScale)<s))[0],a||(a=e.lods.filter((e=>e.scale>n.maxScale)).sort(((e,t)=>e.scale>t.scale?1:-1))[0])),r.x=r.y=a.resolution,i.width=Math.ceil((t.xmax-t.xmin)/r.x-.1),i.height=Math.ceil((t.ymax-t.ymin)/r.y-.1)),a||(a=l);const c=e.lodAt(Math.min.apply(null,e.lods.map((e=>e.level))));"Map"===this.tileType?this._levelOffset=e.lods[0].level:0!==n.minScale&&"Elevation"===this.tileType&&(o=e.lods.filter((e=>Math.abs(e.scale-n.minScale)<s))[0],this._levelOffset=o.level-c.level),o||(o=c);const u=Math.max(r.x,r.y);(Math.abs(r.x-r.y)>s||!e.lods.some((e=>Math.abs(e.resolution-u)<s)))&&(r.x=r.y=a.resolution,i.width=Math.ceil((t.xmax-t.xmin)/r.x-.1),i.height=Math.ceil((t.ymax-t.ymin)/r.y-.1));const f=a.level-o.level,[h,d]=e.size,p=[];e.lods.forEach((e=>{e.level>=o.level&&e.level<=a.level&&p.push({x:e.resolution,y:e.resolution})})),p.sort(((e,t)=>e.x-t.x));const m=this.computeBlockBoundary(t,h,d,e.origin,p,f),y=p.length>1?p.slice(1):null;i.storageInfo=new j.Z({blockWidth:e.size[0],blockHeight:e.size[1],pyramidBlockWidth:e.size[0],pyramidBlockHeight:e.size[1],pyramidResolutions:y,compression:e.format,origin:e.origin,firstPyramidLevel:1,maximumPyramidLevel:f,tileInfo:e,blockBoundary:m}),this._fixGCSShift(i),this._set("rasterInfo",i)}if(n.capabilities.toLowerCase().indexOf("tilemap")>-1){const e={tileInfo:i.storageInfo.tileInfo,parsedUrl:(0,Te.mN)(this.url),url:this.url,tileServers:[],type:"tile"};this._tilemapCache=new Pe.y({layer:e})}}async fetchRawTile(e,t,r,n={}){if(this._slices&&null==n.sliceId)return null;const{storageInfo:i,extent:s}=this.rasterInfo,a=i.maximumPyramidLevel-e+this._levelOffset,o=`${this.url}/tile/${a}/${t}/${r}`,l=this._slices?{sliceId:n.sliceId||0}:null,{data:c}=await this.request(o,{query:l,responseType:"array-buffer",signal:n.signal});if(!c)return null;const u=await this.decodePixelBlock(c,{width:i.tileInfo.size[0],height:i.tileInfo.size[1],planes:null,pixelType:null,isPoint:"Elevation"===this.tileType}),f=i.blockBoundary[e];if("jpg"!==i.compression||r>f.minCol&&r<f.maxCol&&t>f.minRow&&t<f.maxRow)return u;const{origin:h,blockWidth:d,blockHeight:p}=i,{x:m,y}=this.getPyramidPixelSize(e),g=Math.round((s.xmin-h.x)/m)%d,x=Math.round((s.xmax-h.x)/m)%d,w=Math.round((h.y-s.ymax)/y)%p,v=Math.round((h.y-s.ymin)/y)%p,b=r===f.minCol?g:0,I=t===f.minRow?w:0,_=r===f.maxCol?x:d,C=t===f.maxRow?v:p;return(0,ne.pW)(u,{x:b,y:I},{width:_-b,height:C-I}),u}getSliceIndex(e){if(!this._slices||(0,o.Wi)(e)||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const r=this._slices[e].multidimensionalDefinition;if(r.length===t.length&&!r.some((e=>{const r=t.filter((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName))[0];return!r||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(r.values[0])?`${r.values[0][0]}-${r.values[0][1]}`:r.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const r=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>{var t;return null==(t=e.data)?void 0:t.statistics})),n=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>{var t;return null==(t=e.data)?void 0:t.histograms})),i=await Promise.all([r,n]);return i[0]&&i[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:i[0]||null,histograms:i[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let r=this.identifyPixelLocation(e,0,(0,o.Wg)(t.datumTransformation));if(null===r)return null;let n=0;const{maximumPyramidLevel:i}=this.rasterInfo.storageInfo;let s=i-n+this._levelOffset;const a=r.srcLocation;for(;s>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(s,r.row,r.col,t))break}catch{}if(s--,n++,r=this.identifyPixelLocation(a,n,(0,o.Wg)(t.datumTransformation)),null===r)return null}return-1===s||null==r?null:n}async _fetchRasterInfo(e){const t=this.sourceJSON,r=Math.ceil((t.extent.xmax-t.extent.xmin)/t.pixelSizeX-.1),n=Math.ceil((t.extent.ymax-t.extent.ymin)/t.pixelSizeY-.1),i=F.Z.fromJSON(t.spatialReference||t.extent.spatialReference);if("Map"===this.tileType)return new J.Z({width:r,height:n,bandCount:3,extent:O.Z.fromJSON(t.extent),spatialReference:i,pixelSize:new $.Z({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:i}),pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}});const{slice:s,signal:a}=e,o=!!t.hasRasterAttributeTable&&this.request(this.url+"/rasterAttributeTable",{query:{slice:s,f:"json"},signal:a}).then((e=>ce.default.fromJSON(e.data))).catch((()=>null)),l=!!t.hasColormap&&this.request(this.url+"/colormap",{query:{slice:s,f:"json"},signal:a}).then((e=>{var t;return null==(t=e.data)?void 0:t.colormap})),c=!!t.hasHistograms&&this.request(this.url+"/histograms",{query:{slice:s,f:"json"},signal:a}).then((e=>{var t;return null==(t=e.data)?void 0:t.histograms})),u=this.request(this.url+"/keyProperties",{query:{f:"json"},signal:a}).then((e=>e.data)).catch((()=>{})),f=!!t.hasMultidimensions&&this._fetchMultidimensionalInfo(),h=!!t.hasMultidimensions&&this.request(this.url+"/slices",{query:{f:"json"},signal:a}).then((e=>e.data&&e.data.slices)).catch((()=>{}));return Promise.all([o,l,c,u,f,h]).then((e=>{let s=null;if(t.minValues&&t.minValues.length===t.bandCount){s=[];for(let e=0;e<t.minValues.length;e++)s.push({min:t.minValues[e],max:t.maxValues[e],avg:t.meanValues[e],stddev:t.stdvValues[e]})}return this._slices=e[5]||null,new J.Z({width:r,height:n,bandCount:t.bandCount,extent:O.Z.fromJSON(t.extent),spatialReference:i,pixelSize:new $.Z({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:i}),pixelType:t.pixelType.toLowerCase(),statistics:s,attributeTable:e[0]||null,colormap:e[1]||null,histograms:e[2]||null,keyProperties:e[3]||{},multidimensionalInfo:e[4]||null})}))}async _fetchMultidimensionalInfo(e){var t;const r=await this.request(this.url+"/multidimensionalInfo",{query:{f:"json"},signal:e}).then((e=>{var t;return null==(t=e.data)?void 0:t.multidimensionalInfo}));return null!=(t=r.variables)&&t.length&&r.variables.forEach((e=>{var t;null!=(t=e.statistics)&&t.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation}))})),r}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_fixGCSShift(e){const{extent:t,spatialReference:r}=e;0===t.xmin&&360===t.xmax&&r.wkid&&r.isGeographic&&(e.nativeExtent=e.extent,e.transform=new Oe.Z,e.extent=e.transform.forwardTransform(t))}};(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],Fe.prototype,"datasetFormat",void 0),(0,n._)([(0,u.Cb)()],Fe.prototype,"tileType",void 0),Fe=(0,n._)([(0,p.j)("esri.layers.support.rasterDatasets.ImageServerRaster")],Fe);const Ee=Fe;var Ze=r(54163),Ne=r(48279);const Be=new Map;Be.set("Int8","s8"),Be.set("UInt8","u8"),Be.set("Int16","s16"),Be.set("UInt16","u16"),Be.set("Int32","s32"),Be.set("UInt32","u32"),Be.set("Float32","f32"),Be.set("Float64","f32"),Be.set("Double64","f32");const De=new Map;De.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),De.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),De.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),De.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let ze=class extends se{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async open(e){var t;await this.init(),this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const r=e?(0,o.Wg)(e.signal):null,n=await this.request(this.url,{responseType:"xml",signal:r}),{rasterInfo:i,files:s}=this._parseHeader(n.data);if(-1===(null==(t=this.ioConfig.skipExtensions)?void 0:t.indexOf("aux.xml"))){const t=await this._fetchAuxiliaryData(e);var a;null!=t&&(i.statistics=null!=(a=t.statistics)?a:i.statistics,i.histograms=t.histograms,t.histograms&&!(0,o.pC)(i.statistics)&&(i.statistics=(0,ne.Oh)(t.histograms)))}this._set("rasterInfo",i),this._files=s;const l=await this.request(s.index,{responseType:"array-buffer",signal:r});this._storageIndex=this._parseIndex(l.data);const{blockWidth:c,blockHeight:u}=this.rasterInfo.storageInfo,f=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:h,height:d}=this.rasterInfo,p=[],m=this._getBandSegmentCount();let y=0,g=-1;for(;y<this._storageIndex.length;){g++;const e=Math.ceil(h/c/f**g)-1,t=Math.ceil(d/u/f**g)-1;y+=(e+1)*(t+1)*m*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,g>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=g),this.updateTileInfo()}async fetchRawTile(e,t,r,n={}){const{blockWidth:i,blockHeight:s,blockBoundary:a}=this.rasterInfo.storageInfo,l=a[e];if(!l||l.maxRow<t||l.maxCol<r||l.minRow>t||l.minCol>r)return null;const{bandCount:c,pixelType:u}=this.rasterInfo,{ranges:f,actualTileWidth:h,actualTileHeight:d}=this._getTileLocation(e,t,r);if(!f||0===f.length)return null;if(0===f[0].from&&0===f[0].to){const e=new Uint8Array(i*s);return new Ze.Z({width:i,height:s,pixels:null,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,m=this._getBandSegmentCount(),y=[];let g=0;for(g=0;g<m;g++)(!p||p.indexOf[g]>-1)&&y.push(this.request(this._files.data,{range:{from:f[g].from,to:f[g].to},responseType:"array-buffer",signal:n.signal}));const x=await Promise.all(y),w=x.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),v=new Uint8Array(w);let b=0;for(g=0;g<m;g++)v.set(new Uint8Array(x[g].data),b),b+=x[g].data.byteLength;const I=De.get(this.rasterInfo.storageInfo.compression).decoderFormat,_=await this.decodePixelBlock(v.buffer,{width:i,height:s,format:I,planes:(null==p?void 0:p.length)||c,pixelType:u});if((0,o.pC)(this.rasterInfo.noDataValue)&&"lerc"!==I&&!_.mask){const e=this.rasterInfo.noDataValue[0];if(null!=e){const t=_.width*_.height,r=new Uint8Array(t);if(Math.abs(e)>1e24)for(g=0;g<t;g++)Math.abs((_.pixels[0][g]-e)/e)>1e-6&&(r[g]=1);else for(g=0;g<t;g++)_.pixels[0][g]!==e&&(r[g]=1);_.mask=r}}let C=0,R=0;if(h!==i||d!==s){let e=_.mask;if(e)for(g=0;g<s;g++)if(R=g*i,g<d)for(C=h;C<i;C++)e[R+C]=0;else for(C=0;C<i;C++)e[R+C]=0;else for(e=new Uint8Array(i*s),_.mask=e,g=0;g<d;g++)for(R=g*i,C=0;C<h;C++)e[R+C]=1}return _}_parseIndex(e){if(e.byteLength%16>0)throw"invalid array buffer must be multiples of 16";let t,r,n,i,s,a;if(Ne.f){for(r=new Uint8Array(e),i=new ArrayBuffer(e.byteLength),n=new Uint8Array(i),s=0;s<e.byteLength/4;s++)for(a=0;a<4;a++)n[4*s+a]=r[4*s+3-a];t=new Uint32Array(i)}else t=new Uint32Array(e);return t}_getBandSegmentCount(){return De.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,r){const{blockWidth:n,blockHeight:i,pyramidScalingFactor:s}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,f,h=0,d=0;for(f=0;f<e;f++)d=s**f,c=Math.ceil(a/n/d),u=Math.ceil(o/i/d),h+=c*u;d=s**e,c=Math.ceil(a/n/d),u=Math.ceil(o/i/d),h+=t*c+r,h*=4*l;const p=this._storageIndex.subarray(h,h+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=p[4*e+0]*2**32+p[4*e+1],y=m+p[4*e+2]*2**32+p[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:r<c-1?n:Math.ceil(a/d)-n*(c-1),actualTileHeight:t<u-1?i:Math.ceil(o/d)-i*(u-1)}}_parseHeader(e){const t=ye(e,"MRF_META/Raster");if(!t)throw new a.Z("mrf:open","not a valid MRF format");const r=ye(t,"Size"),n=parseInt(r.getAttribute("x"),10),i=parseInt(r.getAttribute("y"),10),s=parseInt(r.getAttribute("c"),10),o=(ge(t,"Compression")||"none").toLowerCase();if(!De.has(o))throw new a.Z("mrf:open","currently does not support compression "+o);const l=ge(t,"DataType")||"UInt8",c=Be.get(l);if(null==c)throw new a.Z("mrf:open","currently does not support pixel type "+l);const u=ye(t,"PageSize"),f=parseInt(u.getAttribute("x"),10),h=parseInt(u.getAttribute("y"),10),d=ye(t,"DataValues");let p,m;if(d&&(m=d.getAttribute("NoData"),null!=m&&(p=m.trim().split(" ").map((e=>parseFloat(e))))),ye(e,"MRF_META/CachedSource"))throw new a.Z("mrf:open","currently does not support MRF referencing other data files");const y=ye(e,"MRF_META/GeoTags"),g=ye(y,"BoundingBox");let x,w=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),r=parseFloat(g.getAttribute("maxx")),n=parseFloat(g.getAttribute("maxy")),i=ge(y,"Projection")||"";let s;if("LOCAL_CS[]"!==i)if(i.toLowerCase().startsWith("epsg:")){const e=Number(i.slice(5));isNaN(e)||0===e||(s=new F.Z({wkid:e}))}else s=_e(i);else w=!0,s=new F.Z({wkid:3857});x=new O.Z(e,t,r,n),x.spatialReference=s}else w=!0,x=new O.Z({xmin:-.5,ymin:.5-i,xmax:n-.5,ymax:.5,spatialReference:new F.Z({wkid:3857})});const v=ye(e,"MRF_META/Rsets"),b=parseInt(v&&v.getAttribute("scale")||"2",10),I=x.spatialReference,_=new j.Z({origin:new $.Z({x:x.xmin,y:x.ymax,spatialReference:I}),blockWidth:f,blockHeight:h,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:o,pyramidScalingFactor:b}),C=new $.Z({x:x.width/n,y:x.height/i,spatialReference:I}),R=new J.Z({width:n,height:i,extent:x,isPseudoSpatialReference:w,spatialReference:I,bandCount:s,pixelType:c,pixelSize:C,noDataValue:p,storageInfo:_}),S=ge(e,"datafile"),k=ge(e,"IndexFile");return{rasterInfo:R,files:{mrf:this.url,index:k||this.url.replace(".mrf",".idx"),data:S||this.url.replace(".mrf",De.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:null==e?void 0:e.signal});return Re(t)}catch{return null}}};(0,n._)([(0,u.Cb)()],ze.prototype,"_files",void 0),(0,n._)([(0,u.Cb)()],ze.prototype,"_storageIndex",void 0),(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],ze.prototype,"datasetFormat",void 0),ze=(0,n._)([(0,p.j)("esri.layers.support.rasterIO.MRFRaster")],ze);const Ae=ze;var He=r(94793),Le=r(9832);const We=function(e,t){const r=e.get(t);return r&&r.values},Je=function(e,t){const r=e.get(t);return r&&r.values[0]};let je=class extends se{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this.datasetFormat="TIFF"}async open(e){var t,r,n;await this.init();const i=e?(0,o.Wg)(e.signal):null,{data:s}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:i});if(!s)throw new a.Z("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const{littleEndian:l,firstIFD:c,isBigTiff:u}=(0,He.cK)(s),f=[];await this._readIFDs(f,s,l,c,0,u?8:4,i);const h=(0,He.FI)(f),{width:d,height:p,tileWidth:m,tileHeight:y,planes:g,pixelType:x,compression:w,firstPyramidLevel:v,maximumPyramidLevel:b,pyramidBlockWidth:I,pyramidBlockHeight:_,tileBoundary:C,affine:R,metadata:S}=h;let k=_e((null==(t=h.extent.spatialReference)?void 0:t.wkt)||(null==(r=h.extent.spatialReference)?void 0:r.wkid)),T=!1;null==k&&(T=!0,k=new F.Z({wkid:3857}));const M=new O.Z({...h.extent,spatialReference:k}),P=new $.Z(M?{x:M.xmin,y:M.ymax,spatialReference:k}:{x:0,y:0}),E=new j.Z({blockWidth:m,blockHeight:y,pyramidBlockWidth:I,pyramidBlockHeight:_,compression:w,origin:P,firstPyramidLevel:v,maximumPyramidLevel:b,blockBoundary:C}),Z=new $.Z({x:(M.xmax-M.xmin)/d,y:(M.ymax-M.ymin)/p,spatialReference:k}),N=S?{BandProperties:S.bandProperties,DataType:S.dataType}:{},B=new J.Z({width:d,height:p,bandCount:g,pixelType:x,compression:w,pixelSize:Z,storageInfo:E,spatialReference:k,isPseudoSpatialReference:T,keyProperties:N,extent:M,statistics:S?S.statistics:null});if(null!=R&&R.length&&(B.nativeExtent=new O.Z({xmin:-.5,ymin:.5-p,xmax:d-.5,ymax:.5,spatialReference:k}),B.transform=new be.Z({polynomialOrder:1,forwardCoefficients:[R[2]+R[0]/2,R[5]-R[3]/2,R[0],R[3],-R[1],-R[4]]}),B.extent=B.transform.forwardTransform(B.nativeExtent),B.pixelSize=new $.Z({x:(M.xmax-M.xmin)/d,y:(M.ymax-M.ymin)/p,spatialReference:k}),E.origin.x=-.5,E.origin.y=.5),null==(n=this.ioConfig.skipExtensions)||!n.includes("aux.xml")){const t=await this._fetchAuxiliaryData(e);if(null!=t){var D;if(B.statistics=null!=(D=t.statistics)?D:B.statistics,B.histograms=t.histograms,t.histograms&&!(0,o.pC)(B.statistics)&&(B.statistics=(0,ne.Oh)(t.histograms)),t.transform&&!R){B.transform=t.transform,B.nativeExtent=B.extent;const e=B.transform.forwardTransform(B.nativeExtent);B.pixelSize=new $.Z({x:(e.xmax-e.xmin)/d,y:(e.ymax-e.ymin)/p,spatialReference:k}),B.extent=e}B.spatialReference||(B.spatialReference=t.spatialReference)}}if(this._set("rasterInfo",B),this._headerInfo={littleEndian:l,isBigTiff:u,ifds:f,...h},!this._headerInfo.isSupported)throw new a.Z("tiffraster:open","this tiff is not supported: "+this._headerInfo.message);this.updateTileInfo()}async fetchRawTile(e,t,r,n={}){var i;if(null==(i=this._headerInfo)||!i.isSupported||this.isBlockOutside(e,t,r))return null;const s=this._getTileLocation(e,t,r);if(!s)return null;const{ranges:a,actualTileWidth:o,actualTileHeight:l,ifd:c}=s,u=a.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:n.signal}))),f=await Promise.all(u),h=f.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),d=1===f.length?f[0].data:new ArrayBuffer(h),p=[0],m=[0];if(f.length>1){const e=new Uint8Array(d);for(let t=0,r=0;t<f.length;t++){const n=f[t].data;e.set(new Uint8Array(n),r),p[t]=r,r+=n.byteLength,m[t]=n.byteLength}}const{blockWidth:y,blockHeight:g}=this.getBlockWidthHeight(e),x=await this.decodePixelBlock(d,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:p,sizes:m},width:y,height:g,planes:null,pixelType:null});let w,v,b;if(o!==y||l!==g){let e=x.mask;if(e)for(w=0;w<g;w++)if(b=w*y,w<l)for(v=o;v<y;v++)e[b+v]=0;else for(v=0;v<y;v++)e[b+v]=0;else for(e=new Uint8Array(y*g),x.mask=e,w=0;w<l;w++)for(b=w*y,v=0;v<o;v++)e[b+v]=1}return x}async _readIFDs(e,t,r,n,i,s=4,a){if(!n)return null;(n>=t.byteLength||n<0)&&(t=(await this.request(this.url,{range:{from:n+i,to:n+i+this._bufferSize},responseType:"array-buffer",signal:a})).data,i=n+i,n=0);const o=await this._readIFD(t,r,n,i,Le.Z.TIFF_TAGS,s,a);if(e.push(o.ifd),!o.nextIFD)return null;await this._readIFDs(e,t,r,o.nextIFD-i,i,s,a)}async _readIFD(e,t,r,n,i=Le.Z.TIFF_TAGS,s=4,a){if(!e)return null;const o=(0,He.vr)(e,t,r,n,i,s);if(o.success){const r=[];if(o.ifd.forEach((e=>{e.values||r.push(e)})),r.length>0){const i=r.map((e=>e.offlineOffsetSize)),s=Math.min.apply(null,i.map((e=>e[0])));if(Math.min.apply(null,i.map((e=>e[0]+e[1])))-s<=this._bufferSize){const{data:i}=await this.request(this.url,{range:{from:s,to:s+this._bufferSize},responseType:"array-buffer",signal:a});e=i,n=s,r.forEach((r=>(0,He.Dq)(e,t,r,n)))}}if(o.ifd.has("GEOKEYDIRECTORY")){const r=o.ifd.get("GEOKEYDIRECTORY"),i=r.values;if(i&&i.length>4){const s=i[0]+"."+i[1]+"."+i[2],o=await this._readIFD(e,t,r.valueOffset+6-n,n,Le.Z.GEO_KEYS,2,a);r.data=o.ifd,r.data&&r.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[s]})}}return o}if(o.requiredBufferSize&&o.requiredBufferSize!==e.byteLength){const r=await this.request(this.url,{range:{from:n,to:n+o.requiredBufferSize+4},responseType:"array-buffer",signal:a});return(e=r.data).byteLength<o.requiredBufferSize?null:this._readIFD(e,t,0,n,Le.Z.TIFF_TAGS,4,a)}}_getTileLocation(e,t,r){const{firstPyramidLevel:n,blockBoundary:i}=this.rasterInfo.storageInfo,s=0===e?0:e-(n-1),a=this._headerInfo.ifds[s];if(!a)return null;const o=(0,He.If)(a,this._headerInfo),l=We(a,"TILEOFFSETS");if(void 0===l)return null;const c=We(a,"TILEBYTECOUNTS"),{minRow:u,minCol:f,maxRow:h,maxCol:d}=i[s];if(t>h||r>d||t<u||r<f)return null;const p=Je(a,"IMAGEWIDTH"),m=Je(a,"IMAGELENGTH"),y=Je(a,"TILEWIDTH"),g=Je(a,"TILELENGTH"),x=o?this.rasterInfo.bandCount:1,w=x*t*(d+1)+r,v=[{from:l[w],to:l[w+x-1]+c[w+x-1]-1}];if(o){let e=!0;for(let t=0;t<x;t++)if(l[w+t]+c[w+t]!==l[w+t+1]){e=!1;break}if(!e)for(let e=0;e<x;e++)v[e]={from:l[w+e],to:l[w+e]+c[w+e]-1}}const b=l[w],I=c[w];return null==b||null==I?null:{ranges:v,ifd:a,actualTileWidth:r===d?p%y:y,actualTileHeight:t===h?m%g:g}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:null==e?void 0:e.signal});return Re(t)}catch{return null}}};(0,n._)([(0,u.Cb)()],je.prototype,"_files",void 0),(0,n._)([(0,u.Cb)()],je.prototype,"_headerInfo",void 0),(0,n._)([(0,u.Cb)()],je.prototype,"_bufferSize",void 0),(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],je.prototype,"datasetFormat",void 0),je=(0,n._)([(0,p.j)("esri.layers.support.rasterDatasets.TIFFRaster")],je);const qe=je,Ue=new Map;Ue.set("CRF",{desc:"Cloud Raster Format",constructor:he}),Ue.set("MRF",{desc:"Meta Raster Format",constructor:Ae}),Ue.set("TIFF",{desc:"GeoTIFF",constructor:qe}),Ue.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Ee}),Ue.set("JPG",{desc:"JPG Raster Format",constructor:ke}),Ue.set("PNG",{desc:"PNG Raster Format",constructor:ke}),Ue.set("GIF",{desc:"GIF Raster Format",constructor:ke}),Ue.set("BMP",{desc:"BMP Raster Format",constructor:ke});var Ge=r(32163);let $e=class extends((0,y.h)((0,z.M)((0,N.q)((0,B.I)((0,g.N)(Z((0,A.n)((0,D.Q)((0,l.R)(m.Z)))))))))){constructor(...e){super(...e),this.bandIds=null,this.interpolation=null,this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.title=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,o.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(c.r9).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){var e,t;let r=[new H.Z({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"})];const n=null==(e=this.rasterInfo)||null==(t=e.attributeTable)?void 0:t.fields;if(n){const e=n.filter((e=>"oid"!==e.type&&"value"!==e.name.toLowerCase())).map((e=>{const t=e.clone();return t.name="Raster."+e.name,t}));r=r.concat(e)}const i=this.rasterInfo.dataType;if(("vector-magdir"===i||"vector-uv"===i)&&(0,o.pC)(this.rasterInfo.multidimensionalInfo)){var s;const e=null==(s=this.rasterInfo.multidimensionalInfo.variables[0].unit)?void 0:s.trim(),t="Magnitude"+(e?` (${e})`:"");r.push(new H.Z({name:"Raster.Magnitude",alias:t,domain:null,editable:!1,type:"double"})),r.push(new H.Z({name:"Raster.Direction",alias:"Direction (°)",domain:null,editable:!1,type:"double"}))}return r}set renderer(e){this._set("renderer",e),this.updateRenderer()}readRenderer(e,t,r){const n=t&&t.layerDefinition&&t.layerDefinition.drawingInfo&&t.layerDefinition.drawingInfo.renderer,i=(0,s.ij)(n,r)||void 0;if(null!=i)return i}createPopupTemplate(e){return(0,Ge.eZ)({fields:this.rasterFields,title:this.title},e)}write(e,t){const{raster:r}=this;if(this.loaded?"RasterTileServer"===r.datasetFormat&&("Raster"===r.tileType||"Map"===r.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t&&t.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){this.raster?(this.raster.rasterInfo||await this.raster.open(),this.url=this.raster.url):this.raster=await class{static get supportedFormats(){const e=new Set;return Ue.forEach(((t,r)=>e.add(r))),e}static async open(e){const{url:t,ioConfig:r,sourceJSON:n}=e;let i=e.datasetFormat;null==i&&t.lastIndexOf(".")&&(i=t.slice(t.lastIndexOf(".")+1).toUpperCase()),"OVR"===i||"TIF"===i?i="TIFF":"JPG"!==i&&"JPEG"!==i&&"JFIF"!==i||(i="JPG"),t.toLowerCase().indexOf("/imageserver")>-1&&-1===t.toLowerCase().indexOf("/wcsserver")&&(i="RasterTileServer");const s={url:t,sourceJSON:n,datasetFormat:i,ioConfig:r||{bandIds:null,sampling:null}};let o,l;if(this.supportedFormats.has(i))return o=Ue.get(i).constructor,l=new o(s),await l.open({signal:e.signal}),l;if(i)throw new a.Z("rasterfactory:open","not a supported format "+i);const c=Array.from(Ue.keys());let u=0;const f=function(){return i=c[u++],i?(o=Ue.get(i).constructor,l=new o(s),l.open({signal:e.signal}).then((()=>l)).catch((()=>f()))):null};return f()}static register(e,t,r){Ue.has(e.toUpperCase())||Ue.set(e.toUpperCase(),{desc:t,constructor:r})}}.open({url:this.url,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:e});const{rasterInfo:t}=this.raster;if(!t)throw new a.Z("imagery-tile-layer:load","cannot load resources on "+this.url);this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON&&(this._set("version",this.sourceJSON.currentVersion),this._set("copyright",this.sourceJSON.copyrightText),this.sourceJSON.timeInfo&&this._set("timeInfo",W.Z.fromJSON(this.sourceJSON.timeInfo))),null==this.title&&(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.watch("customParameters",(e=>this.raster.ioConfig.customFetchParameters=e))}};(0,n._)([(0,u.Cb)({type:[f.z8],json:{write:{overridePolicy(){var e;return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==(null==(e=this.bandIds)?void 0:e.join(","))}}}}})],$e.prototype,"bandIds",void 0),(0,n._)([(0,u.Cb)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,h.J)(L.c)],$e.prototype,"interpolation",void 0),(0,n._)([(0,u.Cb)({json:{write:!0}})],$e.prototype,"multidimensionalDefinition",void 0),(0,n._)([(0,u.Cb)(_.rn)],$e.prototype,"legendEnabled",void 0),(0,n._)([(0,u.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],$e.prototype,"isReference",void 0),(0,n._)([(0,u.Cb)({type:["show","hide"]})],$e.prototype,"listMode",void 0),(0,n._)([(0,u.Cb)()],$e.prototype,"sourceJSON",void 0),(0,n._)([(0,u.Cb)({readOnly:!0})],$e.prototype,"version",void 0),(0,n._)([(0,u.Cb)()],$e.prototype,"title",void 0),(0,n._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],$e.prototype,"type",void 0),(0,n._)([(0,u.Cb)({type:["ArcGISTiledImageServiceLayer"]})],$e.prototype,"operationalLayerType",void 0),(0,n._)([(0,u.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,r){t[r]=!e}}}})],$e.prototype,"popupEnabled",void 0),(0,n._)([(0,u.Cb)({type:i.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],$e.prototype,"popupTemplate",void 0),(0,n._)([(0,u.Cb)({readOnly:!0})],$e.prototype,"defaultPopupTemplate",null),(0,n._)([(0,u.Cb)({readOnly:!0,type:[H.Z]})],$e.prototype,"fields",void 0),(0,n._)([(0,u.Cb)({readOnly:!0,type:[H.Z]})],$e.prototype,"rasterFields",null),(0,n._)([(0,u.Cb)({types:s.dr,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){var e;const t="raster-stretch"===(null==(e=this.renderer)?void 0:e.type)&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!t}}},origins:{"web-scene":{types:s.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"animated-flow"!==e.type})}}}}})],$e.prototype,"renderer",null),(0,n._)([(0,d.r)("renderer")],$e.prototype,"readRenderer",null),$e=(0,n._)([(0,p.j)("esri.layers.ImageryTileLayer")],$e);const Ve=$e},73506:(e,t,r)=>{r.d(t,{Qp:()=>R,P_:()=>C,ut:()=>v,Hq:()=>_,zD:()=>d,tB:()=>x,nF:()=>y,VO:()=>p,Mk:()=>c,kZ:()=>k,kr:()=>T}),r(66577);var n=r(20102),i=r(70586),s=r(67900),a=r(90411),o=r(6570),l=r(13473);function c(e,t,r){return!(0,a.Up)(e,t,r)}function u(e,t,r){const i=c(e,t,r);if(i&&!(0,a.kR)())throw new n.Z("rasterprojectionhelper-project","projection engine is not loaded");return i}const f=function(e,t,r){const n=(e[0]+e[4]+e[4*t.cols]+e[4*t.cols+4])/4,i=(e[1]+e[5]+e[4*t.rows+1]+e[4*t.rows+5])/4,s=(e[4*t.cols]-e[0]+e[4*t.cols+4]-e[4])/r[0]*.5,a=(e[4*t.cols+1]-e[1]+e[4*t.cols+5]-e[5])/r[1]*.5;return[0===s||isNaN(s)?0:Math.abs(n-e[2*t.rows+2])/Math.abs(s),0===a||isNaN(a)?0:Math.abs(i-e[2*t.rows+3])/Math.abs(a)]},h={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244};async function d(){if((0,a.kR)())return null;await(0,a.zD)()}function p(e,t,r,n=null){if(e.spatialReference.equals(t))return e;u(e.spatialReference,t,n);const s=r.center,l=new o.Z({xmin:s.x-e.x/2,xmax:s.x+e.x/2,ymin:s.y-e.y/2,ymax:s.y+e.y/2,spatialReference:e.spatialReference}),c=(0,a.iV)(l,t,n);return(0,i.Wi)(c)?null:{x:c.xmax-c.xmin,y:c.ymax-c.ymin}}function m(e,t=.01){return(0,s.c9)(e)?t/(0,s.c9)(e):0}function y(e,t,r=null,n=!0){const s=e.spatialReference;if(s.equals(t))return e;u(s,t,r);const o=(0,a.iV)(e,t,r);if(!n||!o)return o;const l=b(s,!0),c=b(t,!0),f=m(s);return f&&(0,i.pC)(l)&&(0,i.pC)(c)&&(o.x>0&&Math.abs(e.x-l[0])<f?o.x-=c[1]-c[0]:o.x<0&&Math.abs(e.x-l[1])<f&&(o.x+=c[1]-c[0])),o}function g(e){const t=v(e[0].spatialReference);if(e.length<2||!(0,i.pC)(t))return e[0];let{xmin:r,xmax:n,ymin:s,ymax:a}=e[0];for(let r=1;r<e.length;r++){const i=e[r];n=i.xmax+t*r,s=Math.min(s,i.ymin),a=Math.max(a,i.ymax)}return new o.Z({xmin:r,xmax:n,ymin:s,ymax:a,spatialReference:e[0].spatialReference})}function x(e,t,r=null,n=!0){if(e.spatialReference.equals(t))return e;const s=_(e),a=v(e.spatialReference,!0),l=v(t);if(0===s||(0,i.Wi)(a)||(0,i.Wi)(l))return w(e,t,r,n);const c=e.clone().normalize();if(1===c.length&&e.xmax<a&&e.xmax-a/2>m(e.spatialReference)){const{xmin:t,xmax:r}=e;for(let n=0;n<=s;n++){const i=0===n?t:-a/2,l=n===s?r-a*n:a/2;c[n]=new o.Z({xmin:i,xmax:l,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference})}}return g(c.map((e=>w(e,t,r,n))).filter((e=>!!e)))}function w(e,t,r=null,n=!0,s=!0){const o=e.spatialReference;if(o.equals(t))return e;u(o,t,r);const c=(0,a.iV)(e,t,r);if(s&&t.isWebMercator&&c&&(c.ymax=Math.min(20037508.342787,c.ymax),c.ymin=Math.max(-20037508.342787,c.ymin),c.ymin>=c.ymax))return null;if(!n||!c)return c;const f=b(o,!0),h=b(t,!0);if((0,i.Wi)(f)||(0,i.Wi)(h))return c;const d=m(o,.001),p=m(o,500),g=m(t,.001);if(Math.abs(c.xmin-h[0])<g&&Math.abs(c.xmax-h[1])<g){const n=Math.abs(e.xmin-f[0]),i=Math.abs(f[1]-e.xmax);if(n<d&&i>p){c.xmin=h[0];const n=[];n.push(new l.Z(e.xmax,e.ymin,o)),n.push(new l.Z(e.xmax,(e.ymin+e.ymax)/2,o)),n.push(new l.Z(e.xmax,e.ymax,o));const i=n.map((e=>y(e,t,r))).filter((e=>!isNaN(null==e?void 0:e.x))).map((e=>e.x));c.xmax=Math.max.apply(null,i)}if(i<d&&n>p){c.xmax=h[1];const n=[];n.push(new l.Z(e.xmin,e.ymin,o)),n.push(new l.Z(e.xmin,(e.ymin+e.ymax)/2,o)),n.push(new l.Z(e.xmin,e.ymax,o));const i=n.map((e=>y(e,t,r))).filter((e=>!isNaN(null==e?void 0:e.x))).map((e=>e.x));c.xmin=Math.min.apply(null,i)}}else{const e=m(t,.001);Math.abs(c.xmin-h[0])<e&&(c.xmin=h[0]),Math.abs(c.xmax-h[1])<e&&(c.xmax=h[1])}return c}function v(e,t=!1){const r=t?20037508.342787:20037508.342788905;return e.isWebMercator?2*r:e.wkid&&e.isGeographic?360:2*h[e.wkid]||null}function b(e,t=!1){if(e.isGeographic)return[-180,180];const r=v(e,t);return(0,i.pC)(r)?[-r/2,r/2]:null}function I(e,t,r,n){let i=(e-t)/r;return i-Math.floor(i)!=0?i=Math.floor(i):n&&(i-=1),i}function _(e,t=!1){const r=v(e.spatialReference);if(!(0,i.pC)(r))return 0;const n=t?0:-r/2;return I(e.xmax,n,r,!0)-I(e.xmin,n,r,!1)}function C(e){const t=e.storageInfo.origin.x,r=v(e.spatialReference,!0);if(!(0,i.pC)(r))return{originX:t,halfWorldWidth:null,pyramidsInfo:null};const n=r/2,{nativePixelSize:s,storageInfo:a,extent:o}=e,{maximumPyramidLevel:l,blockWidth:c,pyramidScalingFactor:u}=a;let f=s.x;const h=[],d=(0,i.pC)(e.transform)&&"gcs-shift"===e.transform.type,p=t+(d?0:n),m=d?r-t:n-t;for(let e=0;e<=l;e++){const e=(o.xmax-t)/f/c,r=e-Math.floor(e)==0?e:Math.ceil(e),n=m/f/c,i=n-Math.floor(n)==0?n:Math.ceil(n),s=Math.floor(p/f/c),a=Math.round(p/f)%c,l=(c-Math.round(m/f)%c)%c;h.push({resolutionX:f,blockWidth:c,datsetColumnCount:r,worldColumnCountFromOrigin:i,leftMargin:a,rightPadding:l,originColumnOffset:s}),f*=u}return{originX:t,halfWorldWidth:n,pyramidsInfo:h,hasGCSSShiftTransform:d}}function R(e){const t=e.isAdaptive&&null==e.spacing,r=e.spacing||[32,32];let n=S(e),i={cols:n.size[0]+1,rows:n.size[1]+1},s=f(n.offsets,i,r);const a=(s[0]+s[1])/2,o=n.outofBoundPointCount>0&&n.outofBoundPointCount<n.offsets.length/2;return t&&(o||a>4)&&(n=S({...e,spacing:[4,4]}),i={cols:n.size[0]+1,rows:n.size[1]+1},s=f(n.offsets,i,r)),n.error=s,n.coefficients=function(e,t,r){const{cols:n,rows:i}=t,s=new Float32Array((n-1)*(i-1)*2*6),a=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),o=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let t=0;t<n-1;t++){for(let r=0;r<i-1;r++){let l=t*i*2+2*r;const c=e[l],u=e[l+1],f=e[l+2],h=e[l+3];l+=2*i;const d=e[l],p=e[l+1],m=e[l+2],y=e[l+3];let g=0,x=12*(r*(n-1)+t);for(let e=0;e<3;e++)s[x++]=a[g++]*c+a[g++]*f+a[g++]*m;g=0;for(let e=0;e<3;e++)s[x++]=a[g++]*u+a[g++]*h+a[g++]*y;g=0;for(let e=0;e<3;e++)s[x++]=o[g++]*c+o[g++]*d+o[g++]*m;g=0;for(let e=0;e<3;e++)s[x++]=o[g++]*u+o[g++]*p+o[g++]*y}if(r)for(let e=0;e<s.length;e++)isNaN(s[e])&&(s[e]=-1)}return s}(n.offsets,i,o),n}function S(e){const{projectedExtent:t,srcBufferExtent:r,pixelSize:n,datumTransformation:s,rasterTransform:o}=e,c=t.spatialReference,f=r.spatialReference;u(c,f);const{xmin:h,ymin:d,xmax:p,ymax:m}=t,y=v(f),g=e.hasWrapAround||"gcs-shift"===(null==o?void 0:o.type),x=e.spacing||[32,32],w={x:x[0]*n.x,y:x[1]*n.y},b=Math.ceil((p-h)/w.x-.1/x[0])+1,I=Math.ceil((m-d)/w.y-.1/x[1])+1,_=w.x,C=w.y,R=[];let S,k=0;const T=[];for(let e=0;e<b;e++)for(let t=0;t<I;t++)T.push(new l.Z({x:h+_*e,y:m-C*t,spatialReference:c}));const M=function(e,t,r=null){const n=e[0].spatialReference;return n.equals(t)?e:(u(n,t,r),(0,a.iV)(e,t,r))}(T,f,s);for(let e=0;e<b;e++){const t=[];for(let n=0;n<I;n++){var P;let s=M[e*I+n];(0,i.pC)(y)&&(null==(P=s)?void 0:P.x)>r.xmax&&(s.x-=y),o&&(s=o.inverseTransform(s)),t.push(s),e>0&&g&&s&&S[n]&&(0,i.pC)(y)&&s.x<S[n].x&&(s.x+=y),s?(R.push((s.x-r.xmin)/(r.xmax-r.xmin)),R.push((r.ymax-s.y)/(r.ymax-r.ymin))):(R.push(NaN),R.push(NaN),k++)}S=t}return{offsets:R,error:null,coefficients:null,outofBoundPointCount:k,spacing:x,size:[b-1,I-1]}}function k(e){const t=e.clone().normalize();return 1===t.length?t[0]:g(t)}function T(e,t,r){const{storageInfo:n,pixelSize:s}=t;let a,o=!1;const{pyramidResolutions:c}=n;if((0,i.pC)(c)&&c.length){const n=(e.x+e.y)/2,i=c[c.length-1],u=(i.x+i.y)/2,f=(s.x+s.y)/2;if(n<=f)a=0;else if(n>=u)a=c.length,o=n/u>8;else{let e,t=f;for(let i=1;i<=c.length;i++){if(e=(c[i-1].x+c[i-1].y)/2,n<=e){n===e?a=i:"down"===r?(a=i-1,o=n/t>8):a="up"===r||n-t>e-n||n/t>2?i:i-1;break}t=e}}const h=0===a?s:c[a-1];return{pyramidLevel:a,pyramidResolution:new l.Z({x:h.x,y:h.y,spatialReference:t.spatialReference}),excessiveReading:o}}const u=Math.log(e.x/s.x)/Math.LN2,f=Math.log(e.y/s.y)/Math.LN2,h=t.storageInfo.maximumPyramidLevel||0;a="down"===r?Math.floor(Math.min(u,f)):"up"===r?Math.ceil(Math.max(u,f)):Math.round((u+f)/2),a<0?a=0:a>h&&(o=a>h+3,a=h);const d=2**a;return{pyramidLevel:a,pyramidResolution:new l.Z({x:d*t.nativePixelSize.x,y:d*t.nativePixelSize.y,spatialReference:t.spatialReference}),excessiveReading:o}}},48700:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(43697),i=r(96674),s=r(5600),a=(r(67676),r(80442),r(75215),r(52011));let o=class extends i.wq{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,n._)([(0,s.Cb)()],o.prototype,"affectsPixelSize",null),(0,n._)([(0,s.Cb)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,n._)([(0,a.j)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o);const l=o},29680:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(43697),i=r(5600),s=(r(67676),r(80442),r(75215),r(36030)),a=r(52011),o=r(48700);let l=class extends o.Z{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}};(0,n._)([(0,s.J)({GCSShiftXform:"gcs-shift"})],l.prototype,"type",void 0),(0,n._)([(0,i.Cb)()],l.prototype,"tolerance",void 0),l=(0,n._)([(0,a.j)("esri.layers.support.rasterTransforms.GCSShiftTransform")],l);const c=l},87390:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(43697),i=(r(66577),r(5600)),s=(r(67676),r(80442),r(75215),r(36030)),a=r(71715),o=r(52011),l=r(30556),c=r(48700),u=r(13473),f=r(6570);function h(e,t,r){const{x:n,y:i}=t;if(r<2)return{x:e[0]+n*e[2]+i*e[4],y:e[1]+n*e[3]+i*e[5]};if(2===r){const t=n*n,r=i*i,s=n*i;return{x:e[0]+n*e[2]+i*e[4]+t*e[6]+s*e[8]+r*e[10],y:e[1]+n*e[3]+i*e[5]+t*e[7]+s*e[9]+r*e[11]}}const s=n*n,a=i*i,o=n*i,l=s*n,c=s*i,u=n*a,f=i*a;return{x:e[0]+n*e[2]+i*e[4]+s*e[6]+o*e[8]+a*e[10]+l*e[12]+c*e[14]+u*e[16]+f*e[18],y:e[1]+n*e[3]+i*e[5]+s*e[7]+o*e[9]+a*e[11]+l*e[13]+c*e[15]+u*e[17]+f*e[19]}}function d(e,t,r){const{xmin:n,ymin:i,xmax:s,ymax:a,spatialReference:o}=t;let l=[];if(r<2)l.push({x:n,y:a}),l.push({x:s,y:a}),l.push({x:n,y:i}),l.push({x:s,y:i});else{let e=10;for(let t=0;t<e;t++)l.push({x:n,y:i+(a-i)*t/(e-1)}),l.push({x:s,y:i+(a-i)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:n+(s-n)*t/e,y:i}),l.push({x:n+(s-n)*t/e,y:a})}l=l.map((t=>h(e,t,r)));const c=l.map((e=>e.x)),u=l.map((e=>e.y));return new f.Z({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,u),ymax:Math.max.apply(null,u),spatialReference:o})}let p=class extends c.Z{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:r,coeffY:n}=t;if(null==r||!r.length||null==n||!n.length||r.length!==n.length)return null;const i=[];for(let e=0;e<r.length;e++)i.push(r[e]),i.push(n[e]);return i}writeForwardCoefficients(e,t,r){const n=[],i=[];for(let t=0;t<(null==e?void 0:e.length);t++)t%2==0?n.push(e[t]):i.push(e[t]);t.coeffX=n,t.coeffY=i}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,r,n,i,s,a]=e,o=n*a-s*i,l=s*i-n*a;return[(s*r-t*a)/o,(n*r-t*i)/l,a/o,i/l,-s/o,-n/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:r,inverseCoeffY:n}=t;if(null==r||!r.length||null==n||!n.length||r.length!==n.length)return null;const i=[];for(let e=0;e<r.length;e++)i.push(r[e]),i.push(n[e]);return i}writeInverseCoefficients(e,t,r){const n=[],i=[];for(let t=0;t<(null==e?void 0:e.length);t++)t%2==0?n.push(e[t]):i.push(e[t]);t.inverseCoeffX=n,t.inverseCoeffY=i}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=h(this.forwardCoefficients,e,this.polynomialOrder);return new u.Z({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=h(this.inverseCoefficients,e,this.polynomialOrder);return new u.Z({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}};(0,n._)([(0,i.Cb)({json:{write:!0}})],p.prototype,"polynomialOrder",void 0),(0,n._)([(0,i.Cb)()],p.prototype,"forwardCoefficients",void 0),(0,n._)([(0,a.r)("forwardCoefficients",["coeffX","coeffY"])],p.prototype,"readForwardCoefficients",null),(0,n._)([(0,l.c)("forwardCoefficients")],p.prototype,"writeForwardCoefficients",null),(0,n._)([(0,i.Cb)({json:{write:!0}})],p.prototype,"inverseCoefficients",null),(0,n._)([(0,a.r)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],p.prototype,"readInverseCoefficients",null),(0,n._)([(0,l.c)("inverseCoefficients")],p.prototype,"writeInverseCoefficients",null),(0,n._)([(0,i.Cb)()],p.prototype,"affectsPixelSize",null),(0,n._)([(0,s.J)({PolynomialXform:"polynomial"})],p.prototype,"type",void 0),p=(0,n._)([(0,o.j)("esri.layers.support.rasterTransforms.PolynomialTransform")],p);const m=p},87521:(e,t,r)=>{r.d(t,{j:()=>d,c:()=>p});var n=r(29680),i=r(43697),s=(r(92604),r(75215),r(67676),r(80442),r(37697),r(36030)),a=r(52011),o=r(48700);let l=class extends o.Z{constructor(){super(...arguments),this.type="identity"}};(0,i._)([(0,s.J)({IdentityXform:"identity"})],l.prototype,"type",void 0),l=(0,i._)([(0,a.j)("esri.layers.support.rasterTransforms.IdentityTransform")],l);const c=l;var u=r(87390);const f={GCSShiftXform:n.Z,IdentityXform:c,PolynomialXform:u.Z},h=Object.keys(f);function d(e){const t=null==e?void 0:e.type;return!e||h.includes(t)}function p(e){if(!(null==e?void 0:e.type))return null;const t=f[null==e?void 0:e.type];if(t){const r=new t;return r.read(e),r}return null}},74889:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var n,i=r(43697),s=r(66577),a=r(1692),o=r(35454),l=r(96674),c=r(22974),u=r(70586),f=r(5600),h=(r(75215),r(71715)),d=r(52011),p=r(30556),m=r(82971),y=r(33955),g=r(1231);const x=new o.Xn({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=m.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const i=e[t],s=a.Z.fromJSON(i),o=i.geometry&&i.geometry.spatialReference;(0,u.pC)(s.geometry)&&!o&&(s.geometry.spatialReference=r),n.push(s)}return n}writeGeometryType(e,t,r,n){if(e)return void x.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(e&&(0,u.pC)(e.geometry))return void x.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,y.im)(e);return!r&&t.spatialReference&&(n.spatialReference=m.Z.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&(0,u.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,c.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e&&e[r];n.geometry=t&&t.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=s.length;e<t;e++)a((0,u.Wg)(s[e].geometry))||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,i],scale:[s,a]}=r,o=this._getHydrationFunction(e,(e=>e*s+n),(e=>i-e*a));for(const{geometry:e}of t)(0,u.pC)(e)&&o(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,i;const s=[];for(let a=0,o=e.length;a<o;a++){const o=e[a];if(a>0){const e=t(o[0]),a=r(o[1]);e===n&&a===i||(s.push([e-n,a-i]),n=e,i=a)}else n=t(o[0]),i=r(o[1]),s.push([n,i])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,y.oU)(e)?e.rings:e.paths,i=[];for(let e=0,s=n.length;e<s;e++){const s=n[e],a=this._quantizePoints(s,t,r);a&&i.push(a)}return i.length>0?((0,y.oU)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const n=(0,y.oU)(e)?e.rings:e.paths;let i,s;for(let e=0,a=n.length;e<a;e++){const a=n[e];for(let e=0,n=a.length;e<n;e++){const n=a[e];e>0?(i+=n[0],s+=n[1]):(i=n[0],s=n[1]),n[0]=t(i),n[1]=r(s)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const n=e.points;let i,s;for(let e=0,a=n.length;e<a;e++){const a=n[e];e>0?(i+=a[0],s+=a[1]):(i=a[0],s=a[1]),a[0]=t(i),a[1]=r(s)}}:void 0}};(0,i._)([(0,f.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,i._)([(0,f.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,f.Cb)({type:[a.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,i._)([(0,h.r)("features")],w.prototype,"readFeatures",null),(0,i._)([(0,f.Cb)({type:[g.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,i._)([(0,f.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:x.read}}})],w.prototype,"geometryType",void 0),(0,i._)([(0,p.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,i._)([(0,f.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,i._)([(0,f.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,i._)([(0,f.Cb)({types:s.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i._)([(0,h.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i._)([(0,f.Cb)({type:m.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i._)([(0,p.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,i._)([(0,f.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,i._)([(0,d.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w},89749:(e,t,r)=>{r.d(t,{t:()=>f});var n=r(43697),i=r(15923),s=r(61247),a=r(70586),o=r(17445),l=r(1654),c=r(5600),u=r(52011);let f=class extends i.Z{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new s.Z,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,t,r={}){const n=++this.handleId;r.sync||this._installSyncUpdatingWatch(e,n);const i=(0,o.YP)(e,t,r);return this.handles.add(i,n),{remove:()=>this.handles.remove(n)}}addOnCollectionChange(e,t,{initial:r=!1}={}){const n=++this.handleId;return this.handles.add([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.Z_),(0,o.on)(e,"change",t,{onListenerAdd:r?e=>t({added:e.items,removed:[],moved:[],target:e}):void 0})],n),{remove:()=>this.handles.remove(n)}}addPromise(e){if((0,a.Wi)(e))return e;const t=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(h)||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){const r=this._createSyncUpdatingCallback(),n=(0,o.YP)(e,r,{sync:!0,equals:()=>!1});return this.handles.add(n,t),n}_createSyncUpdatingCallback(){return()=>{this.handles.remove(h),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add((0,l.Os)((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(h))})),h)}}};(0,n._)([(0,c.Cb)({readOnly:!0})],f.prototype,"updating",void 0),f=(0,n._)([(0,u.j)("esri.views.support.WatchUpdatingTracking")],f);const h=-42;var d,p;(p=d||(d={}))[p.NONE=0]="NONE",p[p.SYNC=1]="SYNC",p[p.INIT=2]="INIT"}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9932],{10699:(e,t,r)=>{r.d(t,{I:()=>i});var o=r(43697),s=r(52011);let n=0;const i=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,o._)([(0,s.j)("esri.core.Identifiable")],t),t};let a=class extends(i(class{})){};a=(0,o._)([(0,s.j)("esri.core.Identifiable")],a)},16453:(e,t,r)=>{r.d(t,{R:()=>b,w:()=>w});var o=r(43697),s=r(15923),n=r(70586),i=r(41103),a=r(22974),l=r(31263);class c{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(l.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new c,r=this._originStores[l.s3.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,a.d9)(e),l.s3.DEFAULTS)}));for(let r=l.s3.SERVICE;r<l.kk;r++){const o=this._originStores[r];o&&o.forEach(((o,s)=>{e&&e.has(s)||t.set(s,(0,a.d9)(o),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=l.s3.USER){let o=this._originStores[r];if(o||(o=new Map,this._originStores[r]=o),o.set(e,t),!this._values.has(e)||(0,n.j0)(this._propertyOriginMap.get(e))<=r){const o=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),o!==t}return!1}delete(e,t=l.s3.USER){const r=this._originStores[t];if(!r)return;const o=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return o}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],o=r&&r.get(e),s=this._values.get(e);return this._values.set(e,o),this._propertyOriginMap.set(e,t),s!==o}originOf(e){return this._propertyOriginMap.get(e)||l.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var h=r(50549),d=r(1153),u=r(52011);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,n.j0)((0,d.vw)(this)),r=t.store,o=new c;t.store=o,(0,i.M)(t,r,o)}read(e,t){(0,h.ij)(this,e,t)}getAtOrigin(e,t){const r=g(this),o=(0,l.M9)(t);if("string"==typeof e)return r.get(e,o);const s={};return e.forEach((e=>{s[e]=r.get(e,o)})),s}originOf(e){return(0,l.x3)(this.originIdOf(e))}originIdOf(e){return g(this).originOf(e)}revert(e,t){const r=g(this),o=(0,l.M9)(t),s=(0,d.vw)(this);let n;n="string"==typeof e?"*"===e?r.keys(o):[e]:e,n.forEach((e=>{s.invalidate(e),r.revert(e,o),s.commit(e)}))}};return t=(0,o._)([(0,u.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function g(e){return(0,d.vw)(e).store}let y=class extends(p(s.Z)){};y=(0,o._)([(0,u.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var m=r(76169);const f=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,l.M9)(t))}write(e={},t){return(0,m.cW)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,d.vw)(this).setAtOrigin(e,t,(0,l.M9)(r))}removeOrigin(e){const t=v(this),r=(0,l.M9)(e),o=t.keys(r);for(const e of o)t.originOf(e)===r&&t.set(e,t.get(e,r),l.s3.USER)}updateOrigin(e,t){const r=v(this),o=(0,l.M9)(t),s=this.get(e);for(let t=o+1;t<l.kk;++t)r.delete(e,t);r.set(e,s,o)}toJSON(e){return this.write({},e)}};return t=(0,o._)([(0,u.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,d.vw)(e).store}const b=e=>{let t=class extends(f(p(e))){constructor(...e){super(...e)}};return t=(0,o._)([(0,u.j)("esri.core.MultiOriginJSONSupport")],t),t};let w=class extends(b(s.Z)){};w=(0,o._)([(0,u.j)("esri.core.MultiOriginJSONSupport")],w)},25045:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var o=r(40330),s=r(20102),n=r(91460),i=r(70586),a=r(95330),l=r(94362),c=r(17202);const h={statsWorker:()=>Promise.all([r.e(2785),r.e(6570),r.e(9928),r.e(2303),r.e(6841)]).then(r.bind(r,36841)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8227)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(2785),r.e(6570),r.e(9928),r.e(2303),r.e(7668),r.e(411),r.e(1534),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(966)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(8936)]).then(r.bind(r,18936)),ElevationSamplerWorker:()=>Promise.all([r.e(2785),r.e(6570),r.e(9928),r.e(411),r.e(2781),r.e(6481),r.e(6459),r.e(3553)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(2785),r.e(6570),r.e(9928),r.e(2303),r.e(7668),r.e(4588),r.e(411),r.e(1534),r.e(3485),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(5404)]).then(r.bind(r,2255)),GeoJSONSourceWorker:()=>Promise.all([r.e(2785),r.e(6570),r.e(9928),r.e(2303),r.e(7668),r.e(411),r.e(1534),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(6348),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(2785),r.e(6570),r.e(9928),r.e(2303),r.e(7668),r.e(411),r.e(1534),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(6348),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(2785),r.e(6570),r.e(9928),r.e(8961),r.e(147)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(2785),r.e(6570),r.e(9928),r.e(2303),r.e(7668),r.e(5638),r.e(4588),r.e(411),r.e(1534),r.e(3485),r.e(3578),r.e(8961),r.e(7054),r.e(4325),r.e(2730),r.e(7783)]).then(r.bind(r,97783)),PointCloudWorker:()=>Promise.all([r.e(2785),r.e(6570),r.e(9928),r.e(2303),r.e(411),r.e(9294),r.e(9474)]).then(r.bind(r,16583)),RasterWorker:()=>Promise.all([r.e(2785),r.e(6570),r.e(9928),r.e(2303),r.e(411),r.e(176),r.e(8034)]).then(r.bind(r,61576)),SceneLayerWorker:()=>r.e(1412).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(2785),r.e(6570),r.e(9928),r.e(2303),r.e(7668),r.e(411),r.e(1534),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(6348),r.e(4556),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(2303),r.e(4325),r.e(1785),r.e(6810),r.e(9872)]).then(r.bind(r,56456))},{CLOSE:d,ABORT:u,INVOKE:p,RESPONSE:g,OPEN_PORT:y,ON:m}=l.Cs;class f{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===l.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class v{constructor(e,t){this._port=e,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new f((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const o=new v(t.port1,{channel:t,client:r});return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=o),v.clients.set(o,r),t.port2}static loadWorker(e){const t=h[e];return t?t():Promise.resolve(null)}close(){this._post({type:d}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const o=r&&r.signal,n=r&&r.transferList;if(!this._port)return Promise.reject(new s.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,l.jt)();return new Promise(((r,s)=>{const l=(0,a.$F)(o,(()=>{var e;const t=this._outJobs.get(i);t&&(this._outJobs.delete(i),null==(e=t.abortHandle)||e.remove(),this._post({type:u,jobId:i}),s((0,a.zE)()))})),c={resolve:r,reject:s,abortHandle:l,debugInfo:e};this._outJobs.set(i,c),this._post({type:p,jobId:i,methodName:e,abortable:null!=o},t,n)}))}on(e,t){const r=new MessageChannel;function o(e){t(e.data)}return this._port.postMessage({type:l.Cs.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",o),r.port1.start(),{remove(){r.port1.postMessage({type:l.Cs.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",o)}}}openPort(){const e=new MessageChannel;return this._post({type:y,port:e.port2}),e.port1}_close(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{var t;null==(t=e.abortHandle)||t.remove(),e.reject((0,a.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,i.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,l.QM)(e);if(t)switch(t.type){case g:this._onResponseMessage(t);break;case p:this._invokeQueue.push(t);break;case u:this._onAbortMessage(t);break;case d:this._onCloseMessage();break;case y:this._onOpenPortMessage(t);break;case m:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,o=t.get(r);this._invokeQueue.push(e),o&&(o.controller&&o.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&v.clients.get(this)===e&&e.destroy(),v.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:o,abortable:s}=e,n=s?new AbortController:null,i=this._inJobs;let c,h=this._client,d=h[t];try{if(!d&&t&&-1!==t.indexOf(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)h=h[e[t]],d=h[e[t+1]]}if("function"!=typeof d)throw new TypeError(`${t} is not a function`);c=d.call(h,o,{client:this,signal:n?n.signal:null})}catch(e){return void this._post({type:g,jobId:r,error:(0,l.AB)(e)})}(0,a.y8)(c)?(i.set(r,{controller:n,promise:c}),c.then((e=>{i.has(r)&&(i.delete(r),this._post({type:g,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,a.D_)(e)||this._post({type:g,jobId:r,error:(0,l.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:g,jobId:r},c)}_onOpenPortMessage(e){new v(e.port,{client:this._client})}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),o=(0,n.on)(e.port,"message",(e=>{(0,l.QM)(e).type===l.Cs.CLOSE&&(o.remove(),r.remove(),t.close())}))}_onResponseMessage(e){var t;const{jobId:r,error:o,data:n}=e,i=this._outJobs;if(!i.has(r))return;const a=i.get(r);i.delete(r),null==(t=a.abortHandle)||t.remove(),o?a.reject(s.Z.fromJSON(JSON.parse(o))):a.resolve(n)}_post(e,t,r){return(0,l.oi)(this._port,e,t,r)}}v.kernelInfo={revision:c.$,version:o.i8,buildDate:c.r},v.clients=new Map},94362:(e,t,r)=>{r.d(t,{Cs:()=>o,jt:()=>a,oi:()=>c,QM:()=>h,AB:()=>l});var o,s,n=r(80442);(s=o||(o={}))[s.HANDSHAKE=0]="HANDSHAKE",s[s.OPEN=1]="OPEN",s[s.OPENED=2]="OPENED",s[s.RESPONSE=3]="RESPONSE",s[s.INVOKE=4]="INVOKE",s[s.ABORT=5]="ABORT",s[s.CLOSE=6]="CLOSE",s[s.OPEN_PORT=7]="OPEN_PORT",s[s.ON=8]="ON";let i=0;function a(){return i++}function l(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function c(e,t,r,s){if(t.type===o.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==o.INVOKE&&t.type!==o.RESPONSE)return void e.postMessage(t);let n;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(n=d(s),t.data=r):(n=d(r.transferList),t.data=r.result),n?e.postMessage(t,n):e.postMessage(t)}function h(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function d(e){if(!e||!e.length)return null;if((0,n.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},78346:(e,t,r)=>{r.d(t,{bA:()=>J});var o=r(20102),s=r(80442),n=r(95330),i=r(80903),a=r(25045),l=r(40330),c=r(92604),h=r(94362),d=r(99880),u=r(68773),p=(r(2587),r(17452));const g={};function y(e){var t;const r={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(r.async=!0),e.hasOwnProperty("isDebug")||(r.isDebug=!1),e.baseUrl||(r.baseUrl=g.baseUrl),null==(t=g.packages)||t.forEach((e=>{!function(e,t){for(const r of e)if(r.name===t.name)return;e.push(t)}(r.packages,e)})),r}var m=r(41213);class f{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class v{constructor(){this._dispatcher=new f,this._workerPostMessage({type:h.Cs.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,m.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,m.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,h.QM)(e);if(t&&t.type===h.Cs.OPEN){const{modulePath:e,jobId:r}=t;let o=await a.default.loadWorker(e);o||(o=await import(e));const s=a.default.connect(o);this._workerPostMessage({type:h.Cs.OPENED,jobId:r,data:s})}}}var b=r(70171),w=r(17202);const _=c.Z.getLogger("esri.core.workers"),{HANDSHAKE:S}=h.Cs;let k,M;const O="Failed to create Worker. Fallback to execute module in main thread";async function E(e){return new Promise((t=>{function r(s){const n=(0,h.QM)(s);n&&n.type===S&&(e.removeEventListener("message",r),e.removeEventListener("error",o),t(e))}function o(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",o),_.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new v).addEventListener("message",r),e.addEventListener("error",o)}e.addEventListener("message",r),e.addEventListener("error",o)}))}let L=0;const C=c.Z.getLogger("esri.core.workers"),{ABORT:I,INVOKE:j,OPEN:T,OPENED:N,RESPONSE:x}=h.Cs;class A{constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),C.error(e)}))}static async create(e){const t=await async function(){if(!(0,s.Z)("esri-workers")||((0,s.Z)("mozilla"),0))return E(new v);if(!k&&!M)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.replace('"{CONFIGURATION}"',`'${function(){let e;if(null!=u.Z.default){const t={...u.Z};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(u.Z));e.assetsPath=(0,p.hF)(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,b.Kd)(),e.has={"esri-csp-restrictions":(0,s.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,s.Z)("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":(0,s.Z)("esri-2d-query-centroid-enabled"),"featurelayer-pbf":(0,s.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,s.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,s.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,s.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,s.Z)("esri-atomics"),"esri-shared-array-buffer":(0,s.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,s.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,s.Z)("esri-workers-arraybuffer-transfer"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,p.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,p.hF)(e.workers.workerPath):e.workers.workerPath=(0,p.hF)((0,d.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=u.Z.workers.loaderConfig,r=y({baseUrl:null==t?void 0:t.baseUrl,locale:(0,b.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...null==t?void 0:t.has},map:{...null==t?void 0:t.map},paths:{...null==t?void 0:t.paths},packages:(null==t?void 0:t.packages)||[]}),o={version:l.i8,buildDate:w.r,revision:w.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:o})}()}'`);k=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){M=e||{}}let e;if(k)try{e=new Worker(k,{name:"esri-worker-"+L++})}catch(t){_.warn(O,M),e=new v}else _.warn(O,M),e=new v;return E(e)}();return new A(t,e)}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,o=(0,h.jt)();return new Promise(((t,s)=>{const i={resolve:t,reject:s,abortHandle:(0,n.$F)(r,(()=>{this._outJobs.delete(o),this._post({type:I,jobId:o})}))};this._outJobs.set(o,i),this._post({type:T,jobId:o,modulePath:e})}))}_onMessage(e){const t=(0,h.QM)(e);if(t)switch(t.type){case N:this._onOpenedMessage(t);break;case x:this._onResponseMessage(t);break;case I:this._onAbortMessage(t);break;case j:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,o=t.get(r);o&&(o.controller&&o.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:o,abortable:s}=e,i=s?new AbortController:null,a=this._inJobs,c=l.Nv[t];let d;try{if("function"!=typeof c)throw new TypeError(`${t} is not a function`);d=c.call(null,o,{signal:i?i.signal:null})}catch(e){return void this._post({type:x,jobId:r,error:(0,h.AB)(e)})}(0,n.y8)(d)?(a.set(r,{controller:i,promise:d}),d.then((e=>{a.has(r)&&(a.delete(r),this._post({type:x,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.D_)(e)||this._post({type:x,jobId:r,error:(0,h.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:x,jobId:r},d)}_onOpenedMessage(e){var t;const{jobId:r,data:o}=e,s=this._outJobs.get(r);s&&(this._outJobs.delete(r),null==(t=s.abortHandle)||t.remove(),s.resolve(o))}_onResponseMessage(e){var t;const{jobId:r,error:s,data:n}=e,i=this._outJobs.get(r);i&&(this._outJobs.delete(r),null==(t=i.abortHandle)||t.remove(),s?i.reject(o.Z.fromJSON(JSON.parse(s))):i.resolve(n))}_post(e,t,r){return(0,h.oi)(this.worker,e,t,r)}}let P=(0,s.Z)("esri-workers-debug")?1:(0,s.Z)("host-browser")?navigator.hardwareConcurrency-1:0;P||(P=(0,s.Z)("safari")&&(0,s.Z)("mac")||(0,s.Z)("trident")?7:2);let D=0;const R=[];async function Z(e,t){const r=new i.Z;return await r.open(e,t),r}async function J(e,t={}){if("string"!=typeof e)throw new o.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,s.Z)("host-webworker")&&!(0,s.Z)("esri-workers")&&(r="local"),"local"===r){let r=await a.default.loadWorker(e);r||(r=await import(e)),(0,n.k_)(t.signal);const o=t.client||r;return Z([a.default.connect(r)],{...t,client:o})}if(await async function(){if($)return $;U=new AbortController;const e=[];for(let t=0;t<P;t++){const r=A.create(t).then((e=>(R[t]=e,e)));e.push(r)}return $=Promise.all(e),$}(),(0,n.k_)(t.signal),"dedicated"===r){const r=D++%P;return Z([await R[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,P);if(r<P){const o=new Array(r);for(let s=0;s<r;++s){const r=D++%P;o[s]=R[r].open(e,t)}return Z(o,t)}}return Z(R.map((r=>r.open(e,t))),t)}let U,$=null},79235:(e,t,r)=>{r.d(t,{Z:()=>b});var o,s=r(43697),n=r(67676),i=r(35454),a=r(96674),l=r(67900),c=r(20941),h=r(5600),d=(r(80442),r(75215),r(71715)),u=r(52011),p=r(30556);const g=(0,i.wY)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=g.jsonValues.slice();(0,n.e$)(y,"orthometric");const m=(0,i.wY)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=o=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return g.write(e,t,r)}readHeightModel(e,t,r){return g.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new c.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||m.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new o({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new o({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new o;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new c.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,h.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,s._)([(0,p.c)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,s._)([(0,d.r)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,s._)([(0,h.Cb)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],f.prototype,"heightUnit",void 0),(0,s._)([(0,d.r)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,s._)([(0,d.r)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,s._)([(0,h.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,s._)([(0,d.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=o=(0,s._)([(0,u.j)("esri.geometry.HeightModelInfo")],f);const b=f},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var o=r(94443),s=r(3172),n=r(20102),i=r(70586);async function a(e){if((0,i.pC)(c.fetchBundleAsset))return c.fetchBundleAsset(e);const t=await(0,s.default)(e,{responseType:"text"});return JSON.parse(t.data)}class l{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let o;o="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=o,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const i=t.exec(r);if(!i)throw new n.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=i[1]?`${i[1]}/`:"",c=i[2],h=(0,o.Su)(s),d=`${l}${c}.json`,u=h?`${l}${c}_${h}.json`:d;let p;try{p=await a(e(u))}catch(t){if(u===d)throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{p=await a(e(d))}catch(e){throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return p}(this.getAssetUrl,this.matcher,e,t)}}const c={};var h,d=r(99880);(0,o.tz)((h={pattern:"esri/",location:d.V},new l(h)))},90344:(e,t,r)=>{r.d(t,{Ze:()=>m,p6:()=>f});var o=r(35454),s=r(70171);const n={year:"numeric",month:"numeric",day:"numeric"},i={year:"numeric",month:"long",day:"numeric"},a={year:"numeric",month:"short",day:"numeric"},l={year:"numeric",month:"long",weekday:"long",day:"numeric"},c={hour:"numeric",minute:"numeric"},h={...c,second:"numeric"},d={"short-date":n,"short-date-short-time":{...n,...c},"short-date-short-time-24":{...n,...c,hour12:!1},"short-date-long-time":{...n,...h},"short-date-long-time-24":{...n,...h,hour12:!1},"short-date-le":n,"short-date-le-short-time":{...n,...c},"short-date-le-short-time-24":{...n,...c,hour12:!1},"short-date-le-long-time":{...n,...h},"short-date-le-long-time-24":{...n,...h,hour12:!1},"long-month-day-year":i,"long-month-day-year-short-time":{...i,...c},"long-month-day-year-short-time-24":{...i,...c,hour12:!1},"long-month-day-year-long-time":{...i,...h},"long-month-day-year-long-time-24":{...i,...h,hour12:!1},"day-short-month-year":a,"day-short-month-year-short-time":{...a,...c},"day-short-month-year-short-time-24":{...a,...c,hour12:!1},"day-short-month-year-long-time":{...a,...h},"day-short-month-year-long-time-24":{...a,...h,hour12:!1},"long-date":l,"long-date-short-time":{...l,...c},"long-date-short-time-24":{...l,...c,hour12:!1},"long-date-long-time":{...l,...h},"long-date-long-time-24":{...l,...h,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":c,"long-time":h},u=(0,o.wY)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),p=(u.apiValues,u.toJSON.bind(u),u.fromJSON.bind(u),{ar:"ar-u-nu-latn-ca-gregory"});let g=new WeakMap,y=d["short-date-short-time"];function m(e){return d[e]||null}function f(e,t){return function(e){const t=e||y;if(!g.has(t)){const e=(0,s.Kd)(),r=p[(0,s.Kd)()]||e;g.set(t,new Intl.DateTimeFormat(r,t))}return g.get(t)}(t).format(e)}(0,s.Ze)((()=>{g=new WeakMap,y=d["short-date-short-time"]}))},94443:(e,t,r)=>{r.d(t,{ME:()=>p,Su:()=>g,tz:()=>u});var o=r(20102),s=r(95330),n=r(70171);const i=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,a={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function l(e){var t;return null!=(t=a[e])&&t}const c=[],h=new Map;function d(e){for(const t of h.keys())y(e.pattern,t)&&h.delete(t)}function u(e){return c.includes(e)||(d(e),c.unshift(e)),{remove(){const t=c.indexOf(e);t>-1&&(c.splice(t,1),d(e))}}}async function p(e){const t=(0,n.Kd)();h.has(e)||h.set(e,async function(e,t){const r=[];for(const o of c)if(y(o.pattern,e))try{return await o.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new o.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new o.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=h.get(e);return await m.add(r),r}function g(e){if(!i.test(e))return null;const[,t,r]=i.exec(e),o=t+(r?"-"+r.toUpperCase():"");return l(o)?o:l(t)?t:null}function y(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,n.Ze)((()=>{h.clear()}));const m=new class{constructor(){this._numLoading=0}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,s.dD)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18848:(e,t,r)=>{r.d(t,{sh:()=>l,uf:()=>c});var o=r(70586),s=r(70171);const n={ar:"ar-u-nu-latn"};let i=new WeakMap,a={};function l(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function c(e,t){return function(e){const t=e||a;if(!i.has(t)){const r=(0,s.Kd)(),o=n[(0,s.Kd)()]||r;i.set(t,new Intl.NumberFormat(o,e))}return(0,o.j0)(i.get(t))}(t).format(e)}(0,s.Ze)((()=>{i=new WeakMap,a={}}))},940:(e,t,r)=>{r.d(t,{n:()=>c});var o=r(92604),s=r(78286),n=r(19153),i=r(90344),a=r(18848);const l=o.Z.getLogger("esri.intl");function c(e,t,r={}){const{format:o={}}=r;return(0,n.gx)(e,(e=>function(e,t,r){let o,n;const i=e.indexOf(":");if(-1===i?o=e.trim():(o=e.slice(0,i).trim(),n=e.slice(i+1).trim()),!o)return"";const a=(0,s.hS)(o,t);if(null==a)return"";const l=r[n]||r[o];return l?h(a,l):n?d(a,n):u(a)}(e,t,o)))}function h(e,t){switch(t.type){case"date":return(0,i.p6)(e,t.intlOptions);case"number":return(0,a.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),u(e)}}function d(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.p6)(e);case"numberformat":return(0,a.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.p6)(e):/^numberformat/i.test(t)?(0,a.uf)(e):u(e)}}function u(e){switch(typeof e){case"string":return e;case"number":return(0,a.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.p6)(e):""}}},49932:(e,t,r)=>{r.r(t),r.d(t,{default:()=>I});var o=r(43697),s=r(3172),n=r(20102),i=r(92604),a=r(70586),l=r(16453),c=r(95330),h=r(17452),d=r(5600),u=r(67676),p=(r(80442),r(75215),r(71715)),g=r(52011),y=r(79235),m=r(29600),f=r(46486),v=r(17287),b=r(38009),w=r(16859),_=r(21506),S=r(50758),k=r(78346);const M=i.Z.getLogger("esri.core.workers.WorkerHandle");class O extends class{constructor(e,t,r,o={}){this._mainMethod=t,this._listeners=[],this._promise=(0,k.bA)(e,{...o,schedule:r}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,o.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>M.error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,S.kB)((()=>{r.removed=!0,(0,u.Od)(this._listeners,r),this._thread&&(0,a.pC)(r.threadHandle)&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const o=this.getTransferList(t,e);return this._thread.invoke(e,t,{transferList:o,signal:r})}return this._promise?this._promise.then((()=>((0,c.k_)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}{constructor(e=null){super("LercWorker","_decode",e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,r){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},r):Promise.resolve(null)}getTransferList(e){return[e.buffer]}release(){--this.ref<=0&&(E.forEach(((e,t)=>{e===this&&E.delete(t)})),this.destroy())}}const E=new Map,L=i.Z.getLogger("esri.layers.ElevationLayer");let C=class extends((0,f.Z)((0,v.Y)((0,b.q)((0,w.I)((0,l.R)(m.Z)))))){constructor(...e){super(...e),this.copyright=null,this.heightModelInfo=null,this.path=null,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=E.get((0,a.Wg)(e));return t||((0,a.pC)(e)?(t=new O((t=>e.schedule(t))),E.set(e,t)):(t=new O,E.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,a.RY)(this._lercDecoder)}set minScale(e){this.constructed&&L.warn(`${this.declaredClass}.minScale support has been removed (since 4.5)`)}get minScale(){}set maxScale(e){this.constructed&&L.warn(`${this.declaredClass}.maxScale support has been removed (since 4.5)`)}get maxScale(){}readVersion(e,t){let r=t.currentVersion;return r||(r=9.3),r}load(e){const t=(0,a.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(c.r9).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,r,o){const n=(0,a.pC)((o=o||{signal:null}).signal)?o.signal:o.signal=(new AbortController).signal,i={responseType:"array-buffer",signal:n},l={noDataValue:o.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,r,o))).then((()=>(0,s.default)(this.getTileUrl(e,t,r),i))).then((e=>this._lercDecoder.decode(e.data,l,n))).then((e=>({values:e.pixelData,width:e.width,height:e.height,maxZError:e.fileInfo.maxZError,noDataValue:e.noDataValue,minValue:e.minValue,maxValue:e.maxValue})))}getTileUrl(e,t,r){const o=!this.tilemapCache&&this.supportsBlankTile,s=(0,h.B7)({...this.parsedUrl.query,blankTile:!o&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${r}${s?"?"+s:""}`}async queryElevation(e,t){const{ElevationQuery:o}=await Promise.all([r.e(411),r.e(3505)]).then(r.bind(r,33127));return(0,c.k_)(t),(new o).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:o}=await Promise.all([r.e(411),r.e(3505)]).then(r.bind(r,33127));return(0,c.k_)(t),(new o).createSampler(this,e,t)}_fetchTileAvailability(e,t,r,o){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,r,o):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},r=await(0,s.default)(this.parsedUrl.path,t);r.ssl&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=r.data,this.read(r.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile.__isDefault__}};(0,o._)([(0,d.Cb)({json:{read:{source:"copyrightText"}}})],C.prototype,"copyright",void 0),(0,o._)([(0,d.Cb)({readOnly:!0,type:y.Z})],C.prototype,"heightModelInfo",void 0),(0,o._)([(0,d.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],C.prototype,"path",void 0),(0,o._)([(0,d.Cb)({type:["show","hide"]})],C.prototype,"listMode",void 0),(0,o._)([(0,d.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],C.prototype,"minScale",null),(0,o._)([(0,d.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],C.prototype,"maxScale",null),(0,o._)([(0,d.Cb)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],C.prototype,"opacity",void 0),(0,o._)([(0,d.Cb)({type:["ArcGISTiledElevationServiceLayer"]})],C.prototype,"operationalLayerType",void 0),(0,o._)([(0,d.Cb)()],C.prototype,"sourceJSON",void 0),(0,o._)([(0,d.Cb)({json:{read:!1},value:"elevation",readOnly:!0})],C.prototype,"type",void 0),(0,o._)([(0,d.Cb)(_.HQ)],C.prototype,"url",void 0),(0,o._)([(0,d.Cb)()],C.prototype,"version",void 0),(0,o._)([(0,p.r)("version",["currentVersion"])],C.prototype,"readVersion",null),C=(0,o._)([(0,g.j)("esri.layers.ElevationLayer")],C),C.prototype.fetchTile.__isDefault__=!0;const I=C},29600:(e,t,r)=>{r.d(t,{Z:()=>w});var o=r(43697),s=r(68773),n=(r(66577),r(3172)),i=r(20102),a=r(32448),l=r(10699),c=r(83379),h=r(92604),d=r(95330),u=r(17452),p=r(5600),g=(r(67676),r(80442),r(75215),r(52011)),y=r(6570),m=r(82971);let f=0;const v=h.Z.getLogger("esri.layers.Layer");let b=class extends(a.Z.EventedMixin((0,l.I)(c.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.Z(-180,-90,180,90,m.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+f++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e,o=await r.e(3529).then(r.bind(r,63529));try{return await o.fromUrl(t)}catch(e){throw v.error("#fromArcGISServerUrl({ url: '"+t.url+"'})","Failed to create layer from arcgis server url",e),e}}static async fromPortalItem(e){const t="portalItem"in e?e:{portalItem:e},o=await r.e(4579).then(r.bind(r,44579));try{return await o.fromItem(t)}catch(e){const r=t&&t.portalItem,o=r&&r.id||"unset",n=r&&r.portal&&r.portal.url||s.Z.portalUrl;throw v.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+o+"')",e),e}}initialize(){this.when().catch((e=>{var t,r;(0,d.D_)(e)||h.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${null!=(t=this.title)?t:"no title"}', id: '${null!=(r=this.id)?r:"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const e=this.url;return e?(0,u.mN)(e):null}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new i.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,o._)([(0,p.Cb)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,o._)([(0,p.Cb)({type:y.Z})],b.prototype,"fullExtent",void 0),(0,o._)([(0,p.Cb)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,o._)([(0,p.Cb)({type:String})],b.prototype,"id",void 0),(0,o._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,o._)([(0,p.Cb)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,o._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,o._)([(0,p.Cb)()],b.prototype,"parent",void 0),(0,o._)([(0,p.Cb)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,o._)([(0,p.Cb)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,o._)([(0,p.Cb)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,o._)([(0,p.Cb)({type:m.Z})],b.prototype,"spatialReference",void 0),(0,o._)([(0,p.Cb)({type:String})],b.prototype,"title",void 0),(0,o._)([(0,p.Cb)({type:String,readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,o._)([(0,p.Cb)()],b.prototype,"url",void 0),(0,o._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,o._)([(0,g.j)("esri.layers.Layer")],b);const w=b},46486:(e,t,r)=>{r.d(t,{Z:()=>h});var o=r(43697),s=(r(66577),r(5600)),n=(r(67676),r(80442),r(75215),r(71715)),i=r(52011),a=r(45322),l=r(56608),c=r(82971);const h=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t){return t.capabilities&&t.capabilities.indexOf("Tilemap")>-1?new l.y({layer:this}):null}};return(0,o._)([(0,s.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,o._)([(0,s.Cb)()],t.prototype,"minScale",void 0),(0,o._)([(0,n.r)("service","minScale")],t.prototype,"readMinScale",null),(0,o._)([(0,s.Cb)()],t.prototype,"maxScale",void 0),(0,o._)([(0,n.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,o._)([(0,s.Cb)({type:c.Z})],t.prototype,"spatialReference",void 0),(0,o._)([(0,s.Cb)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,o._)([(0,s.Cb)(a.h)],t.prototype,"tileInfo",void 0),(0,o._)([(0,s.Cb)()],t.prototype,"tilemapCache",void 0),(0,o._)([(0,n.r)("service","tilemapCache",["capabilities"])],t.prototype,"readTilemapCache",null),(0,o._)([(0,s.Cb)()],t.prototype,"version",void 0),t=(0,o._)([(0,i.j)("esri.layers.mixins.ArcGISCachedService")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>c});var o=r(43697),s=r(92604),n=r(70586),i=r(5600),a=(r(67676),r(80442),r(75215),r(52011)),l=r(66677);const c=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.Qc)(this.url);if((0,n.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,o._)([(0,i.Cb)()],t.prototype,"title",null),(0,o._)([(0,i.Cb)({type:String})],t.prototype,"url",null),t=(0,o._)([(0,a.j)("esri.layers.mixins.ArcGISService")],t),t}},38009:(e,t,r)=>{r.d(t,{q:()=>p});var o=r(43697),s=r(20102),n=r(17452),i=r(5600),a=(r(67676),r(80442),r(75215),r(52011)),l=r(30556),c=r(50549),h=r(76169);const d={"web-scene/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,GroupLayer:!0,IntegratedMeshLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,WebTiledLayer:!0,CSV:!0,GeoJSON:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,KML:!0,RasterDataLayer:!0,Voxel:!0},"web-scene/basemap":{ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,ArcGISImageServiceLayer:!0,WMS:!0,ArcGISMapServiceLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-map/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CSV:!0,GeoRSS:!0,GeoJSON:!0,GroupLayer:!0,KML:!0,OGCFeatureLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-map/basemap":{ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0,BingMapsAerial:!0,BingMapsRoad:!0,BingMapsHybrid:!0},"web-map/tables":{ArcGISFeatureLayer:!0},"portal-item/operational-layers":{ArcGISSceneServiceLayer:!0,PointCloudLayer:!0,BuildingSceneLayer:!0,IntegratedMeshLayer:!0}};var u=r(21506);const p=e=>{let t=class extends e{constructor(){super(...arguments),this.title=null}writeListMode(e,t,r,o){(o&&"ground"===o.layerContainerType||e&&(0,h.df)(this,r,{},o))&&(t[r]=e)}writeOperationalLayerType(e,t,r,o){!e||o&&"tables"===o.layerContainerType||(t.layerType=e)}writeTitle(e,t){t.title=e||"Layer"}read(e,t){t&&(t.layer=this),(0,c.$Z)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(null!=t&&t.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,o=d[e];let n=o&&o[this.operationalLayerType];var r;if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(n=!1),!n)return null==(r=t.messages)||r.push(new s.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const o=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof s.Z&&"web-document-write:property-required"===e.name)).length;var a;return(0,n.jc)(null==o?void 0:o.url)?(null==t||null==(a=t.messages)||a.push(new s.Z("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:o}beforeSave(){}};return(0,o._)([(0,i.Cb)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,o._)([(0,i.Cb)({json:{write:{ignoreOrigin:!0},origins:{"web-map":{read:!1,write:!1}}}})],t.prototype,"listMode",void 0),(0,o._)([(0,l.c)("listMode")],t.prototype,"writeListMode",null),(0,o._)([(0,i.Cb)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1}}}})],t.prototype,"operationalLayerType",void 0),(0,o._)([(0,l.c)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,o._)([(0,i.Cb)(u.Oh)],t.prototype,"opacity",void 0),(0,o._)([(0,i.Cb)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,o._)([(0,l.c)("title")],t.prototype,"writeTitle",null),(0,o._)([(0,i.Cb)({type:Boolean,json:{name:"visibility"}})],t.prototype,"visible",void 0),t=(0,o._)([(0,a.j)("esri.layers.mixins.OperationalLayer")],t),t}},21506:(e,t,r)=>{r.d(t,{qG:()=>w,PV:()=>m,id:()=>S,iR:()=>p,rn:()=>y,u1:()=>M,rO:()=>k,Oh:()=>v,bT:()=>b,C_:()=>u,Lx:()=>f,vg:()=>_,YI:()=>d,HQ:()=>g});var o=r(92835),s=r(6570),n=r(82971),i=r(25929),a=r(70586),l=(r(95330),r(35463)),c=r(20682),h=r(65242);const d={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:!0}},u={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,r){t[r]=!e}}}},p={type:Boolean,value:!0,json:{name:"showLabels",write:!0}},g={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:i.w}}},y={type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:!0}},m={value:null,type:c.Z,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:!0}};function f(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const v={type:Number,json:{origins:{"web-document":{write:!0,read:!0},"portal-item":{write:!0}}}},b={...v,json:{...v.json,origins:{"web-document":{...v.json.origins["web-document"],write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,r)=>r&&"service"!==r.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition&&t.layerDefinition.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?(0,h.b)(t.layerDefinition.drawingInfo.transparency):void 0:(0,h.b)(t.drawingInfo.transparency)}}},w={type:o.Z,readOnly:!0,get(){var e,t;if(null==(e=this.layer)||!e.timeInfo)return null;const{datesInUnknownTimezone:r,timeOffset:s,useViewTime:n}=this.layer,i=null==(t=this.view)?void 0:t.timeExtent;let c=this.layer.timeExtent;r&&(c=function(e){if(!e)return e;const{start:t,end:r}=e;return new o.Z({start:(0,a.pC)(t)?(0,l.Nm)(t,t.getTimezoneOffset(),"minutes"):t,end:(0,a.pC)(r)?(0,l.Nm)(r,r.getTimezoneOffset(),"minutes"):r})}(c));let h=n?i&&c?i.intersection(c):i||c:c;if(!h||h.isEmpty||h.isAllTime)return h;s&&(h=h.offset(-s.value,s.unit)),r&&(h=function(e){if(!e)return e;const{start:t,end:r}=e;return new o.Z({start:(0,a.pC)(t)?(0,l.Nm)(t,-t.getTimezoneOffset(),"minutes"):t,end:(0,a.pC)(r)?(0,l.Nm)(r,-r.getTimezoneOffset(),"minutes"):r})}(h));const d=this._get("timeExtent");return h.equals(d)?d:h}},_={type:s.Z,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const r=s.Z.fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(r.spatialReference=n.Z.fromJSON(t.spatialReference)),r}}}},read:!1}},S={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},k={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}},M={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}}},20682:(e,t,r)=>{r.d(t,{Z:()=>_});var o,s=r(43697),n=r(35454),i=r(96674),a=r(70586),l=r(5600),c=(r(67676),r(80442),r(75215),r(71715)),h=r(52011),d=r(30556),u=r(35671);let p=o=class extends i.wq{async collectRequiredFields(e,t){return(0,u.io)(e,t,this.expression)}clone(){return new o({expression:this.expression,title:this.title})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=o=(0,s._)([(0,h.j)("esri.layers.support.FeatureExpressionInfo")],p);const g=p;var y=r(99282);const m=function(){const e=Object.keys(y.a);return e.sort(),e}();var f;const v=(0,n.wY)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),b=new n.Xn({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let w=f=class extends i.wq{constructor(){super(...arguments),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,r,o){t[r]=e.write({},o),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):(0,a.pC)(e)||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}};(0,s._)([(0,l.Cb)({type:g,json:{write:!0}})],w.prototype,"featureExpressionInfo",void 0),(0,s._)([(0,c.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],w.prototype,"readFeatureExpressionInfo",null),(0,s._)([(0,d.c)("featureExpressionInfo",{featureExpressionInfo:{type:g},"featureExpression.value":{type:[0]}})],w.prototype,"writeFeatureExpressionInfo",null),(0,s._)([(0,l.Cb)({type:v.apiValues,nonNullable:!0,json:{type:v.jsonValues,read:v.read,write:{writer:v.write,isRequired:!0}}})],w.prototype,"mode",null),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"offset",void 0),(0,s._)([(0,l.Cb)({type:m,json:{type:String,read:b.read,write:b.write}})],w.prototype,"unit",null),w=f=(0,s._)([(0,h.j)("esri.layers.support.ElevationInfo")],w);const _=w},65242:(e,t,r)=>{r.d(t,{a:()=>s,b:()=>n});var o=r(75215);function s(e){const t=(0,o.vU)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9767],{1692:(e,t,r)=>{r.d(t,{Z:()=>_});var i=r(43697),n=r(66577),s=r(51773),a=r(78223),l=r(15923),o=(r(80442),r(22974)),u=r(92604),c=r(70586),d=r(31263),p=r(1153),h=r(52011);u.Z.getLogger("esri.core.Clonable");const y=e=>{let t=class extends e{clone(){const e=(0,c.s3)((0,p.vw)(this),"unable to clone instance of non-accessor class"),t=e.metadatas,r=e.store,i={},n=new Map;for(const e in t){const s=t[e],a=null==r?void 0:r.originOf(e);if(s.readOnly||!1===s.clonable||a!==d.s3.USER&&a!==d.s3.DEFAULTS)continue;const l=this[e];let u=null;const c=s.clonable;u="function"==typeof c?c(l):"reference"===c?l:(0,o.Vo)(l),null!=l&&null==u||(a===d.s3.DEFAULTS?n.set(e,u):i[e]=u)}const s=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){var a;const e=null==(a=(0,p.vw)(s))?void 0:a.store;if(e)for(const[t,r]of n)e.set(t,r,d.s3.DEFAULTS)}return s}};return t=(0,i._)([(0,h.j)("esri.core.Clonable")],t),t};let f=class extends(y(l.Z)){};f=(0,i._)([(0,h.j)("esri.core.Clonable")],f);var m=r(96674),v=r(99001),b=r(5600),g=(r(67676),r(75215),r(33955));let S=class extends(y(m.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,v.D)(),configurable:!0})}normalizeCtorArgs(e,t,r,i){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:i}}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&(0,c.pC)(t.defaultPopupTemplate))return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes&&this.attributes[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{geometry:(0,c.pC)(this.geometry)?this.geometry.toJSON():null,symbol:(0,c.pC)(this.symbol)?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}_notifyLayer(e,t,r,i){if(!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}};(0,i._)([(0,b.Cb)({value:null})],S.prototype,"attributes",null),(0,i._)([(0,b.Cb)({value:null,types:n.qM,json:{read:g.im}})],S.prototype,"geometry",null),(0,i._)([(0,b.Cb)({type:Boolean})],S.prototype,"isAggregate",void 0),(0,i._)([(0,b.Cb)({clonable:"reference"})],S.prototype,"layer",void 0),(0,i._)([(0,b.Cb)({type:s.Z})],S.prototype,"popupTemplate",void 0),(0,i._)([(0,b.Cb)({clonable:"reference"})],S.prototype,"sourceLayer",void 0),(0,i._)([(0,b.Cb)({value:null,types:a.LB})],S.prototype,"symbol",null),(0,i._)([(0,b.Cb)({type:Boolean,value:!0})],S.prototype,"visible",null),S=(0,i._)([(0,h.j)("esri.Graphic")],S),(S||(S={})).generateUID=v.D;const _=S},3920:(e,t,r)=>{r.d(t,{r:()=>c,p:()=>u});var i=r(43697),n=r(15923),s=r(61247),a=r(5600),l=r(52011),o=r(89749);const u=e=>{let t=class extends e{destroy(){var e,t;this.destroyed||(null==(e=this._get("handles"))||e.destroy(),null==(t=this._get("updatingHandles"))||t.destroy())}get handles(){return this._get("handles")||new s.Z}get updatingHandles(){return this._get("updatingHandles")||new o.t}};return(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,i._)([(0,l.j)("esri.core.HandleOwner")],t),t};let c=class extends(u(n.Z)){};c=(0,i._)([(0,l.j)("esri.core.HandleOwner")],c)},36030:(e,t,r)=>{r.d(t,{J:()=>s});var i=r(35454),n=r(5600);function s(e,t={}){var r;const s=e instanceof i.Xn?e:new i.Xn(e,t),a={type:null==(r=null==t?void 0:t.ignoreUnknown)||r?s.apiValues:String,json:{type:s.jsonValues,read:(null==t||!t.readOnly)&&{reader:s.read},write:{writer:s.write}}};return void 0!==(null==t?void 0:t.readOnly)&&(a.readOnly=!!t.readOnly),void 0!==(null==t?void 0:t.default)&&(a.json.default=t.default),void 0!==(null==t?void 0:t.name)&&(a.json.name=t.name),(0,n.Cb)(a)}},74085:(e,t,r)=>{function i(e){}r.d(t,{Bg:()=>i}),r(80442)},67900:(e,t,r)=>{r.d(t,{gV:()=>D,En:()=>C,Z7:()=>I,c9:()=>O,_R:()=>U,qE:()=>k,cM:()=>V,hd:()=>c,ty:()=>T,Jo:()=>j,$C:()=>x}),r(80442);var i=r(35454),n=r(70586),s=r(24678),a=r(82971),l=r(68441),o=r(8744),u=r(58116);const c=39.37,d=l.sv.radius*Math.PI/200,p=/UNIT\[([^\]]+)\]\]$/i,h=u.Z,y=/UNIT\[([^\]]+)\]/i,f=new Set([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),m=(0,i.wY)()({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"}),v=e=>e*e,b=e=>e*e*e,g={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},decimeters:{inBaseUnits:.1},meters:{inBaseUnits:1},kilometers:{inBaseUnits:1e3},inches:{inBaseUnits:.0254},feet:{inBaseUnits:.3048},yards:{inBaseUnits:.9144},miles:{inBaseUnits:1609.344},"nautical-miles":{inBaseUnits:1852},"us-feet":{inBaseUnits:1200/3937}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:v(.001)},"square-centimeters":{inBaseUnits:v(.01)},"square-decimeters":{inBaseUnits:v(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:v(1e3)},"square-inches":{inBaseUnits:v(.0254)},"square-feet":{inBaseUnits:v(.3048)},"square-yards":{inBaseUnits:v(.9144)},"square-miles":{inBaseUnits:v(1609.344)},"square-us-feet":{inBaseUnits:v(1200/3937)},acres:{inBaseUnits:.0015625*v(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*b(.001)},"cubic-centimeters":{inBaseUnits:1e3*b(.01)},"cubic-decimeters":{inBaseUnits:1e3*b(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*b(1e3)},"cubic-inches":{inBaseUnits:1e3*b(.0254)},"cubic-feet":{inBaseUnits:1e3*b(.3048)},"cubic-yards":{inBaseUnits:1e3*b(.9144)},"cubic-miles":{inBaseUnits:1e3*b(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},S=function(){const e={};for(const t in g)for(const r in g[t].units)e[r]=t;return e}();function _(e){const t=S[e];if(t)return t;throw new Error("unknown measure")}function w(e,t=null){return t=t||_(e),g[t].baseUnit===e}function C(e,t,r){if(t===r)return e;const i=_(t);if(i!==_(r))throw new Error("incompatible units");const n=w(t,i)?e:function(e,t,r){return e*g[r].units[t].inBaseUnits}(e,t,i);return w(r,i)?n:function(e,t,r){return e/g[r].units[t].inBaseUnits}(n,r,i)}function T(e,t,r){return C(e,t,"meters")/(r*Math.PI/180)}function x(e){return m.fromJSON(e.toLowerCase())||null}function U(e){if(e&&"object"==typeof e&&!(0,o.N$)(e))return 1;const t=O(e);return t>1e5?1:t}function V(e){return O(e)>=(e instanceof a.Z?(0,s.Iu)(e).metersPerDegree:1e5)?"meters":k(e)}function O(e,t=l.sv.metersPerDegree){return I(e,!0)||t}function I(e,t=!1){let r,i,n=null;if(null!=e&&("object"==typeof e?(r=e.wkid,i=e.wkt):"number"==typeof e?r=e:"string"==typeof e&&(i=e)),r){if((0,o.o$)(r))return l.yr.metersPerDegree;if((0,o.ME)(r))return l.Z1.metersPerDegree;n=h.values[h[r]],!n&&t&&f.has(r)&&(n=d)}else i&&(F(i)?n=N(p.exec(i),n):R(i)&&(n=N(y.exec(i),n)));return n}function N(e,t){return e&&e[1]?L(e[1]):t}function L(e){return parseFloat(e.split(",")[1])}function k(e){let t,r,i=null;if(null!=e&&("object"==typeof e?(t=e.wkid,r=e.wkt):"number"==typeof e?t=e:"string"==typeof e&&(r=e)),t)i=h.units[h[t]];else if(r){const e=F(r)?p:R(r)?y:null;if(e){const t=e.exec(r);t&&t[1]&&(i=function(e){const t=/[\\"\\']{1}([^\\"\\']+)/.exec(e);let r=t&&t[1];if(!r||-1===h.units.indexOf(r)){const t=L(e);r=null;const i=h.values;for(let e=0;e<i.length;++e)if(Math.abs(t-i[e])<1e-7){r=h.units[e];break}}return r}(t[1]))}}return(0,n.pC)(i)?x(i):null}function R(e){return/^GEOCCS/i.test(e)}function F(e){return/^PROJCS/i.test(e)}const q={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},B={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},D=(0,i.wY)()(q),j=(0,i.wY)()(B);(0,i.wY)()({...q,...B})},24678:(e,t,r)=>{r.d(t,{GG:()=>l,HQ:()=>o,VY:()=>u,wY:()=>c,Iu:()=>p,e8:()=>h,rS:()=>d});var i=r(82971),n=r(68441),s=r(8744);function a(e){return new i.Z({wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${e.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`})}const l=a(n.sv),o=a(n.yr),u=a(n.Z1),c=new i.Z({wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${n.sv.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`});function d(e){return e&&((0,s.BZ)(e)||e===o)?o:e&&((0,s.V2)(e)||e===u)?u:l}function p(e){return e&&((0,s.BZ)(e)||e===o)?n.yr:e&&((0,s.V2)(e)||e===u)?n.Z1:n.sv}function h(e){return(0,s.o$)(e)?n.yr:(0,s.ME)(e)?n.Z1:n.sv}},98636:(e,t,r)=>{r.r(t),r.d(t,{default:()=>F});var i=r(43697),n=(r(66577),r(3172)),s=r(20102),a=r(3920),l=r(70586),o=r(16453),u=r(95330),c=r(17452),d=r(5600),p=(r(67676),r(80442),r(90578)),h=r(71715),y=r(52011),f=r(30556),m=r(29600),v=r(54295),b=r(46486),g=r(7944),S=r(17287),_=r(71612),w=r(17017),C=r(38009),T=r(16859),x=r(34760),U=r(72965),V=r(10343),O=r(66677),I=r(21506),N=r(49867),L=r(82971);const k=["Canvas/World_Dark_Gray_Base","Canvas/World_Dark_Gray_Reference","Canvas/World_Light_Gray_Base","Canvas/World_Light_Gray_Reference","Elevation/World_Hillshade","Elevation/World_Hillshade_Dark","Ocean/World_Ocean_Base","Ocean/World_Ocean_Reference","Ocean_Basemap","Reference/World_Boundaries_and_Places","Reference/World_Boundaries_and_Places_Alternate","Reference/World_Transportation","World_Imagery","World_Street_Map","World_Topo_Map"];let R=class extends((0,_.h)((0,V.x)((0,U.M)((0,C.q)((0,T.I)((0,b.Z)((0,g.O)((0,S.Y)((0,o.R)((0,a.p)((0,x.Q)((0,v.V)((0,w.N)(m.Z)))))))))))))){constructor(...e){super(...e),this.listMode="show",this.isReference=null,this.operationalLayerType="ArcGISTiledMapServiceLayer",this.resampling=!0,this.sourceJSON=null,this.spatialReference=null,this.path=null,this.sublayers=null,this.type="tile",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,l.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(u.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}get attributionDataUrl(){var e;const t=null==(e=this.parsedUrl)?void 0:e.path.toLowerCase();return t&&this._getDefaultAttribution(this._getMapName(t))}readSpatialReference(e,t){return(e=e||t.tileInfo&&t.tileInfo.spatialReference)&&L.Z.fromJSON(e)}writeSublayers(e,t,r,i){if(!this.loaded||!e)return;const n=e.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).toArray(),s=[],a={writeSublayerStructure:!1,...i};n.forEach((e=>{const t=e.write({},a);s.push(t)})),s.some((e=>Object.keys(e).length>1))&&(t.layers=s)}get tileServers(){return this._getDefaultTileServers(this.parsedUrl.path)}castTileServers(e){return Array.isArray(e)?e.map((e=>(0,c.mN)(e).path)):null}fetchTile(e,t,r,i={}){const{signal:s}=i,a=this.getTileUrl(e,t,r),l={responseType:"image",signal:s,query:{...this.refreshParameters}};return(0,n.default)(a,l).then((e=>e.data))}getTileUrl(e,t,r){const i=!this.tilemapCache&&this.supportsBlankTile,n=(0,c.B7)({...this.parsedUrl.query,blankTile:!i&&null,...this.customParameters,token:this.apiKey}),s=this.tileServers;return`${s&&s.length?s[t%s.length]:this.parsedUrl.path}/tile/${e}/${t}/${r}${n?"?"+n:""}`}_fetchService(e){return new Promise(((t,r)=>{if(this.sourceJSON){if(null!=this.sourceJSON.bandCount&&null!=this.sourceJSON.pixelSizeX)throw new s.Z("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");return void t({data:this.sourceJSON})}if(!this.parsedUrl)throw new s.Z("tile-layer:undefined-url","layer's url is not defined");const i=(0,O.Qc)(this.parsedUrl.path);if((0,l.pC)(i)&&"ImageServer"===i.serverType)throw new s.Z("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");(0,n.default)(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(t,r)})).then((t=>{if(t.ssl&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t.data,this.read(t.data,{origin:"service",url:this.parsedUrl}),10.1===this.version&&!(0,O.M8)(this.url))return this._fetchServerVersion(this.url,e).then((e=>{this.read({currentVersion:e})})).catch((()=>{}))}))}_fetchServerVersion(e,t){if(!(0,O.B5)(e))return Promise.reject();const r=e.replace(/(.*\/rest)\/.*/i,"$1")+"/info";return(0,n.default)(r,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t}).then((e=>{if(e.data&&e.data.currentVersion)return e.data.currentVersion;throw new s.Z("tile-layer:version-not-available")}))}_getMapName(e){const t=e.match(/^(?:https?:)?\/\/(server\.arcgisonline\.com|services\.arcgisonline\.com|ibasemaps-api\.arcgis\.com)\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/mapserver/i);return t&&t[2]}_getDefaultAttribution(e){if(!e)return;let t;e=e.toLowerCase();for(let r=0,i=k.length;r<i;r++)if(t=k[r],t.toLowerCase().indexOf(e)>-1)return(0,c.hF)("//static.arcgis.com/attribution/"+t)}_getDefaultTileServers(e){const t=-1!==e.search(/^(?:https?:)?\/\/server\.arcgisonline\.com/i),r=-1!==e.search(/^(?:https?:)?\/\/services\.arcgisonline\.com/i);return t||r?[e,e.replace(t?/server\.arcgisonline/i:/services\.arcgisonline/i,t?"services.arcgisonline":"server.arcgisonline")]:[]}get hasOverriddenFetchTile(){return!this.fetchTile.__isDefault__}};(0,i._)([(0,d.Cb)({readOnly:!0})],R.prototype,"attributionDataUrl",null),(0,i._)([(0,d.Cb)({type:["show","hide","hide-children"]})],R.prototype,"listMode",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],R.prototype,"isReference",void 0),(0,i._)([(0,d.Cb)({readOnly:!0,type:["ArcGISTiledMapServiceLayer"]})],R.prototype,"operationalLayerType",void 0),(0,i._)([(0,d.Cb)({type:Boolean})],R.prototype,"resampling",void 0),(0,i._)([(0,d.Cb)()],R.prototype,"sourceJSON",void 0),(0,i._)([(0,d.Cb)({type:L.Z})],R.prototype,"spatialReference",void 0),(0,i._)([(0,h.r)("spatialReference",["spatialReference","tileInfo"])],R.prototype,"readSpatialReference",null),(0,i._)([(0,d.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],R.prototype,"path",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],R.prototype,"sublayers",void 0),(0,i._)([(0,f.c)("sublayers",{layers:{type:[N.Z]}})],R.prototype,"writeSublayers",null),(0,i._)([(0,d.Cb)({json:{read:!1,write:!1}})],R.prototype,"popupEnabled",void 0),(0,i._)([(0,d.Cb)()],R.prototype,"tileServers",null),(0,i._)([(0,p.p)("tileServers")],R.prototype,"castTileServers",null),(0,i._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],R.prototype,"type",void 0),(0,i._)([(0,d.Cb)(I.HQ)],R.prototype,"url",void 0),R=(0,i._)([(0,y.j)("esri.layers.TileLayer")],R),R.prototype.fetchTile.__isDefault__=!0;const F=R},46486:(e,t,r)=>{r.d(t,{Z:()=>c});var i=r(43697),n=(r(66577),r(5600)),s=(r(67676),r(80442),r(75215),r(71715)),a=r(52011),l=r(45322),o=r(56608),u=r(82971);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t){return t.capabilities&&t.capabilities.indexOf("Tilemap")>-1?new o.y({layer:this}):null}};return(0,i._)([(0,n.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,n.Cb)()],t.prototype,"minScale",void 0),(0,i._)([(0,s.r)("service","minScale")],t.prototype,"readMinScale",null),(0,i._)([(0,n.Cb)()],t.prototype,"maxScale",void 0),(0,i._)([(0,s.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,i._)([(0,n.Cb)({type:u.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,n.Cb)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,i._)([(0,n.Cb)(l.h)],t.prototype,"tileInfo",void 0),(0,i._)([(0,n.Cb)()],t.prototype,"tilemapCache",void 0),(0,i._)([(0,s.r)("service","tilemapCache",["capabilities"])],t.prototype,"readTilemapCache",null),(0,i._)([(0,n.Cb)()],t.prototype,"version",void 0),t=(0,i._)([(0,a.j)("esri.layers.mixins.ArcGISCachedService")],t),t}},1231:(e,t,r)=>{r.d(t,{Z:()=>m});var i,n=r(43697),s=r(35454),a=r(96674),l=r(5600),o=(r(67676),r(80442),r(75215)),u=r(36030),c=r(71715),d=r(52011),p=r(72729),h=r(86719);const y=new s.Xn({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=i=class extends a.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null}readDescription(e,{description:t}){let r;try{r=JSON.parse(t)}catch(e){}return r?r.value:null}readValueType(e,{description:t}){let r;try{r=JSON.parse(t)}catch(e){}return r?y.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType})}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,n._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,n._)([(0,l.Cb)()],f.prototype,"description",void 0),(0,n._)([(0,c.r)("description")],f.prototype,"readDescription",null),(0,n._)([(0,l.Cb)({types:p.V5,json:{read:{reader:p.im},write:!0}})],f.prototype,"domain",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,n._)([(0,l.Cb)({type:o.z8,json:{write:!0}})],f.prototype,"length",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,n._)([(0,u.J)(h.v)],f.prototype,"type",void 0),(0,n._)([(0,l.Cb)()],f.prototype,"valueType",void 0),(0,n._)([(0,c.r)("valueType",["description"])],f.prototype,"readValueType",null),f=i=(0,n._)([(0,d.j)("esri.layers.support.Field")],f);const m=f},66677:(e,t,r)=>{r.d(t,{ld:()=>y,B5:()=>d,M8:()=>m,G:()=>S,Qc:()=>p,DR:()=>h,Nm:()=>v,XG:()=>b,a7:()=>f,wH:()=>g});var i=r(70586),n=r(17452),s=r(25929);const a={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},l=Object.values(a),o=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return!!o.test(e)}function p(e){const t=(0,n.mN)(e),r=t.path.match(o)||t.path.match(u);if(!r)return null;const[,i,s,l,c]=r,d=s.indexOf("/");return{title:y(-1!==d?s.slice(d+1):s),serverType:a[l.toLowerCase()],sublayer:null!=c&&""!==c?parseInt(c,10):null,url:{path:i}}}function h(e){const t=(0,n.mN)(e).path.match(c);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function y(e){return(e=e.replace(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function f(e,t){const r=[];if(e){const t=p(e);(0,i.pC)(t)&&t.title&&r.push(t.title)}if(t){const e=y(t);r.push(e)}if(2===r.length){if(-1!==r[0].toLowerCase().indexOf(r[1].toLowerCase()))return r[0];if(-1!==r[1].toLowerCase().indexOf(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function m(e){if(!e)return!1;const t=-1!==(e=e.toLowerCase()).indexOf(".arcgis.com/"),r=-1!==e.indexOf("//services")||-1!==e.indexOf("//tiles")||-1!==e.indexOf("//features");return t&&r}function v(e,t){return e?(0,n.Qj)((0,n.Hu)(e,t)):e}function b(e){let{url:t}=e;if(!t)return{url:t};t=(0,n.Hu)(t,e.logger);const r=(0,n.mN)(t),s=p(r.path);let a;if((0,i.pC)(s))null!=s.sublayer&&null==e.layer.layerId&&(a=s.sublayer),t=s.url.path;else if(e.nonStandardUrlAllowed){const e=h(r.path);(0,i.pC)(e)&&(t=e.serviceUrl,a=e.sublayerId)}return{url:(0,n.Qj)(t),layerId:a}}function g(e,t,r,i,a){(0,s.w)(t,i,"url",a),i.url&&null!=e.layerId&&(i.url=(0,n.v_)(i.url,r,e.layerId.toString()))}function S(e){if(!e)return!1;const t=e.toLowerCase(),r=-1!==t.indexOf("/services/"),i=-1!==t.indexOf("/mapserver/wmsserver"),n=-1!==t.indexOf("/imageserver/wmsserver"),s=-1!==t.indexOf("/wmsserver");return r&&(i||n||s)}},72729:(e,t,r)=>{r.d(t,{im:()=>x,V5:()=>T}),r(80442);var i,n=r(43697),s=r(22974),a=r(5600),l=(r(75215),r(36030)),o=r(52011),u=r(96674);r(67676);let c=i=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=i=(0,n._)([(0,o.j)("esri.layers.support.CodedValue")],c);const d=c,p=new(r(35454).Xn)({inherited:"inherited",codedValue:"coded-value",range:"range"});let h=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,n._)([(0,l.J)(p)],h.prototype,"type",void 0),h=(0,n._)([(0,o.j)("esri.layers.support.Domain")],h);const y=h;var f;let m=f=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,s.d9)(this.codedValues),name:this.name})}};(0,n._)([(0,a.Cb)({type:[d],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,n._)([(0,l.J)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=f=(0,n._)([(0,o.j)("esri.layers.support.CodedValueDomain")],m);const v=m;var b;r(92604),r(37697);let g=b=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new b}};(0,n._)([(0,l.J)({inherited:"inherited"})],g.prototype,"type",void 0),g=b=(0,n._)([(0,o.j)("esri.layers.support.InheritedDomain")],g);const S=g;var _;let w=_=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new _({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,n._)([(0,l.J)({range:"range"})],w.prototype,"type",void 0),w=_=(0,n._)([(0,o.j)("esri.layers.support.RangeDomain")],w);const C=w,T={key:"type",base:y,typeMap:{range:w,"coded-value":v,inherited:S}};function x(e){if(!e||!e.type)return null;switch(e.type){case"range":return C.fromJSON(e);case"codedValue":return v.fromJSON(e);case"inherited":return S.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>i});const i=new(r(35454).Xn)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},51706:(e,t,r)=>{var i,n;function s(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function a(e){return null!=e&&!isNaN(e)&&isFinite(e)}function l(e){return e.valueExpression?i.Expression:e.field&&"string"==typeof e.field?i.Field:i.Unknown}function o(e,t){const r=t||l(e),s=e.valueUnit||"unknown";return r===i.Unknown?n.Constant:e.stops?n.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?n.ClampedLinear:"unknown"===s?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?n.Proportional:n.Additive:n.Identity:n.RealWorldSize}r.d(t,{RY:()=>i,hL:()=>n,PS:()=>l,QW:()=>o,iY:()=>s,qh:()=>a}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(i||(i={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(n||(n={}))},28101:(e,t,r)=>{r.d(t,{PR:()=>w,Lq:()=>y,Km:()=>f,cM:()=>m,ap:()=>v,V3:()=>S,B3:()=>h});var i=r(22303),n=r(1692),s=r(74085),a=r(92604),l=r(70586),o=r(99282),u=r(51706);const c=a.Z.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),d=new n.Z,p=Math.PI,h=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function y(e,t,r){const n="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"color"===e.type))[0]:e;if(!n)return;if("esri.renderers.visualVariables.ColorVariable"!==n.declaredClass)return void c.warn("The visualVariable should be an instance of esri.renderers.visualVariables.ColorVariable");const s="number"==typeof t,a=s?null:t,o=a&&a.attributes;let u=s?t:null;const d=n.field,{ipData:p,hasExpression:h}=n.cache;let y=n.cache.compiledFunc;if(!d&&!h){const e=n.stops;return e&&e[0]&&e[0].color}if("number"!=typeof u)if(h){if(!(0,l.pC)(r)||!(0,l.pC)(r.arcade))return void c.error("Use of arcade expressions requires an arcade context");const e={viewingMode:r.viewingMode,scale:r.scale,spatialReference:r.spatialReference},t=r.arcade.arcadeUtils,i=t.getViewInfo(e),s=t.createExecContext(a,i);if(!y){const e=t.createSyntaxTree(n.valueExpression);y=t.createFunction(e),n.cache.compiledFunc=y}u=t.executeFunction(y,s)}else o&&(u=o[d]);const f=n.normalizationField,m=o?parseFloat(o[f]):void 0;if(null!=u&&(!f||s||!isNaN(m)&&0!==m)){isNaN(m)||s||(u/=m);const e=_(u,p);if(e){const t=e[0],s=e[1],a=t===s?n.stops[t].color:i.Z.blendColors(n.stops[t].color,n.stops[s].color,e[2],(0,l.pC)(r)?r.color:void 0);return new i.Z(a)}}}function f(e,t,r){const i="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"opacity"===e.type))[0]:e;if(!i)return;if("esri.renderers.visualVariables.OpacityVariable"!==i.declaredClass)return void c.warn("The visualVariable should be an instance of esri.renderers.visualVariables.OpacityVariable");const n="number"==typeof t,s=n?null:t,a=s&&s.attributes;let o=n?t:null;const u=i.field,{ipData:d,hasExpression:p}=i.cache;let h=i.cache.compiledFunc;if(!u&&!p){const e=i.stops;return e&&e[0]&&e[0].opacity}if("number"!=typeof o)if(p){if((0,l.Wi)(r)||(0,l.Wi)(r.arcade))return void c.error("Use of arcade expressions requires an arcade context");const e={viewingMode:r.viewingMode,scale:r.scale,spatialReference:r.spatialReference},t=r.arcade.arcadeUtils,n=t.getViewInfo(e),a=t.createExecContext(s,n);if(!h){const e=t.createSyntaxTree(i.valueExpression);h=t.createFunction(e),i.cache.compiledFunc=h}o=t.executeFunction(h,a)}else a&&(o=a[u]);const y=i.normalizationField,f=a?parseFloat(a[y]):void 0;if(null!=o&&(!y||n||!isNaN(f)&&0!==f)){isNaN(f)||n||(o/=f);const e=_(o,d);if(e){const t=e[0],r=e[1];if(t===r)return i.stops[t].opacity;{const n=i.stops[t].opacity;return n+(i.stops[r].opacity-n)*e[2]}}}}function m(e,t,r){const i="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"rotation"===e.type))[0]:e;if(!i)return;if("esri.renderers.visualVariables.RotationVariable"!==i.declaredClass)return void c.warn("The visualVariable should be an instance of esri.renderers.visualVariables.RotationVariable");const n=i.axis||"heading",s="heading"===n&&"arithmetic"===i.rotationType?90:0,a="heading"===n&&"arithmetic"===i.rotationType?-1:1,o="number"==typeof t?null:t,u=o&&o.attributes,d=i.field,{hasExpression:p}=i.cache;let h=i.cache.compiledFunc,y=0;if(!d&&!p)return y;if(p){if((0,l.Wi)(r)||(0,l.Wi)(r.arcade))return void c.error("Use of arcade expressions requires an arcade context");const e={viewingMode:r.viewingMode,scale:r.scale,spatialReference:r.spatialReference},t=r.arcade.arcadeUtils,n=t.getViewInfo(e),s=t.createExecContext(o,n);if(!h){const e=t.createSyntaxTree(i.valueExpression);h=t.createFunction(e),i.cache.compiledFunc=h}y=t.executeFunction(h,s)}else u&&(y=u[d]||0);return y="number"!=typeof y||isNaN(y)?null:s+a*y,y}function v(e,t,r){const i="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"size"===e.type))[0]:e;if(!i)return;if("esri.renderers.visualVariables.SizeVariable"!==i.declaredClass)return void c.warn("The visualVariable should be an instance of esri.renderers.visualVariables.SizeVariable");const n=function(e,t,r,i,n){switch(t.transformationType){case u.hL.Additive:return function(e,t,r,i){return e+(b(t.minSize,r,i)||t.minDataValue)}(e,t,r,i);case u.hL.Constant:return function(e,t,r){const i=e.stops;let n=i&&i.length&&i[0].size;return null==n&&(n=e.minSize),b(n,t,r)}(t,r,i);case u.hL.ClampedLinear:return function(e,t,r,i){const n=(e-t.minDataValue)/(t.maxDataValue-t.minDataValue),s=b(t.minSize,r,i),a=b(t.maxSize,r,i),o=(0,l.pC)(i)?i.shape:void 0;if(e<=t.minDataValue)return s;if(e>=t.maxDataValue)return a;if("area"===t.scaleBy&&o){const e="circle"===o,t=e?p*(s/2)**2:s*s,r=t+n*((e?p*(a/2)**2:a*a)-t);return e?2*Math.sqrt(r/p):Math.sqrt(r)}return s+n*(a-s)}(e,t,r,i);case u.hL.Proportional:return function(e,t,r,i){const n=(0,l.pC)(i)?i.shape:void 0,s=e/t.minDataValue,a=b(t.minSize,r,i),o=b(t.maxSize,r,i);let u=null;return u="circle"===n?2*Math.sqrt(s*(a/2)**2):"square"===n||"diamond"===n||"image"===n?Math.sqrt(s*a**2):s*a,g(u,a,o)}(e,t,r,i);case u.hL.Stops:return function(e,t,r,i,n){const[s,a,l]=_(e,n);if(s===a)return b(t.stops[s].size,r,i);{const e=b(t.stops[s].size,r,i);return e+(b(t.stops[a].size,r,i)-e)*l}}(e,t,r,i,n);case u.hL.RealWorldSize:return function(e,t,r,i){const n=((0,l.pC)(i)&&i.resolution?i.resolution:1)*o.a[t.valueUnit],s=b(t.minSize,r,i),a=b(t.maxSize,r,i),{valueRepresentation:u}=t;let c=null;return c="area"===u?2*Math.sqrt(e/p)/n:"radius"===u||"distance"===u?2*e/n:e/n,g(c,s,a)}(e,t,r,i);case u.hL.Identity:return e;case u.hL.Unknown:return null}}(function(e,t,r){const i="number"==typeof t,n=i?null:t,s=n&&n.attributes;let a=i?t:null;const{isScaleDriven:o}=e.cache;let d=e.cache.compiledFunc;if(o){const t=(0,l.pC)(r)?r.scale:void 0,i=(0,l.pC)(r)?r.view:void 0;a=null==t||"3d"===i?function(e){let t=null,r=null;const i=e.stops;return i?(t=i[0].value,r=i[i.length-1].value):(t=e.minDataValue||0,r=e.maxDataValue||0),(t+r)/2}(e):t}else if(!i)switch(e.inputValueType){case u.RY.Expression:{if((0,l.Wi)(r)||(0,l.Wi)(r.arcade))return void c.error("Use of arcade expressions requires an arcade context");const t={viewingMode:r.viewingMode,scale:r.scale,spatialReference:r.spatialReference},i=r.arcade.arcadeUtils,s=i.getViewInfo(t),o=i.createExecContext(n,s);if(!d){const t=i.createSyntaxTree(e.valueExpression);d=i.createFunction(t),e.cache.compiledFunc=d}a=i.executeFunction(d,o);break}case u.RY.Field:s&&(a=s[e.field]);break;case u.RY.Unknown:a=null}if(!(0,u.qh)(a))return null;if(i||!e.normalizationField)return a;const p=s?parseFloat(s[e.normalizationField]):null;return(0,u.qh)(p)&&0!==p?a/p:null}(i,t,r),i,t,r,i.cache.ipData);return null==n||isNaN(n)?0:n}function b(e,t,r){return null==e?null:(0,u.iY)(e)?v(e,t,r):(0,u.qh)(e)?e:null}function g(e,t,r){return(0,u.qh)(r)&&e>r?r:(0,u.qh)(t)&&e<t?t:e}function S(e,t,r){const{isScaleDriven:i}=e.cache;if(!(i&&"3d"===r||t))return null;const n={scale:t,view:r};let s=b(e.minSize,d,n),a=b(e.maxSize,d,n);if(null!=s||null!=a){if(s>a){const e=a;a=s,s=e}return{minSize:s,maxSize:a}}}function _(e,t){if(!t)return;let r=0,i=t.length-1;return t.some(((t,n)=>e<t?(i=n,!0):(r=n,!1))),[r,i,(e-t[r])/(t[i]-t[r])]}function w(e,t,r){const i=["proportional","proportional","proportional"];for(const n of e){const e=n.useSymbolValue?"symbol-value":v(n,t,r);switch(n.axis){case"width":i[0]=e;break;case"depth":i[1]=e;break;case"height":i[2]=e;break;case"width-and-depth":i[0]=e,i[1]=e;break;case"all":case void 0:case null:i[0]=e,i[1]=e,i[2]=e;break;default:(0,s.Bg)(n.axis)}}return i}},58333:(e,t,r)=>{r.d(t,{I4:()=>n,lF:()=>a,ET:()=>s,qP:()=>l,eG:()=>o,lj:()=>c,wW:()=>u});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},o={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},89749:(e,t,r)=>{r.d(t,{t:()=>d});var i=r(43697),n=r(15923),s=r(61247),a=r(70586),l=r(17445),o=r(1654),u=r(5600),c=r(52011);let d=class extends n.Z{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new s.Z,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,t,r={}){const i=++this.handleId;r.sync||this._installSyncUpdatingWatch(e,i);const n=(0,l.YP)(e,t,r);return this.handles.add(n,i),{remove:()=>this.handles.remove(i)}}addOnCollectionChange(e,t,{initial:r=!1}={}){const i=++this.handleId;return this.handles.add([(0,l.on)(e,"after-changes",this._createSyncUpdatingCallback(),l.Z_),(0,l.on)(e,"change",t,{onListenerAdd:r?e=>t({added:e.items,removed:[],moved:[],target:e}):void 0})],i),{remove:()=>this.handles.remove(i)}}addPromise(e){if((0,a.Wi)(e))return e;const t=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(p)||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){const r=this._createSyncUpdatingCallback(),i=(0,l.YP)(e,r,{sync:!0,equals:()=>!1});return this.handles.add(i,t),i}_createSyncUpdatingCallback(){return()=>{this.handles.remove(p),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add((0,o.Os)((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(p))})),p)}}};(0,i._)([(0,u.Cb)({readOnly:!0})],d.prototype,"updating",void 0),d=(0,i._)([(0,c.j)("esri.views.support.WatchUpdatingTracking")],d);const p=-42;var h,y;(y=h||(h={}))[y.NONE=0]="NONE",y[y.SYNC=1]="SYNC",y[y.INIT=2]="INIT"},410:(e,t,r)=>{function i(e){var t;const r=e.layer;return"floorInfo"in r&&null!=(t=r.floorInfo)&&t.floorField&&"floors"in e.view?a(e.view.floors,r.floorInfo.floorField):null}function n(e,t){var r;return"floorInfo"in t&&null!=(r=t.floorInfo)&&r.floorField?a(e,t.floorInfo.floorField):null}function s(e,t){const{definitionExpression:r}=t;return e?r?`(${r}) AND (${e})`:e:r}function a(e,t){if(null==e||!e.length)return null;const r=e.filter((e=>""!==e)).map((e=>`'${e}'`));return r.push("''"),`${t} IN (${r.join(",")}) OR ${t} IS NULL`}r.d(t,{Hp:()=>s,cx:()=>i,ff:()=>n})}}]);
|